commit d2cbafef5c16f109c5731a1c4dc38698b20d7dfc Author: pahari.paramita Date: Wed Sep 3 15:35:13 2025 +0530 gake diff --git a/IPKS_Updated/src.7z b/IPKS_Updated/src.7z new file mode 100644 index 0000000..dd43386 Binary files /dev/null and b/IPKS_Updated/src.7z differ diff --git a/IPKS_Updated/src/src/conf/MANIFEST.MF b/IPKS_Updated/src/src/conf/MANIFEST.MF new file mode 100644 index 0000000..59499bc --- /dev/null +++ b/IPKS_Updated/src/src/conf/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/IPKS_Updated/src/src/java/Controller/AccAmendServlet.java b/IPKS_Updated/src/src/java/Controller/AccAmendServlet.java new file mode 100644 index 0000000..59073d9 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/AccAmendServlet.java @@ -0,0 +1,150 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import Dao.AccAmendDao; +import DataEntryBean.AccountAmendBean; +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 981898 + */ +public class AccAmendServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet AccAmendServlet"); + out.println(""); + out.println(""); + out.println("

Servlet AccAmendServlet at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String userId = (String) session.getAttribute("user"); + AccAmendDao oAccAmendDao = new AccAmendDao(); + String action = request.getParameter("action"); + AccountAmendBean oAccountAmendBean = null; + + try { + if (action.equalsIgnoreCase("search")) { + + response.setContentType("application/json"); + PrintWriter out = response.getWriter(); + String jsonStr = oAccAmendDao.searchAccounts(accNo, pacsId); + out.print(jsonStr); + out.flush(); + } else if (action.equalsIgnoreCase("accDtl")) { + + String accType = request.getParameter("accType"); + response.setContentType("application/json"); + PrintWriter out = response.getWriter(); + String jsonStr = oAccAmendDao.getAccDtl(accNo, pacsId, accType); + out.print(jsonStr); + out.flush(); + } else if (action.equalsIgnoreCase("newCifSearch")) { + + if(newCif.equalsIgnoreCase("NA")){ + newCif = ""; + } + response.setContentType("application/json"); + PrintWriter out = response.getWriter(); + String jsonStr = oAccAmendDao.getNewCif(newCif, pacsId); + out.print(jsonStr); + out.flush(); + } else if (action.equalsIgnoreCase("submit")) { + + + oAccountAmendBean = new AccountAmendBean(); + try { + // BeanUtils.populate(oAccountAmendBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + System.out.println("Error Occurred during processing."); + // Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + } catch (InvocationTargetException ex) { + System.out.println("Error Occurred during processing."); + // Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + } + String retnMsg = oAccAmendDao.updateCif(userId, pacsId, accNo, oAccountAmendBean, remarks); + request.setAttribute("message", retnMsg); + request.getRequestDispatcher("/AccountAmendment.jsp").forward(request, response); + } + } catch (Exception e) { + System.out.println("Error Occurred during processing."); + } finally + { + System.out.println("Processing done."); + } + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/AccountCreationServlet.java b/IPKS_Updated/src/src/java/Controller/AccountCreationServlet.java new file mode 100644 index 0000000..c0b4885 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/AccountCreationServlet.java @@ -0,0 +1,178 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.AccountCreationBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author Tcs Helpdesk10 + */ +public class AccountCreationServlet extends HttpServlet { + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + + //String ServletName = request.getParameter("handle_id"); + AccountCreationBean oAccountCreationBean = new AccountCreationBean(); + try { + // BeanUtils.populate(oAccountCreationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + System.out.println("Error Occurred during processing."); + //Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + } catch (InvocationTargetException ex) { + System.out.println("Error Occurred during processing."); + //Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + } finally + { + System.out.println("Processing done."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call operations.account_opening_authorization(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + } + + proc.setString(1, pacsId); + proc.setString(2, oAccountCreationBean.getProductCode()); + proc.setString(3, oAccountCreationBean.getInttCategory()); + proc.setString(4, oAccountCreationBean.getCifNumber()); + proc.setString(5, oAccountCreationBean.getCustomerType()); + proc.setString(6, oAccountCreationBean.getLimit()); + proc.setString(7, oAccountCreationBean.getLimitExpiryDate()); + proc.setString(8, oAccountCreationBean.getCollateralType()); + proc.setString(9, oAccountCreationBean.getLandinAcres()); + proc.setString(10, oAccountCreationBean.getDescription()); + proc.setString(11, oAccountCreationBean.getCurrentValuation()); + proc.setString(12, oAccountCreationBean.getSafeLendingMargin()); + proc.setString(13, user); + proc.setString(14, oAccountCreationBean.getSegmentCode()); + proc.setString(15, oAccountCreationBean.getCbsSavingsAccount()); + proc.setString(15, oAccountCreationBean.getCbsSavingsAccount()); + proc.setString(16, oAccountCreationBean.getActivityCode()); + proc.setString(17, oAccountCreationBean.getLimit_kind()); + proc.setString(45, oAccountCreationBean.getIntRate()); + proc.setString(46, oAccountCreationBean.getPenIntRate()); + proc.setString(18, null); + proc.setString(19, null); + proc.setString(20, null); + proc.setString(21, null); + proc.setString(22, null); + proc.setString(23, null); + proc.setString(24, null); + proc.setString(25, null); + proc.setString(26, null); + proc.registerOutParameter(27, java.sql.Types.VARCHAR); + proc.registerOutParameter(28, java.sql.Types.VARCHAR); + proc.setString(29, null); + proc.setString(30, null); + proc.setString(31, null); + proc.setString(32, null); + proc.setString(33, null); + proc.setString(34, null); + proc.setString(35, null); + +/*Additional null parameters added By Bitan related to Changes for Multiple CIF in DEP Accounts*/ + proc.setString(36, null); + proc.setString(37, null); + proc.setString(38, null); + proc.setString(39, null); + proc.setString(40, null); + proc.setString(41, null); + proc.setString(42, null); + proc.setString(43, null); + proc.setString(44, null); + + + proc.execute(); + + + + } catch (SQLException ex) { + System.out.println("Error Occurred during processing."); + //Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + //System.out.println(ex.toString()); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occured during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occured during connection close."); + //Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + //System.out.println(ex.toString()); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/accountCreation.jsp").forward(request, response); + + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/AccountDetailsServlet.java b/IPKS_Updated/src/src/java/Controller/AccountDetailsServlet.java new file mode 100644 index 0000000..c6f3d12 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/AccountDetailsServlet.java @@ -0,0 +1,1729 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.AccountDetailsBean; +import DataEntryBean.AccountDetailsBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.StringTokenizer; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 986137 + */ +public class AccountDetailsServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + Connection con = null; + CallableStatement proc = null; + String message = ""; + String ScreenStatus = ""; + //String hdrID = ""; + HttpSession session = request.getSession(false); + + + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + + + AccountDetailsBean oAccountDetailsBean = new AccountDetailsBean(); + AccountDetailsBean oAccountDetailsBeanObj = new AccountDetailsBean(); + ArrayList alAccountDetailsBean = new ArrayList(); + + + + //For Amend Div + + ArrayList alAccountDetailsBeanNew = new ArrayList(); + ArrayList alAccountDetailsBeanDeleted = new ArrayList(); + ArrayList alAccountDetailsBeanUpdated = new ArrayList(); + + if (ServletName.equalsIgnoreCase("CreateLoan")) { + + + try { + //BeanUtils.populate(oAccountDetailsBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + // String shgcode = request.getParameter("shgcode"); + //String shgname = request.getParameter("shgname"); + //String source = request.getParameter("source" + i); + //String bankname = request.getParameter("bankname" + i); + //String loanamount = request.getParameter("loanamount" + i); + //String accountnumber = request.getParameter("accountnumber" + i); + //String accountopendate = request.getParameter("accountopendate" + i); + //String lastdisbursementdate = request.getParameter("lastdisbursementdate" + i); + //String principaloutstanding = request.getParameter("principaloutstanding" + i); + //String principalpaid = request.getParameter("principalpaid" + i); + //String interestoutstanding = request.getParameter("interestoutstanding" + i); + //String interestpaid = request.getParameter("interestpaid" + i); + + if (accountnumber != null) { + oAccountDetailsBean = new AccountDetailsBean(); + oAccountDetailsBean.setShgcode(shgcode); + oAccountDetailsBean.setShgname(shgname); + oAccountDetailsBean.setSource(source); + oAccountDetailsBean.setBankname(bankname); + oAccountDetailsBean.setLoanamount(loanamount); + oAccountDetailsBean.setAccountnumber(accountnumber); + oAccountDetailsBean.setAccountopendate(accountopendate); + oAccountDetailsBean.setLastdisbursementdate(lastdisbursementdate); + oAccountDetailsBean.setPrincipaloutstanding(principaloutstanding); + oAccountDetailsBean.setPrincipalpaid(principalpaid); + oAccountDetailsBean.setInterestoutstanding(interestoutstanding); + oAccountDetailsBean.setInterestpaid(interestpaid); + alAccountDetailsBean.add(oAccountDetailsBean); + } + } catch (Exception e) { + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + } + if (alAccountDetailsBean.size() > 0) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call SHG_OPERATIONS.Upsert_account_details_loan(?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + for (int j = 0; j < alAccountDetailsBean.size(); j++) { + + oAccountDetailsBean = alAccountDetailsBean.get(j); + + + proc.setString(1, oAccountDetailsBean.getAcc_id()); + proc.setString(2, oAccountDetailsBean.getShgcode()); + proc.setString(3, oAccountDetailsBean.getShgname()); + proc.setString(4, oAccountDetailsBean.getSource()); + proc.setString(5, oAccountDetailsBean.getBankname()); + proc.setString(6, oAccountDetailsBean.getAccountnumber()); + proc.setString(7, oAccountDetailsBean.getAccountopendate()); + proc.setString(8, oAccountDetailsBean.getLastdisbursementdate()); + proc.setString(9, oAccountDetailsBean.getLoanamount()); + proc.setString(10, oAccountDetailsBean.getPrincipaloutstanding()); + proc.setString(11, oAccountDetailsBean.getPrincipalpaid()); + proc.setString(12, oAccountDetailsBean.getInterestoutstanding()); + proc.setString(13, oAccountDetailsBean.getInterestpaid()); + proc.setString(14, ServletName); + proc.addBatch(); + + + } + + proc.executeBatch(); + message = "Account Details created Successfully"; + + } catch (SQLException ex) { +// try { +// // con.rollback(); +// } catch (Exception e1) { +// // System.out.println(e1.toString()); +// System.out.println("Error Occurred during processing."); +// } + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + // System.out.println(ex.toString()); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occured during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occured during connection close."); + } + } + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Shg_JSP/AccountDetails.jsp").forward(request, response); + + } else if (ServletName.equalsIgnoreCase("CreateDeposit")) { + + + try { + // BeanUtils.populate(oAccountDetailsBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + //Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + // String shgcode = request.getParameter("shgcode"); + //String shgname = request.getParameter("shgname"); + //String source = request.getParameter("source1" + i); + //String bankname = request.getParameter("bankname1" + i); + //String accountnumber = request.getParameter("accountnumber1" + i); + //String accountopendate = request.getParameter("accountopendate1" + i); + //String outstandingbalance = request.getParameter("outstandingbalance" + i); + //String interestaccrued = request.getParameter("interestaccrued" + i); + //String lasttransactiondate = request.getParameter("lasttransactiondate" + i); + + if (accountnumber != null) { + oAccountDetailsBean = new AccountDetailsBean(); + oAccountDetailsBean.setShgcode(shgcode); + oAccountDetailsBean.setShgname(shgname); + oAccountDetailsBean.setSource1(source); + oAccountDetailsBean.setBankname1(bankname); + oAccountDetailsBean.setAccountnumber1(accountnumber); + oAccountDetailsBean.setAccountopendate1(accountopendate); + oAccountDetailsBean.setOutstandingbalance(outstandingbalance); + oAccountDetailsBean.setInterestaccrued(interestaccrued); + oAccountDetailsBean.setLasttransactiondate(lasttransactiondate); + alAccountDetailsBean.add(oAccountDetailsBean); + } + } catch (Exception e) { + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + } + if (alAccountDetailsBean.size() > 0) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call SHG_OPERATIONS.Upsert_account_details_deposit(?,?,?,?,?,?,?,?,?,?,?)}"); + } catch (SQLException ex) { + System.out.println("Error Occurred during processing."); + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + } finally { + System.out.println("Processing done."); + } + + + for (int j = 0; j < alAccountDetailsBean.size(); j++) { + + oAccountDetailsBean = alAccountDetailsBean.get(j); + + + proc.setString(1, oAccountDetailsBean.getAcc_id()); + proc.setString(2, oAccountDetailsBean.getShgcode()); + proc.setString(3, oAccountDetailsBean.getShgname()); + proc.setString(4, oAccountDetailsBean.getSource1()); + proc.setString(5, oAccountDetailsBean.getBankname1()); + proc.setString(6, oAccountDetailsBean.getAccountnumber1()); + proc.setString(7, oAccountDetailsBean.getAccountopendate1()); + proc.setString(8, oAccountDetailsBean.getOutstandingbalance()); + proc.setString(9, oAccountDetailsBean.getInterestaccrued()); + proc.setString(10, oAccountDetailsBean.getLasttransactiondate()); + proc.setString(11, ServletName); + proc.addBatch(); + + + } + + proc.executeBatch(); + message = "Account Details created Successfully"; + + } catch (SQLException ex) { + try { + // con.rollback(); + } catch (Exception e1) { + //System.out.println(e1.toString()); + System.out.println("Error Occurred during processing."); + } + System.out.println("Error Occurred during processing."); + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occured during connection close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occured during connection close."); + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + } + } + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Shg_JSP/AccountDetails.jsp").forward(request, response); + + } else if ("SearchLoan".equalsIgnoreCase(ServletName)) { + + try { + //BeanUtils.populate(oAccountDetailsBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + oAccountDetailsBeanObj = new AccountDetailsBean(); + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + request.setAttribute("checkoption3", "loan1"); + request.setAttribute("checkoption", "amend"); + + //oAccountDetailsBeanObj.setShgcode(request.getParameter("shgSearch").toString()); + //oAccountDetailsBeanObj.setShgname(request.getParameter("shgName").toString()); + + } catch (Exception ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + //For Details Part Populate + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + try { + + //ResultSet rs = statement.executeQuery("select ID,SOURCE, BANK_NAME, to_char(ACCOUNT_OPEN_DATE,'DD/MM/RRRR')as ACCOUNT_OPEN_DATE ,to_char(LAST_DISBURSEMENT_DATE,'DD/MM/RRRR') as LAST_DISBURSEMENT_DATE,ACCOUNT_NO,PRINCIPAL_OUTSTANDING,LOAN_AMOUNT,PRINCIPAL_PAID,INTEREST_OUTSTANDING,INTEREST_PAID from ACCOUNT_DETAILS_LOAN where SHG_CODE= '" + oAccountDetailsBean.getShgSearch() + "' "); + + + + while (rs.next()) { + oAccountDetailsBean = new AccountDetailsBean(); + oAccountDetailsBean.setAcc_id(rs.getString("ID")); + oAccountDetailsBean.setSource(rs.getString("SOURCE")); + oAccountDetailsBean.setBankname(rs.getString("BANK_NAME")); + oAccountDetailsBean.setAccountopendate(rs.getString("ACCOUNT_OPEN_DATE")); + oAccountDetailsBean.setLastdisbursementdate(rs.getString("LAST_DISBURSEMENT_DATE")); + oAccountDetailsBean.setAccountnumber(rs.getString("ACCOUNT_NO")); + oAccountDetailsBean.setPrincipaloutstanding(rs.getString("PRINCIPAL_OUTSTANDING")); + oAccountDetailsBean.setLoanamount(rs.getString("LOAN_AMOUNT")); + oAccountDetailsBean.setPrincipalpaid(rs.getString("PRINCIPAL_PAID")); + oAccountDetailsBean.setInterestpaid(rs.getString("INTEREST_PAID")); + oAccountDetailsBean.setInterestoutstanding(rs.getString("INTEREST_OUTSTANDING")); + + alAccountDetailsBean.add(oAccountDetailsBean); + + + } + + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + + + request.setAttribute("AccountDetailsBeanObj", oAccountDetailsBeanObj); + request.setAttribute("alAccountDetailsBean", alAccountDetailsBean); + request.getRequestDispatcher("/Shg_JSP/AccountDetails.jsp").forward(request, response); + + }else if ("SearchLoan2".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oAccountDetailsBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + Connection connection = null; + //ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + //String shg_code=request.getParameter("shgSearch2"); + + try { + oAccountDetailsBeanObj = new AccountDetailsBean(); + + + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + request.setAttribute("checkoption5", "loan3"); + + request.setAttribute("checkoption", "transaction"); + request.setAttribute("viewshg2", shgName); + + + + //oAccountDetailsBeanObj.setShgcode(request.getParameter("shgSearch").toString()); + //oAccountDetailsBeanObj.setShgname(request.getParameter("shgName").toString()); + //oAccountDetailsBeanObj.setShgcode(request.getParameter("shgSearch2").toString()); + //oAccountDetailsBeanObj.setShgname(request.getParameter("viewshg2").toString()); + //oAccountDetailsBeanObj.setShgname(request.getParameter("shgName").toString()); + + } catch (Exception ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + //For Details Part Populate + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + try { + + //ResultSet rs = statement.executeQuery("select s.txn_ref,s.acc_no,s.txn_amt,s.txn_type,m.member_name,trunc(s.txn_date) as txn_date from shg_txn s,basic_info b,member_information m where s.flag='T' and s.cif=b.cif and b.shg_id=m.shg_id and s.member_code=m.member_id and s.module_type='Loan' and m.shg_code= '" + shg_code + "' "); + + while (rs.next()) { + oAccountDetailsBean = new AccountDetailsBean(); + oAccountDetailsBean.setTxn_ref_no(rs.getString("TXN_REF")); + oAccountDetailsBean.setAccountnumber(rs.getString("ACC_NO")); + oAccountDetailsBean.setTxn_amt(rs.getString("TXN_AMT")); + oAccountDetailsBean.setTxn_type(rs.getString("TXN_TYPE")); + oAccountDetailsBean.setMember_name(rs.getString("MEMBER_NAME")); + oAccountDetailsBean.setLasttransactiondate(rs.getString("TXN_DATE").substring(0, 10)); + //oAccountDetailsBeanObj.setShgname(request.getParameter("viewshg2")); + + alAccountDetailsBean.add(oAccountDetailsBean); + + } + + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + request.setAttribute("AccountDetailsBeanObj", oAccountDetailsBeanObj); + request.setAttribute("alAccountDetailsBean", alAccountDetailsBean); + request.getRequestDispatcher("/Shg_JSP/AccountDetails.jsp").forward(request, response); + + } else if ("viewLoan".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oAccountDetailsBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + + try { + oAccountDetailsBeanObj = new AccountDetailsBean(); + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + request.setAttribute("checkoption4", "loan2"); + + request.setAttribute("checkoption", "view"); + + //oAccountDetailsBeanObj.setShgcode(request.getParameter("shgSearch1").toString()); + //oAccountDetailsBeanObj.setShgname(request.getParameter("viewshg").toString()); + + } catch (Exception ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + + + //For Details Part Populate + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + try { + + // ResultSet rs = statement.executeQuery("select t.key_1 as account_no,to_char(t.acct_open_dt) as account_open_date,'' as bank_name, to_char(max(d.disb_dt)) as last_disbursement_date,to_char(t.sanction_amt) as loan_amount,to_char(t.prin_outst) as principal_outstanding,to_char(t.intt_outst) as interest_outstanding,to_char (t.prin_paid) as principal_paid,to_char(t.intt_paid) as interest_paid,'Internal' as source from loan_account t,basic_info b, kyc_hdr g, loan_disb_details d where t.customer_no=b.cif and b.name_of_shg=(g.first_name||nvl2(g.middle_name,' '||g.middle_name,'')||nvl2(g.last_name,' '||g.last_name,'')) and b.shg_code= " + request.getParameter("shgSearch1").toString() + " group by t.key_1,t.acct_open_dt,t.sanction_amt,t.prin_outst,t.intt_outst,t.prin_paid,t.intt_paid union select to_char(m.account_no),to_char(m.account_open_date),m.bank_name,to_char(m.last_disbursement_date),to_char(m.loan_amount),to_char(m.principal_outstanding),to_char(m.interest_outstanding),to_char(m.principal_paid),to_char(m.interest_paid),m.source from account_details_loan m, kyc_hdr g where m.source = 'External'and m.shg_name=(g.first_name||nvl2(g.middle_name,' '||g.middle_name,'')||nvl2(g.last_name,' '||g.last_name,'')) and m.shg_code= '" + request.getParameter("shgSearch1").toString() + "' "); + + while (rs.next()) { + oAccountDetailsBean = new AccountDetailsBean(); + // oAccountDetailsBean.setAcc_id(rs.getString("ID")); + oAccountDetailsBean.setSource(rs.getString("source")); + oAccountDetailsBean.setBankname(rs.getString("bank_name")); + oAccountDetailsBean.setAccountopendate(rs.getString("account_open_date")); + oAccountDetailsBean.setLastdisbursementdate(rs.getString("last_disbursement_date")); + oAccountDetailsBean.setAccountnumber(rs.getString("account_no")); + oAccountDetailsBean.setPrincipaloutstanding(rs.getString("principal_outstanding")); + oAccountDetailsBean.setLoanamount(rs.getString("loan_amount")); + oAccountDetailsBean.setPrincipalpaid(rs.getString("principal_paid")); + oAccountDetailsBean.setInterestpaid(rs.getString("interest_paid")); + oAccountDetailsBean.setInterestoutstanding(rs.getString("interest_outstanding")); + + alAccountDetailsBean.add(oAccountDetailsBean); + } + + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + request.setAttribute("AccountDetailsBeanObj", oAccountDetailsBeanObj); + request.setAttribute("alAccountDetailsBean", alAccountDetailsBean); + request.getRequestDispatcher("/Shg_JSP/AccountDetails.jsp").forward(request, response); + + } else if ("SearchDeposit".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oAccountDetailsBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + + try { + oAccountDetailsBeanObj = new AccountDetailsBean(); + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + request.setAttribute("checkoption3", "deposit1"); + + request.setAttribute("checkoption", "amend"); + + //oAccountDetailsBeanObj.setShgcode(request.getParameter("shgSearch").toString()); + //oAccountDetailsBeanObj.setShgname(request.getParameter("shgName").toString()); + + } catch (Exception ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + //For Details Part Populate + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + try { + + //ResultSet rs = statement.executeQuery("select ID,SOURCE, BANK_NAME, to_char(ACCOUNT_OPEN_DATE,'DD/MM/RRRR') as ACCOUNT_OPEN_DATE ,to_char(LAST_TRANSACTION_DATE,'DD/MM/RRRR') as LAST_TRANSACTION_DATE,ACCOUNT_NUMBER,OUTSTANDING_BALANCE,INTEREST_ACCRUED from ACCOUNT_DETAILS_DEPOSIT where SHG_CODE= '" + oAccountDetailsBean.getShgSearch() + "' "); + + while (rs.next()) { + oAccountDetailsBean = new AccountDetailsBean(); + oAccountDetailsBean.setAcc_id(rs.getString("ID")); + oAccountDetailsBean.setSource1(rs.getString("SOURCE")); + oAccountDetailsBean.setBankname1(rs.getString("BANK_NAME")); + oAccountDetailsBean.setAccountopendate1(rs.getString("ACCOUNT_OPEN_DATE")); + oAccountDetailsBean.setLasttransactiondate(rs.getString("LAST_TRANSACTION_DATE")); + oAccountDetailsBean.setAccountnumber1(rs.getString("ACCOUNT_NUMBER")); + oAccountDetailsBean.setInterestaccrued(rs.getString("INTEREST_ACCRUED")); + oAccountDetailsBean.setOutstandingbalance(rs.getString("OUTSTANDING_BALANCE")); + + alAccountDetailsBean.add(oAccountDetailsBean); + + } + + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + request.setAttribute("AccountDetailsBeanObj", oAccountDetailsBeanObj); + request.setAttribute("alAccountDetailsBean", alAccountDetailsBean); + request.getRequestDispatcher("/Shg_JSP/AccountDetails.jsp").forward(request, response); + + } + + else if ("SearchDeposit2".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oAccountDetailsBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + + try { + oAccountDetailsBeanObj = new AccountDetailsBean(); + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + request.setAttribute("checkoption5", "deposit3"); + + request.setAttribute("checkoption", "transaction"); + request.setAttribute("viewshg2", shgName); + + //oAccountDetailsBeanObj.setShgcode(request.getParameter("shgSearch2").toString()); + //oAccountDetailsBeanObj.setShgname(request.getParameter("shgName").toString()); + //oAccountDetailsBeanObj.setShgname(request.getParameter("viewshg2").toString()); + + } catch (Exception ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + //For Details Part Populate + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + try { + + //ResultSet rs = statement.executeQuery("select s.txn_ref,s.acc_no,b.name_of_shg,s.txn_amt,s.txn_type,m.member_name,trunc(s.txn_date) as txn_date from shg_txn s,basic_info b,member_information m where s.flag='T' and s.cif=b.cif and b.shg_id=m.shg_id and s.member_code=m.member_id and s.module_type='Deposit' and m.shg_code= '" + shg_code + "' "); + + while (rs.next()) { + oAccountDetailsBean = new AccountDetailsBean(); + oAccountDetailsBean.setTxn_ref_no(rs.getString("TXN_REF")); + oAccountDetailsBean.setAccountnumber(rs.getString("ACC_NO")); + oAccountDetailsBean.setTxn_amt(rs.getString("TXN_AMT")); + oAccountDetailsBean.setTxn_type(rs.getString("TXN_TYPE")); + oAccountDetailsBean.setMember_name(rs.getString("MEMBER_NAME")); + oAccountDetailsBean.setLasttransactiondate(rs.getString("TXN_DATE").substring(0, 10)); + //oAccountDetailsBeanObj.setShgname(rs.getString("NAME_OF_SHG")); + + alAccountDetailsBean.add(oAccountDetailsBean); + + } + + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + request.setAttribute("AccountDetailsBeanObj", oAccountDetailsBeanObj); + request.setAttribute("alAccountDetailsBean", alAccountDetailsBean); + request.getRequestDispatcher("/Shg_JSP/AccountDetails.jsp").forward(request, response); + + } else if ("SearchDepositMember".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oAccountDetailsBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + + + + + if(mem_id=="") + { + mem_id="%"; + } + + try { + oAccountDetailsBeanObj = new AccountDetailsBean(); + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + request.setAttribute("s_code", s_code); + request.setAttribute("mem_name", m_name); + request.setAttribute("tType", t_Type); + request.setAttribute("viewshg3", v_shg); + request.setAttribute("member_id", mem_id); + request.setAttribute("checkoption", "memberDetails"); + + //oAccountDetailsBeanObj.setShgcode(request.getParameter("shgSearch").toString()); + //oAccountDetailsBeanObj.setShgname(request.getParameter("shgName").toString()); + + } catch (Exception ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + //For Details Part Populate + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + try { + + //ResultSet rs = statement.executeQuery("select s.member_code,(select m.member_name from member_information m where m.member_id=s.member_code)member_name,(select sum(st.txn_amt) from shg_txn st where st.txn_type = 'DR' and st.member_code = s.member_code and st.flag='T') withdrawl,(select sum(st.txn_amt) from shg_txn st where st.txn_type = 'CR' and st.member_code = s.member_code and st.flag='T') Deposit,(select distinct(d.avail_bal) from dep_account d, shg_txn st where d.key_1 = st.acc_no and st.member_code = s.member_code) total_bal from shg_txn s where s.member_code like '%" + mem_id + "%' and s.shg_code =(select b.shg_code from basic_info b where b.shg_id = '" +v_shg+ "') and s.module_type = 'Deposit' and s.flag='T' group by s.member_code"); + + while (rs.next()) { + oAccountDetailsBean = new AccountDetailsBean(); + oAccountDetailsBean. setMember_code(rs.getString("MEMBER_CODE")); + oAccountDetailsBean. setMember_name(rs.getString("MEMBER_NAME")); + oAccountDetailsBean. setTotal_bal(rs.getString("TOTAL_BAL")); + oAccountDetailsBean.setWithdrawl(rs.getString("WITHDRAWL")); + oAccountDetailsBean.setDeposit(rs.getString("DEPOSIT")); + + alAccountDetailsBean.add(oAccountDetailsBean); + } + + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + request.setAttribute("AccountDetailsBeanObj", oAccountDetailsBeanObj); + request.setAttribute("alAccountDetailsBean", alAccountDetailsBean); + request.getRequestDispatcher("/Shg_JSP/AccountDetails.jsp").forward(request, response); + + } + + else if ("viewDeposit".equalsIgnoreCase(ServletName)) { + + try { + //BeanUtils.populate(oAccountDetailsBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + + try { + oAccountDetailsBeanObj = new AccountDetailsBean(); + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + request.setAttribute("checkoption4", "deposit2"); + request.setAttribute("checkoption", "view"); + + //oAccountDetailsBeanObj.setShgcode(request.getParameter("shgSearch1").toString()); + //oAccountDetailsBeanObj.setShgname(request.getParameter("viewshg").toString()); + + } catch (Exception ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + //For Details Part Populate + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + try { + + //ResultSet rs = statement.executeQuery("select t.key_1 as account_number,TO_CHAR(t.acct_open_dt) as account_open_date,t.avail_bal as outstanding_balance,t.intt_outst as interest_accrued,'Internal' as source, to_char(max(f.tran_date)) as last_transaction_date,'' as bank_name from dep_account t,basic_info b, kyc_hdr g,dep_txn f where t.customer_no=b.cif and b.name_of_shg=(g.first_name||nvl2(g.middle_name,' '||g.middle_name,'')||nvl2(g.last_name,' '|| g.last_name,'')) and t.key_1=f.acct_no and b.shg_code= " + request.getParameter("shgSearch1").toString() + " group by t.key_1,TO_CHAR(t.acct_open_dt),t.avail_bal,t.intt_outst union select TO_CHAR(m.account_number),TO_CHAR(m.account_open_date),m.outstanding_balance,m.interest_accrued,m.source,to_char(m.last_transaction_date),m.bank_name from account_details_deposit m, kyc_hdr g where m.source = 'External'and m.shg_name=(g.first_name||nvl2(g.middle_name,' '|| g.middle_name,'')||nvl2(g.last_name,' '||g.last_name,''))and m.shg_code= '" + request.getParameter("shgSearch1").toString() + "' "); + + while (rs.next()) { + oAccountDetailsBean = new AccountDetailsBean(); + //oAccountDetailsBean.setAcc_id(rs.getString("ID")); + oAccountDetailsBean.setSource1(rs.getString("source")); + oAccountDetailsBean.setBankname1(rs.getString("bank_name")); + oAccountDetailsBean.setAccountopendate1(rs.getString("account_open_date")); + oAccountDetailsBean.setLasttransactiondate(rs.getString("last_transaction_date")); + oAccountDetailsBean.setAccountnumber1(rs.getString("account_number")); + oAccountDetailsBean.setInterestaccrued(rs.getString("interest_accrued")); + oAccountDetailsBean.setOutstandingbalance(rs.getString("outstanding_balance")); + + alAccountDetailsBean.add(oAccountDetailsBean); + + } + + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + request.setAttribute("AccountDetailsBeanObj", oAccountDetailsBeanObj); + request.setAttribute("alAccountDetailsBean", alAccountDetailsBean); + request.getRequestDispatcher("/Shg_JSP/AccountDetails.jsp").forward(request, response); + + } else if (ServletName.equalsIgnoreCase("UpdateLoan")) { + + String rowStatus = null; + String acc_id = null; + String deletedRows = null; + int f = 0; + + try { + BeanUtils.populate(oAccountDetailsBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + f = 1; + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + f = 1; + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + String shgcode = request.getParameter("shgcodeAmend"); + String shgname = request.getParameter("shgnameAmend"); + acc_id = request.getParameter("acc_idAmend" + i); + + + + + if ((accountnumber != null) && (rowStatus != null)) { + oAccountDetailsBean = new AccountDetailsBean(); + oAccountDetailsBean.setAcc_id(acc_id); + oAccountDetailsBean.setShgcode(shgcode); + oAccountDetailsBean.setShgname(shgname); + oAccountDetailsBean.setSource(source); + oAccountDetailsBean.setBankname(bankname); + oAccountDetailsBean.setLoanamount(loanamount); + oAccountDetailsBean.setAccountnumber(accountnumber); + oAccountDetailsBean.setAccountopendate(accountopendate); + oAccountDetailsBean.setLastdisbursementdate(lastdisbursementdate); + oAccountDetailsBean.setPrincipaloutstanding(principaloutstanding); + oAccountDetailsBean.setPrincipalpaid(principalpaid); + oAccountDetailsBean.setInterestoutstanding(interestoutstanding); + oAccountDetailsBean.setInterestpaid(interestpaid); + + if (rowStatus.equals("N")) { + alAccountDetailsBeanNew.add(oAccountDetailsBean); + } else { + alAccountDetailsBeanUpdated.add(oAccountDetailsBean); + } + } + } catch (Exception e) { + f = 1; + } finally { + System.out.println("Processing done."); + } + } + + + //For Deletion + + deletedRows = request.getParameter("deletedRows"); + + if ((!deletedRows.equalsIgnoreCase(null)) || (!deletedRows.equalsIgnoreCase(""))) { + StringTokenizer tokenizer = new StringTokenizer(deletedRows, ","); + + while (tokenizer.hasMoreTokens()) { + + oAccountDetailsBean = new AccountDetailsBean(); + oAccountDetailsBean.setAcc_id(tokenizer.nextToken()); + oAccountDetailsBean.setShgcode(request.getParameter("shgcodeAmend")); + + alAccountDetailsBeanDeleted.add(oAccountDetailsBean); + + // } + } + + if (alAccountDetailsBeanUpdated.size() > 0) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call SHG_OPERATIONS.Upsert_account_details_loan(?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + //} catch (SQLException ex) { + f = 1; + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + + for (int j = 0; j < alAccountDetailsBeanUpdated.size(); j++) { + + oAccountDetailsBean = new AccountDetailsBean(); + + oAccountDetailsBean = alAccountDetailsBeanUpdated.get(j); + + + proc.setString(1, oAccountDetailsBean.getAcc_id()); + proc.setString(2, oAccountDetailsBean.getShgcode()); + proc.setString(3, oAccountDetailsBean.getShgname()); + proc.setString(4, oAccountDetailsBean.getSource()); + proc.setString(5, oAccountDetailsBean.getBankname()); + proc.setString(6, oAccountDetailsBean.getAccountnumber()); + proc.setString(7, oAccountDetailsBean.getAccountopendate()); + proc.setString(8, oAccountDetailsBean.getLastdisbursementdate()); + proc.setString(9, oAccountDetailsBean.getLoanamount()); + proc.setString(10, oAccountDetailsBean.getPrincipaloutstanding()); + proc.setString(11, oAccountDetailsBean.getPrincipalpaid()); + proc.setString(12, oAccountDetailsBean.getInterestoutstanding()); + proc.setString(13, oAccountDetailsBean.getInterestpaid()); + proc.setString(14, ServletName); + proc.addBatch(); + + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + f = 1; + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + f = 1; + System.out.println("Error Occurred during connection close."); + } + try { + con.close(); + } catch (SQLException ex) { + f = 1; + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during connection close."); + } + } + } + + //for deletion + + if (alAccountDetailsBeanDeleted.size() > 0) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call SHG_OPERATIONS.Upsert_account_details_loan(?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + f = 1; + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + for (int j = 0; j < alAccountDetailsBeanDeleted.size(); j++) { + + // oAccountDetailsBean = new AccountDetailsBean(); + + oAccountDetailsBean = alAccountDetailsBeanDeleted.get(j); + + proc.setString(2, oAccountDetailsBean.getShgcode()); + proc.setString(1, oAccountDetailsBean.getAcc_id()); + proc.setString(3, null); + proc.setString(4, null); + proc.setString(5, null); + proc.setString(6, null); + proc.setString(7, null); + proc.setString(8, null); + proc.setString(9, null); + proc.setString(10, null); + proc.setString(11, null); + proc.setString(12, null); + proc.setString(13, null); + proc.setString(14, "DeleteLoan"); + proc.addBatch(); + + } + proc.executeBatch(); + + } catch (SQLException ex) { + f = 1; + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + f = 1; + // System.out.println(e.toString()); + System.out.println("Error Occurred during connection close."); + } + try { + con.close(); + } catch (SQLException ex) { + f = 1; + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during connection close."); + } + } + } + + + //For New Insertion + + + if (alAccountDetailsBeanNew.size() > 0) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call SHG_OPERATIONS.Upsert_account_details_loan(?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + f = 1; + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + + for (int j = 0; j < alAccountDetailsBeanNew.size(); j++) { + + oAccountDetailsBean = new AccountDetailsBean(); + oAccountDetailsBean = alAccountDetailsBeanNew.get(j); + + + + proc.setString(1, oAccountDetailsBean.getAcc_id()); + proc.setString(2, oAccountDetailsBean.getShgcode()); + proc.setString(3, oAccountDetailsBean.getShgname()); + proc.setString(4, oAccountDetailsBean.getSource()); + proc.setString(5, oAccountDetailsBean.getBankname()); + proc.setString(6, oAccountDetailsBean.getAccountnumber()); + proc.setString(7, oAccountDetailsBean.getAccountopendate()); + proc.setString(8, oAccountDetailsBean.getLastdisbursementdate()); + proc.setString(9, oAccountDetailsBean.getLoanamount()); + proc.setString(10, oAccountDetailsBean.getPrincipaloutstanding()); + proc.setString(11, oAccountDetailsBean.getPrincipalpaid()); + proc.setString(12, oAccountDetailsBean.getInterestoutstanding()); + proc.setString(13, oAccountDetailsBean.getInterestpaid()); + proc.setString(14, "CreateLoan"); + + proc.addBatch(); + + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + f = 1; + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + f = 1; + // System.out.println(e.toString()); + System.out.println("Error Occurred during connection close."); + } + try { + con.close(); + } catch (SQLException ex) { + f = 1; + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during connection close."); + } + } + } + if (f != 0) { + message = "Error occured during Account Details amendment"; + } else { + message = "Account Details amended Successfully"; + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Shg_JSP/AccountDetails.jsp").forward(request, response); + + } else if (ServletName.equalsIgnoreCase("UpdateDeposit")) { + + + + String rowStatus = null; + String acc_id = null; + String deletedRows = null; + int f = 0; + + try { + BeanUtils.populate(oAccountDetailsBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + f = 1; + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + f = 1; + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + String shgcode = request.getParameter("shgcodeAmend"); + String shgname = request.getParameter("shgnameAmend"); + acc_id = request.getParameter("acc_idAmend" + i); + String source = request.getParameter("source1Amend" + i); + String bankname = request.getParameter("bankname1Amend" + i); + String accountnumber = request.getParameter("accountnumber1Amend" + i); + String accountopendate = request.getParameter("accountopendate1Amend" + i); + String outstandingbalance = request.getParameter("outstandingbalanceAmend" + i); + String interestaccrued = request.getParameter("interestaccruedAmend" + i); + String lasttransactiondate = request.getParameter("lasttransactiondateAmend" + i); + rowStatus = request.getParameter("rowStatus" + i); + + + + //if ((accountnumber != null) && (rowStatus != null)) { + //oAccountDetailsBean = new AccountDetailsBean(); + //oAccountDetailsBean.setAcc_id(acc_id); + //oAccountDetailsBean.setShgcode(shgcode); + //oAccountDetailsBean.setShgname(shgname); + //oAccountDetailsBean.setSource1(source); + //oAccountDetailsBean.setBankname1(bankname); + //oAccountDetailsBean.setAccountnumber1(accountnumber); + //oAccountDetailsBean.setAccountopendate1(accountopendate); + oAccountDetailsBean.setOutstandingbalance(outstandingbalance); + oAccountDetailsBean.setInterestaccrued(interestaccrued); + oAccountDetailsBean.setLasttransactiondate(lasttransactiondate); + + if (rowStatus.equals("N")) { + alAccountDetailsBeanNew.add(oAccountDetailsBean); + } else { + alAccountDetailsBeanUpdated.add(oAccountDetailsBean); + } + } + } catch (Exception e) { + f = 1; + } finally { + System.out.println("Processing done."); + } + } + + + + + + + + + //For Deletion + + deletedRows = request.getParameter("deletedRows"); + + if ((!deletedRows.equalsIgnoreCase(null)) || (!deletedRows.equalsIgnoreCase(""))) { + StringTokenizer tokenizer = new StringTokenizer(deletedRows, ","); + + while (tokenizer.hasMoreTokens()) { + + oAccountDetailsBean = new AccountDetailsBean(); + oAccountDetailsBean.setAcc_id(tokenizer.nextToken()); + oAccountDetailsBean.setShgcode(request.getParameter("shgcodeAmend")); + + alAccountDetailsBeanDeleted.add(oAccountDetailsBean); + + //} + } + + + + + if (alAccountDetailsBeanUpdated.size() > 0) { + + try { + //con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call SHG_OPERATIONS.Upsert_account_details_deposit(?,?,?,?,?,?,?,?,?,?,?)}"); + } catch (SQLException ex) { + f = 1; + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + + for (int j = 0; j < alAccountDetailsBeanUpdated.size(); j++) { + + oAccountDetailsBean = new AccountDetailsBean(); + + oAccountDetailsBean = alAccountDetailsBeanUpdated.get(j); + + + + proc.setString(1, oAccountDetailsBean.getAcc_id()); + proc.setString(2, oAccountDetailsBean.getShgcode()); + proc.setString(3, oAccountDetailsBean.getShgname()); + proc.setString(4, oAccountDetailsBean.getSource1()); + proc.setString(5, oAccountDetailsBean.getBankname1()); + proc.setString(6, oAccountDetailsBean.getAccountnumber1()); + proc.setString(7, oAccountDetailsBean.getAccountopendate1()); + proc.setString(8, oAccountDetailsBean.getOutstandingbalance()); + proc.setString(9, oAccountDetailsBean.getInterestaccrued()); + proc.setString(10, oAccountDetailsBean.getLasttransactiondate()); + proc.setString(11, ServletName); + proc.addBatch(); + + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + f = 1; + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + f = 1; + // System.out.println(e.toString()); + System.out.println("Error Occurred during connection close."); + } + try { + con.close(); + } catch (SQLException ex) { + f = 1; + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during connection close."); + } + } + } + + //for deletion + + if (alAccountDetailsBeanDeleted.size() > 0) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call SHG_OPERATIONS.Upsert_account_details_deposit(?,?,?,?,?,?,?,?,?,?,?)}"); + } catch (SQLException ex) { + f = 1; + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } finally { + System.out.println("Processing done."); + } + + + for (int j = 0; j < alAccountDetailsBeanDeleted.size(); j++) { + + // oAccountDetailsBean = new AccountDetailsBean(); + + oAccountDetailsBean = alAccountDetailsBeanDeleted.get(j); + + + proc.setString(2, oAccountDetailsBean.getShgcode()); + proc.setString(1, oAccountDetailsBean.getAcc_id()); + proc.setString(3, null); + proc.setString(4, null); + proc.setString(5, null); + + proc.setString(7, null); + proc.setString(8, null); + proc.setString(9, null); + proc.setString(10, null); + proc.setString(11, "DeleteDeposit"); + proc.addBatch(); + + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + f = 1; + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + f = 1; + // System.out.println(e.toString()); + System.out.println("Error Occurred during connection close."); + } + try { + con.close(); + } catch (SQLException ex) { + f = 1; + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during connection close."); + } + } + } + + + //For New Insertion + + + if (alAccountDetailsBeanNew.size() > 0) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call SHG_OPERATIONS.Upsert_account_details_deposit(?,?,?,?,?,?,?,?,?,?,?)}"); + } catch (SQLException ex) { + f = 1; + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + + for (int j = 0; j < alAccountDetailsBeanNew.size(); j++) { + + oAccountDetailsBean = alAccountDetailsBeanNew.get(j); + + + proc.setString(1, oAccountDetailsBean.getAcc_id()); + proc.setString(2, oAccountDetailsBean.getShgcode()); + proc.setString(3, oAccountDetailsBean.getShgname()); + proc.setString(4, oAccountDetailsBean.getSource1()); + proc.setString(5, oAccountDetailsBean.getBankname1()); + proc.setString(6, oAccountDetailsBean.getAccountnumber1()); + proc.setString(7, oAccountDetailsBean.getAccountopendate1()); + proc.setString(8, oAccountDetailsBean.getOutstandingbalance()); + proc.setString(9, oAccountDetailsBean.getInterestaccrued()); + proc.setString(10, oAccountDetailsBean.getLasttransactiondate()); + + proc.setString(11, "CreateDeposit"); + + proc.addBatch(); + + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + f = 1; + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + f = 1; + // System.out.println(e.toString()); + System.out.println("Error Occurred during connection close."); + } + try { + con.close(); + } catch (SQLException ex) { + f = 1; + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during connection close."); + } + } + } + + if (f != 0) { + message = "Error occured during Account Details amendment"; + } else { + message = "Account Details amended Successfully"; + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Shg_JSP/AccountDetails.jsp").forward(request, response); + + } + + else if(ServletName.equalsIgnoreCase("SearchDepositMember")) + { + try { + BeanUtils.populate(oAccountDetailsBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + Connection connection = null; + ResultSet resultset = null; + + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + + + + + try { + oAccountDetailsBeanObj = new AccountDetailsBean(); + + + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + request.setAttribute("checkoption4", "deposit2"); + request.setAttribute("checkoption", "view"); + + + oAccountDetailsBeanObj.setShgcode(request.getParameter("shgSearch1").toString()); + oAccountDetailsBeanObj.setShgname(request.getParameter("viewshg").toString()); + + + + + } catch (Exception ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + + + //For Details Part Populate + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + System.out.println("Processing done."); + } + try { + + //ResultSet rs = statement.executeQuery("select * from shg_txn s where s.module_type='Deposit' and s.member_code= '" + request.getParameter("member_id").toString() + "' "); + + + while (rs.next()) { + oAccountDetailsBean = new AccountDetailsBean(); + //oAccountDetailsBean.setAcc_id(rs.getString("ID")); + oAccountDetailsBean.setSource1(rs.getString("source")); + oAccountDetailsBean.setBankname1(rs.getString("bank_name")); + oAccountDetailsBean.setAccountopendate1(rs.getString("account_open_date")); + oAccountDetailsBean.setLasttransactiondate(rs.getString("last_transaction_date")); + oAccountDetailsBean.setAccountnumber1(rs.getString("account_number")); + oAccountDetailsBean.setInterestaccrued(rs.getString("interest_accrued")); + oAccountDetailsBean.setOutstandingbalance(rs.getString("outstanding_balance")); + + alAccountDetailsBean.add(oAccountDetailsBean); + + + } + + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(AccountDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error Occurred during connection close."); + } + + } + + + + + request.setAttribute("AccountDetailsBeanObj", oAccountDetailsBeanObj); + request.setAttribute("alAccountDetailsBean", alAccountDetailsBean); + request.getRequestDispatcher("/Shg_JSP/AccountDetails.jsp").forward(request, response); + } + + + + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/AccountModeOfOperationServlet.java b/IPKS_Updated/src/src/java/Controller/AccountModeOfOperationServlet.java new file mode 100644 index 0000000..69ce18c --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/AccountModeOfOperationServlet.java @@ -0,0 +1,221 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.DepositMiscellaneousBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.StringTokenizer; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 986137 + */ +public class AccountModeOfOperationServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String depositAccSearch = ""; + ResultSet rs = null; + int SeachFound = 0; + String message = ""; + String resetBy=null; + String action = request.getParameter("handle_id"); + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + //added by rajdiip + StringBuilder query = null; + PreparedStatement ps = null; + int res = 0; + String txnOrAccntNo = null; + + DepositMiscellaneousBean oDepositMiscellaneousBean = new DepositMiscellaneousBean(); + + if (action.equalsIgnoreCase("Search")) { + + // depositAccSearch = request.getParameter("depositAccSearch"); + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(AccountModeOfOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + // resultset = statement.executeQuery("select t.key_1,t.avail_bal as Account_BAlance,t.customer_no,k.first_name||' '||k.middle_name||' '||k.last_name as customer1_name," + + " case when t.cif_no2 is null then 'NA' else t.cif_no2 end as cif_no2,(select kh.first_name||' '||kh.middle_name||' '||kh.last_name as customer2_name from kyc_hdr kh where kh.cif_no=t.cif_no2) as cif2_name," + + " decode(t.CURR_STATUS,'C','Closed','D','Dormant','S','Stopped','M','Matured','Open/Active') as curr_status ,nvl(NOMINEE_CIF,'NA') as NOMINEE_CIF, " + + " nvl((select k.mop_name from acc_mop_map k where k.mop_code = t.mop), 'NA') MOP " + + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no = t.customer_no and t.dep_prod_id = p.id and t.key_1 ='" + depositAccSearch + "' and t.PACS_ID = '" + pacsId + "'"); + + + + while (resultset.next()) { + oDepositMiscellaneousBean.setDepositAccountNumber(resultset.getString("key_1")); + oDepositMiscellaneousBean.setCifNo(resultset.getString("customer_no")); + oDepositMiscellaneousBean.setAccBalance(resultset.getString("Account_BAlance")); + oDepositMiscellaneousBean.setAccStat(resultset.getString("curr_status")); + oDepositMiscellaneousBean.setNomCif(resultset.getString("NOMINEE_CIF")); + + oDepositMiscellaneousBean.setCustomer1Name(resultset.getString("customer1_name")); + oDepositMiscellaneousBean.setCif2No(resultset.getString("cif_no2")); + oDepositMiscellaneousBean.setMode(resultset.getString("mop")); + if (resultset.getString("cif2_name") == null) { + oDepositMiscellaneousBean.setCustomer2Name("NA"); + } else { + oDepositMiscellaneousBean.setCustomer2Name(resultset.getString("cif2_name")); + } + + SeachFound = 1; + + request.setAttribute("displayFlag", "Y"); + + } + + // statement.close(); + // resultset.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(AccountModeOfOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if(resultset !=null) + resultset.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + if (SeachFound == 0) { + message = "Deposit Account not exists in the system"; + request.setAttribute("message", message); + } + + request.setAttribute("oDepositMiscellaneousBeanObj", oDepositMiscellaneousBean); + request.getRequestDispatcher("/Deposit/AccountModeOfOperation.jsp").forward(request, response); + + } else if (action.equalsIgnoreCase("SubmitOperation")) { + + Connection con = null; + CallableStatement proc = null; + + try { + con = DbHandler.getDBConnection(); + // String acc = request.getParameter("depositAccountNumber"); + //String opMode = request.getParameter("operation_type"); + + proc = con.prepareCall("{ call operations2.account_mod_operation(?,?,?,?,?) }"); + + proc.setString(1, acc); + proc.setString(2, pacsId); + proc.setString(3, user); + proc.setString(4, opMode); + proc.registerOutParameter(5, java.sql.Types.VARCHAR); + + proc.execute(); + + //message = proc.getString(5); + + request.setAttribute("message", message); + + request.setAttribute("oDepositMiscellaneousBeanObj", oDepositMiscellaneousBean); + request.getRequestDispatcher("/Deposit/AccountModeOfOperation.jsp").forward(request, response); + } + + catch (SQLException ex) { + // ex.printStackTrace(); + // System.out.println("Exception occured in AccountModeOfOperationServlet for user Id :" + user); + // message= "Error occured. Please try again"; + // Logger.getLogger(AccountModeOfOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + if(proc !=null) + proc.close(); + if (con != null) + con.close(); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error Occurred during connection close."); + } + + } + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/AccountRenewalServlet.java b/IPKS_Updated/src/src/java/Controller/AccountRenewalServlet.java new file mode 100644 index 0000000..bfeb2b8 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/AccountRenewalServlet.java @@ -0,0 +1,223 @@ +package Controller; + +import DataEntryBean.AccountRenewalBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import oracle.jdbc.OracleTypes; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author Tcs Helpdesk10 + */ +public class AccountRenewalServlet extends HttpServlet { + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + ResultSet rs = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + + //String handle_id = request.getParameter("handle_id"); + + AccountRenewalBean oAccountRenewalBean = new AccountRenewalBean(); + + if (handle_id.equalsIgnoreCase("search")) { + + try { + //BeanUtils.populate(oAccountRenewalBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AccountRenewalServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AccountRenewalServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call operations.account_renewal(?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(AccountRenewalServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + proc.setString(1, pacsId); + proc.setString(2, oAccountRenewalBean.getCifNumber()); + proc.setString(3, oAccountRenewalBean.getCcAccount()); + proc.setString(4, handle_id); + + proc.registerOutParameter(5, OracleTypes.CURSOR); + proc.registerOutParameter(6, java.sql.Types.VARCHAR); + + proc.execute(); + + //rs = (ResultSet) proc.getObject(5); + + while (rs.next()) { + oAccountRenewalBean = new AccountRenewalBean(); + oAccountRenewalBean.setDep_product_id(rs.getString("id")); + oAccountRenewalBean.setProductName(rs.getString("product")); + oAccountRenewalBean.setInttDescription(rs.getString("interest_desc")); + oAccountRenewalBean.setSegmentCode(rs.getString("segment_code")); + oAccountRenewalBean.setCifNumber(rs.getString("customer_no")); + oAccountRenewalBean.setAccNumber(rs.getString("key_1")); + oAccountRenewalBean.setCbsSavingsAccount(rs.getString("link_accno")); + oAccountRenewalBean.setActivityCode(rs.getString("activity_code")); + oAccountRenewalBean.setCustomerType(rs.getString("cust_type")); + oAccountRenewalBean.setProductCode(rs.getString("prod_code")); + oAccountRenewalBean.setInttCategory(rs.getString("int_cat")); + request.setAttribute("displayFlag", "Y"); + + } + + } catch (SQLException ex) { + // Logger.getLogger(AccountRenewalServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + //System.out.println(e.toString()); + System.out.println("Error Occurred during processing."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(AccountRenewalServlet.class.getName()).log(Level.SEVERE, null, ex); + //System.out.println(ex.toString()); + System.out.println("Error Occurred during connection close."); + } + + request.setAttribute("message", message); + request.setAttribute("oAccountRenewalBeanObj", oAccountRenewalBean); + request.getRequestDispatcher("/accountRenewal.jsp").forward(request, response); + + } + } else if (handle_id.equalsIgnoreCase("update")) { + + try { + // BeanUtils.populate(oAccountRenewalBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AccountRenewalServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AccountRenewalServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call operations.renewal_dep_account(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + proc.setString(1, pacsId); + proc.setString(2, oAccountRenewalBean.getProductCode()); + proc.setString(3, oAccountRenewalBean.getInttCategory()); + proc.setString(4, oAccountRenewalBean.getCifNumber()); + proc.setString(5, oAccountRenewalBean.getCustomerType()); + proc.setString(6, oAccountRenewalBean.getLimit()); + proc.setString(7, oAccountRenewalBean.getLimitExpiryDate()); + proc.setString(8, oAccountRenewalBean.getCollateralType()); + proc.setString(9, oAccountRenewalBean.getLandinAcres()); + proc.setString(10, oAccountRenewalBean.getDescription()); + proc.setString(11, oAccountRenewalBean.getCurrentValuation()); + proc.setString(12, oAccountRenewalBean.getSafeLendingMargin()); + proc.setString(13, user); + proc.setString(14, oAccountRenewalBean.getSegmentCode()); + proc.setString(15, oAccountRenewalBean.getCbsSavingsAccount()); + proc.setString(15, oAccountRenewalBean.getCbsSavingsAccount()); + proc.setString(16, oAccountRenewalBean.getActivityCode()); + proc.setString(17, oAccountRenewalBean.getAccNumber()); + proc.registerOutParameter(18, java.sql.Types.VARCHAR); + + proc.execute(); + + //message = proc.getString(18); + + } catch (SQLException ex) { + // Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/accountRenewal.jsp").forward(request, response); + + } + } + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/AccountRewnewBulkSTBServlet.java b/IPKS_Updated/src/src/java/Controller/AccountRewnewBulkSTBServlet.java new file mode 100644 index 0000000..5e64377 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/AccountRewnewBulkSTBServlet.java @@ -0,0 +1,115 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import DataEntryBean.MicroFileAccountDetBean; +import ServiceLayer.MicrofileProcessingService; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.PrintWriter; +import java.io.Reader; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import javax.servlet.http.HttpServlet; +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.fileupload.servlet.ServletFileUpload; +import org.apache.commons.io.FilenameUtils; + +/** + * + * @author 1004242 + */ + +public class AccountRewnewBulkSTBServlet extends HttpServlet{ + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + MicrofileProcessingService service = new MicrofileProcessingService(); + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = (String)session.getAttribute("user"); + StringBuilder csvDownloadableBuilder = null; + String filePath = null; + + if (request.getSession().getAttribute("errorMessage") != null) { + request.getSession().removeAttribute("errorMessage"); + } + + try { + if (ServletFileUpload.isMultipartContent(request)) { + filePath = service.uploadCSVToServer(request,pacsId); + if (filePath != null) { + String result = service.readAndInsertFromCSVForBankKCC(pacsId, filePath,tellerId); + if(result !=null) + { + request.getSession().setAttribute("errorMessageAccBulk", result); + }else + { + request.getSession().setAttribute("errorMessageAccBulk", "Error occured during process. Please try again."); + } + // response.sendRedirect(request.getHeader("Referer")); + } else { + System.out.println("Bulk file could not be read for :"+ pacsId); + request.getSession().setAttribute("errorMessage", "Request can not be processed this time"); + // response.sendRedirect(request.getHeader("Referer")); + + } + + } + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + request.getSession().setAttribute("errorMessageAccBulk", "Request can not be processed."); + // response.sendRedirect(request.getHeader("Referer")); + + } finally { + System.out.println("Processing done."); + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/AccountRewnewBulkServlet.java b/IPKS_Updated/src/src/java/Controller/AccountRewnewBulkServlet.java new file mode 100644 index 0000000..5882b74 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/AccountRewnewBulkServlet.java @@ -0,0 +1,147 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import DataEntryBean.MicroFileAccountDetBean; +import ServiceLayer.MicrofileProcessingService; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.PrintWriter; +import java.io.Reader; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import javax.servlet.http.HttpServlet; +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.fileupload.servlet.ServletFileUpload; +import org.apache.commons.io.FilenameUtils; + +/** + * + * @author 1004242 + */ + +public class AccountRewnewBulkServlet extends HttpServlet{ + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + MicrofileProcessingService service = new MicrofileProcessingService(); + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = (String)session.getAttribute("user"); + StringBuilder csvDownloadableBuilder = null; + String action = request.getParameter("actionTag"); + String filePath = null; + + if (request.getSession().getAttribute("errorMessage") != null) { + request.getSession().removeAttribute("errorMessage"); + } + + try { + if (ServletFileUpload.isMultipartContent(request)) { + filePath = service.uploadCSVToServer(request,pacsId); + if (filePath != null) { + String result = service.readAndInsertFromCSVForAccountRenewBulk(pacsId, filePath,tellerId); + if(result !=null) + { + request.getSession().setAttribute("errorMessageAccBulk", result); + }else + { + request.getSession().setAttribute("errorMessageAccBulk", "Error occured during process. Please try again."); + } + System.out.println(request.getHeaderNames()); + // response.sendRedirect(request.getHeader("Referer")); + } else { + System.out.println("Bulk file could not be read for :"+ pacsId); + request.getSession().setAttribute("errorMessage", "Request can not be processed this time"); + //response.sendRedirect(request.getHeader("Referer")); + //error case handling + } + + } else if (action != null && action.equalsIgnoreCase("Download")) { + + String filePathSample =this.getServletContext().getRealPath("/WEB-INF/KCC_ACCT_RENEWAL.xlsx"); + File downloadFile = new File(filePathSample); + FileInputStream inStream = new FileInputStream(downloadFile); + // obtains ServletContext + ServletContext context = getServletContext(); + // gets MIME type of the file + String mimeType = context.getMimeType(filePathSample); + if (mimeType == null) { + // set to binary type if MIME mapping not found + mimeType = "application/octet-stream"; + } + // modifies response + response.setContentType(mimeType); + response.setContentLength((int) downloadFile.length()); + + String headerKey = "Content-Disposition"; + String headerValue = String.format("attachment; filename=\"%s\"", downloadFile.getName()); + response.setHeader(headerKey, headerValue); + // obtains response's output stream + OutputStream outStream = response.getOutputStream(); + byte[] buffer = new byte[4096]; + int bytesRead = -1; + while ((bytesRead = inStream.read(buffer)) != -1) { + outStream.write(buffer, 0, bytesRead); + } + inStream.close(); + outStream.close(); + System.out.println("Accnt renew Bulk format file downloaded for pacs id :" + pacsId); + } + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + request.getSession().setAttribute("errorMessageAccBulk", "Request can not be processed."); + // response.sendRedirect(request.getHeader("Referer")); + + } finally { + System.out.println("Processing done."); + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/AccountServlet.java b/IPKS_Updated/src/src/java/Controller/AccountServlet.java new file mode 100644 index 0000000..32ad0fb --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/AccountServlet.java @@ -0,0 +1,151 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.BatchUpdateException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import java.sql.Statement; +import java.util.Arrays; +import java.util.StringTokenizer; +import javax.servlet.ServletContext; +import DataEntryBean.AccountAmendBean; + +/** + * + * @author 981898 + */ +public class AccountServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement stmt = null; + ResultSet rs = null; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + AccountAmendBean oAccountAmendBean = new AccountAmendBean(); + String message = ""; + + try { + // BeanUtils.populate(oAccountAmendBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + stmt = con.prepareCall("{ call Operations1.ACCT_LIMIT_SET(?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + stmt.setString(1, pacsId); + stmt.setString(2, oAccountAmendBean.getAccNo()); + stmt.setString(3, user); + stmt.setString(4, oAccountAmendBean.getNewLimit()); + stmt.setString(5, oAccountAmendBean.getNewExpDate()); + stmt.registerOutParameter(6, java.sql.Types.VARCHAR); + + stmt.execute(); + + // message = stmt.getString(6); + + } catch (SQLException ex) { + try { + // con.rollback(); + if(message.isEmpty()) + message="Error in account amendment"; + } catch (Exception ex1) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + stmt.close(); + } catch (SQLException e) { + System.out.println("Error occurred during statement close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + } + request.setAttribute("message", message); + request.getRequestDispatcher("/accountAmend.jsp").forward(request, response); + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/AccountServletSTB.java b/IPKS_Updated/src/src/java/Controller/AccountServletSTB.java new file mode 100644 index 0000000..4a8246e --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/AccountServletSTB.java @@ -0,0 +1,154 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.BatchUpdateException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import java.sql.Statement; +import java.util.Arrays; +import java.util.StringTokenizer; +import javax.servlet.ServletContext; +import DataEntryBean.AccountAmendBean; + +/** + * + * @author 981898 + */ +public class AccountServletSTB extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement stmt = null; + ResultSet rs = null; + String bankId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + //String pacsID_PACS = request.getParameter("pacsId_PACS"); + //String accN = request.getParameter("accNo"); + //String newLimit = request.getParameter("newLimit"); + //String newExpDt = request.getParameter("newExpDate"); + // AccountAmendBean oAccountAmendBean = new AccountAmendBean(); + String message = ""; + +// try { +// BeanUtils.populate(oAccountAmendBean, request.getParameterMap()); +// } catch (IllegalAccessException ex) { +// Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); +// } catch (InvocationTargetException ex) { +// Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); +// } + + try { + con = DbHandler.getDBConnection(); + try { + stmt = con.prepareCall("{ call Operations1.BANK_ACCT_LIMIT_SET(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + stmt.setString(1, pacsID_PACS); + stmt.setString(2, accN); + stmt.setString(3, user); + stmt.setString(4, newLimit); + stmt.setString(5, newExpDt); + stmt.registerOutParameter(6, java.sql.Types.VARCHAR); + stmt.setString(7, bankId); + + stmt.execute(); + + // message = stmt.getString(6); + + } catch (SQLException ex) { + try { + // con.rollback(); + if(message.isEmpty()) + message="Error in account amendment"; + } catch (Exception ex1) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + stmt.close(); + } catch (SQLException e) { + System.out.println("Error occurred during statement close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + } + request.setAttribute("message", message); + request.getRequestDispatcher("/accountAmendSTB.jsp").forward(request, response); + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/AddressDetailsServlet.java b/IPKS_Updated/src/src/java/Controller/AddressDetailsServlet.java new file mode 100644 index 0000000..963cd40 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/AddressDetailsServlet.java @@ -0,0 +1,351 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import DataEntryBean.AddressDetailsBean; +import DataEntryBean.BasicInformationBean; + + +public class AddressDetailsServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + + + //String ServletName = request.getParameter("handle_id"); + + AddressDetailsBean AddressDetailsBeanObj = new AddressDetailsBean(); + + + if ("Create".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(AddressDetailsBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(BasicInformationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(BasicInformationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call SHG_OPERATIONS.Upsert_address_details(?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(AddressDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.setString(1, AddressDetailsBeanObj.getShgcode()); + proc.setString(2, AddressDetailsBeanObj.getDistrict()); + proc.setString(3, AddressDetailsBeanObj.getSubdivisions()); + proc.setString(4, AddressDetailsBeanObj.getMunicipality()); + proc.setString(5, AddressDetailsBeanObj.getPanchayat()); + proc.setString(6, AddressDetailsBeanObj.getVillage()); + proc.setString(7, AddressDetailsBeanObj.getPolicestation()); + proc.setString(8, AddressDetailsBeanObj.getPostoffice()); + proc.setString(9, AddressDetailsBeanObj.getPincode()); + proc.setString(10, ServletName); + + proc.registerOutParameter(11, java.sql.Types.VARCHAR); + proc.setString(12, pacsId); + + proc.execute(); + + + + } catch (SQLException ex) { + // Logger.getLogger(AddressDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(AddressDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Shg_JSP/AddressDetails.jsp").forward(request, response); + + } + + } else if ("Search".equalsIgnoreCase(ServletName)) { + + try { + //BeanUtils.populate(AddressDetailsBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AddressDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AddressDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(AddressDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + + // ResultSet rs = statement.executeQuery("SELECT DISTRICT, SUBDIVISIONS, MUNICIPALITY, PANCHAYAT , VILLAGE , POLICE_STATION ,POST_OFFICE,PINCODE, SHG_CODE from address_details ad where SHG_CODE= '" + AddressDetailsBeanObj.getShgSearch() + "' and ad.shg_id = (select to_number(shg_id) from basic_info bi where bi.shg_code = '" + AddressDetailsBeanObj.getShgSearch() + "' and bi.pacs_id = '" +pacsId+ "') "); + + while (rs.next()) { + AddressDetailsBeanObj = new AddressDetailsBean(); + AddressDetailsBeanObj.setDistrict(rs.getString("DISTRICT")); + AddressDetailsBeanObj.setSubdivisions(rs.getString("SUBDIVISIONS")); + AddressDetailsBeanObj.setMunicipality(rs.getString("MUNICIPALITY")); + AddressDetailsBeanObj.setPanchayat(rs.getString("PANCHAYAT")); + AddressDetailsBeanObj.setVillage(rs.getString("VILLAGE")); + AddressDetailsBeanObj.setPolicestation(rs.getString("POLICE_STATION")); + AddressDetailsBeanObj.setPostoffice(rs.getString("POST_OFFICE")); + AddressDetailsBeanObj.setPincode(rs.getString("PINCODE")); + AddressDetailsBeanObj.setShgcode(rs.getString("SHG_CODE")); + + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + } + + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(AddressDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + if (SeachFound == 0) { + message = "SHG Code does not exist in the system"; + request.setAttribute("message", message); + } + request.setAttribute("AddressDetailsBeanObj", AddressDetailsBeanObj); + + request.getRequestDispatcher("/Shg_JSP/AddressDetails.jsp").forward(request, response); + + }else if ("Search Code".equalsIgnoreCase(ServletName)) { + BasicInformationBean BasicInformationBeanObj = new BasicInformationBean(); + try { + // BeanUtils.populate(BasicInformationBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AddressDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AddressDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(AddressDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { +ResultSet rs = statement.executeQuery("select NAME_OF_SHG, GRP_CATEGORY, to_char(DATE_OF_FORMATION,'DD-MON-RRRR') as DATE_OF_FORMATION , DURATION, SHG_CODE from BASIC_INFO "); + + while (rs.next()) { + BasicInformationBeanObj.setNameOfShg(rs.getString("NAME_OF_SHG")); + BasicInformationBeanObj.setGroupCategory(rs.getString("GRP_CATEGORY")); + BasicInformationBeanObj.setDateOfFormation(rs.getString("DATE_OF_FORMATION")); + BasicInformationBeanObj.setDuration(rs.getString("DURATION")); + BasicInformationBeanObj.setShgcode(rs.getString("SHG_CODE")); + + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + } + + // statement.close(); + // connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(AddressDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + if (SeachFound == 0) { + message = "SHG Code does not exist in the system"; + request.setAttribute("message", message); + } + request.setAttribute("AddressDetailsBeanObj", AddressDetailsBeanObj); + + request.getRequestDispatcher("/Shg_JSP/AddressDetails.jsp").forward(request, response); + + } else if ("Update".equalsIgnoreCase(ServletName)) { + + try { + //BeanUtils.populate(AddressDetailsBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AddressDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AddressDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call SHG_OPERATIONS.Upsert_address_details(?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + //Logger.getLogger(AddressDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + } + + proc.setString(1, AddressDetailsBeanObj.getShgcodeAmend()); + proc.setString(2, AddressDetailsBeanObj.getDistrictAmend()); + proc.setString(3, AddressDetailsBeanObj.getSubdivisionsAmend()); + proc.setString(4, AddressDetailsBeanObj.getMunicipalityAmend()); + proc.setString(5, AddressDetailsBeanObj.getPanchayatAmend()); + proc.setString(6, AddressDetailsBeanObj.getVillageAmend()); + proc.setString(7, AddressDetailsBeanObj.getPolicestationAmend()); + proc.setString(8, AddressDetailsBeanObj.getPostofficeAmend()); + proc.setString(9, AddressDetailsBeanObj.getPincodeAmend()); + proc.setString(10, ServletName); + + proc.registerOutParameter(11, java.sql.Types.VARCHAR); + proc.setString(12, pacsId); + + proc.execute(); + + + + } catch (SQLException ex) { + // Logger.getLogger(AddressDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(AddressDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Shg_JSP/AddressDetails.jsp").forward(request, response); + + } + + } + + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} + diff --git a/IPKS_Updated/src/src/java/Controller/AgentMappingServlet.java b/IPKS_Updated/src/src/java/Controller/AgentMappingServlet.java new file mode 100644 index 0000000..8584925 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/AgentMappingServlet.java @@ -0,0 +1,85 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import Dao.AgentLimitDao; +import Dao.AgentMappingDao; +import Dao.ChequePostingDao; +import java.io.IOException; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +public class AgentMappingServlet extends HttpServlet { + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = (String) session.getAttribute("user"); + // String accNo = request.getParameter("accNoServer"); + //String agntId = request.getParameter("agntIdServer"); + //String agentId = request.getParameter("agntIdServer2"); + // String tranType = request.getParameter("tranType"); + // String limit = request.getParameter("limit"); + AgentMappingDao agDao = new AgentMappingDao(); + AgentLimitDao aglimObj = new AgentLimitDao(); + String AgentMappingresult = null; + String AgentLimitresult = null; + + try { + + if (limit == null || limit.isEmpty() ) { + AgentMappingresult = agDao.createOrUpdateAgentMapping(tellerId, pacsId, accNo, agntId, tranType); + request.setAttribute("message", AgentMappingresult); + } else { + AgentLimitresult = aglimObj.createUpdateAgentLimit(tellerId, pacsId, agentId, limit); + request.setAttribute("message2", AgentLimitresult); + } + + request.getRequestDispatcher("/Deposit/AgentMapping.jsp").forward(request, response); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + request.setAttribute("message", "Request can not be processed."); + request.getRequestDispatcher("/Deposit/AgentMapping.jsp").forward(request, response); + } finally { + System.out.println("Processing done."); + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/AmendInterestServlet.java b/IPKS_Updated/src/src/java/Controller/AmendInterestServlet.java new file mode 100644 index 0000000..f8f135f --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/AmendInterestServlet.java @@ -0,0 +1,77 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import Dao.AmendInterestDao; +import DataEntryBean.ChequeDetailsBean; +import java.io.IOException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +public class AmendInterestServlet extends HttpServlet{ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = (String)session.getAttribute("user"); + AmendInterestDao aiDao = new AmendInterestDao(); + String result = null; + + + try{ + + + result = aiDao.AmendInterestProc(pacsId, accNo, newCurrInt, newPenalInt, newNpaInt, tellerId); + + request.setAttribute("message1", result); + request.getRequestDispatcher("/Loan/amendInterest.jsp").forward(request, response); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + request.setAttribute("message1", "Error occured. Please try again"); + request.getRequestDispatcher("/Loan/amendInterest.jsp").forward(request, response); + } finally { + System.out.println("Processing done."); + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/AssetDisposalServlet.java b/IPKS_Updated/src/src/java/Controller/AssetDisposalServlet.java new file mode 100644 index 0000000..a098905 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/AssetDisposalServlet.java @@ -0,0 +1,129 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author Tcs Helpdesk10 + */ +public class AssetDisposalServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + Connection con = null; + CallableStatement proc = null; + String message = ""; + //String asset_id = request.getParameter("asset_id"); + //String disposeflag = request.getParameter("disposeflag"); + //String regid = request.getParameter("regid"); + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call ASSET_OPERATION.asset_disposal(?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(AssetDisposalServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.setString(1, asset_id); + proc.setString(2, disposeflag); + proc.setString(3, regid); + proc.setString(4,pacsId); + proc.registerOutParameter(5, java.sql.Types.VARCHAR); + proc.setString(6, user); + + proc.execute(); + + // message = proc.getString(5); + + } catch (SQLException ex) { + // Logger.getLogger(AssetDisposalServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(AssetDisposalServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Asset_JSP/assetDisposal.jsp").forward(request, response); + + } + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/AssetEntryServlet.java b/IPKS_Updated/src/src/java/Controller/AssetEntryServlet.java new file mode 100644 index 0000000..272c2d1 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/AssetEntryServlet.java @@ -0,0 +1,303 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.AssetEntryBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.sql.CallableStatement; +import java.sql.Statement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import java.lang.reflect.InvocationTargetException; + +/** + * + * @author Tcs Help desk122 + */ +public class AssetEntryServlet extends HttpServlet { + + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + //String Action = request.getParameter("handle_id"); + //String checkOpt = request.getParameter("checkOption"); + + AssetEntryBean oAssetEntryBean = new AssetEntryBean(); + ArrayList alAssetEntryBean = new ArrayList(); + + try { + // BeanUtils.populate(oAssetEntryBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + System.out.println("Error occurred during processing."); + } + + if ("Create".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + String asset_type = request.getParameter("asset_type" + i); + + if (asset_type != null) { + oAssetEntryBean = new AssetEntryBean(); + oAssetEntryBean.setAsset_type(asset_type); + oAssetEntryBean.setAsset_subtype(request.getParameter("asset_subtype" + i)); + + oAssetEntryBean.setGlcode(request.getParameter("glcode" + i)); + oAssetEntryBean.setDepRate(request.getParameter("depRate" + i)); + oAssetEntryBean.setGlcode(request.getParameter("glcode" + i)); + oAssetEntryBean.setGlid(request.getParameter("glid" + i)); + oAssetEntryBean.setStatus(request.getParameter("status" + i)); + oAssetEntryBean.setId(request.getParameter("id" + i)); + //alAssetEntryBean.add(oAssetEntryBean); + } + // } catch (Exception e) { + // System.out.println("Error occurred during processing."); + } + } + if ((alAssetEntryBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call ASSET_OPERATION.asset_entry(?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alAssetEntryBean.size(); j++) { + + oAssetEntryBean = alAssetEntryBean.get(j); + proc.setString(1, oAssetEntryBean.getAsset_id()); + proc.setString(2, oAssetEntryBean.getAsset_mst_id()); + proc.setString(3, oAssetEntryBean.getDescription()); + proc.setString(4, oAssetEntryBean.getCurr_val()); + proc.setString(5, oAssetEntryBean.getMode_of_aqr()); + proc.setString(6, pacsId); + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + proc.setString(8, oAssetEntryBean.getPurchaseDate()); + proc.setString(9, oAssetEntryBean.getGlid()); + proc.setString(10, oAssetEntryBean.getDepRate()); + proc.setString(11, Action); + proc.setString(12, oAssetEntryBean.getStatus()); + proc.setString(13, user); + + proc.execute(); + + //message = proc.getString(7); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Asset_JSP/assetEntry.jsp").forward(request, response); + + } else if ("Amend".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter2")); + + for (int i = 2; i <= counter; i++) { + try { + + String asset_type = request.getParameter("asset_type" + i); + + if (asset_type != null) { + oAssetEntryBean = new AssetEntryBean(); + oAssetEntryBean.setAsset_type(asset_type); + oAssetEntryBean.setAsset_subtype(request.getParameter("asset_subtype" + i)); + // oAssetEntryBean.setAsset_id(request.getParameter("asset_id" + i)); + // oAssetEntryBean.setDescription(request.getParameter("description" + i)); + // oAssetEntryBean.setCurr_val(request.getParameter("curr_val" + i)); + // oAssetEntryBean.setMode_of_aqr(request.getParameter("mode_of_aqr" + i)); + // oAssetEntryBean.setAsset_mst_id(request.getParameter("asset_mst_id" + i)); + // oAssetEntryBean.setPurchaseDate(request.getParameter("purchaseDate" + i)); + oAssetEntryBean.setGlcode(request.getParameter("glcode" + i)); + //oAssetEntryBean.setDepRate(request.getParameter("depRate" + i)); + oAssetEntryBean.setGlcode(request.getParameter("glcode" + i)); + //oAssetEntryBean.setGlid(request.getParameter("glid" + i)); + //oAssetEntryBean.setStatus(request.getParameter("status" + i)); + oAssetEntryBean.setId(request.getParameter("id" + i)); + alAssetEntryBean.add(oAssetEntryBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alAssetEntryBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call ASSET_OPERATION.asset_entry(?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alAssetEntryBean.size(); j++) { + + oAssetEntryBean = alAssetEntryBean.get(j); + proc.setString(1, oAssetEntryBean.getAsset_id()); + proc.setString(2, oAssetEntryBean.getAsset_mst_id()); + proc.setString(3, oAssetEntryBean.getDescription()); + proc.setString(4, oAssetEntryBean.getCurr_val()); + proc.setString(5, oAssetEntryBean.getMode_of_aqr()); + proc.setString(6, pacsId); + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + proc.setString(8, oAssetEntryBean.getPurchaseDate()); + proc.setString(9, oAssetEntryBean.getGlid()); + proc.setString(10, oAssetEntryBean.getDepRate()); + proc.setString(11, Action); + proc.setString(12, oAssetEntryBean.getStatus()); + proc.setString(13, user); + + proc.execute(); + // message = proc.getString(7); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Asset_JSP/assetEntry.jsp").forward(request, response); + + } else if ("getDetails".equalsIgnoreCase(Action)) { + + ResultSet resultset = null; + Statement statement = null; + + Connection connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + try { + //resultset = statement.executeQuery("select id, asset_mst_id, asset_id, (select asset_type || ':' || TYPE_DESC from asset_master li where li.id = reg.asset_mst_id) asset_type, (select asset_subtype || ':' || SUBTYPE_DESC from asset_master li where li.id = reg.asset_mst_id) asset_subtype, description, initial_value purchase_value, decode(reg.acquirement, 'p', 'Purchase', 'o', 'Others', 'Donation') as acquirement, to_char(reg.entry_date, 'DD/MM/YYYY') as purchase_dt, to_char(reg.last_eval_date, 'DD/MM/YYYY') as entry_date, asset_gl_class gl_code, (select max(gp.gl_name) from gl_product gp where gp.comp1 || gp.comp2 = reg.asset_gl_class) gl_name, depre_rate, active_flag from asset_register reg where pacs_id = '" +pacsId+ "' order by 2, last_eval_date "); + + while (resultset.next()) { + + oAssetEntryBean = new AssetEntryBean(); + oAssetEntryBean.setId(resultset.getString("id")); + oAssetEntryBean.setAsset_type(resultset.getString("asset_type")); + oAssetEntryBean.setAsset_subtype(resultset.getString("asset_subtype")); + oAssetEntryBean.setAsset_mst_id(resultset.getString("asset_mst_id")); + oAssetEntryBean.setAsset_id(resultset.getString("asset_id")); + oAssetEntryBean.setDescription(resultset.getString("description")); + oAssetEntryBean.setCurr_val(resultset.getString("purchase_value")); + oAssetEntryBean.setMode_of_aqr(resultset.getString("acquirement")); + oAssetEntryBean.setPurchaseDate(resultset.getString("purchase_dt")); + oAssetEntryBean.setGlid(resultset.getString("gl_code")); + oAssetEntryBean.setGlcode(resultset.getString("gl_name")); + oAssetEntryBean.setDepRate(resultset.getString("depre_rate")); + oAssetEntryBean.setStatus(resultset.getString("active_flag")); + + alAssetEntryBean.add(oAssetEntryBean); + request.setAttribute("displayFlag", "Y"); + } + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + statement.close(); + resultset.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + } + request.setAttribute("checkOption", checkOpt); + request.setAttribute("oAssetEntryBean", oAssetEntryBean); + request.setAttribute("arrAssetEntryBean", alAssetEntryBean); + request.getRequestDispatcher("/Asset_JSP/assetEntry.jsp").forward(request, response); + } + } + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + } +} diff --git a/IPKS_Updated/src/src/java/Controller/AssetMasterServlet.java b/IPKS_Updated/src/src/java/Controller/AssetMasterServlet.java new file mode 100644 index 0000000..57cde6a --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/AssetMasterServlet.java @@ -0,0 +1,294 @@ +package Controller; + +import DataEntryBean.AssetMasterBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author Tcs Helpdesk10 + */ +public class AssetMasterServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + /*response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + + out.println(""); + out.println(""); + out.println(""); + out.println("Servlet GlProductOperationServlet"); + out.println(""); + out.println(""); + out.println("

Servlet GlProductOperationServlet at " + request.getContextPath() + "

"); + out.println(""); + out.println(""); + } finally { + out.close(); + }*/ + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + + Connection con = null; + CallableStatement proc = null; + String message = ""; + + // String ServletName = request.getParameter("handle_id"); + + AssetMasterBean oAssetMasterBean = new AssetMasterBean(); + + if ("Create".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oAssetMasterBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AssetMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AssetMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call assetMaster.upsert_assetMaster(?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(AssetMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oAssetMasterBean.getAsset_type()); + proc.setString(2, oAssetMasterBean.getAsset_type_desc()); + proc.setString(3, oAssetMasterBean.getAsset_sub_type()); + proc.setString(4, oAssetMasterBean.getAsset_subtype_desc()); + proc.setString(5, oAssetMasterBean.getLong_desc()); + proc.setString(6, oAssetMasterBean.getDepr_rate()); + + proc.setString(7, ServletName); + proc.registerOutParameter(8, java.sql.Types.VARCHAR); + + proc.execute(); + + + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Asset_JSP/assetMaster.jsp").forward(request, response); + + } + + } else if ("Search".equalsIgnoreCase(ServletName)) { + + try { + //BeanUtils.populate(oAssetMasterBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AssetMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AssetMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(AssetMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + + // ResultSet rs = statement.executeQuery("select am.id,am.ASSET_TYPE," + +"type_desc," + +"asset_subtype," + +"subtype_desc," + +"description," + +"depr_rate" + +" from asset_master am" + + " where am.id= '" + oAssetMasterBean.getAsset_id() +"'"); + + while (rs.next()) { + + oAssetMasterBean.setAsset_id(rs.getString("id")); + oAssetMasterBean.setAsset_type(rs.getString("asset_type")); + oAssetMasterBean.setAsset_type_desc(rs.getString("type_desc")); + oAssetMasterBean.setAsset_sub_type(rs.getString("asset_subtype")); + oAssetMasterBean.setAsset_subtype_desc(rs.getString("subtype_desc")); + oAssetMasterBean.setLong_desc(rs.getString("description")); + oAssetMasterBean.setDepr_rate(rs.getString("depr_rate")); + + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + } + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + if (SeachFound == 0) { + message = "Asset Type or Asset SubType not exists in the system"; + request.setAttribute("message", message); + } + + request.setAttribute("oAssetMasterBeanObj", oAssetMasterBean); + request.getRequestDispatcher("/Asset_JSP/assetMaster.jsp").forward(request, response); + + } else if ("Update".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oAssetMasterBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call assetMaster.upsert_assetMaster(?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.setString(1, oAssetMasterBean.getAsset_typeAmend()); + proc.setString(2, oAssetMasterBean.getAsset_type_descAmend()); + proc.setString(3, oAssetMasterBean.getAsset_subtypeAmend()); + proc.setString(4, oAssetMasterBean.getAsset_subtype_descAmend()); + proc.setString(5, oAssetMasterBean.getLong_descAmend()); + proc.setString(6, oAssetMasterBean.getDepr_rateAmend()); + + proc.setString(7, ServletName); + + proc.registerOutParameter(8, java.sql.Types.VARCHAR); + + proc.execute(); + + + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Asset_JSP/assetMaster.jsp").forward(request, response); + + } + + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/AssetRegisterServlet.java b/IPKS_Updated/src/src/java/Controller/AssetRegisterServlet.java new file mode 100644 index 0000000..b4953ad --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/AssetRegisterServlet.java @@ -0,0 +1,181 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import Controller.UploadServlet; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import DataEntryBean.AssetRegisterBean; +import LoginDb.DbHandler; +import java.sql.SQLException; +import oracle.jdbc.OracleTypes; + +/** + * + * @author Tcs Helpdesk10 + */ +public class AssetRegisterServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + CallableStatement proc = null; + int searchFound = 0; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + + AssetRegisterBean oAssetRegisterBean = new AssetRegisterBean(); + + ArrayList alAssetRegisterBean = new ArrayList(); + try { + // BeanUtils.populate(oAssetRegisterBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AssetRegisterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AssetRegisterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call ASSET_OPERATION.asset_Register(?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(AssetRegisterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oAssetRegisterBean.getAsset_mst_id()); + proc.setString(2, pacsId); + + proc.registerOutParameter(3, OracleTypes.CURSOR); + proc.registerOutParameter(4, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + + + + while (rs.next()) { + searchFound = 1; + oAssetRegisterBean = new AssetRegisterBean(); + oAssetRegisterBean.setDetail_id(rs.getString("ID")); + oAssetRegisterBean.setAsset_id(rs.getString("ASSET_ID")); + oAssetRegisterBean.setDescription(rs.getString("DESCRIPTION")); + oAssetRegisterBean.setInt_value(rs.getString("INITIAL_VALUE")); + oAssetRegisterBean.setPres_val(rs.getString("PRESENT_VALUE")); + oAssetRegisterBean.setMode_of_aqr(rs.getString("ACQUIREMENT")); + oAssetRegisterBean.setEntry_date(rs.getString("last_eval_date")); + oAssetRegisterBean.setStatus(rs.getString("ACTIVE_FLAG")); + oAssetRegisterBean.setPurchase_date(rs.getString("entry_date")); + oAssetRegisterBean.setGlcode(rs.getString("asset_gl_class")); + oAssetRegisterBean.setDepRate(rs.getString("depre_rate")); + + + alAssetRegisterBean.add(oAssetRegisterBean); + + request.setAttribute("displayFlag", "Y"); + + } + + // oAssetRegisterBean.setAsset_type(request.getParameter("asset_type")); + // oAssetRegisterBean.setAsset_subtypoe(request.getParameter("asset_subtype")); + // oAssetRegisterBean.setAsset_mst_id(request.getParameter("asset_mst_id")); + + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during procedure close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + if (searchFound == 0) { + message = "No data exists for selected item"; + request.setAttribute("message", message); + } + + request.setAttribute("oAssetRegisterBean", oAssetRegisterBean); + request.setAttribute("alAssetRegisterBean", alAssetRegisterBean); + request.setAttribute("message", message); + + request.getRequestDispatcher("/Asset_JSP/assetRegister.jsp").forward(request, response); + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/AssetRelocationServlet.java b/IPKS_Updated/src/src/java/Controller/AssetRelocationServlet.java new file mode 100644 index 0000000..6f487b3 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/AssetRelocationServlet.java @@ -0,0 +1,129 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author Tcs Helpdesk10 + */ +public class AssetRelocationServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + Connection con = null; + CallableStatement proc = null; + String message = ""; + //String asset_id = request.getParameter("asset_id"); + //String regid = request.getParameter("regid"); + //String pacs_mst_id = request.getParameter("pacs_mst_id"); + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call ASSET_OPERATION.asset_relocation(?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(AssetRelocationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.setString(1, asset_id); + proc.setString(2, pacs_mst_id); + proc.setString(3, regid); + proc.setString(4,pacsId); + proc.registerOutParameter(5, java.sql.Types.VARCHAR); + proc.setString(6, user); + + proc.execute(); + + + + } catch (SQLException ex) { + // Logger.getLogger(AssetRelocationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(AssetRelocationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Asset_JSP/assetRelocation.jsp").forward(request, response); + + } + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/AssetServlet.java b/IPKS_Updated/src/src/java/Controller/AssetServlet.java new file mode 100644 index 0000000..fbbee26 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/AssetServlet.java @@ -0,0 +1,72 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 986137 + */ +public class AssetServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + session.setAttribute("moduleName", "asset"); + request.getRequestDispatcher("/welcome.jsp").forward(request, response); + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/Asset_EnquiryServlet.java b/IPKS_Updated/src/src/java/Controller/Asset_EnquiryServlet.java new file mode 100644 index 0000000..0d78266 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/Asset_EnquiryServlet.java @@ -0,0 +1,175 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import Controller.UploadServlet; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import DataEntryBean.Asset_EnquiryBean; +import LoginDb.DbHandler; +import java.sql.SQLException; +import oracle.jdbc.OracleTypes; + + +/** + * + * @author 1319104 + */ +public class Asset_EnquiryServlet extends HttpServlet { + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + CallableStatement proc = null; + int searchFound = 0; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + + Asset_EnquiryBean oAsset_EnquiryBean = new Asset_EnquiryBean(); + + ArrayList alAsset_EnquiryBean = new ArrayList(); + try { + //BeanUtils.populate(oAsset_EnquiryBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(Asset_EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(Asset_EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call ASSET_OPERATION.asset_Enquiry(?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(Asset_EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oAsset_EnquiryBean.getAsset_mst_id()); + proc.setString(2, pacsId); + + proc.registerOutParameter(3, OracleTypes.CURSOR); + proc.registerOutParameter(4, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + + + + while (rs.next()) { + searchFound = 1; + oAsset_EnquiryBean = new Asset_EnquiryBean(); + oAsset_EnquiryBean.setDetail_id(rs.getString("ID")); + oAsset_EnquiryBean.setAsset_id(rs.getString("ASSET_ID")); + oAsset_EnquiryBean.setDescription(rs.getString("DESCRIPTION")); + oAsset_EnquiryBean.setInt_value(rs.getString("INITIAL_VALUE")); + oAsset_EnquiryBean.setPres_val(rs.getString("PRESENT_VALUE")); + oAsset_EnquiryBean.setMode_of_aqr(rs.getString("ACQUIREMENT")); + oAsset_EnquiryBean.setEntry_date(rs.getString("last_eval_date")); + oAsset_EnquiryBean.setStatus(rs.getString("ACTIVE_FLAG")); + oAsset_EnquiryBean.setPurchase_date(rs.getString("entry_date")); + oAsset_EnquiryBean.setGlcode(rs.getString("asset_gl_class")); + oAsset_EnquiryBean.setDepRate(rs.getString("depre_rate")); + + alAsset_EnquiryBean.add(oAsset_EnquiryBean); + + request.setAttribute("displayFlag", "Y"); + + } + + + + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during procedure close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + if (searchFound == 0) { + message = "Asset ID does not exist. Please enter correct Asset ID."; + request.setAttribute("message", message); + } + + request.setAttribute("oAsset_EnquiryBean", oAsset_EnquiryBean); + request.setAttribute("alAsset_EnquiryBean", alAsset_EnquiryBean); + request.setAttribute("message", message); + + request.getRequestDispatcher("/Asset_JSP/Asset_Enquiry.jsp").forward(request, response); + } + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/AssignToCashDrawerServlet.java b/IPKS_Updated/src/src/java/Controller/AssignToCashDrawerServlet.java new file mode 100644 index 0000000..6adc7ec --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/AssignToCashDrawerServlet.java @@ -0,0 +1,139 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author Tcs Helpdesk10 + */ +public class AssignToCashDrawerServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + + String twohundredIN = request.getParameter("twohundredIN") == "" ? "0" : (request.getParameter("twohundredIN")); + + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call cash_denominations.assign_cash_to_tellers(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(AssignToCashDrawerServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.setString(1, teller_id); + proc.setString(2, user); + proc.setString(3, twothouIN); + proc.setString(4, fivehundredIN); + proc.setString(5, hundredIN); + proc.setString(6, ponchasIN); + proc.setString(7, twentyIN); + proc.setString(8, tenIN); + proc.setString(9, fiveIN); + proc.setString(10, twoIN); + proc.setString(11, oneIN); + proc.setString(12, fiftyPaisaIN); + proc.setString(13, onePaisaIN); + proc.setString(14, pacsId); + + proc.registerOutParameter(15, java.sql.Types.VARCHAR); + proc.setString(16, twohundredIN); + + proc.execute(); + + message = proc.getString(15); + + } catch (SQLException ex) { + // Logger.getLogger(AssignToCashDrawerServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(AssignToCashDrawerServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/AssignToCashDrawer.jsp").forward(request, response); + + } + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/BGLAccountCreationServlet.java b/IPKS_Updated/src/src/java/Controller/BGLAccountCreationServlet.java new file mode 100644 index 0000000..2173f43 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/BGLAccountCreationServlet.java @@ -0,0 +1,79 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import Dao.BGLAccountCreationDao; +import DataEntryBean.ChequeDetailsBean; +import java.io.IOException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +public class BGLAccountCreationServlet extends HttpServlet{ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = (String)session.getAttribute("user"); + BGLAccountCreationDao aiDao = new BGLAccountCreationDao(); + String result = null; + + + try{ + + // String glProductId = request.getParameter("bglProdId"); + // String glName = request.getParameter("subGlName"); + result = aiDao.BGLAccountCreationServletProc(glProductId, pacsId, glName); + + request.setAttribute("message1", result); + request.getRequestDispatcher("/Deposit/BGLAccountCreation.jsp").forward(request, response); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + request.setAttribute("message1", "Error occured. Please try again"); + request.getRequestDispatcher("/Deposit/BGLAccountCreation.jsp").forward(request, response); + + } finally { + System.out.println("Processing done."); + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/BasicInformationServlet.java b/IPKS_Updated/src/src/java/Controller/BasicInformationServlet.java new file mode 100644 index 0000000..f2473fd --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/BasicInformationServlet.java @@ -0,0 +1,276 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import DataEntryBean.BasicInformationBean; + +public class BasicInformationServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + + + // String ServletName = request.getParameter("handle_id"); + + BasicInformationBean BasicInformationBeanObj = new BasicInformationBean(); + + + if ("Create".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(BasicInformationBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(BasicInformationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(BasicInformationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call SHG_OPERATIONS.Upsert_basic_info(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(BasicInformationServlet.class.getName()).log(Level.SEVERE, null, ex); + } + proc.setString(1, BasicInformationBeanObj.getShgcode()); + proc.setString(2, BasicInformationBeanObj.getNameOfShg()); + proc.setString(3, BasicInformationBeanObj.getGroupCategory()); + proc.setString(4, BasicInformationBeanObj.getDateOfFormation()); + proc.setString(5, BasicInformationBeanObj.getDuration()); + proc.setString(7, BasicInformationBeanObj.getCif()); + proc.setString(8,pacsId ); + + proc.setString(6, ServletName); + + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + + proc.execute(); + + //message = proc.getString(9); + + } catch (SQLException ex) { + // Logger.getLogger(BasicInformationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(BasicInformationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Shg_JSP/BasicInformation.jsp").forward(request, response); + + } + + } else if ("Search".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(BasicInformationBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(BasicInformationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(BasicInformationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(BasicInformationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + + //ResultSet rs = statement.executeQuery("select NAME_OF_SHG, GRP_CATEGORY, to_char(DATE_OF_FORMATION,'DD/MM/RRRR') as DATE_OF_FORMATION , DURATION, SHG_CODE,CIF from BASIC_INFO where SHG_CODE= '" + BasicInformationBeanObj.getShgSearch() + "' and pacs_id = '" +pacsId+ "' "); + + while (rs.next()) { + BasicInformationBeanObj = new BasicInformationBean(); + BasicInformationBeanObj.setNameOfShg(rs.getString("NAME_OF_SHG")); + BasicInformationBeanObj.setGroupCategory(rs.getString("GRP_CATEGORY")); + BasicInformationBeanObj.setDateOfFormation(rs.getString("DATE_OF_FORMATION")); + BasicInformationBeanObj.setDuration(rs.getString("DURATION")); + BasicInformationBeanObj.setShgcode(rs.getString("SHG_CODE")); + BasicInformationBeanObj.setCif(rs.getString("CIF")); + + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + } + + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(BasicInformationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + if (SeachFound == 0) { + message = "SHG Code does not exist in the system"; + request.setAttribute("message", message); + } + request.setAttribute("BasicInformationBeanObj", BasicInformationBeanObj); + + request.getRequestDispatcher("/Shg_JSP/BasicInformation.jsp").forward(request, response); + + } else if ("Update".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(BasicInformationBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(BasicInformationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(BasicInformationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call SHG_OPERATIONS.Upsert_basic_info(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(BasicInformationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, BasicInformationBeanObj.getShgcodeAmend()); + proc.setString(2, BasicInformationBeanObj.getNameOfShgAmend()); + proc.setString(3, BasicInformationBeanObj.getGroupCategoryAmend()); + proc.setString(4, BasicInformationBeanObj.getDateOfFormationAmend()); + proc.setString(5, BasicInformationBeanObj.getDurationAmend()); + proc.setString(7, BasicInformationBeanObj.getCifamend()); + proc.setString(8, pacsId); + + proc.setString(6, ServletName); + + + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + + proc.execute(); + + + + } catch (SQLException ex) { + // Logger.getLogger(BasicInformationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(BasicInformationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Shg_JSP/BasicInformation.jsp").forward(request, response); + + } + + } + + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/BatchExecutionFailedOperation.java b/IPKS_Updated/src/src/java/Controller/BatchExecutionFailedOperation.java new file mode 100644 index 0000000..3817012 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/BatchExecutionFailedOperation.java @@ -0,0 +1,71 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 986137 + */ +public class BatchExecutionFailedOperation { + + Connection con = null; + Statement st = null; + boolean SuccessFlag = false; + + public boolean BatchExecutionFailedOperation(String PageName, String hdrID) { + + + try { + con = DbHandler.getDBConnection(); + st = con.createStatement(); + + if (PageName.equalsIgnoreCase("pdsSellItem.jsp")) { + + ResultSet rs = st.executeQuery("delete from PDS_SALES_HDR where SALES_REF_NO='" + hdrID + "'"); + + } + if (PageName.equalsIgnoreCase("DepositKYCCreation.jsp")) { + + ResultSet rs = st.executeQuery("Delete from KYC_HDR where CIF_NO = '" + hdrID + "' "); + + } + // con.commit(); + SuccessFlag=true; + + } catch (Exception e) { + System.out.println("Error occurred during processing."); + + } finally { + try { + if(st !=null) + st.close(); + if (con != null) + con.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + } + + return SuccessFlag; + } +} diff --git a/IPKS_Updated/src/src/java/Controller/BatchTransactionServlet.java b/IPKS_Updated/src/src/java/Controller/BatchTransactionServlet.java new file mode 100644 index 0000000..d57fb75 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/BatchTransactionServlet.java @@ -0,0 +1,362 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import DataEntryBean.BatchProcessingBean; +import java.sql.BatchUpdateException; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; + +/** + * + * @author 594267 + */ +public class BatchTransactionServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet BatchTransactionServlet"); + out.println(""); + out.println(""); + out.println("

Servlet BatchTransactionServlet at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + String handle_id = request.getParameter("handle_id"); + String userRole= (String)session.getAttribute("userRole"); + String batchID = null; + Connection con = null; + Statement proc = null; + Connection connection = null; + CallableStatement stmt = null; + BatchProcessingBean oBatchProcessingBean; + ArrayList alBatchProcessingBean = new ArrayList(); + + if ("create".equalsIgnoreCase(handle_id)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + for (int i = 1; i <= counter; i++) { + try { + oBatchProcessingBean = new BatchProcessingBean(); + // oBatchProcessingBean.setAccType(request.getParameter("accType" + i)); + // oBatchProcessingBean.setAccNo(request.getParameter("accNo" + i)); + // oBatchProcessingBean.setTxnAmt(request.getParameter("txnAmt" + i)); + // oBatchProcessingBean.setTxnInd(request.getParameter("txnInd" + i)); + // oBatchProcessingBean.setNarration(request.getParameter("txnNarration" + i)); + + alBatchProcessingBean.add(oBatchProcessingBean); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + + } + + if (alBatchProcessingBean.size() > 0) { + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + proc = con.createStatement(); + //ResultSet rs = proc.executeQuery("select batch_txn_details_seq.NEXTVAL from dual"); + while (rs.next()) { + batchID = rs.getString(1); + } + proc.close(); + for (int j = 0; j < alBatchProcessingBean.size(); j++) { + stmt = con.prepareCall("{ call batch_txn_entry(?,?,?,?,?,?,?,?,?) }"); + oBatchProcessingBean = alBatchProcessingBean.get(j); + stmt.setString(1, oBatchProcessingBean.getAccType()); + stmt.setString(2, oBatchProcessingBean.getAccNo()); + stmt.setString(3, oBatchProcessingBean.getTxnAmt()); + stmt.setString(4, oBatchProcessingBean.getTxnInd()); + stmt.setString(5, oBatchProcessingBean.getNarration()); + stmt.setString(6, pacsId); + stmt.setString(7, batchID); + stmt.registerOutParameter(8, java.sql.Types.VARCHAR); + stmt.setString(9, user); + //stmt.addBatch(); + stmt.execute(); + // message = stmt.getString(8); + if (!message.equalsIgnoreCase("Batch transaction details saved successfully")) { + con.rollback(); + break; + } + stmt.close(); + } + if (message.equalsIgnoreCase("Batch transaction details saved successfully")) { + message = message + " with batchID: " + batchID; + con.commit(); + } + //message = "Batch details saved successfully"; + /*message = stmt.getString(6); + if(!message.equalsIgnoreCase("Batch transaction details saved successfully")){ + con.rollback(); + }*/ + + } catch (BatchUpdateException ex) { + + try { + con.rollback(); + + //SuccessFlag = BatchExecutionFailedOperationObject.BatchExecutionFailedOperation("DepositKYCCreation.jsp", hdrId); + /*if(!stmt.getString(6).isEmpty()) + message = stmt.getString(6); + else*/ + message = "Error in savings batch details"; + // message = ex.toString(); + + + } catch (SQLException ex1) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + + + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } catch (SQLException ex1) { + // message = "Error occurred in saving batch details. Please try Again!"; + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } finally { +// try { +// //stmt.close(); +// } catch (SQLException e) { +// System.out.println(e.toString()); +// } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/BatchTransaction.jsp").forward(request, response); + } + + else if("reject".equalsIgnoreCase(handle_id)){ + + //batchID = request.getParameter("batchID"); + + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + resultset = statement.executeQuery("update batch_txn_details b set b.status='REJECTED' where b.batch_id ='" + batchID + "' and b.pacs_id = '" + pacsId + "'"); + + if (resultset.next()) { + message="Batch ID "+batchID+" has been rejected successfully"; + } + + else + { + message="Error!!Batch ID "+batchID+" Cannot be rejected"; + } + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // message="Error!!Batch ID "+batchID+" Cannot be rejected"; + System.out.println("Error occurred during processing."); + } finally { + try { + if (statement != null) { + statement.close(); + } + if (connection != null) { + connection.close(); + } + } catch (SQLException ex) { + // Logger.getLogger(BatchTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/BatchAuthorisation.jsp").forward(request, response); + } + else if ("search".equalsIgnoreCase(handle_id)) { + + // batchID = request.getParameter("batchID"); + + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + + // resultset = statement.executeQuery("select b.acct_type,decode(b.acct_type, 'G', b.gl_ac_no,'L',b.loan_ac_no, b.dep_ac_no) acc_no," + + "(case when b.acct_type = 'G' then (select ga.ledger_name from gl_account ga where ga.key_1=b.gl_ac_no) when b.acct_type in ('S', 'R') then (select k.first_name || ' ' || k.middle_name || ' ' || k.last_name from kyc_hdr k where k.cif_no = (select da.customer_no from dep_account da where da.key_1 = b.dep_ac_no)) when b.acct_type = 'L' then (select k.first_name || ' ' || k.middle_name || ' ' || k.last_name from kyc_hdr k where k.cif_no = (select la.customer_no from loan_account la where la.key_1 = b.loan_ac_no)) end)," + + " b.txn_ind,b.txn_amt,decode(b.status,'ACTIVE','Transaction not yet posted','INACTIVE','Transaction posted'),nvl(b.txn_ref_no,'NA'),b.narration,b.loan_ac_no from batch_txn_details b where b.batch_id ='" + batchID + "' and b.pacs_id = '" + pacsId + "'"); + + while (resultset.next()) { + oBatchProcessingBean = new BatchProcessingBean(); + oBatchProcessingBean.setAccType(resultset.getString(1)); + oBatchProcessingBean.setAccNo(resultset.getString(2)); + oBatchProcessingBean.setAccName(resultset.getString(3)); + oBatchProcessingBean.setTxnInd(resultset.getString(4)); + oBatchProcessingBean.setTxnAmt(resultset.getString(5)); + oBatchProcessingBean.setTxnStatus(resultset.getString(6)); + oBatchProcessingBean.setTxnRefNo(resultset.getString(7)); + oBatchProcessingBean.setNarration(resultset.getString(8)); + + + if(resultset.getString(9)!=null) + { + oBatchProcessingBean.setAccNo(resultset.getString(9)); + } + alBatchProcessingBean.add(oBatchProcessingBean); + SeachFound = 1; + } + if (alBatchProcessingBean.size() > 0) { + request.setAttribute("alBatchProcessingBean", alBatchProcessingBean); + request.setAttribute("message", ""); + request.setAttribute("handle_id", "S"); + request.setAttribute("batchID", batchID); + } + //request.setAttribute("displayFlag", "Y"); + + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + statement.close(); + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(BatchTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + if (SeachFound == 0) { + message = "BatchID " + batchID + " not found"; + request.setAttribute("message", message); + } + + if(userRole.equals("201606000004041")) + request.getRequestDispatcher("/Deposit/BatchAuthorisation.jsp").forward(request, response); + else + request.getRequestDispatcher("/Deposit/BatchTransaction.jsp").forward(request, response); + } + + else if ("execute".equalsIgnoreCase(handle_id)) { + //batchID = request.getParameter("batchID"); + try { + connection = DbHandler.getDBConnection(); + connection.setAutoCommit(false); + stmt = connection.prepareCall("{ call execute_batch_txn(?,?,?,?) }"); + stmt.setString(1, batchID); + stmt.setString(2, pacsId); + stmt.registerOutParameter(3, java.sql.Types.VARCHAR); + stmt.setString(4, user); + //stmt.addBatch(); + stmt.execute(); + // message = stmt.getString(3); + if (message.equalsIgnoreCase("Batch transaction successfully posted")) { + + connection.commit(); + } else { + connection.rollback(); + } + request.setAttribute("message", message); + } catch (SQLException ex) { + // Logger.getLogger(BatchTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + connection.close(); + stmt.close(); + } catch (SQLException ex) { + // Logger.getLogger(BatchTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + request.getRequestDispatcher("/Deposit/BatchAuthorisation.jsp").forward(request, response); + + } + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/BatchTransactionServlet_old.java b/IPKS_Updated/src/src/java/Controller/BatchTransactionServlet_old.java new file mode 100644 index 0000000..4d11250 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/BatchTransactionServlet_old.java @@ -0,0 +1,312 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import DataEntryBean.BatchProcessingBean; +import java.sql.BatchUpdateException; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; + +/** + * + * @author 594267 + */ +public class BatchTransactionServlet_old extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet BatchTransactionServlet"); + out.println(""); + out.println(""); + out.println("

Servlet BatchTransactionServlet at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + String handle_id = request.getParameter("handle_id"); + int counter = Integer.parseInt(request.getParameter("rowCounter")); + String batchID = null; + Connection con = null; + Statement proc = null; + Connection connection = null; + CallableStatement stmt = null; + BatchProcessingBean oBatchProcessingBean; + ArrayList alBatchProcessingBean = new ArrayList(); + + if ("create".equalsIgnoreCase(handle_id)) { + + + for (int i = 1; i <= counter; i++) { + try { + oBatchProcessingBean = new BatchProcessingBean(); + //oBatchProcessingBean.setAccType(request.getParameter("accType" + i)); + // oBatchProcessingBean.setAccNo(request.getParameter("accNo" + i)); + // oBatchProcessingBean.setTxnAmt(request.getParameter("txnAmt" + i)); + // oBatchProcessingBean.setTxnInd(request.getParameter("txnInd" + i)); + // oBatchProcessingBean.setNarration(request.getParameter("txnNarration" + i)); + + alBatchProcessingBean.add(oBatchProcessingBean); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + + } + + if (alBatchProcessingBean.size() > 0) { + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + proc = con.createStatement(); + //ResultSet rs = proc.executeQuery("select batch_txn_details_seq.NEXTVAL from dual"); + while (rs.next()) { + batchID = rs.getString(1); + } + proc.close(); + for (int j = 0; j < alBatchProcessingBean.size(); j++) { + stmt = con.prepareCall("{ call batch_txn_entry(?,?,?,?,?,?,?,?) }"); + oBatchProcessingBean = alBatchProcessingBean.get(j); + stmt.setString(1, oBatchProcessingBean.getAccType()); + stmt.setString(2, oBatchProcessingBean.getAccNo()); + stmt.setString(3, oBatchProcessingBean.getTxnAmt()); + stmt.setString(4, oBatchProcessingBean.getTxnInd()); + stmt.setString(5, oBatchProcessingBean.getNarration()); + stmt.setString(6, pacsId); + stmt.setString(7, batchID); + stmt.registerOutParameter(8, java.sql.Types.VARCHAR); + //stmt.addBatch(); + stmt.execute(); + // message = stmt.getString(8); + if (!message.equalsIgnoreCase("Batch transaction details saved successfully")) { + con.rollback(); + break; + } + stmt.close(); + } + if (message.equalsIgnoreCase("Batch transaction details saved successfully")) { + message = message + " with batchID: " + batchID; + con.commit(); + } + //message = "Batch details saved successfully"; + /*message = stmt.getString(6); + if(!message.equalsIgnoreCase("Batch transaction details saved successfully")){ + con.rollback(); + }*/ + + } catch (BatchUpdateException ex) { + + try { + con.rollback(); + + //SuccessFlag = BatchExecutionFailedOperationObject.BatchExecutionFailedOperation("DepositKYCCreation.jsp", hdrId); + /*if(!stmt.getString(6).isEmpty()) + message = stmt.getString(6); + else*/ + message = "Error in savings batch details"; + // message = ex.toString(); + + + } catch (SQLException ex1) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + + + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } catch (SQLException ex1) { + // message = "Error occurred in saving batch details. Please try Again!"; + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } finally { +// try { +// //stmt.close(); +// } catch (SQLException e) { +// System.out.println(e.toString()); +// } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/BatchTransaction.jsp").forward(request, response); + } + if ("search".equalsIgnoreCase(handle_id)) { + + // batchID = request.getParameter("batchID"); + + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + + // resultset = statement.executeQuery("select b.acct_type,decode(b.acct_type, 'G', b.gl_ac_no,'L',b.loan_ac_no, b.dep_ac_no) acc_no, b.txn_ind,b.txn_amt,decode(b.status,'ACTIVE','Transaction not yet posted','INACTIVE','Transaction posted'),nvl(b.txn_ref_no,'NA'),b.narration,b.loan_ac_no from batch_txn_details b where b.batch_id ='" + batchID + "' and b.pacs_id = '" + pacsId + "'"); + + while (resultset.next()) { + oBatchProcessingBean = new BatchProcessingBean(); + oBatchProcessingBean.setAccType(resultset.getString(1)); + oBatchProcessingBean.setAccNo(resultset.getString(2)); + oBatchProcessingBean.setTxnInd(resultset.getString(3)); + oBatchProcessingBean.setTxnAmt(resultset.getString(4)); + oBatchProcessingBean.setTxnStatus(resultset.getString(5)); + oBatchProcessingBean.setTxnRefNo(resultset.getString(6)); + oBatchProcessingBean.setNarration(resultset.getString(7)); + + if(resultset.getString(8)!=null) + { + oBatchProcessingBean.setAccNo(resultset.getString(8)); + } + alBatchProcessingBean.add(oBatchProcessingBean); + SeachFound = 1; + } + if (alBatchProcessingBean.size() > 0) { + request.setAttribute("alBatchProcessingBean", alBatchProcessingBean); + request.setAttribute("message", ""); + request.setAttribute("handle_id", "S"); + request.setAttribute("batchID", batchID); + } + //request.setAttribute("displayFlag", "Y"); + + + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + statement.close(); + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(BatchTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + if (SeachFound == 0) { + message = "BatchID " + batchID + " not found"; + request.setAttribute("message", message); + } + + request.getRequestDispatcher("/Deposit/BatchTransaction.jsp").forward(request, response); + } + + if ("execute".equalsIgnoreCase(handle_id)) { + // batchID = request.getParameter("batchID"); + try { + connection = DbHandler.getDBConnection(); + connection.setAutoCommit(false); + stmt = connection.prepareCall("{ call execute_batch_txn(?,?,?) }"); + stmt.setString(1, batchID); + stmt.setString(2, pacsId); + stmt.registerOutParameter(3, java.sql.Types.VARCHAR); + //stmt.addBatch(); + stmt.execute(); + // message = stmt.getString(3); + if (message.equalsIgnoreCase("Batch transaction successfully posted")) { + + connection.commit(); + } else { + connection.rollback(); + } + request.setAttribute("message", message); + } catch (SQLException ex) { + // Logger.getLogger(BatchTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + connection.close(); + stmt.close(); + } catch (SQLException ex) { + // Logger.getLogger(BatchTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + request.getRequestDispatcher("/Deposit/BatchTransaction.jsp").forward(request, response); + } + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/BorrowingCreationServlet.java b/IPKS_Updated/src/src/java/Controller/BorrowingCreationServlet.java new file mode 100644 index 0000000..93c63f4 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/BorrowingCreationServlet.java @@ -0,0 +1,429 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.BorrowingCreationBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.sql.BatchUpdateException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import java.sql.Statement; +import javax.servlet.ServletContext; + +/** + * + * @author 1027350 + */ +public class BorrowingCreationServlet extends HttpServlet { + + /** + * stmtesses requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void stmtessRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + stmtessRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement stmt = null; + ResultSet rs = null; + int SeachFound = 0; + String message = ""; + String pacsId = session.getAttribute("pacsId").toString(); + String userId = session.getAttribute("user").toString(); + + String handle_id = request.getParameter("handle_id"); + //String gl_ac = request.getParameter("glName"); + + + BorrowingCreationBean oBorrowingCreationBean = new BorrowingCreationBean(); + ArrayList alBorrowingCreationBeanDetailBean = new ArrayList(); + + try { + //BeanUtils.populate(oBorrowingCreationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(BorrowingCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(BorrowingCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + // BeanUtils.populate(oBorrowingCreationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(BorrowingCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(BorrowingCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + + + if ("Create".equalsIgnoreCase(handle_id)) { + + + ServletContext servletContext = getServletContext(); + + //START HEADER PART + try { + + // con = DbHandler.getDBConnection(); + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + //String ckbox = request.getParameter("chckbox" + i); + // String bank_name = request.getParameter("bankName" + i); + if (bank_name != null) { + // String branch_name = request.getParameter("branchName" + i); + //String ac_no = request.getParameter("accountNo" + i); + //String amount = request.getParameter("amount" + i); + //String int_rate = request.getParameter("interestRate" + i); + //String od_int_rate = request.getParameter("odInterestRate" + i); + //String ac_opn_dt = request.getParameter("acOpenDate" + i); + // String ac_ovd_dt = request.getParameter("acOvdDate" + i); + // String act_flag = request.getParameter("active" + i); + + //if (ckbox.equalsIgnoreCase("on")) { + oBorrowingCreationBean = new BorrowingCreationBean(); + oBorrowingCreationBean.setAcno(ac_no); + oBorrowingCreationBean.setAc_opn_dt(ac_opn_dt); + oBorrowingCreationBean.setActive_flag(act_flag); + oBorrowingCreationBean.setAmt(amount); + oBorrowingCreationBean.setBank_name(bank_name); + oBorrowingCreationBean.setBranch_name(branch_name); + oBorrowingCreationBean.setInt_rate(int_rate); + oBorrowingCreationBean.setOd_int_rate(od_int_rate); + oBorrowingCreationBean.setOvd_dt(ac_ovd_dt); + + + alBorrowingCreationBeanDetailBean.add(oBorrowingCreationBean); + } + //} + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + + if (alBorrowingCreationBeanDetailBean.size() > 0) { + try { + con = DbHandler.getDBConnection(); + stmt = con.prepareCall("{ call borrowing_create(?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + for (int j = 0; j < alBorrowingCreationBeanDetailBean.size(); j++) { + oBorrowingCreationBean = alBorrowingCreationBeanDetailBean.get(j); + stmt.registerOutParameter(1, java.sql.Types.VARCHAR); + stmt.setString(2, gl_ac); + stmt.setString(3, oBorrowingCreationBean.getAcno()); + stmt.setString(4, oBorrowingCreationBean.getBank_name()); + stmt.setString(5, oBorrowingCreationBean.getBranch_name()); + stmt.setString(6, oBorrowingCreationBean.getInt_rate()); + stmt.setString(7, oBorrowingCreationBean.getAc_opn_dt()); + stmt.setString(8, oBorrowingCreationBean.getOvd_dt()); + stmt.setString(9, oBorrowingCreationBean.getActive_flag()); + stmt.setString(10, oBorrowingCreationBean.getAmt()); + stmt.setString(11, pacsId); + stmt.setInt(12, j); + stmt.setString(13, oBorrowingCreationBean.getOd_int_rate()); + + stmt.execute(); + // message = stmt.getString(1); + + } + + + } catch (SQLException ex) { + try { + // con.rollback(); + message = "Details insertion has failed"; + } catch (Exception ex1) { + // Logger.getLogger(BorrowingCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(BorrowingCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + stmt.close(); + } catch (SQLException e) { + System.out.println("Error occurred during statement close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(BorrowingCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + } + + //END HEADER PART + //START DETAIL PART + + + } + + } catch (Exception e) { + message = "Details insertion has failed"; + + } finally { + System.out.println("Processing done."); + } + } else if (("Search").equalsIgnoreCase(handle_id)) { + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + //String gl_no = request.getParameter("glNameAmend"); + //String balance = request.getParameter("glBalAmend"); + ArrayList alBorrowingCreationDetailBean2 = new ArrayList(); + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(InvestmentCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + //resultset = statement.executeQuery("select i.ac_no,i.bank_name,i.branch_name,i.amt,i.int_rate,i.od_int_rate,to_char(i.ac_opn_dt,'DD/MM/RRRR') as ac_opn_dt,to_char(i.Overdue_Date,'DD/MM/RRRR') as Overdue_Date,i.active_flag from borrowing_dtl i where i.gl_id='" + gl_no + "'"); + + while (resultset.next()) { + oBorrowingCreationBean = new BorrowingCreationBean(); + oBorrowingCreationBean.setAcno(resultset.getString(1)); + oBorrowingCreationBean.setBank_name(resultset.getString(2)); + oBorrowingCreationBean.setBranch_name(resultset.getString(3)); + oBorrowingCreationBean.setAmt(resultset.getString(4)); + oBorrowingCreationBean.setInt_rate(resultset.getString(5)); + oBorrowingCreationBean.setOd_int_rate(resultset.getString(6)); + oBorrowingCreationBean.setAc_opn_dt(resultset.getString(7)); + oBorrowingCreationBean.setOvd_dt(resultset.getString(8)); + oBorrowingCreationBean.setActive_flag(resultset.getString(9)); + + System.out.println(resultset.getString(7)); + System.out.println(resultset.getString(8)); + + alBorrowingCreationDetailBean2.add(oBorrowingCreationBean); + + SeachFound = 1; + + } + request.setAttribute("displayFlag", "Y"); + // statement.close(); + // resultset.close(); + + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if(resultset !=null) + resultset.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + //Detail Part Populate + + request.setAttribute("GL_Account", gl_no); + request.setAttribute("balance", balance); + request.setAttribute("Option", "Amend"); + request.setAttribute("oborrowingCreationBeanObj", oBorrowingCreationBean); + request.setAttribute("alBorrowingCreationDetailBean2", alBorrowingCreationDetailBean2); + + + } else if ("Update".equalsIgnoreCase(handle_id)) { + ServletContext servletContext = getServletContext(); + Statement statement = null; + //START HEADER PART + try { + con = DbHandler.getDBConnection(); + statement = con.createStatement(); + int counter = Integer.parseInt(request.getParameter("rowCounterAmend")); + //gl_ac = request.getParameter("hidden_gl_no"); + + for (int i = 1; i <= counter; i++) { + try { + + //String ckbox = request.getParameter("chckboxAmend" + i); + //String bank_name = request.getParameter("bankNameAmend" + i); + if (bank_name != null) { + // String branch_name = request.getParameter("branchNameAmend" + i); + // String ac_no = request.getParameter("accountNoAmend" + i); + // String amount = request.getParameter("amountAmend" + i); + // String int_rate = request.getParameter("interestRateAmend" + i); + // String od_int_rate = request.getParameter("odInterestRateAmend" + i); + // String ac_opn_dt = request.getParameter("acOpenDateAmend" + i); + // String ac_ovd_dt = request.getParameter("acMatDateAmend" + i); + // String act_flag = request.getParameter("activeAmend" + i); + + oBorrowingCreationBean = new BorrowingCreationBean(); + oBorrowingCreationBean.setAcno(ac_no); + oBorrowingCreationBean.setAc_opn_dt(ac_opn_dt); + oBorrowingCreationBean.setActive_flag(act_flag); + oBorrowingCreationBean.setAmt(amount); + oBorrowingCreationBean.setBank_name(bank_name); + oBorrowingCreationBean.setBranch_name(branch_name); + oBorrowingCreationBean.setInt_rate(int_rate); + oBorrowingCreationBean.setOd_int_rate(od_int_rate); + oBorrowingCreationBean.setOvd_dt(ac_ovd_dt); + + alBorrowingCreationBeanDetailBean.add(oBorrowingCreationBean); + + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + + } finally { + try { + if(statement !=null) + statement.close(); + if (con != null) + con.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + } + + if (alBorrowingCreationBeanDetailBean.size() > 0) { + try { + con = DbHandler.getDBConnection(); + stmt = con.prepareCall("{ call borrowing_update(?,?,?,?,?,?,?,?,?,?,?,?) }"); + for (int j = 0; j < alBorrowingCreationBeanDetailBean.size(); j++) { + oBorrowingCreationBean = alBorrowingCreationBeanDetailBean.get(j); + stmt.registerOutParameter(1, java.sql.Types.VARCHAR); + stmt.setString(2, gl_ac); + stmt.setString(3, oBorrowingCreationBean.getAcno()); + stmt.setString(4, oBorrowingCreationBean.getBank_name()); + stmt.setString(5, oBorrowingCreationBean.getBranch_name()); + stmt.setString(6, oBorrowingCreationBean.getInt_rate()); + stmt.setString(7, oBorrowingCreationBean.getAc_opn_dt()); + stmt.setString(8, oBorrowingCreationBean.getOvd_dt()); + stmt.setString(9, oBorrowingCreationBean.getActive_flag()); + stmt.setString(10, oBorrowingCreationBean.getAmt()); + stmt.setString(11, pacsId); + stmt.setString(12, oBorrowingCreationBean.getOd_int_rate()); + + stmt.execute(); + + + } + String deleteDataBckUpQry = "insert into BORROWING_DTL_DELETE_HIST (select AC_NO,BANK_NAME,BRANCH_NAME,AMT,INT_RATE,OD_INT_RATE,AC_OPN_DT,OVERDUE_DATE,ACTIVE_FLAG,GL_ID,sysdate,'" + pacsId + "','" + userId + "' from borrowing_dtl " + + " where modified_time is null or modified_time +} diff --git a/IPKS_Updated/src/src/java/Controller/BulkFileUploadServlet.java b/IPKS_Updated/src/src/java/Controller/BulkFileUploadServlet.java new file mode 100644 index 0000000..0eebddc --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/BulkFileUploadServlet.java @@ -0,0 +1,326 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.MicroFileAccountDetBean; +import ServiceLayer.MicrofileProcessingService; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.PrintWriter; +import java.io.Reader; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import javax.servlet.http.HttpServlet; +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.fileupload.servlet.ServletFileUpload; +import org.apache.commons.io.FilenameUtils; + +/** + * + * @author 1004242 + */ +public class BulkFileUploadServlet extends HttpServlet { + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + MicrofileProcessingService service = new MicrofileProcessingService(); + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = (String) session.getAttribute("user"); + StringBuilder csvDownloadableBuilder = null; + String action = (request.getParameter("actionTag") == null) ? request.getParameter("actionMap") : request.getParameter("actionTag"); + String filePath = null; + String outMsg = null; + File prtFile = null; + + if (request.getSession().getAttribute("errorMessage") != null) { + request.getSession().removeAttribute("errorMessage"); + } + + try { + if (ServletFileUpload.isMultipartContent(request)) { + + filePath = service.uploadCSVToServer(request, pacsId); + String extentionFile[] = filePath.split("\\."); + + if (extentionFile[1] != null && extentionFile[1].contains("prt")) { + + if (filePath != null) { + outMsg = service.readAndInsertFromPRT(pacsId, filePath, tellerId); + if (outMsg != null) { + prtFile = new File(filePath); + if (prtFile.exists()) { + prtFile.delete(); + } + request.setAttribute("message", outMsg); + } else { + request.setAttribute("message", "Error occured during process. Please try again."); + } + //response.sendRedirect(request.getHeader("Referer")); + request.getRequestDispatcher("/Deposit/BulkFileUpload.jsp").forward(request, response); + } else { + System.out.println("prt file could not be read for :" + pacsId); + request.setAttribute("message", "Request can not be processed this time"); + request.getRequestDispatcher("/Deposit/BulkFileUpload.jsp").forward(request, response); + //response.sendRedirect(request.getHeader("Referer")); + //error case handling + } + + } else if (extentionFile[1] != null && extentionFile[1].contains("csv")) { + //filePath = service.uploadCSVToServer(request, pacsId); + if (filePath != null) { + String result = service.readAndInsertFromCSVForBulk(pacsId, filePath, tellerId); + if (result != null) { + request.getSession().setAttribute("errorMessageBulk", result); + } else { + request.getSession().setAttribute("errorMessageBulk", "Error occured during process. Please try again."); + } + //response.sendRedirect(request.getHeader("Referer")); + } else { + System.out.println("Bulk file could not be read for :" + pacsId); + request.getSession().setAttribute("errorMessage", "Request can not be processed this time"); + // response.sendRedirect(request.getHeader("Referer")); + //error case handling + } + } + } else if (action != null && action.equalsIgnoreCase("Download")) { + + String filePathSample = this.getServletContext().getRealPath("/WEB-INF/BULK_TXN_FORMAT.xlsx"); + File downloadFile = new File(filePathSample); + FileInputStream inStream = new FileInputStream(downloadFile); + // obtains ServletContext + ServletContext context = getServletContext(); + // gets MIME type of the file + String mimeType = context.getMimeType(filePathSample); + if (mimeType == null) { + // set to binary type if MIME mapping not found + mimeType = "application/octet-stream"; + } + // modifies response + response.setContentType(mimeType); + response.setContentLength((int) downloadFile.length()); + + String headerKey = "Content-Disposition"; + String headerValue = String.format("attachment; filename=\"%s\"", downloadFile.getName()); + response.setHeader(headerKey, headerValue); + // obtains response's output stream + OutputStream outStream = response.getOutputStream(); + byte[] buffer = new byte[4096]; + int bytesRead = -1; + while ((bytesRead = inStream.read(buffer)) != -1) { + outStream.write(buffer, 0, bytesRead); + } + inStream.close(); + outStream.close(); + System.out.println("Bulk format file downloaded for pacs id :" + pacsId); + } + else if (action != null && action.equalsIgnoreCase("Manual")) { + + String filePathSample = this.getServletContext().getRealPath("/WEB-INF/BULK TXN POSTING STEPS DETAILS.docx"); + File downloadFile = new File(filePathSample); + FileInputStream inStream = new FileInputStream(downloadFile); + // obtains ServletContext + ServletContext context = getServletContext(); + // gets MIME type of the file + String mimeType = context.getMimeType(filePathSample); + if (mimeType == null) { + // set to binary type if MIME mapping not found + mimeType = "application/octet-stream"; + } + // modifies response + response.setContentType(mimeType); + response.setContentLength((int) downloadFile.length()); + + String headerKey = "Content-Disposition"; + String headerValue = String.format("attachment; filename=\"%s\"", downloadFile.getName()); + response.setHeader(headerKey, headerValue); + // obtains response's output stream + OutputStream outStream = response.getOutputStream(); + byte[] buffer = new byte[4096]; + int bytesRead = -1; + while ((bytesRead = inStream.read(buffer)) != -1) { + outStream.write(buffer, 0, bytesRead); + } + inStream.close(); + outStream.close(); + System.out.println("Manual file downloaded for pacs id :" + pacsId); + } + else if (action != null && action.equalsIgnoreCase("CBSBULK")) { + + String filePathSample = this.getServletContext().getRealPath("/WEB-INF/CBS_BULK_ACCT_MANUAL.doc"); + File downloadFile = new File(filePathSample); + FileInputStream inStream = new FileInputStream(downloadFile); + // obtains ServletContext + ServletContext context = getServletContext(); + // gets MIME type of the file + String mimeType = context.getMimeType(filePathSample); + if (mimeType == null) { + // set to binary type if MIME mapping not found + mimeType = "application/octet-stream"; + } + // modifies response + response.setContentType(mimeType); + response.setContentLength((int) downloadFile.length()); + + String headerKey = "Content-Disposition"; + String headerValue = String.format("attachment; filename=\"%s\"", downloadFile.getName()); + response.setHeader(headerKey, headerValue); + // obtains response's output stream + OutputStream outStream = response.getOutputStream(); + byte[] buffer = new byte[4096]; + int bytesRead = -1; + while ((bytesRead = inStream.read(buffer)) != -1) { + outStream.write(buffer, 0, bytesRead); + } + inStream.close(); + outStream.close(); + System.out.println("Manual file downloaded for pacs id :" + pacsId); + } + else if (action != null && action.equalsIgnoreCase("MOC")) { + + String filePathSample = this.getServletContext().getRealPath("/WEB-INF/IPKS MOC.pdf"); + File downloadFile = new File(filePathSample); + FileInputStream inStream = new FileInputStream(downloadFile); + // obtains ServletContext + ServletContext context = getServletContext(); + // gets MIME type of the file + String mimeType = context.getMimeType(filePathSample); + if (mimeType == null) { + // set to binary type if MIME mapping not found + mimeType = "application/octet-stream"; + } + // modifies response + response.setContentType(mimeType); + response.setContentLength((int) downloadFile.length()); + + String headerKey = "Content-Disposition"; + String headerValue = String.format("attachment; filename=\"%s\"", downloadFile.getName()); + response.setHeader(headerKey, headerValue); + // obtains response's output stream + OutputStream outStream = response.getOutputStream(); + byte[] buffer = new byte[4096]; + int bytesRead = -1; + while ((bytesRead = inStream.read(buffer)) != -1) { + outStream.write(buffer, 0, bytesRead); + } + inStream.close(); + outStream.close(); + System.out.println("Manual file downloaded for pacs id :" + pacsId); + } + else if (action != null && action.equalsIgnoreCase("PSetup")) { + + String filePathSample = this.getServletContext().getRealPath("/WEB-INF/PASSBOOK_SETUP.doc"); + File downloadFile = new File(filePathSample); + FileInputStream inStream = new FileInputStream(downloadFile); + // obtains ServletContext + ServletContext context = getServletContext(); + // gets MIME type of the file + String mimeType = context.getMimeType(filePathSample); + if (mimeType == null) { + // set to binary type if MIME mapping not found + mimeType = "application/octet-stream"; + } + // modifies response + response.setContentType(mimeType); + response.setContentLength((int) downloadFile.length()); + + String headerKey = "Content-Disposition"; + String headerValue = String.format("attachment; filename=\"%s\"", downloadFile.getName()); + response.setHeader(headerKey, headerValue); + // obtains response's output stream + OutputStream outStream = response.getOutputStream(); + byte[] buffer = new byte[4096]; + int bytesRead = -1; + while ((bytesRead = inStream.read(buffer)) != -1) { + outStream.write(buffer, 0, bytesRead); + } + inStream.close(); + outStream.close(); + System.out.println("Manual file downloaded for pacs id :" + pacsId); + } + else if (action != null && action.equalsIgnoreCase("SPassbook")) { + + String filePathSample = this.getServletContext().getRealPath("/WEB-INF/Passbook_Sample.jpg"); + File downloadFile = new File(filePathSample); + FileInputStream inStream = new FileInputStream(downloadFile); + // obtains ServletContext + ServletContext context = getServletContext(); + // gets MIME type of the file + String mimeType = context.getMimeType(filePathSample); + if (mimeType == null) { + // set to binary type if MIME mapping not found + mimeType = "application/octet-stream"; + } + // modifies response + response.setContentType(mimeType); + response.setContentLength((int) downloadFile.length()); + + String headerKey = "Content-Disposition"; + String headerValue = String.format("attachment; filename=\"%s\"", downloadFile.getName()); + response.setHeader(headerKey, headerValue); + // obtains response's output stream + OutputStream outStream = response.getOutputStream(); + byte[] buffer = new byte[4096]; + int bytesRead = -1; + while ((bytesRead = inStream.read(buffer)) != -1) { + outStream.write(buffer, 0, bytesRead); + } + inStream.close(); + outStream.close(); + System.out.println("Manual file downloaded for pacs id :" + pacsId); + } + + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + request.getSession().setAttribute("errorMessageBulk", "Request can not be processed."); + // response.sendRedirect(request.getHeader("Referer")); + + } finally { + System.out.println("Processing done."); + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/BulkMarkServlet.java b/IPKS_Updated/src/src/java/Controller/BulkMarkServlet.java new file mode 100644 index 0000000..9ef2443 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/BulkMarkServlet.java @@ -0,0 +1,212 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import Dao.BulkMarkDao; +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.List; +import javax.servlet.ServletException; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +public class BulkMarkServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + //String userId = request.getParameter("userName"); + String userId = (String) session.getAttribute("user"); + ServletOutputStream stream = null; + BufferedInputStream buf = null; + BulkMarkDao bDao = new BulkMarkDao(); + String action = request.getParameter("temp"); + + try { + if (action.equalsIgnoreCase("allAcc")) { + //String accNo = request.getParameter("accNo"); + response.setContentType("application/json"); + PrintWriter out = response.getWriter(); + String jsonStr = bDao.bulkMarkAccounts(accNo,pacsId); + out.print(jsonStr); + out.flush(); + } + else if (action.equalsIgnoreCase("allAcc_Exs")) { + //String accNo = request.getParameter("exAccNo"); + response.setContentType("application/json"); + PrintWriter out = response.getWriter(); + String jsonStr = bDao.bulkMarkAccounts_Exs(accNo,pacsId); + out.print(jsonStr); + out.flush(); + } + else if (action.equalsIgnoreCase("markBulk")) { + response.setContentType("application/json"); + //String accNo = request.getParameter("accNo"); + String markType = "N"; + PrintWriter out = response.getWriter(); + String jsonStr = bDao.markBulkAccount(accNo,pacsId,userId,markType); + out.print(jsonStr); + out.flush(); + } + else if (action.equalsIgnoreCase("markBulk_Exs")) { + response.setContentType("application/json"); + //String accNo = request.getParameter("exAccNo"); + String markType = "E"; + PrintWriter out = response.getWriter(); + String jsonStr = bDao.markBulkAccount_Exs(accNo,pacsId,userId,markType); + out.print(jsonStr); + out.flush(); + } + else if (action.equalsIgnoreCase("allAccAuth")) { + response.setContentType("application/json"); + PrintWriter out = response.getWriter(); + String jsonStr = bDao.bulkMarkAccountsAuth(pacsId); + out.print(jsonStr); + out.flush(); + } + else if (action.equalsIgnoreCase("allAccAuth_Exs")) { + response.setContentType("application/json"); + PrintWriter out = response.getWriter(); + String jsonStr = bDao.bulkMarkAccountsAuth_Exs(pacsId); + out.print(jsonStr); + out.flush(); + } + else if (action.equalsIgnoreCase("unmark")) { + //String accNo = request.getParameter("accNo"); + response.setContentType("application/json"); + PrintWriter out = response.getWriter(); + String jsonStr = bDao.unmarkAccountFromAuth(accNo,pacsId,userId); + out.print(jsonStr); + out.flush(); + } + else if (action.equalsIgnoreCase("unmark_Exs")) { + //String accNo = request.getParameter("exAccNo"); + response.setContentType("application/json"); + PrintWriter out = response.getWriter(); + String jsonStr = bDao.unmarkAccountFromAuth(accNo,pacsId,userId); + out.print(jsonStr); + out.flush(); + } + else if (action.equalsIgnoreCase("authBulk")) { + // String mark = request.getParameter("searchCust"); + + String jsonStr = bDao.authoriseBulk(pacsId,userId,mark); + if(jsonStr.contains("success")){ + if (mark.equalsIgnoreCase("E")) { + File bulkFile = bDao.gerateBulkFlatFile2(pacsId,userId); + if (bulkFile != null) { + stream = response.getOutputStream(); + response.setContentType("text/plain"); + response.addHeader("Content-Disposition", "attachment; filename=" + + bulkFile.getName()); + response.setContentLength((int) bulkFile.length()); + FileInputStream input = new FileInputStream(bulkFile); + buf = new BufferedInputStream(input); + int readBytes = 0; + + while ((readBytes = buf.read()) != -1) { + stream.write(readBytes); + } + + } + else { + request.setAttribute("message", jsonStr); + request.getRequestDispatcher("/Deposit/authBulkIncr.jsp").forward(request, response); + } + } + else { + File bulkFile = bDao.gerateBulkFlatFile1(pacsId,userId); + if (bulkFile != null) { + stream = response.getOutputStream(); + response.setContentType("text/plain"); + response.addHeader("Content-Disposition", "attachment; filename=" + + bulkFile.getName()); + response.setContentLength((int) bulkFile.length()); + FileInputStream input = new FileInputStream(bulkFile); + buf = new BufferedInputStream(input); + int readBytes = 0; + + while ((readBytes = buf.read()) != -1) { + stream.write(readBytes); + } + + } + else { + request.setAttribute("message", jsonStr); + request.getRequestDispatcher("/Deposit/authBulkIncr.jsp").forward(request, response); + } + } + //File bulkFile = bDao.gerateBulkFlatFile(pacsId,userId); + } + else{ + request.setAttribute("message", jsonStr); + request.getRequestDispatcher("/Deposit/authBulkIncr.jsp").forward(request, response); + } + + } +// else if (action.equalsIgnoreCase("allTran")) +// { +// response.setContentType("application/json"); +// PrintWriter out = response.getWriter(); +// String jsonStr = wDao.getAllTranDetails(userId ,pacsId); +// out.print(jsonStr); +// out.flush(); +// } + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + + } finally { + System.out.println("Processing done."); + } + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} \ No newline at end of file diff --git a/IPKS_Updated/src/src/java/Controller/BulkMarkServletSTB.java b/IPKS_Updated/src/src/java/Controller/BulkMarkServletSTB.java new file mode 100644 index 0000000..6cce8d0 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/BulkMarkServletSTB.java @@ -0,0 +1,212 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import Dao.BulkMarkDaoSTB; +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.List; +import javax.servlet.ServletException; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +public class BulkMarkServletSTB extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsIdSTB = (String) session.getAttribute("pacsId"); + //String pacsId = request.getParameter("pacsId_STB"); + System.out.println("PacsId SIB: "+pacsIdSTB+" PacsId Brch: "+pacsId); + //String userId = request.getParameter("userName"); + String userId = (String) session.getAttribute("user"); + ServletOutputStream stream = null; + BufferedInputStream buf = null; + BulkMarkDaoSTB bDao = new BulkMarkDaoSTB(); + String action = request.getParameter("temp"); + + try { + if (action.equalsIgnoreCase("allAcc")) { + // String accNo = request.getParameter("accNo"); + response.setContentType("application/json"); + PrintWriter out = response.getWriter(); + String jsonStr = bDao.bulkMarkAccounts(accNo,pacsId); + out.print(jsonStr); + out.flush(); + } + else if (action.equalsIgnoreCase("markBulk")) { + response.setContentType("application/json"); + // String accNo = request.getParameter("accNo"); + PrintWriter out = response.getWriter(); + String jsonStr = bDao.markBulkAccount(accNo,pacsId,userId); + out.print(jsonStr); + out.flush(); + } + else if (action.equalsIgnoreCase("allAccAuth")) { + response.setContentType("application/json"); + PrintWriter out = response.getWriter(); + String jsonStr = bDao.bulkMarkAccountsAuth(pacsId); + out.print(jsonStr); + out.flush(); + } + else if (action.equalsIgnoreCase("allAccAuth_Exs")) { + response.setContentType("application/json"); + PrintWriter out = response.getWriter(); + String jsonStr = bDao.bulkMarkAccountsAuth_Exs(pacsId); + out.print(jsonStr); + out.flush(); + } + else if (action.equalsIgnoreCase("unmark")) { + //String accNo = request.getParameter("accNo"); + response.setContentType("application/json"); + PrintWriter out = response.getWriter(); + String jsonStr = bDao.unmarkAccountFromAuth(accNo,pacsId,userId); + out.print(jsonStr); + out.flush(); + } + else if (action.equalsIgnoreCase("authBulk")) { + // String jsonStr = bDao.updateHeader(pacsId,userId); + String jsonStr="success"; + if(jsonStr.contains("success")){ + String mark = request.getParameter("mark_Type"); + if (mark.equalsIgnoreCase("E")) { + String message = bDao.gerateBulkFlatFile_Exs(pacsId,userId); + if (message != null) { + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/authBulkIncr_STB.jsp").forward(request, response); + + } + else { + request.setAttribute("message", jsonStr); + request.getRequestDispatcher("/Deposit/authBulkIncr_STB.jsp").forward(request, response); + } + } + else { + String message = bDao.gerateBulkFlatFile(pacsId,userId); + if (message != null) { +// stream = response.getOutputStream(); +// response.setContentType("text/plain"); +// response.addHeader("Content-Disposition", "attachment; filename=" +// + bulkFile.getName()); +// response.setContentLength((int) bulkFile.length()); +// FileInputStream input = new FileInputStream(bulkFile); +// buf = new BufferedInputStream(input); +// int readBytes = 0; +// +// while ((readBytes = buf.read()) != -1) { +// stream.write(readBytes); +// } + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/authBulkIncr_STB.jsp").forward(request, response); + + } + else { + request.setAttribute("message", jsonStr); + request.getRequestDispatcher("/Deposit/authBulkIncr_STB.jsp").forward(request, response); + } + } + } + else{ + request.setAttribute("message", jsonStr); + request.getRequestDispatcher("/Deposit/authBulkIncr_STB.jsp").forward(request, response); + } + + } +//Added New for Viewing PAcs wise count of Txns for Bank Login + else if (action.equalsIgnoreCase("viewAccAuthSTB")) { + response.setContentType("application/json"); + PrintWriter out = response.getWriter(); + String jsonStr = bDao.viewBulkMarkAccountsAuth(pacsIdSTB); + out.print(jsonStr); + out.flush(); + } + else if (action.equalsIgnoreCase("viewAccAuthSTB_Exs")) { + response.setContentType("application/json"); + PrintWriter out = response.getWriter(); + String jsonStr = bDao.viewBulkMarkAccountsAuth_Exs(pacsIdSTB); + out.print(jsonStr); + out.flush(); + } + else if (action.equalsIgnoreCase("redirectBulkForm")) { + //String paccsId = request.getParameter("tempId2"); + String mType = "N"; + System.out.println("Pacs ID for click: "+paccsId); + request.setAttribute("messageSTB", paccsId); + request.setAttribute("markType", mType); + request.getRequestDispatcher("/Deposit/authBulkIncr_STB.jsp").forward(request, response); + } + else if (action.equalsIgnoreCase("redirectBulkForm_Exs")) { + // String paccsId = request.getParameter("tempId2"); + String mType = "E"; + System.out.println("Pacs ID for click: "+paccsId); + request.setAttribute("messageSTB", paccsId); + request.setAttribute("markType", mType); + request.getRequestDispatcher("/Deposit/authBulkIncr_STB.jsp").forward(request, response); + } +//End Changes + +// else if (action.equalsIgnoreCase("allTran")) +// { +// response.setContentType("application/json"); +// PrintWriter out = response.getWriter(); +// String jsonStr = wDao.getAllTranDetails(userId ,pacsId); +// out.print(jsonStr); +// out.flush(); +// } + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + + } finally { + System.out.println("Processing done."); + } + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} \ No newline at end of file diff --git a/IPKS_Updated/src/src/java/Controller/CBSAccountMappingServlet.java b/IPKS_Updated/src/src/java/Controller/CBSAccountMappingServlet.java new file mode 100644 index 0000000..b89d6fa --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/CBSAccountMappingServlet.java @@ -0,0 +1,80 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import Dao.CBSAccountMappingDao; +import DataEntryBean.ChequeDetailsBean; +import java.io.IOException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +public class CBSAccountMappingServlet extends HttpServlet{ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = (String)session.getAttribute("user"); + CBSAccountMappingDao aiDao = new CBSAccountMappingDao(); + String result = null; + + + try{ + + // String accNo = request.getParameter("accNo"); + // String newcbsAccount = request.getParameter("cbsAccount"); + // String newCheckOpt = request.getParameter("checkOption"); + // String newpin = request.getParameter("PIN"); + // String currAcc = request.getParameter("currAccount"); + result = aiDao.CBSAccountMappingProc(pacsId, tellerId, accNo, newcbsAccount, newCheckOpt, newpin, currAcc); + + request.setAttribute("message1", result); + // request.getRequestDispatcher("/Deposit/CBSAccountMapping.jsp").forward(request, response); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + request.setAttribute("message1", "Error occured. Please try again"); + // request.getRequestDispatcher("/Deposit/CBSAccountMapping.jsp").forward(request, response); + } finally { + request.getRequestDispatcher("/Deposit/CBSAccountMapping.jsp").forward(request, response); + } + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/CRARRiskMasterServlet.java b/IPKS_Updated/src/src/java/Controller/CRARRiskMasterServlet.java new file mode 100644 index 0000000..5e67ffe --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/CRARRiskMasterServlet.java @@ -0,0 +1,284 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.AssetEntryBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.sql.CallableStatement; +import java.sql.Statement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import java.lang.reflect.InvocationTargetException; + +/** + * + * @author Tcs Help desk122 + */ +public class CRARRiskMasterServlet extends HttpServlet { + + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + // String Action = request.getParameter("handle_id"); + // String checkOpt = request.getParameter("checkOption"); + + AssetEntryBean oAssetEntryBean = new AssetEntryBean(); + ArrayList alAssetEntryBean = new ArrayList(); + + try { + // BeanUtils.populate(oAssetEntryBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + System.out.println("Error occurred during processing."); + } + + if ("Create".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + String glcode = request.getParameter("glcode" + i); + + if (glcode != null) { + oAssetEntryBean = new AssetEntryBean(); + oAssetEntryBean.setGlcode(glcode); + //oAssetEntryBean.setDepRate(request.getParameter("depRate" + i)); + // oAssetEntryBean.setGlid(request.getParameter("glid" + i)); + // oAssetEntryBean.setRemarks(request.getParameter("remarks" + i)); + // oAssetEntryBean.setStatus(request.getParameter("status" + i)); + oAssetEntryBean.setId(request.getParameter("id" + i)); + // oAssetEntryBean.setComp1(request.getParameter("comp1" + i)); + //oAssetEntryBean.setComp2(request.getParameter("comp2" + i)); + alAssetEntryBean.add(oAssetEntryBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alAssetEntryBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call PARAMETER.upsert_crar_risk_master(?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alAssetEntryBean.size(); j++) { + + oAssetEntryBean = alAssetEntryBean.get(j); + proc.setString(1, pacsId); + proc.setString(2, oAssetEntryBean.getGlid()); + proc.setString(3, oAssetEntryBean.getComp1()); + proc.setString(4, oAssetEntryBean.getComp2()); + proc.setString(5, oAssetEntryBean.getDepRate()); + proc.setString(6, oAssetEntryBean.getRemarks()); + proc.setString(7, user); + proc.setString(8, Action); + proc.setString(9, oAssetEntryBean.getStatus()); + proc.registerOutParameter(10, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(10); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Asset_JSP/crarRiskMaster.jsp").forward(request, response); + + } else if ("Amend".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter2")); + + for (int i = 2; i <= counter; i++) { + try { + + String glcode = request.getParameter("glcode" + i); + + if (glcode != null) { + oAssetEntryBean = new AssetEntryBean(); + oAssetEntryBean.setAsset_type(glcode); + //oAssetEntryBean.setDepRate(request.getParameter("depRate" + i)); + //oAssetEntryBean.setGlid(request.getParameter("glid" + i)); + // oAssetEntryBean.setRemarks(request.getParameter("remarks" + i)); + // oAssetEntryBean.setStatus(request.getParameter("status" + i)); + oAssetEntryBean.setId(request.getParameter("id" + i)); + // oAssetEntryBean.setComp1(request.getParameter("comp1" + i)); + // oAssetEntryBean.setComp2(request.getParameter("comp2" + i)); + alAssetEntryBean.add(oAssetEntryBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alAssetEntryBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call PARAMETER.upsert_crar_risk_master(?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alAssetEntryBean.size(); j++) { + + oAssetEntryBean = alAssetEntryBean.get(j); + proc.setString(1, pacsId); + proc.setString(2, oAssetEntryBean.getGlid()); + proc.setString(3, oAssetEntryBean.getComp1()); + proc.setString(4, oAssetEntryBean.getComp2()); + proc.setString(5, oAssetEntryBean.getDepRate()); + proc.setString(6, oAssetEntryBean.getRemarks()); + proc.setString(7, user); + proc.setString(8, Action); + proc.setString(9, oAssetEntryBean.getStatus()); + proc.registerOutParameter(10, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(10); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Asset_JSP/crarRiskMaster.jsp").forward(request, response); + + } else if ("getDetails".equalsIgnoreCase(Action)) { + + ResultSet resultset = null; + Statement statement = null; + + Connection connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + try { + // resultset = statement.executeQuery(" select pacs_id, gl_class_code id, comp1, comp2, (select max(t.prod_name) from trial_balance_shadow t where t.pacs_id = r.pacs_id and t.ledger_dt = (select system_date - 1 from system_date) and substr(t.glcc, 9, 10) = r.gl_class_code) gl_name, rist_percentage, status from crar_risk_master r where r.pacs_id = '" + pacsId + "' "); + + while (resultset.next()) { + + oAssetEntryBean = new AssetEntryBean(); + oAssetEntryBean.setGlid(resultset.getString("id")); + oAssetEntryBean.setGlcode(resultset.getString("gl_name")); + oAssetEntryBean.setDepRate(resultset.getString("rist_percentage")); + oAssetEntryBean.setStatus(resultset.getString("status")); + oAssetEntryBean.setComp1(resultset.getString("comp1")); + oAssetEntryBean.setComp2(resultset.getString("comp2")); + + alAssetEntryBean.add(oAssetEntryBean); + request.setAttribute("displayFlag", "Y"); + } + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + statement.close(); + resultset.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + } + request.setAttribute("checkOption", checkOpt); + request.setAttribute("oAssetEntryBean", oAssetEntryBean); + request.setAttribute("arrAssetEntryBean", alAssetEntryBean); + request.getRequestDispatcher("/Asset_JSP/crarRiskMaster.jsp").forward(request, response); + } + } + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + } +} diff --git a/IPKS_Updated/src/src/java/Controller/CRARWorthMasterServlet.java b/IPKS_Updated/src/src/java/Controller/CRARWorthMasterServlet.java new file mode 100644 index 0000000..1dfab38 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/CRARWorthMasterServlet.java @@ -0,0 +1,279 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.AssetEntryBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.sql.CallableStatement; +import java.sql.Statement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import java.lang.reflect.InvocationTargetException; + +/** + * + * @author Tcs Help desk122 + */ +public class CRARWorthMasterServlet extends HttpServlet { + + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + //String Action = request.getParameter("handle_id"); + //String checkOpt = request.getParameter("checkOption"); + + AssetEntryBean oAssetEntryBean = new AssetEntryBean(); + ArrayList alAssetEntryBean = new ArrayList(); + + try { + // BeanUtils.populate(oAssetEntryBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + System.out.println("Error occurred during processing."); + } + + if ("Create".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + String glcode = request.getParameter("glcode" + i); + + if (glcode != null) { + oAssetEntryBean = new AssetEntryBean(); + oAssetEntryBean.setGlcode(glcode); + //oAssetEntryBean.setGlid(request.getParameter("glid" + i)); + //oAssetEntryBean.setRemarks(request.getParameter("remarks" + i)); + //oAssetEntryBean.setStatus(request.getParameter("status" + i)); + oAssetEntryBean.setId(request.getParameter("id" + i)); + // oAssetEntryBean.setComp1(request.getParameter("comp1" + i)); + // oAssetEntryBean.setComp2(request.getParameter("comp2" + i)); + alAssetEntryBean.add(oAssetEntryBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alAssetEntryBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call PARAMETER.upsert_crar_worth_master(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alAssetEntryBean.size(); j++) { + + oAssetEntryBean = alAssetEntryBean.get(j); + proc.setString(1, pacsId); + proc.setString(2, oAssetEntryBean.getGlid()); + proc.setString(3, oAssetEntryBean.getComp1()); + proc.setString(4, oAssetEntryBean.getComp2()); + proc.setString(5, oAssetEntryBean.getRemarks()); + proc.setString(6, user); + proc.setString(7, Action); + proc.setString(8, oAssetEntryBean.getStatus()); + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(9); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Asset_JSP/crarWorthMaster.jsp").forward(request, response); + + } else if ("Amend".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter2")); + + for (int i = 2; i <= counter; i++) { + try { + + String glcode = request.getParameter("glcode" + i); + + if (glcode != null) { + oAssetEntryBean = new AssetEntryBean(); + oAssetEntryBean.setAsset_type(glcode); + // oAssetEntryBean.setGlid(request.getParameter("glid" + i)); + // oAssetEntryBean.setRemarks(request.getParameter("remarks" + i)); + // oAssetEntryBean.setStatus(request.getParameter("status" + i)); + oAssetEntryBean.setId(request.getParameter("id" + i)); + //oAssetEntryBean.setComp1(request.getParameter("comp1" + i)); + //oAssetEntryBean.setComp2(request.getParameter("comp2" + i)); + alAssetEntryBean.add(oAssetEntryBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alAssetEntryBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call PARAMETER.upsert_crar_worth_master(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alAssetEntryBean.size(); j++) { + + oAssetEntryBean = alAssetEntryBean.get(j); + proc.setString(1, pacsId); + proc.setString(2, oAssetEntryBean.getGlid()); + proc.setString(3, oAssetEntryBean.getComp1()); + proc.setString(4, oAssetEntryBean.getComp2()); + proc.setString(5, oAssetEntryBean.getRemarks()); + proc.setString(6, user); + proc.setString(7, Action); + proc.setString(8, oAssetEntryBean.getStatus()); + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(9); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Asset_JSP/crarWorthMaster.jsp").forward(request, response); + + } else if ("getDetails".equalsIgnoreCase(Action)) { + + ResultSet resultset = null; + Statement statement = null; + + Connection connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + try { + //resultset = statement.executeQuery(" select pacs_id, gl_class_code id, comp1, comp2, (select max(t.prod_name) from trial_balance_shadow t where t.pacs_id = r.pacs_id and t.ledger_dt = (select system_date - 1 from system_date) and substr(t.glcc, 9, 10) = r.gl_class_code) gl_name, status from crar_worth_master r where r.pacs_id = '" + pacsId + "' "); + + while (resultset.next()) { + + oAssetEntryBean = new AssetEntryBean(); + oAssetEntryBean.setGlid(resultset.getString("id")); + oAssetEntryBean.setGlcode(resultset.getString("gl_name")); + oAssetEntryBean.setStatus(resultset.getString("status")); + oAssetEntryBean.setComp1(resultset.getString("comp1")); + oAssetEntryBean.setComp2(resultset.getString("comp2")); + + alAssetEntryBean.add(oAssetEntryBean); + request.setAttribute("displayFlag", "Y"); + } + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + statement.close(); + resultset.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + } + request.setAttribute("checkOption", checkOpt); + request.setAttribute("oAssetEntryBean", oAssetEntryBean); + request.setAttribute("arrAssetEntryBean", alAssetEntryBean); + request.getRequestDispatcher("/Asset_JSP/crarWorthMaster.jsp").forward(request, response); + } + } + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + } +} diff --git a/IPKS_Updated/src/src/java/Controller/CashDrawerEnquiryServlet.java b/IPKS_Updated/src/src/java/Controller/CashDrawerEnquiryServlet.java new file mode 100644 index 0000000..f1bd613 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/CashDrawerEnquiryServlet.java @@ -0,0 +1,283 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.commons.beanutils.BeanUtils; +import javax.servlet.http.HttpSession; + +/** + * + * @author Shubhrangshu + */ +public class CashDrawerEnquiryServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here. You may use following sample code. */ + out.println(""); + out.println(""); + out.println(""); + out.println("Servlet transactionOperationServlet"); + out.println(""); + out.println(""); + out.println("

Servlet transactionOperationServlet at " + request.getContextPath() + "

"); + out.println(""); + out.println(""); + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + + Connection connection = null; + CallableStatement proc = null; + + HttpSession session = request.getSession(); + ResultSet rs = null; + String pacsid = (String) session.getAttribute("pacsId"); + //String tellerid = (String) request.getParameter("tellerid"); + String adeno2000 = "0"; + String adeno500 = "0"; + String adeno200 = "0"; + String adeno100 = "0"; + String adeno50 = "0"; + String adeno20 = "0"; + String adeno10 = "0"; + String adeno5 = "0"; + String adeno2 = "0"; + String adeno1 = "0"; + String adeno50p = "0"; + String adeno1p = "0"; + + String odeno2000 = "0"; + String odeno500 = "0"; + String odeno200 = "0"; + String odeno100 = "0"; + String odeno50 = "0"; + String odeno20 = "0"; + String odeno10 = "0"; + String odeno5 = "0"; + String odeno2 = "0"; + String odeno1 = "0"; + String odeno50p = "0"; + String odeno1p = "0"; + + String Hdeno2000 = "0"; + String Hdeno500 = "0"; + String Hdeno200 = "0"; + String Hdeno100 = "0"; + String Hdeno50 = "0"; + String Hdeno20 = "0"; + String Hdeno10 = "0"; + String Hdeno5 = "0"; + String Hdeno2 = "0"; + String Hdeno1 = "0"; + String Hdeno50p = "0"; + String Hdeno1p = "0"; + + String open_bal = "0"; + String message = "0"; + String tellerName = ""; + String status = "Not Opened"; + int flag = 0; + + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + //rs = statement.executeQuery("select teller_id,pacs_id,status,nvl(deno_2000,0),nvl(deno_500,0),nvl(deno_100,0),nvl(deno_50,0),nvl(deno_20,0),nvl(deno_10,0),nvl(deno_5,0),nvl(deno_2,0),nvl(deno_1,0),nvl(OPEN_BALANCE,0),decode(status,'C','Closed','O','Open','Unknown Status'),nvl(DENO_50P,0),nvl(DENO_1P,0),nvl(deno_200,0) from cash_drawer where " + + "pacs_id='" + pacsid + "' and teller_id='" + tellerid + "' and entry_date = (select system_date from system_date)"); + + while (rs.next()) { + flag = 1; + adeno2000 = rs.getString(4); + adeno500 = rs.getString(5); + adeno100 = rs.getString(6); + adeno50 = rs.getString(7); + adeno20 = rs.getString(8); + adeno10 = rs.getString(9); + adeno5 = rs.getString(10); + adeno2 = rs.getString(11); + adeno1 = rs.getString(12); + open_bal = rs.getString(13); + status = rs.getString(14); + adeno50p = rs.getString(15); + adeno1p = rs.getString(16); + adeno200 = rs.getString(17); + } + if (flag == 0) { + message = "Drawer not yet opened for the teller"; + } else if (flag == 1) { + message = ""; + } + request.setAttribute("deno1", adeno1); + request.setAttribute("deno2", adeno2); + request.setAttribute("deno5", adeno5); + request.setAttribute("deno10", adeno10); + request.setAttribute("deno20", adeno20); + request.setAttribute("deno50", adeno50); + request.setAttribute("deno100", adeno100); + request.setAttribute("deno200", adeno200); + request.setAttribute("deno500", adeno500); + request.setAttribute("deno2000", adeno2000); + request.setAttribute("deno50p", adeno50p); + request.setAttribute("deno1p", adeno1p); + request.setAttribute("open_bal", open_bal); + request.setAttribute("status", status); + request.setAttribute("message", message); + + // rs = statement.executeQuery("select LOGIN_NAME,LOGIN_ID from login_details where " + + "login_id='" + tellerid + "'"); + while (rs.next()) { + tellerName = rs.getString(1); + } + request.setAttribute("tellerName", tellerName); + + //rs = statement.executeQuery("select pacs_id,source,destination,nvl(deno_2000,0),nvl(deno_500,0),nvl(deno_100,0),nvl(deno_50,0),nvl(deno_20,0),nvl(deno_10,0),nvl(deno_5,0),nvl(deno_2,0),nvl(deno_1,0),nvl(deno_50P,0),nvl(deno_1P,0),nvl(deno_200,0) from cash_movement_log where id=(select min(id) from cash_movement_log where source like 'R%' and destination like 'D%' and transaction_date = (select system_date from system_date) and pacs_id='" + + pacsid + "' and teller_to='" + tellerid + "' group by pacs_id,source,destination,transaction_date)"); + while (rs.next()) { + odeno2000 = rs.getString(4); + odeno500 = rs.getString(5); + odeno100 = rs.getString(6); + odeno50 = rs.getString(7); + odeno20 = rs.getString(8); + odeno10 = rs.getString(9); + odeno5 = rs.getString(10); + odeno2 = rs.getString(11); + odeno1 = rs.getString(12); + odeno50p = rs.getString(13); + odeno1p = rs.getString(14); + odeno200 = rs.getString(15); + } + request.setAttribute("odeno50p", odeno50p); + request.setAttribute("odeno1p", odeno1p); + request.setAttribute("odeno1", odeno1); + request.setAttribute("odeno2", odeno2); + request.setAttribute("odeno5", odeno5); + request.setAttribute("odeno10", odeno10); + request.setAttribute("odeno20", odeno20); + request.setAttribute("odeno50", odeno50); + request.setAttribute("odeno100", odeno100); + request.setAttribute("odeno200", odeno200); + request.setAttribute("odeno500", odeno500); + request.setAttribute("odeno2000", odeno2000); + + + // rs = statement.executeQuery("select nvl(sum(nvl(c.deno_2000_in,0) - nvl(c.deno_2000_out,0)),0) as Hdeno_2000,nvl(sum(nvl(c.deno_500_in,0) - nvl(c.deno_500_out,0)),0) as Hdeno_500 ,nvl(sum(nvl(c.deno_100_in,0) - nvl(c.deno_100_out,0)),0) as Hdeno_100 ,nvl(sum(nvl(c.deno_50_in,0) - nvl(c.deno_50_out,0)),0) as Hdeno_50 ,nvl(sum(nvl(c.deno_20_in,0) - nvl(c.deno_20_out,0)),0) as Hdeno_20,nvl(sum(nvl(c.deno_10_in,0) - nvl(c.deno_10_out,0)),0) as Hdeno_10 ,nvl(sum(nvl(c.deno_5_in,0) - nvl(c.deno_5_out,0)),0) as Hdeno_5 ,nvl(sum(nvl(c.deno_2_in,0) - nvl(c.deno_2_out,0)),0) as Hdeno_2,nvl(sum(nvl(c.deno_1_in,0) - nvl(c.deno_1_out,0)),0) as Hdeno_1,nvl(sum(nvl(c.deno_50p_in,0) - nvl(c.deno_50p_out,0)),0) as Hdeno_50p ,nvl(sum(nvl(c.deno_1p_in,0) - nvl(c.deno_1p_out,0)),0) as Hdeno_1p,nvl(sum(nvl(c.deno_200_in,0) - nvl(c.deno_200_out,0)),0) as Hdeno_200 from cash_txn_hist c where c.status='P' and c.pacs_id='" + pacsid + "' and c.teller_id='" + + tellerid + "'"); + while (rs.next()) { + Hdeno2000 = rs.getString(1); + Hdeno500 = rs.getString(2); + Hdeno100 = rs.getString(3); + Hdeno50 = rs.getString(4); + Hdeno20 = rs.getString(5); + Hdeno10 = rs.getString(6); + Hdeno5 = rs.getString(7); + Hdeno2 = rs.getString(8); + Hdeno1 = rs.getString(9); + Hdeno50p = rs.getString(10); + Hdeno1p = rs.getString(11); + Hdeno200 = rs.getString(12); + } + request.setAttribute("Hdeno2000", Hdeno2000); + request.setAttribute("Hdeno500", Hdeno500); + request.setAttribute("Hdeno200", Hdeno200); + request.setAttribute("Hdeno100", Hdeno100); + request.setAttribute("Hdeno50", Hdeno50); + request.setAttribute("Hdeno20", Hdeno20); + request.setAttribute("Hdeno10", Hdeno10); + request.setAttribute("Hdeno5", Hdeno5); + request.setAttribute("Hdeno2", Hdeno2); + request.setAttribute("Hdeno1", Hdeno1); + request.setAttribute("Hdeno50p", Hdeno50p); + request.setAttribute("Hdeno1p", Hdeno1p); + + // statement.close(); + // connection.close(); + + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + request.getRequestDispatcher("/Deposit/CashDrawerEnquiry.jsp").forward(request, response); + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/CashWidrawlDDSServlet.java b/IPKS_Updated/src/src/java/Controller/CashWidrawlDDSServlet.java new file mode 100644 index 0000000..506915d --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/CashWidrawlDDSServlet.java @@ -0,0 +1,135 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import Dao.CashWithdrawlDDSDao; +import Dao.MicroFileProcessingDao; +import DataEntryBean.MicroFileAccountDetBean; +import ServiceLayer.CashWithdrawlDDSService; +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +public class CashWidrawlDDSServlet extends HttpServlet { + + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = (String) session.getAttribute("user"); + String tellerName = (String) session.getAttribute("UserName"); + //String accNo = request.getParameter("accNoServer"); + //Double amount = Double.parseDouble(request.getParameter("amnt")); + //String tranType = request.getParameter("tranType"); + CashWithdrawlDDSDao ddsDao = new CashWithdrawlDDSDao(); + MicroFileAccountDetBean accountDet = new MicroFileAccountDetBean(); + CashWithdrawlDDSService ddsService = new CashWithdrawlDDSService(); + String result = null; + ServletOutputStream stream = null; + BufferedInputStream buf = null; + File pdfReceipt = null; + if (request.getSession().getAttribute("errorMessage") != null) { + request.getSession().removeAttribute("errorMessage"); + } + try { + + accountDet.setAccountCode(accNo); + accountDet.setAvailBal(Double.parseDouble(request.getParameter("balanceServer"))); + accountDet.setCrTotal(amount); + accountDet.setTxnType(tranType); + accountDet.setProdType(request.getParameter("accntType")); + accountDet.setMessage("FAILURE"); + + + result = ddsDao.CashDepositOperation(tellerId, pacsId, accNo, amount, tranType, accountDet); + + if (accountDet.getMessage().equalsIgnoreCase("SUCCESS")) { + ddsDao.getreciptDetailsFromDB(accountDet); + pdfReceipt = ddsService.createReceipt(accountDet, tellerId, tellerName); + + } + + if (pdfReceipt != null) { + stream = response.getOutputStream(); + // request.getSession().setAttribute("errorMessage", result); + //request.setAttribute("message", result); + response.setContentType("text/plain"); + response.addHeader("Content-Disposition", "attachment; filename=" + + "TransactionReciept.txt"); + response.setContentLength((int) pdfReceipt.length()); + FileInputStream input = new FileInputStream(pdfReceipt); + buf = new BufferedInputStream(input); + int readBytes = 0; + + while ((readBytes = buf.read()) != -1) { + stream.write(readBytes); + } + + + // request.setAttribute("message", result); + //request.getRequestDispatcher("/DDS/CashWidrawlDeposit.jsp").forward(request, response); + }else + { + if(accountDet.getMessage().equalsIgnoreCase("SUCCESS")){ + request.setAttribute("message", result + ".Error in generating receipt"); + request.getRequestDispatcher("/DDS/CashWidrawlDeposit.jsp").forward(request, response); + } + else + { + request.setAttribute("message", result); + request.getRequestDispatcher("/DDS/CashWidrawlDeposit.jsp").forward(request, response); + } + } + + + } catch (IOException ioe) { + // ioe.printStackTrace(); + System.out.println("Error occurred during processing."); + request.setAttribute("message", result+ ".Error in generating receipt"); + request.getRequestDispatcher("/DDS/CashWidrawlDeposit.jsp").forward(request, response); + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + request.setAttribute("message", "Request can not be processed."); + request.getRequestDispatcher("/DDS/CashWidrawlDeposit.jsp").forward(request, response); + } finally { + if (stream != null) { + stream.close(); + } + if (buf != null) { + buf.close(); + } + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/ChangeUserPasswordServlet.java b/IPKS_Updated/src/src/java/Controller/ChangeUserPasswordServlet.java new file mode 100644 index 0000000..bfc41c1 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/ChangeUserPasswordServlet.java @@ -0,0 +1,185 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import Dao.ChangeUserPasswordDao; +import LoginDb.SimpleCrypt; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +public class ChangeUserPasswordServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + ChangeUserPasswordDao cPwdDao = new ChangeUserPasswordDao(); + HttpSession session = request.getSession(false); + String newPass = SimpleCrypt.doEnrcypt(request.getParameter("newpass")); + String login_id = (String) session.getAttribute("user"); + String pacs_Id = (String) session.getAttribute("pacsId"); + int changePasswordFlag = 0; + if (login_id == null) { + //in case of sesssion out. + // response.sendRedirect("/Login.jsp"); + // (request.getRequestDispatcher("/Login.jsp")).forward(request, response); + System.out.println("LogOut completed1."); + request.setAttribute("error", "You have logged out successfully."); + (request.getRequestDispatcher("/Login.jsp")).forward(request, response); + return; + } + String prevPwdOld = null; + String prevPwd = null; + String currentPwd = null; + List passwordList = new ArrayList(); + try { + passwordList = cPwdDao.CheckPreviousPwd(login_id); + currentPwd = passwordList.get(0); + prevPwd = passwordList.get(1); + prevPwdOld = passwordList.get(2); + + //first time login case. all previous pwd entries are null. + if (prevPwd == null && prevPwdOld == null) { + if (!currentPwd.equalsIgnoreCase(newPass)) { + changePasswordFlag = cPwdDao.updateNewAndOldPwd(login_id, newPass, currentPwd, prevPwd, pacs_Id); + if (changePasswordFlag == 1) { + //request.setAttribute("error", "Your Password has been changed successfully.Try login with the new credential."); + // response.sendRedirect("/Login.jsp"); + session.removeAttribute("user"); + session.invalidate(); + System.out.println("LogOut completed2."); + request.setAttribute("error", "You have logged out successfully."); + (request.getRequestDispatcher("/Login.jsp")).forward(request, response); + + + } else { + request.setAttribute("error", "Password change unsuccesful.Please try again."); + request.getRequestDispatcher("/changePassword.jsp").forward(request, response); + } + } else { + changePasswordFlag = -999; + request.setAttribute("error", "New password can not be same as the last three passwords.Retry with different password."); + request.getRequestDispatcher("/changePassword.jsp").forward(request, response); + } + } //Second time login case. previous old pwd entry is null. + else if (prevPwd != null && prevPwdOld == null) { + if (!currentPwd.equalsIgnoreCase(newPass) && !prevPwd.equalsIgnoreCase(newPass)) { + changePasswordFlag = cPwdDao.updateNewAndOldPwd(login_id, newPass, currentPwd, prevPwd, pacs_Id); + if (changePasswordFlag != 0) { + // response.sendRedirect("/Login.jsp"); + //(request.getRequestDispatcher("/Login.jsp")).forward(request, response); + session.removeAttribute("user"); + session.invalidate(); + System.out.println("LogOut completed3."); + request.setAttribute("error", "You have logged out successfully."); + (request.getRequestDispatcher("/Login.jsp")).forward(request, response); + + } else { + request.setAttribute("error", "Password change unsuccesful.Please try again."); + request.getRequestDispatcher("/changePassword.jsp").forward(request, response); + } + } else { + changePasswordFlag = -999; + request.setAttribute("error", "New password can not be same as the last three passwords.Retry with different password."); + request.getRequestDispatcher("/changePassword.jsp").forward(request, response); + } + }//invalid case.should be cleaned up ffrom db + else if (prevPwd == null && prevPwdOld != null) { + changePasswordFlag = -998; + request.setAttribute("error", "Password reset structure problem.Please contact IPKS team."); + request.getRequestDispatcher("/changePassword.jsp").forward(request, response); + session.removeAttribute("user"); + session.invalidate(); + }//Optimal case.General case reset. + else { + //optimal case. Password validated for reset. + if (!currentPwd.equalsIgnoreCase(newPass) && !prevPwd.equalsIgnoreCase(newPass) && !prevPwdOld.equalsIgnoreCase(newPass)) { + changePasswordFlag = cPwdDao.updateNewAndOldPwd(login_id, newPass, currentPwd, prevPwd, pacs_Id); + if (changePasswordFlag != 0) { + // response.sendRedirect("/Login.jsp"); + // (request.getRequestDispatcher("/Login.jsp")).forward(request, response); + session.removeAttribute("user"); + session.invalidate(); + System.out.println("LogOut completed4."); + request.setAttribute("error", "You have logged out successfully."); + (request.getRequestDispatcher("/Login.jsp")).forward(request, response); + + } else { + request.setAttribute("error", "Password change unsuccesful.Please try again."); + request.getRequestDispatcher("/changePassword.jsp").forward(request, response); + } + }// new password is same with any of the last three passwords + else { + changePasswordFlag = -999; + request.setAttribute("error", "New password can not be same as the last three passwords.Retry with different password."); + request.getRequestDispatcher("/changePassword.jsp").forward(request, response); + } + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + request.setAttribute("error", "Password change unsuccesful.Please try again."); + request.getRequestDispatcher("/changePassword.jsp").forward(request, response); +// session.removeAttribute("user"); +// session.invalidate(); + } finally { + System.out.println("Password changed successfully."); + } + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/ChangeUserPasswordServlet_fflag.java b/IPKS_Updated/src/src/java/Controller/ChangeUserPasswordServlet_fflag.java new file mode 100644 index 0000000..0726b6c --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/ChangeUserPasswordServlet_fflag.java @@ -0,0 +1,185 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import Dao.ChangeUserPasswordDao; +import LoginDb.SimpleCrypt; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +public class ChangeUserPasswordServlet_fflag extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + ChangeUserPasswordDao cPwdDao = new ChangeUserPasswordDao(); + HttpSession session = request.getSession(false); + String newPass = SimpleCrypt.doEnrcypt(request.getParameter("newpass")); + String login_id = (String) session.getAttribute("user"); + String pacs_Id = (String) session.getAttribute("pacsId"); + int changePasswordFlag = 0; + if (login_id == null) { + //in case of sesssion out. + // response.sendRedirect("/Login.jsp"); + // (request.getRequestDispatcher("/Login.jsp")).forward(request, response); + System.out.println("LogOut completed1."); + request.setAttribute("error", "You have logged out successfully."); + (request.getRequestDispatcher("/Login.jsp")).forward(request, response); + return; + } + String prevPwdOld = null; + String prevPwd = null; + String currentPwd = null; + List passwordList = new ArrayList(); + try { + passwordList = cPwdDao.CheckPreviousPwd(login_id); + currentPwd = passwordList.get(0); + prevPwd = passwordList.get(1); + prevPwdOld = passwordList.get(2); + + //first time login case. all previous pwd entries are null. + if (prevPwd == null && prevPwdOld == null) { + if (!currentPwd.equalsIgnoreCase(newPass)) { + changePasswordFlag = cPwdDao.updateNewAndOldPwd(login_id, newPass, currentPwd, prevPwd, pacs_Id); + if (changePasswordFlag == 1) { + //request.setAttribute("error", "Your Password has been changed successfully.Try login with the new credential."); + // response.sendRedirect("/Login.jsp"); + session.removeAttribute("user"); + session.invalidate(); + System.out.println("LogOut completed2."); + request.setAttribute("error", "You have logged out successfully."); + (request.getRequestDispatcher("/Login.jsp")).forward(request, response); + + + } else { + request.setAttribute("error", "Password change unsuccesful.Please try again."); + request.getRequestDispatcher("/changePassword_fflag.jsp").forward(request, response); + } + } else { + changePasswordFlag = -999; + request.setAttribute("error", "New password can not be same as the last three passwords.Retry with different password."); + request.getRequestDispatcher("/changePassword_fflag.jsp").forward(request, response); + } + } //Second time login case. previous old pwd entry is null. + else if (prevPwd != null && prevPwdOld == null) { + if (!currentPwd.equalsIgnoreCase(newPass) && !prevPwd.equalsIgnoreCase(newPass)) { + changePasswordFlag = cPwdDao.updateNewAndOldPwd(login_id, newPass, currentPwd, prevPwd, pacs_Id); + if (changePasswordFlag != 0) { + // response.sendRedirect("/Login.jsp"); + //(request.getRequestDispatcher("/Login.jsp")).forward(request, response); + session.removeAttribute("user"); + session.invalidate(); + System.out.println("LogOut completed3."); + request.setAttribute("error", "You have logged out successfully."); + (request.getRequestDispatcher("/Login.jsp")).forward(request, response); + + } else { + request.setAttribute("error", "Password change unsuccesful.Please try again."); + request.getRequestDispatcher("/changePassword_fflag.jsp").forward(request, response); + } + } else { + changePasswordFlag = -999; + request.setAttribute("error", "New password can not be same as the last three passwords.Retry with different password."); + request.getRequestDispatcher("/changePassword_fflag.jsp").forward(request, response); + } + }//invalid case.should be cleaned up ffrom db + else if (prevPwd == null && prevPwdOld != null) { + changePasswordFlag = -998; + request.setAttribute("error", "Password reset structure problem.Please contact IPKS team."); + request.getRequestDispatcher("/changePassword_fflag.jsp").forward(request, response); + session.removeAttribute("user"); + session.invalidate(); + }//Optimal case.General case reset. + else { + //optimal case. Password validated for reset. + if (!currentPwd.equalsIgnoreCase(newPass) && !prevPwd.equalsIgnoreCase(newPass) && !prevPwdOld.equalsIgnoreCase(newPass)) { + changePasswordFlag = cPwdDao.updateNewAndOldPwd(login_id, newPass, currentPwd, prevPwd, pacs_Id); + if (changePasswordFlag != 0) { + // response.sendRedirect("/Login.jsp"); + // (request.getRequestDispatcher("/Login.jsp")).forward(request, response); + session.removeAttribute("user"); + session.invalidate(); + System.out.println("LogOut completed4."); + request.setAttribute("error", "You have logged out successfully."); + (request.getRequestDispatcher("/Login.jsp")).forward(request, response); + + } else { + request.setAttribute("error", "Password change unsuccesful.Please try again."); + request.getRequestDispatcher("/changePassword_fflag.jsp").forward(request, response); + } + }// new password is same with any of the last three passwords + else { + changePasswordFlag = -999; + request.setAttribute("error", "New password can not be same as the last three passwords.Retry with different password."); + request.getRequestDispatcher("/changePassword_fflag.jsp").forward(request, response); + } + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + request.setAttribute("error", "Password change unsuccesful.Please try again."); + request.getRequestDispatcher("/changePassword_fflag.jsp").forward(request, response); +// session.removeAttribute("user"); +// session.invalidate(); + } finally { + System.out.println("Password changed successfully."); + } + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/ChequePostingServlet.java b/IPKS_Updated/src/src/java/Controller/ChequePostingServlet.java new file mode 100644 index 0000000..8246988 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/ChequePostingServlet.java @@ -0,0 +1,130 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import Dao.ChequePostingDao; +import DataEntryBean.ChequeDetailsBean; +import java.io.IOException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +public class ChequePostingServlet extends HttpServlet{ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = (String)session.getAttribute("user"); + // String selectedTab = request.getParameter("selectedTab"); + ChequePostingDao cpDao = new ChequePostingDao(); + String result = null; + ArrayList allChequeList = null; + + try{ + if(selectedTab.equalsIgnoreCase("ChequePosting")){ + // String accNo = request.getParameter("accNo"); + //String chqDate = request.getParameter("chqDt"); + //String chqNo = request.getParameter("chqNo"); + // Double amount = Double.parseDouble(request.getParameter("chqAmt")); + //String chqbank = request.getParameter("chqBnk"); + result = cpDao.PostChequeProc(tellerId, pacsId, accNo, chqNo, chqDate, amount, chqbank); + + request.setAttribute("message1", result); + request.setAttribute("toggleTab", selectedTab); + request.getRequestDispatcher("/Deposit/ChequePosting.jsp").forward(request, response); + + } else if (selectedTab.equalsIgnoreCase("ChequeEnquiry")) { + // String accNoEnq = request.getParameter("accNoEnq"); + allChequeList = cpDao.getChequedetails(pacsId, accNoEnq); + if ( allChequeList !=null && allChequeList.size() > 0) { + request.setAttribute("allcheque", allChequeList); + request.setAttribute("accNo", accNoEnq); + request.setAttribute("toggleTab", selectedTab); + } + else + { + request.setAttribute("allcheque", null); + request.setAttribute("toggleTab", selectedTab); + request.setAttribute("message2", "No details found"); + } + + request.getRequestDispatcher("/Deposit/ChequePosting.jsp").forward(request, response); + + } else if (selectedTab.equalsIgnoreCase("ChequeEnquiryProcess")) { + String indicator = request.getParameter("indicator"); + //String accNoEnq = request.getParameter("accNoEnq"); + // String chqno = request.getParameter("ChqNO"+indicator); + Double comsn = 0.0; + //String commission = request.getParameter("commission"+indicator); + if(commission.isEmpty() || commission == null) + { + comsn = 0.0; + } + else + { + comsn = Double.valueOf(commission); + } + // String action = request.getParameter("action"+indicator); + // String narration = request.getParameter("narration"+indicator); + String result2 = cpDao.ProcessChequeProc(tellerId, pacsId, accNoEnq, chqno, comsn , action,narration); + + request.setAttribute("message2", result2); + request.setAttribute("toggleTab", "ChequeEnquiry"); + + request.getRequestDispatcher("/Deposit/ChequePosting.jsp").forward(request, response); + } + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + if (selectedTab.equalsIgnoreCase("CHEQUE ENQUIRY")) { + request.setAttribute("message2", "Request can not be processed."); + } else { + request.setAttribute("message1", "Request can not be processed."); + } +// request.setAttribute("toggleTab", selectedTab); +// request.getRequestDispatcher("/Deposit/ChequePosting.jsp").forward(request, response); + + } finally { + System.out.println("Processing done."); + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/ChequePostingServlet_old.java b/IPKS_Updated/src/src/java/Controller/ChequePostingServlet_old.java new file mode 100644 index 0000000..c8ae9b3 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/ChequePostingServlet_old.java @@ -0,0 +1,81 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import Dao.ChequePostingDao; +import DataEntryBean.MicroFileAccountDetBean; +import java.io.IOException; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +public class ChequePostingServlet_old extends HttpServlet{ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = (String)session.getAttribute("user"); + //String accNo = request.getParameter("accNo"); + //String chqDate = request.getParameter("chqDt"); + //String chqNo = request.getParameter("chqNo"); + // Double amount = Double.parseDouble(request.getParameter("chqAmt")); + // String chqbank = request.getParameter("chqBnk"); + ChequePostingDao cpDao = new ChequePostingDao(); + String result = null; + + + try{ + + result = cpDao.PostChequeProc(tellerId, pacsId, accNo, chqNo, chqDate, amount, chqbank); + + request.setAttribute("message", result); + request.getRequestDispatcher("/Deposit/ChequePosting.jsp").forward(request, response); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + request.setAttribute("message", "Request can not be processed."); + request.getRequestDispatcher("/Deposit/ChequePosting.jsp").forward(request, response); + + } finally { + System.out.println("Processing done."); + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/CifEntryServlet.java b/IPKS_Updated/src/src/java/Controller/CifEntryServlet.java new file mode 100644 index 0000000..6f82276 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/CifEntryServlet.java @@ -0,0 +1,195 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import DataEntryBean.*; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.SQLException; +import java.util.Enumeration; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.apache.commons.beanutils.*; +import org.apache.commons.logging.*; +import org.apache.commons.collections.*; +import java.sql.*; +import LoginDb.DbHandler; + + +/** + * + * @author SUBHAM + */ +public class CifEntryServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here. You may use following sample code. + out.println(""); + out.println(""); + out.println(""); + out.println("Servlet CifEntryServlet"); + out.println(""); + out.println(""); + out.println("

Servlet CifEntryServlet at " + request.getContextPath() + "

"); + out.println(""); + out.println("");*/ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + //Taking the servlet name from JSP + String ServletName=request.getParameter("action"); + + CustomerInfBean oCustomerInfBean=new CustomerInfBean(); + + if ("Search".equalsIgnoreCase(ServletName)) + + { + + try { + // BeanUtils.populate(oCustomerInfBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(CifEntryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(CifEntryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection =DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(CifEntryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + //look at " for table name + //ResultSet rs = statement.executeQuery("SELECT id,customer_type,title,first_name,middle_name,last_name,gurdian_name, mother_maiden_name, address_1, address_2, address_3, district, city_code, state_code, country, language_known, post_box_number, phone_no_home, phone_no_business, to_char(birth_date,'DD-MON-YYYY') as birth_date, gender, mobile_no, fax, nationality, domicile, occupancy, resident_status,marital_status FROM customer_information_details where id= '" + oCustomerInfBean.getCif() + "'"); + while (rs.next()) + { + + oCustomerInfBean.setCif(rs.getString("id")); + oCustomerInfBean.setCtype(rs.getString("customer_type")); + oCustomerInfBean.setTitle(rs.getString("title")); + oCustomerInfBean.setFname(rs.getString("first_name")); + oCustomerInfBean.setMname(rs.getString("middle_name")); + oCustomerInfBean.setCityname(rs.getString("city_code")); + oCustomerInfBean.setCountryname(rs.getString("country")); + oCustomerInfBean.setDistname(rs.getString("district")); + oCustomerInfBean.setDob(rs.getString("birth_date")); + oCustomerInfBean.setDomicile(rs.getString("domicile")); + oCustomerInfBean.setFax(rs.getString("fax")); + oCustomerInfBean.setFlatno(rs.getString("address_1")); + oCustomerInfBean.setFsname(rs.getString("gurdian_name")); + oCustomerInfBean.setGencode(rs.getString("gender")); + oCustomerInfBean.setLanguage(rs.getString("language_known")); + oCustomerInfBean.setLname(rs.getString("last_name")); + oCustomerInfBean.setLocalityname(rs.getString("address_3")); + oCustomerInfBean.setMob(rs.getString("mobile_no")); + oCustomerInfBean.setMstatus(rs.getString("marital_status")); + oCustomerInfBean.setMthname(rs.getString("mother_maiden_name")); + oCustomerInfBean.setNationality(rs.getString("nationality")); + oCustomerInfBean.setOccupation(rs.getString("occupancy")); + oCustomerInfBean.setPhbusiness(rs.getString("phone_no_business")); + oCustomerInfBean.setResstatus(rs.getString("resident_status")); + oCustomerInfBean.setPhhome(rs.getString("phone_no_home")); + oCustomerInfBean.setStatename(rs.getString("state_code")); + oCustomerInfBean.setStreetname(rs.getString("address_2")); + oCustomerInfBean.setTitle(rs.getString("title")); + oCustomerInfBean.setPostcode(rs.getString("post_box_number")); + + + } + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(CifEntryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + } + request.setAttribute("oCustomerInfBeanobj", oCustomerInfBean); + (request.getRequestDispatcher("/ShowCifDetails.jsp")).forward(request, response); + } + + + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/CloseCashDrawerServlet.java b/IPKS_Updated/src/src/java/Controller/CloseCashDrawerServlet.java new file mode 100644 index 0000000..3ea50f3 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/CloseCashDrawerServlet.java @@ -0,0 +1,125 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author Tcs Helpdesk10 + */ +public class CloseCashDrawerServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + Connection con = null; + CallableStatement proc = null; + String message = ""; + + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call close_cash_drawer(?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(AssetDisposalServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.setString(1,user); + proc.setString(2,pacsId); + + proc.registerOutParameter(3, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(3); + + } catch (SQLException ex) { + // Logger.getLogger(AssetDisposalServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(AssetDisposalServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/CashDrawerEnquiryTeller.jsp").forward(request, response); + + } + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/CommodityMasterServlet.java b/IPKS_Updated/src/src/java/Controller/CommodityMasterServlet.java new file mode 100644 index 0000000..3882ef3 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/CommodityMasterServlet.java @@ -0,0 +1,286 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.CommodityMasterBean; +//import LoginDb.DbHandler; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 1249241 + */ +public class CommodityMasterServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + + Connection con = null; + CallableStatement proc = null; + String message = ""; + + // String ServletName = request.getParameter("handle_id"); + + CommodityMasterBean oCommodityMasterBean = new CommodityMasterBean(); + // String commodityID = request.getParameter("CommodityIdAmend"); + if(commodityID == null) + { + commodityID=""; + } + + if ("Create".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oCommodityMasterBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(CommodityMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(CommodityMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call GPS_Operation.commodity_entry(?,?,?,?,?,?,?,?,?) }");//change as required + } catch (SQLException ex) { + // Logger.getLogger(CommodityMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oCommodityMasterBean.getItemType()); + proc.setString(2, oCommodityMasterBean.getItemDesc()); + proc.setString(3, oCommodityMasterBean.getSubType()); + proc.setString(4, oCommodityMasterBean.getSubtypeDesc()); + proc.setString(5, oCommodityMasterBean.getQtyUnit()); + proc.setString(6, oCommodityMasterBean.getPacsid()); + proc.setString(7, ServletName); + proc.setString(8, commodityID); + + + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + proc.execute(); + + // message = proc.getString(9); + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/GPS_JSP/CommodityMaster.jsp").forward(request, response); + + } + } else if ("Search".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oCommodityMasterBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(CommodityMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(CommodityMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + Connection connection = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(CommodityMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + + // ResultSet rs = statement.executeQuery("select ID,ITEM_TYPE,TYPE_DESC,ITEM_SUBTYPE,SUBTYPE_DESC,UNIT from GPS_COMMODITY_MASTER where ID= '" + commodityID + "'"); + + while (rs.next()) { + + oCommodityMasterBean.setCommodityId(rs.getString("ID")); + oCommodityMasterBean.setItemType(rs.getString("ITEM_TYPE")); + + oCommodityMasterBean.setItemDesc(rs.getString("TYPE_DESC")); + oCommodityMasterBean.setSubType(rs.getString("ITEM_SUBTYPE")); + oCommodityMasterBean.setSubtypeDesc(rs.getString("SUBTYPE_DESC")); + oCommodityMasterBean.setQtyUnit(rs.getString("UNIT")); + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + } + + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(CommodityMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + if (SeachFound == 0) { + message = "Item does not exists in the system"; + request.setAttribute("message", message); + } + request.setAttribute("oCommodityMasterBean", oCommodityMasterBean); + request.setAttribute("commodityID", commodityID); + + request.getRequestDispatcher("/GPS_JSP/CommodityMaster.jsp").forward(request, response); + + } else if ("Update".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oCommodityMasterBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(CommodityMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(CommodityMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call GPS_Operation.commodity_entry(?,?,?,?,?,?,?,?,?) }");// change as required + } catch (SQLException ex) { + // Logger.getLogger(CommodityMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oCommodityMasterBean.getItemType_Amend()); + proc.setString(2, oCommodityMasterBean.getItemDesc_Amend()); + proc.setString(3, oCommodityMasterBean.getSubtypeAmend()); + proc.setString(4, oCommodityMasterBean.getSubtypeDescAmend()); + proc.setString(5, oCommodityMasterBean.getQtyUnitAmend()); + proc.setString(6, oCommodityMasterBean.getPacsid()); + proc.setString(7, ServletName); + proc.setString(8, commodityID); + + + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(9); + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/GPS_JSP/CommodityMaster.jsp").forward(request, response); + + } + + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/CropLoanDisbursementServlet.java b/IPKS_Updated/src/src/java/Controller/CropLoanDisbursementServlet.java new file mode 100644 index 0000000..54ca008 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/CropLoanDisbursementServlet.java @@ -0,0 +1,138 @@ +package Controller; + +import ServiceLayer.MicrofileProcessingService; +import java.util.Properties; +import java.io.InputStream; +import java.io.IOException; +import java.sql.*; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import javax.servlet.http.HttpServlet; +import org.apache.commons.fileupload.servlet.ServletFileUpload; +import LoginDb.DbHandler; +import com.jcraft.jsch.ChannelSftp; +import com.jcraft.jsch.JSch; +import com.jcraft.jsch.Session; +import com.jcraft.jsch.SftpException; +import com.jcraft.jsch.JSchException; +import java.io.File; + +public class CropLoanDisbursementServlet extends HttpServlet { + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + } + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + HttpSession session = request.getSession(false); + MicrofileProcessingService service = new MicrofileProcessingService(); + String filePath = null; + String fileName = null; + Session ssn = null; + JSch jsch = new JSch(); + ChannelSftp sftpChannel = null; + java.sql.Connection cn = null; + PreparedStatement ps = null; + Statement st = null; + ResultSet rs = null; + java.sql.Date SYSTEM_DATE = null; + + if (request.getSession().getAttribute("errorMessageSAL") != null) { + request.getSession().removeAttribute("errorMessageSAL"); + } + if (request.getSession().getAttribute("successMessageSAL") != null) { + request.getSession().removeAttribute("errorMessageSAL"); + } + + try { + if (ServletFileUpload.isMultipartContent(request)) { + filePath = service.uploadTxtToServer(request); + System.out.println(filePath); + //fileName = filePath.substring(filePath.lastIndexOf("\\") + 1); //for test + fileName = filePath.substring(filePath.lastIndexOf("/") + 1); //for production + System.out.println("File name after substring is :"+fileName); + } + + ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); + InputStream input = classLoader.getResourceAsStream("Dao/CL_Disbursement_Vidyasagar.properties"); + System.out.println("ConfigFile read successfully"); + Properties properties = new Properties(); + properties.load(input); + + System.out.println("Going to send file to Job Server via SSH"); + System.out.println("Creating SSH Session: user@host:port |--->" + properties.getProperty("REMOTE_USER") + "@" + properties.getProperty("REMOTE_HOST") + ":" + Integer.parseInt(properties.getProperty("REMOTE_PORT"))); + ssn = jsch.getSession(properties.getProperty("REMOTE_USER"), properties.getProperty("REMOTE_HOST"), Integer.parseInt(properties.getProperty("REMOTE_PORT"))); + ssn.setPassword(properties.getProperty("REMOTE_PASS")); + Properties config = new Properties(); + config.put("StrictHostKeyChecking", "no"); + ssn.setConfig(config); + System.out.println("Establishing Connection..."); + ssn.connect(); + System.out.println("Connection established."); + + System.out.println("Creating SFTP Channel."); + sftpChannel = (ChannelSftp) ssn.openChannel("sftp"); + sftpChannel.connect(); + System.out.println("SFTP Channel created."); + + try { + sftpChannel.cd(properties.getProperty("REMOTE_FOLDER_PATH")); // changing directory + System.out.println("Current directory is : " + sftpChannel.pwd()); + System.out.println("The file to be pushed is : " + fileName); + + sftpChannel.put(properties.getProperty("TEMP_FOLDER_PATH") + fileName, fileName); + System.out.println("File copied to job server Successfully."); + File myObj = new File("/home/ec2-user/VCCB_Temp/"+fileName); //deletes the file from local + myObj.delete(); + System.out.println("Deleted the file: " + myObj.getName()+" from local"); + + cn = DbHandler.getDBConnection(); + if (cn != null) { + System.out.println("DB Connected.."); + + st = cn.createStatement(); + rs = st.executeQuery("SELECT SYSTEM_DATE from SYSTEM_DATE"); + while (rs.next()) { + SYSTEM_DATE = rs.getDate("SYSTEM_DATE"); + } + + ps = cn.prepareStatement("insert into VCCB_CROP_LOAN_SAL_LOG (SOURCE_FILE_NAME, UPLOAD_DATE, BNK_CODE, STATUS) values (?,?,?,?) "); + ps.setString(1, fileName); + ps.setDate(2, SYSTEM_DATE); + ps.setString(3, "0020"); + ps.setString(4, "N"); + ps.executeQuery(); + } + } catch (SftpException ex) { + //ex.printStackTrace(); + System.out.println("File could not be pushed to desried directory"); + } catch (SQLException ee) { + //ee.printStackTrace(); + System.out.println("Data could not be inserted to table"); + } finally { + st.close(); + rs.close(); + ps.close(); + } + request.getSession().setAttribute("successMessageSAL", "File Uploaded Successfully"); + + } catch (Exception e) { + e.printStackTrace(); + System.out.println("Error occurred during processing."); + request.getSession().setAttribute("errorMessageSAL", "Request can not be processed"); + } finally { + System.out.println("Servlet processing done."); + // response.sendRedirect(request.getHeader("Referer")); + } + + } + + @Override + public String getServletInfo() { + return "Short description"; + } +} diff --git a/IPKS_Updated/src/src/java/Controller/DepositAccountCreationServlet.java b/IPKS_Updated/src/src/java/Controller/DepositAccountCreationServlet.java new file mode 100644 index 0000000..170175d --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/DepositAccountCreationServlet.java @@ -0,0 +1,192 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.DepositAccountCreationBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author Tcs Helpdesk10 + */ +public class DepositAccountCreationServlet extends HttpServlet { + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + String sysDt = ""; + // String ODlimit = request.getParameter("ODlimit").isEmpty() ? "0" : (request.getParameter("ODlimit")); + + //String ServletName = request.getParameter("handle_id"); + DepositAccountCreationBean oDepositAccountCreationBean = new DepositAccountCreationBean(); + try { + // BeanUtils.populate(oDepositAccountCreationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + connection = DbHandler.getDBConnection(); + statement = connection.createStatement(); + rs = statement.executeQuery("select to_char(SYSTEM_DATE,'dd/mm/yyyy') from system_date"); + while (rs.next()) { + sysDt = rs.getString(1); + } + statement.close(); + connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call operations.account_opening_authorization(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, pacsId); + proc.setString(2, oDepositAccountCreationBean.getProductCode()); + proc.setString(3, oDepositAccountCreationBean.getInttCategory()); + proc.setString(4, oDepositAccountCreationBean.getCifNumber()); + proc.setString(5, oDepositAccountCreationBean.getCustomerType()); + proc.setString(6, null); + proc.setString(7, null); + proc.setString(8, null); + proc.setString(9, null); + proc.setString(10, null); + proc.setString(11, null); + proc.setString(12, null); + proc.setString(13, user); + proc.setString(14, oDepositAccountCreationBean.getSegmentCode()); + proc.setString(15, null); + + proc.setString(16, oDepositAccountCreationBean.getActivityCode()); + proc.setString(17, null); + proc.setString(18, sysDt); + proc.setString(19, ODlimit); + proc.setString(20, oDepositAccountCreationBean.getInttrepmethod()); + proc.setString(21, oDepositAccountCreationBean.getIntttransacc()); + proc.setString(22, oDepositAccountCreationBean.getTermValue()); + proc.setString(23, oDepositAccountCreationBean.getTermYears()); + proc.setString(24, oDepositAccountCreationBean.getTermMonth()); + proc.setString(25, oDepositAccountCreationBean.getTermDays()); + proc.setString(26, oDepositAccountCreationBean.getInstAmt()); + proc.registerOutParameter(27, java.sql.Types.VARCHAR); + proc.registerOutParameter(28, java.sql.Types.VARCHAR); + proc.setInt(29, 0); + proc.setInt(30, 0); + proc.setInt(31, 0); + proc.setInt(32, 0); + proc.setString(33, oDepositAccountCreationBean.getMemberno()); + //proc.setString(34, oDepositAccountCreationBean.getCifNumber2()); + //Change By Bitan for Multiple CIFS + proc.setString(34, oDepositAccountCreationBean.getJt_cifNumber1()); + proc.setString(35, oDepositAccountCreationBean.getNominee()); + proc.setString(36, oDepositAccountCreationBean.getJt_cifNumber2()); + proc.setString(37, oDepositAccountCreationBean.getJt_cifNumber3()); + proc.setString(38, oDepositAccountCreationBean.getJt_cifNumber4()); + proc.setString(39, oDepositAccountCreationBean.getJt_cifNumber5()); + proc.setString(40, oDepositAccountCreationBean.getJt_cifNumber6()); + proc.setString(41, oDepositAccountCreationBean.getJt_cifNumber7()); + proc.setString(42, oDepositAccountCreationBean.getJt_cifNumber8()); + proc.setString(43, oDepositAccountCreationBean.getJt_cifNumber9()); + proc.setString(44, oDepositAccountCreationBean.getJt_cifNumber10()); + proc.setString(45, oDepositAccountCreationBean.getIntRate()); + proc.setString(46, oDepositAccountCreationBean.getPenIntRate()); + + proc.execute(); + + // message = proc.getString(28); + + } catch (SQLException ex) { + // Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/DepositAccountCreation.jsp").forward(request, response); + + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/DepositGlTransactionServlet.java b/IPKS_Updated/src/src/java/Controller/DepositGlTransactionServlet.java new file mode 100644 index 0000000..205fc35 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/DepositGlTransactionServlet.java @@ -0,0 +1,354 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.DepositTransferBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.commons.beanutils.BeanUtils; +import javax.servlet.http.HttpSession; + +/** + * + * @author 393097 + */ +public class DepositGlTransactionServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet DepositGlTransactionServlet"); + out.println(""); + out.println(""); + out.println("

Servlet DepositGlTransactionServlet at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + Connection con = null; + CallableStatement proc = null; + String message = ""; + //String Account_type = ""; + String JSP = ""; + HttpSession session = request.getSession(); + JSP = request.getParameter("screenName") == null ? "" : (request.getParameter("screenName")); + DepositTransferBean oDepositTransferBean = new DepositTransferBean(); + + try { + // BeanUtils.populate(oDepositTransferBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(DepositGlTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(DepositGlTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + if (oDepositTransferBean.getCheckOption().equalsIgnoreCase("d2d")) { + + try { + con = DbHandler.getDBConnection(); + try { + + proc = con.prepareCall("{ call POST_transfer_txn(?,?,?,?,?,?,?,?,?,?) }"); + + } catch (SQLException ex) { + // Logger.getLogger(DepositGlTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + String pacsId = session.getAttribute("pacsId").toString(); + String makerId = session.getAttribute("user").toString(); + + proc.setString(1, pacsId); + proc.setString(2, makerId); + proc.setString(3, oDepositTransferBean.getTranType()); + proc.setString(4, oDepositTransferBean.getAccNo_dd_from()); + proc.setString(6, oDepositTransferBean.getTrAmount()); + proc.setString(7, oDepositTransferBean.getNarration()); + proc.setString(5, oDepositTransferBean.getAccNo_dd_to()); + proc.setString(8, oDepositTransferBean.getCheckOption()); + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + proc.registerOutParameter(10, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(10); + + + } catch (SQLException ex) { + // Logger.getLogger(DepositGlTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositGlTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + } else if (oDepositTransferBean.getCheckOption().equalsIgnoreCase("g2g")) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call POST_transfer_txn(?,?,?,?,?,?,?,?,?,?) }"); + + } catch (SQLException ex) { + // Logger.getLogger(DepositGlTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + String pacsId = session.getAttribute("pacsId").toString(); + String makerId = session.getAttribute("user").toString(); + + proc.setString(1, pacsId); + proc.setString(2, makerId); + proc.setString(3, oDepositTransferBean.getTranType()); + proc.setString(4, oDepositTransferBean.getAccNo_gg_from()); + proc.setString(6, oDepositTransferBean.getTrAmount()); + proc.setString(7, oDepositTransferBean.getNarration()); + proc.setString(5, oDepositTransferBean.getAccNo_gg_to()); + proc.setString(8, oDepositTransferBean.getCheckOption()); + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + proc.registerOutParameter(10, java.sql.Types.VARCHAR); + + proc.execute(); + + //message = proc.getString(10); + + + } catch (SQLException ex) { + // Logger.getLogger(DepositGlTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositGlTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + } else if (oDepositTransferBean.getCheckOption().equalsIgnoreCase("d2g")) { + + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call POST_transfer_txn(?,?,?,?,?,?,?,?,?,?) }"); + + } catch (SQLException ex) { + // Logger.getLogger(DepositGlTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + String pacsId = session.getAttribute("pacsId").toString(); + String makerId = session.getAttribute("user").toString(); + + proc.setString(1, pacsId); + proc.setString(2, makerId); + proc.setString(3, oDepositTransferBean.getTranType()); + proc.setString(4, oDepositTransferBean.getAccNo()); + proc.setString(6, oDepositTransferBean.getTrAmount()); + proc.setString(7, oDepositTransferBean.getNarration()); + proc.setString(5, oDepositTransferBean.getGl_accNo()); + proc.setString(8, oDepositTransferBean.getCheckOption()); + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + proc.registerOutParameter(10, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(10); + + + } catch (SQLException ex) { + // Logger.getLogger(DepositGlTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositGlTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + } + + } + else if(oDepositTransferBean.getCheckOption().equalsIgnoreCase("g2c")){ + try{ + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call POST_transfer_txn_modified(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + + } catch (SQLException ex) { + // Logger.getLogger(DepositGlTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + String pacsId = session.getAttribute("pacsId").toString(); + String makerId = session.getAttribute("user").toString(); + + // String twothouIN = (String) request.getParameter("twothouIN") == "" ? "0" : (request.getParameter("twothouIN")); + // String twothouOUT = request.getParameter("twothouOUT") == "" ? "0" : (request.getParameter("twothouOUT")); + //String fivehundredIN = request.getParameter("fivehundredIN") == "" ? "0" : (request.getParameter("fivehundredIN")); + //String fivehundredOUT = request.getParameter("fivehundredOUT") == "" ? "0" : (request.getParameter("fivehundredOUT")); + //String hundredIN = request.getParameter("hundredIN") == "" ? "0" : (request.getParameter("hundredIN")); + //String hundredOUT = request.getParameter("hundredOUT") == "" ? "0" : (request.getParameter("hundredOUT")); + // String fiftyIN = request.getParameter("fiftyIN") == "" ? "0" : (request.getParameter("fiftyIN")); + // String fiftyOUT = request.getParameter("fiftyOUT") == "" ? "0" : (request.getParameter("fiftyOUT")); + // String twentyIN = request.getParameter("twentyIN") == "" ? "0" : (request.getParameter("twentyIN")); + //String twentyOUT = request.getParameter("twentyOUT") == "" ? "0" : (request.getParameter("twentyOUT")); + // String tenIN = request.getParameter("tenIN") == "" ? "0" : (request.getParameter("tenIN")); + // String tenOUT = request.getParameter("tenOUT") == "" ? "0" : (request.getParameter("tenOUT")); + // String fiveIN = request.getParameter("fiveIN") == "" ? "0" : (request.getParameter("fiveIN")); + // String fiveOUT = request.getParameter("fiveOUT") == "" ? "0" : (request.getParameter("fiveOUT")); + // String twoIN = request.getParameter("twoIN") == "" ? "0" : (request.getParameter("twoIN")); + // String twoOUT = request.getParameter("twoOUT") == "" ? "0" : (request.getParameter("twoOUT")); + // String oneIN = request.getParameter("oneIN") == "" ? "0" : (request.getParameter("oneIN")); + // String oneOUT = request.getParameter("oneOUT") == "" ? "0" : (request.getParameter("oneOUT")); + //String fiftyPaisaIN = request.getParameter("fiftyPaisaIN") == "" ? "0" : (request.getParameter("fiftyPaisaIN")); + //String fiftyPaisaOUT = request.getParameter("fiftyPaisaOUT") == "" ? "0" : (request.getParameter("fiftyPaisaOUT")); + //String onePaisaIN = request.getParameter("onePaisaIN") == "" ? "0" : (request.getParameter("onePaisaIN")); + //String onePaisaOUT = request.getParameter("onePaisaOUT") == "" ? "0" : (request.getParameter("onePaisaOUT")); + //String twohundredIN = request.getParameter("twohundredIN") == "" ? "0" : (request.getParameter("twohundredIN")); + //String twohundredOUT = request.getParameter("twohundredOUT") == "" ? "0" : (request.getParameter("twohundredOUT")); + + + proc.setString(1, pacsId); + proc.setString(2, makerId); + proc.setString(3, oDepositTransferBean.getTranType()); + proc.setString(4, oDepositTransferBean.getAccNo_gg_from()); + proc.setString(5, oDepositTransferBean.getAcc_gl_to_cash()); + proc.setString(6, oDepositTransferBean.getG2ctrAmount()); + proc.setString(7, oDepositTransferBean.getNarration()); + proc.setString(8, oDepositTransferBean.getCheckOption()); + proc.setString(9, twothouIN); + proc.setString(10, fivehundredIN); + proc.setString(11, hundredIN); + proc.setString(12, fiftyIN); + proc.setString(13, twentyIN); + proc.setString(14, tenIN); + proc.setString(15, fiveIN); + proc.setString(16, twoIN); + proc.setString(17, oneIN); + proc.setString(18, fiftyPaisaIN); + proc.setString(19, onePaisaIN); + proc.setString(20, twothouOUT); + proc.setString(21, fivehundredOUT); + proc.setString(22, hundredOUT); + proc.setString(23, fiftyOUT); + proc.setString(24, twentyOUT); + proc.setString(25, tenOUT); + proc.setString(26, fiveOUT); + proc.setString(27, twoOUT); + proc.setString(28, oneOUT); + proc.setString(29, fiftyPaisaOUT); + proc.setString(30, onePaisaOUT); + + proc.registerOutParameter(31, java.sql.Types.VARCHAR); + proc.registerOutParameter(32, java.sql.Types.VARCHAR); + proc.setString(33, twohundredIN); + proc.setString(34, twohundredOUT); + + proc.execute(); + + //message = proc.getString(32); + } catch (SQLException ex) { + // Logger.getLogger(DepositGlTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositGlTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + } + + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/DepositTransferOperation.jsp").forward(request, response); + + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + } +}// + diff --git a/IPKS_Updated/src/src/java/Controller/DepositKYCCreationServlet.java b/IPKS_Updated/src/src/java/Controller/DepositKYCCreationServlet.java new file mode 100644 index 0000000..8d43ecf --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/DepositKYCCreationServlet.java @@ -0,0 +1,1012 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.DepositKYCCreationHdrBean; +import DataEntryBean.DepositKYCCreationDetailBean; +import LoginDb.DbHandler; +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.BatchUpdateException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import java.sql.Statement; +import java.util.Arrays; +import java.util.StringTokenizer; +import javax.servlet.ServletContext; + +/** + * + * @author TCS + */ +public class DepositKYCCreationServlet extends HttpServlet { + + private boolean isMultipart; + private int maxFileSize = 5000 * 1024; + private int maxMemSize = 4 * 1024; + private String uploadPathMain; + private String uploadPath; + private File file; + private int fileUpload = 0; + private File renameFile; + private boolean t; + + /** + * stmtesses requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void stmtessRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + stmtessRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection con = null; + Connection con1 = null; + CallableStatement stmt = null; + ResultSet rs = null; + int SeachFound = 0; + String message = ""; + String hdrId = ""; + String PhotouploadedFlag = ""; + String scanImg = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + //String handle_id = request.getParameter("handle_id"); + //String cifNumber = request.getParameter("cifNumber"); + String message2 = ""; + String lastPhotoName = (String) session.getAttribute("lastPhotoName"); + String sigPhotoName = (String) session.getAttribute("sigPhotoName"); + ArrayList upldFile = null; + if (session.getAttribute("upldFile") == null) { + upldFile = new ArrayList(Arrays.asList("", + "", "", "", "", "", "", "", "", "")); + } else { + upldFile = (ArrayList) session.getAttribute("upldFile"); + } + if (lastPhotoName == null) { + lastPhotoName = ""; + } + if (sigPhotoName == null) { + sigPhotoName = ""; + } + //String photpath = ""; + + DepositKYCCreationHdrBean oDepositKYCCreationBean = new DepositKYCCreationHdrBean(); + DepositKYCCreationDetailBean oDepositKYCCreationDetailBean = new DepositKYCCreationDetailBean(); + ArrayList alDepositKYCCreationDetailBean = new ArrayList(); + + //For Update + + ArrayList alDepositKYCCreationDetailBeanNew = new ArrayList(); + ArrayList alDepositKYCCreationDetailBeanUpdated = new ArrayList(); + ArrayList alDepositKYCCreationDetailBeanDeleted = new ArrayList(); + + + BatchExecutionFailedOperation BatchExecutionFailedOperationObject = new BatchExecutionFailedOperation(); + boolean SuccessFlag; + + + try { + // BeanUtils.populate(oDepositKYCCreationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + // BeanUtils.populate(oDepositKYCCreationDetailBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + + + if ("Create".equalsIgnoreCase(handle_id)) { + + + ServletContext servletContext = getServletContext(); + //uploadPathMain = servletContext.getRealPath(File.separator); + uploadPath = uploadPathMain + "/" + "UploadedFiles"; + File destinationDir = new File(uploadPath); + String a; + + if (!destinationDir.exists()) { + destinationDir.mkdir(); + } + + + + //File oldfile = new File(uploadPath + File.separator + oDepositKYCCreationBean.getFile() + ".jpg"); + + //oldPhotoName = oDepositKYCCreationBean.getFile(); + //System.out.println(oldPhotoName); + //START HEADER PART + try { + + con = DbHandler.getDBConnection(); + try { + + stmt = con.prepareCall("{ call Operations.kyc_Deposit_hdr(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + a = oDepositKYCCreationBean.getSigUpld(); + stmt.setString(1, oDepositKYCCreationBean.getcType()); + + stmt.setString(2, oDepositKYCCreationBean.getTitle()); + stmt.setString(3, oDepositKYCCreationBean.getfName()); + stmt.setString(4, oDepositKYCCreationBean.getmName()); + stmt.setString(5, oDepositKYCCreationBean.getlName()); + stmt.setString(6, oDepositKYCCreationBean.getgName()); + stmt.setString(7, oDepositKYCCreationBean.getAdd1()); + stmt.setString(8, oDepositKYCCreationBean.getAdd2()); + stmt.setString(9, oDepositKYCCreationBean.getAdd3()); + stmt.setString(10, oDepositKYCCreationBean.getDistname()); + stmt.setString(11, oDepositKYCCreationBean.getCity()); + stmt.setString(12, oDepositKYCCreationBean.getStatename()); + stmt.setString(13, oDepositKYCCreationBean.getDob()); + stmt.setString(14, oDepositKYCCreationBean.getGender()); + stmt.setString(15, oDepositKYCCreationBean.getmNumber()); + stmt.setString(16, oDepositKYCCreationBean.getBlock()); + stmt.setString(17, oDepositKYCCreationBean.getCif()); + stmt.setString(18, handle_id); + stmt.setString(19, pacsId); + stmt.setString(20, oDepositKYCCreationBean.getFile()); + stmt.registerOutParameter(21, java.sql.Types.VARCHAR); + stmt.setString(22, oDepositKYCCreationBean.getSigUpld()); + stmt.setString(23, oDepositKYCCreationBean.getReligion()); + stmt.setString(24, oDepositKYCCreationBean.getCaste()); + stmt.setString(25, oDepositKYCCreationBean.getMem_no()); + stmt.setString(26, oDepositKYCCreationBean.getFarmerType()); + stmt.setString(27, oDepositKYCCreationBean.getEmailId()); + stmt.setString(28, user); + stmt.setString(29, oDepositKYCCreationBean.getBankCIF()); + stmt.setString(30, oDepositKYCCreationBean.getLstatus()); + stmt.setString(31, oDepositKYCCreationBean.getDoDeath()); + stmt.setString(32, oDepositKYCCreationBean.getMotherName()); + stmt.setString(33, oDepositKYCCreationBean.getPin()); + stmt.setString(34, oDepositKYCCreationBean.getWard()); // Added as a part of member share report + stmt.execute(); + + // message = stmt.getString(21); + message2 = stmt.getString(21); + hdrId = (message.split("#")[1]).trim(); + + + if (!lastPhotoName.isEmpty()) { + File f = null; + File f1 = null; + try { + // create new File objects + f = new File(uploadPath + File.separator + lastPhotoName); + f1 = new File(uploadPath + File.separator + hdrId + ".jpg"); + + // rename file + t = f.renameTo(f1); + } catch (Exception e) { + // if any error occurs + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } + } + + //For Signature + if (!sigPhotoName.isEmpty()) { + File f = null; + File f1 = null; + try { + // create new File objects + f = new File(uploadPath + File.separator + sigPhotoName); + f1 = new File(uploadPath + File.separator + "sig-" + hdrId + ".jpg"); + + // rename file + t = f.renameTo(f1); + } catch (Exception e) { + // if any error occurs + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } + } + session.setAttribute("lastPhotoName", ""); + session.setAttribute("sigPhotoName", ""); + //File newfile = new File(uploadPath + File.separator + hdrId + ".jpg"); + //oldfile.renameTo(newfile); + //new File(uploadPath + File.separator + oDepositKYCCreationBean.getFile() + ".jpg").renameTo(new File(uploadPath + File.separator + hdrId + ".jpg")); + + } catch (SQLException ex) { +// try { +// // con.rollback(); +// } catch (Exception ex1) { +// // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); +// System.out.println("Error occurred during processing."); +// } + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + message="Error occured in KYC Creation."; + System.out.println("Error occurred during processing."); + } finally { + try { + stmt.close(); + } catch (SQLException e) { + System.out.println("Error occurred during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + } + if(message=="Error occured in KYC Creation.") { + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/DepositKYCCreation.jsp").forward(request, response); + } + //END HEADER PART + //START DETAIL PART + + if (!hdrId.equalsIgnoreCase("")) { + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + // String document_mst_id = request.getParameter("document_mst_id" + i); + // String idNumber = request.getParameter("idNumber" + i); + // String idIssueAt = request.getParameter("idIssueAt" + i); + // String idIssueDate = request.getParameter("idIssueDate" + i); + String upldFlag = request.getParameter("upldFlag" + i); + + if (upldFlag.equalsIgnoreCase("1")) { + scanImg = hdrId + "_" + document_mst_id.substring(document_mst_id.length() - 2) + ".jpg"; + //For ID Scan Image + if (!upldFile.isEmpty()) { + File f = null; + File f1 = null; + try { + // create new File objects + f = new File(uploadPath + File.separator + upldFile.get(i - 1)); + f1 = new File(uploadPath + File.separator + scanImg); + + // rename file + t = f.renameTo(f1); + } catch (Exception e) { + // if any error occurs + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } + } + } else if (upldFlag.equalsIgnoreCase("0")) { + scanImg = null; + } + + + if (idNumber != null) { + oDepositKYCCreationDetailBean = new DepositKYCCreationDetailBean(); + oDepositKYCCreationDetailBean.setDocument_mst_id(document_mst_id); + oDepositKYCCreationDetailBean.setIdNumber(idNumber); + oDepositKYCCreationDetailBean.setIdIssueAt(idIssueAt); + oDepositKYCCreationDetailBean.setIdIssueDate(idIssueDate); + oDepositKYCCreationDetailBean.setScanImg(scanImg); + + + alDepositKYCCreationDetailBean.add(oDepositKYCCreationDetailBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + + session.removeAttribute("upldFile"); + + if (alDepositKYCCreationDetailBean.size() > 0) { + try { + con = DbHandler.getDBConnection(); + stmt = con.prepareCall("{ call Operations.deposit_kyc_dtl(?,?,?,?,?,?,?,?,?) }"); + for (int j = 0; j < alDepositKYCCreationDetailBean.size(); j++) { + oDepositKYCCreationDetailBean = alDepositKYCCreationDetailBean.get(j); + stmt.setString(1, hdrId); + stmt.setString(2, oDepositKYCCreationDetailBean.getKYCCreation_dtl_id()); + stmt.setString(3, oDepositKYCCreationDetailBean.getDocument_mst_id()); + stmt.setString(4, oDepositKYCCreationDetailBean.getIdNumber()); + stmt.setString(5, oDepositKYCCreationDetailBean.getIdIssueAt()); + stmt.setString(6, oDepositKYCCreationDetailBean.getIdIssueDate()); + stmt.setString(7, handle_id); + stmt.setString(8, oDepositKYCCreationDetailBean.getScanImg()); + stmt.setString(9, user); + stmt.addBatch(); + + } + + stmt.executeBatch(); + + } catch (BatchUpdateException ex) { + + try { + // con.rollback(); + + SuccessFlag = BatchExecutionFailedOperationObject.BatchExecutionFailedOperation("DepositKYCCreation.jsp", hdrId); + + message = "Entered ID Number already tagged with another CIF."; + // message = ex.toString(); + + + } catch (Exception ex1) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + + + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } catch (SQLException ex1) { + message = "Error occurred while KYC Creation. Please try Again."; + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } finally { + try { + stmt.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during statement close."); + } + try { + con.close(); + session.removeAttribute("upldFile"); + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + + } + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/DepositKYCCreation.jsp").forward(request, response); + + } else if (handle_id.equalsIgnoreCase("SearchCIF")) { + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + + try { + connection = DbHandler.getDBConnection(); + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + // resultset = statement.executeQuery("select CIF_NO,customer_type," + + "title," + + "first_name," + + "middle_name," + + "last_name," + + "guardian_name," + + "MOTHER_NAME," + + "address_1," + + "address_2," + + "address_3," + + "PIN_CODE," + + "district," + + "city," + + "state," + + "birth_date," + + "gender," + + "mobile_no," + + "BLOCK,PHOTO_PATH,sig_photo," + + "RELIGION,CASTE,MEMBERSHIP_NO,FARMER_TYPE,email_id, " //added by rajdip email + + "BANK_CIF,Alive_Dead,Date_Of_death,ward " //added by Bishnu + + " from kyc_hdr where cif_no='" + cifNumber + "'"); + + while (resultset.next()) { + oDepositKYCCreationBean.setCif(resultset.getString("CIF_NO")); + oDepositKYCCreationBean.setcType(resultset.getString("customer_type")); + oDepositKYCCreationBean.setTitle(resultset.getString("title")); + oDepositKYCCreationBean.setfName(resultset.getString("first_name")); + oDepositKYCCreationBean.setmName(resultset.getString("middle_name")); + oDepositKYCCreationBean.setlName(resultset.getString("last_name")); + oDepositKYCCreationBean.setgName(resultset.getString("guardian_name")); + oDepositKYCCreationBean.setAdd1(resultset.getString("address_1")); + oDepositKYCCreationBean.setAdd2(resultset.getString("address_2")); + oDepositKYCCreationBean.setAdd3(resultset.getString("address_3")); + oDepositKYCCreationBean.setDistname(resultset.getString("district")); + oDepositKYCCreationBean.setCity(resultset.getString("city")); + oDepositKYCCreationBean.setStatename(resultset.getString("state")); + oDepositKYCCreationBean.setDob(resultset.getString("birth_date")); + oDepositKYCCreationBean.setGender(resultset.getString("gender")); + oDepositKYCCreationBean.setmNumber(resultset.getString("mobile_no")); + oDepositKYCCreationBean.setBlock(resultset.getString("BLOCK")); + oDepositKYCCreationBean.setFile(resultset.getString("PHOTO_PATH")); + oDepositKYCCreationBean.setSigUpld(resultset.getString("sig_photo")); + oDepositKYCCreationBean.setReligion(resultset.getString("RELIGION")); + oDepositKYCCreationBean.setCaste(resultset.getString("CASTE")); + oDepositKYCCreationBean.setMem_no(resultset.getString("MEMBERSHIP_NO")); + oDepositKYCCreationBean.setFarmerType(resultset.getString("FARMER_TYPE")); + oDepositKYCCreationBean.setEmailId(resultset.getString("email_id")); + oDepositKYCCreationBean.setBankCIF(resultset.getString("BANK_CIF")); + oDepositKYCCreationBean.setAliveDead(resultset.getString("Alive_Dead")); + oDepositKYCCreationBean.setDoDeath(resultset.getString("Date_Of_death")); + oDepositKYCCreationBean.setMotherName(resultset.getString("MOTHER_NAME")); + oDepositKYCCreationBean.setPin(resultset.getString("PIN_CODE")); + oDepositKYCCreationBean.setWard((resultset.getString("WARD"))); + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + } + + statement.close(); + resultset.close(); + + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + //Detail Part Populate + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + String query = "select d.id,d.kyc_document_mst_id,m.document_dtl,m.score,d.id_no,to_char(d.id_issue_date,'dd/mm/yyyy') as id_issue_date,d.id_issued_at,d.scan_img from kyc_dtl d,kyc_document_mst m where d.kyc_document_mst_id = m.id and d.cif_no='" + cifNumber + "'"; + // rs = statement.executeQuery(query); + + while (rs.next()) { + + oDepositKYCCreationDetailBean = new DepositKYCCreationDetailBean(); + oDepositKYCCreationDetailBean.setKYCCreation_dtl_id(rs.getString("id")); + oDepositKYCCreationDetailBean.setIdType(rs.getString("document_dtl")); + oDepositKYCCreationDetailBean.setIDScore(rs.getString("score")); + oDepositKYCCreationDetailBean.setIdNumber(rs.getString("id_no")); + oDepositKYCCreationDetailBean.setIdIssueDate(rs.getString("id_issue_date")); + oDepositKYCCreationDetailBean.setIdIssueAt(rs.getString("id_issued_at")); + oDepositKYCCreationDetailBean.setDocument_mst_id(rs.getString("kyc_document_mst_id")); + oDepositKYCCreationDetailBean.setScanImg(rs.getString("scan_img")); + + alDepositKYCCreationDetailBean.add(oDepositKYCCreationDetailBean); + + } + statement.close(); + rs.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + if (SeachFound == 0) { + message = "CIF details not exists in the system"; + request.setAttribute("message", message); + } + } finally { + try { + connection.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during processing."); + } + } + + request.setAttribute("oDepositKYCCreationBeanObj", oDepositKYCCreationBean); + request.setAttribute("alDepositKYCCreationDetailBean", alDepositKYCCreationDetailBean); + + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/DepositKYCInquiry.jsp").forward(request, response); + + } else if (handle_id.equalsIgnoreCase("Update")) { + + try { + // BeanUtils.populate(oDepositKYCCreationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + // BeanUtils.populate(oDepositKYCCreationDetailBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + ServletContext servletContext = getServletContext(); + uploadPathMain = servletContext.getRealPath(File.separator); + uploadPath = uploadPathMain + "/" + "UploadedFiles"; + File destinationDir = new File(uploadPath); + + try { + con = DbHandler.getDBConnection(); + try { + stmt = con.prepareCall("{ call Operations.kyc_Deposit_hdr(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + stmt.setString(1, oDepositKYCCreationBean.getcTypeAmend()); + stmt.setString(2, oDepositKYCCreationBean.getTittleAmend()); + stmt.setString(3, oDepositKYCCreationBean.getfNameAmend()); + stmt.setString(4, oDepositKYCCreationBean.getmNameAmend()); + stmt.setString(5, oDepositKYCCreationBean.getlNameAmend()); + stmt.setString(6, oDepositKYCCreationBean.getgNameAmend()); + stmt.setString(7, oDepositKYCCreationBean.getAdd1Amend()); + stmt.setString(8, oDepositKYCCreationBean.getAdd2Amend()); + stmt.setString(9, oDepositKYCCreationBean.getAdd3Amend()); + stmt.setString(10, oDepositKYCCreationBean.getDistnameAmend()); + stmt.setString(11, oDepositKYCCreationBean.getCitynameAmend()); + stmt.setString(12, oDepositKYCCreationBean.getStatenameAmend()); + stmt.setString(13, oDepositKYCCreationBean.getDobAmend()); + stmt.setString(14, oDepositKYCCreationBean.getGenderAmend()); + stmt.setString(15, oDepositKYCCreationBean.getmNumberAmend()); + stmt.setString(16, oDepositKYCCreationBean.getBlockAmend()); + stmt.setString(17, oDepositKYCCreationBean.getCifNoAmend()); + stmt.setString(18, handle_id); + stmt.setString(19, pacsId); + stmt.setString(20, oDepositKYCCreationBean.getFile()); + stmt.registerOutParameter(21, java.sql.Types.VARCHAR); + stmt.setString(22, oDepositKYCCreationBean.getSigUpld()); + stmt.setString(23, oDepositKYCCreationBean.getReligionAmend()); + stmt.setString(24, oDepositKYCCreationBean.getCasteAmend()); + stmt.setString(25, oDepositKYCCreationBean.getMem_noAmend()); + stmt.setString(26, oDepositKYCCreationBean.getFarmerTypeAmend()); + stmt.setString(27, oDepositKYCCreationBean.getEmailId()); + stmt.setString(28, user); + stmt.setString(29, oDepositKYCCreationBean.getBankCIF()); + stmt.setString(30, oDepositKYCCreationBean.getLstatus()); + stmt.setString(31, oDepositKYCCreationBean.getDoDeath()); + stmt.setString(32, oDepositKYCCreationBean.getMotherNameAmend()); + stmt.setString(33, oDepositKYCCreationBean.getPinAmend()); + stmt.setString(34, oDepositKYCCreationBean.getwardAmend()); // Added for member share report. + stmt.execute(); + //message = stmt.getString(21); + hdrId = (message.split("#")[1]).trim(); + + if (!lastPhotoName.isEmpty()) { + File f = null; + File f1 = null; + try { + // create new File objects + f = new File(uploadPath + File.separator + lastPhotoName); + f1 = new File(uploadPath + File.separator + hdrId + ".jpg"); + + if (f1.exists()) { + f1.delete(); + } + // rename file + t = f.renameTo(f1); + } catch (Exception e) { + // if any error occurs + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } + } + + //For Signature + if (!sigPhotoName.isEmpty()) { + File f = null; + File f1 = null; + try { + // create new File objects + f = new File(uploadPath + File.separator + sigPhotoName); + f1 = new File(uploadPath + File.separator + "sig-" + hdrId + ".jpg"); + + if (f1.exists()) { + f1.delete(); + } + // rename file + t = f.renameTo(f1); + } catch (Exception e) { + // if any error occurs + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } + } + + session.setAttribute("lastPhotoName", ""); + session.setAttribute("sigPhotoName", ""); + + } catch (SQLException ex) { +// try { +// // con.rollback(); +// } catch (Exception ex1) { +// // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); +// System.out.println("Error occurred during processing."); +// } +// Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); +// System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + stmt.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during statement close."); + } + try { + con.close(); + + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + + //Detail Part Starts here + int counterfor_Detail = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counterfor_Detail; i++) { + try { + String idTypeAmend = request.getParameter("idTypeAmend" + i); + String ScoreAmend = request.getParameter("ScoreAmend" + i); + //String idNumberAmend = request.getParameter("idNumberAmend" + i); + //String idIssueAtAmend = request.getParameter("idIssueAtAmend" + i); + //String idIssueDateAmend = request.getParameter("idIssueDateAmend" + i); + //String document_mst_idAmend = request.getParameter("document_mst_idAmend" + i); + String rowStatus = request.getParameter("rowStatus" + i); + //String KYCCreation_dtl_id = request.getParameter("KYCCreation_dtl_id" + i); + String upldFlag = request.getParameter("upldFlag" + i); + if (upldFlag.equalsIgnoreCase("1")) { + scanImg = hdrId + "_" + document_mst_idAmend.substring(document_mst_idAmend.length() - 2) + ".jpg"; + //For ID Scan Image + if (!upldFile.isEmpty()) { + File f = null; + File f1 = null; + try { + // create new File objects + f = new File(uploadPath + File.separator + upldFile.get(i - 1)); + f1 = new File(uploadPath + File.separator + scanImg); + + if (f1.exists()) { + f1.delete(); + } + // rename file + t = f.renameTo(f1); + } catch (Exception e) { + // if any error occurs + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } + } + } else if (upldFlag.equalsIgnoreCase("0")) { + scanImg = null; + } + + if (document_mst_idAmend != null && rowStatus != null) { + oDepositKYCCreationDetailBean = new DepositKYCCreationDetailBean(); + oDepositKYCCreationDetailBean.setIdTypeAmend(idTypeAmend); + oDepositKYCCreationDetailBean.setIDScoreAmend(ScoreAmend); + oDepositKYCCreationDetailBean.setIdNumberAmend(idNumberAmend); + oDepositKYCCreationDetailBean.setIdIssueAtAmend(idIssueAtAmend); + oDepositKYCCreationDetailBean.setIdIssueDateAmend(idIssueDateAmend); + oDepositKYCCreationDetailBean.setDocument_mst_idAmend(document_mst_idAmend); + oDepositKYCCreationDetailBean.setKYCCreation_dtl_id(KYCCreation_dtl_id); + oDepositKYCCreationDetailBean.setScanImg(scanImg); + + if (rowStatus.equals("N")) { + alDepositKYCCreationDetailBeanNew.add(oDepositKYCCreationDetailBean); + } else { + alDepositKYCCreationDetailBeanUpdated.add(oDepositKYCCreationDetailBean); + } + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + + //For Deletion in Detail Part + //String deletedRows = request.getParameter("deletedRows"); + + if ((!deletedRows.equalsIgnoreCase(null)) || (!deletedRows.equalsIgnoreCase(""))) { + StringTokenizer tokenizer = new StringTokenizer(deletedRows, ","); + + while (tokenizer.hasMoreTokens()) { + oDepositKYCCreationDetailBean = new DepositKYCCreationDetailBean(); + oDepositKYCCreationDetailBean.setKYCCreation_dtl_id(tokenizer.nextToken()); + + alDepositKYCCreationDetailBeanDeleted.add(oDepositKYCCreationDetailBean); + } + } + + if ((alDepositKYCCreationDetailBeanUpdated.size() > 0) && (!hdrId.equalsIgnoreCase(""))) { + try { + con = DbHandler.getDBConnection(); + try { + stmt = con.prepareCall("{ call Operations.deposit_kyc_dtl(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + for (int j = 0; j < alDepositKYCCreationDetailBeanUpdated.size(); j++) { + oDepositKYCCreationDetailBean = alDepositKYCCreationDetailBeanUpdated.get(j); + + stmt.setString(1, oDepositKYCCreationBean.getCifNoAmend()); + stmt.setString(2, oDepositKYCCreationDetailBean.getKYCCreation_dtl_id()); + stmt.setString(3, oDepositKYCCreationDetailBean.getDocument_mst_idAmend()); + stmt.setString(4, oDepositKYCCreationDetailBean.getIdNumberAmend()); + stmt.setString(5, oDepositKYCCreationDetailBean.getIdIssueAtAmend()); + stmt.setString(6, oDepositKYCCreationDetailBean.getIdIssueDateAmend()); + stmt.setString(7, handle_id); + stmt.setString(8, oDepositKYCCreationDetailBean.getScanImg()); + stmt.setString(9, user); + stmt.addBatch(); + } + + stmt.executeBatch(); + + } catch (BatchUpdateException ex) { + + try { + // con.rollback(); + session.removeAttribute("upldFile"); + + //SuccessFlag = BatchExecutionFailedOperationObject.BatchExecutionFailedOperation("DepositKYCCreation.jsp", hdrId); + + message = "Atleast one entered ID Number already tagged to anothe CIF!"; + // message = ex.toString(); + + + } catch (Exception ex1) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + + + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } catch (SQLException ex) { +// try { +// // con.rollback(); +// } catch (Exception ex1) { +// // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); +// System.out.println("Error occurred during processing."); +// } + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + stmt.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during statement close."); + } + try { + con.close(); + session.removeAttribute("upldFile"); + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } + } + } + + if ((alDepositKYCCreationDetailBeanDeleted.size() > 0) && (!hdrId.equalsIgnoreCase(""))) { + try { + con = DbHandler.getDBConnection(); + try { + stmt = con.prepareCall("{ call Operations.deposit_kyc_dtl(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alDepositKYCCreationDetailBeanDeleted.size(); j++) { + + oDepositKYCCreationDetailBean = new DepositKYCCreationDetailBean(); + oDepositKYCCreationDetailBean = alDepositKYCCreationDetailBeanDeleted.get(j); + + stmt.setString(1, oDepositKYCCreationBean.getCifNoAmend()); + stmt.setString(2, oDepositKYCCreationDetailBean.getKYCCreation_dtl_id()); + stmt.setString(3, oDepositKYCCreationDetailBean.getDocument_mst_idAmend()); + stmt.setString(4, oDepositKYCCreationDetailBean.getIdNumberAmend()); + stmt.setString(5, oDepositKYCCreationDetailBean.getIdIssueAtAmend()); + stmt.setString(6, oDepositKYCCreationDetailBean.getIdIssueDateAmend()); + stmt.setString(7, "Delete"); + stmt.setString(8, null); + stmt.setString(9, user); + stmt.addBatch(); + } + stmt.executeBatch(); + } catch (SQLException ex) { +// try { +// // con.rollback(); +// } catch (Exception ex1) { +// // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); +// System.out.println("Error occurred during processing."); +// } + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + stmt.close(); + } catch (SQLException e) { + //System.out.println(e.toString()); + System.out.println("Error occurred during statement close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + + if ((alDepositKYCCreationDetailBeanNew.size() > 0) && (!hdrId.equalsIgnoreCase(""))) { + try { + con = DbHandler.getDBConnection(); + try { + stmt = con.prepareCall("{call Operations.deposit_kyc_dtl(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + for (int j = 0; j < alDepositKYCCreationDetailBeanNew.size(); j++) { + oDepositKYCCreationDetailBean = new DepositKYCCreationDetailBean(); + oDepositKYCCreationDetailBean = alDepositKYCCreationDetailBeanNew.get(j); + + stmt.setString(1, oDepositKYCCreationBean.getCifNoAmend()); + stmt.setString(2, oDepositKYCCreationDetailBean.getKYCCreation_dtl_id()); + stmt.setString(3, oDepositKYCCreationDetailBean.getDocument_mst_idAmend()); + stmt.setString(4, oDepositKYCCreationDetailBean.getIdNumberAmend()); + stmt.setString(5, oDepositKYCCreationDetailBean.getIdIssueAtAmend()); + stmt.setString(6, oDepositKYCCreationDetailBean.getIdIssueDateAmend()); + stmt.setString(7, "Create"); + stmt.setString(8, oDepositKYCCreationDetailBean.getScanImg()); + stmt.setString(9, user); + stmt.addBatch(); + } + stmt.executeBatch(); + // message = message2; + } catch (BatchUpdateException ex) { + + try { + // con.rollback(); + + //SuccessFlag = BatchExecutionFailedOperationObject.BatchExecutionFailedOperation("DepositKYCCreation.jsp", hdrId); + + message = "Atleast one entered ID Number already tagged to anothe CIF."; + // message = ex.toString(); + + + } catch (Exception ex1) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + + + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } catch (SQLException ex) { +// try { +// // con.rollback(); +// } catch (Exception ex1) { +// // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); +// System.out.println("Error occurred during processing."); +// } + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + stmt.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during statement close."); + } + try { + con.close(); + session.removeAttribute("upldFile"); + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/DepositKYCInquiry.jsp").forward(request, response); + + } + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/DepositKYCDocumentUploadServlet.java b/IPKS_Updated/src/src/java/Controller/DepositKYCDocumentUploadServlet.java new file mode 100644 index 0000000..a5b5ae6 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/DepositKYCDocumentUploadServlet.java @@ -0,0 +1,165 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import DataEntryBean.DepositKYCCreationHdrBean; +import DataEntryBean.DepositKYCCreationDetailBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import java.sql.Statement; + + +/** + * + * @author 986137 + */ +public class DepositKYCDocumentUploadServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + Connection con1 = null; + CallableStatement stmt = null; + ResultSet rs = null; + int SeachFound = 0; + String message = ""; + String hdrId = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + String handle_id = request.getParameter("handle_id"); + // String cifNumber = request.getParameter("cifNumber"); + + DepositKYCCreationHdrBean oDepositKYCCreationBean = new DepositKYCCreationHdrBean(); + DepositKYCCreationDetailBean oDepositKYCCreationDetailBean = new DepositKYCCreationDetailBean(); + ArrayList alDepositKYCCreationDetailBean = new ArrayList(); + + if (handle_id.equalsIgnoreCase("SearchCIF")) { + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + + + try { + connection = DbHandler.getDBConnection(); + + //Detail Part Populate + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCDocumentUploadServlet.class.getName()).log(Level.SEVERE, null, ex); + } + + try { + String query = "select d.id,d.kyc_document_mst_id,m.document_dtl,d.id_no,d.cif_no, (h.first_name||nvl2(h.middle_name,' '||h.middle_name,'')||nvl2(h.last_name,' '||h.last_name,'')) name from kyc_dtl d,kyc_document_mst m,kyc_hdr h where d.kyc_document_mst_id = m.id and d.cif_no = h.cif_no and d.cif_no='" + cifNumber + "'"; + // rs = statement.executeQuery(query); + + while (rs.next()) { + + oDepositKYCCreationDetailBean = new DepositKYCCreationDetailBean(); + oDepositKYCCreationBean = new DepositKYCCreationHdrBean(); + + oDepositKYCCreationDetailBean.setIdType(rs.getString("document_dtl")); + oDepositKYCCreationDetailBean.setIdNumber(rs.getString("id_no")); + oDepositKYCCreationDetailBean.setDocument_mst_id(rs.getString("kyc_document_mst_id")); + oDepositKYCCreationDetailBean.setKYCCreation_dtl_id(rs.getString("id")); + oDepositKYCCreationBean.setCif(rs.getString("cif_no")); + oDepositKYCCreationBean.setCifName(rs.getString("name")); + + alDepositKYCCreationDetailBean.add(oDepositKYCCreationDetailBean); + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + } + statement.close(); + rs.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCDocumentUploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + } finally { + try { + connection.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during connection close."); + } + } + if (SeachFound == 0) { + message = "CIF details not exists in the system"; + request.setAttribute("message", message); + } + + + + request.setAttribute("oDepositKYCCreationBeanObj", oDepositKYCCreationBean); + request.setAttribute("alDepositKYCCreationDetailBean", alDepositKYCCreationDetailBean); + + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/DepositKYCDocumentUpload.jsp").forward(request, response); + + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/DepositMiscellaneousOperationServlet.java b/IPKS_Updated/src/src/java/Controller/DepositMiscellaneousOperationServlet.java new file mode 100644 index 0000000..287de4c --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/DepositMiscellaneousOperationServlet.java @@ -0,0 +1,533 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.DepositMiscellaneousBean; +import DataEntryBean.RepayLoanBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.StringTokenizer; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import java.util.Date; + +/** + * + * @author 986137 + */ +public class DepositMiscellaneousOperationServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String depositAccSearch = ""; + ResultSet rs = null; + int SeachFound = 0; + String message = ""; + String resetBy=null; + String printDate=null; + String resetDate=null; + String action = request.getParameter("handle_id"); + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + //added by rajdiip + StringBuilder query = null; + PreparedStatement ps = null; + int res = 0; + String txnOrAccntNo = null; + //Added by Paramita + String loanAccSearch =""; + String transactionType = request.getParameter("transactionType"); + + //System.out.println("Transaction type: " +transactionType); + + DepositMiscellaneousBean oDepositMiscellaneousBean = new DepositMiscellaneousBean(); + RepayLoanBean oRepayLoanBean = new RepayLoanBean(); + + if ((action.equalsIgnoreCase("Search"))&& (transactionType.equalsIgnoreCase("Deposit"))) { + + // depositAccSearch = request.getParameter("depositAccSearch"); + //loanAccSearch = request.getParameter("loanAccSearch"); + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(DepositMiscellaneousOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + } + try { + System.out.println("-------------------------------------"+ depositAccSearch); + // resultset = statement.executeQuery("select t.key_1,t.avail_bal as Account_BAlance,t.customer_no,k.first_name||' '||k.middle_name||' '||k.last_name as customer1_name," + + " case when t.cif_no2 is null then 'NA' else t.cif_no2 end as cif_no2,(select kh.first_name||' '||kh.middle_name||' '||kh.last_name as customer2_name from kyc_hdr kh where kh.cif_no=t.cif_no2) as cif2_name," + + " decode(t.CURR_STATUS,'C','Closed','D','Dormant','S','Stopped','M','Matured','Open/Active') as curr_status ,nvl(NOMINEE_CIF,'NA') as NOMINEE_CIF " + + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no = t.customer_no and t.dep_prod_id = p.id and t.key_1 ='" + depositAccSearch + "' and t.PACS_ID = '" + pacsId + "'"); + + + + while (resultset.next()) { + oDepositMiscellaneousBean.setDepositAccountNumber(resultset.getString("key_1")); + oDepositMiscellaneousBean.setCifNo(resultset.getString("customer_no")); + oDepositMiscellaneousBean.setAccBalance(resultset.getString("Account_BAlance")); + oDepositMiscellaneousBean.setAccStat(resultset.getString("curr_status")); + oDepositMiscellaneousBean.setNomCif(resultset.getString("NOMINEE_CIF")); + + oDepositMiscellaneousBean.setCustomer1Name(resultset.getString("customer1_name")); + oDepositMiscellaneousBean.setCif2No(resultset.getString("cif_no2")); + if (resultset.getString("cif2_name") == null) { + oDepositMiscellaneousBean.setCustomer2Name("NA"); + } else { + oDepositMiscellaneousBean.setCustomer2Name(resultset.getString("cif2_name")); + } + + SeachFound = 1; + + request.setAttribute("displayFlag", "Y"); + + } + + // statement.close(); + // resultset.close(); + // connection.close(); + + } catch (SQLException ex) { + //Logger.getLogger(DepositMiscellaneousOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + + } + + if (SeachFound == 0) { + message = "Deposit Account not exists in the system"; + request.setAttribute("message", message); + } + + request.setAttribute("oDepositMiscellaneousBeanObj", oDepositMiscellaneousBean); + request.getRequestDispatcher("/Deposit/DepositMiscellaneousOperation.jsp").forward(request, response); + + } + + else if ((action.equalsIgnoreCase("Search"))&& (transactionType.equalsIgnoreCase("Loan"))){ + //System.out.println("Hello"); + // loanAccSearch = request.getParameter("loanAccSearch"); + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(DepositMiscellaneousOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + } + try { + // resultset = statement.executeQuery("SELECT LA.KEY_1,(k.first_name||' '||k.middle_name||' '||k.last_name) NAME,LA.SANCTION_AMT as SANCTION_AMT, TO_CHAR(LA.SANC_DT, 'Mon DD, YYYY') as SANC_DT,NVL(TO_CHAR(LA.LST_TXN_DT, 'Mon DD, YYYY'), 'NA')as LST_TXN_DT, LA.PRIN_OUTST as PRIN_OUTST," ++ "(LA.INTT_OUTST + LA.PENAL_INTT_OUTST + LA.NPA_INTT_OUTST + ROUND(NVL(LA.INTT_ACCR, 0)) + ROUND(NVL(LA.PENAL_INTT_ACCR, 0)) + ROUND(NVL(LA.NPA_INTT_ACCR, 0))) TOT_INT_OUTS," ++ " ROUND((ABS(LA.PRIN_OUTST) + (ABS(LA.INTT_OUTST) + ABS(LA.PENAL_INTT_OUTST) + ABS(LA.NPA_INTT_OUTST)) + ABS(ROUND(NVL(LA.INTT_ACCR, 0)) + ROUND(NVL(LA.PENAL_INTT_ACCR, 0)) + ROUND(NVL(LA.NPA_INTT_ACCR, 0))))) OUTSTANDING_BALANCE," ++ "NVL(TO_CHAR(LA.EMI), 'NA') as EMI,L.PROD_CODE," ++ "(SELECT COUNT(M.MEMBER_ID) FROM BASIC_INFO B,MEMBER_INFORMATION M WHERE B.SHG_ID = M.SHG_ID AND B.CIF = K.CIF_NO) MEMBERCOUNT " ++ "FROM LOAN_ACCOUNT LA, KYC_HDR K,LOAN_PRODUCT L WHERE LA.CUSTOMER_NO = K.CIF_NO AND SUBSTR(LA.GL_CLASS_CODE, 9, 2)='23' " ++ "AND L.ID=LA.LOAN_PROD_ID AND LA.KEY_1 ='" + loanAccSearch + "' and LA.PACS_ID = '" + pacsId + "'"); + + while(resultset.next()){ + oRepayLoanBean.setLoanAcc(resultset.getString("KEY_1")); + oRepayLoanBean.setCustName(resultset.getString("NAME")); + oRepayLoanBean.setSancAmt(resultset.getString("SANCTION_AMT")); + oRepayLoanBean.setSancDt(resultset.getString("SANC_DT")); + oRepayLoanBean.setLstRepayDt(resultset.getString("LST_TXN_DT")); + oRepayLoanBean.setOustPrin(resultset.getString("PRIN_OUTST")); + oRepayLoanBean.setOustInt(resultset.getString("TOT_INT_OUTS")); + oRepayLoanBean.setOustBal(resultset.getString("OUTSTANDING_BALANCE")); + oRepayLoanBean.setEmi(resultset.getString("EMI")); + oRepayLoanBean.setProdCode(resultset.getString("PROD_CODE")); + + SeachFound = 1; + + request.setAttribute("displayFlag", "FY"); + } + + }catch(Exception ex){ + // System.out.println(ex); + } finally { + try { + if(statement !=null) + statement.close(); + if(resultset !=null) + resultset.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + if (SeachFound == 0) { + message = "Loan Account not exists in the system"; + request.setAttribute("message", message); + } + + request.setAttribute("oRepayLoanBeanObj", oRepayLoanBean); + request.getRequestDispatcher("/Deposit/DepositMiscellaneousOperation.jsp").forward(request, response); + + } else if (action.equalsIgnoreCase("SubmitOperation")) { + + Connection con = null; + CallableStatement proc = null; + + String miscellOpearation = request.getParameter("operation_type"); + + try { + //BeanUtils.populate(oDepositMiscellaneousBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(DepositMiscellaneousOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + } catch (InvocationTargetException ex) { + // Logger.getLogger(DepositMiscellaneousOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + } + + try { + con = DbHandler.getDBConnection(); + if( miscellOpearation.equals("RST")) //added by rajdip Reset Transactions Case + { + resetBy = request.getParameter("optradio"); + // String accNoRst = request.getParameter("depositAccSearch"); + + try { + if (resetBy.equalsIgnoreCase("txn")) { + // txnOrAccntNo = request.getParameter("transactionNoInpBox"); + query = new StringBuilder(" update dep_txn t set t.pb_print_status = NULL where t.acct_no = ? ") + .append(" and t.pb_print_status='1' and t.post_time >= (select n.post_time from dep_txn n where n.acct_no = ? and n.cbs_ref_no = ?) "); + //new StringBuilder(" update dep_txn set pb_print_status=NULL where cbs_ref_no = ?"); + ps = con.prepareStatement(query.toString()); + System.out.println("PS:" +ps); + ps.setString(1, accNoRst); + ps.setString(2, accNoRst); + ps.setString(3, txnOrAccntNo); + res = ps.executeUpdate(); + System.out.println("res: " +res); + if (res != 0) { + message = "All Trasactions from transaction no:" + txnOrAccntNo + " are reset sucessfully"; + System.out.println("All Trasactions from transaction no :" + txnOrAccntNo + " are reset sucessfully"); + } else { + message = "Trasactions from no :" + txnOrAccntNo + " reset unsuccessful "; + System.out.println("Trasactions from no :" + txnOrAccntNo + " reset unsuccessful . Rows updated:" + res); + } + query = null; + } + else if (resetBy.equalsIgnoreCase("accnt")) { + // txnOrAccntNo = request.getParameter("accountNoInpBox"); + query = new StringBuilder("update dep_txn set pb_print_status= NULL where ACCT_NO =? ") + .append(" and pb_print_status='1' "); + ps = con.prepareStatement(query.toString()); + ps.setString(1, txnOrAccntNo); + res = ps.executeUpdate(); + System.out.println("res: " +res); + if (res >= 1) { + message = "Txns of Account no :" + txnOrAccntNo + " are reset sucessfully "; + System.out.println("Txns of Account no :" + txnOrAccntNo + "is reset sucessfully . Rows updated :" + res); + } else { + message = "Transactions of Account no " + txnOrAccntNo + " reset unsuccessful "; + System.out.println("Txns of Account no " + txnOrAccntNo + " reset unsuccessful . Rows updated:" + res); + } + query = null; + } + else if (resetBy.equalsIgnoreCase("reset")) { + // resetDate = request.getParameter("reset_date"); + query = new StringBuilder(" update dep_txn t set t.pb_print_status = NULL where t.acct_no = ? ") + .append(" and t.tran_date >= to_date('"+resetDate+"','dd/mm/yyyy') and t.pb_print_status = '1' "); + + ps = con.prepareStatement(query.toString()); + ps.setString(1, accNoRst); + + res = ps.executeUpdate(); + + if (res != 0) { + message = "All Passbook Trasactions for account no: " + accNoRst + " are reset sucessfully from date: "+resetDate+" "; + System.out.println("All Passbook Trasactions for account no: " + accNoRst + " are reset sucessfully from date: "+resetDate+" "); + } else { + message = "No Passbook Trasactions for account no: " + accNoRst + " are present to reset from date: "+resetDate+" "; + System.out.println("No Passbook Trasactions for account no: " + accNoRst + " are present to reset from date: "+resetDate+". Rows updated:" + res); + } + query = null; + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } + } + else if( miscellOpearation.equals("SPT")) //added by Bisnu Set Passbook Transactions case + { + //String accNoRst = request.getParameter("depositAccSearch"); + + try { + // printDate = request.getParameter("print_date"); + query = new StringBuilder(" update dep_txn t set t.pb_print_status = '1' where t.acct_no = ? ") + .append(" and t.tran_date <= to_date('"+printDate+"','dd/mm/yyyy') "); + //new StringBuilder(" update dep_txn set pb_print_status=NULL where cbs_ref_no = ?");.cbs_ref_no + ps = con.prepareStatement(query.toString()); + ps.setString(1, accNoRst); + + res = ps.executeUpdate(); + if (res != 0) { + message = "All Passbook Trasactions for account no: " + accNoRst + " are skipped sucessfully upto date: "+printDate+" "; + System.out.println("All Passbook Trasactions for account no: " + accNoRst + " are skipped sucessfully upto date: "+printDate+" "); + } else { + message = "No Passbook Trasactions for account no: " + accNoRst + " are present to skip upto date: "+printDate+" "; + System.out.println("No Passbook Trasactions for account no: " + accNoRst + " are present to skip upto date: "+printDate+". Rows updated:" + res); + } + query = null; + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } + } + else if(miscellOpearation.equals("NOM")) + { + //String nomCif = request.getParameter("nomName"); + //String accNo = request.getParameter("depositAccSearch"); + //String reason = request.getParameter("rem_stopReson"); + try{ + query = new StringBuilder(" update dep_account set NOMINEE_CIF = ?, ACTION_COMMENT = ? where KEY_1 = ?"); + ps = con.prepareStatement(query.toString()); + ps.setString(1, nomCif); + ps.setString(2, reason); + ps.setString(3,accNo); + res = ps.executeUpdate(); + if (res == 1) { + message = "Nominee updated sucessfully for acc No :"+accNo ; + } else { + message = "Nominee updation unsuccessful for acc No; "+accNo; + } + query = null; + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } + + } + else { + try { + proc = con.prepareCall("{ call operations.miscle_operation(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(DepositMiscellaneousOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.setString(1, oDepositMiscellaneousBean.getDepositAccountNumber()); + proc.setString(2, oDepositMiscellaneousBean.getOperation_type()); + + if (miscellOpearation.equals("M2H")) { + // proc.setString(3, request.getParameter("secondCifSearch")); + proc.setString(4, ""); + // proc.setString(5, request.getParameter("modCif2TxtArea")); + + } else { + proc.setString(3, oDepositMiscellaneousBean.getHoldAmt()); + if (oDepositMiscellaneousBean.getOperation_type().equalsIgnoreCase("RL")) { + proc.setString(4, oDepositMiscellaneousBean.getRmvLienRsn()); + } else { + proc.setString(4, oDepositMiscellaneousBean.getStopReson()); + } + proc.setString(5, oDepositMiscellaneousBean.getRem_stopReson()); + } + proc.setString(6, user); + + + + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + + proc.execute(); + + //message = proc.getString(7); + } + } catch (SQLException ex) { + // Logger.getLogger(DepositMiscellaneousOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + ex.printStackTrace(); + System.out.println("Error occurred during processing."); + } finally { + try { + if(proc !=null)//added by rajdip + proc.close(); + if(ps != null) + ps.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositMiscellaneousOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + + request.setAttribute("oDepositMiscellaneousBeanObj", oDepositMiscellaneousBean); + request.getRequestDispatcher("/Deposit/DepositMiscellaneousOperation.jsp").forward(request, response); + + } + }else if (action.equalsIgnoreCase("SubmitLoanOperation")){ + Connection con = null; + CallableStatement proc = null; + + String miscellOpearation = request.getParameter("operation_type_loan"); + + try { + //BeanUtils.populate(oDepositMiscellaneousBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(DepositMiscellaneousOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + } catch (InvocationTargetException ex) { + // Logger.getLogger(DepositMiscellaneousOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + } + if(miscellOpearation.equalsIgnoreCase("RST")){ + + resetBy = request.getParameter("optradio"); + // String accNoRst = request.getParameter("loanAccSearch"); + try { + con = DbHandler.getDBConnection(); + + if (resetBy.equalsIgnoreCase("txn")) { + // txnOrAccntNo = request.getParameter("transactionNoInpBox"); + query = new StringBuilder(" update loan_txn t set t.pb_print_status = NULL where t.acct_no = ? ") + .append(" and t.pb_print_status='1' and t.post_time >= (select n.post_time from loan_txn n where n.acct_no = ? and n.txn_ref_no = ?) "); + ps = con.prepareStatement(query.toString()); + System.out.println("PS:" +ps); + ps.setString(1, accNoRst); + ps.setString(2, accNoRst); + ps.setString(3, txnOrAccntNo); + res = ps.executeUpdate(); + System.out.println("res: " +res); + if (res != 0) { + message = "All Loan Trasactions from transaction no:" + txnOrAccntNo + " are reset sucessfully"; + System.out.println("All Loan Trasactions from transaction no :" + txnOrAccntNo + " are reset sucessfully"); + } else { + message = "Loan Trasactions from no :" + txnOrAccntNo + " reset unsuccessful "; + System.out.println("Loan Trasactions from no :" + txnOrAccntNo + " reset unsuccessful . Rows updated:" + res); + } + query = null; + } + else if (resetBy.equalsIgnoreCase("accnt")) { + // txnOrAccntNo = request.getParameter("accountNoInpBox"); + query = new StringBuilder("update loan_txn set pb_print_status= NULL where ACCT_NO =? ") + .append(" and pb_print_status='1' "); + ps = con.prepareStatement(query.toString()); + ps.setString(1, txnOrAccntNo); + res = ps.executeUpdate(); + System.out.println("res: " +res); + if (res >= 1) { + message = "Txns of Loan Account no :" + txnOrAccntNo + " are reset sucessfully "; + System.out.println("Txns of Loan Account no :" + txnOrAccntNo + "is reset sucessfully . Rows updated :" + res); + } else { + message = "Transactions of Loan Account no " + txnOrAccntNo + " reset unsuccessful "; + System.out.println("Txns of Loan Account no " + txnOrAccntNo + " reset unsuccessful . Rows updated:" + res); + } + query = null; + } + else if (resetBy.equalsIgnoreCase("reset")) { + // resetDate = request.getParameter("reset_date"); + query = new StringBuilder(" update loan_txn t set t.pb_print_status = NULL where t.acct_no = ? ") + .append(" and t.tran_date >= to_date('"+resetDate+"','dd/mm/yyyy') and t.pb_print_status = '1' "); + + ps = con.prepareStatement(query.toString()); + ps.setString(1, accNoRst); + + res = ps.executeUpdate(); + + if (res != 0) { + message = "All Passbook Trasactions for Loan account no: " + accNoRst + " are reset sucessfully from date: "+resetDate+" "; + System.out.println("All Passbook Trasactions for Loan account no: " + accNoRst + " are reset sucessfully from date: "+resetDate+" "); + } else { + message = "No Passbook Trasactions for Loan account no: " + accNoRst + " are present to reset from date: "+resetDate+" "; + System.out.println("No Passbook Trasactions for Loan account no: " + accNoRst + " are present to reset from date: "+resetDate+". Rows updated:" + res); + } + query = null; + } + }catch(Exception Ex){ + // System.err.println("Error is: "+Ex); + }finally { + try { + if(proc !=null)//added by rajdip + proc.close(); + if(ps != null) + ps.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositMiscellaneousOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + + request.setAttribute("oDepositMiscellaneousBeanObj", oDepositMiscellaneousBean); + request.getRequestDispatcher("/Deposit/DepositMiscellaneousOperation.jsp").forward(request, response); + + } + } + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} \ No newline at end of file diff --git a/IPKS_Updated/src/src/java/Controller/DepositProductCreationServlet.java b/IPKS_Updated/src/src/java/Controller/DepositProductCreationServlet.java new file mode 100644 index 0000000..0a80539 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/DepositProductCreationServlet.java @@ -0,0 +1,423 @@ +package Controller; + +import DataEntryBean.DepositProductCreationBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author Tcs Helpdesk10 + */ +public class DepositProductCreationServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + Connection con = null; + CallableStatement proc = null; + String message = ""; + + //String ServletName = request.getParameter("handle_id"); + + DepositProductCreationBean oDepositProductCreationBean = new DepositProductCreationBean(); + + if ("Create".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oDepositProductCreationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(DepositProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(DepositProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call Upsert_dep_product_test(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? }"); + } catch (SQLException ex) { + // Logger.getLogger(DepositProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oDepositProductCreationBean.getProductcode()); + proc.setString(2, oDepositProductCreationBean.getInttcategory()); + proc.setString(3, oDepositProductCreationBean.getProductname()); + proc.setString(4, oDepositProductCreationBean.getProductdescription()); + proc.setString(5, oDepositProductCreationBean.getIntcatdescription()); + proc.setString(6, oDepositProductCreationBean.getSegmentCode()); + proc.setString(7, "0"); + proc.setString(8, oDepositProductCreationBean.getStatus()); + proc.setString(9, oDepositProductCreationBean.getIntrate()); + proc.setString(10, oDepositProductCreationBean.getInttfrequency()); + proc.setString(11, oDepositProductCreationBean.getInttmethod()); + proc.setString(12, oDepositProductCreationBean.getMinbal()); + proc.setString(13, oDepositProductCreationBean.getMaxbal()); + proc.setString(14, oDepositProductCreationBean.getOdindicator()); + proc.setString(15, "0"); + proc.setString(16, oDepositProductCreationBean.getPenalinttfrequency()); + proc.setString(17, oDepositProductCreationBean.getPenalinttmethod()); + proc.setString(18, "0"); + proc.setString(19, "N"); + proc.setString(20, oDepositProductCreationBean.getDebitComp1()); + proc.setString(21, oDepositProductCreationBean.getDebitComp2()); + proc.setString(22, oDepositProductCreationBean.getCreditComp1()); + proc.setString(23, oDepositProductCreationBean.getCreditComp2()); + proc.setString(24, oDepositProductCreationBean.getMinwdl()); + proc.setString(25, oDepositProductCreationBean.getMaxwdl()); + proc.setString(26, oDepositProductCreationBean.getInttcapfrequency()); + proc.setString(27, oDepositProductCreationBean.getAllowdr()); + proc.setString(28, oDepositProductCreationBean.getAllowcr()); + proc.setString(29, oDepositProductCreationBean.getDormancypr()); + proc.setString(30, ServletName); + proc.setString(31, oDepositProductCreationBean.getMaxterm()); + proc.setString(32, oDepositProductCreationBean.getMinterm()); + proc.setString(33, oDepositProductCreationBean.getDormancytrigger()); + proc.setString(34, oDepositProductCreationBean.getOverduerate()); + proc.setString(35, oDepositProductCreationBean.getRdFlag()); + proc.setString(36, oDepositProductCreationBean.getPreClosure()); + proc.setString(37, oDepositProductCreationBean.getInttpayoutfrequency()); + proc.setString(38, oDepositProductCreationBean.getGlCodeInttPAYABLE()); + proc.setString(39, oDepositProductCreationBean.getGlCodeInttPAID()); + proc.setString(40, "0"); + proc.setString(41, oDepositProductCreationBean.getHeadAccType()); + + proc.registerOutParameter(42, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(42); + + } catch (Exception ex) { + // Logger.getLogger(DepositProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/ProductCreation.jsp").forward(request, response); + + } + + } else if ("Search".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oDepositProductCreationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(DepositProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(DepositProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(DepositProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + + // ResultSet rs = statement.executeQuery("select dp.id, prod_code,int_cat,prod_name,prod_desc," + + "intt_cat_desc,segment_code,gl_prod_id as Gl_Description,status," + + "intt_rate,intt_freq,int_method,min_bal,max_bal,DEBIT_COMP1,DEBIT_COMP2,CREDIT_COMP1,CREDIT_COMP2," + + "to_char(effec_dt,'dd/mm/yyyy') as eff_date, od_indicator," + + "od_pen_int_rate,od_pen_intt_freq,od_pen_int_method,min_WDL,max_WDL,INT_CAP_FREQ,DR_TXN_FLAG,CR_TXN_FLAG,DORMANCY,MIN_TERM,MAX_TERM,DORM_TRIG,RD_FLAG,OVRDUE_RATE,PRE_CLOSURE_CHARGE,INTT_PAYOUT_FREQ,GL_ID_INTT_PAYABLE as payable,GL_ID_INTT_PAID as paid,CROP_INT_RATE,head_acc_type from dep_product dp" + + " where to_number(substr(prod_code,1,1)) < 5 and int_cat= '" + oDepositProductCreationBean.getIntcatSearch() + "' AND prod_code='" + oDepositProductCreationBean.getProductcodeSearch() + "'"); + + while (rs.next()) { + + oDepositProductCreationBean.setDep_product_id(rs.getString("id")); + oDepositProductCreationBean.setProductcode(rs.getString("prod_code")); + oDepositProductCreationBean.setInttcategory(rs.getString("int_cat")); + oDepositProductCreationBean.setProductname(rs.getString("prod_name")); + oDepositProductCreationBean.setProductdescription(rs.getString("prod_desc")); + oDepositProductCreationBean.setIntcatdescription(rs.getString("intt_cat_desc")); + oDepositProductCreationBean.setSegmentCode(rs.getString("segment_code")); + oDepositProductCreationBean.setGlCode(rs.getString("Gl_Description")); + oDepositProductCreationBean.setStatus(rs.getString("status")); + oDepositProductCreationBean.setIntrate(rs.getString("intt_rate")); + oDepositProductCreationBean.setInttfrequency(rs.getString("intt_freq")); + oDepositProductCreationBean.setInttmethod(rs.getString("int_method")); + oDepositProductCreationBean.setMinbal(rs.getString("min_bal")); + oDepositProductCreationBean.setMaxbal(rs.getString("max_bal")); + oDepositProductCreationBean.setEffectDate(rs.getString("eff_date")); + oDepositProductCreationBean.setOdindicator(rs.getString("od_indicator")); + oDepositProductCreationBean.setPenalinttrate(rs.getString("od_pen_int_rate")); + oDepositProductCreationBean.setPenalinttfrequency(rs.getString("od_pen_intt_freq")); + oDepositProductCreationBean.setPenalinttmethod(rs.getString("od_pen_int_method")); + oDepositProductCreationBean.setMinwdl(rs.getString("min_wdl")); + oDepositProductCreationBean.setMaxwdl(rs.getString("max_wdl")); + oDepositProductCreationBean.setInttcapfrequency(rs.getString("INT_CAP_FREQ")); + oDepositProductCreationBean.setAllowdr(rs.getString("DR_TXN_FLAG")); + oDepositProductCreationBean.setAllowcr(rs.getString("CR_TXN_FLAG")); + oDepositProductCreationBean.setDormancypr(rs.getString("DORMANCY")); + oDepositProductCreationBean.setDebitComp1(rs.getString("DEBIT_COMP1")); + oDepositProductCreationBean.setDebitComp2(rs.getString("DEBIT_COMP2")); + oDepositProductCreationBean.setCreditComp1(rs.getString("CREDIT_COMP1")); + oDepositProductCreationBean.setCreditComp2(rs.getString("CREDIT_COMP2")); + oDepositProductCreationBean.setMinterm(rs.getString("MIN_TERM")); + oDepositProductCreationBean.setMaxterm(rs.getString("MAX_TERM")); + oDepositProductCreationBean.setDormancytrigger(rs.getString("DORM_TRIG")); + oDepositProductCreationBean.setRdFlag(rs.getString("RD_FLAG")); + oDepositProductCreationBean.setOverduerate(rs.getString("OVRDUE_RATE")); + oDepositProductCreationBean.setPreClosure(rs.getString("PRE_CLOSURE_CHARGE")); + oDepositProductCreationBean.setInttpayoutfrequency(rs.getString("INTT_PAYOUT_FREQ")); + oDepositProductCreationBean.setGlCodeInttPAYABLE(rs.getString("payable")); + oDepositProductCreationBean.setGlCodeInttPAID(rs.getString("paid")); + oDepositProductCreationBean.setCropIns(rs.getString("CROP_INT_RATE")); + oDepositProductCreationBean.setHeadAccType(rs.getString("head_acc_type")); + + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + } + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(DepositProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + if (SeachFound == 0) { + message = "No Product Code or Interest Category exists in system for entered Product Code = " + oDepositProductCreationBean.getProductcodeSearch() + " and Interest Category = " + oDepositProductCreationBean.getIntcatSearch() + " . Please enter correct details."; + request.setAttribute("message", message); + } + + request.setAttribute("oDepositProductCreationBeanObj", oDepositProductCreationBean); + request.getRequestDispatcher("/Deposit/ProductCreation.jsp").forward(request, response); + + } else if ("Update".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oDepositProductCreationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(DepositProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(DepositProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_dep_product(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(DepositProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.setString(1, oDepositProductCreationBean.getProductcodeAmend()); + proc.setString(2, oDepositProductCreationBean.getInttcategoryAmend()); + proc.setString(3, oDepositProductCreationBean.getProductnameAmend()); + proc.setString(4, oDepositProductCreationBean.getProductdescriptionAmend()); + proc.setString(5, oDepositProductCreationBean.getIntcatdescriptionAmend()); + proc.setString(6, oDepositProductCreationBean.getSegmentCodeAmend()); + proc.setString(7, oDepositProductCreationBean.getGlCodeAmend()); + proc.setString(8, oDepositProductCreationBean.getStatusAmend()); + proc.setString(9, oDepositProductCreationBean.getIntrateAmend()); + proc.setString(10, oDepositProductCreationBean.getInttfrequencyAmend()); + proc.setString(11, oDepositProductCreationBean.getInttmethodAmend()); + proc.setString(12, oDepositProductCreationBean.getMinbalAmend()); + proc.setString(13, oDepositProductCreationBean.getMaxbalAmend()); + proc.setString(14, oDepositProductCreationBean.getOdindicatorAmend()); + proc.setString(15, oDepositProductCreationBean.getPenalinttrateAmend()); + proc.setString(16, oDepositProductCreationBean.getPenalinttfrequencyAmend()); + proc.setString(17, oDepositProductCreationBean.getPenalinttmethodAmend()); + proc.setString(18, null); + proc.setString(19, null); + proc.setString(20, oDepositProductCreationBean.getDebitComp1Amend()); + proc.setString(21, oDepositProductCreationBean.getDebitComp2Amend()); + proc.setString(22, oDepositProductCreationBean.getCreditComp1Amend()); + proc.setString(23, oDepositProductCreationBean.getCreditComp2Amend()); + proc.setString(24, oDepositProductCreationBean.getMinwdlAmend()); + proc.setString(25, oDepositProductCreationBean.getMaxwdlAmend()); + proc.setString(26, oDepositProductCreationBean.getInttcapfrequencyAmend()); + proc.setString(27, oDepositProductCreationBean.getAllowdrAmend()); + proc.setString(28, oDepositProductCreationBean.getAllowcrAmend()); + proc.setString(29, oDepositProductCreationBean.getDormancyprAmend()); + + proc.setString(30, ServletName); + proc.setString(31, oDepositProductCreationBean.getMaxtermAmend()); + proc.setString(32, oDepositProductCreationBean.getMintermAmend()); + proc.setString(33, oDepositProductCreationBean.getDormancytriggerAmend()); + proc.setString(34, oDepositProductCreationBean.getOverduerateAmend()); + proc.setString(35, oDepositProductCreationBean.getRdFlagAmend()); + proc.setString(36, oDepositProductCreationBean.getPreClosureAmend()); + proc.setString(37, oDepositProductCreationBean.getInttpayoutfrequencyAmend()); + proc.setString(38, oDepositProductCreationBean.getGlCodeInttPAYABLE_Amend()); + proc.setString(39, oDepositProductCreationBean.getGlCodeInttPAID_Amend()); + proc.setString(40, oDepositProductCreationBean.getCropInsAmend()); + proc.setString(41, oDepositProductCreationBean.getHeadAccTypeAmend()); + + proc.registerOutParameter(42, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(42); + + } catch (SQLException ex) { + // Logger.getLogger(DepositProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/ProductCreation.jsp").forward(request, response); + + } + + } else if ("StatusSearch".equalsIgnoreCase(ServletName)) { + + // String inttCategoryActivation = request.getParameter("inttCategoryActivation"); + // String productCodeActivation = request.getParameter("productCodeActivation"); + // String vFlag = request.getParameter("PacsproductstatusFlag"); + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.pacs_product_Activation(?,?,?,?)}"); + } catch (SQLException ex) { + // Logger.getLogger(DepositProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, inttCategoryActivation); + proc.setString(2, productCodeActivation); + proc.setString(3, vFlag); + proc.registerOutParameter(4, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(4); + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during procedure close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/ProductCreation.jsp").forward(request, response); + + } + + } + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + + + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/DepositRateSlabServlet.java b/IPKS_Updated/src/src/java/Controller/DepositRateSlabServlet.java new file mode 100644 index 0000000..2db66f4 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/DepositRateSlabServlet.java @@ -0,0 +1,577 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import java.io.IOException; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import DataEntryBean.GovtOrderCreationDetailBean; +import DataEntryBean.GovtOrderCreationExpenseBean; +import DataEntryBean.GovtOrderCreationHeaderBean; +import DataEntryBean.DepositRateSlabBean; +import LoginDb.DbHandler; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.StringTokenizer; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 590685 + */ +public class DepositRateSlabServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException, SQLException { + + HttpSession session = request.getSession(false); + Connection con = null; + Connection con1 = null; + CallableStatement stmt = null; + CallableStatement proc = null; + String message = ""; + + //String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = (String) session.getAttribute("user"); + + String ServletName = request.getParameter("handle_id"); + // String dep_product_id = request.getParameter("dep_product_id"); + // String procStartDate = request.getParameter("procStartDate"); + //String procEndDate = request.getParameter("procEndDate"); + String pacsId = (String) session.getAttribute("pacsId"); + // String tellerId = (String) session.getAttribute("tellrId"); + + DepositRateSlabBean oDepositRateSlabBean = new DepositRateSlabBean(); + DepositRateSlabBean oDepositRateSlabBeanHeader = new DepositRateSlabBean(); + ArrayList alDepositRateSlabBean = new ArrayList(); + ArrayList alDepositRateSlabBeanNew = new ArrayList(); + ArrayList alDepositRateSlabBeanUpdated = new ArrayList(); + ArrayList alDepositRateSlabBeanDeleted = new ArrayList(); + + + try { + // BeanUtils.populate(oDepositRateSlabBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + if ("Create".equalsIgnoreCase(ServletName)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + + for (int i = 1; i <= counter; i++) { + try { + + //String inttRate = request.getParameter("inttRate" + i); + //String termFrom = request.getParameter("termFrom" + i); + // String termTo = request.getParameter("termTo" + i); + //String amountFrom = request.getParameter("amountFrom" + i); + //String amountTo = request.getParameter("amountTo" + i); + + if (dep_product_id != null && inttRate != null&& termFrom != null&& termTo != null&& amountFrom != null&& amountTo != null) { + oDepositRateSlabBean = new DepositRateSlabBean(); + oDepositRateSlabBean.setInttRate(inttRate); + oDepositRateSlabBean.setTermFrom(termFrom); + oDepositRateSlabBean.setTermTo(termTo); + oDepositRateSlabBean.setAmountFrom(amountFrom); + oDepositRateSlabBean.setAmountTo(amountTo); + oDepositRateSlabBean.setProcStartDate(procStartDate); + oDepositRateSlabBean.setProcEndDate(procEndDate); + + alDepositRateSlabBean.add(oDepositRateSlabBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + + if (alDepositRateSlabBean.size() > 0) { + try { + con1 = DbHandler.getDBConnection(); + stmt = con1.prepareCall("{ call operations.upsert_td_rate_slab(?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + for (int j = 0; j < alDepositRateSlabBean.size(); j++) { + oDepositRateSlabBean = alDepositRateSlabBean.get(j); + stmt.setString(1, dep_product_id); + stmt.setString(2, ""); + stmt.setString(3, oDepositRateSlabBean.getInttRate()); + stmt.setString(4, oDepositRateSlabBean.getTermFrom()); + stmt.setString(5, oDepositRateSlabBean.getTermTo()); + stmt.setString(6, oDepositRateSlabBean.getAmountFrom()); + stmt.setString(7, oDepositRateSlabBean.getAmountTo()); + stmt.setString(8, oDepositRateSlabBean.getProcStartDate()); + stmt.setString(9, oDepositRateSlabBean.getProcEndDate()); + stmt.setString(10, "Create"); + stmt.setString(11, pacsId); + stmt.setString(12, tellerId); + stmt.registerOutParameter(13, java.sql.Types.VARCHAR); + + stmt.execute(); + //proc.addBatch(); + + } + //proc.executeBatch(); + //message = stmt.getString(13); + + } catch (SQLException ex) { + // String delete = "Delete from TD_RATE_SLAB where PRODUCT_ID = '" + dep_product_id + "' "; + String delete = "Delete from TD_RATE_SLAB where PRODUCT_ID = '" + dep_product_id + "' and pacs_id='" + pacsId +"'"; + Connection conn = DbHandler.getDBConnection(); + PreparedStatement pstmt = conn.prepareCall(delete); + pstmt.executeQuery(); + if (conn != null) { + // conn.commit(); + conn.close(); + } + // Logger.getLogger(DepositRateSlabServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con1 != null) { + // conn.commit(); + con1.close(); + } + } catch (Exception e){ + System.out.println("Error occurred during connection close."); + } + } + + } + + + + + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/DepositRateSlab.jsp").forward(request, response); + + } else if ("Search".equalsIgnoreCase(ServletName)) { + + // dep_product_id = request.getParameter("dep_product_id"); + + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(DepositRateSlabServlet.class.getName()).log(Level.SEVERE, null, ex); + } + try { + + //ResultSet rs = statement.executeQuery("select distinct to_char(t.eff_from_date,'dd/mm/yyyy') as from_date,to_char(t.eff_to_date,'dd/mm/yyyy') as to_date,p.prod_code,p.int_cat,p.prod_desc,p.intt_cat_desc,p.id from TD_RATE_SLAB t,dep_product p where t.product_id = p.id and t.product_id = '" + dep_product_id + "' and t.pacs_id='"+ pacsId +"'"); + + while (rs.next()) { + + oDepositRateSlabBeanHeader.setpCodeSearch(rs.getString("prod_code") + " : " + rs.getString("prod_desc")); + oDepositRateSlabBeanHeader.setiCatSearch(rs.getString("int_cat") + " : " + rs.getString("intt_cat_desc")); + oDepositRateSlabBeanHeader.setProcStartDate(rs.getString("from_date")); + oDepositRateSlabBeanHeader.setProcEndDate(rs.getString("to_date")); + oDepositRateSlabBeanHeader.setDep_product_id(rs.getString("id")); + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + } + + statement.close(); + rs.close();; + + } catch (SQLException ex) { + // Logger.getLogger(DepositRateSlabServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + if (SeachFound == 0) { + message = "Product does not exist in the system or Product is not tagged to any Rate Slab entry"; + request.setAttribute("message", message); + } + + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(DepositRateSlabServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + + // String query = "select t.rate, t.term_from, t.term_to, t.from_amt, t.to_amt, t.id as slap_table_id,p.prod_code,p.int_cat,p.prod_desc,p.intt_cat_desc,t.product_id from TD_RATE_SLAB t,dep_product p where t.product_id = p.id and t.product_id = '" + dep_product_id + "' order by t.rate asc "; + String query = "select t.rate, t.term_from, t.term_to, t.from_amt, t.to_amt, t.id as slap_table_id,p.prod_code,p.int_cat,p.prod_desc,p.intt_cat_desc,t.product_id from TD_RATE_SLAB t,dep_product p where t.product_id = p.id and t.product_id = '" + dep_product_id + "' and t.pacs_id ='" + pacsId + "' order by t.rate asc "; + // ResultSet rs = statement.executeQuery(query); + + while (rs.next()) { + + oDepositRateSlabBean = new DepositRateSlabBean(); + oDepositRateSlabBean.setDep_product_id(rs.getString("product_id")); + oDepositRateSlabBean.setSlabTable_id(rs.getString("slap_table_id")); + oDepositRateSlabBean.setInttRate(rs.getString("rate")); + oDepositRateSlabBean.setAmountFrom(rs.getString("from_amt")); + oDepositRateSlabBean.setAmountTo(rs.getString("to_amt")); + oDepositRateSlabBean.setTermFrom(rs.getString("term_from")); + oDepositRateSlabBean.setTermTo(rs.getString("term_to")); + + + alDepositRateSlabBean.add(oDepositRateSlabBean); + + } + + statement.close(); + rs.close(); + + + } catch (SQLException ex) { + // Logger.getLogger(DepositRateSlabServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + connection.close(); + } + + // connection.close(); + + request.setAttribute("oDepositRateSlabBean", oDepositRateSlabBeanHeader); + request.setAttribute("alDepositRateSlabBean", alDepositRateSlabBean); + + request.getRequestDispatcher("/Deposit/DepositRateSlab.jsp").forward(request, response); + + } else if ("Update".equalsIgnoreCase(ServletName)) { + + //String procStartDateAmend = request.getParameter("procStartDateAmend"); + // String procEndDateAmend = request.getParameter("procEndDateAmend"); + int add = Integer.parseInt(request.getParameter("add")); + int counterfor_Detail = Integer.parseInt(request.getParameter("rowCounterAmend")); + counterfor_Detail = counterfor_Detail + add; + + for (int i = 1; i <= counterfor_Detail; i++) { + try { + + // String inttRateAmend = request.getParameter("inttRateAmend" + i); + // String termFromAmend = request.getParameter("termFromAmend" + i); + // String termToAmend = request.getParameter("termToAmend" + i); + // String amountFromAmend = request.getParameter("amountFromAmend" + i); + // String amountToAmend = request.getParameter("amountToAmend" + i); + String rowStatus = request.getParameter("rowStatus" + i); + // String detailID = request.getParameter("slabTable_id" + i); + + if ( inttRateAmend != null && termFromAmend != null && termToAmend != null && amountFromAmend != null && amountToAmend != null && rowStatus != null && detailID != null) { + oDepositRateSlabBean = new DepositRateSlabBean(); + oDepositRateSlabBean.setInttRateAmend(inttRateAmend); + oDepositRateSlabBean.setTermFromAmend(termFromAmend); + oDepositRateSlabBean.setTermToAmend(termToAmend); + oDepositRateSlabBean.setAmountFromAmend(amountFromAmend); + oDepositRateSlabBean.setAmountToAmend(amountToAmend); + oDepositRateSlabBean.setSlabTable_id(detailID); + + if (rowStatus.equals("N")) { + alDepositRateSlabBeanNew.add(oDepositRateSlabBean); + } else { + alDepositRateSlabBeanUpdated.add(oDepositRateSlabBean); + } + + + } + + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + + //For Deletion + + // String deletedRows = request.getParameter("deletedRows"); + + + if ((!deletedRows.equalsIgnoreCase(null)) || (!deletedRows.equalsIgnoreCase(""))) { + StringTokenizer tokenizer = new StringTokenizer(deletedRows, ","); + + while (tokenizer.hasMoreTokens()) { + + oDepositRateSlabBean = new DepositRateSlabBean(); + oDepositRateSlabBean.setSlabTable_id(tokenizer.nextToken()); + + alDepositRateSlabBeanDeleted.add(oDepositRateSlabBean); + + } + } + + + + + if (alDepositRateSlabBeanUpdated.size() > 0) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call operations.upsert_td_rate_slab(?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(DepositRateSlabServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + for (int j = 0; j < alDepositRateSlabBeanUpdated.size(); j++) { + + oDepositRateSlabBean = alDepositRateSlabBeanUpdated.get(j); + + + proc.setString(1, dep_product_id); + proc.setString(2, oDepositRateSlabBean.getSlabTable_id()); + proc.setString(3, oDepositRateSlabBean.getInttRateAmend()); + proc.setString(4, oDepositRateSlabBean.getTermFromAmend()); + proc.setString(5, oDepositRateSlabBean.getTermToAmend()); + proc.setString(6, oDepositRateSlabBean.getAmountFromAmend()); + proc.setString(7, oDepositRateSlabBean.getAmountToAmend()); + proc.setString(8, procStartDateAmend); + proc.setString(9, procEndDateAmend); + proc.setString(10, "Update"); + proc.setString(11, pacsId); + proc.setString(12, tellerId); + proc.registerOutParameter(13, java.sql.Types.VARCHAR); + + proc.execute(); + //proc.addBatch(); + } + //proc.executeBatch(); + // message = proc.getString(13); + + + } catch (SQLException ex) { + // Logger.getLogger(DepositRateSlabServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositRateSlabServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + + //for deletion + + if (alDepositRateSlabBeanDeleted.size() > 0) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call operations.upsert_td_rate_slab(?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(DepositRateSlabServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + for (int j = 0; j < alDepositRateSlabBeanDeleted.size(); j++) { + + oDepositRateSlabBean = new DepositRateSlabBean(); + + oDepositRateSlabBean = alDepositRateSlabBeanDeleted.get(j); + + + proc.setString(1, dep_product_id); + proc.setString(2, oDepositRateSlabBean.getSlabTable_id()); + proc.setString(3, oDepositRateSlabBean.getInttRateAmend()); + proc.setString(4, oDepositRateSlabBean.getTermFromAmend()); + proc.setString(5, oDepositRateSlabBean.getTermToAmend()); + proc.setString(6, oDepositRateSlabBean.getAmountFromAmend()); + proc.setString(7, oDepositRateSlabBean.getAmountToAmend()); + proc.setString(8, procStartDateAmend); + proc.setString(9, procEndDateAmend); + proc.setString(10, "Delete"); + proc.setString(11, pacsId); + proc.setString(12, tellerId); + proc.registerOutParameter(13, java.sql.Types.VARCHAR); + //proc.addBatch(); + proc.execute(); + //proc.executeBatch(); + } + //proc.executeBatch(); + // message = proc.getString(13); + + + } catch (SQLException ex) { + // Logger.getLogger(DepositRateSlabServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositRateSlabServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + + //For New Insertion + + + if (alDepositRateSlabBeanNew.size() > 0) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{call operations.upsert_td_rate_slab(?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(DepositRateSlabServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + for (int j = 0; j < alDepositRateSlabBeanNew.size(); j++) { + + oDepositRateSlabBean = new DepositRateSlabBean(); + + oDepositRateSlabBean = alDepositRateSlabBeanNew.get(j); + + + proc.setString(1, dep_product_id); + proc.setString(2, oDepositRateSlabBean.getSlabTable_id()); + proc.setString(3, oDepositRateSlabBean.getInttRateAmend()); + proc.setString(4, oDepositRateSlabBean.getTermFromAmend()); + proc.setString(5, oDepositRateSlabBean.getTermToAmend()); + proc.setString(6, oDepositRateSlabBean.getAmountFromAmend()); + proc.setString(7, oDepositRateSlabBean.getAmountToAmend()); + proc.setString(8, procStartDateAmend); + proc.setString(9, procEndDateAmend); + proc.setString(10, "Create"); + proc.setString(11, pacsId); + proc.setString(12, tellerId); + proc.registerOutParameter(13, java.sql.Types.VARCHAR); + + proc.execute(); + //proc.addBatch(); + } + //proc.executeBatch(); + // message = proc.getString(13); + + + } catch (SQLException ex) { + // Logger.getLogger(DepositRateSlabServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositRateSlabServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + + // message = "Rate Slab updated succesfully"; + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/DepositRateSlab.jsp").forward(request, response); + + } + + + + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + try { + processRequest(request, response); + + } catch (SQLException ex) { + // Logger.getLogger(DepositRateSlabServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + try { + processRequest(request, response); + + } catch (SQLException ex) { + // Logger.getLogger(DepositRateSlabServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/DepositServlet.java b/IPKS_Updated/src/src/java/Controller/DepositServlet.java new file mode 100644 index 0000000..c451733 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/DepositServlet.java @@ -0,0 +1,77 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 986137 + */ +public class DepositServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + + if( String.valueOf(session.getAttribute("moduleName")).equalsIgnoreCase("SpecialBothDep") || String.valueOf(session.getAttribute("moduleName")).equalsIgnoreCase("SpecialBothKcc")) + session.setAttribute("moduleName", "SpecialBothDep"); + else if(!String.valueOf(session.getAttribute("moduleName")).equalsIgnoreCase("Special")) + session.setAttribute("moduleName", "Deposit"); + + request.getRequestDispatcher("/welcome.jsp").forward(request, response); + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/DepositTransferClosureServlet.java b/IPKS_Updated/src/src/java/Controller/DepositTransferClosureServlet.java new file mode 100644 index 0000000..081b8a8 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/DepositTransferClosureServlet.java @@ -0,0 +1,261 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.DepositTransferBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.commons.beanutils.BeanUtils; +import javax.servlet.http.HttpSession; + +/** + * + * @author 986517 + */ +public class DepositTransferClosureServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet DepositTransferClosureServlet"); + out.println(""); + out.println(""); + out.println("

Servlet DepositTransferClosureServlet at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + Connection con = null; + CallableStatement proc = null; + String message = ""; + //String Account_type = ""; + String JSP = ""; + HttpSession session = request.getSession(); + JSP = request.getParameter("screenName") == null ? "" : (request.getParameter("screenName")); + DepositTransferBean oDepositTransferBean = new DepositTransferBean(); + + try { + //BeanUtils.populate(oDepositTransferBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(DepositGlTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(DepositGlTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + if ((oDepositTransferBean.getCheckOption().equalsIgnoreCase("d2c")) || (oDepositTransferBean.getCheckOption().equalsIgnoreCase("t2g"))) { + + try { + con = DbHandler.getDBConnection(); + try { + + proc = con.prepareCall("{ call POST_transfer_close(?,?,?,?,?,?,?,?,?,?) }"); + + } catch (SQLException ex) { + // Logger.getLogger(DepositGlTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + String pacsId = session.getAttribute("pacsId").toString(); + String makerId = session.getAttribute("user").toString(); + + proc.setString(1, pacsId); + proc.setString(2, makerId); + proc.setString(3, "DR"); + proc.setString(4, oDepositTransferBean.getAccNo_dd_from()); + if(oDepositTransferBean.getCheckOption().equalsIgnoreCase("d2c")) + proc.setString(5, oDepositTransferBean.getAccNo_dd_to()); + else if(oDepositTransferBean.getCheckOption().equalsIgnoreCase("t2g")) + proc.setString(5, oDepositTransferBean.getAccNo_gl_to()); + proc.setString(6, oDepositTransferBean.getTrAmount()); + proc.setString(7, oDepositTransferBean.getNarration()); + proc.setString(8, oDepositTransferBean.getCheckOption()); + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + proc.registerOutParameter(10, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(10); + + + } catch (SQLException ex) { + // Logger.getLogger(DepositGlTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositGlTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + } else if (oDepositTransferBean.getCheckOption().equalsIgnoreCase("c2c")) { + + + try { + con = DbHandler.getDBConnection(); + try { + + proc = con.prepareCall("{ call POST_transfer_closecash(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + + } catch (SQLException ex) { + // Logger.getLogger(DepositGlTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + String pacsId = session.getAttribute("pacsId").toString(); + String makerId = session.getAttribute("user").toString(); + // String twothouIN = (String) request.getParameter("twothouIN") == "" ? "0" : (request.getParameter("twothouIN")); + // String twothouOUT = request.getParameter("twothouOUT") == "" ? "0" : (request.getParameter("twothouOUT")); + // String fivehundredIN = request.getParameter("fivehundredIN") == "" ? "0" : (request.getParameter("fivehundredIN")); + // String fivehundredOUT = request.getParameter("fivehundredOUT") == "" ? "0" : (request.getParameter("fivehundredOUT")); + // String hundredIN = request.getParameter("hundredIN") == "" ? "0" : (request.getParameter("hundredIN")); + // String hundredOUT = request.getParameter("hundredOUT") == "" ? "0" : (request.getParameter("hundredOUT")); + // String fiftyIN = request.getParameter("fiftyIN") == "" ? "0" : (request.getParameter("fiftyIN")); + // String fiftyOUT = request.getParameter("fiftyOUT") == "" ? "0" : (request.getParameter("fiftyOUT")); + // String twentyIN = request.getParameter("twentyIN") == "" ? "0" : (request.getParameter("twentyIN")); + // String twentyOUT = request.getParameter("twentyOUT") == "" ? "0" : (request.getParameter("twentyOUT")); + // String tenIN = request.getParameter("tenIN") == "" ? "0" : (request.getParameter("tenIN")); + // String tenOUT = request.getParameter("tenOUT") == "" ? "0" : (request.getParameter("tenOUT")); + // String fiveIN = request.getParameter("fiveIN") == "" ? "0" : (request.getParameter("fiveIN")); + // String fiveOUT = request.getParameter("fiveOUT") == "" ? "0" : (request.getParameter("fiveOUT")); + // String twoIN = request.getParameter("twoIN") == "" ? "0" : (request.getParameter("twoIN")); + // String twoOUT = request.getParameter("twoOUT") == "" ? "0" : (request.getParameter("twoOUT")); + // String oneIN = request.getParameter("oneIN") == "" ? "0" : (request.getParameter("oneIN")); + // String oneOUT = request.getParameter("oneOUT") == "" ? "0" : (request.getParameter("oneOUT")); + // String fiftyPaisaIN = request.getParameter("fiftyPaisaIN") == "" ? "0" : (request.getParameter("fiftyPaisaIN")); + // String fiftyPaisaOUT = request.getParameter("fiftyPaisaOUT") == "" ? "0" : (request.getParameter("fiftyPaisaOUT")); + // String onePaisaIN = request.getParameter("onePaisaIN") == "" ? "0" : (request.getParameter("onePaisaIN")); + // String onePaisaOUT = request.getParameter("onePaisaOUT") == "" ? "0" : (request.getParameter("onePaisaOUT")); + // String twohundredIN = request.getParameter("twohundredIN") == "" ? "0" : (request.getParameter("twohundredIN")); + // String twohundredOUT = request.getParameter("twohundredOUT") == "" ? "0" : (request.getParameter("twohundredOUT")); + + + proc.setString(1, pacsId); + proc.setString(2, makerId); + proc.setString(3, "DR"); + proc.setString(4, oDepositTransferBean.getAccNo()); + proc.setString(6, oDepositTransferBean.getTrAmount()); + proc.setString(7, oDepositTransferBean.getNarration()); + proc.setString(5, "To_Cash"); + proc.setString(8, oDepositTransferBean.getCheckOption()); + proc.setString(9, twothouIN); + proc.setString(10, fivehundredIN); + proc.setString(11, hundredIN); + proc.setString(12, fiftyIN); + proc.setString(13, twentyIN); + proc.setString(14, tenIN); + proc.setString(15, fiveIN); + proc.setString(16, twoIN); + proc.setString(17, oneIN); + proc.setString(18, fiftyPaisaIN); + proc.setString(19, onePaisaIN); + proc.setString(20, twothouOUT); + proc.setString(21, fivehundredOUT); + proc.setString(22, hundredOUT); + proc.setString(23, fiftyOUT); + proc.setString(24, twentyOUT); + proc.setString(25, tenOUT); + proc.setString(26, fiveOUT); + proc.setString(27, twoOUT); + proc.setString(28, oneOUT); + proc.setString(29, fiftyPaisaOUT); + proc.setString(30, onePaisaOUT); + proc.registerOutParameter(31, java.sql.Types.VARCHAR); + proc.registerOutParameter(32, java.sql.Types.VARCHAR); + proc.setString(33, twohundredIN); + proc.setString(34, twohundredOUT); + + proc.execute(); + + //message = proc.getString(32); + + + } catch (SQLException ex) { + // Logger.getLogger(DepositGlTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositGlTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/DepositTransferClosure.jsp").forward(request, response); + + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} + diff --git a/IPKS_Updated/src/src/java/Controller/DepositTxnReversalServlet.java b/IPKS_Updated/src/src/java/Controller/DepositTxnReversalServlet.java new file mode 100644 index 0000000..21dead8 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/DepositTxnReversalServlet.java @@ -0,0 +1,138 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 1000974 + */ +public class DepositTxnReversalServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet txnReversalServlet"); + out.println(""); + out.println(""); + out.println("

Servlet txnReversalServlet at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + ResultSet rs = null; + String pacsId = (String) session.getAttribute("pacsId"); + String message=""; + // String jrnlNo= request.getParameter("jrnlNo"); + String txnType=request.getParameter("txnType"); + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call TXN_REVERSAL(?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(DepositTxnReversalServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.setString(1,jrnlNo); + proc.setString(2,pacsId); + proc.registerOutParameter(3, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(3); + } + catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + request.setAttribute("errorMessage", message); + request.getRequestDispatcher("/Deposit/ReverseTransaction.jsp").forward(request, response); + + } + + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} + diff --git a/IPKS_Updated/src/src/java/Controller/DesignationMasterServlet.java b/IPKS_Updated/src/src/java/Controller/DesignationMasterServlet.java new file mode 100644 index 0000000..5592231 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/DesignationMasterServlet.java @@ -0,0 +1,265 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.PayrollBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.sql.CallableStatement; +import java.sql.Statement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import java.lang.reflect.InvocationTargetException; + +/** + * + * @author Tcs Help desk122 + */ +public class DesignationMasterServlet extends HttpServlet { + + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + //String Action = request.getParameter("handle_id"); + //String checkOpt = request.getParameter("checkOption"); + + PayrollBean oPayrollBean = new PayrollBean(); + ArrayList alPayrollBean = new ArrayList(); + + try { + // BeanUtils.populate(oPayrollBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + System.out.println("Error occurred during processing."); + } + + if ("Create".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + // String designation = request.getParameter("designation" + i); + + if (designation != null) { + oPayrollBean = new PayrollBean(); + oPayrollBean.setDesignation(designation); + // oPayrollBean.setStatus(request.getParameter("status" + i)); + // oPayrollBean.setDesignation_id(request.getParameter("designation_id" + i)); + alPayrollBean.add(oPayrollBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alPayrollBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call payroll.designation_master_entry(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alPayrollBean.size(); j++) { + + oPayrollBean = alPayrollBean.get(j); + proc.setString(1, oPayrollBean.getDesignation_id()); + proc.setString(2, oPayrollBean.getDesignation()); + proc.setString(3, pacsId); + proc.setString(4, user); + proc.setString(5, Action); + proc.setString(6, oPayrollBean.getStatus()); + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + + proc.execute(); + //message = proc.getString(7); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Payroll/DesignationMaster.jsp").forward(request, response); + + } else if ("Amend".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter2")); + + for (int i = 2; i <= counter; i++) { + try { + + // String designation = request.getParameter("designation" + i); + + if (designation != null) { + oPayrollBean = new PayrollBean(); + oPayrollBean.setDesignation(designation); + // oPayrollBean.setStatus(request.getParameter("status" + i)); + // oPayrollBean.setDesignation_id(request.getParameter("designation_id" + i)); + alPayrollBean.add(oPayrollBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alPayrollBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call payroll.designation_master_entry(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alPayrollBean.size(); j++) { + + oPayrollBean = alPayrollBean.get(j); + proc.setString(1, oPayrollBean.getDesignation_id()); + proc.setString(2, oPayrollBean.getDesignation()); + proc.setString(3, pacsId); + proc.setString(4, user); + proc.setString(5, Action); + proc.setString(6, oPayrollBean.getStatus()); + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + + proc.execute(); + // message = proc.getString(7); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Payroll/DesignationMaster.jsp").forward(request, response); + + } else if ("getDetails".equalsIgnoreCase(Action)) { + + ResultSet resultset = null; + Statement statement = null; + + Connection connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + try { + // resultset = statement.executeQuery("select * from designation_master k where pacs_id ='" +pacsId+ "' "); + + while (resultset.next()) { + + oPayrollBean = new PayrollBean(); + oPayrollBean.setDesignation_id(resultset.getString("id")); + oPayrollBean.setDesignation(resultset.getString("designation")); + oPayrollBean.setStatus(resultset.getString("status")); + + alPayrollBean.add(oPayrollBean); + request.setAttribute("displayFlag", "Y"); + } + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + statement.close(); + resultset.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + } + // oPayrollBean.setCheckOption(checkOpt); + request.setAttribute("checkOption", checkOpt); + request.setAttribute("oPayrollBean", oPayrollBean); + request.setAttribute("arrPayrollBean", alPayrollBean); + request.getRequestDispatcher("/Payroll/DesignationMaster.jsp").forward(request, response); + } + } + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + } +} diff --git a/IPKS_Updated/src/src/java/Controller/DirectBenifitTransferServlet.java b/IPKS_Updated/src/src/java/Controller/DirectBenifitTransferServlet.java new file mode 100644 index 0000000..0da691d --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/DirectBenifitTransferServlet.java @@ -0,0 +1,165 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import LoginDb.DbHandler; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; +import javax.servlet.ServletOutputStream; + +/** + * + * @author 981898 + */ +public class DirectBenifitTransferServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet DirectBenifitTransferServlet"); + out.println(""); + out.println(""); + out.println("

Servlet DirectBenifitTransferServlet at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + + String pacsId = (String) session.getAttribute("pacsId"); + Connection con = null; + Statement proc = null; + //String from_date = request.getParameter("from_date"); + // String to_date = request.getParameter("to_date"); + String result = ""; + String qry=""; + System.out.println("Inside DirectBenifitTransferServlet"); + response.setContentType("application/octet-stream"); + response.setHeader("Content-Disposition","attachment;filename=DirectBenifitTransferReport.csv"); + + try { + + System.out.println("Inside try block"); + con = DbHandler.getDBConnection(); + proc = con.createStatement(); + qry="select rownum||','||a.txn_date||','||a.cbs_ref_no||','||a.ipks_account_no||','||a.cbs_acct||','||a.narration||','||a.txn_amt||','||A.SYSTEM_DT||','||A.PACS_NAME "; + qry = qry + "from (select to_char(n.tran_date, 'dd-Mon-yyyy') txn_date,n.cbs_ref_no cbs_ref_no,n.acct_no ipks_account_no,d.link_accno cbs_acct,substr(n.narration, 0, 11) narration,n.txn_amt,(SELECT SYSTEM_DATE FROM SYSTEM_DATE) SYSTEM_DT,PM.PACS_NAME PACS_NAME from dep_txn n, dep_account d, PACS_MASTER PM " + + " where n.acct_no = d.key_1 AND PM.PACS_ID = D.PACS_ID and d.dep_prod_id in (select P.ID from dep_product p where p.prod_code = '1101') and d.pacs_id = '" + pacsId + "' and (upper(n.narration) like '%ACH PAYMENT%' or upper(n.narration) like '%UIH PAYMENT%') and n.tran_date between to_date('" + from_date + + "', 'dd/mm/yyyy') and to_date('" + to_date + "', 'dd/mm/yyyy') order by to_date(n.tran_date, 'dd-mon-yyyy'), n.acct_no) a"; + System.out.println(qry); + //ResultSet rs = proc.executeQuery(qry); + + System.out.println("Query executed"); + result = "SL NO,DATE,REFERENCE NO,IPKS A/C NO,LINK A/C NO,NARRATION,AMOUNT"+"\r\n"; + if(!rs.isBeforeFirst()){ + result="NO DATA FOUND "; + } + while (rs.next()) { + String str = rs.getString(1); + if(str ==null) + break; + else + result = result + str + "\r\n"; + + } + + if(result!=null){ + result=result.substring(0,result.length()-2); + } + + System.out.println(result); + InputStream in = new ByteArrayInputStream(result.getBytes("UTF-8")); + ServletOutputStream out = response.getOutputStream(); + + byte[] outputByte = new byte[1024]; + //copy binary contect to output stream + int n =0; + // while ((n=in.read(outputByte, 0, 1024)) != -1) { + out.write(outputByte, 0, n); + } + in.close(); + out.flush(); + out.close(); + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } + finally { + try { + con.close(); + proc.close(); + } catch (SQLException ex) { + // Logger.getLogger(DirectBenifitTransferServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/DistScaleOfFinanceServlet.java b/IPKS_Updated/src/src/java/Controller/DistScaleOfFinanceServlet.java new file mode 100644 index 0000000..adf8c54 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/DistScaleOfFinanceServlet.java @@ -0,0 +1,340 @@ +package Controller; + +import DataEntryBean.DistScaleOfFinanceBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintStream; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + + + + + + + + + + + + + + + + + + + + + + + + + +public class DistScaleOfFinanceServlet + extends HttpServlet +{ + public DistScaleOfFinanceServlet() {} + + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException + { + HttpSession session = request.getSession(false); + Statement statement = null; + Connection con = null; + CallableStatement proc = null; + String message = ""; + int flag = 1; + String counter = request.getParameter("all_rowsAdded"); + String counter2 = request.getParameter("all_rowsAdded2"); + String user = (String)session.getAttribute("user"); + String handle = request.getParameter("handle_id"); + //String year = request.getParameter("checkYear2"); + //String code = request.getParameter("distCode2"); + //String name = request.getParameter("distName2"); + if (handle.equalsIgnoreCase("Create")) + { + DistScaleOfFinanceBean oDistScaleOfFinanceBean = new DistScaleOfFinanceBean(); + try { + // BeanUtils.populate(oDistScaleOfFinanceBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + flag = 0; + // Logger.getLogger(DistScaleOfFinanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + flag = 0; + // Logger.getLogger(DistScaleOfFinanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try + { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call dist_scale_finance(?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(DistScaleOfFinanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + int i = 1; + + while (i <= Integer.parseInt(counter) + 1) + { + if (request.getParameterMap().containsKey("chckbox" + i)) { + String val = request.getParameter("chckbox" + i); + + if (val.equalsIgnoreCase("1")) + { + // String totcost = request.getParameter("totalCost" + i); + proc.setString(1, oDistScaleOfFinanceBean.getDistCode()); + // proc.setString(2, request.getParameter("cropCode" + i)); + // proc.setString(3, request.getParameter("seedCost" + i)); + // proc.setString(4, request.getParameter("manureCost" + i)); + // proc.setString(5, request.getParameter("fertilizerCost" + i)); + // proc.setString(6, request.getParameter("pesticidesCost" + i)); + // proc.setString(7, request.getParameter("irrigationCost" + i)); + // proc.setString(8, request.getParameter("labourCost" + i)); + proc.setString(9, totcost); + // proc.setString(10, request.getParameter("checkYear")); + proc.registerOutParameter(11, java.sql.Types.VARCHAR); + proc.registerOutParameter(12, java.sql.Types.INTEGER); + + proc.execute(); + + // message = proc.getString(11); + } + } + i++; + } + } + catch (SQLException ex) { + flag = 0; + // Logger.getLogger(DistScaleOfFinanceServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } + finally { + try { + proc.close(); + } catch (SQLException e) { + flag = 0; + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + flag = 0; + // Logger.getLogger(DistScaleOfFinanceServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } + + if ((flag == 1) && ((message == null) || (message == ""))) + { + message = "Record successfully inserted"; + } + request.setAttribute("message", message); + request.getRequestDispatcher("/distScaleOfFinance.jsp").forward(request, response); + } + } + + + if (handle.equalsIgnoreCase("Fetch")) { + ArrayList alMyDistScaleOfFinanceBean = new ArrayList(); + DistScaleOfFinanceBean oDistScaleOfFinanceBean = new DistScaleOfFinanceBean(); + try + { + //BeanUtils.populate(oDistScaleOfFinanceBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(DistScaleOfFinanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(DistScaleOfFinanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try + { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call dist_scale_finance_amend(?,?,?,?,?) }"); + } + catch (SQLException ex) { + // Logger.getLogger(DistScaleOfFinanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + int i = 1; + ResultSet rs = null; + + //proc.setString(1, request.getParameter("checkYear2")); + // proc.setString(2, request.getParameter("distCode2")); + proc.registerOutParameter(3, -10); + proc.registerOutParameter(4, 12); + proc.registerOutParameter(5, 4); + + proc.execute(); + + // message = proc.getString(4); + // rs = (ResultSet)proc.getObject(3); + flag = 0; + while (rs.next()) + { + DistScaleOfFinanceBean DistScaleOfFinanceBeanObj = new DistScaleOfFinanceBean(); + + DistScaleOfFinanceBeanObj.setCropName(rs.getString("crop_name")); + DistScaleOfFinanceBeanObj.setCropCode(rs.getString("crop_code")); + DistScaleOfFinanceBeanObj.setSeedCost(rs.getString("seed_cost")); + DistScaleOfFinanceBeanObj.setManureCost(rs.getString("manure_cost")); + DistScaleOfFinanceBeanObj.setFertilizerCost(rs.getString("fertilizer_cost")); + DistScaleOfFinanceBeanObj.setPesticidesCost(rs.getString("pesticides_cost")); + DistScaleOfFinanceBeanObj.setIrrigationCost(rs.getString("irrigation_cost")); + DistScaleOfFinanceBeanObj.setLabourCost(rs.getString("labour_cost")); + DistScaleOfFinanceBeanObj.setTotalCost(rs.getString("total_cost")); + alMyDistScaleOfFinanceBean.add(DistScaleOfFinanceBeanObj); + request.setAttribute("displayFlag", "Y"); + flag = 1; + } + } + catch (SQLException ex) + { + flag = 0; + // Logger.getLogger(DistScaleOfFinanceServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + flag = 0; + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + flag = 0; + // Logger.getLogger(DistScaleOfFinanceServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } + + request.setAttribute("year", year); + request.setAttribute("code", code); + request.setAttribute("name", name); + request.setAttribute("oDistScaleOfFinanceBean", oDistScaleOfFinanceBean); + request.setAttribute("alMyDistScaleOfFinanceBean", alMyDistScaleOfFinanceBean); + + if ((flag == 0) && ((message == null) || (message == ""))) + { + message = "No records to display"; + } + request.setAttribute("message", message); + + request.getRequestDispatcher("/distScaleOfFinance.jsp").forward(request, response); + } + } + + + if (handle.equalsIgnoreCase("Update")) + { + DistScaleOfFinanceBean oDistScaleOfFinanceBean = new DistScaleOfFinanceBean(); + PreparedStatement ps = null; + try { + // BeanUtils.populate(oDistScaleOfFinanceBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + flag = 0; + // Logger.getLogger(DistScaleOfFinanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + flag = 0; + // Logger.getLogger(DistScaleOfFinanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try + { + con = DbHandler.getDBConnection(); + try + { + String q = "update dist_scale_of_finance set seed_cost=?,manure_cost=?,fertilizer_cost=?,pesticides_cost=?,irrigation_cost=?,labour_cost=?,total_cost=? where financial_year=? and dist_code=? and crop_name=?"; + ps = con.prepareStatement(q); + } catch (SQLException ex) { + flag = 0; + // Logger.getLogger(DistScaleOfFinanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + int i = 1; + flag = 0; + while (i <= Integer.parseInt(counter2)) + { + + + // String totcost = request.getParameter("totalCostTwo" + i); + //ps.setString(1, request.getParameter("seedCostTwo" + i)); + // ps.setString(2, request.getParameter("manureCostTwo" + i)); + //ps.setString(3, request.getParameter("fertilizerCostTwo" + i)); + // ps.setString(4, request.getParameter("pesticidesCostTwo" + i)); + // ps.setString(5, request.getParameter("irrigationCostTwo" + i)); + // ps.setString(6, request.getParameter("labourCostTwo" + i)); + // ps.setString(7, totcost); + // ps.setString(8, request.getParameter("checkYear2")); + // ps.setString(9, request.getParameter("distCode2")); + // ps.setString(10, request.getParameter("cropCodeTwo" + i)); + + + ps.executeUpdate(); + flag = 1; + + + i++; + } + } + catch (SQLException ex) { + flag = 0; + // Logger.getLogger(DistScaleOfFinanceServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + ps.close(); + } catch (SQLException e) { + flag = 0; + // System.out.println(e.toString()); + System.out.println("Error occurred during statement close."); + } + try { + con.close(); + } catch (SQLException ex) { + flag = 0; + // Logger.getLogger(DistScaleOfFinanceServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + + if ((flag == 1) && ((message == null) || (message == ""))) + { + message = "Records successfully updated"; + } + request.setAttribute("message", message); + request.getRequestDispatcher("/distScaleOfFinance.jsp").forward(request, response); + } + } + } +} diff --git a/IPKS_Updated/src/src/java/Controller/DownloadExcelServlet.java b/IPKS_Updated/src/src/java/Controller/DownloadExcelServlet.java new file mode 100644 index 0000000..cb5eedb --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/DownloadExcelServlet.java @@ -0,0 +1,115 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * + * @author 590685 + */ +public class DownloadExcelServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet DownloadExcelServlet"); + out.println(""); + out.println(""); + out.println("

Servlet DownloadExcelServlet at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + File reportFile = new File(request.getSession(false).getServletContext().getRealPath("/Reports/SampleExcel.xls")); +// String directoryName = getServletContext().getRealPath("/WEB-INF/SampleTemplate"); +// +// File dir = new File(directoryName); +// String[] children = dir.list(); +// String filename=""; +// +// for (int i=0; i + +} diff --git a/IPKS_Updated/src/src/java/Controller/DownloadPacsReport.java b/IPKS_Updated/src/src/java/Controller/DownloadPacsReport.java new file mode 100644 index 0000000..785d549 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/DownloadPacsReport.java @@ -0,0 +1,97 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 454222 + */ +public class DownloadPacsReport extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session=request.getSession(false); + // String date = request.getParameter("datepicker"); + //String directoryName = date.split("/")[0] + date.split("/")[1] + date.split("/")[2]; + String directoryName = date.split("/")[2] + date.split("/")[1] + date.split("/")[0]; + String filePath = getServletContext().getInitParameter("pacs-report") + File.separator + session.getAttribute("pacsId").toString() + File.separator + directoryName; + try { + File folder = new File(filePath); + File[] listOfFiles = folder.listFiles(); + ArrayList alFileName = new ArrayList(); + for (int i = 0; i < listOfFiles.length; i++) { + if (listOfFiles[i].isFile()) { + alFileName.add(listOfFiles[i].getName()); + } else if (listOfFiles[i].isDirectory()) { + //System.out.println("Directory " + listOfFiles[i].getName()); + } + } + if (alFileName.size() == 0) { + request.setAttribute("error", "No Report for Date : " + date); + } else { + request.setAttribute("alFileName", alFileName); + } + } catch (Exception ex) { + request.setAttribute("error", "No Report for Date : " + date); + } finally { + request.setAttribute("datepicker", date); + request.getRequestDispatcher("PACS_REPORT.jsp").forward(request, response); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/EmployeeDependentMasterServlet.java b/IPKS_Updated/src/src/java/Controller/EmployeeDependentMasterServlet.java new file mode 100644 index 0000000..934118b --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/EmployeeDependentMasterServlet.java @@ -0,0 +1,289 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.PayrollBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.sql.CallableStatement; +import java.sql.Statement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import java.lang.reflect.InvocationTargetException; + +/** + * + * @author Tcs Help desk122 + */ +public class EmployeeDependentMasterServlet extends HttpServlet { + + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + // String Action = request.getParameter("handle_id"); + //String checkOpt = request.getParameter("checkOption"); + + PayrollBean oPayrollBean = new PayrollBean(); + ArrayList alPayrollBean = new ArrayList(); + + try { + //BeanUtils.populate(oPayrollBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + System.out.println("Error occurred during processing."); + } + + if ("Create".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + String employee = request.getParameter("employee" + i); + + if (employee != null) { + oPayrollBean = new PayrollBean(); + oPayrollBean.setEmployee(employee); + // oPayrollBean.setDependent(request.getParameter("dependent" + i)); + // oPayrollBean.setDob(request.getParameter("dob" + i)); + // oPayrollBean.setRelation(request.getParameter("relation" + i)); + // oPayrollBean.setNominee(request.getParameter("nominee" + i)); + // oPayrollBean.setStatus(request.getParameter("status" + i)); + // oPayrollBean.setEmployee_id(request.getParameter("employee_id" + i)); + // oPayrollBean.setId(request.getParameter("id" + i)); + alPayrollBean.add(oPayrollBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alPayrollBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call payroll.employee_dependent_master_entry(?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alPayrollBean.size(); j++) { + + oPayrollBean = alPayrollBean.get(j); + proc.setString(1, oPayrollBean.getId()); + proc.setString(2, oPayrollBean.getEmployee_id()); + proc.setString(3, pacsId); + proc.setString(4, oPayrollBean.getDependent()); + proc.setString(5, oPayrollBean.getDob()); + proc.setString(6, oPayrollBean.getRelation()); + proc.setString(7, oPayrollBean.getNominee()); + proc.setString(8, user); + proc.setString(9, Action); + proc.setString(10, oPayrollBean.getStatus()); + proc.registerOutParameter(11, java.sql.Types.VARCHAR); + + proc.execute(); + // message = proc.getString(11); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Payroll/EmployeeDependentMaster.jsp").forward(request, response); + + } else if ("Amend".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter2")); + + for (int i = 2; i <= counter; i++) { + try { + + String employee = request.getParameter("employee" + i); + + if (employee != null) { + oPayrollBean = new PayrollBean(); + oPayrollBean.setEmployee(employee); + //oPayrollBean.setDependent(request.getParameter("dependent" + i)); + //oPayrollBean.setDob(request.getParameter("dob" + i)); + // oPayrollBean.setRelation(request.getParameter("relation" + i)); + // oPayrollBean.setNominee(request.getParameter("nominee" + i)); + //oPayrollBean.setStatus(request.getParameter("status" + i)); + // oPayrollBean.setEmployee_id(request.getParameter("employee_id" + i)); + //oPayrollBean.setId(request.getParameter("id" + i)); + alPayrollBean.add(oPayrollBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alPayrollBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call payroll.employee_dependent_master_entry(?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alPayrollBean.size(); j++) { + + oPayrollBean = alPayrollBean.get(j); + proc.setString(1, oPayrollBean.getId()); + proc.setString(2, oPayrollBean.getEmployee_id()); + proc.setString(3, pacsId); + proc.setString(4, oPayrollBean.getDependent()); + proc.setString(5, oPayrollBean.getDob()); + proc.setString(6, oPayrollBean.getRelation()); + proc.setString(7, oPayrollBean.getNominee()); + proc.setString(8, user); + proc.setString(9, Action); + proc.setString(10, oPayrollBean.getStatus()); + proc.registerOutParameter(11, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + // message = proc.getString(11); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Payroll/EmployeeDependentMaster.jsp").forward(request, response); + + } else if ("getDetails".equalsIgnoreCase(Action)) { + + ResultSet resultset = null; + Statement statement = null; + + Connection connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + try { + // resultset = statement.executeQuery("select id, emp_id, (select emp_id from employee_master w where w.id= p.emp_id)emp_no, (select k.first_name || ' ' || k.middle_name || ' ' || k.last_name from kyc_hdr k where k.cif_no = (select e.cif_no from employee_master e where e.id = p.emp_id)) name, dependent_name, to_char(dob, 'dd/mm/yyyy') dob, relation, nominee_flag, status from employee_dependent_master p where pacs_id = '" +pacsId+ "' order by 2 "); + + while (resultset.next()) { + + oPayrollBean = new PayrollBean(); + oPayrollBean.setId(resultset.getString("id")); + oPayrollBean.setEmployee_id(resultset.getString("emp_id")); + oPayrollBean.setEmployee(resultset.getString("emp_no")); + oPayrollBean.setEname(resultset.getString("name")); + oPayrollBean.setDependent(resultset.getString("dependent_name")); + oPayrollBean.setDob(resultset.getString("dob")); + oPayrollBean.setRelation(resultset.getString("relation")); + oPayrollBean.setNominee(resultset.getString("nominee_flag")); + oPayrollBean.setStatus(resultset.getString("status")); + + alPayrollBean.add(oPayrollBean); + request.setAttribute("displayFlag", "Y"); + } + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + statement.close(); + resultset.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + } + // oPayrollBean.setCheckOption(checkOpt); + request.setAttribute("checkOption", checkOpt); + request.setAttribute("oPayrollBean", oPayrollBean); + request.setAttribute("arrPayrollBean", alPayrollBean); + request.getRequestDispatcher("/Payroll/EmployeeDependentMaster.jsp").forward(request, response); + } + } + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + } +} diff --git a/IPKS_Updated/src/src/java/Controller/EmployeeMasterServlet.java b/IPKS_Updated/src/src/java/Controller/EmployeeMasterServlet.java new file mode 100644 index 0000000..b0580d6 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/EmployeeMasterServlet.java @@ -0,0 +1,350 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.PayrollBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.sql.CallableStatement; +import java.sql.Statement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import java.lang.reflect.InvocationTargetException; + +/** + * + * @author Tcs Help desk122 + */ +public class EmployeeMasterServlet extends HttpServlet { + + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + //String Action = request.getParameter("handle_id"); + //String checkOpt = request.getParameter("checkOption"); + + PayrollBean oPayrollBean = new PayrollBean(); + ArrayList alPayrollBean = new ArrayList(); + + try { + // BeanUtils.populate(oPayrollBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + System.out.println("Error occurred during processing."); + } + + if ("Create".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + // String employee = request.getParameter("employee" + i); + + if (employee != null) { + oPayrollBean = new PayrollBean(); + oPayrollBean.setEmployee(employee); + //oPayrollBean.setCif(request.getParameter("cif" + i)); + // oPayrollBean.setJoinDate(request.getParameter("joinDate" + i)); + // oPayrollBean.setConfirmDate(request.getParameter("confirmDate" + i)); + // oPayrollBean.setRetireDate(request.getParameter("retireDate" + i)); + // oPayrollBean.setDesignationCode(request.getParameter("designationCode" + i)); + // oPayrollBean.setSalaryAcc(request.getParameter("salaryAcc" + i)); + //oPayrollBean.setGradeCode(request.getParameter("gradeCode" + i)); + // oPayrollBean.setBasicAmt(request.getParameter("basicAmt" + i)); + // oPayrollBean.setDaRate(request.getParameter("daRate" + i)); + // oPayrollBean.setDaAmt(request.getParameter("daAmt" + i)); + // oPayrollBean.setMsaAmt(request.getParameter("msaAmt" + i)); + // oPayrollBean.setEpfStaffRate(request.getParameter("epfStaffRate" + i)); + // oPayrollBean.setEpfStaffAmt(request.getParameter("epfStaffAmt" + i)); + // oPayrollBean.setEpfSocRate(request.getParameter("epfSocRate" + i)); + // oPayrollBean.setEpfSocAmt(request.getParameter("epfSocAmt" + i)); + // oPayrollBean.setTaxAmt(request.getParameter("taxAmt" + i)); + // oPayrollBean.setOtherAmt(request.getParameter("otherAmt" + i)); + // oPayrollBean.setStatus(request.getParameter("status" + i)); + // oPayrollBean.setEmployee_id(request.getParameter("employee_id" + i)); + alPayrollBean.add(oPayrollBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alPayrollBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call payroll.employee_master_entry(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alPayrollBean.size(); j++) { + + oPayrollBean = alPayrollBean.get(j); + proc.setString(1, oPayrollBean.getEmployee_id()); + proc.setString(2, oPayrollBean.getEmployee()); + proc.setString(3, pacsId); + proc.setString(4, oPayrollBean.getCif()); + proc.setString(5, oPayrollBean.getJoinDate()); + proc.setString(6, oPayrollBean.getConfirmDate()); + proc.setString(7, oPayrollBean.getRetireDate()); + proc.setString(8, oPayrollBean.getDesignationCode()); + proc.setString(9, oPayrollBean.getSalaryAcc()); + proc.setString(10, oPayrollBean.getGradeCode()); + proc.setString(11, oPayrollBean.getBasicAmt()); + proc.setString(12, oPayrollBean.getDaRate()); + proc.setString(13, oPayrollBean.getDaAmt()); + proc.setString(14, oPayrollBean.getMsaAmt()); + proc.setString(15, oPayrollBean.getEpfStaffRate()); + proc.setString(16, oPayrollBean.getEpfStaffAmt()); + proc.setString(17, oPayrollBean.getEpfSocRate()); + proc.setString(18, oPayrollBean.getEpfSocAmt()); + proc.setString(19, oPayrollBean.getTaxAmt()); + proc.setString(20, oPayrollBean.getOtherAmt()); + proc.setString(21, user); + proc.setString(22, Action); + proc.setString(23, oPayrollBean.getStatus()); + proc.registerOutParameter(24, java.sql.Types.VARCHAR); + + proc.execute(); + // message = proc.getString(24); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Payroll/EmployeeMaster.jsp").forward(request, response); + + } else if ("Amend".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter2")); + + for (int i = 2; i <= counter; i++) { + try { + + // String employee = request.getParameter("employee" + i); + + if (employee != null) { + oPayrollBean = new PayrollBean(); + oPayrollBean.setEmployee(employee); + // oPayrollBean.setCif(request.getParameter("cif" + i)); + // oPayrollBean.setJoinDate(request.getParameter("joinDate" + i)); + // oPayrollBean.setConfirmDate(request.getParameter("confirmDate" + i)); + // oPayrollBean.setRetireDate(request.getParameter("retireDate" + i)); + // oPayrollBean.setDesignationCode(request.getParameter("designationCode" + i)); + // oPayrollBean.setSalaryAcc(request.getParameter("salaryAcc" + i)); + // oPayrollBean.setGradeCode(request.getParameter("gradeCode" + i)); + // oPayrollBean.setBasicAmt(request.getParameter("basicAmt" + i)); + // oPayrollBean.setDaRate(request.getParameter("daRate" + i)); + // oPayrollBean.setDaAmt(request.getParameter("daAmt" + i)); + // oPayrollBean.setMsaAmt(request.getParameter("msaAmt" + i)); + // oPayrollBean.setEpfStaffRate(request.getParameter("epfStaffRate" + i)); + // oPayrollBean.setEpfStaffAmt(request.getParameter("epfStaffAmt" + i)); + // oPayrollBean.setEpfSocRate(request.getParameter("epfSocRate" + i)); + // oPayrollBean.setEpfSocAmt(request.getParameter("epfSocAmt" + i)); + // oPayrollBean.setTaxAmt(request.getParameter("taxAmt" + i)); + // oPayrollBean.setOtherAmt(request.getParameter("otherAmt" + i)); + // oPayrollBean.setStatus(request.getParameter("status" + i)); + // oPayrollBean.setEmployee_id(request.getParameter("employee_id" + i)); + alPayrollBean.add(oPayrollBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alPayrollBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call payroll.employee_master_entry(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alPayrollBean.size(); j++) { + + oPayrollBean = alPayrollBean.get(j); + proc.setString(1, oPayrollBean.getEmployee_id()); + proc.setString(2, oPayrollBean.getEmployee()); + proc.setString(3, pacsId); + proc.setString(4, oPayrollBean.getCif()); + proc.setString(5, oPayrollBean.getJoinDate()); + proc.setString(6, oPayrollBean.getConfirmDate()); + proc.setString(7, oPayrollBean.getRetireDate()); + proc.setString(8, oPayrollBean.getDesignationCode()); + proc.setString(9, oPayrollBean.getSalaryAcc()); + proc.setString(10, oPayrollBean.getGradeCode()); + proc.setString(11, oPayrollBean.getBasicAmt()); + proc.setString(12, oPayrollBean.getDaRate()); + proc.setString(13, oPayrollBean.getDaAmt()); + proc.setString(14, oPayrollBean.getMsaAmt()); + proc.setString(15, oPayrollBean.getEpfStaffRate()); + proc.setString(16, oPayrollBean.getEpfStaffAmt()); + proc.setString(17, oPayrollBean.getEpfSocRate()); + proc.setString(18, oPayrollBean.getEpfSocAmt()); + proc.setString(19, oPayrollBean.getTaxAmt()); + proc.setString(20, oPayrollBean.getOtherAmt()); + proc.setString(21, user); + proc.setString(22, Action); + proc.setString(23, oPayrollBean.getStatus()); + proc.registerOutParameter(24, java.sql.Types.VARCHAR); + + proc.execute(); + // message = proc.getString(24); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Payroll/EmployeeMaster.jsp").forward(request, response); + + } else if ("getDetails".equalsIgnoreCase(Action)) { + + ResultSet resultset = null; + Statement statement = null; + + Connection connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + try { + // resultset = statement.executeQuery("select id, emp_id, pacs_id, cif_no, to_char(date_of_joining, 'dd/mm/yyyy')date_of_joining, to_char(date_of_confirm, 'dd/mm/yyyy')date_of_confirm, to_char(date_of_retirement, 'dd/mm/yyyy')date_of_retirement, designation_code, salary_account_no, grade_code, basic, da_rate, da_amount, msa, epf_staff_rate, epf_staff_amount, epf_soc_rate, epf_soc_amount, p_tax, other_deduction, status, (select ki.first_name || ' ' || ki.middle_name || ' ' || ki.last_name from kyc_hdr ki where ki.cif_no =l.cif_no ) emp_name from employee_master l where l.pacs_id = '" +pacsId+ "' "); + + while (resultset.next()) { + + oPayrollBean = new PayrollBean(); + oPayrollBean.setEmployee_id(resultset.getString("id")); + oPayrollBean.setEmployee(resultset.getString("emp_id")); + oPayrollBean.setCif(resultset.getString("cif_no")); + oPayrollBean.setEname(resultset.getString("emp_name")); + oPayrollBean.setJoinDate(resultset.getString("date_of_joining")); + oPayrollBean.setConfirmDate(resultset.getString("date_of_confirm")); + oPayrollBean.setRetireDate(resultset.getString("date_of_retirement")); + oPayrollBean.setDesignationCode(resultset.getString("designation_code")); + oPayrollBean.setSalaryAcc(resultset.getString("salary_account_no")); + oPayrollBean.setGradeCode(resultset.getString("grade_code")); + oPayrollBean.setBasicAmt(resultset.getString("basic")); + oPayrollBean.setDaRate(resultset.getString("da_rate")); + oPayrollBean.setDaAmt(resultset.getString("da_amount")); + oPayrollBean.setMsaAmt(resultset.getString("msa")); + oPayrollBean.setEpfStaffRate(resultset.getString("epf_staff_rate")); + oPayrollBean.setEpfStaffAmt(resultset.getString("epf_staff_amount")); + oPayrollBean.setEpfSocRate(resultset.getString("epf_soc_rate")); + oPayrollBean.setEpfSocAmt(resultset.getString("epf_soc_amount")); + oPayrollBean.setTaxAmt(resultset.getString("p_tax")); + oPayrollBean.setOtherAmt(resultset.getString("other_deduction")); + oPayrollBean.setStatus(resultset.getString("status")); + + alPayrollBean.add(oPayrollBean); + request.setAttribute("displayFlag", "Y"); + } + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + statement.close(); + resultset.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + } + request.setAttribute("checkOption", checkOpt); + request.setAttribute("oPayrollBean", oPayrollBean); + request.setAttribute("arrPayrollBean", alPayrollBean); + request.getRequestDispatcher("/Payroll/EmployeeMaster.jsp").forward(request, response); + } + } + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + } +} diff --git a/IPKS_Updated/src/src/java/Controller/EnquiryServlet.java b/IPKS_Updated/src/src/java/Controller/EnquiryServlet.java new file mode 100644 index 0000000..eac8fa5 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/EnquiryServlet.java @@ -0,0 +1,1661 @@ + +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.EnquiryBean; +import DataEntryBean.GLTransactionEnquiryBean; +import DataEntryBean.GlAccountEnquiryBean; +import DataEntryBean.TransactionEnquiryBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import oracle.jdbc.OracleTypes; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author Tcs Helpdesk10 + */ +public class EnquiryServlet extends HttpServlet { + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + CallableStatement proc = null; + int searchFound = 0; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String headPacsId = (String) session.getAttribute("headPacsId"); + + String JSP_Name = request.getParameter("screenName"); + // String subpacs_id = request.getParameter("subpacs_id"); + + + //For Pagination + + int page = 1; + int recordsPerPage = 10; + String but_type = request.getParameter("but_type"); + if (request.getParameter("page") != null + && !(request.getParameter("page").equals("")) && !(request.getParameter("page").equals("null"))) { + // page = Integer.parseInt(request.getParameter("page")); + if (null != but_type && !(but_type.equals(""))) { + if (but_type.equals("N")) { + page = page + 1; + } else { + page = page - 1; + } + } + + } + + int startRow = 0; + int endRow = 0; + startRow = (page - 1) * recordsPerPage + 1; + endRow = page * recordsPerPage; + int recordCount = 0; + int totalRecordCount = 0; + //totalRecordCount = Integer.parseInt(request.getParameter("totalRecordCount")); + + //End of pagination + + + if ("accountEnquiry".equalsIgnoreCase(JSP_Name)) { + + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + ArrayList alEnquiryBean = new ArrayList(); + try { + // BeanUtils.populate(oEnquiryBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call ENQUIRY.Account_Enquiry(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + proc.setString(1, oEnquiryBean.getAccountNo()); + proc.setString(2, oEnquiryBean.getFromDate()); + proc.setString(3, oEnquiryBean.getToDate()); + proc.setString(4, oEnquiryBean.getProductName()); + proc.setString(5, oEnquiryBean.getFromAmount()); + proc.setString(6, oEnquiryBean.getToAmount()); + proc.setString(7, oEnquiryBean.getLinkedSbAccount()); + proc.setString(8, pacsId); + proc.setInt(9, startRow); + proc.setInt(10, endRow); + proc.registerOutParameter(11, OracleTypes.CURSOR); + proc.registerOutParameter(12, java.sql.Types.VARCHAR); + proc.registerOutParameter(13, java.sql.Types.INTEGER); + proc.setString(14, oEnquiryBean.getSubpacs_id()); + proc.setString(15, oEnquiryBean.getOldAccNo()); + proc.setString(16, oEnquiryBean.getOldCifNo()); + proc.setString(17, oEnquiryBean.getCifNumber()); + + proc.executeUpdate(); + + // rs = (ResultSet) proc.getObject(11); + //recordCount = proc.getInt(13); + + while (rs.next()) { + searchFound = 1; + oEnquiryBean = new EnquiryBean(); + oEnquiryBean.setAccountNo(rs.getString("KEY_1")); + oEnquiryBean.setAccountOpenDate(rs.getString("ACCT_OPEN_DT")); + oEnquiryBean.setAvailBalance(rs.getString("AVAIL_BAL")); + oEnquiryBean.setCustomerNo(rs.getString("CUSTOMER_NO")); + oEnquiryBean.setSanctionAmount(rs.getString("SANCTION_AMT")); + oEnquiryBean.setPrinOutstanding(rs.getString("PRIN_OUTST")); + oEnquiryBean.setInttOutstanding(rs.getString("INTT_OUTST")); + oEnquiryBean.setPenalIntt(rs.getString("PENAL_INTT_PAID")); + oEnquiryBean.setCustomerName(rs.getString("cust_name")); + + //added later + oEnquiryBean.setProductNameDisplay(rs.getString("PROD_NAME")); + oEnquiryBean.setLimitExpiryDate(rs.getString("LIMIT_EXP_DATE")); + oEnquiryBean.setPrinPaid(rs.getString("PRIN_PAID")); + oEnquiryBean.setInttPaid(rs.getString("INTT_PAID")); + oEnquiryBean.setPenalInttOutstanding(rs.getString("PENAL_INTT_OUTST")); + oEnquiryBean.setLinkAccNo(rs.getString("LINK_ACCNO")); + oEnquiryBean.setPrinOverdue(rs.getString("PRIN_OVERDUE")); + oEnquiryBean.setOldAccNo(rs.getString("old_accno")); + oEnquiryBean.setInttrate(rs.getString("INTT_RATE")); + oEnquiryBean.setPenalIntRate(rs.getString("PENAL_INTT_RATE")); + oEnquiryBean.setNPAINTTPAID(rs.getString("NPA_INTT_PAID")); + oEnquiryBean.setNPAINTTOUTST(rs.getString("NPA_INTT_OUTST")); + oEnquiryBean.setTotaloutst(rs.getString("total_outst")); + oEnquiryBean.setintAccrued(rs.getString("total_intt_accrued")); + oEnquiryBean.setCurr_Status(rs.getString("CURR_STATUS")); + oEnquiryBean.setOldCifNo(rs.getString("old_cif")); + alEnquiryBean.add(oEnquiryBean); + request.setAttribute("displayFlag", "Y"); + + } + + //For pagination + + int noOfRecords = alEnquiryBean.size(); + int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage); + + request.setAttribute("noOfPages", noOfPages); + request.setAttribute("currentPage", page); + request.setAttribute("totalRecordCount", totalRecordCount); + request.setAttribute("recordCount", recordCount); + request.setAttribute("noOfRecords", noOfRecords); + + //End Of Pagination + + try { + // connection = DbHandler.getDBConnection(); + // String productName = request.getParameter("productName"); + statement = connection.createStatement(); + //ResultSet rs1 = statement.executeQuery("select prod_name from dep_product where id='" + productName + "'"); + while (rs1.next()) { + oEnquiryBeanSearch.setProductName(rs1.getString(1)); + + } + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + + } + + //oEnquiryBeanSearch.setProductId(request.getParameter("productName")); + //oEnquiryBeanSearch.setAccountNo(request.getParameter("accountNo")); + //oEnquiryBeanSearch.setFromDate(request.getParameter("fromDate")); + //oEnquiryBeanSearch.setToDate(request.getParameter("toDate")); + //oEnquiryBeanSearch.setFromAmount(request.getParameter("fromAmount")); + //oEnquiryBeanSearch.setToAmount(request.getParameter("toAmount")); + //oEnquiryBeanSearch.setLinkedSbAccount(request.getParameter("linkedSbAccount")); + //oEnquiryBeanSearch.setOldAccNo(request.getParameter("oldAccNo")); + //oEnquiryBeanSearch.setCifNumber(request.getParameter("cifNumber")); + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error Occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + } + if (searchFound == 0) { + message = "No data exists for selected item"; + request.setAttribute("message", message); + } + request.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearch); + request.setAttribute("alEnquiryBean", alEnquiryBean); + request.setAttribute("message", message); + + request.getRequestDispatcher("/accountEnquiry.jsp").forward(request, response); + + } else if ("transactionEnquiry".equalsIgnoreCase(JSP_Name)) { + + TransactionEnquiryBean oTransactionEnquiryBeanSearch = new TransactionEnquiryBean(); + TransactionEnquiryBean oTransactionEnquiryBean = new TransactionEnquiryBean(); + + ArrayList alTransactionEnquiryBean = new ArrayList(); + try { + // BeanUtils.populate(oTransactionEnquiryBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call Enquiry.Transaction_Enquiry(?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + } + proc.setString(1, oTransactionEnquiryBean.getAccountNo()); + proc.setString(2, oTransactionEnquiryBean.getFromDate()); + proc.setString(3, oTransactionEnquiryBean.getToDate()); + proc.setString(4, oTransactionEnquiryBean.getProductName()); + proc.setString(5, oTransactionEnquiryBean.getFromAmount()); + proc.setString(6, oTransactionEnquiryBean.getToAmount()); + proc.setString(7, oTransactionEnquiryBean.getLinkedSbAccount()); + proc.setString(8, pacsId); + proc.setInt(9, startRow); + proc.setInt(10, endRow); + proc.registerOutParameter(11, OracleTypes.CURSOR); + proc.registerOutParameter(12, java.sql.Types.VARCHAR); + proc.registerOutParameter(13, java.sql.Types.INTEGER); + proc.setString(14, oTransactionEnquiryBean.getSubpacs_id()); + + proc.executeUpdate(); + + // rs = (ResultSet) proc.getObject(11); + //recordCount = proc.getInt(13); + + while (rs.next()) { + searchFound = 1; + oTransactionEnquiryBean = new TransactionEnquiryBean(); + oTransactionEnquiryBean.setAccountNo(rs.getString("KEY_1")); + oTransactionEnquiryBean.setCbs_Ref_No(rs.getString("cbs_ref_no")); + oTransactionEnquiryBean.setTransactionDate(rs.getString("tran_date")); + oTransactionEnquiryBean.setJournalNumber(rs.getString("jrnl_no")); + oTransactionEnquiryBean.setTransactionType(rs.getString("txn_type")); + oTransactionEnquiryBean.setTransactionAmount(rs.getString("txn_amt")); + oTransactionEnquiryBean.setNarration(rs.getString("narration")); + //added later + oTransactionEnquiryBean.setProductNameDisplay(rs.getString("PROD_NAME")); + oTransactionEnquiryBean.setLimitExpiryDate(rs.getString("LIMIT_EXP_DATE")); + oTransactionEnquiryBean.setAvailableBalance(rs.getString("END_BAL")); + oTransactionEnquiryBean.setLinkAccNo(rs.getString("LINK_ACCNO")); + alTransactionEnquiryBean.add(oTransactionEnquiryBean); + + request.setAttribute("displayFlag", "Y"); + + } + + //For pagination + + int noOfRecords = alTransactionEnquiryBean.size(); + int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage); + + request.setAttribute("noOfPages", noOfPages); + request.setAttribute("currentPage", page); + request.setAttribute("totalRecordCount", totalRecordCount); + request.setAttribute("recordCount", recordCount); + request.setAttribute("noOfRecords", noOfRecords); + + //End Of Pagination + + try { + String productName; + // connection = DbHandler.getDBConnection(); + // productName = request.getParameter("productName"); + statement = connection.createStatement(); + // ResultSet rs1 = statement.executeQuery("select prod_name from dep_product where id='" + productName + "'"); + while (rs1.next()) { + oTransactionEnquiryBeanSearch.setProductName(rs1.getString(1)); + + } + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + + } finally { + try { + if (statement != null) + statement.close(); + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + //oTransactionEnquiryBeanSearch.setAccountNo(request.getParameter("accountNo")); + //oTransactionEnquiryBeanSearch.setFromDate(request.getParameter("fromDate")); + //oTransactionEnquiryBeanSearch.setToDate(request.getParameter("toDate")); + //oTransactionEnquiryBeanSearch.setProductId(request.getParameter("productName")); + //oTransactionEnquiryBeanSearch.setFromAmount(request.getParameter("fromAmount")); + // oTransactionEnquiryBeanSearch.setToAmount(request.getParameter("toAmount")); + // oTransactionEnquiryBeanSearch.setLinkedSbAccount(request.getParameter("linkedSbAccount")); + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error Occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + } + if (searchFound == 0) { + message = "No data exists for selected item"; + request.setAttribute("message", message); + } + request.setAttribute("oTransactionEnquiryBeanSearchObj", oTransactionEnquiryBeanSearch); + request.setAttribute("alTransactionEnquiryBean", alTransactionEnquiryBean); + request.setAttribute("message", message); + + request.getRequestDispatcher("/transactionEnquiry.jsp").forward(request, response); + + } else if ("glTransactionEnquiry".equalsIgnoreCase(JSP_Name)) { + + GLTransactionEnquiryBean oGLTransactionEnquiryBeanSearch = new GLTransactionEnquiryBean(); + GLTransactionEnquiryBean oGLTransactionEnquiryBean = new GLTransactionEnquiryBean(); + + ArrayList alGlTransactionEnquiryBean = new ArrayList(); + try { + // BeanUtils.populate(oGLTransactionEnquiryBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call Enquiry.GL_Transaction_Enquiry(?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + } + proc.setString(1, oGLTransactionEnquiryBean.getAccountNo()); + proc.setString(2, oGLTransactionEnquiryBean.getFromDate()); + proc.setString(3, oGLTransactionEnquiryBean.getToDate()); + proc.setString(4, oGLTransactionEnquiryBean.getProductName()); + proc.setString(5, oGLTransactionEnquiryBean.getFromAmount()); + proc.setString(6, oGLTransactionEnquiryBean.getToAmount()); + proc.setString(7, oGLTransactionEnquiryBean.getTranRefSearch()); + proc.setString(8, pacsId); + proc.setString(9, oGLTransactionEnquiryBean.getSubpacs_id()); + proc.setInt(10, startRow); + proc.setInt(11, endRow); + + proc.registerOutParameter(12, OracleTypes.CURSOR); + proc.registerOutParameter(13, java.sql.Types.VARCHAR); + proc.registerOutParameter(14, java.sql.Types.INTEGER); + + proc.executeUpdate(); + + //rs = (ResultSet) proc.getObject(12); + // recordCount = proc.getInt(14); + + while (rs.next()) { + searchFound = 1; + oGLTransactionEnquiryBean = new GLTransactionEnquiryBean(); + oGLTransactionEnquiryBean.setAccountNo(rs.getString("KEY_1")); + oGLTransactionEnquiryBean.setCbs_Ref_No(rs.getString("cbs_ref_no")); + oGLTransactionEnquiryBean.setTransactionDate(rs.getString("tran_date")); + oGLTransactionEnquiryBean.setJournalNumber(rs.getString("jrnl_no")); + oGLTransactionEnquiryBean.setTransactionType(rs.getString("txn_type")); + oGLTransactionEnquiryBean.setTransactionAmount(rs.getString("txn_amt")); + oGLTransactionEnquiryBean.setGl_code(rs.getString("gl_name")); + oGLTransactionEnquiryBean.setGl_txn_narration(rs.getString("narration")); + oGLTransactionEnquiryBean.setEnd_bal(rs.getString("end_bal")); + oGLTransactionEnquiryBean.setDest_Account_no(rs.getString("dest_acc_no")); + oGLTransactionEnquiryBean.setAcc_Type(rs.getString("dest_type")); + + alGlTransactionEnquiryBean.add(oGLTransactionEnquiryBean); + + request.setAttribute("displayFlag", "Y"); + + } + + //For pagination + + int noOfRecords = alGlTransactionEnquiryBean.size(); + int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage); + + request.setAttribute("noOfPages", noOfPages); + request.setAttribute("currentPage", page); + request.setAttribute("totalRecordCount", totalRecordCount); + request.setAttribute("recordCount", recordCount); + request.setAttribute("noOfRecords", noOfRecords); + + //End Of Pagination + + try { + String productName; + // connection = DbHandler.getDBConnection(); + // productName = request.getParameter("productName"); + statement = connection.createStatement(); + // ResultSet rs1 = statement.executeQuery("select gl_name from gl_product where id='" + productName + "'"); + while (rs1.next()) { + oGLTransactionEnquiryBeanSearch.setProductName(rs1.getString(1)); + + } + // connection.close(); + } catch (Exception e) { + System.out.println("Error Occurred during processing."); + } finally { + try { + if (statement != null) + statement.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during statement close."); + } + + } + + try { + // connection = DbHandler.getDBConnection(); + statement = connection.createStatement(); + // ResultSet rs2 = statement.executeQuery("select m.pacs_id, m.pacs_name from pacs_master m where m.pacs_id ='" + subpacs_id + "'"); + while (rs2.next()) { + oGLTransactionEnquiryBeanSearch.setSubpacs_name(rs2.getString(2)); + + } + // connection.close(); + } catch (Exception e) { + System.out.println("Error Occurred during processing."); + } finally { + try { + if (statement != null) + statement.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during statement close."); + } + + } + + //oGLTransactionEnquiryBeanSearch.setAccountNo(request.getParameter("accountNo")); + // oGLTransactionEnquiryBeanSearch.setFromDate(request.getParameter("fromDate")); + // oGLTransactionEnquiryBeanSearch.setToDate(request.getParameter("toDate")); + // oGLTransactionEnquiryBeanSearch.setProductId(request.getParameter("productName")); + // oGLTransactionEnquiryBeanSearch.setFromAmount(request.getParameter("fromAmount")); + // oGLTransactionEnquiryBeanSearch.setToAmount(request.getParameter("toAmount")); + // oGLTransactionEnquiryBeanSearch.setTranRefSearch(request.getParameter("tranRefSearch")); + // oGLTransactionEnquiryBeanSearch.setSubpacs_id(request.getParameter("subpacs_id")); + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error Occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + } + if (searchFound == 0) { + message = "No data exists for selected item"; + request.setAttribute("message", message); + } + request.setAttribute("oGlTransactionEnquiryBeanSearchObj", oGLTransactionEnquiryBeanSearch); + request.setAttribute("alGlTransactionEnquiryBean", alGlTransactionEnquiryBean); + request.setAttribute("message", message); + + request.getRequestDispatcher("/glTransactionEnquiry.jsp").forward(request, response); + + } else if ("glAccountEnquiry".equalsIgnoreCase(JSP_Name)) { + + // String productName = request.getParameter("productName"); + + GlAccountEnquiryBean oGlAccountEnquiryBeanSearch = new GlAccountEnquiryBean(); + GlAccountEnquiryBean oGlAccountEnquiryBean = new GlAccountEnquiryBean(); + + ArrayList alGlAccountEnquiryBean = new ArrayList(); + try { + // BeanUtils.populate(oGlAccountEnquiryBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call Enquiry.Gl_Account_Enquiry(?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + proc.setString(1, oGlAccountEnquiryBean.getAccountNo()); + proc.setString(2, oGlAccountEnquiryBean.getFromDate()); + proc.setString(3, oGlAccountEnquiryBean.getToDate()); + proc.setString(4, oGlAccountEnquiryBean.getProductName()); + proc.setString(5, oGlAccountEnquiryBean.getFromAmount()); + proc.setString(6, oGlAccountEnquiryBean.getToAmount()); + proc.setString(7, pacsId); + proc.setString(8, oGlAccountEnquiryBean.getSubpacs_id()); + proc.setInt(9, startRow); + proc.setInt(10, endRow); + + proc.registerOutParameter(11, OracleTypes.CURSOR); + proc.registerOutParameter(12, java.sql.Types.VARCHAR); + proc.registerOutParameter(13, java.sql.Types.INTEGER); + + proc.executeUpdate(); + + // rs = (ResultSet) proc.getObject(11); + // recordCount = proc.getInt(13); + + + while (rs.next()) { + searchFound = 1; + oGlAccountEnquiryBean = new GlAccountEnquiryBean(); + oGlAccountEnquiryBean.setAccountNo(rs.getString("KEY_1")); + oGlAccountEnquiryBean.setLedgerName(rs.getString("LEDGER_NAME")); + oGlAccountEnquiryBean.setAccountOpenDate(rs.getString("ACCT_OPEN_DT")); + oGlAccountEnquiryBean.setCumulativeBalance(rs.getString("cum_curr_val")); + oGlAccountEnquiryBean.setStatus(rs.getString("status")); + oGlAccountEnquiryBean.setCglCode(rs.getString("gl_code")); + oGlAccountEnquiryBean.setCglName(rs.getString("gl_name")); + + alGlAccountEnquiryBean.add(oGlAccountEnquiryBean); + + request.setAttribute("displayFlag", "Y"); + + } + + + //For pagination + + int noOfRecords = alGlAccountEnquiryBean.size(); + int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage); + + request.setAttribute("noOfPages", noOfPages); + request.setAttribute("currentPage", page); + request.setAttribute("totalRecordCount", totalRecordCount); + request.setAttribute("recordCount", recordCount); + request.setAttribute("noOfRecords", noOfRecords); + + //End Of Pagination + + try { + // connection = DbHandler.getDBConnection(); + statement = connection.createStatement(); + // ResultSet rs1 = statement.executeQuery("select gl_name from gl_product where id='" + productName + "'"); + while (rs1.next()) { + oGlAccountEnquiryBeanSearch.setCglName(rs1.getString(1)); + + } + // connection.close(); + } catch (Exception e) { + System.out.println("Error Occurred during processing."); + } finally { + try { + if (statement != null) + statement.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + try { + // connection = DbHandler.getDBConnection(); + statement = connection.createStatement(); + // ResultSet rs2 = statement.executeQuery("select m.pacs_id, m.pacs_name from pacs_master m where m.pacs_id ='" + subpacs_id + "'"); + while (rs2.next()) { + oGlAccountEnquiryBeanSearch.setSubpacs_name(rs2.getString(2)); + + } + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if (statement != null) + statement.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + // oGlAccountEnquiryBeanSearch.setAccountNo(request.getParameter("accountNo")); + // oGlAccountEnquiryBeanSearch.setFromDate(request.getParameter("fromDate")); + // oGlAccountEnquiryBeanSearch.setToDate(request.getParameter("toDate")); + oGlAccountEnquiryBean.setProductId(request.getParameter("productName")); + //oGlAccountEnquiryBeanSearch.setFromAmount(request.getParameter("fromAmount")); + // oGlAccountEnquiryBeanSearch.setToAmount(request.getParameter("toAmount")); + //oGlAccountEnquiryBeanSearch.setSubpacs_id(request.getParameter("subpacs_id")); + //oGlAccountEnquiryBeanSearch.setProductName(request.getParameter("productName")); + //oGlAccountEnquiryBeanSearch.setProdName(request.getParameter("prodName")); + + } catch (SQLException ex) { + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error Occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + } + if (searchFound == 0) { + message = "No data exists for selected item"; + request.setAttribute("message", message); + } + + request.setAttribute("oGlAccountEnquiryBeanSearchObj", oGlAccountEnquiryBeanSearch); + request.setAttribute("alGlAccountEnquiryBean", alGlAccountEnquiryBean); + request.setAttribute("message", message); + + request.getRequestDispatcher("/glAccountEnquiry.jsp").forward(request, response); + + } //For Deposit Module By SUBHAM + else if ("DepositAccountEnquiry".equalsIgnoreCase(JSP_Name)) { + + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + ArrayList alEnquiryBean = new ArrayList(); + try { + //BeanUtils.populate(oEnquiryBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call Enquiry.Deposit_Account_Enquiry(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + proc.setString(1, oEnquiryBean.getAccountNo()); + proc.setString(2, oEnquiryBean.getFromDate()); + proc.setString(3, oEnquiryBean.getToDate()); + proc.setString(4, oEnquiryBean.getProductName()); + proc.setString(5, oEnquiryBean.getFromAmount()); + proc.setString(6, oEnquiryBean.getToAmount()); + proc.setString(7, oEnquiryBean.getSrchByCIF()); + proc.setString(8, headPacsId); + proc.setString(9, subpacs_id); + proc.setString(10, oEnquiryBean.getOldAccNo()); + proc.setString(11, oEnquiryBean.getOldCifNo()); + proc.setInt(12, startRow); + proc.setInt(13, endRow); + proc.setString(14, oEnquiryBean.getModOfAcc()); + + proc.registerOutParameter(15, OracleTypes.CURSOR); + proc.registerOutParameter(16, java.sql.Types.VARCHAR); + proc.registerOutParameter(17, java.sql.Types.INTEGER); + //proc.setString(18, oEnquiryBean.getCustomerName()); + + + + + proc.executeUpdate(); + + //rs = (ResultSet) proc.getObject(15); + // recordCount = proc.getInt(17); + + while (rs.next()) { + searchFound = 1; + oEnquiryBean = new EnquiryBean(); + oEnquiryBean.setAccountNo(rs.getString("KEY_1")); + oEnquiryBean.setAccountOpenDate(rs.getString("ACCT_OPEN_DT")); + oEnquiryBean.setAvailBalance(rs.getString("AVAIL_BAL")); + oEnquiryBean.setCustomerNo(rs.getString("CUSTOMER_NO")); + oEnquiryBean.setCustomerName(rs.getString("cust_name")); + oEnquiryBean.setHoldValue(rs.getString("hold_value")); + oEnquiryBean.setCurr_Status(rs.getString("curr_status")); + oEnquiryBean.setInttAvail(rs.getString("intt_available")); + oEnquiryBean.setInttrate(rs.getString("INTT_RATE")); + oEnquiryBean.setInttToDt(rs.getString("intt_eop_date")); + oEnquiryBean.setInttfroDt(rs.getString("intt_sop_date")); + oEnquiryBean.setTermValue(rs.getString("term_value")); + oEnquiryBean.setInttProjected(rs.getString("intt_projected")); + oEnquiryBean.setMaturityDt(rs.getString("mat_dt")); + oEnquiryBean.setTerm_from_date(rs.getString("term_from_date")); + oEnquiryBean.setTerm_to_date(rs.getString("term_to_date")); + oEnquiryBean.setMaturityValue(rs.getString("mat_value")); + oEnquiryBean.setIntt_capptalized(rs.getString("INTT_CAP_AMT")); + oEnquiryBean.setTermLen(rs.getString("term_length")); + oEnquiryBean.setIntRepayMethod(rs.getString("Int_Repay_Method")); + oEnquiryBean.setProductNameDisplay(rs.getString("PROD_NAME")); + oEnquiryBean.setInstllAmt(rs.getString("INSTALL_AMT")); + oEnquiryBean.setInstallPaidNo(rs.getString("NO_INST_PAID")); + oEnquiryBean.setInstllDueDate(rs.getString("NXT_DUE_DATE")); + oEnquiryBean.setOldAccNo(rs.getString("OldAcc")); + oEnquiryBean.setPacs_id(rs.getString("pacs_id")); + oEnquiryBean.setPenalCnt(rs.getString("pen_count")); + oEnquiryBean.setCif_no2(rs.getString("cif_no2")); + oEnquiryBean.setSec_cust_name(rs.getString("sec_cust_name")); + oEnquiryBean.setLinkAccNo(rs.getString("link_acc")); + oEnquiryBean.setModOfAcc(rs.getString("Mode_Of_Acc")); + oEnquiryBean.setNomineeName(rs.getString("nomineeName")); + //Added By bitan for Multiple CIFS in DEP accounts + oEnquiryBean.setJt_cifNumber1(rs.getString("cif_no2")); + oEnquiryBean.setJt_cifName1(rs.getString("sec_cust_name")); + oEnquiryBean.setJt_cifNumber2(rs.getString("cif_no3")); + oEnquiryBean.setJt_cifName2(rs.getString("cif_name3")); + oEnquiryBean.setJt_cifNumber3(rs.getString("cif_no4")); + oEnquiryBean.setJt_cifName3(rs.getString("cif_name4")); + oEnquiryBean.setJt_cifNumber4(rs.getString("cif_no5")); + oEnquiryBean.setJt_cifName4(rs.getString("cif_name5")); + oEnquiryBean.setJt_cifNumber5(rs.getString("cif_no6")); + oEnquiryBean.setJt_cifName5(rs.getString("cif_name6")); + oEnquiryBean.setJt_cifNumber6(rs.getString("cif_no7")); + oEnquiryBean.setJt_cifName6(rs.getString("cif_name7")); + oEnquiryBean.setJt_cifNumber7(rs.getString("cif_no8")); + oEnquiryBean.setJt_cifName7(rs.getString("cif_name8")); + oEnquiryBean.setJt_cifNumber8(rs.getString("cif_no9")); + oEnquiryBean.setJt_cifName8(rs.getString("cif_name9")); + oEnquiryBean.setJt_cifNumber9(rs.getString("cif_no10")); + oEnquiryBean.setJt_cifName9(rs.getString("cif_name10")); + oEnquiryBean.setJt_cifNumber10(rs.getString("cif_no11")); + oEnquiryBean.setJt_cifName10(rs.getString("cif_name11")); + //END Multiple CIF Changes + + alEnquiryBean.add(oEnquiryBean); + request.setAttribute("displayFlag", "Y"); + + } + + //For pagination + + int noOfRecords = alEnquiryBean.size(); + int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage); + + request.setAttribute("noOfPages", noOfPages); + request.setAttribute("currentPage", page); + request.setAttribute("totalRecordCount", totalRecordCount); + request.setAttribute("recordCount", recordCount); + request.setAttribute("noOfRecords", noOfRecords); + + //End Of Pagination + + try { + // connection = DbHandler.getDBConnection(); + // String productName = request.getParameter("productName"); + statement = connection.createStatement(); + // ResultSet rs1 = statement.executeQuery("select prod_name from dep_product where id='" + productName + "'"); + while (rs1.next()) { + oEnquiryBeanSearch.setProductName(rs1.getString(1)); + + } + // connection.close(); + } catch (Exception e) { + System.out.println("Error Occurred during processing."); + + } finally { + try { + if (statement != null) + statement.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + try { + // connection = DbHandler.getDBConnection(); + statement = connection.createStatement(); + // ResultSet rs2 = statement.executeQuery("select m.pacs_id, m.pacs_name from pacs_master m where m.pacs_id ='" + subpacs_id + "'"); + while (rs2.next()) { + oEnquiryBeanSearch.setSubpacs_name(rs2.getString(2)); + + } + // connection.close(); + } catch (Exception e) { + System.out.println("Error Occurred during processing."); + + } finally { + try { + if (statement != null) + statement.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + //oEnquiryBeanSearch.setProductId(request.getParameter("productName")); + //oEnquiryBeanSearch.setAccountNo(request.getParameter("accountNo")); + // oEnquiryBeanSearch.setFromDate(request.getParameter("fromDate")); + //oEnquiryBeanSearch.setToDate(request.getParameter("toDate")); + //oEnquiryBeanSearch.setFromAmount(request.getParameter("fromAmount")); + //oEnquiryBeanSearch.setToAmount(request.getParameter("toAmount")); + //oEnquiryBeanSearch.setSrchByCIF(request.getParameter("srchByCIF")); + //oEnquiryBeanSearch.setSubpacs_id(request.getParameter("subpacs_id")); + //oEnquiryBeanSearch.setOldAccNo(request.getParameter("oldAccNo")); + //oEnquiryBeanSearch.setOldCifNo(request.getParameter("oldCifNo")); + //oEnquiryBeanSearch.setModOfAcc(request.getParameter("modOfAcc")); + + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error Occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + } + if (searchFound == 0) { + message = "No data exists for selected item"; + request.setAttribute("message", message); + } + request.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearch); + request.setAttribute("alEnquiryBean", alEnquiryBean); + request.setAttribute("message", message); + + request.getRequestDispatcher("/Deposit/DepositAccountEnquiry.jsp").forward(request, response); + + } else if ("DepositTransactionEnquiry".equalsIgnoreCase(JSP_Name)) { + + TransactionEnquiryBean oTransactionEnquiryBeanSearch = new TransactionEnquiryBean(); + TransactionEnquiryBean oTransactionEnquiryBean = new TransactionEnquiryBean(); + + ArrayList alTransactionEnquiryBean = new ArrayList(); + try { + // BeanUtils.populate(oTransactionEnquiryBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call Enquiry.Deposit_Transaction_Enquiry(?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + proc.setString(1, oTransactionEnquiryBean.getAccountNo()); + proc.setString(2, oTransactionEnquiryBean.getFromDate()); + proc.setString(3, oTransactionEnquiryBean.getToDate()); + proc.setString(4, oTransactionEnquiryBean.getProductName()); + proc.setString(5, oTransactionEnquiryBean.getFromAmount()); + proc.setString(6, oTransactionEnquiryBean.getToAmount()); + proc.setString(7, oTransactionEnquiryBean.getTranRefSearch()); + proc.setString(8, pacsId); + proc.setInt(9, startRow); + proc.setInt(10, endRow); + + proc.registerOutParameter(11, OracleTypes.CURSOR); + proc.registerOutParameter(12, java.sql.Types.VARCHAR); + proc.registerOutParameter(13, java.sql.Types.INTEGER); + proc.setString(14, oTransactionEnquiryBean.getSubpacs_id()); + + + proc.executeUpdate(); + + //rs = (ResultSet) proc.getObject(11); + // recordCount = proc.getInt(13); + + + while (rs.next()) { + searchFound = 1; + oTransactionEnquiryBean = new TransactionEnquiryBean(); + oTransactionEnquiryBean.setAccountNo(rs.getString("KEY_1")); + oTransactionEnquiryBean.setCbs_Ref_No(rs.getString("CBS_REF_NO")); + oTransactionEnquiryBean.setTransactionDate(rs.getString("tran_date")); + + oTransactionEnquiryBean.setTransactionType(rs.getString("txn_type")); + oTransactionEnquiryBean.setTransactionAmount(rs.getString("txn_amt")); + + //added later + oTransactionEnquiryBean.setProductNameDisplay(rs.getString("PROD_NAME")); + + oTransactionEnquiryBean.setAvailableBalance(rs.getString("END_BAL")); + + oTransactionEnquiryBean.setNarration(rs.getString("NARRATION")); + oTransactionEnquiryBean.setInttCatDesc(rs.getString("INTT_CAT_DESC")); + oTransactionEnquiryBean.setAuthID(rs.getString("checker_id")); + oTransactionEnquiryBean.setMakerID(rs.getString("maker_id")); + alTransactionEnquiryBean.add(oTransactionEnquiryBean); + + request.setAttribute("displayFlag", "Y"); + + } + + //For pagination + + int noOfRecords = alTransactionEnquiryBean.size(); + int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage); + + request.setAttribute("noOfPages", noOfPages); + request.setAttribute("currentPage", page); + request.setAttribute("totalRecordCount", totalRecordCount); + request.setAttribute("recordCount", recordCount); + request.setAttribute("noOfRecords", noOfRecords); + + //End Of Pagination + + try { + String productName; + // connection = DbHandler.getDBConnection(); + // productName = request.getParameter("productName"); + statement = connection.createStatement(); + //ResultSet rs1 = statement.executeQuery("select prod_name,id from dep_product where id='" + productName + "'"); + while (rs1.next()) { + oTransactionEnquiryBeanSearch.setProductName(rs1.getString(1)); + oTransactionEnquiryBeanSearch.setProductId(rs1.getString(2)); + } + // connection.close(); + } catch (Exception e) { + System.out.println("Error Occurred during processing."); + } finally { + try { + if (statement != null) + statement.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + try { + // connection = DbHandler.getDBConnection(); + statement = connection.createStatement(); + //ResultSet rs2 = statement.executeQuery("select m.pacs_id, m.pacs_name from pacs_master m where m.pacs_id ='" + subpacs_id + "'"); + while (rs2.next()) { + oTransactionEnquiryBeanSearch.setSubpacs_name(rs2.getString(2)); + + } + // connection.close(); + } catch (Exception e) { + System.out.println("Error Occurred during processing."); + } finally { + try { + if (statement != null) + statement.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + // oTransactionEnquiryBeanSearch.setAccountNo(request.getParameter("accountNo")); + // oTransactionEnquiryBeanSearch.setFromDate(request.getParameter("fromDate")); + // oTransactionEnquiryBeanSearch.setToDate(request.getParameter("toDate")); + + // oTransactionEnquiryBeanSearch.setFromAmount(request.getParameter("fromAmount")); + // oTransactionEnquiryBeanSearch.setToAmount(request.getParameter("toAmount")); + // oTransactionEnquiryBeanSearch.setTranRefSearch(request.getParameter("tranRefSearch")); + // oTransactionEnquiryBeanSearch.setSubpacs_id(request.getParameter("subpacs_id")); + + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error Occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + } + if (searchFound == 0) { + message = "No data exists for selected item"; + request.setAttribute("message", message); + } + request.setAttribute("oTransactionEnquiryBeanSearchObj", oTransactionEnquiryBeanSearch); + request.setAttribute("alTransactionEnquiryBean", alTransactionEnquiryBean); + request.setAttribute("message", message); + + request.getRequestDispatcher("/Deposit/DepositTransactionEnquiry.jsp").forward(request, response); + + } else if ("LoanInquiry".equalsIgnoreCase(JSP_Name)) { + + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + ArrayList alEnquiryBean = new ArrayList(); + try { + // BeanUtils.populate(oEnquiryBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call Enquiry.Loan_Account_Enquiry(?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + proc.setString(1, oEnquiryBean.getAccountNo()); + proc.setString(2, oEnquiryBean.getFromDate()); + proc.setString(3, oEnquiryBean.getToDate()); + proc.setString(4, oEnquiryBean.getCifNumber()); + proc.setString(5, headPacsId); + proc.setString(6, oEnquiryBean.getOldAccNo()); + proc.setString(7, oEnquiryBean.getOldCifNo()); + proc.setString(8, oEnquiryBean.getProductName()); + proc.setInt(9, startRow); + proc.setInt(10, endRow); + proc.registerOutParameter(11, OracleTypes.CURSOR); + proc.registerOutParameter(12, java.sql.Types.VARCHAR); + proc.registerOutParameter(13, java.sql.Types.INTEGER); + proc.setString(14, oEnquiryBean.getSubpacs_id()); + + + proc.executeUpdate(); + + // rs = (ResultSet) proc.getObject(11); + // recordCount = proc.getInt(13); + + while (rs.next()) { + searchFound = 1; + oEnquiryBean = new EnquiryBean(); + oEnquiryBean.setAccountNo(rs.getString("KEY_1")); + oEnquiryBean.setCustomerNo(rs.getString("CUST_NO")); + oEnquiryBean.setCustomerName(rs.getString("CUST_NAME")); + oEnquiryBean.setProduct_name(rs.getString("PROD_NAME")); + oEnquiryBean.setPenalIntt(rs.getString("penal_intt_rate")); + oEnquiryBean.setInttrate(rs.getString("intt_rate")); + oEnquiryBean.setIntt_cat_desc(rs.getString("Int_cat_desc")); + + oEnquiryBean.setSanctionAmount(rs.getString("SANC_AMT")); + oEnquiryBean.setSancDt(rs.getString("SANC_DT")); + oEnquiryBean.setAmntDsbrd(rs.getString("AMT_DISBURSED")); + oEnquiryBean.setEmi(rs.getString("EMI")); + + oEnquiryBean.setInttOutstanding(rs.getString("IN_OTD")); + oEnquiryBean.setTotal_intt_outst(rs.getString("TOTAL_INTT_OUTST")); + oEnquiryBean.setTotal_intt_accr(rs.getString("TOTAL_INTT_ACCR")); + oEnquiryBean.setTotal_intt_paid(rs.getString("TOTAL_INTT_PAID")); + oEnquiryBean.setPrinOutstanding(rs.getString("PRIN_OTD")); + oEnquiryBean.setInttPaid(rs.getString("INT_PD")); + oEnquiryBean.setPrinPaid(rs.getString("PRIN_PD")); + oEnquiryBean.setNext_due_date(rs.getString("DUE_DT")); + oEnquiryBean.setLast_repay_date(rs.getString("Last_Repay_Date")); + oEnquiryBean.setOldAccNo(rs.getString("oldAcc")); + oEnquiryBean.setPacs_id(rs.getString("pacs_id")); + oEnquiryBean.setCurr_Status(rs.getString("CURR_STATUS")); + + + alEnquiryBean.add(oEnquiryBean); + request.setAttribute("displayFlag", "Y"); + + } + + //For pagination + + int noOfRecords = alEnquiryBean.size(); + int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage); + + request.setAttribute("noOfPages", noOfPages); + request.setAttribute("currentPage", page); + request.setAttribute("totalRecordCount", totalRecordCount); + request.setAttribute("recordCount", recordCount); + request.setAttribute("noOfRecords", noOfRecords); + + //End Of Pagination + + try { + + // connection = DbHandler.getDBConnection(); + // String productName = request.getParameter("productName"); + statement = connection.createStatement(); + //ResultSet rs1 = statement.executeQuery("select prod_name from loan_product where id='" + productName + "'"); + while (rs1.next()) { + oEnquiryBeanSearch.setProductName(rs1.getString(1)); + + } + // connection.close(); + } catch (Exception e) { + System.out.println("Error Occurred during processing."); + } finally { + try { + if (statement != null) + statement.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + try { + // connection = DbHandler.getDBConnection(); + statement = connection.createStatement(); + // ResultSet rs2 = statement.executeQuery("select m.pacs_id, m.pacs_name from pacs_master m where m.pacs_id ='" + subpacs_id + "'"); + while (rs2.next()) { + oEnquiryBeanSearch.setSubpacs_name(rs2.getString(2)); + + } + // connection.close(); + } catch (Exception e) { + System.out.println("Error Occurred during processing."); + } finally { + try { + if (statement != null) + statement.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + //oEnquiryBeanSearch.setAccountNo(request.getParameter("accountNo")); + // oEnquiryBeanSearch.setFromDate(request.getParameter("fromDate")); + // oEnquiryBeanSearch.setToDate(request.getParameter("toDate")); + // oEnquiryBeanSearch.setCifNumber(request.getParameter("cifNumber")); + // oEnquiryBeanSearch.setSubpacs_id(request.getParameter("subpacs_id")); + // oEnquiryBeanSearch.setOldAccNo(request.getParameter("oldAccNo")); + // oEnquiryBeanSearch.setOldCifNo(request.getParameter("oldCifNo")); + // oEnquiryBeanSearch.setProductId(request.getParameter("productName")); + + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error Occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + } + if (searchFound == 0) { + message = "No data exists for selected item. Please enter correct details."; + request.setAttribute("message", message); + } + request.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearch); + request.setAttribute("alEnquiryBean", alEnquiryBean); + request.setAttribute("message", message); + + request.getRequestDispatcher("/Loan/LoanInquiry.jsp").forward(request, response); + + } else if ("LoanTransactionEnquiry".equalsIgnoreCase(JSP_Name)) { + + TransactionEnquiryBean oTransactionEnquiryBeanSearch = new TransactionEnquiryBean(); + TransactionEnquiryBean oTransactionEnquiryBean = new TransactionEnquiryBean(); + + ArrayList alTransactionEnquiryBean = new ArrayList(); + try { + // BeanUtils.populate(oTransactionEnquiryBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call Enquiry.Loan_Transaction_Enquiry(?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + proc.setString(1, oTransactionEnquiryBean.getAccountNo()); + proc.setString(2, oTransactionEnquiryBean.getFromDate()); + proc.setString(3, oTransactionEnquiryBean.getToDate()); + proc.setString(4, oTransactionEnquiryBean.getProductName()); + proc.setString(5, oTransactionEnquiryBean.getFromAmount()); + proc.setString(6, oTransactionEnquiryBean.getToAmount()); + proc.setString(7, oTransactionEnquiryBean.getTranRefSearch()); + proc.setString(8, pacsId); + proc.setInt(9, startRow); + proc.setInt(10, endRow); + + proc.registerOutParameter(11, OracleTypes.CURSOR); + proc.registerOutParameter(12, java.sql.Types.VARCHAR); + proc.registerOutParameter(13, java.sql.Types.INTEGER); + proc.setString(14, oTransactionEnquiryBean.getSubpacs_id()); + + + + proc.executeUpdate(); + + //rs = (ResultSet) proc.getObject(11); + //recordCount = proc.getInt(13); + + + while (rs.next()) { + searchFound = 1; + oTransactionEnquiryBean = new TransactionEnquiryBean(); + oTransactionEnquiryBean.setAccountNo(rs.getString("KEY_1")); + oTransactionEnquiryBean.setCbs_Ref_No(rs.getString("txn_ref_no")); + oTransactionEnquiryBean.setTransactionDate(rs.getString("tran_date")); + + oTransactionEnquiryBean.setTransactionType(rs.getString("txn_type")); + oTransactionEnquiryBean.setTransactionAmount(rs.getString("txn_amt")); + + //added later + oTransactionEnquiryBean.setProductNameDisplay(rs.getString("PROD_NAME")); + + oTransactionEnquiryBean.setAvailableBalance(rs.getString("END_BAL")); + + oTransactionEnquiryBean.setNarration(rs.getString("NARRATION")); + oTransactionEnquiryBean.setInttCatDesc(rs.getString("INTT_CAT_DESC")); + + alTransactionEnquiryBean.add(oTransactionEnquiryBean); + + request.setAttribute("displayFlag", "Y"); + + } + + //For pagination + + int noOfRecords = alTransactionEnquiryBean.size(); + int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage); + + request.setAttribute("noOfPages", noOfPages); + request.setAttribute("currentPage", page); + request.setAttribute("totalRecordCount", totalRecordCount); + request.setAttribute("recordCount", recordCount); + request.setAttribute("noOfRecords", noOfRecords); + + //End Of Pagination + + try { + String productName; + // connection = DbHandler.getDBConnection(); + // productName = request.getParameter("productName"); + statement = connection.createStatement(); + // ResultSet rs1 = statement.executeQuery("select prod_name,id from loan_product where id='" + productName + "'"); + while (rs1.next()) { + oTransactionEnquiryBeanSearch.setProductName(rs1.getString(1)); + oTransactionEnquiryBeanSearch.setProductId(rs1.getString(2)); + } + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during connection close."); + } + + //oTransactionEnquiryBeanSearch.setAccountNo(request.getParameter("accountNo")); + // oTransactionEnquiryBeanSearch.setFromDate(request.getParameter("fromDate")); + // oTransactionEnquiryBeanSearch.setToDate(request.getParameter("toDate")); + + //oTransactionEnquiryBeanSearch.setFromAmount(request.getParameter("fromAmount")); + //oTransactionEnquiryBeanSearch.setToAmount(request.getParameter("toAmount")); + //oTransactionEnquiryBeanSearch.setTranRefSearch(request.getParameter("tranRefSearch")); + + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error Occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + } + if (searchFound == 0) { + message = "No data exists for selected item"; + request.setAttribute("message", message); + } + request.setAttribute("oTransactionEnquiryBeanSearchObj", oTransactionEnquiryBeanSearch); + request.setAttribute("alTransactionEnquiryBean", alTransactionEnquiryBean); + request.setAttribute("message", message); + + request.getRequestDispatcher("/Loan/LoanTransactionEnquiry.jsp").forward(request, response); + + } else if ("shareaccountenquiry".equalsIgnoreCase(JSP_Name)) { + + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + ArrayList alEnquiryBean = new ArrayList(); + try { + // BeanUtils.populate(oEnquiryBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call Enquiry.Share_Account_Enquiry(?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + proc.setString(1, oEnquiryBean.getAccountNo()); + proc.setString(2, oEnquiryBean.getFromDate()); + proc.setString(3, oEnquiryBean.getToDate()); + proc.setString(4, oEnquiryBean.getProductName()); + proc.setString(5, oEnquiryBean.getSrchByCIF()); + proc.setString(6, pacsId); + proc.setString(7, subpacs_id); + proc.setInt(8, startRow); + proc.setInt(9, endRow); + + proc.registerOutParameter(10, OracleTypes.CURSOR); + proc.registerOutParameter(11, java.sql.Types.VARCHAR); + proc.registerOutParameter(12, java.sql.Types.INTEGER); + + + + proc.executeUpdate(); + + //rs = (ResultSet) proc.getObject(10); + //recordCount = proc.getInt(12); + + while (rs.next()) { + searchFound = 1; + oEnquiryBean = new EnquiryBean(); + oEnquiryBean.setAccountNo(rs.getString("KEY_1")); + + + oEnquiryBean.setCustomerNo(rs.getString("CUSTOMER_NO")); + oEnquiryBean.setCustomerName(rs.getString("cust_name")); + oEnquiryBean.setAccountOpenDate(rs.getString("ACCT_OPEN_DT")); + oEnquiryBean.setMemberno(rs.getString("membership_no")); + oEnquiryBean.setShareclass(rs.getString("prod_desc")); + oEnquiryBean.setSharevalue(rs.getString("share_value")); + oEnquiryBean.setShareno(rs.getString("number_of_share")); + oEnquiryBean.setShareamt(rs.getString("share_amount_paid")); + oEnquiryBean.setSharedue(rs.getString("share_amount_due")); + + + + alEnquiryBean.add(oEnquiryBean); + request.setAttribute("displayFlag", "Y"); + + } + + //For pagination + + int noOfRecords = alEnquiryBean.size(); + int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage); + + request.setAttribute("noOfPages", noOfPages); + request.setAttribute("currentPage", page); + request.setAttribute("totalRecordCount", totalRecordCount); + request.setAttribute("recordCount", recordCount); + request.setAttribute("noOfRecords", noOfRecords); + + //End Of Pagination + + try { + // connection = DbHandler.getDBConnection(); + //String productName = request.getParameter("productName"); + statement = connection.createStatement(); + // ResultSet rs1 = statement.executeQuery("select prod_name from dep_product where id='" + productName + "'"); + while (rs1.next()) { + oEnquiryBeanSearch.setProductName(rs1.getString(1)); + + } + // connection.close(); + } catch (Exception e) { + System.out.println("Error Occurred during processing."); + } finally { + try { + if (statement != null) + statement.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + try { + // connection = DbHandler.getDBConnection(); + statement = connection.createStatement(); + // ResultSet rs2 = statement.executeQuery("select m.pacs_id, m.pacs_name from pacs_master m where m.pacs_id ='" + subpacs_id + "'"); + while (rs2.next()) { + oEnquiryBeanSearch.setSubpacs_name(rs2.getString(2)); + + } + // connection.close(); + } catch (Exception e) { + System.out.println("Error Occurred during processing."); + } finally { + try { + if (statement != null) + statement.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + // oEnquiryBeanSearch.setProductId(request.getParameter("productName")); + //oEnquiryBeanSearch.setAccountNo(request.getParameter("accountNo")); + //oEnquiryBeanSearch.setFromDate(request.getParameter("fromDate")); + // oEnquiryBeanSearch.setToDate(request.getParameter("toDate")); + // oEnquiryBeanSearch.setSrchByCIF(request.getParameter("srchByCIF")); + // oEnquiryBeanSearch.setSubpacs_id(request.getParameter("subpacs_id")); + + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error Occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + } + if (searchFound == 0) { + message = "No data exists for selected item"; + request.setAttribute("message", message); + } + request.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearch); + request.setAttribute("alEnquiryBean", alEnquiryBean); + request.setAttribute("message", message); + + request.getRequestDispatcher("/Share_Module/shareaccountenquiry.jsp").forward(request, response); + + } + else if ("DepositMiscellaneousEnquiry".equalsIgnoreCase(JSP_Name)) { + + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + ArrayList alEnquiryBean = new ArrayList(); + try { + // BeanUtils.populate(oEnquiryBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call Enquiry.Deposit_Miscellaneous_Enquiry(?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + } + proc.setString(1, oEnquiryBean.getAccountNo()); + proc.setString(2, oEnquiryBean.getFromDate()); + proc.setString(3, oEnquiryBean.getToDate()); + proc.setString(4, oEnquiryBean.getProductName()); + proc.setString(5, oEnquiryBean.getFromAmount()); + proc.setString(6, oEnquiryBean.getToAmount()); + proc.setString(7, pacsId); + proc.setInt(8, startRow); + proc.setInt(9, endRow); + + proc.registerOutParameter(10, OracleTypes.CURSOR); + proc.registerOutParameter(11, java.sql.Types.VARCHAR); + proc.registerOutParameter(12, java.sql.Types.INTEGER); + proc.setString(13, oEnquiryBean.getSubpacs_id()); + + + + proc.executeUpdate(); + + //rs = (ResultSet) proc.getObject(10); + // recordCount = proc.getInt(12); + + while (rs.next()) { + searchFound = 1; + oEnquiryBean = new EnquiryBean(); + oEnquiryBean.setAccountNo(rs.getString("ACCOUNT_NO")); + oEnquiryBean.setCustomerNo(rs.getString("CIF_NO")); + oEnquiryBean.setCustomerName(rs.getString("CUSTOMER_NAME")); + oEnquiryBean.setAction(rs.getString("ACTION_CODE")); + oEnquiryBean.setOp_Amt(rs.getString("OPERATION_VALUE")); + oEnquiryBean.setAction_Dt(rs.getString("ACTION_DATE")); + oEnquiryBean.setAction_Cmnt(rs.getString("ACTION_COMMENT")); + oEnquiryBean.setAction_teller(rs.getString("TELLER_ID")); + oEnquiryBean.setAction_STAT(rs.getString("STATUS")); + oEnquiryBean.setTeller_name(rs.getString("LOGIN_NAME")); + oEnquiryBean.setLoanAcc(rs.getString("LOANACC")); + + + alEnquiryBean.add(oEnquiryBean); + request.setAttribute("displayFlag", "Y"); + + } + + //For pagination + + int noOfRecords = alEnquiryBean.size(); + int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage); + + request.setAttribute("noOfPages", noOfPages); + request.setAttribute("currentPage", page); + request.setAttribute("totalRecordCount", totalRecordCount); + request.setAttribute("recordCount", recordCount); + request.setAttribute("noOfRecords", noOfRecords); + + //End Of Pagination + + try { + // connection = DbHandler.getDBConnection(); + statement = connection.createStatement(); + //ResultSet rs2 = statement.executeQuery("select m.pacs_id, m.pacs_name from pacs_master m where m.pacs_id ='" + subpacs_id + "'"); + while (rs2.next()) { + oEnquiryBeanSearch.setSubpacs_name(rs2.getString(2)); + + } + // connection.close(); + } catch (Exception e) { + System.out.println("Error Occurred during processing."); + } finally { + try { + if (statement != null) + statement.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + + //oEnquiryBeanSearch.setAccountNo(request.getParameter("accountNo")); + //oEnquiryBeanSearch.setProductName(request.getParameter("productName")); + //oEnquiryBeanSearch.setFromDate(request.getParameter("fromDate")); + // oEnquiryBeanSearch.setToDate(request.getParameter("toDate")); + //oEnquiryBeanSearch.setFromAmount(request.getParameter("fromAmount")); + //oEnquiryBeanSearch.setToAmount(request.getParameter("toAmount")); + //oEnquiryBeanSearch.setSubpacs_id(request.getParameter("subpacs_id")); + + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error Occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + } + if (searchFound == 0) { + message = "No data exists for selected item"; + request.setAttribute("message", message); + } + request.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearch); + request.setAttribute("alEnquiryBean", alEnquiryBean); + request.setAttribute("message", message); + + request.getRequestDispatcher("/Deposit/DepositMiscellaneousEnquiry.jsp").forward(request, response); + + } + + } +} diff --git a/IPKS_Updated/src/src/java/Controller/FarmerDetailsUpdationServlet.java b/IPKS_Updated/src/src/java/Controller/FarmerDetailsUpdationServlet.java new file mode 100644 index 0000000..60858ef --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/FarmerDetailsUpdationServlet.java @@ -0,0 +1,139 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import Dao.FamerDetailsUpdationDao; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import DataEntryBean.BatchProcessingBean; +import DataEntryBean.FarmerDetailsBean; +import java.sql.BatchUpdateException; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; + +/** + * + * @author 594267 + */ +public class FarmerDetailsUpdationServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet BatchTransactionServlet"); + out.println(""); + out.println(""); + out.println("

Servlet BatchTransactionServlet at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + FarmerDetailsBean farmerLandDet=null; + ArrayList alFarmerDetList = new ArrayList(); + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + // String cifNo = request.getParameter("cifNumber"); + for (int i = 1; i <= counter; i++) { + try { + farmerLandDet = new FarmerDetailsBean(); + // farmerLandDet.setManja(request.getParameter("manja" + i)); + // farmerLandDet.setDgNo(request.getParameter("dgNo" + i)); + // farmerLandDet.setgP(request.getParameter("GP" + i)); + // farmerLandDet.setVillage(request.getParameter("village" + i)); + // farmerLandDet.setKhatiyan(request.getParameter("Khatiyan" + i)); + // farmerLandDet.setArea(Double.parseDouble(request.getParameter("area" + i))); + alFarmerDetList.add(farmerLandDet); + } catch (Exception e) { + System.out.println("Exception occured in farmer bean creation for cif :" + cifNo); + } finally { + System.out.println("Processing done."); + } + } + + if (alFarmerDetList.size() > 0) { + + FamerDetailsUpdationDao fdao = new FamerDetailsUpdationDao(); + message = fdao.saveFarmerlandDetails(user, pacsId, cifNo, alFarmerDetList); + + + }else + { + message ="no details received to update"; + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/FarmerDetailsUpdation.jsp").forward(request, response); + + + + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/ForceAccountClosureServlet.java b/IPKS_Updated/src/src/java/Controller/ForceAccountClosureServlet.java new file mode 100644 index 0000000..6d31d2e --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/ForceAccountClosureServlet.java @@ -0,0 +1,77 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import Dao.ForceAccountClosureDao; +import DataEntryBean.ChequeDetailsBean; +import java.io.IOException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +public class ForceAccountClosureServlet extends HttpServlet{ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = (String)session.getAttribute("user"); + ForceAccountClosureDao aiDao = new ForceAccountClosureDao(); + String result = null; + + + try{ + + // String accNo = request.getParameter("accNo"); + result = aiDao.ForceAccountClosureServletProc(pacsId, accNo, tellerId); + + request.setAttribute("message1", result); + request.getRequestDispatcher("/Deposit/ForceAccountClosure.jsp").forward(request, response); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error Occurred during processing."); + request.setAttribute("message1", "Error occured. Please try again"); + request.getRequestDispatcher("/Deposit/ForceAccountClosure.jsp").forward(request, response); + } finally { + System.out.println("processing done."); + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + @Override + public String getServletInfo() { + return "Short description"; + }//
+} diff --git a/IPKS_Updated/src/src/java/Controller/ForceDebitCapitalisationServlet.java b/IPKS_Updated/src/src/java/Controller/ForceDebitCapitalisationServlet.java new file mode 100644 index 0000000..3b306a6 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/ForceDebitCapitalisationServlet.java @@ -0,0 +1,79 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import Dao.ForceDebitCapitalisationDao; +import DataEntryBean.ChequeDetailsBean; +import java.io.IOException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +public class ForceDebitCapitalisationServlet extends HttpServlet{ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = (String)session.getAttribute("user"); + ForceDebitCapitalisationDao aiDao = new ForceDebitCapitalisationDao(); + String result = null; + + + try{ + + // String accNo = request.getParameter("accNo"); + // String newforcedCap = request.getParameter("forcedCap"); + result = aiDao.ForceDebitCapitalisationProc(accNo, pacsId, newforcedCap, tellerId); + + request.setAttribute("message1", result); + request.getRequestDispatcher("/Loan/ForceDebitCapitalisation.jsp").forward(request, response); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error Occurred during processing."); + request.setAttribute("message1", "Error occured. Please try again"); + request.getRequestDispatcher("/Loan/ForceDebitCapitalisation.jsp").forward(request, response); + + } finally { + System.out.println("processing done."); + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/GPSSellRegisterServlet.java b/IPKS_Updated/src/src/java/Controller/GPSSellRegisterServlet.java new file mode 100644 index 0000000..9c2fc14 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/GPSSellRegisterServlet.java @@ -0,0 +1,169 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.GPSSellRegisterBean; +import DataEntryBean.PurchaseDetailBean; +import DataEntryBean.pdsStockRegisterBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import oracle.jdbc.OracleTypes; + +/** + * + * @author Tcs Help desk122 + */ +public class GPSSellRegisterServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + ResultSet rs = null; + ArrayList alGPSSellRegisterBean = new ArrayList(); + String message = ""; + int searchFound = 0; + String pacsId = (String) session.getAttribute("pacsId"); + // String itemCode = request.getParameter("itemTypeId"); + // String itemSubTypeCode = request.getParameter("itemSubTypeId"); + // String itemtypeDesc = request.getParameter("itemtypeDesc"); + // String itemsubtypeDesc = request.getParameter("itemsubtypeDesc"); + // String fromDate = request.getParameter("fromdate"); + // String toDate = request.getParameter("todate"); + GPSSellRegisterBean gPSSellRegisterBeanObj = null; + + gPSSellRegisterBeanObj=new GPSSellRegisterBean(); + gPSSellRegisterBeanObj.setToDate(toDate); + gPSSellRegisterBeanObj.setFromDate(fromDate); + gPSSellRegisterBeanObj.setItemCode(itemCode); + gPSSellRegisterBeanObj.setItemSubTypeCode(itemSubTypeCode); + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call GPS_Operation.sell_register_check(?,?,?,?,?,?,?) }"); + proc.setString(1, gPSSellRegisterBeanObj.getItemCode()); + proc.setString(2, gPSSellRegisterBeanObj.getItemSubTypeCode()); + proc.setString(3, gPSSellRegisterBeanObj.getFromDate()); + proc.setString(4, gPSSellRegisterBeanObj.getToDate()); + proc.setString(5, pacsId); + proc.registerOutParameter(6, OracleTypes.CURSOR); + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + proc.execute(); + message = proc.getString(7); + // rs = (ResultSet) proc.getObject(6); + + while (rs.next()) { + searchFound = 1; + gPSSellRegisterBeanObj = new GPSSellRegisterBean(); + gPSSellRegisterBeanObj.setSellTo(rs.getString(1)); + gPSSellRegisterBeanObj.setDeliveredTo(rs.getString(2)); + gPSSellRegisterBeanObj.setProcurementCode(rs.getString(3)); + gPSSellRegisterBeanObj.setQuantity(rs.getString(4)); + gPSSellRegisterBeanObj.setPrice(rs.getString(5)); + gPSSellRegisterBeanObj.setTotal(rs.getString(6)); + gPSSellRegisterBeanObj.setExpense(rs.getString(7)); + gPSSellRegisterBeanObj.setSellDate(rs.getString(8)); + + alGPSSellRegisterBean.add(gPSSellRegisterBeanObj); + request.setAttribute("displayFlag", "Y"); + } + gPSSellRegisterBeanObj.setItemCode(itemtypeDesc); + gPSSellRegisterBeanObj.setItemSubTypeCode(itemsubtypeDesc); + gPSSellRegisterBeanObj.setFromDate(fromDate); + gPSSellRegisterBeanObj.setToDate(toDate); + + + if (searchFound==0){ + + message="No Stock Exists for the selected criteria"; + request.setAttribute("message", message); + + } + + } catch (SQLException ex) { + // Logger.getLogger(pdsStockRegisterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + // System.out.println(ex.toString()); + } finally { + + try { + proc.close(); + con.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error Occurred during connection close."); + } + } + + request.setAttribute("alGPSSellRegisterBean", alGPSSellRegisterBean); + request.setAttribute("gPSSellRegisterBeanObj", gPSSellRegisterBeanObj); + request.getRequestDispatcher("/GPS_JSP/sellregister.jsp").forward(request, response); + + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/GPSServlet.java b/IPKS_Updated/src/src/java/Controller/GPSServlet.java new file mode 100644 index 0000000..c09b2e3 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/GPSServlet.java @@ -0,0 +1,72 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 986137 + */ +public class GPSServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + session.setAttribute("moduleName", "governance"); + request.getRequestDispatcher("/welcome.jsp").forward(request, response); + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/GenerateTrickleFeedServlet.java b/IPKS_Updated/src/src/java/Controller/GenerateTrickleFeedServlet.java new file mode 100644 index 0000000..3314ee4 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/GenerateTrickleFeedServlet.java @@ -0,0 +1,139 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.sql.*; +import LoginDb.DbHandler; +import java.util.*; +import java.util.logging.Logger; +import java.util.logging.Level; +import javax.servlet.http.HttpSession; + +/** + * + * @author 590685 + */ +public class GenerateTrickleFeedServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet GenerateTrickleFeedServlet"); + out.println(""); + out.println(""); + out.println("

Servlet GenerateTrickleFeedServlet at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call PACS_TRICKLE_FEED_GENERATION(?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GenerateTrickleFeedServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + proc.setString(1, pacsId); + proc.registerOutParameter(2, java.sql.Types.VARCHAR); + + proc.execute(); + + //Outfile File Name + + // String Outfile = proc.getString(2); + + TrickleFeedFileMover oTrickleFeedFileMover = new TrickleFeedFileMover(); + oTrickleFeedFileMover.TrickleFeedFileMover(Outfile, pacsId); + + message = "Trickle Feed File Generated Successfully"; + + } catch (SQLException ex) { + // Logger.getLogger(GenerateTrickleFeedServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + + message = "Error Occured in Trickle Feed File Generation"; + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(GenerateTrickleFeedServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + message = "Error Occured in Trickle Feed File Generation"; + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/pacsFileUpload.jsp").forward(request, response); + + } + + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/Generate_100_Random_Colors.java b/IPKS_Updated/src/src/java/Controller/Generate_100_Random_Colors.java new file mode 100644 index 0000000..daadd25 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/Generate_100_Random_Colors.java @@ -0,0 +1,225 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +/** + * + * @author 1320035 + */ +import java.util.ArrayList; + +import java.awt.Color; +import java.util.Formatter; +import java.util.Random; +public class Generate_100_Random_Colors { + + private final static float U_OFF = .436f, + V_OFF = .615f; + private static long RAND_SEED = 0; // final keyword has been removed for SAST + private static Random rand = new Random(RAND_SEED); + + public static void hsv2rgb(float h, float s, float v, float[] rgb) { + // H is given on [0->6] or -1. S and V are given on [0->1]. + // RGB are each returned on [0->1]. + float m, n, f; + int i; + + float[] hsv = new float[3]; + + hsv[0] = h; + hsv[1] = s; + hsv[2] = v; + System.out.println("H: " + h + " S: " + s + " V:" + v); + if (hsv[0] == -1) { + rgb[0] = rgb[1] = rgb[2] = hsv[2]; + return; + } + i = (int) (Math.floor(hsv[0])); + f = hsv[0] - i; + if (i % 2 == 0) { + f = 1 - f; // if i is even + } + m = hsv[2] * (1 - hsv[1]); + n = hsv[2] * (1 - hsv[1] * f); + switch (i) { + case 6: + case 0: + rgb[0] = hsv[2]; + rgb[1] = n; + rgb[2] = m; + break; + case 1: + rgb[0] = n; + rgb[1] = hsv[2]; + rgb[2] = m; + break; + case 2: + rgb[0] = m; + rgb[1] = hsv[2]; + rgb[2] = n; + break; + case 3: + rgb[0] = m; + rgb[1] = n; + rgb[2] = hsv[2]; + break; + case 4: + rgb[0] = n; + rgb[1] = m; + rgb[2] = hsv[2]; + break; + case 5: + rgb[0] = hsv[2]; + rgb[1] = m; + rgb[2] = n; + break; + } + } + + public static void yuv2rgb(float y, float u, float v, float[] rgb) { + rgb[0] = 1 * y + 0 * u + 1.13983f * v; + rgb[1] = 1 * y + -.39465f * u + -.58060f * v; + rgb[2] = 1 * y + 2.03211f * u + 0 * v; + } + + public static void rgb2yuv(float r, float g, float b, float[] yuv) { + yuv[0] = .299f * r + .587f * g + .114f * b; + yuv[1] = -.14713f * r + -.28886f * g + .436f * b; + yuv[2] = .615f * r + -.51499f * g + -.10001f * b; + } + + private static float[] randYUVinRGBRange(float minComponent, float maxComponent) { + while (true) { + float y = rand.nextFloat(); // * YFRAC + 1-YFRAC); + float u = rand.nextFloat() * 2 * U_OFF - U_OFF; + float v = rand.nextFloat() * 2 * V_OFF - V_OFF; + float[] rgb = new float[3]; + yuv2rgb(y, u, v, rgb); + float r = rgb[0], g = rgb[1], b = rgb[2]; + if (0 <= r && r <= 1 + && 0 <= g && g <= 1 + && 0 <= b && b <= 1 + && (r > minComponent || g > minComponent || b > minComponent) && // don't want all dark components + (r < maxComponent || g < maxComponent || b < maxComponent)) // don't want all light components + { + return new float[]{y, u, v}; + } + } + } + + /* + * Returns an array of ncolors RGB triplets such that each is as unique from the rest as possible + * and each color has at least one component greater than minComponent and one less than maxComponent. + * Use min == 1 and max == 0 to include the full RGB color range. + * + * Warning: O N^2 algorithm blows up fast for more than 100 colors. + */ + public static Color[] generateVisuallyDistinctColors(int ncolors, float minComponent, float maxComponent) { + rand.setSeed(RAND_SEED); // So that we get consistent results for each combination of inputs + + float[][] yuv = new float[ncolors][3]; + + // initialize array with random colors + for (int got = 0; got < ncolors;) { + System.arraycopy(randYUVinRGBRange(minComponent, maxComponent), 0, yuv[got++], 0, 3); + } + // continually break up the worst-fit color pair until we get tired of searching + for (int c = 0; c < ncolors * 1000; c++) { + float worst = 8888; + int worstID = 0; + for (int i = 1; i < yuv.length; i++) { + for (int j = 0; j < i; j++) { + float dist = sqrdist(yuv[i], yuv[j]); + if (dist < worst) { + worst = dist; + worstID = i; + } + } + } + float[] best = randYUVBetterThan(worst, minComponent, maxComponent, yuv); + if (best == null) { + break; + } else { + yuv[worstID] = best; + } + } + + Color[] rgbs = new Color[yuv.length]; + for (int i = 0; i < yuv.length; i++) { + float[] rgb = new float[3]; + yuv2rgb(yuv[i][0], yuv[i][1], yuv[i][2], rgb); + rgbs[i] = new Color(rgb[0], rgb[1], rgb[2]); + //System.out.println(rgb[i][0] + "\t" + rgb[i][1] + "\t" + rgb[i][2]); + } + + return rgbs; + } + + private static float sqrdist(float[] a, float[] b) { + float sum = 0; + for (int i = 0; i < a.length; i++) { + float diff = a[i] - b[i]; + sum += diff * diff; + } + return sum; + } + + private static double worstFit(Color[] colors) { + float worst = 8888; + float[] a = new float[3], b = new float[3]; + for (int i = 1; i < colors.length; i++) { + colors[i].getColorComponents(a); + for (int j = 0; j < i; j++) { + colors[j].getColorComponents(b); + float dist = sqrdist(a, b); + if (dist < worst) { + worst = dist; + } + } + } + return Math.sqrt(worst); + } + + private static float[] randYUVBetterThan(float bestDistSqrd, float minComponent, float maxComponent, float[][] in) { + for (int attempt = 1; attempt < 100 * in.length; attempt++) { + float[] candidate = randYUVinRGBRange(minComponent, maxComponent); + boolean good = true; + for (int i = 0; i < in.length; i++) { + if (sqrdist(candidate, in[i]) < bestDistSqrd) { + good = false; + } + } + if (good) { + return candidate; + } + } + return null; // after a bunch of passes, couldn't find a candidate that beat the best. + } + + public ArrayList genRandColors() { + final int ncolors = 100; + ArrayList randColors = null; + try { + randColors = new ArrayList(); + Color[] colors = generateVisuallyDistinctColors(ncolors, .8f, .3f); + for (int i = 0; i < colors.length; i++) { + Formatter f = new Formatter(new StringBuffer("#")); + f.format("%02X", Integer.parseInt(colors[i].toString().split(",g")[0].split("=")[1])); + f.format("%02X", Integer.parseInt(colors[i].toString().split(",b")[0].split(",g=")[1])); + f.format("%02X", Integer.parseInt(colors[i].toString().split(",b=")[1].split("]")[0])); + randColors.add(f.toString()); + } + } catch (Exception ex) { + // ex.printStackTrace(); + System.out.println("Error Occurred during processing."); + } finally { + // return randColors; + System.out.println("Processing done."); + } + return randColors; + } + +} diff --git a/IPKS_Updated/src/src/java/Controller/GlProductOperationServlet.java b/IPKS_Updated/src/src/java/Controller/GlProductOperationServlet.java new file mode 100644 index 0000000..83dc9aa --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/GlProductOperationServlet.java @@ -0,0 +1,358 @@ + +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.GlProductOperationBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author Tcs Helpdesk10 + */ +public class GlProductOperationServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + /*response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + + out.println(""); + out.println(""); + out.println(""); + out.println("Servlet GlProductOperationServlet"); + out.println(""); + out.println(""); + out.println("

Servlet GlProductOperationServlet at " + request.getContextPath() + "

"); + out.println(""); + out.println(""); + } finally { + out.close(); + }*/ + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + + Connection con = null; + CallableStatement proc = null; + String message = ""; + + //String ServletName = request.getParameter("handle_id"); + + GlProductOperationBean oGlProductOperationBean = new GlProductOperationBean(); + + if ("Create".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oGlProductOperationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_gl_product(?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + proc.setString(1, oGlProductOperationBean.getStatus()); + proc.setString(2, oGlProductOperationBean.getApplicableFor()); + proc.setString(3, oGlProductOperationBean.getGlCode()); + proc.setString(4, oGlProductOperationBean.getGlName()); + proc.setString(5, oGlProductOperationBean.getGlDescription()); + proc.setString(6, oGlProductOperationBean.getProductType()); + proc.setString(7, oGlProductOperationBean.getInttCategory()); + proc.setString(8, oGlProductOperationBean.getSegmentCode()); + proc.setString(9, oGlProductOperationBean.getComponent1()); + proc.setString(10, oGlProductOperationBean.getComponent2()); + proc.setString(11, oGlProductOperationBean.getGlType()); + proc.setString(12, oGlProductOperationBean.getGl_product_id()); + proc.setString(13, ServletName); + + + proc.registerOutParameter(14, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(14); + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error Occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/glProductOperation.jsp").forward(request, response); + + } + + } else if ("Search".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oGlProductOperationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + + // ResultSet rs = statement.executeQuery("select id, status, action, to_char(eff_date,'dd/mm/yyyy') as eff_date , gl_code, gl_name, gl_desc, product_type, interest_cat, segment_code, comp1, comp2, gl_type from gl_product where gl_code= '" + oGlProductOperationBean.getBglCodeSearch() + "'"); + + while (rs.next()) { + + oGlProductOperationBean.setGl_product_id(rs.getString("id")); + oGlProductOperationBean.setStatus(rs.getString("status")); + oGlProductOperationBean.setApplicableFor(rs.getString("action")); + oGlProductOperationBean.setEffectDate(rs.getString("eff_date")); + oGlProductOperationBean.setGlCode(rs.getString("gl_code")); + oGlProductOperationBean.setGlName(rs.getString("gl_name")); + oGlProductOperationBean.setGlDescription(rs.getString("gl_desc")); + oGlProductOperationBean.setProductType(rs.getString("product_type")); + oGlProductOperationBean.setInttCategory(rs.getString("interest_cat")); + oGlProductOperationBean.setSegmentCode(rs.getString("segment_code")); + oGlProductOperationBean.setComponent1(rs.getString("comp1")); + oGlProductOperationBean.setComponent2(rs.getString("comp2")); + oGlProductOperationBean.setGlType(rs.getString("gl_type")); + + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + } + + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + if (SeachFound == 0) { + message = "GL Code not exists in the system"; + request.setAttribute("message", message); + } + request.setAttribute("oGlProductOperationBeanObj", oGlProductOperationBean); + request.getRequestDispatcher("/glProductOperation.jsp").forward(request, response); + + } else if ("Update".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oGlProductOperationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_gl_product(?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + proc.setString(1, oGlProductOperationBean.getStatusAmend()); + proc.setString(2, oGlProductOperationBean.getApplicableForAmend()); + proc.setString(3, oGlProductOperationBean.getGlCodeAmend()); + proc.setString(4, oGlProductOperationBean.getGlNameAmend()); + proc.setString(5, oGlProductOperationBean.getGlDescriptionAmend()); + proc.setString(6, oGlProductOperationBean.getProductTypeAmend()); + proc.setString(7, oGlProductOperationBean.getInttCategoryAmend()); + proc.setString(8, oGlProductOperationBean.getSegmentCodeAmend()); + proc.setString(9, oGlProductOperationBean.getComponent1Amend()); + proc.setString(10, oGlProductOperationBean.getComponent2Amend()); + proc.setString(11, oGlProductOperationBean.getGlTypeAmend()); + proc.setString(12, oGlProductOperationBean.getGl_product_id()); + proc.setString(13, ServletName); + + proc.registerOutParameter(14, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(14); + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error Occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/glProductOperation.jsp").forward(request, response); + + } + + } else if ("StatusSearch".equalsIgnoreCase(ServletName)) { + + // String bglCodeActivation = request.getParameter("bglCodeActivation"); + // String vFlag = request.getParameter("BglstatusFlag"); + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.gl_product_Activation(?,?,?)}"); + } catch (SQLException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + proc.setString(1, bglCodeActivation); + proc.setString(2, vFlag); + proc.registerOutParameter(3, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(3); + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error Occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/glProductOperation.jsp").forward(request, response); + + } + + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/GliffDepositReportServlet.java b/IPKS_Updated/src/src/java/Controller/GliffDepositReportServlet.java new file mode 100644 index 0000000..7f1b99e --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/GliffDepositReportServlet.java @@ -0,0 +1,191 @@ + +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + + +import LoginDb.DbHandler; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import oracle.jdbc.OracleTypes; +import org.apache.commons.beanutils.BeanUtils; +import DataEntryBean.GliffDepositReportBean; + +/** + * + * @author Tcs Helpdesk10 + */ +public class GliffDepositReportServlet extends HttpServlet { + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + CallableStatement proc = null; + int searchFound = 0; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + + String JSP_Name = request.getParameter("screenName"); + + + //For Pagination + + int page = 1; + int recordsPerPage = 10; + String butType = request.getParameter("but_type"); + if (request.getParameter("page") != null + && !(request.getParameter("page").equals("")) && !(request.getParameter("page").equals("null"))) { + //page = Integer.parseInt(request.getParameter("page")); + if (null != butType && !(butType.equals(""))) { + if (butType.equals("N")) { + page = page + 1; + } else { + page = page - 1; + } + } + + } + + int startRow = 0; + int endRow = 0; + startRow = (page - 1) * recordsPerPage + 1; + endRow = page * recordsPerPage; + int recordCount = 0; + int totalRecordCount = 0; + // totalRecordCount = Integer.parseInt(request.getParameter("totalRecordCount")); + + //End of pagination + + + if ("GliffDepositReport".equalsIgnoreCase(JSP_Name)) { + + GliffDepositReportBean oGliffDepositReportBean = new GliffDepositReportBean(); + GliffDepositReportBean oGliffDepositReportBeanSearch = new GliffDepositReportBean(); + ArrayList alGliffDepositReportBean = new ArrayList(); + try { + // BeanUtils.populate(oGliffDepositReportBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(GliffDepositReportServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(GliffDepositReportServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call Enquiry.Gliff_Report(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + proc.setString(1, oGliffDepositReportBean.getFromDate()); + proc.setString(2, pacsId); + proc.setInt(3, startRow); + proc.setInt(4, endRow); + proc.registerOutParameter(5, OracleTypes.CURSOR); + proc.registerOutParameter(6, java.sql.Types.VARCHAR); + proc.registerOutParameter(7, java.sql.Types.INTEGER); + + proc.executeUpdate(); + + // rs = (ResultSet) proc.getObject(5); + //recordCount = proc.getInt(7); + + while (rs.next()) { + searchFound = 1; + oGliffDepositReportBean = new GliffDepositReportBean(); + + oGliffDepositReportBean.setFromDate(rs.getString("JR_date")); + oGliffDepositReportBean.setTXN_REF_NO(rs.getString("TXN_REF_NO")); + oGliffDepositReportBean.setTRAN_DATE(rs.getString("TRAN_DATE")); + oGliffDepositReportBean.setPACS_ID(rs.getString("PACS_ID")); + oGliffDepositReportBean.setPOST_DATE(rs.getString("POST_DATE")); + oGliffDepositReportBean.setGL_CLASS_CODE(rs.getString("GL_CLASS_CODE")); + oGliffDepositReportBean.setTXN_AMT(rs.getString("TXN_AMT")); + oGliffDepositReportBean.setTXN_IND(rs.getString("TXN_IND")); + oGliffDepositReportBean.setACCT_TYPE(rs.getString("ACCT_TYPE")); + oGliffDepositReportBean.setPROD_NAME(rs.getString("PROD_NAME")); + oGliffDepositReportBean.setPROD_CODE(rs.getString("PROD_CODE")); + oGliffDepositReportBean.setINTT_CAT(rs.getString("INTT_CAT")); + oGliffDepositReportBean.setKEY_1(rs.getString("KEY_1")); + + + + alGliffDepositReportBean.add(oGliffDepositReportBean); + request.setAttribute("displayFlag", "Y"); + + } + + //For pagination + + int noOfRecords = alGliffDepositReportBean.size(); + int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage); + + request.setAttribute("noOfPages", noOfPages); + request.setAttribute("currentPage", page); + request.setAttribute("totalRecordCount", totalRecordCount); + request.setAttribute("recordCount", recordCount); + request.setAttribute("noOfRecords", noOfRecords); + + //End Of Pagination + + + + // oGliffDepositReportBeanSearch.setFromDate(request.getParameter("fromDate")); + + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error Occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + } + if (searchFound == 0) { + message = "No data exists for selected item"; + request.setAttribute("message", message); + } + request.setAttribute("oGliffDepositReportBeanSearch", oGliffDepositReportBeanSearch); + request.setAttribute("alGliffDepositReportBean", alGliffDepositReportBean); + request.setAttribute("message", message); + + request.getRequestDispatcher("/Deposit/GliffDepositReport.jsp").forward(request, response); + + } + + + + } +} diff --git a/IPKS_Updated/src/src/java/Controller/GodownServlet.java b/IPKS_Updated/src/src/java/Controller/GodownServlet.java new file mode 100644 index 0000000..4ea1c08 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/GodownServlet.java @@ -0,0 +1,284 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import DataEntryBean.GodownBean; + + + + +/** + * + * @author 590685 + */ +public class GodownServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + + // String ServletName = request.getParameter("handle_id"); + + + GodownBean GodownBeanObj = new GodownBean(); + + + if ("Create".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(GodownBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(GodownServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(GodownServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_godown(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GodownServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + proc.setString(1, GodownBeanObj.getGodown_id()); + proc.setString(2, GodownBeanObj.getName()); + proc.setString(3, GodownBeanObj.getAddress()); + proc.setString(4, GodownBeanObj.getPhone()); + proc.setString(5, GodownBeanObj.getContactperson()); + proc.setString(6, GodownBeanObj.getCapacity()); + proc.setString(7, pacsId); + proc.setString(8, ServletName); + + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(9); + + } catch (SQLException ex) { + // Logger.getLogger(GodownServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error Occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(GodownServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Trading_JSP/Godown.jsp").forward(request, response); + + } + + } else if ("Search".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(GodownBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(GodownServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(GodownServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(GodownServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + + // ResultSet rs = statement.executeQuery("select ID,GODOWN_NAME, GODOWN_ADDRESS, GODOWN_SPOC, PHN_NO, CAPACITY,AVAILABLE_CAP from TRADING_GODOWN_MST where ID= '" + GodownBeanObj.getGodown_id() + "' "); + + while (rs.next()) { + + GodownBeanObj.setName(rs.getString("GODOWN_NAME")); + GodownBeanObj.setAddress(rs.getString("GODOWN_ADDRESS")); + GodownBeanObj.setPhone(rs.getString("PHN_NO")); + GodownBeanObj.setContactperson(rs.getString("GODOWN_SPOC")); + GodownBeanObj.setCapacity(rs.getString("CAPACITY")); + GodownBeanObj.setAvcapacity(rs.getString("AVAILABLE_CAP")); + GodownBeanObj.setGodown_id(rs.getString("ID")); + + + + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + } + + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(GodownServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + if (SeachFound == 0) { + message = "Godown does not exist in the system"; + request.setAttribute("message", message); + } + request.setAttribute("GodownBeanObj", GodownBeanObj); + + request.getRequestDispatcher("/Trading_JSP/Godown.jsp").forward(request, response); + + } else if ("Update".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(GodownBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(GodownServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(GodownServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_godown(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GodownServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + proc.setString(1, GodownBeanObj.getGodown_id()); + proc.setString(2, GodownBeanObj.getNameAmend()); + proc.setString(3, GodownBeanObj.getAddressAmend()); + proc.setString(4, GodownBeanObj.getPhoneAmend()); + proc.setString(5, GodownBeanObj.getContactpersonAmend()); + proc.setString(6, GodownBeanObj.getCapacityAmend()); + proc.setString(7, GodownBeanObj.getAvcapacityAmend()); + proc.setString(8, ServletName); + + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(9); + + } catch (SQLException ex) { + // Logger.getLogger(GodownServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error Occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(GodownServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Trading_JSP/Godown.jsp").forward(request, response); + + } + + } + + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/GovtOrderCreationServlet.java b/IPKS_Updated/src/src/java/Controller/GovtOrderCreationServlet.java new file mode 100644 index 0000000..5dc63fb --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/GovtOrderCreationServlet.java @@ -0,0 +1,980 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import java.io.IOException; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import DataEntryBean.GovtOrderCreationDetailBean; +import DataEntryBean.GovtOrderCreationExpenseBean; +import DataEntryBean.GovtOrderCreationHeaderBean; +import LoginDb.DbHandler; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.StringTokenizer; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 590685 + */ +public class GovtOrderCreationServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException, SQLException { + + HttpSession session = request.getSession(false); + Connection con = null; + Connection con1 = null; + Connection con2 = null; + CallableStatement stmt = null; + CallableStatement proc = null; + String message = ""; + String orderId = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + // String ServletName = request.getParameter("handle_id"); + //String orderNo = request.getParameter("govtOrderCode"); + //String desc = request.getParameter("descDetails"); + //String startDate = request.getParameter("procStartDate"); + //String endDate = request.getParameter("procEndDate"); + //String commissionRate = request.getParameter("govtCodeDetails"); + GovtOrderCreationHeaderBean oGovtOrderCreationHeaderBeanBean = new GovtOrderCreationHeaderBean(); + + ArrayList alGovtOrderCreationDetailBean = new ArrayList(); + ArrayList alGovtOrderCreationExpenseBean = new ArrayList(); + ArrayList alGovtOrderCreationDetailBeanNew = new ArrayList(); + ArrayList alGovtOrderCreationDetailUpdated = new ArrayList(); + ArrayList alGovtOrderCreationDetailDeleted = new ArrayList(); + + + ArrayList alGovtOrderCreationExpenseBeanNew = new ArrayList(); + ArrayList alGovtOrderCreationExpenseBeanUpdated = new ArrayList(); + ArrayList alGovtOrderCreationExpenseBeanDeleted = new ArrayList(); + + try { + // BeanUtils.populate(oGovtOrderCreationHeaderBeanBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + GovtOrderCreationDetailBean oGovtOrderCreationDetailBean = new GovtOrderCreationDetailBean(); + try { + // BeanUtils.populate(oGovtOrderCreationDetailBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + GovtOrderCreationExpenseBean oGovtOrderCreationExpenseBean = new GovtOrderCreationExpenseBean(); + try { + // BeanUtils.populate(oGovtOrderCreationExpenseBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + if ("Create".equalsIgnoreCase(ServletName)) { + + //START HEADER PART + try { + + con = DbHandler.getDBConnection(); + try { + + stmt = con.prepareCall("{ call GPS_Operation.govt_proc_head(?,?,?,?,?,?,?) }"); + + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + stmt.setString(1, oGovtOrderCreationHeaderBeanBean.getGovtOrderCodeCreate()); + stmt.setString(2, oGovtOrderCreationHeaderBeanBean.getGovtOrderDesc()); + stmt.setString(3, oGovtOrderCreationHeaderBeanBean.getProcStartDate()); + stmt.setString(4, oGovtOrderCreationHeaderBeanBean.getProcEndDate()); + stmt.setString(5, pacsId); + stmt.setString(6, oGovtOrderCreationHeaderBeanBean.getGovtCommission()); + stmt.registerOutParameter(7, java.sql.Types.VARCHAR); + stmt.execute(); + //orderId = stmt.getString(7); + message = "Order Code Already Exsist"; + + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during processing."); + } finally { + try { + con.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error Occurred during processing."); + } + } + + //END HEADER PART + //START DETAIL PART + if (!orderId.equals("Order Code Already Exsist")) { + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + String item_type = request.getParameter("item_type" + i); + String item_subtype = request.getParameter("item_subtype" + i); + String item_unit = request.getParameter("item_unit" + i); + // String qty = request.getParameter("qty" + i); + // String item_rateperunit = request.getParameter("item_rateperunit" + i); + // String total = request.getParameter("total" + i); + // String commodityId = request.getParameter("commodityId" + i); + + if (commodityId != null) { + oGovtOrderCreationDetailBean = new GovtOrderCreationDetailBean(); + oGovtOrderCreationDetailBean.setCommodityId(commodityId); + oGovtOrderCreationDetailBean.setItem_type(item_type); + oGovtOrderCreationDetailBean.setItem_subtype(item_subtype); + oGovtOrderCreationDetailBean.setItem_unit(item_unit); + oGovtOrderCreationDetailBean.setQty(qty); + oGovtOrderCreationDetailBean.setItem_rateperunit(item_rateperunit); + oGovtOrderCreationDetailBean.setTotal(total); + + alGovtOrderCreationDetailBean.add(oGovtOrderCreationDetailBean); + } + } catch (Exception e) { + System.out.println("Error Occurred during processing."); + } + } + + if (alGovtOrderCreationDetailBean.size() > 0) { + try { + con1 = DbHandler.getDBConnection(); + stmt = con1.prepareCall("{ call GPS_Operation.govt_proc_detail(?,?,?,?,?) }"); + for (int j = 0; j < alGovtOrderCreationDetailBean.size(); j++) { + oGovtOrderCreationDetailBean = alGovtOrderCreationDetailBean.get(j); + stmt.setString(1, orderId); + stmt.setString(2, oGovtOrderCreationDetailBean.getCommodityId()); + stmt.setString(3, oGovtOrderCreationDetailBean.getQty()); + stmt.setString(4, oGovtOrderCreationDetailBean.getItem_rateperunit()); + stmt.setString(5, oGovtOrderCreationDetailBean.getTotal()); + stmt.addBatch(); + + } + + stmt.executeBatch(); + + } catch (SQLException ex) { + String delete = "Delete from gps_govt_proc_header where id = '" + orderId + "' "; + Connection conn = DbHandler.getDBConnection(); + PreparedStatement pstmt = conn.prepareCall(delete); + pstmt.executeQuery(); + if (conn != null) { + // conn.commit(); + conn.close(); + } + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during processing."); + } finally { + try { + con1.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error Occurred during processing."); + } + } + + } + + // END DETAIL PART + // START EXPENSE PART + int counter1 = Integer.parseInt(request.getParameter("rowCounter1")); + + + + for (int i = 1; i <= counter1; i++) { + try { + + // String expense_head = request.getParameter("expense_head" + i); + // String expense_unit = request.getParameter("expense_unit" + i); + // String expense_rate_per_unit = request.getParameter("expense_rate_per_unit" + i); + + oGovtOrderCreationExpenseBean = new GovtOrderCreationExpenseBean(); + oGovtOrderCreationExpenseBean.setExpense_head(expense_head); + oGovtOrderCreationExpenseBean.setExpense_unit(expense_unit); + oGovtOrderCreationExpenseBean.setExpense_rate_per_unit(expense_rate_per_unit); + + alGovtOrderCreationExpenseBean.add(oGovtOrderCreationExpenseBean); + + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + + if (alGovtOrderCreationExpenseBean.size() > 0) { + + try { + con2 = DbHandler.getDBConnection(); + stmt = con2.prepareCall("{ call GPS_Operation.expense_detail(?,?,?,?) }"); + for (int j = 0; j < alGovtOrderCreationExpenseBean.size(); j++) { + oGovtOrderCreationExpenseBean = alGovtOrderCreationExpenseBean.get(j); + stmt.setString(1, orderId); + stmt.setString(2, oGovtOrderCreationExpenseBean.getExpense_head()); + stmt.setString(3, oGovtOrderCreationExpenseBean.getExpense_unit()); + stmt.setString(4, oGovtOrderCreationExpenseBean.getExpense_rate_per_unit()); + stmt.addBatch(); + + } + stmt.executeBatch(); + message = "Order Created Successfully. Order Id is " + orderId; + } catch (SQLException ex) { + String deleteHead = "Delete from gps_govt_proc_header where id = '" + orderId + "' "; + String deleteDetail = "Delete from gps_govt_proc_detail where order_id = '" + orderId + "' "; + Connection conn = DbHandler.getDBConnection(); + Connection conn1 = DbHandler.getDBConnection(); + PreparedStatement pstmt = conn.prepareCall(deleteHead); + PreparedStatement pstmt1 = conn1.prepareCall(deleteDetail); + pstmt.executeQuery(); + pstmt1.executeQuery(); + if (conn != null) { + // conn.commit(); + conn.close(); + } + if (conn1 != null) { + // conn1.commit(); + conn1.close(); + } + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during processing."); + } finally { + try { + stmt.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error Occurred during stmt close."); + } + try { + con2.close(); + } catch (SQLException ex) { + // con.rollback(); + // con1.rollback(); + // con2.rollback(); + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during connection close."); + } + } + + } + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/GPS_JSP/GovtOrderCreation.jsp").forward(request, response); + + } else if ("Search".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oGovtOrderCreationHeaderBeanBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + + // ResultSet rs = statement.executeQuery("select id,order_code,order_desc,TO_CHAR(proc_start_dt, 'dd/mm/yyyy') as proc_start_dt,TO_CHAR(proc_end_dt,'dd/mm/yyyy') as proc_end_dt,commissionrate from gps_govt_proc_header t where t.id= '" + oGovtOrderCreationHeaderBeanBean.getGovtOrderId() + "' "); + + while (rs.next()) { + + oGovtOrderCreationHeaderBeanBean.setGovtOrderId(rs.getString("id")); + oGovtOrderCreationHeaderBeanBean.setGovtOrderCodeCreate(rs.getString("order_code")); + oGovtOrderCreationHeaderBeanBean.setGovtOrderDesc(rs.getString("order_desc")); + oGovtOrderCreationHeaderBeanBean.setProcStartDate(rs.getString("PROC_START_DT")); + oGovtOrderCreationHeaderBeanBean.setProcEndDate(rs.getString("proc_end_dt")); + oGovtOrderCreationHeaderBeanBean.setGovtCommission(rs.getString("commissionrate")); + + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + } + + statement.close(); + + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + if (SeachFound == 0) { + message = "Order not exists in the system"; + request.setAttribute("message", message); + } + + //For Details Part Populate + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + + String query = "select t.order_id,g.TYPE_DESC,g.SUBTYPE_DESC,g.unit,t.rate_unit,t.total,t.QUANTITY_AVAILABLE,g.id,t.detail_id " + + " from gps_govt_proc_detail t,gps_commodity_master g" + + " where t.commodity_id=g.id" + + " and t.order_id= '" + oGovtOrderCreationHeaderBeanBean.getGovtOrderId() + "' "; + // ResultSet rs = statement.executeQuery(query); + + while (rs.next()) { + + oGovtOrderCreationDetailBean = new GovtOrderCreationDetailBean(); + oGovtOrderCreationDetailBean.setGovtOrderId_Dtl(rs.getString("order_id")); + oGovtOrderCreationDetailBean.setItem_type(rs.getString("TYPE_DESC")); + oGovtOrderCreationDetailBean.setItem_subtype(rs.getString("SUBTYPE_DESC")); + oGovtOrderCreationDetailBean.setItem_unit(rs.getString("unit")); + oGovtOrderCreationDetailBean.setItem_rateperunit(rs.getString("rate_unit")); + oGovtOrderCreationDetailBean.setTotal(rs.getString("total")); + oGovtOrderCreationDetailBean.setQty(rs.getString("QUANTITY_AVAILABLE")); + oGovtOrderCreationDetailBean.setCommodityId("id"); + oGovtOrderCreationDetailBean.setDetailIDAmend(rs.getString("detail_id")); + + alGovtOrderCreationDetailBean.add(oGovtOrderCreationDetailBean); + + } + + statement.close(); + + + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + //start of expense part + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + + String query = "select expense_head,expense_unit,expense_rate,expense_id from order_expense_detail t" + + " where t.order_id= '" + oGovtOrderCreationHeaderBeanBean.getGovtOrderId() + "' "; + // ResultSet rs = statement.executeQuery(query); + + while (rs.next()) { + + oGovtOrderCreationExpenseBean = new GovtOrderCreationExpenseBean(); + oGovtOrderCreationExpenseBean.setExpense_head(rs.getString("expense_head")); + oGovtOrderCreationExpenseBean.setExpense_unit(rs.getString("expense_unit")); + oGovtOrderCreationExpenseBean.setExpense_rate_per_unit(rs.getString("expense_rate")); + oGovtOrderCreationExpenseBean.setExpenseIDAmend(rs.getString("expense_id")); + + + + alGovtOrderCreationExpenseBean.add(oGovtOrderCreationExpenseBean); + + } + + statement.close(); + + + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + connection.close(); + + request.setAttribute("GovtOrderCreationHeaderBeanObj", oGovtOrderCreationHeaderBeanBean); + request.setAttribute("alGovtOrderCreationDetailBean", alGovtOrderCreationDetailBean); + request.setAttribute("alGovtOrderCreationExpenseBean", alGovtOrderCreationExpenseBean); + + request.getRequestDispatcher("/GPS_JSP/GovtOrderCreation.jsp").forward(request, response); + + } else if ("Update".equalsIgnoreCase(ServletName)) { + try { + + con = DbHandler.getDBConnection(); + try { + + stmt = con.prepareCall("{ call GPS_Operation.upsert_govt_header(?,?,?,?,?,?,?,?) }"); + + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + stmt.setString(1, oGovtOrderCreationHeaderBeanBean.getOrderidAmend()); + stmt.setString(2, oGovtOrderCreationHeaderBeanBean.getGovtOrderCodeCreateAmend()); + stmt.setString(3, oGovtOrderCreationHeaderBeanBean.getGovtOrderDescAmend()); + stmt.setString(4, oGovtOrderCreationHeaderBeanBean.getProcStartDateAmend()); + stmt.setString(5, oGovtOrderCreationHeaderBeanBean.getProcEndDateAmend()); + stmt.setString(6, pacsId); + stmt.setString(7, oGovtOrderCreationHeaderBeanBean.getGovtCommissionAmend()); + stmt.registerOutParameter(8, java.sql.Types.VARCHAR); + stmt.execute(); + // message = stmt.getString(8); + + + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during processing."); + } finally { + try { + con.close(); + } catch (SQLException e) { + //System.out.println(e.toString()); + System.out.println("Error Occurred during connection close."); + } + } + //up to this Okay for Header table update + int add = Integer.parseInt(request.getParameter("add")); + int counterfor_Detail = Integer.parseInt(request.getParameter("rowCounterAmend")); + counterfor_Detail = counterfor_Detail + add; + + for (int i = 1; i <= counterfor_Detail; i++) { + try { + + String item_descAmend = request.getParameter("item_descAmend" + i); + String subtype_descAmend = request.getParameter("subtype_descAmend" + i); + String item_unitAmend = request.getParameter("item_unitAmend" + i); + // String qtyAmend = request.getParameter("qtyAmend" + i); + // String item_rateperunitAmend = request.getParameter("item_rateperunitAmend" + i); + // String totalAmend = request.getParameter("totalAmend" + i); + // String commodityIdAmend = request.getParameter("commodityIdAmend" + i); + String item_typeAmend = request.getParameter("item_typeAmend" + i); + String item_subtypeAmend = request.getParameter("item_subtypeAmend" + i); + String rowStatus = request.getParameter("rowStatus" + i); + // String detailID = request.getParameter("detailIDAmend" + i); + + if (item_typeAmend != null && item_subtypeAmend != null && rowStatus != null) { + oGovtOrderCreationDetailBean = new GovtOrderCreationDetailBean(); + oGovtOrderCreationDetailBean.setItem_descAmend(item_descAmend); + oGovtOrderCreationDetailBean.setSubtype_descAmend(subtype_descAmend); + oGovtOrderCreationDetailBean.setItem_unitAmend(item_unitAmend); + oGovtOrderCreationDetailBean.setQtyAmend(qtyAmend); + oGovtOrderCreationDetailBean.setItem_rateperunitAmend(item_rateperunitAmend); + oGovtOrderCreationDetailBean.setTotalAmend(totalAmend); + oGovtOrderCreationDetailBean.setCommodityIdAmend(commodityIdAmend); + oGovtOrderCreationDetailBean.setItem_typeAmend(item_typeAmend); + oGovtOrderCreationDetailBean.setItem_subtypeAmend(item_subtypeAmend); + + + oGovtOrderCreationDetailBean.setDetailIDAmend(detailID); + + if (rowStatus.equals("N")) { + alGovtOrderCreationDetailBeanNew.add(oGovtOrderCreationDetailBean); + } else { + alGovtOrderCreationDetailUpdated.add(oGovtOrderCreationDetailBean); + } + + + } + + } catch (Exception e) { + System.out.println("Error Occurred during processing."); + } + } + + //For Deletion + + //String deletedRows = request.getParameter("deletedRows"); + + + if ((!deletedRows.equalsIgnoreCase(null)) || (!deletedRows.equalsIgnoreCase(""))) { + StringTokenizer tokenizer = new StringTokenizer(deletedRows, ","); + + while (tokenizer.hasMoreTokens()) { + + oGovtOrderCreationDetailBean = new GovtOrderCreationDetailBean(); + oGovtOrderCreationDetailBean.setDetailIDAmend(tokenizer.nextToken()); + + alGovtOrderCreationDetailDeleted.add(oGovtOrderCreationDetailBean); + + } + } + + + + + if ((alGovtOrderCreationDetailUpdated.size() > 0) && (!message.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call GPS_Operation.Upsert_govt_dtl(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + + for (int j = 0; j < alGovtOrderCreationDetailUpdated.size(); j++) { + + oGovtOrderCreationDetailBean = alGovtOrderCreationDetailUpdated.get(j); + + + proc.setString(1, oGovtOrderCreationHeaderBeanBean.getOrderidAmend()); + proc.setString(2, oGovtOrderCreationDetailBean.getDetailIDAmend()); + proc.setString(3, oGovtOrderCreationDetailBean.getCommodityIdAmend()); + proc.setString(4, oGovtOrderCreationDetailBean.getQtyAmend()); + proc.setString(5, oGovtOrderCreationDetailBean.getItem_rateperunitAmend()); + proc.setString(6, oGovtOrderCreationDetailBean.getTotalAmend()); + proc.setString(7, ServletName); + proc.addBatch(); + + + + } + + proc.executeBatch(); + message = "Govt Order Successfully Updated"; + + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error Occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during connection close."); + } + } + } + + //for deletion + + if ((alGovtOrderCreationDetailDeleted.size() > 0) && (!message.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call GPS_Operation.Upsert_govt_dtl(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + for (int j = 0; j < alGovtOrderCreationDetailDeleted.size(); j++) { + + oGovtOrderCreationDetailBean = new GovtOrderCreationDetailBean(); + + oGovtOrderCreationDetailBean = alGovtOrderCreationDetailDeleted.get(j); + + + proc.setString(1, oGovtOrderCreationHeaderBeanBean.getOrderidAmend()); + proc.setString(2, oGovtOrderCreationDetailBean.getDetailIDAmend()); + proc.setString(3, oGovtOrderCreationDetailBean.getCommodityIdAmend()); + proc.setString(4, oGovtOrderCreationDetailBean.getQtyAmend()); + proc.setString(5, oGovtOrderCreationDetailBean.getItem_rateperunitAmend()); + proc.setString(6, oGovtOrderCreationDetailBean.getTotalAmend()); + proc.setString(7, "Delete"); + proc.addBatch(); + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error Occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during connection close."); + } + } + } + + //For New Insertion + + if ((alGovtOrderCreationDetailBeanNew.size() > 0) && (!message.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{call GPS_Operation.Upsert_govt_dtl(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + + for (int j = 0; j < alGovtOrderCreationDetailBeanNew.size(); j++) { + + oGovtOrderCreationDetailBean = new GovtOrderCreationDetailBean(); + oGovtOrderCreationDetailBean = alGovtOrderCreationDetailBeanNew.get(j); + + + proc.setString(1, oGovtOrderCreationHeaderBeanBean.getOrderidAmend()); + proc.setString(2, oGovtOrderCreationDetailBean.getDetailIDAmend()); + proc.setString(3, oGovtOrderCreationDetailBean.getCommodityIdAmend()); + proc.setString(4, oGovtOrderCreationDetailBean.getQtyAmend()); + proc.setString(5, oGovtOrderCreationDetailBean.getItem_rateperunitAmend()); + proc.setString(6, oGovtOrderCreationDetailBean.getTotalAmend()); + proc.setString(7, "Create"); + proc.addBatch(); + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error Occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during connection close."); + } + } + } + + //Detail Two portion starts here + + int counterfor_Expense = Integer.parseInt(request.getParameter("rowCounterAmend2")); + + for (int i = 1; i <= counterfor_Expense; i++) { + try { + + + // String expense_headAmend = request.getParameter("expense_headAmend" + i); + // String expense_unitAmend = request.getParameter("expense_unitAmend" + i); + // String expense_rate_per_unitAmend = request.getParameter("expense_rate_per_unitAmend" + i); + String rowStatus_Expn = request.getParameter("rowStatus_Expn" + i); + // String ExpenseIDAmend = request.getParameter("ExpenseIDAmend" + i); + + if (expense_headAmend != null && expense_unitAmend != null && rowStatus_Expn != null) { + oGovtOrderCreationExpenseBean = new GovtOrderCreationExpenseBean(); + + oGovtOrderCreationExpenseBean.setExpense_headAmend(expense_headAmend); + oGovtOrderCreationExpenseBean.setExpense_unitAmend(expense_unitAmend); + oGovtOrderCreationExpenseBean.setExpense_rate_per_unitAmend(expense_rate_per_unitAmend); + + + oGovtOrderCreationExpenseBean.setExpenseIDAmend(ExpenseIDAmend); + + if (rowStatus_Expn.equals("N")) { + alGovtOrderCreationExpenseBeanNew.add(oGovtOrderCreationExpenseBean); + } else { + alGovtOrderCreationExpenseBeanUpdated.add(oGovtOrderCreationExpenseBean); + } + + } + + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + + //For Deletion + + // String deletedRows2 = request.getParameter("deletedRows2"); + + if ((!deletedRows2.equalsIgnoreCase(null)) || (!deletedRows2.equalsIgnoreCase(""))) { + StringTokenizer tokenizer2 = new StringTokenizer(deletedRows2, ","); + + while (tokenizer2.hasMoreTokens()) { + + oGovtOrderCreationExpenseBean = new GovtOrderCreationExpenseBean(); + oGovtOrderCreationExpenseBean.setExpenseIDAmend(tokenizer2.nextToken()); + + alGovtOrderCreationExpenseBeanDeleted.add(oGovtOrderCreationExpenseBean); + + } + } + + if ((alGovtOrderCreationExpenseBeanUpdated.size() > 0) && (!message.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call GPS_Operation.Upsert_govt_Expense(?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + + for (int j = 0; j < alGovtOrderCreationExpenseBeanUpdated.size(); j++) { + + oGovtOrderCreationExpenseBean = alGovtOrderCreationExpenseBeanUpdated.get(j); + + proc.setString(1, oGovtOrderCreationHeaderBeanBean.getOrderidAmend()); + proc.setString(2, oGovtOrderCreationExpenseBean.getExpenseIDAmend()); + proc.setString(3, oGovtOrderCreationExpenseBean.getExpense_headAmend()); + proc.setString(4, oGovtOrderCreationExpenseBean.getExpense_unitAmend()); + proc.setString(5, oGovtOrderCreationExpenseBean.getExpense_rate_per_unitAmend()); + + proc.setString(6, ServletName); + proc.addBatch(); + + } + + proc.executeBatch(); + message = "Govt Order Successfully Updated"; + + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error Occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during connection close."); + } + } + } + + //for deletion + + if ((alGovtOrderCreationExpenseBeanDeleted.size() > 0) && (!message.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call GPS_Operation.Upsert_govt_Expense(?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + + for (int j = 0; j < alGovtOrderCreationExpenseBeanDeleted.size(); j++) { + + oGovtOrderCreationDetailBean = new GovtOrderCreationDetailBean(); + + oGovtOrderCreationExpenseBean = alGovtOrderCreationExpenseBeanDeleted.get(j); + + proc.setString(1, oGovtOrderCreationHeaderBeanBean.getOrderidAmend()); + proc.setString(2, oGovtOrderCreationExpenseBean.getExpenseIDAmend()); + proc.setString(3, oGovtOrderCreationExpenseBean.getExpense_headAmend()); + proc.setString(4, oGovtOrderCreationExpenseBean.getExpense_unitAmend()); + proc.setString(5, oGovtOrderCreationExpenseBean.getExpense_rate_per_unitAmend()); + + proc.setString(6, "Delete"); + proc.addBatch(); + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error Occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during connection close."); + } + } + } + + //For New Insertion + + if ((alGovtOrderCreationExpenseBeanNew.size() > 0) && (!message.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{call GPS_Operation.Upsert_govt_Expense(?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + for (int j = 0; j < alGovtOrderCreationExpenseBeanNew.size(); j++) { + + oGovtOrderCreationExpenseBean = new GovtOrderCreationExpenseBean(); + oGovtOrderCreationExpenseBean = alGovtOrderCreationExpenseBeanNew.get(j); + + + proc.setString(1, oGovtOrderCreationHeaderBeanBean.getOrderidAmend()); + proc.setString(2, oGovtOrderCreationExpenseBean.getExpenseIDAmend()); + proc.setString(3, oGovtOrderCreationExpenseBean.getExpense_headAmend()); + proc.setString(4, oGovtOrderCreationExpenseBean.getExpense_unitAmend()); + proc.setString(5, oGovtOrderCreationExpenseBean.getExpense_rate_per_unitAmend()); + + proc.setString(6, "Create"); + proc.addBatch(); + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error Occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during connection close."); + } + } + } + + //up to this all update delete new insert are okay for detail table 1 + request.setAttribute("message", message); + request.getRequestDispatcher("/GPS_JSP/GovtOrderCreation.jsp").forward(request, response); + + } + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + try { + processRequest(request, response); + + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + } + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + try { + processRequest(request, response); + + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + } + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/GradeMasterServlet.java b/IPKS_Updated/src/src/java/Controller/GradeMasterServlet.java new file mode 100644 index 0000000..52fe997 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/GradeMasterServlet.java @@ -0,0 +1,265 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.PayrollBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.sql.CallableStatement; +import java.sql.Statement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import java.lang.reflect.InvocationTargetException; + +/** + * + * @author Tcs Help desk122 + */ +public class GradeMasterServlet extends HttpServlet { + + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + //String Action = request.getParameter("handle_id"); + //String checkOpt = request.getParameter("checkOption"); + + PayrollBean oPayrollBean = new PayrollBean(); + ArrayList alPayrollBean = new ArrayList(); + + try { + // BeanUtils.populate(oPayrollBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + System.out.println("Error occurred during processing."); + } + + if ("Create".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + //String grade = request.getParameter("grade" + i); + + if (grade != null) { + oPayrollBean = new PayrollBean(); + oPayrollBean.setGrade(grade); + // oPayrollBean.setStatus(request.getParameter("status" + i)); + // oPayrollBean.setGrade_id(request.getParameter("grade_id" + i)); + alPayrollBean.add(oPayrollBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alPayrollBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call payroll.grade_master_entry(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alPayrollBean.size(); j++) { + + oPayrollBean = alPayrollBean.get(j); + proc.setString(1, oPayrollBean.getGrade_id()); + proc.setString(2, oPayrollBean.getGrade()); + proc.setString(3, pacsId); + proc.setString(4, user); + proc.setString(5, Action); + proc.setString(6, oPayrollBean.getStatus()); + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + + proc.execute(); + // message = proc.getString(7); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Payroll/GradeMaster.jsp").forward(request, response); + + } else if ("Amend".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter2")); + + for (int i = 2; i <= counter; i++) { + try { + + // String grade = request.getParameter("grade" + i); + + if (grade != null) { + oPayrollBean = new PayrollBean(); + oPayrollBean.setGrade(grade); + // oPayrollBean.setStatus(request.getParameter("status" + i)); + // oPayrollBean.setGrade_id(request.getParameter("grade_id" + i)); + alPayrollBean.add(oPayrollBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alPayrollBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call payroll.grade_master_entry(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alPayrollBean.size(); j++) { + + oPayrollBean = alPayrollBean.get(j); + proc.setString(1, oPayrollBean.getGrade_id()); + proc.setString(2, oPayrollBean.getGrade()); + proc.setString(3, pacsId); + proc.setString(4, user); + proc.setString(5, Action); + proc.setString(6, oPayrollBean.getStatus()); + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + // message = proc.getString(7); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Payroll/GradeMaster.jsp").forward(request, response); + + } else if ("getDetails".equalsIgnoreCase(Action)) { + + ResultSet resultset = null; + Statement statement = null; + + Connection connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + try { + // resultset = statement.executeQuery("select id, grade, status from grade_master where pacs_id ='" +pacsId+ "' "); + + while (resultset.next()) { + + oPayrollBean = new PayrollBean(); + oPayrollBean.setGrade_id(resultset.getString("id")); + oPayrollBean.setGrade(resultset.getString("grade")); + oPayrollBean.setStatus(resultset.getString("status")); + + alPayrollBean.add(oPayrollBean); + request.setAttribute("displayFlag", "Y"); + } + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + statement.close(); + resultset.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + } + // oPayrollBean.setCheckOption(checkOpt); + request.setAttribute("checkOption", checkOpt); + request.setAttribute("oPayrollBean", oPayrollBean); + request.setAttribute("arrPayrollBean", alPayrollBean); + request.getRequestDispatcher("/Payroll/GradeMaster.jsp").forward(request, response); + } + } + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + } +} diff --git a/IPKS_Updated/src/src/java/Controller/HrmAdhocReportServlet.java b/IPKS_Updated/src/src/java/Controller/HrmAdhocReportServlet.java new file mode 100644 index 0000000..d3d0511 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/HrmAdhocReportServlet.java @@ -0,0 +1,338 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.adhocReportBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.OutputStream; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.Locale; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.commons.beanutils.BeanUtils; +import jxl.Workbook; +import jxl.*; +import jxl.write.*; + +/** + * + * @author Tcs Helpdesk10 + */ +public class HrmAdhocReportServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + + String handle_id = request.getParameter("handle_id"); + // String report_ID = request.getParameter("reportID"); + String jsp = request.getParameter("jspPage"); + Connection con = null; + Statement statement = null; + + adhocReportBean oadhocReportBean = new adhocReportBean(); + + if (handle_id.equalsIgnoreCase("Get Data")) { + + try { + con = DbHandler.getDBConnection(); + statement = con.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(HrmAdhocReportServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + + // ResultSet rs = statement.executeQuery("select REPORT_ID,REPORT_NAME,REPORT_QUERY,PARAMETER1,PARAMETER2,PARAMETER3,PARAMETER4,PARAMETER5,PARAMETER6,PARAMETER7,PARAMETER8,PARAMETER9,PARAMETER10 from pacs_adhoc_report where report_id= '" + report_ID + "' "); + + while (rs.next()) { + + oadhocReportBean.setReportID(rs.getString("REPORT_ID")); + oadhocReportBean.setReportName(rs.getString("REPORT_NAME")); + oadhocReportBean.setReportQuery(rs.getString("REPORT_QUERY")); + oadhocReportBean.setParameter1(rs.getString("PARAMETER1")); + oadhocReportBean.setParameter2(rs.getString("PARAMETER2")); + oadhocReportBean.setParameter3(rs.getString("PARAMETER3")); + oadhocReportBean.setParameter4(rs.getString("PARAMETER4")); + oadhocReportBean.setParameter5(rs.getString("PARAMETER5")); + oadhocReportBean.setParameter6(rs.getString("PARAMETER6")); + oadhocReportBean.setParameter7(rs.getString("PARAMETER7")); + oadhocReportBean.setParameter8(rs.getString("PARAMETER8")); + oadhocReportBean.setParameter9(rs.getString("PARAMETER9")); + oadhocReportBean.setParameter10(rs.getString("PARAMETER10")); + + } + + // statement.close(); + // con.close(); + + } catch (SQLException ex) { + // Logger.getLogger(HrmAdhocReportServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + + } finally { + try { + if(statement !=null) + statement.close(); + if (con != null) + con.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + request.setAttribute("oadhocReportBeanObj", oadhocReportBean); + + try{ + if(jsp.equalsIgnoreCase("depAdhocReport")){ + request.getRequestDispatcher("/Deposit/AdhocReport.jsp").forward(request, response); + } else + request.getRequestDispatcher("/AdhocReport.jsp").forward(request, response); + } + catch (Exception e) + { + request.getRequestDispatcher("/AdhocReport.jsp").forward(request, response); + } + } else if (handle_id.equalsIgnoreCase("Download Report")) { + + try { + // BeanUtils.populate(oadhocReportBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(HrmAdhocReportServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(HrmAdhocReportServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + response.setContentType("application/vnd.ms-excel"); + WorkbookSettings ws = new WorkbookSettings(); + ws.setLocale(new Locale("en", "EN")); + OutputStream out = response.getOutputStream(); + + String reportName = oadhocReportBean.getReportName(); + StringBuffer fileName = new StringBuffer("\\"); + fileName.append(reportName); + fileName.append(".xls"); + response.setHeader("Content-disposition", "attachment; filename=\"" + fileName.toString() + "\""); + + try { + WritableWorkbook workbook + = Workbook.createWorkbook(out, ws); + WritableSheet s = workbook.createSheet(reportName, 0); + downloadAdhocReport(oadhocReportBean, s); + workbook.write(); + workbook.close(); + out.flush(); + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error Occurred during processing."); + } + + } + + } + + public void downloadAdhocReport(adhocReportBean oadhocReportBean, WritableSheet s) { + + int count = 0; + ArrayList arylstOutArray; //Output + Connection con = null; + CallableStatement proc = null; + String query = null; + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call proc_ExecuteAdhocreport(?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(HrmAdhocReportServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + proc.setString(1, oadhocReportBean.getReportID()); + proc.setString(2, oadhocReportBean.getValue1()); + proc.setString(3, oadhocReportBean.getValue2()); + proc.setString(4, oadhocReportBean.getValue3()); + proc.setString(5, oadhocReportBean.getValue4()); + proc.setString(6, oadhocReportBean.getValue5()); + proc.setString(7, oadhocReportBean.getValue6()); + proc.setString(8, oadhocReportBean.getValue7()); + proc.setString(9, oadhocReportBean.getValue8()); + proc.setString(10, oadhocReportBean.getValue9()); + proc.setString(11, oadhocReportBean.getValue10()); + + proc.registerOutParameter(12, java.sql.Types.VARCHAR); + + proc.execute(); + + // query = proc.getString(12); + + } catch (SQLException ex) { + // Logger.getLogger(HrmAdhocReportServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error Occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(HrmAdhocReportServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + } + Statement stmt = null; + Connection conn = null; + ResultSet rs = null; + + try { + + conn = DbHandler.getDBConnection(); + stmt = conn.createStatement(); + + // This is for testing purpose to check the query + //System.out.println(query); + rs = stmt.executeQuery(query); + // Get result set meta data + ResultSetMetaData rsmd = rs.getMetaData(); + int numColumns = rsmd.getColumnCount(); + + int rowPos = 0; + int colPos; + WritableFont wf; + WritableCellFormat cf; + + // This is for Heading + wf = new WritableFont(WritableFont.ARIAL, 12, WritableFont.BOLD); + cf = new WritableCellFormat(wf); + cf.setWrap(false); + cf.setBackground(jxl.format.Colour.LIGHT_GREEN); + cf.setBorder(jxl.format.Border.ALL, jxl.format.BorderLineStyle.THIN); + CellView cv = new CellView(); + cv.setAutosize(true); + ArrayList heading = new ArrayList(numColumns); + + // Get the column names; column indices start from 1 + for (int i = 1; i < numColumns + 1; i++) { + String columnName = rsmd.getColumnName(i); + s.addCell(new Label(i - 1, rowPos, columnName, cf)); + heading.add(i - 1, columnName); + s.setColumnView(i, cv); + /* + // Get the name of the column's table name + String tableName = rsmd.getTableName(i); + */ + } + // This is for Results + //Reset Fonts for results section + wf = new WritableFont(WritableFont.ARIAL, 11, WritableFont.NO_BOLD); + + //Looping For results + while (rs.next()) { + rowPos++; + colPos = -1; + Iterator itrHeading = heading.iterator(); + while (colPos + 1 < heading.size()) { + colPos++; + String sHeading = heading.get(colPos).toString(); + cf = new WritableCellFormat(wf); + cf.setWrap(false); + cf.setBorder(jxl.format.Border.ALL, jxl.format.BorderLineStyle.THIN); + cv.setAutosize(true); + s.addCell(new Label(colPos, rowPos, rs.getString(sHeading), cf)); + s.setColumnView(colPos, cv); + } + } + } catch (Exception ex) { + // ex.printStackTrace(); + System.out.println("Error Occurred during processing."); + } finally { + try { + + if (stmt != null) { + stmt.close(); + } + if (rs != null) { + rs.close(); + } + if (conn != null) { + conn.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error Occurred during connection close."); + } + } + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/IdenticationEntryServet.java b/IPKS_Updated/src/src/java/Controller/IdenticationEntryServet.java new file mode 100644 index 0000000..4b86c76 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/IdenticationEntryServet.java @@ -0,0 +1,190 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import DataEntryBean.*; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.SQLException; +import java.util.Enumeration; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.apache.commons.beanutils.*; +import org.apache.commons.logging.*; +import org.apache.commons.collections.*; +import java.sql.*; +import LoginDb.DbHandler; + + +/** + * + * @author Administrator + */ +public class IdenticationEntryServet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet IdenticationEntryServet"); + out.println(""); + out.println(""); + out.println("

Servlet IdenticationEntryServet at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + //Taking the servlet name from JSP + String ServletName=request.getParameter("action"); + + CustomerIdentificationBean oCustomerIdentificationBean=new CustomerIdentificationBean(); + + if ("Search".equalsIgnoreCase(ServletName)) + + { + + try { + // BeanUtils.populate(oCustomerIdentificationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(IdenticationEntryServet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(IdenticationEntryServet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection =DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(IdenticationEntryServet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + //look at " for table name + // ResultSet rs = statement.executeQuery("select CIF,FIRST_ID_TYPE,ID_ISSUED_AT,REMARK,FIRST_ID_NO,to_char(FIRST_ID_ISSUE_DATE,'DD-MON-YYYY') as FIRST_ID_ISSUE_DATE,SECOND_ID_TYPE,SECOND_ID_NO,RELATIONSHIP_MANAGER,HOME_BRANCH,CUST_EVALUATION_RATE,INTRODUCER,INB_REQUEST,EMAIL_ID,EMAIL_ADDRESS,INB_REF,VISA_DTLS,VISA_ISSUED_BY,to_char(VISA_ISSUE_DATE,'DD-MON-YYYY') as VISA_ISSUE_DATE,to_char(VISA_EXPIRY_DATE,'DD-MON-YYYY') as VISA_EXPIRY_DATE,DOMESTIC_RISK,COUNTRY_RISK,CROSS_BORDER_RISK,SEGMENT_CODE,LOCKER_CODE,CIS_CODE,TFN_INDICATOR from CUSTOMER_IDENTITY_DTLS where cif= '" + oCustomerIdentificationBean.getCif() + "'"); + while (rs.next()) + { + + oCustomerIdentificationBean.setBankref(rs.getString("INB_REF")); + oCustomerIdentificationBean.setBorderrisk(rs.getString("CROSS_BORDER_RISK")); + oCustomerIdentificationBean.setCif(rs.getString("CIF")); + oCustomerIdentificationBean.setCis(rs.getString("CIS_CODE")); + oCustomerIdentificationBean.setCountryrisk(rs.getString("COUNTRY_RISK")); + oCustomerIdentificationBean.setCusevltn(rs.getString("CUST_EVALUATION_RATE")); + oCustomerIdentificationBean.setDomrisk(rs.getString("DOMESTIC_RISK")); + oCustomerIdentificationBean.setEmailadd(rs.getString("EMAIL_ADDRESS")); + oCustomerIdentificationBean.setEmailid(rs.getString("EMAIL_ID")); + oCustomerIdentificationBean.setFidno(rs.getString("FIRST_ID_NO")); + oCustomerIdentificationBean.setHomebr(rs.getString("HOME_BRANCH")); + oCustomerIdentificationBean.setIdissuedate(rs.getString("FIRST_ID_ISSUE_DATE")); + oCustomerIdentificationBean.setIdype(rs.getString("FIRST_ID_TYPE")); + oCustomerIdentificationBean.setInb(rs.getString("INB_REQUEST")); + oCustomerIdentificationBean.setIntro(rs.getString("INTRODUCER")); + oCustomerIdentificationBean.setIssueat(rs.getString("ID_ISSUED_AT")); + oCustomerIdentificationBean.setLocker(rs.getString("LOCKER_CODE")); + oCustomerIdentificationBean.setRemark(rs.getString("REMARK")); + oCustomerIdentificationBean.setRmanager(rs.getString("RELATIONSHIP_MANAGER")); + oCustomerIdentificationBean.setSecondid(rs.getString("SECOND_ID_TYPE")); + oCustomerIdentificationBean.setSecondidno(rs.getString("SECOND_ID_NO")); + oCustomerIdentificationBean.setSegment(rs.getString("SEGMENT_CODE")); + oCustomerIdentificationBean.setTfn(rs.getString("TFN_INDICATOR")); + oCustomerIdentificationBean.setVisadet(rs.getString("VISA_DTLS")); + oCustomerIdentificationBean.setVisaexpr(rs.getString("VISA_EXPIRY_DATE")); + oCustomerIdentificationBean.setVisaissueby(rs.getString("state_code")); + oCustomerIdentificationBean.setVisaissuedate(rs.getString("VISA_ISSUED_BY")); + + + } + statement.close(); + connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(CifEntryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + + + } + request.setAttribute("oCustomerIdentificationBeanObj", oCustomerIdentificationBean); + (request.getRequestDispatcher("/ShowIdentificationDetails.jsp")).forward(request, response); + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/InsuranceAdditionServlet.java b/IPKS_Updated/src/src/java/Controller/InsuranceAdditionServlet.java new file mode 100644 index 0000000..c4c3089 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/InsuranceAdditionServlet.java @@ -0,0 +1,76 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import java.io.IOException; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import Dao.InsuranceAdditionDao; + +/** + * + * @author 1004242 + */ +public class InsuranceAdditionServlet extends HttpServlet { + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = (String) session.getAttribute("user"); + // String cif = request.getParameter("custId"); + // String insNo = request.getParameter("insNo"); + // String insDate = request.getParameter("expDate"); + // String insCom = request.getParameter("com"); + // String tranType = request.getParameter("tranType"); + String result = null; + InsuranceAdditionDao inDao = new InsuranceAdditionDao(); + try { + + result = inDao.createOrUpdateInsurance(tellerId, pacsId, cif ,insNo, insDate,insCom, tranType); + + // request.setAttribute("message", result); + // request.getRequestDispatcher("/InsuranceAddition.jsp").forward(request, response); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error Occurred during processing."); + request.setAttribute("message", "Request can not be processed."); + request.getRequestDispatcher("/InsuranceAddition.jsp").forward(request, response); + } + + request.setAttribute("message", result); + request.getRequestDispatcher("/InsuranceAddition.jsp").forward(request, response); + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/InvestmentCreationServlet.java b/IPKS_Updated/src/src/java/Controller/InvestmentCreationServlet.java new file mode 100644 index 0000000..a11250c --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/InvestmentCreationServlet.java @@ -0,0 +1,841 @@ + + +/** + * + * @author 981898 + */ +package Controller; + +import DataEntryBean.InvestmentCreationBean; +//import DataEntryBean.InvestmentCreationDetailBean; +import LoginDb.DbHandler; +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.BatchUpdateException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import java.sql.Statement; +import java.util.StringTokenizer; +import javax.servlet.ServletContext; + +/** + * + * @author TCS + */ +public class InvestmentCreationServlet extends HttpServlet { + + + /** + * stmtesses requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void stmtessRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + stmtessRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection con = null; + Connection con1 = null; + CallableStatement stmt = null; + Statement proc = null; + ResultSet rs = null; + int SeachFound = 0; + String message = ""; + String hdrId = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + String handle_id = request.getParameter("handle_id"); + // String gl_ac = request.getParameter("glName"); + String message2 = ""; + + InvestmentCreationBean oInvestmentCreationBean = new InvestmentCreationBean(); + //InvestmentCreationDetailBean oInvestmentCreationDetailBean = new InvestmentCreationDetailBean(); + ArrayList alInvestmentCreationDetailBean = new ArrayList(); + + //For Update + + //ArrayList alDepositKYCCreationDetailBeanNew = new ArrayList(); + // ArrayList alDepositKYCCreationDetailBeanUpdated = new ArrayList(); + // ArrayList alDepositKYCCreationDetailBeanDeleted = new ArrayList(); + + + BatchExecutionFailedOperation BatchExecutionFailedOperationObject = new BatchExecutionFailedOperation(); + boolean SuccessFlag; + + + try { + // BeanUtils.populate(oInvestmentCreationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(InvestmentCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(InvestmentCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + try { + // BeanUtils.populate(oInvestmentCreationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(InvestmentCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(InvestmentCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + + + + if ("Create".equalsIgnoreCase(handle_id)) { + + + ServletContext servletContext = getServletContext(); + + //File oldfile = new File(uploadPath + File.separator + oDepositKYCCreationBean.getFile() + ".jpg"); + + //oldPhotoName = oDepositKYCCreationBean.getFile(); + //System.out.println(oldPhotoName); + //START HEADER PART + try { + + // con = DbHandler.getDBConnection(); + + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + String ckbox=request.getParameter("chckbox" + i); + //if() + //String document_mst_id = request.getParameter("document_mst_id" + i); + //String bank_name = request.getParameter("bankName" + i); + //String branch_name = request.getParameter("branchName" + i); + //String ac_no = request.getParameter("accountNo" + i); + //String amount= request.getParameter("amount" + i); + //String mat_amt= request.getParameter("maturityAmount" + i); + // String int_rate= request.getParameter("interestRate" + i); + //String ac_opn_dt= request.getParameter("acOpenDate" + i); + //String ac_mat_dt= request.getParameter("acMatDate" + i); + //String act_flag= request.getParameter("active" + i); + + if (ckbox.equalsIgnoreCase("on")) { + oInvestmentCreationBean = new InvestmentCreationBean(); + oInvestmentCreationBean.setAcno(ac_no); + oInvestmentCreationBean.setAc_opn_dt(ac_opn_dt); + oInvestmentCreationBean.setActive_flag(act_flag); + oInvestmentCreationBean.setAmt(amount); + oInvestmentCreationBean.setBank_name(bank_name); + oInvestmentCreationBean.setBranch_name(branch_name); + oInvestmentCreationBean.setInt_rate(int_rate); + oInvestmentCreationBean.setMat_amt(mat_amt); + oInvestmentCreationBean.setMat_dt(ac_mat_dt); + + + alInvestmentCreationDetailBean.add(oInvestmentCreationBean); + } + } catch (Exception e) { + System.out.println("Error Occurred during processing."); + } + } + + if (alInvestmentCreationDetailBean.size() > 0) { + try { + con = DbHandler.getDBConnection(); + stmt = con.prepareCall("{ call investment_create(?,?,?,?,?,?,?,?,?,?,?) }"); + for (int j = 0; j < alInvestmentCreationDetailBean.size(); j++) { + oInvestmentCreationBean = alInvestmentCreationDetailBean.get(j); + stmt.setString(1,gl_ac); + stmt.setString(2, oInvestmentCreationBean.getAcno()); + stmt.setString(3, oInvestmentCreationBean.getBank_name()); + stmt.setString(4, oInvestmentCreationBean.getBranch_name()); + stmt.setString(5, oInvestmentCreationBean.getInt_rate()); + stmt.setString(6, oInvestmentCreationBean.getMat_amt()); + stmt.setString(7, oInvestmentCreationBean.getAc_opn_dt()); + stmt.setString(8, oInvestmentCreationBean.getMat_dt()); + stmt.setString(9, oInvestmentCreationBean.getActive_flag()); + stmt.setString(10, oInvestmentCreationBean.getAmt()); + stmt.setString(11, pacsId); + stmt.addBatch(); + + } + + stmt.executeBatch(); + message="Details have been successfully inserted"; + + + + //hdrId = (message.split("#")[1]).trim(); + + //For Signature + + + //File newfile = new File(uploadPath + File.separator + hdrId + ".jpg"); + //oldfile.renameTo(newfile); + //new File(uploadPath + File.separator + oDepositKYCCreationBean.getFile() + ".jpg").renameTo(new File(uploadPath + File.separator + hdrId + ".jpg")); + + } catch (BatchUpdateException ex) { + try { + // con.rollback(); + message="Details insertion has failed"; + } catch (Exception ex1) { + // Logger.getLogger(InvestmentCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error Occurred during processing."); + } + // Logger.getLogger(InvestmentCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during processing."); + } finally { + try { + stmt.close(); + } catch (SQLException e) { + System.out.println("Error Occurred during stmt close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(InvestmentCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + + } + + //END HEADER PART + //START DETAIL PART + + + } else + message="No details saved for the selected GL account"; + + }catch (SQLException e) { + message="Details insertion has failed"; + } + } + + + + else if (("Search").equalsIgnoreCase(handle_id)) { + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + //String gl_no=request.getParameter("glNameAmend"); + //String balance=request.getParameter("glBalAmend"); + ArrayList alInvestmentCreationDetailBean2 = new ArrayList(); + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(InvestmentCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + // resultset = statement.executeQuery("select i.ac_no,i.bank_name,i.branch_name,i.amt,i.maturity_amt,i.int_rate,to_char(i.ac_opn_dt,'DD/MM/RRRR') as ac_opn_dt,to_char(i.maturity_date,'DD/MM/RRRR') as maturity_date,i.active_flag from investment_dtl i where i.gl_id='" + gl_no + "'"); + + while (resultset.next()) { + oInvestmentCreationBean = new InvestmentCreationBean(); + oInvestmentCreationBean.setAcno(resultset.getString("ac_no")); + oInvestmentCreationBean.setAc_opn_dt(resultset.getString("ac_opn_dt")); + oInvestmentCreationBean.setActive_flag(resultset.getString("active_flag")); + oInvestmentCreationBean.setAmt(resultset.getString("amt")); + oInvestmentCreationBean.setBank_name(resultset.getString("bank_name")); + oInvestmentCreationBean.setBranch_name(resultset.getString("branch_name")); + oInvestmentCreationBean.setInt_rate(resultset.getString("int_rate")); + oInvestmentCreationBean.setMat_amt(resultset.getString("maturity_amt")); + oInvestmentCreationBean.setMat_dt(resultset.getString("maturity_date")); + + + alInvestmentCreationDetailBean2.add(oInvestmentCreationBean); + + + SeachFound = 1; + + + } + request.setAttribute("displayFlag", "Y"); + // statement.close(); + // resultset.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if(resultset !=null) + resultset.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + + //Detail Part Populate + + + request.setAttribute("GL_Account", gl_no); + request.setAttribute("balance", balance); + request.setAttribute("Option", "Amend"); + request.setAttribute("oInvestmentCreationBeanObj", oInvestmentCreationBean); + request.setAttribute("alInvestmentCreationDetailBean2", alInvestmentCreationDetailBean2); + + + } + + + + else if ("Update".equalsIgnoreCase(handle_id)) { + + + ServletContext servletContext = getServletContext(); + int counter = Integer.parseInt(request.getParameter("rowCounterAmend")); + + //File oldfile = new File(uploadPath + File.separator + oDepositKYCCreationBean.getFile() + ".jpg"); + + //oldPhotoName = oDepositKYCCreationBean.getFile(); + //System.out.println(oldPhotoName); + //START HEADER PART + try { + // gl_ac=request.getParameter("hidden_gl_no"); + con = DbHandler.getDBConnection(); + proc = con.createStatement(); + rs = proc.executeQuery("delete from investment_dtl where gl_id = '" + gl_ac + "'"); + proc.close(); + } catch (Exception e) { + // Logger.getLogger(InvestmentCreationServlet.class.getName()).log(Level.SEVERE, null, e); + // System.out.println(e.toString()); + System.out.println("Error Occurred during processing."); + } + + try { + for (int i = 1; i <= counter; i++) { + try { + + String ckbox=request.getParameter("chckboxAmend"+i); + //if() + //String document_mst_id = request.getParameter("document_mst_id" + i); + // String bank_name = request.getParameter("bankNameAmend" + i); + // String branch_name = request.getParameter("branchNameAmend" + i); + // String ac_no = request.getParameter("accountNoAmend" + i); + // String amount= request.getParameter("amountAmend" + i); + // String mat_amt= request.getParameter("maturityAmountAmend" + i); + // String int_rate= request.getParameter("interestRateAmend" + i); + // String ac_opn_dt= request.getParameter("acOpenDateAmend" + i); + // String ac_mat_dt= request.getParameter("acMatDateAmend" + i); + // String act_flag= request.getParameter("activeAmend" + i); + + if (ckbox.equalsIgnoreCase("on")) { + oInvestmentCreationBean = new InvestmentCreationBean(); + oInvestmentCreationBean.setAcno(ac_no); + oInvestmentCreationBean.setAc_opn_dt(ac_opn_dt); + oInvestmentCreationBean.setActive_flag(act_flag); + oInvestmentCreationBean.setAmt(amount); + oInvestmentCreationBean.setBank_name(bank_name); + oInvestmentCreationBean.setBranch_name(branch_name); + oInvestmentCreationBean.setInt_rate(int_rate); + oInvestmentCreationBean.setMat_amt(mat_amt); + oInvestmentCreationBean.setMat_dt(ac_mat_dt); + + + alInvestmentCreationDetailBean.add(oInvestmentCreationBean); + } + + // con.close(); + } catch (Exception e) { + // Logger.getLogger(InvestmentCreationServlet.class.getName()).log(Level.SEVERE, null, e); + // System.out.println(e.toString()); + System.out.println("Error Occurred during processing."); + } finally { + try { + if (con !=null) { + con.close(); + } + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + } + + if (alInvestmentCreationDetailBean.size() > 0) { + try { + con = DbHandler.getDBConnection(); + stmt = con.prepareCall("{ call investment_update(?,?,?,?,?,?,?,?,?,?,?) }"); + for (int j = 0; j < alInvestmentCreationDetailBean.size(); j++) { + oInvestmentCreationBean = alInvestmentCreationDetailBean.get(j); + stmt.setString(1,gl_ac); + stmt.setString(2, oInvestmentCreationBean.getAcno()); + stmt.setString(3, oInvestmentCreationBean.getBank_name()); + stmt.setString(4, oInvestmentCreationBean.getBranch_name()); + stmt.setString(5, oInvestmentCreationBean.getInt_rate()); + stmt.setString(6, oInvestmentCreationBean.getMat_amt()); + stmt.setString(7, oInvestmentCreationBean.getAc_opn_dt()); + stmt.setString(8, oInvestmentCreationBean.getMat_dt()); + stmt.setString(9, oInvestmentCreationBean.getActive_flag()); + stmt.setString(10, oInvestmentCreationBean.getAmt()); + stmt.setString(11, pacsId); + stmt.addBatch(); + + } + + stmt.executeBatch(); + + message="Changes have been successfully updated"; + + + //hdrId = (message.split("#")[1]).trim(); + + //For Signature + + + //File newfile = new File(uploadPath + File.separator + hdrId + ".jpg"); + //oldfile.renameTo(newfile); + //new File(uploadPath + File.separator + oDepositKYCCreationBean.getFile() + ".jpg").renameTo(new File(uploadPath + File.separator + hdrId + ".jpg")); + + } catch (BatchUpdateException ex) { + try { + // con.rollback(); + message="Updation failed"; + } catch (Exception ex1) { + // Logger.getLogger(InvestmentCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error Occurred during processing."); + } + // Logger.getLogger(InvestmentCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error Occurred during processing."); + } finally { + try { + stmt.close(); + } catch (SQLException e) { + System.out.println("Error Occurred during stmt close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(InvestmentCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + + } + + //END HEADER PART + //START DETAIL PART + + + } + + }catch (SQLException e) { + System.out.println("Error occurred during processing."); + } + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/investment_creation.jsp").forward(request, response); + } + + /* else if (handle_id.equalsIgnoreCase("Update")) { + + try { + BeanUtils.populate(oDepositKYCCreationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + } catch (InvocationTargetException ex) { + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + } + + try { + BeanUtils.populate(oDepositKYCCreationDetailBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + } catch (InvocationTargetException ex) { + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + } + + ServletContext servletContext = getServletContext(); + uploadPathMain = servletContext.getRealPath(File.separator); + uploadPath = uploadPathMain + "/" + "UploadedFiles"; + File destinationDir = new File(uploadPath); + + try { + con = DbHandler.getDBConnection(); + try { + stmt = con.prepareCall("{ call Operations.kyc_Deposit_hdr(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + + } catch (SQLException ex) { + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + } + + stmt.setString(1, oDepositKYCCreationBean.getcTypeAmend()); + stmt.setString(2, oDepositKYCCreationBean.getTittleAmend()); + stmt.setString(3, oDepositKYCCreationBean.getfNameAmend()); + stmt.setString(4, oDepositKYCCreationBean.getmNameAmend()); + stmt.setString(5, oDepositKYCCreationBean.getlNameAmend()); + stmt.setString(6, oDepositKYCCreationBean.getgNameAmend()); + stmt.setString(7, oDepositKYCCreationBean.getAdd1Amend()); + stmt.setString(8, oDepositKYCCreationBean.getAdd2Amend()); + stmt.setString(9, oDepositKYCCreationBean.getAdd3Amend()); + stmt.setString(10, oDepositKYCCreationBean.getDistnameAmend()); + stmt.setString(11, oDepositKYCCreationBean.getCitynameAmend()); + stmt.setString(12, oDepositKYCCreationBean.getStatenameAmend()); + stmt.setString(13, oDepositKYCCreationBean.getDobAmend()); + stmt.setString(14, oDepositKYCCreationBean.getGenderAmend()); + stmt.setString(15, oDepositKYCCreationBean.getmNumberAmend()); + stmt.setString(16, oDepositKYCCreationBean.getBlockAmend()); + stmt.setString(17, oDepositKYCCreationBean.getCifNoAmend()); + stmt.setString(18, handle_id); + stmt.setString(19, pacsId); + stmt.setString(20, oDepositKYCCreationBean.getFile()); + stmt.registerOutParameter(21, java.sql.Types.VARCHAR); + stmt.setString(22, oDepositKYCCreationBean.getSigUpld()); + stmt.execute(); + message = stmt.getString(21); + hdrId = (message.split("#")[1]).trim(); + + if (!lastPhotoName.isEmpty()) { + File f = null; + File f1 = null; + try { + // create new File objects + f = new File(uploadPath + File.separator + lastPhotoName); + f1 = new File(uploadPath + File.separator + hdrId + ".jpg"); + + if(f1.exists()){ + f1.delete(); + } + // rename file + t = f.renameTo(f1); + } catch (Exception e) { + // if any error occurs + e.printStackTrace(); + } + } + + //For Signature + if (!sigPhotoName.isEmpty()) { + File f = null; + File f1 = null; + try { + // create new File objects + f = new File(uploadPath + File.separator + sigPhotoName); + f1 = new File(uploadPath + File.separator + "sig-" + hdrId + ".jpg"); + + if(f1.exists()){ + f1.delete(); + } + // rename file + t = f.renameTo(f1); + } catch (Exception e) { + // if any error occurs + e.printStackTrace(); + } + } + + session.setAttribute("lastPhotoName", ""); + session.setAttribute("sigPhotoName", ""); + + } catch (SQLException ex) { + try { + con.rollback(); + } catch (SQLException ex1) { + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + } + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println(ex.toString()); + } + + //Detail Part Starts here + int counterfor_Detail = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counterfor_Detail; i++) { + try { + String idTypeAmend = request.getParameter("idTypeAmend" + i); + String ScoreAmend = request.getParameter("ScoreAmend" + i); + String idNumberAmend = request.getParameter("idNumberAmend" + i); + String idIssueAtAmend = request.getParameter("idIssueAtAmend" + i); + String idIssueDateAmend = request.getParameter("idIssueDateAmend" + i); + String document_mst_idAmend = request.getParameter("document_mst_idAmend" + i); + String rowStatus = request.getParameter("rowStatus" + i); + String KYCCreation_dtl_id = request.getParameter("KYCCreation_dtl_id" + i); + + if (document_mst_idAmend != null && rowStatus != null) { + oDepositKYCCreationDetailBean = new DepositKYCCreationDetailBean(); + oDepositKYCCreationDetailBean.setIdTypeAmend(idTypeAmend); + oDepositKYCCreationDetailBean.setIDScoreAmend(ScoreAmend); + oDepositKYCCreationDetailBean.setIdNumberAmend(idNumberAmend); + oDepositKYCCreationDetailBean.setIdIssueAtAmend(idIssueAtAmend); + oDepositKYCCreationDetailBean.setIdIssueDateAmend(idIssueDateAmend); + oDepositKYCCreationDetailBean.setDocument_mst_idAmend(document_mst_idAmend); + oDepositKYCCreationDetailBean.setKYCCreation_dtl_id(KYCCreation_dtl_id); + + if (rowStatus.equals("N")) { + alDepositKYCCreationDetailBeanNew.add(oDepositKYCCreationDetailBean); + } else { + alDepositKYCCreationDetailBeanUpdated.add(oDepositKYCCreationDetailBean); + } + } + } catch (Exception e) { + } + } + + //For Deletion in Detail Part + String deletedRows = request.getParameter("deletedRows"); + + if ((!deletedRows.equalsIgnoreCase(null)) || (!deletedRows.equalsIgnoreCase(""))) { + StringTokenizer tokenizer = new StringTokenizer(deletedRows, ","); + + while (tokenizer.hasMoreTokens()) { + oDepositKYCCreationDetailBean = new DepositKYCCreationDetailBean(); + oDepositKYCCreationDetailBean.setKYCCreation_dtl_id(tokenizer.nextToken()); + + alDepositKYCCreationDetailBeanDeleted.add(oDepositKYCCreationDetailBean); + } + } + + if ((alDepositKYCCreationDetailBeanUpdated.size() > 0) && (!hdrId.equalsIgnoreCase(""))) { + try { + con = DbHandler.getDBConnection(); + try { + stmt = con.prepareCall("{ call Operations.deposit_kyc_dtl(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + } + + + for (int j = 0; j < alDepositKYCCreationDetailBeanUpdated.size(); j++) { + oDepositKYCCreationDetailBean = alDepositKYCCreationDetailBeanUpdated.get(j); + + stmt.setString(1, oDepositKYCCreationBean.getCifNoAmend()); + stmt.setString(2, oDepositKYCCreationDetailBean.getKYCCreation_dtl_id()); + stmt.setString(3, oDepositKYCCreationDetailBean.getDocument_mst_idAmend()); + stmt.setString(4, oDepositKYCCreationDetailBean.getIdNumberAmend()); + stmt.setString(5, oDepositKYCCreationDetailBean.getIdIssueAtAmend()); + stmt.setString(6, oDepositKYCCreationDetailBean.getIdIssueDateAmend()); + stmt.setString(7, handle_id); + stmt.addBatch(); + } + + stmt.executeBatch(); + + } catch (BatchUpdateException ex) { + + try { + con.rollback(); + + //SuccessFlag = BatchExecutionFailedOperationObject.BatchExecutionFailedOperation("DepositKYCCreation.jsp", hdrId); + + message = "Atleast one entered ID Number already tagged to anothe CIF!"; + // message = ex.toString(); + + + } catch (SQLException ex1) { + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + } + + + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println(ex.toString()); + } catch (SQLException ex) { + try { + con.rollback(); + } catch (SQLException ex1) { + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + } + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println(ex.toString()); + } finally { + try { + stmt.close(); + } catch (SQLException e) { + System.out.println(e.toString()); + } + try { + con.close(); + } catch (SQLException ex) { + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println(ex.toString()); + } + } + } + + if ((alDepositKYCCreationDetailBeanDeleted.size() > 0) && (!hdrId.equalsIgnoreCase(""))) { + try { + con = DbHandler.getDBConnection(); + try { + stmt = con.prepareCall("{ call Operations.deposit_kyc_dtl(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + } + + for (int j = 0; j < alDepositKYCCreationDetailBeanDeleted.size(); j++) { + + oDepositKYCCreationDetailBean = new DepositKYCCreationDetailBean(); + oDepositKYCCreationDetailBean = alDepositKYCCreationDetailBeanDeleted.get(j); + + stmt.setString(1, oDepositKYCCreationBean.getCifNoAmend()); + stmt.setString(2, oDepositKYCCreationDetailBean.getKYCCreation_dtl_id()); + stmt.setString(3, oDepositKYCCreationDetailBean.getDocument_mst_idAmend()); + stmt.setString(4, oDepositKYCCreationDetailBean.getIdNumberAmend()); + stmt.setString(5, oDepositKYCCreationDetailBean.getIdIssueAtAmend()); + stmt.setString(6, oDepositKYCCreationDetailBean.getIdIssueDateAmend()); + stmt.setString(7, "Delete"); + stmt.addBatch(); + } + stmt.executeBatch(); + } catch (SQLException ex) { + try { + con.rollback(); + } catch (SQLException ex1) { + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + } + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println(ex.toString()); + } finally { + try { + stmt.close(); + } catch (SQLException e) { + System.out.println(e.toString()); + } + try { + con.close(); + } catch (SQLException ex) { + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println(ex.toString()); + } + } + } + + if ((alDepositKYCCreationDetailBeanNew.size() > 0) && (!hdrId.equalsIgnoreCase(""))) { + try { + con = DbHandler.getDBConnection(); + try { + stmt = con.prepareCall("{call Operations.deposit_kyc_dtl(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + } + + + for (int j = 0; j < alDepositKYCCreationDetailBeanNew.size(); j++) { + oDepositKYCCreationDetailBean = new DepositKYCCreationDetailBean(); + oDepositKYCCreationDetailBean = alDepositKYCCreationDetailBeanNew.get(j); + + stmt.setString(1, oDepositKYCCreationBean.getCifNoAmend()); + stmt.setString(2, oDepositKYCCreationDetailBean.getKYCCreation_dtl_id()); + stmt.setString(3, oDepositKYCCreationDetailBean.getDocument_mst_idAmend()); + stmt.setString(4, oDepositKYCCreationDetailBean.getIdNumberAmend()); + stmt.setString(5, oDepositKYCCreationDetailBean.getIdIssueAtAmend()); + stmt.setString(6, oDepositKYCCreationDetailBean.getIdIssueDateAmend()); + stmt.setString(7, "Create"); + stmt.addBatch(); + } + stmt.executeBatch(); + message = message2; + } catch (BatchUpdateException ex) { + + try { + con.rollback(); + + //SuccessFlag = BatchExecutionFailedOperationObject.BatchExecutionFailedOperation("DepositKYCCreation.jsp", hdrId); + + message = "Atleast one entered ID Number already tagged to anothe CIF!"; + // message = ex.toString(); + + + } catch (SQLException ex1) { + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + } + + + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println(ex.toString()); + } catch (SQLException ex) { + try { + con.rollback(); + } catch (SQLException ex1) { + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + } + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println(ex.toString()); + } finally { + try { + stmt.close(); + } catch (SQLException e) { + System.out.println(e.toString()); + } + try { + con.close(); + } catch (SQLException ex) { + Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println(ex.toString()); + } + } + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/DepositKYCInquiry.jsp").forward(request, response); + + } + }*/ + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/InwardCsvServlet.java b/IPKS_Updated/src/src/java/Controller/InwardCsvServlet.java new file mode 100644 index 0000000..4bb1e4d --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/InwardCsvServlet.java @@ -0,0 +1,161 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; +import javax.servlet.ServletOutputStream; + +/** + * + * @author 1004242 + */ +public class InwardCsvServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet InwardCsvServlet"); + out.println(""); + out.println(""); + out.println("

Servlet InwardCsvServlet at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + String handle_id = request.getParameter("handle_id"); + String userRole = (String) session.getAttribute("userRole"); + Connection con = null; + Statement proc = null; + CallableStatement stmt = null; + // String from_date = request.getParameter("from_date"); + // String to_date = request.getParameter("to_date"); + String result = ""; + String qry=""; + System.out.println("Inside InwardCsvServlet"); + response.setContentType("application/octet-stream"); + response.setHeader("Content-Disposition","attachment;filename=inward_report.csv"); + + try { + + System.out.println("Inside try block"); + con = DbHandler.getDBConnection(); + proc = con.createStatement(); + qry="select i.txn_date||','||i.ref_no||','||i.key_1||','||i.ipks_acc_no||','||'NEFT'||','||txn_amt||','||i.remitter_details from inward_neft_new_bkp i where i.proc_flag = 'Y' and i.status = 'POSTED' and i.pacs_id = " + pacsId + " and to_date(i.txn_date, 'dd-mon-yyyy') between to_date('" + from_date + "', 'dd/mm/yyyy') and to_date('" + to_date + "', 'dd/mm/yyyy') order by i.txn_date"; + System.out.println(qry); + //ResultSet rs = proc.executeQuery(qry); + + System.out.println("Query executed"); + result = "SL NO,DATE,REFERENCE NO,IPKS A/C NO,LINK A/C NO,TRANSACTIO,AMOUNT,REMITTER DETAILS"+"\r\n"; + int counter =1; + while (rs.next()) { + String str = rs.getString(1); + if(str ==null) + break; + else + result = result + counter+","+str + "\r\n"; + counter++; + } + + if(result!=null){ + result=result.substring(0,result.length()-2); + } + + System.out.println(result); + InputStream in = new ByteArrayInputStream(result.getBytes("UTF-8")); + ServletOutputStream out = response.getOutputStream(); + + byte[] outputByte = new byte[1024]; + //copy binary contect to output stream + int n =0; + // while ((n=in.read(outputByte, 0, 1024)) != -1) { + out.write(outputByte, 0, n); + } + in.close(); + out.flush(); + out.close(); + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error Occurred during processing."); + } finally { + try { + con.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error Occurred during connection close."); + } + } + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/ItemProcurementServlet.java b/IPKS_Updated/src/src/java/Controller/ItemProcurementServlet.java new file mode 100644 index 0000000..03ecbf0 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/ItemProcurementServlet.java @@ -0,0 +1,182 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import java.io.IOException; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import DataEntryBean.ItemProcurementBean; +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.http.HttpSession; + +/** + * + * @author 590685 + */ +/** + * + * @author Tcs Helpdesk10 + */ +public class ItemProcurementServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + ItemProcurementBean oItemProcurementBean = null; + long num = (long)Math.floor(Math.random()*900000000000L)+ 100000000000L; + String procurementId = String.valueOf(num); + // String musterRollId = request.getParameter("musterRollId"); + // String orderId = request.getParameter("govtOrderId"); + + + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + ArrayList alItemProcurementBean = new ArrayList(); + for (int i = 1; i <= counter; i++) { + try { + + String item_type = request.getParameter("item_type" + i); + String item_subtype = request.getParameter("item_subtype" + i); + String rate_per_unit = request.getParameter("rate_per_unit" + i); + String qty_unit = request.getParameter("qty_unit" + i); + // String qty = request.getParameter("qty" + i); + // String total = request.getParameter("total" + i); + // String commodityId = request.getParameter("commodityId" + i); + + if (commodityId != null) { + oItemProcurementBean = new ItemProcurementBean(); + oItemProcurementBean.setCommodityId(commodityId); + oItemProcurementBean.setItemType(item_type); + oItemProcurementBean.setItemSubType(item_subtype); + oItemProcurementBean.setRatePerUnit(rate_per_unit); + oItemProcurementBean.setQtyunit(qty_unit); + oItemProcurementBean.setQty(qty); + oItemProcurementBean.setTotal(total); + + alItemProcurementBean.add(oItemProcurementBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if (alItemProcurementBean.size() > 0) { + try { + con = DbHandler.getDBConnection(); + + for (int j = 0; j < alItemProcurementBean.size(); j++) { + + oItemProcurementBean = alItemProcurementBean.get(j); + + try { + proc = con.prepareCall("{ call GPS_OPERATION.item_procurement_entry(?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + proc.setString(1, musterRollId); + proc.setString(2, orderId); + proc.setString(3, oItemProcurementBean.getQty()); + proc.setString(4, oItemProcurementBean.getTotal()); + proc.setString(5, pacsId); + proc.setString(6, oItemProcurementBean.getCommodityId()); + proc.setString(7, procurementId); + proc.registerOutParameter(8, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(8); + + } + } catch (SQLException ex) { + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error Occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error Occurred during connection close."); + } + } + } + + request.setAttribute("govtProcId", (message.split("#")[1]).trim()); + request.setAttribute("message", message); + +if(message==null) + request.getRequestDispatcher("/GPS_JSP/ItemProcurement.jsp").forward(request, response); +else + request.getRequestDispatcher("/GPS_JSP/ItemProcureChallan.jsp").forward(request, response); + + + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short nameription of the servlet. + * + * @return a String containing servlet nameription + */ + @Override + public String getServletInfo() { + return "Short nameription"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/KCCForceCapitalisationServlet.java b/IPKS_Updated/src/src/java/Controller/KCCForceCapitalisationServlet.java new file mode 100644 index 0000000..35be98a --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/KCCForceCapitalisationServlet.java @@ -0,0 +1,79 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import Dao.KCCForceCapitalisationDao; +import DataEntryBean.ChequeDetailsBean; +import java.io.IOException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +public class KCCForceCapitalisationServlet extends HttpServlet{ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = (String)session.getAttribute("user"); + KCCForceCapitalisationDao aiDao = new KCCForceCapitalisationDao(); + String result = null; + + + try{ + + //String accNo = request.getParameter("accNo"); + //String newforcedCap = request.getParameter("forcedCap"); + result = aiDao.KCCForceCapitalisationProc(accNo, pacsId, newforcedCap, tellerId); + + request.setAttribute("message1", result); + request.getRequestDispatcher("/KCCForceCapitalisation.jsp").forward(request, response); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + request.setAttribute("message1", "Error occured. Please try again"); + request.getRequestDispatcher("/KCCForceCapitalisation.jsp").forward(request, response); + + } finally { + System.out.println("Processing done."); + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/KCCSevlet.java b/IPKS_Updated/src/src/java/Controller/KCCSevlet.java new file mode 100644 index 0000000..d0ada29 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/KCCSevlet.java @@ -0,0 +1,79 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 986137 + */ +public class KCCSevlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + + if( String.valueOf(session.getAttribute("moduleName")).equalsIgnoreCase("SpecialBothKcc") || String.valueOf(session.getAttribute("moduleName")).equalsIgnoreCase("SpecialBothDep")) + session.setAttribute("moduleName", "SpecialBothKcc"); + else if(!String.valueOf(session.getAttribute("moduleName")).equalsIgnoreCase("SpecialKcc") ) + session.setAttribute("moduleName", "KCC"); + + + + request.getRequestDispatcher("/welcome.jsp").forward(request, response); + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/LeaseCommodityServlet.java b/IPKS_Updated/src/src/java/Controller/LeaseCommodityServlet.java new file mode 100644 index 0000000..7a5ce8a --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/LeaseCommodityServlet.java @@ -0,0 +1,200 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.*; +import java.util.*; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import DataEntryBean.LeaseCommodityBean; + +/** + * + * @author 594267 + */ +public class LeaseCommodityServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + Connection con = null; + CallableStatement proc = null; + String message = ""; + HttpSession session = request.getSession(false); + String ServletName = request.getParameter("handle_id"); + String pacsId = (String) session.getAttribute("pacsId"); + LeaseCommodityBean LeaseCommodityBeanObj = null; + LeaseCommodityBeanObj = new LeaseCommodityBean(); + System.out.println(request.getParameter("prod_id")); + + try { + // BeanUtils.populate(LeaseCommodityBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(TradingProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(TradingProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call Trading_Operation.lease_rent_commodity(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TradingProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + String makerId = session.getAttribute("user").toString(); + + // String twothouIN = request.getParameter("twothouIN").isEmpty() ? "0" : (request.getParameter("twothouIN")); + //String twothouOUT = request.getParameter("twothouOUT").isEmpty() ? "0" : (request.getParameter("twothouOUT")); + // String fivehundredIN = request.getParameter("fivehundredIN").isEmpty() ? "0" : (request.getParameter("fivehundredIN")); + // String fivehundredOUT = request.getParameter("fivehundredOUT").isEmpty() ? "0" : (request.getParameter("fivehundredOUT")); + // String hundredIN = request.getParameter("hundredIN").isEmpty() ? "0" : (request.getParameter("hundredIN")); + //String hundredOUT = request.getParameter("hundredOUT").isEmpty() ? "0" : (request.getParameter("hundredOUT")); + //String fiftyIN = request.getParameter("fiftyIN").isEmpty() ? "0" : (request.getParameter("fiftyIN")); + // String fiftyOUT = request.getParameter("fiftyOUT").isEmpty() ? "0" : (request.getParameter("fiftyOUT")); + // String twentyIN = request.getParameter("twentyIN").isEmpty() ? "0" : (request.getParameter("twentyIN")); + //String twentyOUT = request.getParameter("twentyOUT").isEmpty() ? "0" : (request.getParameter("twentyOUT")); + // String tenIN = request.getParameter("tenIN").isEmpty() ? "0" : (request.getParameter("tenIN")); + // String tenOUT = request.getParameter("tenOUT").isEmpty() ? "0" : (request.getParameter("tenOUT")); + //String fiveIN = request.getParameter("fiveIN").isEmpty() ? "0" : (request.getParameter("fiveIN")); + // String fiveOUT = request.getParameter("fiveOUT").isEmpty() ? "0" : (request.getParameter("fiveOUT")); + // String twoIN = request.getParameter("twoIN").isEmpty() ? "0" : (request.getParameter("twoIN")); + // String twoOUT = request.getParameter("twoOUT").isEmpty() ? "0" : (request.getParameter("twoOUT")); + // String oneIN = request.getParameter("oneIN").isEmpty() ? "0" : (request.getParameter("oneIN")); + // String oneOUT = request.getParameter("oneOUT").isEmpty() ? "0" : (request.getParameter("oneOUT")); + // String fiftyPaisaIN = request.getParameter("fiftyPaisaIN").isEmpty() ? "0" : (request.getParameter("fiftyPaisaIN")); + // String fiftyPaisaOUT = request.getParameter("fiftyPaisaOUT").isEmpty() ? "0" : (request.getParameter("fiftyPaisaOUT")); + // String onePaisaIN = request.getParameter("onePaisaIN").isEmpty() ? "0" : (request.getParameter("onePaisaIN")); + // String onePaisaOUT = request.getParameter("onePaisaOUT").isEmpty() ? "0" : (request.getParameter("onePaisaOUT")); + // String twohundredIN = request.getParameter("twohundredIN").isEmpty() ? "0" : (request.getParameter("twohundredIN")); + // String twohundredOUT = request.getParameter("twohundredOUT").isEmpty() ? "0" : (request.getParameter("twohundredOUT")); + + // LeaseCommodityBeanObj.setProd_Id(request.getParameter("prod_id")); + // LeaseCommodityBeanObj.setTdLeaseID(request.getParameter("tdLeaseID")); + proc.setString(1, LeaseCommodityBeanObj.getProd_Id()); + proc.setString(2, LeaseCommodityBeanObj.getCustID()); + proc.setString(3, LeaseCommodityBeanObj.getNoOfUnits()); + proc.setString(4, LeaseCommodityBeanObj.getPriceFreq()); + proc.setString(5, LeaseCommodityBeanObj.getTrmLen()); + proc.setString(6, LeaseCommodityBeanObj.getTotPayDue()); + proc.setString(7, LeaseCommodityBeanObj.getSecAmt()); + proc.setString(8, pacsId); + proc.setString(9, LeaseCommodityBeanObj.getTranType()); + proc.setString(10, LeaseCommodityBeanObj.getTdLeaseID()); + proc.setString(11, null); + proc.setString(12, makerId); + proc.setString(13, twothouIN); + proc.setString(14, fivehundredIN); + proc.setString(15, hundredIN); + proc.setString(16, fiftyIN); + proc.setString(17, twentyIN); + proc.setString(18, tenIN); + proc.setString(19, fiveIN); + proc.setString(20, twoIN); + proc.setString(21, oneIN); + proc.setString(22, fiftyPaisaIN); + proc.setString(23, onePaisaIN); + proc.setString(24, twothouOUT); + proc.setString(25, fivehundredOUT); + proc.setString(26, hundredOUT); + proc.setString(27, fiftyOUT); + proc.setString(28, twentyOUT); + proc.setString(29, tenOUT); + proc.setString(30, fiveOUT); + proc.setString(31, twoOUT); + proc.setString(32, oneOUT); + proc.setString(33, fiftyPaisaOUT); + proc.setString(34, onePaisaOUT); + proc.setString(35, pacsId); + proc.setString(36, LeaseCommodityBeanObj.getRentAmt()); + proc.registerOutParameter(37, java.sql.Types.VARCHAR); + proc.setString(38, twohundredIN); + proc.setString(39, twohundredOUT); + + proc.execute(); + + // message = proc.getString(37); + } catch (SQLException ex) { + // Logger.getLogger(TradingProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(TradingProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Trading_JSP/leaseRentCommodity.jsp").forward(request, response); + + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/LeaveBalanceServlet.java b/IPKS_Updated/src/src/java/Controller/LeaveBalanceServlet.java new file mode 100644 index 0000000..35769f7 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/LeaveBalanceServlet.java @@ -0,0 +1,283 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.PayrollBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.sql.CallableStatement; +import java.sql.Statement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import java.lang.reflect.InvocationTargetException; + +/** + * + * @author Tcs Help desk122 + */ +public class LeaveBalanceServlet extends HttpServlet { + + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + // String Action = request.getParameter("handle_id"); + // String checkOpt = request.getParameter("checkOption"); + + PayrollBean oPayrollBean = new PayrollBean(); + ArrayList alPayrollBean = new ArrayList(); + + try { + // BeanUtils.populate(oPayrollBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + System.out.println("Error occurred during processing."); + } + + if ("Create".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + String employee = request.getParameter("employee" + i); + + if (employee != null) { + oPayrollBean = new PayrollBean(); + oPayrollBean.setEmployee(employee); + oPayrollBean.setEname(request.getParameter("ename" + i)); + oPayrollBean.setLeave(request.getParameter("leave" + i)); + // oPayrollBean.setLeaveBal(request.getParameter("leaveBal" + i)); + // oPayrollBean.setRemarks(request.getParameter("remarks" + i)); + // oPayrollBean.setLeaveId(request.getParameter("leaveId" + i)); + // oPayrollBean.setEmployee_id(request.getParameter("employee_id" + i)); + // oPayrollBean.setId(request.getParameter("id" + i)); + alPayrollBean.add(oPayrollBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alPayrollBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call payroll.leave_process_credit(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alPayrollBean.size(); j++) { + + oPayrollBean = alPayrollBean.get(j); + proc.setString(1, oPayrollBean.getId()); + proc.setString(2, pacsId); + proc.setString(3, oPayrollBean.getEmployee_id()); + proc.setString(4, oPayrollBean.getLeaveId()); + proc.setString(5, oPayrollBean.getLeaveBal()); + proc.setString(6, user); + proc.setString(7, Action); + proc.setString(8, oPayrollBean.getRemarks()); + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + + proc.execute(); + // message = proc.getString(9); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Payroll/LeaveBalance.jsp").forward(request, response); + + } else if ("Amend".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter2")); + + for (int i = 2; i <= counter; i++) { + try { + + String employee = request.getParameter("employee" + i); + + if (employee != null) { + oPayrollBean = new PayrollBean(); + oPayrollBean.setEmployee(employee); + oPayrollBean.setEname(request.getParameter("ename" + i)); + oPayrollBean.setLeave(request.getParameter("leave" + i)); + // oPayrollBean.setLeaveBal(request.getParameter("leaveBal" + i)); + // oPayrollBean.setRemarks(request.getParameter("remarks" + i)); + // oPayrollBean.setLeaveId(request.getParameter("leaveId" + i)); + // oPayrollBean.setEmployee_id(request.getParameter("employee_id" + i)); + // oPayrollBean.setId(request.getParameter("id" + i)); + alPayrollBean.add(oPayrollBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alPayrollBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call payroll.leave_process_credit(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alPayrollBean.size(); j++) { + + oPayrollBean = alPayrollBean.get(j); + proc.setString(1, oPayrollBean.getId()); + proc.setString(2, pacsId); + proc.setString(3, oPayrollBean.getEmployee_id()); + proc.setString(4, oPayrollBean.getLeaveId()); + proc.setString(5, oPayrollBean.getLeaveBal()); + proc.setString(6, user); + proc.setString(7, Action); + proc.setString(8, oPayrollBean.getRemarks()); + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + + proc.execute(); + // message = proc.getString(9); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Payroll/LeaveBalance.jsp").forward(request, response); + + } else if ("getDetails".equalsIgnoreCase(Action)) { + + ResultSet resultset = null; + Statement statement = null; + + Connection connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + try { + //resultset = statement.executeQuery(" select id, emp_id, (select emp_id from employee_master w where w.id = p.emp_id) emp_no, (select k.first_name || ' ' || k.middle_name || ' ' || k.last_name from kyc_hdr k where k.cif_no = (select e.cif_no from employee_master e where e.id = p.emp_id)) name, (select li.leave_name from leave_master li where li.id = p.leave_id and li.pacs_id = p.pacs_id) leave_name, (select (case leave_type when '1' then 'Earned Leave' when '2' then 'Medical Leave' when '3' then 'Casual Leave' when '4' then 'Others Leave' end) from leave_master li where li.id = p.leave_id and li.pacs_id = p.pacs_id) leave_type, LEAVE_ID, balance, REMARKS from emp_leave_balance p where pacs_id = '" +pacsId+ "' order by 2 "); + + while (resultset.next()) { + + oPayrollBean = new PayrollBean(); + oPayrollBean.setId(resultset.getString("id")); + oPayrollBean.setEmployee_id(resultset.getString("emp_id")); + oPayrollBean.setEmployee(resultset.getString("emp_no")); + oPayrollBean.setEname(resultset.getString("name")); + oPayrollBean.setLeave(resultset.getString("leave_type")); + oPayrollBean.setLeaveBal(resultset.getString("balance")); + oPayrollBean.setLeaveId(resultset.getString("LEAVE_ID")); + oPayrollBean.setRemarks(resultset.getString("REMARKS")); + + alPayrollBean.add(oPayrollBean); + request.setAttribute("displayFlag", "Y"); + } + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + statement.close(); + resultset.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + } + request.setAttribute("checkOption", checkOpt); + request.setAttribute("oPayrollBean", oPayrollBean); + request.setAttribute("arrPayrollBean", alPayrollBean); + request.getRequestDispatcher("/Payroll/LeaveBalance.jsp").forward(request, response); + } + } + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + } +} diff --git a/IPKS_Updated/src/src/java/Controller/LeaveMasterServlet.java b/IPKS_Updated/src/src/java/Controller/LeaveMasterServlet.java new file mode 100644 index 0000000..6fbaf15 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/LeaveMasterServlet.java @@ -0,0 +1,309 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.PayrollBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.sql.CallableStatement; +import java.sql.Statement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import java.lang.reflect.InvocationTargetException; + +/** + * + * @author Tcs Help desk122 + */ +public class LeaveMasterServlet extends HttpServlet { + + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + // String Action = request.getParameter("handle_id"); + //String checkOpt = request.getParameter("checkOption"); + + PayrollBean oPayrollBean = new PayrollBean(); + ArrayList alPayrollBean = new ArrayList(); + + try { + //BeanUtils.populate(oPayrollBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + System.out.println("Error occurred during processing."); + } + + if ("Create".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + // String leave = request.getParameter("leave" + i); + + if (leave != null) { + oPayrollBean = new PayrollBean(); + oPayrollBean.setLeave(leave); + // oPayrollBean.setLeaveType(request.getParameter("leaveType" + i)); + // oPayrollBean.setYearlyCredit(request.getParameter("yearlyCredit" + i)); + // oPayrollBean.setEncashFlag(request.getParameter("encashFlag" + i)); + // oPayrollBean.setCarryfFlag(request.getParameter("carryfFlag" + i)); + // oPayrollBean.setEncashLimit(request.getParameter("encashLimit" + i)); + // oPayrollBean.setMinReserve(request.getParameter("minReserve" + i)); + // oPayrollBean.setMaxReserve(request.getParameter("maxReserve" + i)); + // oPayrollBean.setMinAllow(request.getParameter("minAllow" + i)); + // oPayrollBean.setMaxAllow(request.getParameter("maxAllow" + i)); + // oPayrollBean.setStatus(request.getParameter("status" + i)); + // oPayrollBean.setId(request.getParameter("id" + i)); + alPayrollBean.add(oPayrollBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alPayrollBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call payroll.leave_master_entry(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alPayrollBean.size(); j++) { + + oPayrollBean = alPayrollBean.get(j); + proc.setString(1, oPayrollBean.getId()); + proc.setString(2, pacsId); + proc.setString(3, oPayrollBean.getLeave()); + proc.setString(4, oPayrollBean.getLeaveType()); + proc.setString(5, oPayrollBean.getYearlyCredit()); + proc.setString(6, oPayrollBean.getEncashFlag()); + proc.setString(7, oPayrollBean.getCarryfFlag()); + proc.setString(8, oPayrollBean.getEncashLimit()); + proc.setString(9, oPayrollBean.getMinReserve()); + proc.setString(10, oPayrollBean.getMaxReserve()); + proc.setString(11, oPayrollBean.getMinAllow()); + proc.setString(12, oPayrollBean.getMaxAllow()); + proc.setString(13, user); + proc.setString(14, Action); + proc.setString(15, oPayrollBean.getStatus()); + proc.registerOutParameter(16, java.sql.Types.VARCHAR); + + proc.execute(); + // message = proc.getString(16); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Payroll/LeaveMaster.jsp").forward(request, response); + + } else if ("Amend".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter2")); + + for (int i = 2; i <= counter; i++) { + try { + + // String leave = request.getParameter("leave" + i); + + if (leave != null) { + oPayrollBean = new PayrollBean(); + oPayrollBean.setLeave(leave); + // oPayrollBean.setLeaveType(request.getParameter("leaveType" + i)); + //oPayrollBean.setYearlyCredit(request.getParameter("yearlyCredit" + i)); + // oPayrollBean.setEncashFlag(request.getParameter("encashFlag" + i)); + //oPayrollBean.setCarryfFlag(request.getParameter("carryfFlag" + i)); + //oPayrollBean.setEncashLimit(request.getParameter("encashLimit" + i)); + // oPayrollBean.setMinReserve(request.getParameter("minReserve" + i)); + // oPayrollBean.setMaxReserve(request.getParameter("maxReserve" + i)); + // oPayrollBean.setMinAllow(request.getParameter("minAllow" + i)); + // oPayrollBean.setMaxAllow(request.getParameter("maxAllow" + i)); + // oPayrollBean.setStatus(request.getParameter("status" + i)); + // oPayrollBean.setId(request.getParameter("id" + i)); + alPayrollBean.add(oPayrollBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alPayrollBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call payroll.leave_master_entry(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alPayrollBean.size(); j++) { + + oPayrollBean = alPayrollBean.get(j); + proc.setString(1, oPayrollBean.getId()); + proc.setString(2, pacsId); + proc.setString(3, oPayrollBean.getLeave()); + proc.setString(4, oPayrollBean.getLeaveType()); + proc.setString(5, oPayrollBean.getYearlyCredit()); + proc.setString(6, oPayrollBean.getEncashFlag()); + proc.setString(7, oPayrollBean.getCarryfFlag()); + proc.setString(8, oPayrollBean.getEncashLimit()); + proc.setString(9, oPayrollBean.getMinReserve()); + proc.setString(10, oPayrollBean.getMaxReserve()); + proc.setString(11, oPayrollBean.getMinAllow()); + proc.setString(12, oPayrollBean.getMaxAllow()); + proc.setString(13, user); + proc.setString(14, Action); + proc.setString(15, oPayrollBean.getStatus()); + proc.registerOutParameter(16, java.sql.Types.VARCHAR); + + proc.execute(); + // message = proc.getString(16); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Payroll/LeaveMaster.jsp").forward(request, response); + + } else if ("getDetails".equalsIgnoreCase(Action)) { + + ResultSet resultset = null; + Statement statement = null; + + Connection connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + try { + // resultset = statement.executeQuery("select id, leave_name, leave_type, yearly_credit, encashed_flag, carry_forward_flag, encash_limt, minimum_reserve, maximum_reserve, minimum_allow, maximum_allow, status from leave_master where pacs_id = '" +pacsId+ "' "); + + while (resultset.next()) { + + oPayrollBean = new PayrollBean(); + oPayrollBean.setId(resultset.getString("id")); + oPayrollBean.setLeave(resultset.getString("leave_name")); + oPayrollBean.setLeaveType(resultset.getString("leave_type")); + oPayrollBean.setYearlyCredit(resultset.getString("yearly_credit")); + oPayrollBean.setEncashFlag(resultset.getString("encashed_flag")); + oPayrollBean.setCarryfFlag(resultset.getString("carry_forward_flag")); + oPayrollBean.setEncashLimit(resultset.getString("encash_limt")); + oPayrollBean.setMinReserve(resultset.getString("minimum_reserve")); + oPayrollBean.setMaxReserve(resultset.getString("maximum_reserve")); + oPayrollBean.setMinAllow(resultset.getString("minimum_allow")); + oPayrollBean.setMaxAllow(resultset.getString("maximum_allow")); + oPayrollBean.setStatus(resultset.getString("status")); + + alPayrollBean.add(oPayrollBean); + request.setAttribute("displayFlag", "Y"); + } + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + statement.close(); + resultset.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + } + request.setAttribute("checkOption", checkOpt); + request.setAttribute("oPayrollBean", oPayrollBean); + request.setAttribute("arrPayrollBean", alPayrollBean); + request.getRequestDispatcher("/Payroll/LeaveMaster.jsp").forward(request, response); + } + } + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + } +} diff --git a/IPKS_Updated/src/src/java/Controller/LeaveTransactionServlet.java b/IPKS_Updated/src/src/java/Controller/LeaveTransactionServlet.java new file mode 100644 index 0000000..eaf2d0a --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/LeaveTransactionServlet.java @@ -0,0 +1,305 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.PayrollBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.sql.CallableStatement; +import java.sql.Statement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import java.lang.reflect.InvocationTargetException; +import java.util.Date; + +/** + * + * @author Tcs Help desk122 + */ +public class LeaveTransactionServlet extends HttpServlet { + + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + // String Action = request.getParameter("handle_id"); + // String checkOpt = request.getParameter("checkOption"); + // String fromDt = request.getParameter("fromDt"); + // String toDt = request.getParameter("toDt"); + + PayrollBean oPayrollBean = new PayrollBean(); + ArrayList alPayrollBean = new ArrayList(); + + try { + // BeanUtils.populate(oPayrollBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + System.out.println("Error occurred during processing."); + } + + if ("Create".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + String employee = request.getParameter("employee" + i); + + if (employee != null) { + oPayrollBean = new PayrollBean(); + oPayrollBean.setEmployee(employee); + oPayrollBean.setEname(request.getParameter("ename" + i)); + oPayrollBean.setLeave(request.getParameter("leave" + i)); + // oPayrollBean.setLeaveBal(request.getParameter("leaveBal" + i)); + // oPayrollBean.setRemarks(request.getParameter("remarks" + i)); + // oPayrollBean.setStatus(request.getParameter("status" + i)); + // oPayrollBean.setLeaveId(request.getParameter("leaveId" + i)); + // oPayrollBean.setEmployee_id(request.getParameter("employee_id" + i)); + // oPayrollBean.setFromDate(request.getParameter("fromDate" + i)); + // oPayrollBean.setToDate(request.getParameter("toDate" + i)); + // oPayrollBean.setId(request.getParameter("id" + i)); + alPayrollBean.add(oPayrollBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alPayrollBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call payroll.leave_transaction(?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alPayrollBean.size(); j++) { + + oPayrollBean = alPayrollBean.get(j); + proc.setString(1, oPayrollBean.getId()); + proc.setString(2, pacsId); + proc.setString(3, oPayrollBean.getEmployee_id()); + proc.setString(4, oPayrollBean.getLeaveId()); + proc.setString(5, oPayrollBean.getLeaveBal()); + proc.setString(6, oPayrollBean.getFromDate()); + proc.setString(7, oPayrollBean.getToDate()); + proc.setString(8, user); + proc.setString(9, Action); + proc.setString(10, oPayrollBean.getStatus()); + proc.setString(11, oPayrollBean.getRemarks()); + proc.registerOutParameter(12, java.sql.Types.VARCHAR); + + proc.execute(); + // message = proc.getString(12); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Payroll/LeaveTransaction.jsp").forward(request, response); + + } else if ("Amend".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter2")); + + for (int i = 2; i <= counter; i++) { + try { + + String employee = request.getParameter("employee" + i); + + if (employee != null) { + oPayrollBean = new PayrollBean(); + oPayrollBean.setEmployee(employee); + oPayrollBean.setEname(request.getParameter("ename" + i)); + oPayrollBean.setLeave(request.getParameter("leave" + i)); + //oPayrollBean.setLeaveBal(request.getParameter("leaveBal" + i)); + //oPayrollBean.setRemarks(request.getParameter("remarks" + i)); + // oPayrollBean.setStatus(request.getParameter("status" + i)); + //oPayrollBean.setLeaveId(request.getParameter("leaveId" + i)); + //oPayrollBean.setEmployee_id(request.getParameter("employee_id" + i)); + //oPayrollBean.setFromDate(request.getParameter("fromDate" + i)); + // oPayrollBean.setToDate(request.getParameter("toDate" + i)); + // oPayrollBean.setId(request.getParameter("id" + i)); + alPayrollBean.add(oPayrollBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alPayrollBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call payroll.leave_transaction(?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alPayrollBean.size(); j++) { + + oPayrollBean = alPayrollBean.get(j); + proc.setString(1, oPayrollBean.getId()); + proc.setString(2, pacsId); + proc.setString(3, oPayrollBean.getEmployee_id()); + proc.setString(4, oPayrollBean.getLeaveId()); + proc.setString(5, oPayrollBean.getLeaveBal()); + proc.setString(6, oPayrollBean.getFromDate()); + proc.setString(7, oPayrollBean.getToDate()); + proc.setString(8, user); + proc.setString(9, Action); + proc.setString(10, oPayrollBean.getStatus()); + proc.setString(11, oPayrollBean.getRemarks()); + proc.registerOutParameter(12, java.sql.Types.VARCHAR); + + proc.execute(); + //message = proc.getString(12); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Payroll/LeaveTransaction.jsp").forward(request, response); + + } else if ("getDetails".equalsIgnoreCase(Action)) { + + ResultSet resultset = null; + Statement statement = null; + + Connection connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + try { + //resultset = statement.executeQuery(" select id, pacs_id, emp_id, (select emp_id from employee_master w where w.id = k.emp_id) emp_no, (select k.first_name || ' ' || k.middle_name || ' ' || k.last_name from kyc_hdr k where k.cif_no = (select e.cif_no from employee_master e where e.id = k.emp_id)) name, leave_id, (select li.leave_name from leave_master li where li.id = k.leave_id and li.pacs_id = k.pacs_id) leave_name, (select (case leave_type when '1' then 'Earned Leave' when '2' then 'Medical Leave' when '3' then 'Casual Leave' when '4' then 'Others Leave' end) from leave_master li where li.id = k.leave_id and li.pacs_id = k.pacs_id) leave_type, no_of_leave, leave_apply_dt, to_char(leave_from_date, 'dd/mm/yyyy')leave_from_date, to_char(leave_to_date, 'dd/mm/yyyy')leave_to_date, status, remarks from emp_leave_txn k where k.status = 'Y' and k.pacs_id = '" +pacsId+ "' and k.leave_from_date >= to_date('" +fromDt+ "', 'dd/mm/yyyy') and k.leave_to_date <= to_date('" +toDt+ "', 'dd/mm/yyyy') "); + + while (resultset.next()) { + + oPayrollBean = new PayrollBean(); + oPayrollBean.setId(resultset.getString("id")); + oPayrollBean.setEmployee_id(resultset.getString("emp_id")); + oPayrollBean.setEmployee(resultset.getString("emp_no")); + oPayrollBean.setEname(resultset.getString("name")); + oPayrollBean.setLeave(resultset.getString("leave_type")); + oPayrollBean.setLeaveId(resultset.getString("leave_id")); + oPayrollBean.setLeaveBal(resultset.getString("no_of_leave")); + oPayrollBean.setFromDate(resultset.getString("leave_from_date")); + oPayrollBean.setToDate(resultset.getString("leave_to_date")); + oPayrollBean.setRemarks(resultset.getString("remarks")); + oPayrollBean.setStatus(resultset.getString("status")); + + alPayrollBean.add(oPayrollBean); + request.setAttribute("displayFlag", "Y"); + } + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + statement.close(); + resultset.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + } + request.setAttribute("checkOption", checkOpt); + request.setAttribute("oPayrollBean", oPayrollBean); + request.setAttribute("arrPayrollBean", alPayrollBean); + if (alPayrollBean.size() == 0) + { + request.setAttribute("message", "No data found."); + } + request.getRequestDispatcher("/Payroll/LeaveTransaction.jsp").forward(request, response); + } + } + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + } +} diff --git a/IPKS_Updated/src/src/java/Controller/LienMarkingServlet.java b/IPKS_Updated/src/src/java/Controller/LienMarkingServlet.java new file mode 100644 index 0000000..b290693 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/LienMarkingServlet.java @@ -0,0 +1,355 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +//import Dao.LienMarkingDao; +//import DataEntryBean.ChequeDetailsBean; +//import java.io.IOException; +//import java.util.ArrayList; +//import javax.servlet.ServletException; +//import javax.servlet.http.HttpServlet; +//import javax.servlet.http.HttpServletRequest; +//import javax.servlet.http.HttpServletResponse; +//import javax.servlet.http.HttpSession; +import DataEntryBean.LienMarkingBean; +import DataEntryBean.NscDetailsBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.BatchUpdateException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 1004242 + */ +public class LienMarkingServlet extends HttpServlet{ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + String lienType = ""; + CallableStatement stmt = null; + NscDetailsBean oNscDetailsBean = null; + String qno = ""; + String nscMessage = ""; + int counter = 0; + ArrayList alNscDetailsBean = new ArrayList(); + LienMarkingBean oLienMarkingBean = new LienMarkingBean(); + try { + // BeanUtils.populate(oLienMarkingBean, request.getParameterMap()); + lienType = request.getParameter("lienType"); + } catch (IllegalAccessException ex) { + // Logger.getLogger(LienMarkingServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(LienMarkingServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call operations2.lien_mark_manual(?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(LienMarkingServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oLienMarkingBean.getLoanAccount()); + proc.setString(2, oLienMarkingBean.getDep_acc_no()); + proc.setString(3, oLienMarkingBean.getKVPNo()); + proc.setString(4, oLienMarkingBean.getLienType()); + proc.setString(5, oLienMarkingBean.getCurrentValuation()); + proc.setString(6, oLienMarkingBean.getSafeLendingMargin()); + proc.setString(7, oLienMarkingBean.getDescription()); + proc.setString(8, oLienMarkingBean.getExpDt()); + proc.setString(9, oLienMarkingBean.getOpenDt()); + proc.setString(10, user); + proc.setString(11, pacsId); + + proc.registerOutParameter(12, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(12); + + if (message.contains("Lien details Saved successfully Check Lien Report For Loan A/C #") ) + { + if (message.contains("#") && lienType!=null && lienType.equalsIgnoreCase("K")) { + qno = message.substring(message.indexOf("#") + 1); + counter = Integer.parseInt(request.getParameter("rowCounter")); + for (int i = 1; i <= counter; i++) { + try { + + // String refno = request.getParameter("ref" + i); + // String amt = request.getParameter("amt" + i); + // String openDt = request.getParameter("openDt" + i); + // String expDt = request.getParameter("expDt" + i); + + if (refno != null) { + oNscDetailsBean = new NscDetailsBean(); + oNscDetailsBean.setRefno(refno); + oNscDetailsBean.setAmt(amt); + oNscDetailsBean.setOpenDt(openDt); + oNscDetailsBean.setExpDt(expDt); + alNscDetailsBean.add(oNscDetailsBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + + if (alNscDetailsBean.size() > 0) { + try { + + for (int j = 0; j < alNscDetailsBean.size(); j++) { + stmt = con.prepareCall("{ call Operations2.saveNscDetails(?,?,?,?,?,?) }"); + oNscDetailsBean = alNscDetailsBean.get(j); + stmt.setString(1, qno); + stmt.setString(2, oNscDetailsBean.getRefno()); + stmt.setString(3, oNscDetailsBean.getAmt()); + stmt.setString(4, oNscDetailsBean.getOpenDt()); + stmt.setString(5, oNscDetailsBean.getExpDt()); + stmt.registerOutParameter(6, java.sql.Types.VARCHAR); + stmt.execute(); + // nscMessage = stmt.getString(6); + + if (!nscMessage.equalsIgnoreCase("NSC Details inserted")) { + con.rollback(); + message = nscMessage; + break; + } + + stmt.close(); + } + + if (nscMessage.equalsIgnoreCase("NSC Details inserted")) { + con.commit(); + } + } catch (BatchUpdateException ex) { + try { + con.rollback(); + message = "Entered NSC details already tagged"; + } catch (SQLException ex1) { + // Logger.getLogger(LienMarkingServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + + + // Logger.getLogger(LienMarkingServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } catch (SQLException ex1) { + try { + con.rollback(); + } catch (SQLException e) { + // Logger.getLogger(LienMarkingServlet.class.getName()).log(Level.SEVERE, null, e); + System.out.println("Error occurred during processing."); + } + message = "Error occurred while saving NSC details. Please try Again!"; + // Logger.getLogger(LienMarkingServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } finally { + try { + stmt.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during stmt close."); + } + try { + con.commit(); + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(LienMarkingServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + + } + } if (message.contains("#") && lienType!=null && lienType.equalsIgnoreCase("G")) { + qno = message.substring(message.indexOf("#") + 1); + counter = Integer.parseInt(request.getParameter("rowCounter")); + for (int i = 1; i <= counter; i++) { + try { + + // String bond = request.getParameter("bond" + i); + // String grossW = request.getParameter("grossW" + i); + // String netW = request.getParameter("netW" + i); + + if (bond != null) { + oNscDetailsBean = new NscDetailsBean(); + oNscDetailsBean.setBond(bond); + oNscDetailsBean.setGrossW(grossW); + oNscDetailsBean.setNetW(netW); + alNscDetailsBean.add(oNscDetailsBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + + if (alNscDetailsBean.size() > 0) { + try { + + for (int j = 0; j < alNscDetailsBean.size(); j++) { + stmt = con.prepareCall("{ call Operations2.saveGoldDetails(?,?,?,?,?) }"); + oNscDetailsBean = alNscDetailsBean.get(j); + stmt.setString(1, qno); + stmt.setString(2, oNscDetailsBean.getBond()); + stmt.setString(3, oNscDetailsBean.getGrossW()); + stmt.setString(4, oNscDetailsBean.getNetW()); + stmt.registerOutParameter(5, java.sql.Types.VARCHAR); + stmt.execute(); + // nscMessage = stmt.getString(5); + + if (!nscMessage.equalsIgnoreCase("Gold Details inserted")) { + con.rollback(); + message = nscMessage; + break; + } + stmt.close(); + } + + if (nscMessage.equalsIgnoreCase("Gold Details inserted")) { + con.commit(); + } + } catch (BatchUpdateException ex) { + try { + con.rollback(); + message = "Entered Gold details already tagged"; + } catch (SQLException ex1) { + System.out.println("Error occurred during processing."); + } + + System.out.println("Error occurred during processing."); + } catch (SQLException ex1) { + try { + con.rollback(); + } catch (SQLException e) { + System.out.println("Error occurred during processing."); + } + message = "Error occurred while saving Gold details. Please try Again!"; + System.out.println("Error occurred during processing."); + } finally { + try { + stmt.close(); + } catch (SQLException e) { + System.out.println("Error occurred during stmt close."); + } + try { + con.commit(); + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + + } + } + } + + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.commit(); + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(LienMarkingServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/LienMarking.jsp").forward(request, response); + + } + } + +// HttpSession session = request.getSession(false); +// String pacsId = (String) session.getAttribute("pacsId"); +// String tellerId = (String)session.getAttribute("user"); +// LienMarkingDao aiDao = new LienMarkingDao(); +// String result = null; +// +// +// try{ +// +// String lienType = request.getParameter("lienType"); +// String KVPNo = request.getParameter("KVPNo"); +// String LoanAccount = request.getParameter("LoanAccount"); +// String DepAccount = request.getParameter("dep_acc_no"); +// String SecurityAmt = request.getParameter("currentValuation"); +// String safeLendingMargin = request.getParameter("safeLendingMargin"); +// String description = request.getParameter("description"); +// String Expdt = request.getParameter("expDt"); +// String OpenDt = request.getParameter("openDt"); +// +// result = aiDao.LienMarkingServletProc(LoanAccount, DepAccount, KVPNo, lienType, SecurityAmt, safeLendingMargin, description, Expdt, OpenDt, tellerId, pacsId); +// +// request.setAttribute("message1", result); +// request.getRequestDispatcher("/Deposit/LienMarking.jsp").forward(request, response); +// +// } catch (Exception e) { +// e.printStackTrace(); +// request.setAttribute("message1", "Error occured. Please try again"); +// request.getRequestDispatcher("/Deposit/LienMarking.jsp").forward(request, response); +// } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/LoanAccountCreationServlet.java b/IPKS_Updated/src/src/java/Controller/LoanAccountCreationServlet.java new file mode 100644 index 0000000..46198b9 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/LoanAccountCreationServlet.java @@ -0,0 +1,344 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.LoanAccountCreationBean; +import DataEntryBean.NscDetailsBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.BatchUpdateException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author Tcs Helpdesk10 + */ +public class LoanAccountCreationServlet extends HttpServlet { + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + String collType = ""; + CallableStatement stmt = null; + NscDetailsBean oNscDetailsBean = null; + String qno = ""; + String nscMessage = ""; + int counter = 0; + ArrayList alNscDetailsBean = new ArrayList(); + //String ServletName = request.getParameter("handle_id"); + LoanAccountCreationBean oLoanAccountCreationBean = new LoanAccountCreationBean(); + try { + // BeanUtils.populate(oLoanAccountCreationBean, request.getParameterMap()); + collType = request.getParameter("collateralType"); + } catch (IllegalAccessException ex) { + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call operations.loan_opening_authorization(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(LoanAccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, pacsId); + proc.setString(2, oLoanAccountCreationBean.getProductCode()); + proc.setString(3, oLoanAccountCreationBean.getInttCategory()); + proc.setString(4, oLoanAccountCreationBean.getCifNumber()); + proc.setString(5, oLoanAccountCreationBean.getLoanappAmt()); + proc.setString(6, oLoanAccountCreationBean.getLoanTerm()); + proc.setString(7, oLoanAccountCreationBean.getSegmentCode()); + proc.setString(8, user); + proc.setString(9, oLoanAccountCreationBean.getActivityCode()); + proc.setString(10, oLoanAccountCreationBean.getSchemeCode()); + proc.setString(11, oLoanAccountCreationBean.getPurposeCode()); + proc.setString(12, oLoanAccountCreationBean.getCollateralType()); + proc.setString(13, oLoanAccountCreationBean.getDescription()); + proc.setString(14, oLoanAccountCreationBean.getCurrentValuation()); + proc.setString(15, oLoanAccountCreationBean.getSafeLendingMargin()); + proc.setString(16, oLoanAccountCreationBean.getGuarantorAddress()); + proc.setString(17, oLoanAccountCreationBean.getGuarantorDOB()); + proc.setString(18, oLoanAccountCreationBean.getGuarantorJob()); + proc.setString(19, oLoanAccountCreationBean.getGurantorIncome()); + proc.setString(20, oLoanAccountCreationBean.getGurantorName()); + proc.setString(21, oLoanAccountCreationBean.getEligAmt()); + proc.setString(22, oLoanAccountCreationBean.getGuarRelation()); + proc.setString(23, oLoanAccountCreationBean.getGuarIdType()); + proc.setString(24, oLoanAccountCreationBean.getGuarIdNo()); + proc.setString(26, oLoanAccountCreationBean.getDep_acc_no()); + proc.setString(27, oLoanAccountCreationBean.getExpDt()); + proc.setString(28, oLoanAccountCreationBean.getIntRate()); + proc.setString(29, oLoanAccountCreationBean.getPenIntRate()); + + proc.registerOutParameter(25, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(25); + + if (message.contains("Operation sent for authorization with Ref No. #") ) + { + if (message.contains("#") && collType!=null && collType.equalsIgnoreCase("K")) { + qno = message.substring(message.indexOf("#") + 1); + counter = Integer.parseInt(request.getParameter("rowCounter")); + for (int i = 1; i <= counter; i++) { + try { + + // String refno = request.getParameter("ref" + i); + // String amt = request.getParameter("amt" + i); + // String openDt = request.getParameter("openDt" + i); + // String expDt = request.getParameter("expDt" + i); + + if (refno != null) { + oNscDetailsBean = new NscDetailsBean(); + oNscDetailsBean.setRefno(refno); + oNscDetailsBean.setAmt(amt); + oNscDetailsBean.setOpenDt(openDt); + oNscDetailsBean.setExpDt(expDt); + alNscDetailsBean.add(oNscDetailsBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + + if (alNscDetailsBean.size() > 0) { + try { + + for (int j = 0; j < alNscDetailsBean.size(); j++) { + stmt = con.prepareCall("{ call Operations.saveNscDetails(?,?,?,?,?,?) }"); + oNscDetailsBean = alNscDetailsBean.get(j); + stmt.setString(1, qno); + stmt.setString(2, oNscDetailsBean.getRefno()); + stmt.setString(3, oNscDetailsBean.getAmt()); + stmt.setString(4, oNscDetailsBean.getOpenDt()); + stmt.setString(5, oNscDetailsBean.getExpDt()); + stmt.registerOutParameter(6, java.sql.Types.VARCHAR); + stmt.execute(); + // nscMessage = stmt.getString(6); + + if (!nscMessage.equalsIgnoreCase("NSC Details inserted")) { + con.rollback(); + message = nscMessage; + break; + } + + stmt.close(); + } + + if (nscMessage.equalsIgnoreCase("NSC Details inserted")) { + con.commit(); + } + } catch (BatchUpdateException ex) { + try { + con.rollback(); + message = "Entered NSC details already tagged"; + } catch (SQLException ex1) { + // Logger.getLogger(LoanAccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + + + // Logger.getLogger(LoanAccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } catch (SQLException ex1) { + try { + con.rollback(); + } catch (SQLException e) { + // Logger.getLogger(LoanAccountCreationServlet.class.getName()).log(Level.SEVERE, null, e); + System.out.println("Error occurred during processing."); + } + message = "Error occurred while saving NSC details. Please try Again!"; + // Logger.getLogger(LoanAccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } finally { + try { + stmt.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during stmt close."); + } + try { + con.commit(); + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(LoanAccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + + } + } else if (message.contains("#") && collType!=null && collType.equalsIgnoreCase("G")) { + qno = message.substring(message.indexOf("#") + 1); + counter = Integer.parseInt(request.getParameter("rowCounter")); + for (int i = 1; i <= counter; i++) { + try { + + // String bond = request.getParameter("bond" + i); + // String grossW = request.getParameter("grossW" + i); + // String netW = request.getParameter("netW" + i); + + if (bond != null) { + oNscDetailsBean = new NscDetailsBean(); + oNscDetailsBean.setBond(bond); + oNscDetailsBean.setGrossW(grossW); + oNscDetailsBean.setNetW(netW); + alNscDetailsBean.add(oNscDetailsBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + + if (alNscDetailsBean.size() > 0) { + try { + + for (int j = 0; j < alNscDetailsBean.size(); j++) { + stmt = con.prepareCall("{ call Operations.saveGoldDetails(?,?,?,?,?) }"); + oNscDetailsBean = alNscDetailsBean.get(j); + stmt.setString(1, qno); + stmt.setString(2, oNscDetailsBean.getBond()); + stmt.setString(3, oNscDetailsBean.getGrossW()); + stmt.setString(4, oNscDetailsBean.getNetW()); + stmt.registerOutParameter(5, java.sql.Types.VARCHAR); + stmt.execute(); + // nscMessage = stmt.getString(5); + + if (!nscMessage.equalsIgnoreCase("Gold Details inserted")) { + con.rollback(); + message = nscMessage; + break; + } + stmt.close(); + } + + if (nscMessage.equalsIgnoreCase("Gold Details inserted")) { + con.commit(); + } + } catch (BatchUpdateException ex) { + try { + con.rollback(); + message = "Entered Gold details already tagged"; + } catch (SQLException ex1) { + System.out.println("Error occurred during processing."); + } + + System.out.println("Error occurred during processing."); + } catch (SQLException ex1) { + try { + con.rollback(); + } catch (SQLException e) { + System.out.println("Error occurred during processing."); + } + message = "Error occurred while saving Gold details. Please try Again!"; + System.out.println("Error occurred during processing."); + } finally { + try { + stmt.close(); + } catch (SQLException e) { + System.out.println("Error occurred during stmt close."); + } + try { + con.commit(); + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + } + } + + } catch (SQLException ex) { + // Logger.getLogger(LoanAccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.commit(); + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(LoanAccountCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Loan/LoanAccountCreation.jsp").forward(request, response); + + } + + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/LoanDisbursementServlet.java b/IPKS_Updated/src/src/java/Controller/LoanDisbursementServlet.java new file mode 100644 index 0000000..a8c00d6 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/LoanDisbursementServlet.java @@ -0,0 +1,453 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.LoanDisbursementHdrBean; +import DataEntryBean.LoanDisbursementDetailBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.StringTokenizer; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 986137 + */ +public class LoanDisbursementServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + // String loanAccNo = request.getParameter("loanAcc"); + ResultSet rs = null; + int SeachFound = 0; + String message = ""; + Connection con = null; + CallableStatement stmt = null; + CallableStatement proc = null; + + + // String action = request.getParameter("handle_id"); + String pacsId = (String) session.getAttribute("pacsId"); + + LoanDisbursementHdrBean oLoanDisbursementHdrBean = new LoanDisbursementHdrBean(); + LoanDisbursementDetailBean oLoanDisbursementDetailBean = new LoanDisbursementDetailBean(); + ArrayList alLoanDisbursementDetailBean = new ArrayList(); + ArrayList alLoanDisbursementDetailBeanNew = new ArrayList(); + ArrayList alLoanDisbursementDetailBeanUpdated = new ArrayList(); + BatchExecutionFailedOperation BatchExecutionFailedOperationObject = new BatchExecutionFailedOperation(); + boolean SuccessFlag; + + + if (action.equalsIgnoreCase("SearchLoanAcc")) { + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(LoanDisbursementServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + //resultset = statement.executeQuery("select h.key_1,h.customer_no," + + "(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name," + + "p.prod_desc,h.outst_bal,h.sanction_amt,to_char(h.sanc_dt,'dd-MON-yyyy') as sanc_dt, h.disb_amt " + + "from loan_account h,kyc_hdr t,loan_product p " + + "where h.customer_no = t.cif_no and h.loan_prod_id = p.id and h.key_1 ='" + loanAccNo + "' and h.PACS_ID = '" + pacsId + "'"); + + + + while (resultset.next()) { + oLoanDisbursementHdrBean.setLoanAccountNumber(resultset.getString("key_1")); + oLoanDisbursementHdrBean.setCifNo(resultset.getString("customer_no")); + oLoanDisbursementHdrBean.setCustomerName(resultset.getString("name")); + oLoanDisbursementHdrBean.setProductDesc(resultset.getString("prod_desc")); + oLoanDisbursementHdrBean.setLoanOutStd(resultset.getString("outst_bal")); + oLoanDisbursementHdrBean.setApprvedAmt(resultset.getString("sanction_amt")); + oLoanDisbursementHdrBean.setApprvedDate(resultset.getString("sanc_dt")); + oLoanDisbursementHdrBean.setAdvanceAmt(resultset.getString("disb_amt")); + + + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + } + + statement.close(); + resultset.close(); + + } catch (SQLException ex) { + // Logger.getLogger(LoanDisbursementServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + //detail part populate + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(LoanDisbursementServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + String query = "select t.id,t.disb_yyyymm,t.disb_amount,t.descr,t.amt_remain,t.ACCNO from loan_disb_schedule t where t.ACCNO='" + oLoanDisbursementHdrBean.getLoanAccountNumber() + "' ORDER BY t.disb_yyyymm ASC"; + // rs = statement.executeQuery(query); + + while (rs.next()) { + + oLoanDisbursementDetailBean = new LoanDisbursementDetailBean(); + oLoanDisbursementDetailBean.setDisbSchedule_table_id(rs.getString("id")); + oLoanDisbursementDetailBean.setDisburseMonth(rs.getString("disb_yyyymm")); + oLoanDisbursementDetailBean.setDisburseAmt(rs.getString("disb_amount")); + oLoanDisbursementDetailBean.setDescDisburse(rs.getString("descr")); + oLoanDisbursementDetailBean.setAmtRemain(rs.getString("amt_remain")); + oLoanDisbursementDetailBean.setLoanAcctId(rs.getString("ACCNO")); + + + alLoanDisbursementDetailBean.add(oLoanDisbursementDetailBean); + + } + // statement.close(); + // connection.close(); + rs.close(); + } catch (SQLException ex) { + // Logger.getLogger(LoanDisbursementServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + if (SeachFound == 0) { + message = "Loan Account does not exist in the system. Please enter correct details."; + request.setAttribute("message", message); + } + + request.setAttribute("oLoanDisbursementHdrBeanObj", oLoanDisbursementHdrBean); + request.setAttribute("alLoanDisbursementDetailBean", alLoanDisbursementDetailBean); + request.getRequestDispatcher("/Loan/LoanDisbursement.jsp").forward(request, response); + + } else if (action.equalsIgnoreCase("Create")) { + // String loanAccHdr = request.getParameter("loanAccountNumber"); + int counter = Integer.parseInt(request.getParameter("rowCounter2")); + + for (int i = 1; i <= counter; i++) { + try { + + // String disburseMonth = request.getParameter("disburseMonth" + i); + // String disburseAmt = request.getParameter("disburseAmt" + i); + // String descDisburse = request.getParameter("descDisburse" + i); + // String amtRemain = request.getParameter("amtRemain" + i); + + + + if (loanAccHdr != null) { + oLoanDisbursementDetailBean = new LoanDisbursementDetailBean(); + oLoanDisbursementDetailBean.setDisburseMonth(disburseMonth); + oLoanDisbursementDetailBean.setDisburseAmt(disburseAmt); + oLoanDisbursementDetailBean.setDescDisburse(descDisburse); + oLoanDisbursementDetailBean.setAmtRemain(amtRemain); + + + alLoanDisbursementDetailBean.add(oLoanDisbursementDetailBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + + if (alLoanDisbursementDetailBean.size() > 0) { + try { + con = DbHandler.getDBConnection(); + stmt = con.prepareCall("{ call upsert_loanDisbSchedule(?,?,?,?,?,?,?) }"); + for (int j = 0; j < alLoanDisbursementDetailBean.size(); j++) { + oLoanDisbursementDetailBean = alLoanDisbursementDetailBean.get(j); + stmt.setString(1, loanAccHdr); + stmt.setString(2, oLoanDisbursementDetailBean.getDisburseMonth()); + stmt.setString(3, oLoanDisbursementDetailBean.getDisburseAmt()); + stmt.setString(4, oLoanDisbursementDetailBean.getDescDisburse()); + stmt.setString(5, oLoanDisbursementDetailBean.getAmtRemain()); + stmt.setString(6, null); + stmt.setString(7, action); + stmt.addBatch(); + + } + + stmt.executeBatch(); + message = "Disbursement scheduled successfully for the Loan Account No. " + loanAccHdr; + + } catch (SQLException ex) { + try { + // con.rollback(); + + SuccessFlag = BatchExecutionFailedOperationObject.BatchExecutionFailedOperation("LoanDisbursement.jsp", loanAccHdr); + + message = ex.toString(); + + + } catch (Exception ex1) { + // Logger.getLogger(LoanDisbursementServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + + // Logger.getLogger(LoanDisbursementServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + stmt.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during stmt close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(LoanDisbursementServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Loan/LoanDisbursement.jsp").forward(request, response); + } else if (action.equalsIgnoreCase("Update")) { + //Detail Part Starts here + // String loanAccHdr2 = request.getParameter("loanAccountNumber"); + int counterfor_Detail = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counterfor_Detail; i++) { + try { + // String disburseMonthAmend = request.getParameter("disburseMonthAmend" + i); + // String disburseAmtAmend = request.getParameter("disburseAmtAmend" + i); + //String descDisburseAmend = request.getParameter("descDisburseAmend" + i); + // String amtRemainAmend = request.getParameter("amtRemainAmend" + i); + String loanAcctIdAmend = request.getParameter("loanAcctIdAmend" + i); + + String rowStatus = request.getParameter("rowStatus" + i); + // String disbSchedule_table_id = request.getParameter("disbSchedule_table_id" + i); + + if (loanAccHdr2 != null && rowStatus != null) { + oLoanDisbursementDetailBean = new LoanDisbursementDetailBean(); + oLoanDisbursementDetailBean.setDisburseMonthAmend(disburseMonthAmend); + oLoanDisbursementDetailBean.setDisburseAmtAmend(disburseAmtAmend); + oLoanDisbursementDetailBean.setDescDisburseAmend(descDisburseAmend); + oLoanDisbursementDetailBean.setAmtRemainAmend(amtRemainAmend); + oLoanDisbursementDetailBean.setLoanAcctIdAmend(loanAcctIdAmend); + oLoanDisbursementDetailBean.setDisbSchedule_table_id(disbSchedule_table_id); + + + if (rowStatus.equals("N")) { + alLoanDisbursementDetailBeanNew.add(oLoanDisbursementDetailBean); + } else { + alLoanDisbursementDetailBeanUpdated.add(oLoanDisbursementDetailBean); + } + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + + + if ((alLoanDisbursementDetailBeanUpdated.size() > 0)) { + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call upsert_loanDisbSchedule(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(LoanDisbursementServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + for (int j = 0; j < alLoanDisbursementDetailBeanUpdated.size(); j++) { + oLoanDisbursementDetailBean = alLoanDisbursementDetailBeanUpdated.get(j); + + proc.setString(1, loanAccHdr2); + proc.setString(2, oLoanDisbursementDetailBean.getDisburseMonthAmend()); + proc.setString(3, oLoanDisbursementDetailBean.getDisburseAmtAmend()); + proc.setString(4, oLoanDisbursementDetailBean.getDescDisburseAmend()); + proc.setString(5, oLoanDisbursementDetailBean.getAmtRemainAmend()); + proc.setString(6, oLoanDisbursementDetailBean.getDisbSchedule_table_id()); + proc.setString(7, "Update"); + proc.addBatch(); + } + + proc.executeBatch(); + message = "Loan Disbursement Schedule updated with Loan Account No." + loanAccHdr2; + + } catch (SQLException ex) { + try { + // con.rollback(); + + SuccessFlag = BatchExecutionFailedOperationObject.BatchExecutionFailedOperation("LoanDisbursement.jsp", loanAccHdr2); + + message = ex.toString(); + + + } catch (Exception ex1) { + // Logger.getLogger(LoanDisbursementServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(LoanDisbursementServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(LoanDisbursementServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + + + + if ((alLoanDisbursementDetailBeanNew.size() > 0)) { + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{call upsert_loanDisbSchedule(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(LoanDisbursementServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + for (int j = 0; j < alLoanDisbursementDetailBeanNew.size(); j++) { + oLoanDisbursementDetailBean = new LoanDisbursementDetailBean(); + oLoanDisbursementDetailBean = alLoanDisbursementDetailBeanNew.get(j); + + proc.setString(1, loanAccHdr2); + proc.setString(2, oLoanDisbursementDetailBean.getDisburseMonthAmend()); + proc.setString(3, oLoanDisbursementDetailBean.getDisburseAmtAmend()); + proc.setString(4, oLoanDisbursementDetailBean.getDescDisburseAmend()); + proc.setString(5, oLoanDisbursementDetailBean.getAmtRemainAmend()); + proc.setString(6, oLoanDisbursementDetailBean.getDisbSchedule_table_id()); + proc.setString(7, "Create"); + proc.addBatch(); + } + proc.executeBatch(); + message = "Loan Disbursement Schedule updated with Loan Account No." + loanAccHdr2; + } catch (SQLException ex) { + try { + // con.rollback(); + + SuccessFlag = BatchExecutionFailedOperationObject.BatchExecutionFailedOperation("LoanDisbursement.jsp", loanAccHdr2); + + message = ex.toString(); + + + } catch (Exception ex1) { + // Logger.getLogger(LoanDisbursementServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(LoanDisbursementServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(LoanDisbursementServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Loan/LoanDisbursement.jsp").forward(request, response); + } + + + + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/LoanPrincipalAdjustmentServlet.java b/IPKS_Updated/src/src/java/Controller/LoanPrincipalAdjustmentServlet.java new file mode 100644 index 0000000..2a02af0 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/LoanPrincipalAdjustmentServlet.java @@ -0,0 +1,82 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import Dao.LoanPrincipalAdjustmentDao; +import DataEntryBean.ChequeDetailsBean; +import java.io.IOException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +public class LoanPrincipalAdjustmentServlet extends HttpServlet{ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = (String)session.getAttribute("user"); + LoanPrincipalAdjustmentDao aiDao = new LoanPrincipalAdjustmentDao(); + String result = null; + + + try{ + + // String accNo = request.getParameter("accNo"); + // String newPrincipal = request.getParameter("newPrincipal"); + // String bglAccNo = request.getParameter("bglAccNo"); + // String narration = request.getParameter("narration"); + result = aiDao.loanPrinAdjProc(pacsId, accNo, bglAccNo, newPrincipal, tellerId, narration); + + request.setAttribute("message1", result); + // request.getRequestDispatcher("/Loan/LoanPrincipalAdjustment.jsp").forward(request, response); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + request.setAttribute("message1", "Error occured. Please try again"); + // request.getRequestDispatcher("/Loan/LoanPrincipalAdjustment.jsp").forward(request, response); + + } finally { + System.out.println("Processing done."); + request.getRequestDispatcher("/Loan/LoanPrincipalAdjustment.jsp").forward(request, response); + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/LoanProductCreationServlet.java b/IPKS_Updated/src/src/java/Controller/LoanProductCreationServlet.java new file mode 100644 index 0000000..72d9894 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/LoanProductCreationServlet.java @@ -0,0 +1,377 @@ +package Controller; + +import DataEntryBean.LoanProductCreationBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author Tcs Helpdesk10 + */ +public class LoanProductCreationServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + Connection con = null; + CallableStatement proc = null; + String message = ""; + + //String ServletName = request.getParameter("handle_id"); + + LoanProductCreationBean oLoanProductCreationBean = new LoanProductCreationBean(); + + if ("Create".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oLoanProductCreationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(LoanProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(LoanProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_loan_product(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(LoanProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oLoanProductCreationBean.getProductcode()); + proc.setString(2, oLoanProductCreationBean.getInttcategory()); + proc.setString(3, oLoanProductCreationBean.getProductname()); + proc.setString(4, oLoanProductCreationBean.getProductdescription()); + proc.setString(5, oLoanProductCreationBean.getIntcatdescription()); + proc.setString(6, oLoanProductCreationBean.getSegmentCode()); + proc.setString(7, "0"); //null glCode + proc.setString(8, oLoanProductCreationBean.getStatus()); + proc.setString(9, oLoanProductCreationBean.getIntrate()); + proc.setString(10, oLoanProductCreationBean.getInttfrequency()); + proc.setString(11, oLoanProductCreationBean.getInttmethod()); + proc.setString(12, oLoanProductCreationBean.getInttcapfrequency()); + proc.setString(13, oLoanProductCreationBean.getInt_app_method()); + proc.setString(14, oLoanProductCreationBean.getPen_intt_rt()); + proc.setString(15, oLoanProductCreationBean.getPen_intt_method()); + proc.setString(16, oLoanProductCreationBean.getPen_inttcapfrequency()); + proc.setString(17, null); + proc.setString(18, oLoanProductCreationBean.getMinDisbrs()); + proc.setString(19, oLoanProductCreationBean.getMaxDisbrs()); + proc.setString(20, oLoanProductCreationBean.getMinRepay()); + proc.setString(21, oLoanProductCreationBean.getMaxRepay()); + proc.setString(22, oLoanProductCreationBean.getMinTerm()); + proc.setString(23, oLoanProductCreationBean.getMaxTerm()); + proc.setString(24, oLoanProductCreationBean.getMinSancAmt()); + proc.setString(25, oLoanProductCreationBean.getMaxSancAmt()); + proc.setString(26, oLoanProductCreationBean.getDebitComp1()); + proc.setString(27, oLoanProductCreationBean.getDebitComp2()); + proc.setString(28, oLoanProductCreationBean.getEffectDate()); + proc.setString(29, oLoanProductCreationBean.getPenGracePr()); + proc.setString(30, oLoanProductCreationBean.getSecurity()); + proc.setString(31, oLoanProductCreationBean.getGuarantor()); + proc.setString(32, oLoanProductCreationBean.getRepayFrequency()); + proc.setString(33, ServletName); + proc.setString(34, oLoanProductCreationBean.getLoanType()); + proc.setString(35, oLoanProductCreationBean.getGlCodeInttReceivable()); + proc.setString(36, oLoanProductCreationBean.getGlCodeInttReceived()); + proc.setString(37, oLoanProductCreationBean.getHeadAccType()); + proc.registerOutParameter(38, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(38); + + } catch (SQLException ex) { + try { + // con.rollback(); + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (Exception ex1) { + // Logger.getLogger(LoanProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Loan/LoanProductCreation.jsp").forward(request, response); + + } + + } else if ("Search".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oLoanProductCreationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(LoanProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(LoanProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + Connection connection = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + try { + // connection.rollback(); + } catch (Exception ex1) { + // Logger.getLogger(LoanProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + } + try { + + // ResultSet rs = statement.executeQuery("select id,prod_code,int_cat,prod_name,prod_desc, intt_cat_desc,segment_code, gl_prod_id, status, intt_rate, intt_freq, int_method, int_cap_freq," + + "int_app_method, min_sanc_amt, max_sanc_amt, to_char(effec_dt,'dd/mm/yyyy') as effec_dt, pen_int_rate, pen_intt_freq, pen_int_method, pen_grace_period," + + "debit_comp1, debit_comp2, max_disb, min_disb, max_rep, min_rep, max_term, min_term,GUARANTOR,SECURITY,repay_freq,LOAN_TYPE,GL_ID_INTT_RCVBL,GL_ID_INTT_RCVD,head_acc_type " + + " from loan_product dp" + + " where int_cat= '" + oLoanProductCreationBean.getIntcatSearch() + "' AND prod_code='" + oLoanProductCreationBean.getProductcodeSearch() + "'"); + + while (rs.next()) { + + oLoanProductCreationBean.setLoanPd_id(rs.getString("id")); + oLoanProductCreationBean.setProductcode(rs.getString("prod_code")); + oLoanProductCreationBean.setInttcategory(rs.getString("int_cat")); + oLoanProductCreationBean.setProductname(rs.getString("prod_name")); + oLoanProductCreationBean.setProductdescription(rs.getString("prod_desc")); + oLoanProductCreationBean.setIntcatdescription(rs.getString("intt_cat_desc")); + oLoanProductCreationBean.setSegmentCode(rs.getString("segment_code")); + oLoanProductCreationBean.setGlCode(rs.getString("gl_prod_id")); + oLoanProductCreationBean.setStatus(rs.getString("status")); + oLoanProductCreationBean.setIntrate(rs.getString("intt_rate")); + oLoanProductCreationBean.setInttfrequency(rs.getString("intt_freq")); + oLoanProductCreationBean.setInttmethod(rs.getString("int_method")); + oLoanProductCreationBean.setInttcapfrequency(rs.getString("INT_CAP_FREQ")); + oLoanProductCreationBean.setInt_app_method(rs.getString("int_app_method")); + oLoanProductCreationBean.setMinSancAmt(rs.getString("min_sanc_amt")); + oLoanProductCreationBean.setMaxSancAmt(rs.getString("max_sanc_amt")); + oLoanProductCreationBean.setEffectDate(rs.getString("effec_dt")); + oLoanProductCreationBean.setPen_intt_rt(rs.getString("pen_int_rate")); + oLoanProductCreationBean.setPen_inttcapfrequency(rs.getString("pen_intt_freq")); + oLoanProductCreationBean.setPen_intt_method(rs.getString("pen_int_method")); + oLoanProductCreationBean.setPenGracePr(rs.getString("pen_grace_period")); + oLoanProductCreationBean.setMaxDisbrs(rs.getString("max_disb")); + oLoanProductCreationBean.setMinDisbrs(rs.getString("min_disb")); + oLoanProductCreationBean.setMaxRepay(rs.getString("max_rep")); + oLoanProductCreationBean.setMinRepay(rs.getString("min_rep")); + oLoanProductCreationBean.setMaxTerm(rs.getString("max_term")); + oLoanProductCreationBean.setMinTerm(rs.getString("min_term")); + oLoanProductCreationBean.setDebitComp1(rs.getString("debit_comp1")); + oLoanProductCreationBean.setDebitComp2(rs.getString("debit_comp2")); + oLoanProductCreationBean.setGuarantor(rs.getString("GUARANTOR")); + oLoanProductCreationBean.setSecurity(rs.getString("SECURITY")); + oLoanProductCreationBean.setRepayFrequency(rs.getString("repay_freq")); + oLoanProductCreationBean.setLoanType(rs.getString("LOAN_TYPE")); + oLoanProductCreationBean.setGlCodeInttReceivable(rs.getString("GL_ID_INTT_RCVBL")); + oLoanProductCreationBean.setGlCodeInttReceived(rs.getString("GL_ID_INTT_RCVD")); + oLoanProductCreationBean.setHeadAccType(rs.getString("head_acc_type")); + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + } + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + + // Logger.getLogger(LoanProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + if (SeachFound == 0) { + message = "Product Code or Interest Category not exists in the system"; + request.setAttribute("message", message); + } + + request.setAttribute("oLoanProductCreationBeanObj", oLoanProductCreationBean); + request.getRequestDispatcher("/Loan/LoanProductCreation.jsp").forward(request, response); + + } else if ("Update".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oLoanProductCreationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(LoanProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(LoanProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_loan_product(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(LoanProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oLoanProductCreationBean.getProductcodeAmend()); + proc.setString(2, oLoanProductCreationBean.getInttcategoryAmend()); + proc.setString(3, oLoanProductCreationBean.getProductnameAmend()); + proc.setString(4, oLoanProductCreationBean.getProductdescriptionAmend()); + proc.setString(5, oLoanProductCreationBean.getIntcatdescriptionAmend()); + proc.setString(6, oLoanProductCreationBean.getSegmentCodeAmend()); + proc.setString(7, oLoanProductCreationBean.getGlCodeAmend()); + proc.setString(8, oLoanProductCreationBean.getStatusAmend()); + proc.setString(9, oLoanProductCreationBean.getIntrateAmend()); + proc.setString(10, oLoanProductCreationBean.getInttfrequencyAmend()); + proc.setString(11, oLoanProductCreationBean.getInttmethodAmend()); + proc.setString(12, oLoanProductCreationBean.getInttcapfrequencyAmend()); + proc.setString(13, oLoanProductCreationBean.getInt_app_methodAmend()); + proc.setString(14, oLoanProductCreationBean.getPen_intt_rtAmend()); + proc.setString(15, oLoanProductCreationBean.getPen_intt_methodAmend()); + proc.setString(16, oLoanProductCreationBean.getPen_inttcapfrequencyAmend()); + proc.setString(17, null); + proc.setString(18, oLoanProductCreationBean.getMinDisbrsAmend()); + proc.setString(19, oLoanProductCreationBean.getMaxDisbrsAmend()); + proc.setString(20, oLoanProductCreationBean.getMinRepayAmend()); + proc.setString(21, oLoanProductCreationBean.getMaxRepayAmend()); + proc.setString(22, oLoanProductCreationBean.getMinTermAmend()); + proc.setString(23, oLoanProductCreationBean.getMaxTermAmend()); + proc.setString(24, oLoanProductCreationBean.getMinSancAmtAmend()); + proc.setString(25, oLoanProductCreationBean.getMaxSancAmtAmend()); + proc.setString(26, oLoanProductCreationBean.getDebitComp1Amend()); + proc.setString(27, oLoanProductCreationBean.getDebitComp2Amend()); + proc.setString(28, oLoanProductCreationBean.getEffectDateAmend()); + + proc.setString(29, oLoanProductCreationBean.getPenGracePrAmend()); + proc.setString(30, oLoanProductCreationBean.getSecurityAmend()); + proc.setString(31, oLoanProductCreationBean.getGuarantorAmend()); + proc.setString(32, oLoanProductCreationBean.getRepayFrequencyAmend()); + proc.setString(33, ServletName); + proc.setString(34, oLoanProductCreationBean.getLoanTypeAmend()); + proc.setString(35, oLoanProductCreationBean.getGlCodeInttReceivableAmend()); + proc.setString(36, oLoanProductCreationBean.getGlCodeInttReceivedAmend()); + proc.setString(37, oLoanProductCreationBean.getHeadAccTypeAmend()); + proc.registerOutParameter(38, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(38); + + } catch (SQLException ex) { + try { + // con.rollback(); + } catch (Exception ex1) { + // Logger.getLogger(LoanProductCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Loan/LoanProductCreation.jsp").forward(request, response); + + } + + } + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + + + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/LoanRepaymentScheduleServlet.java b/IPKS_Updated/src/src/java/Controller/LoanRepaymentScheduleServlet.java new file mode 100644 index 0000000..19a422f --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/LoanRepaymentScheduleServlet.java @@ -0,0 +1,337 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.LoanDisbursementHdrBean; +import DataEntryBean.LoanRepaymentScheduleBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import oracle.jdbc.OracleTypes; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 986137 + */ +public class LoanRepaymentScheduleServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + ResultSet resultset = null; + Statement statement = null; + ResultSet rs = null; + String message = ""; + String loanAcc = ""; + int searchFound = 0; + //String loanAccNo = request.getParameter("loanAcc"); + + String ServletName = request.getParameter("handle_id"); + String pacsId = (String) session.getAttribute("pacsId"); + + //LoanDisbursementHdrBean oLoanDisbursementHdrBean = new LoanDisbursementHdrBean(); + LoanRepaymentScheduleBean oLoanRepaymentScheduleBean = new LoanRepaymentScheduleBean(); + LoanRepaymentScheduleBean oLoanRepaymentScheduleBean1 = new LoanRepaymentScheduleBean(); + ArrayList alLoanRepaymentScheduleBean = new ArrayList(); + BatchExecutionFailedOperation BatchExecutionFailedOperationObject = new BatchExecutionFailedOperation(); + boolean SuccessFlag; + + + //For Pagination + + int page = 1; + int recordsPerPage = 10; + String butType = request.getParameter("but_type"); + if (request.getParameter("page") != null + && !(request.getParameter("page").equals("")) && !(request.getParameter("page").equals("null"))) { + // page = Integer.parseInt(request.getParameter("page")); + if (null != butType && !(butType.equals(""))) { + if (butType.equals("N")) { + page = page + 1; + } else { + page = page - 1; + } + } + + } + + int startRow = 0; + int endRow = 0; + startRow = (page - 1) * recordsPerPage + 1; + endRow = page * recordsPerPage; + int recordCount = 0; + int totalRecordCount = 0; + // totalRecordCount = Integer.parseInt(request.getParameter("totalRecordCount")); + + //End of pagination + + + + try { + // BeanUtils.populate(oLoanRepaymentScheduleBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(AssetMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(AssetMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + if ("generate".equalsIgnoreCase(ServletName)) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call operations.GEN_REPAY_SCHEDULE(?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(AssetMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oLoanRepaymentScheduleBean.getLoanAcc()); + proc.setString(2, oLoanRepaymentScheduleBean.getLoanTerms()); + proc.setString(3, oLoanRepaymentScheduleBean.getSanctionedAmt()); + proc.setString(4, oLoanRepaymentScheduleBean.getLoanRepYYYYMM()); + proc.registerOutParameter(5, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(5); + loanAcc = oLoanRepaymentScheduleBean.getLoanAcc(); + oLoanRepaymentScheduleBean.setLoanAcc(request.getParameter("loanAcc")); + oLoanRepaymentScheduleBean.setLoanRepYYYYMM(request.getParameter("loanRepYYYYMM")); + + } catch (SQLException ex) { + try { + // con.rollback(); + + } catch (Exception ex1) { + // Logger.getLogger(LoanDisbursementServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(LoanRepaymentScheduleServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(LoanRepaymentScheduleServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + } + + } else if ("viewschedule".equalsIgnoreCase(ServletName)) { + + + con = DbHandler.getDBConnection(); + + try { + statement = con.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(LoanDisbursementServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + String query = "select h.key_1,h.customer_no," + + "(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name," + + "p.prod_desc,h.outst_bal,h.sanction_amt,to_char(h.sanc_dt,'dd-MON-yyyy') as sanc_dt," + + "p.intt_cat_desc,h.term, to_char(h.due_dt,'DD/MM/YYYY') from loan_account h,kyc_hdr t,loan_product p " + + "where h.customer_no = t.cif_no and h.loan_prod_id = p.id and h.key_1 ='" + loanAccNo + "' and h.PACS_ID = '" + pacsId + "'"; + try { + // resultset = statement.executeQuery(query); + + while (resultset.next()) { + oLoanRepaymentScheduleBean1.setLoanAccountNumber(resultset.getString(1)); + oLoanRepaymentScheduleBean1.setCifNo(resultset.getString(2)); + oLoanRepaymentScheduleBean1.setCustomerName(resultset.getString(3)); + oLoanRepaymentScheduleBean1.setProductDesc(resultset.getString(4)); + oLoanRepaymentScheduleBean1.setLoanOutStd(resultset.getString(5)); + oLoanRepaymentScheduleBean1.setApprvedAmt(resultset.getString(6)); + oLoanRepaymentScheduleBean1.setApprvedDate(resultset.getString(7)); + oLoanRepaymentScheduleBean1.setInttCatDesc(resultset.getString(8)); + oLoanRepaymentScheduleBean1.setLoanTerm(resultset.getString(9)); + oLoanRepaymentScheduleBean1.setDueDate(resultset.getString(10)); + + searchFound = 1; + request.setAttribute("displayFlag1", "Y"); + + } + + statement.close(); + resultset.close(); + + } catch (SQLException ex) { + // Logger.getLogger(LoanDisbursementServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + try { + proc = con.prepareCall("{ call ENQUIRY.view_Loan_RepaySchedule(?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(Asset_EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oLoanRepaymentScheduleBean.getLoanAcc()); + proc.setString(2, oLoanRepaymentScheduleBean.getLoanRepYYYYMM()); + proc.setString(3, pacsId); + proc.setInt(4, startRow); + proc.setInt(5, endRow); + proc.registerOutParameter(6, OracleTypes.CURSOR); + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + proc.registerOutParameter(8, java.sql.Types.INTEGER); + proc.executeUpdate(); + + // rs = (ResultSet) proc.getObject(6); + // recordCount = proc.getInt(8); + if (!rs.isBeforeFirst()) { + request.setAttribute("displayFlag", "N"); + } else { + + while (rs.next()) { + searchFound = 1; + oLoanRepaymentScheduleBean = new LoanRepaymentScheduleBean(); + oLoanRepaymentScheduleBean.setRepYYYYMM(rs.getString("REPAY_YYYYMM")); + oLoanRepaymentScheduleBean.setEmiAmt(rs.getString("EMI")); + oLoanRepaymentScheduleBean.setInttAmt(rs.getString("INTT")); + oLoanRepaymentScheduleBean.setPrincAmt(rs.getString("PRN_AMT")); + oLoanRepaymentScheduleBean.setPrincOutStd(rs.getString("PRN_OTD")); + + oLoanRepaymentScheduleBean.setOpenBal(rs.getString("opening_bal")); + oLoanRepaymentScheduleBean.setCloseBal(rs.getString("closing_bal")); + oLoanRepaymentScheduleBean.setInstallNo(rs.getString("install_no")); + + + + alLoanRepaymentScheduleBean.add(oLoanRepaymentScheduleBean); + + request.setAttribute("displayFlag", "Y"); + + } + + } + //For pagination + + int noOfRecords = alLoanRepaymentScheduleBean.size(); + int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage); + + request.setAttribute("noOfPages", noOfPages); + request.setAttribute("currentPage", page); + request.setAttribute("totalRecordCount", totalRecordCount); + request.setAttribute("recordCount", recordCount); + request.setAttribute("noOfRecords", noOfRecords); + + //End Of Pagination + + oLoanRepaymentScheduleBean = new LoanRepaymentScheduleBean(); + + // oLoanRepaymentScheduleBean.setLoanAcc(request.getParameter("loanAcc")); + // oLoanRepaymentScheduleBean.setLoanRepYYYYMM(request.getParameter("loanRepYYYYMM")); + + + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + rs.close(); + } catch (SQLException ex) { + // Logger.getLogger(LoanRepaymentScheduleServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during result close."); + } + + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + if (searchFound == 0) { + message = "No data exists for selected item"; + request.setAttribute("message", message); + } + + request.setAttribute("oLoanRepaymentScheduleBean1", oLoanRepaymentScheduleBean1); + request.setAttribute("oLoanRepaymentScheduleBean", oLoanRepaymentScheduleBean); + request.setAttribute("alLoanRepaymentScheduleBean", alLoanRepaymentScheduleBean); + request.setAttribute("message", message); + } + + request.getRequestDispatcher("/Loan/LoanRepayment.jsp").forward(request, response); + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/LoanServlet.java b/IPKS_Updated/src/src/java/Controller/LoanServlet.java new file mode 100644 index 0000000..7708641 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/LoanServlet.java @@ -0,0 +1,78 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 986137 + */ +public class LoanServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + // session.setAttribute("moduleName", "Loan"); + + if( String.valueOf(session.getAttribute("moduleName")).equalsIgnoreCase("SpecialBothLoan") || String.valueOf(session.getAttribute("moduleName")).equalsIgnoreCase("SpecialBothDep")) + session.setAttribute("moduleName", "SpecialBothLoan"); + else if(!String.valueOf(session.getAttribute("moduleName")).equalsIgnoreCase("SpecialKcc") ) + session.setAttribute("moduleName", "Loan"); + + request.getRequestDispatcher("/welcome.jsp").forward(request, response); + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/LoanTransactionOperationServlet.java b/IPKS_Updated/src/src/java/Controller/LoanTransactionOperationServlet.java new file mode 100644 index 0000000..54c996b --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/LoanTransactionOperationServlet.java @@ -0,0 +1,214 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.transactionOperationBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 1000974 + */ +public class LoanTransactionOperationServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet LoanTransactionOperationServlet"); + out.println(""); + out.println(""); + out.println("

Servlet LoanTransactionOperationServlet at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String Account_type = ""; + HttpSession session = request.getSession(); + String transferAcc= ""; + + transactionOperationBean otransactionOperationBean = new transactionOperationBean(); + + try { + // BeanUtils.populate(otransactionOperationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + + proc = con.prepareCall("{ call operations.Post_Loan_TXN_authorization(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + + } catch (SQLException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + String pacsId = session.getAttribute("pacsId").toString(); + String makerId = session.getAttribute("user").toString(); + // String twothouIN = (String) request.getParameter("twothouIN") == "" ? "0" : (request.getParameter("twothouIN")); + // String twothouOUT = request.getParameter("twothouOUT") == "" ? "0" : (request.getParameter("twothouOUT")); + // String fivehundredIN = request.getParameter("fivehundredIN") == "" ? "0" : (request.getParameter("fivehundredIN")); + // String fivehundredOUT = request.getParameter("fivehundredOUT") == "" ? "0" : (request.getParameter("fivehundredOUT")); + // String hundredIN = request.getParameter("hundredIN") == "" ? "0" : (request.getParameter("hundredIN")); + // String hundredOUT = request.getParameter("hundredOUT") == "" ? "0" : (request.getParameter("hundredOUT")); + // String fiftyIN = request.getParameter("fiftyIN") == "" ? "0" : (request.getParameter("fiftyIN")); + // String fiftyOUT = request.getParameter("fiftyOUT") == "" ? "0" : (request.getParameter("fiftyOUT")); + // String twentyIN = request.getParameter("twentyIN") == "" ? "0" : (request.getParameter("twentyIN")); + // String twentyOUT = request.getParameter("twentyOUT") == "" ? "0" : (request.getParameter("twentyOUT")); + // String tenIN = request.getParameter("tenIN") == "" ? "0" : (request.getParameter("tenIN")); + // String tenOUT = request.getParameter("tenOUT") == "" ? "0" : (request.getParameter("tenOUT")); + // String fiveIN = request.getParameter("fiveIN") == "" ? "0" : (request.getParameter("fiveIN")); + // String fiveOUT = request.getParameter("fiveOUT") == "" ? "0" : (request.getParameter("fiveOUT")); + // String twoIN = request.getParameter("twoIN") == "" ? "0" : (request.getParameter("twoIN")); + // String twoOUT = request.getParameter("twoOUT") == "" ? "0" : (request.getParameter("twoOUT")); + // String oneIN = request.getParameter("oneIN") == "" ? "0" : (request.getParameter("oneIN")); + // String oneOUT = request.getParameter("oneOUT") == "" ? "0" : (request.getParameter("oneOUT")); + // String fiftyPaisaIN = request.getParameter("fiftyPaisaIN") == "" ? "0" : (request.getParameter("fiftyPaisaIN")); + // String fiftyPaisaOUT = request.getParameter("fiftyPaisaOUT") == "" ? "0" : (request.getParameter("fiftyPaisaOUT")); + // String onePaisaIN = request.getParameter("onePaisaIN") == "" ? "0" : (request.getParameter("onePaisaIN")); + // String onePaisaOUT = request.getParameter("onePaisaOUT") == "" ? "0" : (request.getParameter("onePaisaOUT")); + // String twohundredIN = request.getParameter("twohundredIN") == "" ? "0" : (request.getParameter("twohundredIN")); + // String twohundredOUT = request.getParameter("twohundredOUT") == "" ? "0" : (request.getParameter("twohundredOUT")); + // String memberId=request.getParameter("memberId"); + + if(otransactionOperationBean.getTranType().equalsIgnoreCase("T")){ + transferAcc = otransactionOperationBean.getTransferAcc(); + }else{ + transferAcc=""; + } + proc.setString(1, pacsId); + proc.setString(2, makerId); + proc.setString(3, otransactionOperationBean.getTranType()); + proc.setString(4, otransactionOperationBean.getAccNo()); + proc.setString(5, otransactionOperationBean.getTrAmount()); + proc.setString(6, otransactionOperationBean.getChargeToDeduct()); + proc.setString(7, otransactionOperationBean.getNarration()); + proc.setString(8, transferAcc); + proc.setString(9, twothouIN); + proc.setString(10, fivehundredIN); + proc.setString(11, hundredIN); + proc.setString(12, fiftyIN); + proc.setString(13, twentyIN); + proc.setString(14, tenIN); + proc.setString(15, fiveIN); + proc.setString(16, twoIN); + proc.setString(17, oneIN); + proc.setString(18, fiftyPaisaIN); + proc.setString(19, onePaisaIN); + proc.setString(20, twothouOUT); + proc.setString(21, fivehundredOUT); + proc.setString(22, hundredOUT); + proc.setString(23, fiftyOUT); + proc.setString(24, twentyOUT); + proc.setString(25, tenOUT); + proc.setString(26, fiveOUT); + proc.setString(27, twoOUT); + proc.setString(28, oneOUT); + proc.setString(29, fiftyPaisaOUT); + proc.setString(30, onePaisaOUT); + proc.setString(31, memberId); + proc.registerOutParameter(32, java.sql.Types.VARCHAR); + proc.registerOutParameter(33, java.sql.Types.VARCHAR); + proc.setString(34, twohundredIN); + proc.setString(35, twohundredOUT); + + proc.execute(); + + Account_type = proc.getString(32); + // message = proc.getString(33); + + } catch (SQLException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Loan/LoanTransactionOperation.jsp").forward(request, response); + } + + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/LoginServlet.java b/IPKS_Updated/src/src/java/Controller/LoginServlet.java new file mode 100644 index 0000000..faa4c13 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/LoginServlet.java @@ -0,0 +1,366 @@ +package Controller; + +import Dao.LoginDao; +import java.io.IOException; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import LoginDb.*; +import java.io.PrintWriter; +import javax.servlet.http.HttpSession; +import java.sql.*; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +public class LoginServlet extends HttpServlet { + + public static Map sesssionMap = new ConcurrentHashMap(); + + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + //no code + } finally { + out.close(); + } + } + + public LoginServlet() { + super(); + } + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + + // String user = request.getParameter("UID"); + // String pass = request.getParameter("PWD"); + // String pacsId = request.getParameter("PACSID"); + // String moduleName = request.getParameter("moduleName"); + + session.setAttribute("user", user); + session.setAttribute("pass", pass); + session.setAttribute("pacsId", pacsId); + session.setAttribute("moduleName", moduleName); + + String Mobile = null; //added on 29/8/24 + String UserName = null; + String pacsName = null; + String Login_flag = null; + String userRole = null; + String RoleName = null; + String subPacsFlag = null; + String headPacsId = null; + String pwdExpireyFlag = null; + String holidayList = ""; + String sysIP = ""; + String userAgent = ""; + String kccBalanceTransfer = ""; + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + String privResult = null; + String eodStatus = null ; // Added on 01/08/2024 due to EOD enhancement; + String returnMessage = null; // Added on 29/09/2024 for broadcast message; + connection = DbHandler.getDBConnection(); + + LoginDao lDao = null; + int result = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(LoginServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + //added by Bishnu to validate mobile login for Non-DDS + userAgent = request.getHeader("User-Agent"); + System.out.println("user content: " + userAgent); + + //if (!userAgent.contains("Firefox")) { + //System.out.println("Kindly use Firefox browser."); + //request.setAttribute("error", "Login is allowed from Firefox browser only."); + //(request.getRequestDispatcher("/Login.jsp")).forward(request, response);} + if (userAgent.contains("Tablet") || userAgent.contains("Mobile") || userAgent.contains("x86_64") || userAgent.contains("X11")) { + System.out.println("Unauthorized login occurred."); + request.setAttribute("error", "Login from unauthorized device is not allowed."); + (request.getRequestDispatcher("/Login.jsp")).forward(request, response); + } else { + if (request != null) { + sysIP = request.getHeader("X-FORWARDED-FOR"); + if (sysIP == null || "".equals(sysIP)) { + sysIP = request.getRemoteAddr(); + } + } + System.out.println(sysIP); + + if (user == null || user.length() == 0 || pass == null || pass.length() == 0) { + + request.setAttribute("error", "Username & Password cannot be empty."); + + } else { + try { + //pass = LoginDb.passwordEncryption.Encr_pass(pass, "SECRETKEY"); + + pass = LoginDb.SimpleCrypt.doEnrcypt(pass); + // String[] ans = new DbConnection().validateUserLogin(request.getParameter("UID"), request.getParameter("PWD"), request.getParameter("PACSID")); + + String UsrPass = ans[0]; //** addded by Bishnu to verify Static IP address **// + String IPAddress = ans[1]; + String IPflag = ans[2]; + String pacs = ans[3]; + + if (pacs == "") { + request.setAttribute("error", "Invalid credentials provided."); + request.getRequestDispatcher("/Login.jsp").forward(request, response); + } else if (IPflag.equals("Y") && IPAddress == null) { + request.setAttribute("error", "Your System IP is not registered."); + request.getRequestDispatcher("/Login.jsp").forward(request, response); + } // else if (!pacs.equals(pacsId)) { + // request.setAttribute("error", "Invalid PACS ID/ Bank ID."); + // request.getRequestDispatcher("/Login.jsp").forward(request, response); + // } + else { + if (IPflag.equals("N") || (IPAddress.equals(sysIP) && IPflag.equals("Y"))) { + + if (UsrPass.equals(pass)) { + + try { + + //ResultSet rs = statement.executeQuery("select l.user_role_id,s.role_name, l.login_name as login_name,p.pacs_name as pacs_name,l.first_login_flag,l.IS_PWD_EXPIRED,p.sub_pacs_flag,p.head_pacs_id from login_details l,pacs_master p,sys_roles s where l.password='" + pass + "' and l.login_id='" + user + "' and l.pacs_id='" + pacsId + "' and l.pacs_id=p.pacs_id and s.id=l.user_role_id "); + // ResultSet rs = statement.executeQuery("select l.user_role_id, l.mobile_no, s.role_name, l.login_name as login_name,p.pacs_name as pacs_name,l.first_login_flag,l.IS_PWD_EXPIRED,p.sub_pacs_flag,p.head_pacs_id from login_details l,pacs_master p,sys_roles s where l.password='" + pass + "' and l.login_id='" + user + "' and l.pacs_id='" + pacsId + "' and l.pacs_id=p.pacs_id and s.id=l.user_role_id ");//added on 29/8/24 + while (rs.next()) { + + UserName = rs.getString("login_name"); + pacsName = rs.getString("pacs_name"); + Login_flag = rs.getString("first_login_flag"); + userRole = rs.getString("user_role_id"); + RoleName = rs.getString("role_name"); + subPacsFlag = rs.getString("sub_pacs_flag"); + headPacsId = rs.getString("head_pacs_id"); + pwdExpireyFlag = rs.getString("IS_PWD_EXPIRED"); + Mobile = rs.getString("mobile_no");//added on 29/8/24 + } + + } catch (SQLException ex) { + // Logger.getLogger(LoginServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + if (statement != null) { + statement.close(); + } + if (connection != null) { + connection.close(); + } + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + +// session.setAttribute("UserName", UserName); +// session.setAttribute("pacsName", pacsName); +// session.setAttribute("userRole", userRole); +// session.setAttribute("RoleName", RoleName); +// session.setAttribute("subPacsFlag", subPacsFlag); +// session.setAttribute("headPacsId", headPacsId); + //request.getRequestDispatcher("/welcome.jsp").forward(request, response); + if (Login_flag.equalsIgnoreCase("F")) { + //request.getRequestDispatcher("/changePassword.jsp").forward(request, response); + response.sendRedirect("./changePassword_fflag.jsp"); + } else if (pwdExpireyFlag != null && pwdExpireyFlag.equalsIgnoreCase("Y")) { + + //request.getRequestDispatcher("/changePassword.jsp").forward(request, response); + response.sendRedirect("./changePassword_fflag.jsp"); + + } else { + lDao = new LoginDao(); + if (!lDao.checkIfUserLoggedIn(user, pacsId, 1)) { + //chekForLoginTime Call; + privResult = lDao.checkLoginPrivilages(user, pacsId); + //Added on 01/08/2024 for Eod Status + eodStatus = lDao.checkEodStatus(); + System.out.println("EOD Result: "+eodStatus); + returnMessage =lDao.checkBroadcastMessage(); + System.out.println("return message is "+returnMessage); + + if (privResult != null) { + if(eodStatus.equalsIgnoreCase("Success")){ + if (privResult.equalsIgnoreCase("TRUE")) { + result = lDao.insertTotLoginDetails(session); + if (result == 1) { + sesssionMap.put(session.getId(), session); + holidayList = lDao.findHolidayList(pacsId); + session.setAttribute("holidayList", holidayList); + + //Added here for broadcast message + session.setAttribute("returnMessage", returnMessage); + + kccBalanceTransfer = lDao.checkKCCBalanceTransfer(pacsId); + session.setAttribute("kccBalanceTransfer", kccBalanceTransfer); + if (userRole.equalsIgnoreCase("201606000004041")) { + String specialPacs = lDao.checkInterfacePacsOrNot(pacsId); + if (specialPacs != null) { + if (specialPacs.equalsIgnoreCase("NEFT")) { + session.setAttribute("moduleName", "Special"); + } else if (specialPacs.equalsIgnoreCase("KCC")) { + session.setAttribute("moduleName", "SpecialKcc"); + } else if (specialPacs.equalsIgnoreCase("BOTH") && moduleName.equalsIgnoreCase("KCC")) { + session.setAttribute("moduleName", "SpecialBothKcc"); + } else if (specialPacs.equalsIgnoreCase("BOTH")) { + session.setAttribute("moduleName", "SpecialBothDep"); + } + } + } + //added for Two Factor Authentication + connection = DbHandler.getDBConnection(); + statement = connection.createStatement(); + String otpFlag = null; + String configId = null; + String apiKey = null; + try { + ResultSet rs = statement.executeQuery("select CONFIG_ID, API_KEY, OTP_FLAG from USER_MFA_DETAILS where PACS_ID='" + pacsId + "'"); + //System.out.println("query executed successfully fetch otp"); + while (rs.next()) { + otpFlag = rs.getString("OTP_FLAG"); + configId = rs.getString("CONFIG_ID"); + apiKey = rs.getString("API_KEY"); + //System.out.println("debug checkpoint : "otpFlag+" "+configId); + } + + } catch (SQLException ee) { + //ee.printStackTrace(); + } finally { + try { + statement.close(); + connection.close(); + } catch (SQLException ee) { + //System.out.println("Error Occurred during connection close."); + } + } + + if (apiKey != null && configId != null) { + if (otpFlag.equals("N")) { + response.setHeader("Strict-Transport-Security", "max-age=7776000; includeSubdomains"); + session.setAttribute("UserName", UserName); + session.setAttribute("pacsName", pacsName); + session.setAttribute("userRole", userRole); + session.setAttribute("RoleName", RoleName); + session.setAttribute("subPacsFlag", subPacsFlag); + session.setAttribute("headPacsId", headPacsId); + session.setAttribute("Mobile", Mobile);//added on 29/8/24 + response.sendRedirect("./welcome.jsp"); + } else if (otpFlag.equals("Y")) { + OtpUtility ou = new OtpUtility(); + String verifyId = ou.sendOtp(user, pacsId, request, response); + //System.out.println("debug checkpoint : fetched verifyId is "+verifyId); + if (verifyId != null) { + response.setHeader("Strict-Transport-Security", "max-age=7776000; includeSubdomains"); + request.setAttribute("otp_flag", "valid");// added to show otp form in Login.jsp + session.setAttribute("verifyId", verifyId); + + ArrayList list = new ArrayList(); + list.add(UserName); + list.add(pacsName); + list.add(userRole); + list.add(RoleName); + list.add(subPacsFlag); + list.add(headPacsId); + session.setAttribute("list", list); + + request.getRequestDispatcher("/Login.jsp").forward(request, response); + } else { + request.setAttribute("error", "Error in otp generation."); + request.getRequestDispatcher("/Login.jsp").forward(request, response); + session.invalidate(); + } + + } + + } else { + response.setHeader("Strict-Transport-Security", "max-age=7776000; includeSubdomains"); + session.setAttribute("UserName", UserName); + session.setAttribute("pacsName", pacsName); + session.setAttribute("userRole", userRole); + session.setAttribute("RoleName", RoleName); + session.setAttribute("subPacsFlag", subPacsFlag); + session.setAttribute("headPacsId", headPacsId); + session.setAttribute("Mobile", Mobile);//added on 29/8/24 + response.sendRedirect("./welcome.jsp"); + } + + } else { + request.setAttribute("error", "Error in login."); + request.getRequestDispatcher("/Login.jsp").forward(request, response); + } + } else if (privResult.equalsIgnoreCase("HOLIDAY")) { + request.setAttribute("error", "User not authorised to login due to holiday."); + request.getRequestDispatcher("/Login.jsp").forward(request, response); + + } + } + //Added on 01/08/2024 for EOd status check + + else if (eodStatus.equalsIgnoreCase("Failure")){ + request.setAttribute("error", "EOD process not yet completed. Please login after some time."); + request.getRequestDispatcher("/Login.jsp").forward(request, response); + } + + else { + request.setAttribute("error", "User not authorised to login."); + request.getRequestDispatcher("/Login.jsp").forward(request, response); + + } + } else { + request.setAttribute("error", "Error in login."); + request.getRequestDispatcher("/Login.jsp").forward(request, response); + } + } else { + System.out.println("Multiple login found for user :" + user); + request.setAttribute("error", "You are already logged in or your previous session is not properly closed."); + request.getRequestDispatcher("/Login.jsp").forward(request, response); + } + } + } else { + request.setAttribute("error", "Invalid credentials provided."); + request.getRequestDispatcher("/Login.jsp").forward(request, response); + + } + } else { + request.setAttribute("error", "Your System IP is not registered."); + request.getRequestDispatcher("/Login.jsp").forward(request, response); + + } + } + } catch (SQLException e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + + } finally { + System.out.println("Processing done."); + } + } //logic ends + } + } + + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/LogoutServlet.java b/IPKS_Updated/src/src/java/Controller/LogoutServlet.java new file mode 100644 index 0000000..9e1686e --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/LogoutServlet.java @@ -0,0 +1,98 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import Dao.LogOutDao; +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author Administrator + */ +public class LogoutServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet LogoutServlet"); + out.println(""); + out.println(""); + out.println("

Servlet LogoutServlet at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); +// LogOutDao lDao = new LogOutDao(); +// lDao.removeFromLoggedInUsers(session.getId(), (String)session.getAttribute("user"),1); +// lDao=null; + if (session != null) { + session.invalidate(); + } + //getServletContext().getRequestDispatcher("/Login.jsp").forward(request, response); + System.out.println("LogOut completed."); + request.setAttribute("error", "You have logged out successfully."); + (request.getRequestDispatcher("/Login.jsp")).forward(request, response); + //response.sendRedirect("./Login.jsp"); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/MISDashboardSevlet.java b/IPKS_Updated/src/src/java/Controller/MISDashboardSevlet.java new file mode 100644 index 0000000..013777f --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/MISDashboardSevlet.java @@ -0,0 +1,72 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 986137 + */ +public class MISDashboardSevlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + session.setAttribute("moduleName", "dashboard"); + request.getRequestDispatcher("/welcome.jsp").forward(request, response); + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/MainServletCCOD.java b/IPKS_Updated/src/src/java/Controller/MainServletCCOD.java new file mode 100644 index 0000000..3d6a66c --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/MainServletCCOD.java @@ -0,0 +1,183 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import DataEntryBean.*; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.SQLException; +import java.util.Enumeration; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.apache.commons.beanutils.*; +import org.apache.commons.logging.*; +import org.apache.commons.collections.*; +import java.sql.*; +import LoginDb.DbHandler; + + +/** + * + * @author Administrator + */ +public class MainServletCCOD extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet MainServletCCOD"); + out.println(""); + out.println(""); + out.println("

Servlet MainServletCCOD at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + //Taking the servlet name from JSP + String ServletName=request.getParameter("action"); + + CcOdBean oCcOdBean=new CcOdBean(); + + if ("Search".equalsIgnoreCase(ServletName)) + + { + + try { + // BeanUtils.populate(oCcOdBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(MainServletCCOD.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(MainServletCCOD.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection =DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(MainServletCCOD.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + //look at " for table name + // ResultSet rs = statement.executeQuery("select acct_no,cust_name, acc_type, product_desc, sub_category, outstanding, leading_status, intt_accured, per_day_intt, limit_amount, to_char(date_of_limit,'DD-MON-YYYY') as date_of_limit, to_char(npa_date,'DD-MON-YYYY') as npa_date, to_char(limit_expr_date,'DD-MON-YYYY') as limit_expr_date, amt_irregularity, effec_dp, intt_rate, expiry_rate, new_irca_status,LAND_REGISTER from CUST_CC_OD_DTLS where acct_no= '" + oCcOdBean.getAccount_no() + "'"); + + while (rs.next()) + { + + oCcOdBean.setAcc_type(rs.getString("acc_type")); + oCcOdBean.setAccount_no(rs.getString("acct_no")); + oCcOdBean.setAmt_irr(rs.getString("amt_irregularity")); + oCcOdBean.setCust_name(rs.getString("cust_name")); + oCcOdBean.setDaily_int(rs.getString("per_day_intt")); + oCcOdBean.setEff_DP(rs.getString("effec_dp")); + oCcOdBean.setExp_rate(rs.getString("expiry_rate")); + oCcOdBean.setIntt_accrd(rs.getString("intt_accured")); + oCcOdBean.setIntt_rate(rs.getString("intt_rate")); + oCcOdBean.setLend_status(rs.getString("leading_status")); + oCcOdBean.setLim_amt(rs.getString("limit_amount")); + oCcOdBean.setLim_date(rs.getString("date_of_limit")); + oCcOdBean.setLim_exp_dt(rs.getString("limit_expr_date")); + oCcOdBean.setNPA_date(rs.getString("npa_date")); + oCcOdBean.setNew_IRAC(rs.getString("new_irca_status")); + oCcOdBean.setOutstanding(rs.getString("outstanding")); + oCcOdBean.setProd_desc(rs.getString("product_desc")); + oCcOdBean.setSub_cat(rs.getString("sub_category")); + oCcOdBean.setLandRegister(rs.getString("LAND_REGISTER")); + + + + } +// statement.close(); +// connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(MainServletCCOD.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + } + request.setAttribute("oCcOdBeanObj", oCcOdBean); + (request.getRequestDispatcher("/ShowCCODDetails.jsp")).forward(request, response); + + } + + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/Mark_Unmark_NPAOperationsServlet.java b/IPKS_Updated/src/src/java/Controller/Mark_Unmark_NPAOperationsServlet.java new file mode 100644 index 0000000..26542f5 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/Mark_Unmark_NPAOperationsServlet.java @@ -0,0 +1,165 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author LENOVO + */ +public class Mark_Unmark_NPAOperationsServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + Connection con = null; + CallableStatement proc = null; + String message = ""; + //String accno = request.getParameter("accountNumber"); + // String checkOp = request.getParameter("checkOperation"); + String JSP_Name = request.getParameter("screenName"); + if ("mark_unmark_NPA_Operations".equalsIgnoreCase(JSP_Name)) { + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call OPERATIONS.mark_unmark_npa(?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(Mark_Unmark_NPAOperationsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.setString(1, accno); + proc.setString(2, checkOp); + proc.setString(3, pacsId); + proc.registerOutParameter(4, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(4); + + } catch (SQLException ex) { + // Logger.getLogger(Mark_Unmark_NPAOperationsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(Mark_Unmark_NPAOperationsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("mark_unmark_NPA_Operations.jsp").forward(request, response); + + } + + } + else if ("mark_unmark_npa_loan".equalsIgnoreCase(JSP_Name)) { + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call OPERATIONS.mark_unmark_npa_loan(?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(Mark_Unmark_NPAOperationsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.setString(1, accno); + proc.setString(2, checkOp); + proc.setString(3, pacsId); + proc.registerOutParameter(4, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(4); + + } catch (SQLException ex) { + // Logger.getLogger(Mark_Unmark_NPAOperationsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(Mark_Unmark_NPAOperationsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Loan/mark_unmark_npa_loan.jsp").forward(request, response); + + } + } + } + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/MasterEnrollmentServlet.java b/IPKS_Updated/src/src/java/Controller/MasterEnrollmentServlet.java new file mode 100644 index 0000000..7f92fde --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/MasterEnrollmentServlet.java @@ -0,0 +1,281 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.masterRollEnrollmentBean; +//import LoginDb.DbHandler; +import LoginDb.DbHandler; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 1249241 + */ +public class MasterEnrollmentServlet extends HttpServlet { + + private Object session; + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + + Connection con = null; + CallableStatement proc = null; + String message = ""; + + // String ServletName = request.getParameter("handle_id"); + String pacsId = (String) request.getSession().getAttribute("pacsId"); + + masterRollEnrollmentBean masterRollEnrollmentBeanObj = new masterRollEnrollmentBean(); + + if ("Create".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(masterRollEnrollmentBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(MasterEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(MasterEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + String memberId = ""; + try { + proc = con.prepareCall("{ call GPS_Operation.master_enroll_entry(?,?,?,?,?,?,?,?,?,?) }");//change as required + } catch (SQLException ex) { + // Logger.getLogger(MasterEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, masterRollEnrollmentBeanObj.getName()); + proc.setString(2, masterRollEnrollmentBeanObj.getAddress()); + proc.setString(3, masterRollEnrollmentBeanObj.getContactNo()); + proc.setString(4, masterRollEnrollmentBeanObj.getVoter()); + proc.setString(5, masterRollEnrollmentBeanObj.getAdhaar()); + proc.setString(6, masterRollEnrollmentBeanObj.getProduce()); + proc.setString(7, pacsId); + proc.setString(8, ServletName); + proc.setString(9, memberId); + proc.registerOutParameter(10, java.sql.Types.VARCHAR); + proc.execute(); + + // message = proc.getString(10); + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/GPS_JSP/MasterRollEnrollment.jsp").forward(request, response); + + } + } else if ("Search".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(masterRollEnrollmentBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(MasterEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(MasterEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + Connection connection = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + // String memberId = request.getParameter("IdAmend"); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(MasterEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + + // ResultSet rs = statement.executeQuery("select ID,NAME,ADDRESS,CONTACT_NO,VOTER,ADHAAR,PRODUCE_DETAILS from master_roll_enrollment where id='" + memberId + "' and pacs_id= '" + pacsId + "'"); + + while (rs.next()) { + + masterRollEnrollmentBeanObj.setMemberId(rs.getString("ID")); + masterRollEnrollmentBeanObj.setName(rs.getString("NAME")); + masterRollEnrollmentBeanObj.setAddress(rs.getString("ADDRESS")); + masterRollEnrollmentBeanObj.setContactNo(rs.getString("CONTACT_NO")); + masterRollEnrollmentBeanObj.setVoter(rs.getString("VOTER")); + masterRollEnrollmentBeanObj.setAdhaar(rs.getString("ADHAAR")); + masterRollEnrollmentBeanObj.setProduce(rs.getString("PRODUCE_DETAILS")); + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + } + + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(MasterEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + if (SeachFound == 0) { + message = "Member does not exists in the system"; + request.setAttribute("message", message); + } + request.setAttribute("masterRollEnrollmentBeanObj", masterRollEnrollmentBeanObj); + + request.getRequestDispatcher("/GPS_JSP/MasterRollEnrollment.jsp").forward(request, response); + + } else if ("Update".equalsIgnoreCase(ServletName)) { + + try { + //BeanUtils.populate(masterRollEnrollmentBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(MasterEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(MasterEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call GPS_Operation.master_enroll_entry(?,?,?,?,?,?,?,?,?,?) }");// change as required + } catch (SQLException ex) { + // Logger.getLogger(MasterEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, masterRollEnrollmentBeanObj.getName_Amend()); + proc.setString(2, masterRollEnrollmentBeanObj.getAddrAmend()); + proc.setString(3, masterRollEnrollmentBeanObj.getContactnoAmend()); + proc.setString(4, masterRollEnrollmentBeanObj.getVoterAmend()); + proc.setString(5, masterRollEnrollmentBeanObj.getAdhaarAmend()); + proc.setString(6, masterRollEnrollmentBeanObj.getProduceAmend()); + proc.setString(7, pacsId); + proc.setString(8, ServletName); + proc.setString(9, masterRollEnrollmentBeanObj.getMemberId()); + + proc.registerOutParameter(10, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(10); + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/GPS_JSP/MasterRollEnrollment.jsp").forward(request, response); + + } + + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/MemberDetailsServlet.java b/IPKS_Updated/src/src/java/Controller/MemberDetailsServlet.java new file mode 100644 index 0000000..a78319a --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/MemberDetailsServlet.java @@ -0,0 +1,659 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.MemberDetailsBean; +import DataEntryBean.MemberDetailsBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.StringTokenizer; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 986137 + */ +public class MemberDetailsServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + Connection con = null; + CallableStatement proc = null; + String message = ""; + String ScreenStatus = ""; + //String hdrID = ""; + HttpSession session = request.getSession(false); + Integer flag=0; + + // String ServletName = request.getParameter("handle_id"); + String pacsId = (String) session.getAttribute("pacsId"); + + MemberDetailsBean oMemberDetailsBean = new MemberDetailsBean(); + MemberDetailsBean oMemberDetailsBeanObj = new MemberDetailsBean(); + ArrayList alMemberDetailsBean = new ArrayList(); + + + + //For Amend Div + + ArrayList alMemberDetailsBeanNew = new ArrayList(); + ArrayList alMemberDetailsBeanDeleted = new ArrayList(); + ArrayList alMemberDetailsBeanUpdated = new ArrayList(); + + if (ServletName.equalsIgnoreCase("Create")) { + + try { + // BeanUtils.populate(oMemberDetailsBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call SHG_OPERATIONS.upsert_shg_MEMBER_DETAILS(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oMemberDetailsBean.getMale()); + proc.setString(2, oMemberDetailsBean.getFemale()); + proc.setString(3, oMemberDetailsBean.getOther()); + proc.setString(4, oMemberDetailsBean.getTotal()); + proc.setString(5, oMemberDetailsBean.getMuslim()); + proc.setString(6, oMemberDetailsBean.getChristian()); + proc.setString(7, oMemberDetailsBean.getBuddhist()); + proc.setString(8, oMemberDetailsBean.getSikh()); + proc.setString(9, oMemberDetailsBean.getParsi()); + proc.setString(10, oMemberDetailsBean.getJain()); + proc.setString(11, oMemberDetailsBean.getOthers()); + proc.setString(12, oMemberDetailsBean.getShgcode()); + proc.setString(13, ServletName); + proc.registerOutParameter(14, java.sql.Types.VARCHAR); + proc.setString(15, pacsId); + + proc.execute(); + + // message = proc.getString(14); + + if(message.equalsIgnoreCase("Member Details already present for SHG")) + { + flag=1; + } + + + + } catch (SQLException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + } + if(flag==0) + { + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + // String shgcode = request.getParameter("shgcode"); + // String membername = request.getParameter("membername" + i); + // String gender = request.getParameter("gender" + i); + // String dob = request.getParameter("dob" + i); + // String guardianname = request.getParameter("guardianname" + i); + // String address = request.getParameter("address" + i); + //String religion = request.getParameter("religion" + i); + //String caste=request.getParameter("caste"+i); + // String qualification=request.getParameter("qualification"+i); + // String cif=request.getParameter("cif"+i); + + + if (membername != null) { + oMemberDetailsBean = new MemberDetailsBean(); + oMemberDetailsBean.setShgcode(shgcode); + oMemberDetailsBean.setMembername(membername); + oMemberDetailsBean.setGender(gender); + oMemberDetailsBean.setDob(dob); + oMemberDetailsBean.setGuardianname(guardianname); + oMemberDetailsBean.setAddress(address); + oMemberDetailsBean.setReligion(religion); + oMemberDetailsBean.setAddress(address); + oMemberDetailsBean.setReligion(religion); + oMemberDetailsBean.setCaste(caste); + oMemberDetailsBean.setQualification(qualification); + oMemberDetailsBean.setCif(cif); + alMemberDetailsBean.add(oMemberDetailsBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alMemberDetailsBean.size() > 0) && (!message.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call SHG_OPERATIONS.Upsert_member_information (?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + for (int j = 0; j < alMemberDetailsBean.size(); j++) { + + oMemberDetailsBean = alMemberDetailsBean.get(j); + + + proc.setString(1, oMemberDetailsBean.getMemberID()); + proc.setString(2, oMemberDetailsBean.getShgcode()); + proc.setString(3, oMemberDetailsBean.getMemberName()); + proc.setString(4, oMemberDetailsBean.getGender()); + proc.setString(5, oMemberDetailsBean.getDob()); + proc.setString(6, oMemberDetailsBean.getGuardianName()); + proc.setString(7, oMemberDetailsBean.getAddress()); + proc.setString(8, oMemberDetailsBean.getReligion()); + proc.setString(9, ServletName); + proc.setString(10,oMemberDetailsBean.getCaste()); + proc.setString(11,oMemberDetailsBean.getQualification()); + proc.setString(12, pacsId); + proc.setString(13,oMemberDetailsBean.getCif()); + + proc.addBatch(); + + + } + + proc.executeBatch(); + + + } catch (SQLException ex) { + try { + // con.rollback(); + } catch (Exception e1) { + System.out.println(e1.toString()); + } + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Shg_JSP/MemberDetails.jsp").forward(request, response); + + } else if ("Search".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oMemberDetailsBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + /* try { + statement = connection.createStatement(); + } catch (SQLException ex) { + Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + }*/ + try { + oMemberDetailsBeanObj = new MemberDetailsBean(); + + // oMemberDetailsBeanObj.setShgcode(request.getParameter("shgSearch").toString() ); + String shg = request.getParameter("shgSearch").toString(); + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + // statement.close(); + + } catch (Exception ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + }/* + + if (SeachFound == 0) { + message = "Vendor not exists in the system"; + request.setAttribute("message", message); + }*/ + + //For Details Part Populate + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + +// ResultSet rs = statement.executeQuery("select MEMBER_ID,MEMBER_NAME, GENDER, to_char(DOB,'DD/MM/RRRR') as DOB , GUARDIAN_NAME,ADDRESS,RELIGION,CASTE,QUALIFICATION,to_char(ENTRY_DATE,'DD-MON-RRRR') ENTRY_DATE,to_char(AMEND_DATE,'DD-MON-RRRR') AMEND_DATE from MEMBER_INFORMATION mi where SHG_CODE= '" + oMemberDetailsBean.getShgSearch() + "' and mi.shg_id = (select shg_id from basic_info bi where bi.shg_code = '" + oMemberDetailsBean.getShgSearch() + "' and bi.pacs_id = '" +pacsId+ "') "); + // ResultSet rs = statement.executeQuery(" select MEMBER_ID, cif_no, (select trim(first_name || ' ' || middle_name || ' ' || last_name) from kyc_hdr kd where kd.cif_no = mi.cif_no) MEMBER_NAME, (case (select kd.gender from kyc_hdr kd where kd.cif_no = mi.cif_no) when 'M' then 'Male' when 'F' then 'Female' else 'Other' end) GENDER, (select kd.birth_date from kyc_hdr kd where kd.cif_no = mi.cif_no) as DOB, (select trim(kd.guardian_name) from kyc_hdr kd where kd.cif_no = mi.cif_no) GUARDIAN_NAME, (select trim(kd.address_1 || ' ' || kd.address_2 || ' ' || kd.address_3) from kyc_hdr kd where kd.cif_no = mi.cif_no) ADDRESS, (case (select kd.religion from kyc_hdr kd where kd.cif_no = mi.cif_no) when '1' then 'Hindu' when '2' then 'Muslim' when '3' then 'Christian' when '4' then 'Sikh' when '5' then 'Jain' when '6' then 'Buddhist' when '7' then 'Parsi' else 'Others' end) RELIGION, (select kd.caste from kyc_hdr kd where kd.cif_no = mi.cif_no) CASTE, QUALIFICATION, to_char(ENTRY_DATE, 'DD-MON-RRRR') ENTRY_DATE, to_char(AMEND_DATE, 'DD-MON-RRRR') AMEND_DATE from MEMBER_INFORMATION mi where SHG_CODE = '" + oMemberDetailsBean.getShgSearch() + "' and mi.shg_id = (select shg_id from basic_info bi where bi.shg_code = '" + oMemberDetailsBean.getShgSearch() + "' and bi.pacs_id = '" +pacsId+ "') "); + + while (rs.next()) { + oMemberDetailsBean = new MemberDetailsBean(); + oMemberDetailsBean.setMemberID(rs.getString("MEMBER_ID")); + oMemberDetailsBean.setMembername(rs.getString("MEMBER_NAME")); + oMemberDetailsBean.setGender(rs.getString("GENDER")); + oMemberDetailsBean.setDob(rs.getString("DOB")); + oMemberDetailsBean.setGuardianname(rs.getString("GUARDIAN_NAME")); + oMemberDetailsBean.setAddress(rs.getString("ADDRESS")); + oMemberDetailsBean.setReligion(rs.getString("RELIGION")); + oMemberDetailsBean.setCaste(rs.getString("CASTE")); + oMemberDetailsBean.setQualification(rs.getString("Qualification")); + oMemberDetailsBean.setCif(rs.getString("cif_no")); + oMemberDetailsBean.setEntry_date(rs.getString("ENTRY_DATE")); + oMemberDetailsBean.setAmend_date(rs.getString("AMEND_DATE")); + + alMemberDetailsBean.add(oMemberDetailsBean); + + } + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + } + + request.setAttribute("MemberDetailsBeanObj", oMemberDetailsBeanObj); + request.setAttribute("alMemberDetailsBean", alMemberDetailsBean); + request.getRequestDispatcher("/Shg_JSP/MemberDetails.jsp").forward(request, response); + + } else if (ServletName.equalsIgnoreCase("Update")) { + + String rowStatus = null; + String memberID = null; + String deletedRows = null; + + try { + // BeanUtils.populate(oMemberDetailsBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call SHG_OPERATIONS.upsert_shg_MEMBER_DETAILS(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oMemberDetailsBean.getMale()); + proc.setString(2, oMemberDetailsBean.getFemale()); + proc.setString(3, oMemberDetailsBean.getOther()); + proc.setString(4, oMemberDetailsBean.getTotal()); + proc.setString(5, oMemberDetailsBean.getMuslim()); + proc.setString(6, oMemberDetailsBean.getChristian()); + proc.setString(7, oMemberDetailsBean.getBuddhist()); + proc.setString(8, oMemberDetailsBean.getSikh()); + proc.setString(9, oMemberDetailsBean.getParsi()); + proc.setString(10, oMemberDetailsBean.getJain()); + proc.setString(11, oMemberDetailsBean.getOthers()); + proc.setString(12, oMemberDetailsBean.getShgcode()); + proc.setString(13, ServletName); + proc.registerOutParameter(14, java.sql.Types.VARCHAR); + proc.setString(15, pacsId); + + proc.execute(); + + //message = proc.getString(14); + + } catch (SQLException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + } + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + // String shgcode = request.getParameter("shgcode"); + // memberID = request.getParameter("memberIDAmend" + i); + // String membername = request.getParameter("membernameAmend" + i); + // String gender = request.getParameter("genderAmend" + i); + // String dob = request.getParameter("dobAmend" + i); + // String guardianname = request.getParameter("guardiannameAmend" + i); + //String address = request.getParameter("addressAmend" + i); + //String religion = request.getParameter("religionAmend" + i); + //String caste = request.getParameter("casteAmend" + i); + // String qualification=request.getParameter("qualificationAmend"+i); + //String cif = request.getParameter("cifAmend"+i); + rowStatus = request.getParameter("rowStatus" + i); + + if ((memberID != null) && (rowStatus != null)) { + oMemberDetailsBean = new MemberDetailsBean(); + oMemberDetailsBean.setShgcode(shgcode); + oMemberDetailsBean.setMemberID(memberID); + oMemberDetailsBean.setMembername(membername); + oMemberDetailsBean.setGender(gender); + oMemberDetailsBean.setDob(dob); + oMemberDetailsBean.setGuardianname(guardianname); + oMemberDetailsBean.setAddress(address); + oMemberDetailsBean.setReligion(religion); + oMemberDetailsBean.setCaste(caste); + oMemberDetailsBean.setQualification(qualification); + oMemberDetailsBean.setCif(cif); + if (rowStatus.equals("N")) { + alMemberDetailsBeanNew.add(oMemberDetailsBean); + } else { + alMemberDetailsBeanUpdated.add(oMemberDetailsBean); + } + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + //For Deletion + + // deletedRows = request.getParameter("deletedRows"); + + if ((!deletedRows.equalsIgnoreCase(null)) || (!deletedRows.equalsIgnoreCase(""))) { + StringTokenizer tokenizer = new StringTokenizer(deletedRows, ","); + + while (tokenizer.hasMoreTokens()) { + + oMemberDetailsBean = new MemberDetailsBean(); + oMemberDetailsBean.setMemberID(tokenizer.nextToken()); + // oMemberDetailsBean.setShgcode(request.getParameter("shgcode")); + + alMemberDetailsBeanDeleted.add(oMemberDetailsBean); + + } + } + if ((alMemberDetailsBeanUpdated.size() > 0) && (!message.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call SHG_OPERATIONS.Upsert_member_information (?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + for (int j = 0; j < alMemberDetailsBeanUpdated.size(); j++) { + + oMemberDetailsBean = new MemberDetailsBean(); + + oMemberDetailsBean = alMemberDetailsBeanUpdated.get(j); + + proc.setString(2, oMemberDetailsBean.getShgcode()); + proc.setString(1, oMemberDetailsBean.getMemberID()); + proc.setString(3, oMemberDetailsBean.getMemberName()); + proc.setString(4, oMemberDetailsBean.getGender()); + proc.setString(5, oMemberDetailsBean.getDob()); + proc.setString(6, oMemberDetailsBean.getGuardianName()); + proc.setString(7, oMemberDetailsBean.getAddress()); + proc.setString(8, oMemberDetailsBean.getReligion()); + proc.setString(9, ServletName); + proc.setString(10, oMemberDetailsBean.getCaste()); + proc.setString(11, oMemberDetailsBean.getQualification()); + proc.setString(12, pacsId); + proc.setString(13, oMemberDetailsBean.getCif()); + proc.addBatch(); + + } + proc.executeBatch(); + + } catch (SQLException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + //for deletion + + if ((alMemberDetailsBeanDeleted.size() > 0) && (!message.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call SHG_OPERATIONS.Upsert_member_information (?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + + } catch (SQLException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alMemberDetailsBeanDeleted.size(); j++) { + + // oMemberDetailsBean = new MemberDetailsBean(); + oMemberDetailsBean = alMemberDetailsBeanDeleted.get(j); + + proc.setString(2, oMemberDetailsBean.getShgcode()); + proc.setString(1, oMemberDetailsBean.getMemberID()); + proc.setString(3, null); + proc.setString(4, null); + proc.setString(5, null); + proc.setString(6, null); + proc.setString(7, null); + proc.setString(8, null); + proc.setString(9, "Delete"); + proc.setString(10, null); + proc.setString(11, null); + proc.setString(12, pacsId); + proc.setString(13, null); + proc.addBatch(); + + } + proc.executeBatch(); + + } catch (SQLException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + //For New Insertion + if ((alMemberDetailsBeanNew.size() > 0) && (!message.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call SHG_OPERATIONS.Upsert_member_information(?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + for (int j = 0; j < alMemberDetailsBeanNew.size(); j++) { + + oMemberDetailsBean = new MemberDetailsBean(); + oMemberDetailsBean = alMemberDetailsBeanNew.get(j); + + proc.setString(2, oMemberDetailsBean.getShgcode()); + proc.setString(1, oMemberDetailsBean.getMemberID()); + proc.setString(3, oMemberDetailsBean.getMemberName()); + proc.setString(4, oMemberDetailsBean.getGender()); + proc.setString(5, oMemberDetailsBean.getDob()); + proc.setString(6, oMemberDetailsBean.getGuardianName()); + proc.setString(7, oMemberDetailsBean.getAddress()); + proc.setString(8, oMemberDetailsBean.getReligion()); + proc.setString(9, "Create"); + proc.setString(10, oMemberDetailsBean.getCaste()); + proc.setString(11, oMemberDetailsBean.getQualification()); + proc.setString(12, pacsId); + proc.setString(13, oMemberDetailsBean.getCif()); + proc.addBatch(); + + } + proc.executeBatch(); + + } catch (SQLException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(MemberDetailsServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Shg_JSP/MemberDetails.jsp").forward(request, response); + } + } + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/MemberEnrollmentServlet.java b/IPKS_Updated/src/src/java/Controller/MemberEnrollmentServlet.java new file mode 100644 index 0000000..9a81ea1 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/MemberEnrollmentServlet.java @@ -0,0 +1,829 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.memberEnrollmentHeaderBean; +import DataEntryBean.memberEnrollmentDetailsBean; +import java.util.StringTokenizer; +//import LoginDb.DbHandler; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import java.util.ArrayList; + +/** + * + * @author 1249241 + */ +public class MemberEnrollmentServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + Connection con = null; + CallableStatement proc = null, proc1 = null; + String message = ""; + int counter; + String headerId = ""; + + //String ServletName = request.getParameter("handle_id"); + + memberEnrollmentHeaderBean omemberEnrollmentHeaderBean = new memberEnrollmentHeaderBean(); + memberEnrollmentDetailsBean omemberEnrollmentDetailsBean = new memberEnrollmentDetailsBean(); + omemberEnrollmentDetailsBean = null; + ArrayList alMemberEnrollmentDetailsBean = new ArrayList(); + + //for amend + ArrayList almemberEnrollmentDetailsBeanNew = new ArrayList(); + ArrayList almemberEnrollmentDetailsBeanDeleted = new ArrayList(); + ArrayList almemberEnrollmentDetailsBeanUpdated = new ArrayList(); + ArrayList almemberEnrollmentDetailsBeanDetailNew = new ArrayList(); + + if ("Create".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(omemberEnrollmentHeaderBean, request.getParameterMap()); + + } catch (IllegalAccessException ex) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call PDS_OPERATIONS.Upsert_CARD_HOLDER_DTLS(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }");//change as required + + } catch (SQLException ex) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.setString(1, omemberEnrollmentHeaderBean.getHolderId()); + proc.setString(2, omemberEnrollmentHeaderBean.getCardNo()); + proc.setString(3, omemberEnrollmentHeaderBean.getCustName()); + proc.setString(4, omemberEnrollmentHeaderBean.getSDWOf()); + proc.setString(5, omemberEnrollmentHeaderBean.getHouseNo()); + proc.setString(6, omemberEnrollmentHeaderBean.getStreet()); + proc.setString(7, omemberEnrollmentHeaderBean.getGramPanchayat()); + proc.setString(8, omemberEnrollmentHeaderBean.getRevenueBlock()); + proc.setString(9, omemberEnrollmentHeaderBean.getSubdivision()); + proc.setString(10, omemberEnrollmentHeaderBean.getDistrict()); + proc.setString(11, omemberEnrollmentHeaderBean.getState()); + proc.setString(12, omemberEnrollmentHeaderBean.getIssuedOn()); + proc.setString(13, omemberEnrollmentHeaderBean.getValidUpto()); + proc.setString(14, omemberEnrollmentHeaderBean.getDateOfBirth()); + proc.setString(15, omemberEnrollmentHeaderBean.getCardTypeId()); + proc.setString(16, pacsId); + proc.setString(17, ServletName); + proc.registerOutParameter(18, java.sql.Types.VARCHAR); + proc.registerOutParameter(19, java.sql.Types.VARCHAR); + + proc.execute(); + // message = proc.getString(18); + // headerId = proc.getString(19); + + + + } catch (SQLException ex) { + try { + // con.rollback(); + } catch (Exception ex1) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + //String familyId = request.getParameter("familyId" + i); + // String cardHolderNameFamily = request.getParameter("cardHolderNameFamily" + i); + //String cardNoFamily = request.getParameter("cardNoFamily" + i); + //String DOBFamily = request.getParameter("DOBFamily" + i); + + + if (cardHolderNameFamily != null) { + omemberEnrollmentDetailsBean = new memberEnrollmentDetailsBean(); + omemberEnrollmentDetailsBean.setFamilyId(familyId); + omemberEnrollmentDetailsBean.setCardHolderNameFamily(cardHolderNameFamily); + omemberEnrollmentDetailsBean.setCardNoFamily(cardNoFamily); + omemberEnrollmentDetailsBean.setDOBFamily(DOBFamily); + alMemberEnrollmentDetailsBean.add(omemberEnrollmentDetailsBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alMemberEnrollmentDetailsBean.size() > 0) && (!message.equalsIgnoreCase("")) && (!headerId.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call pds_operations.Upsert_pds_family_dtls(?,?,?,?,?,?) }"); + + } catch (SQLException ex) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + for (int j = 0; j < alMemberEnrollmentDetailsBean.size(); j++) { + + omemberEnrollmentDetailsBean = alMemberEnrollmentDetailsBean.get(j); + + + proc.setString(1, omemberEnrollmentDetailsBean.getFamilyId()); + proc.setString(2, headerId); + proc.setString(3, omemberEnrollmentDetailsBean.getCardHolderNameFamily()); + proc.setString(4, omemberEnrollmentDetailsBean.getDOBFamily()); + proc.setString(5, omemberEnrollmentDetailsBean.getCardNoFamily()); + proc.setString(6, ServletName); + + //proc.registerOutParameter(7, java.sql.Types.VARCHAR); + + proc.addBatch(); + + + } + + proc.executeBatch(); + message = message + headerId; + + } catch (SQLException ex) { + try { + // con.rollback(); + } catch (Exception ex1) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Pds_JSP/memberEnrollment.jsp").forward(request, response); + + } else if ("Search".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(omemberEnrollmentHeaderBean, request.getParameterMap()); + + } catch (IllegalAccessException ex) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + + // ResultSet rs = statement.executeQuery("select p.ID,p.CARD_NO,p.NAME,p.GUARDIAN_NAME,p.HOUSE_NO,p.STREET_ROAD,p.PANCHAYAT,p.BLOCK,p.SUB_DIV,p.DISTRICT,p.STATE,to_char(p.ISSUED_ON,'dd/mm/yyyy') ISSUED_ON,to_char(p.VALID_UPTO,'dd/mm/yyyy') VALID_UPTO,to_char(p.DOB,'dd/mm/yyyy') DOB,c.CARD_TYPE,c.card_desc,c.card_type_id,p.PACS_ID from PDS_CARD_HOLDERS p, PDS_CARD_TYPE_MST c where p.CARD_NO= '" + omemberEnrollmentHeaderBean.getCardNoAmendSearch() + "' and c.card_type_id=p.card_type_id"); + + while (rs.next()) { + + + headerId = rs.getString("ID"); + omemberEnrollmentHeaderBean.setHolderId(headerId); + omemberEnrollmentHeaderBean.setCardNo(rs.getString("CARD_NO")); + omemberEnrollmentHeaderBean.setCustName(rs.getString("NAME")); + omemberEnrollmentHeaderBean.setSDWOf(rs.getString("GUARDIAN_NAME")); + omemberEnrollmentHeaderBean.setDateOfBirth(rs.getString("DOB")); + omemberEnrollmentHeaderBean.setHouseNo(rs.getString("HOUSE_NO")); + omemberEnrollmentHeaderBean.setStreet(rs.getString("STREET_ROAD")); + omemberEnrollmentHeaderBean.setGramPanchayat(rs.getString("PANCHAYAT")); + omemberEnrollmentHeaderBean.setRevenueBlock(rs.getString("BLOCK")); + omemberEnrollmentHeaderBean.setSubdivision(rs.getString("SUB_DIV")); + omemberEnrollmentHeaderBean.setDistrict(rs.getString("DISTRICT")); + omemberEnrollmentHeaderBean.setState(rs.getString("STATE")); + omemberEnrollmentHeaderBean.setIssuedOn(rs.getString("ISSUED_ON")); + omemberEnrollmentHeaderBean.setValidUpto(rs.getString("VALID_UPTO")); + String card = rs.getString("CARD_TYPE") + ":" + rs.getString("CARD_DESC"); + omemberEnrollmentHeaderBean.setCardCategory(card); + omemberEnrollmentHeaderBean.setCardTypeId(rs.getString("CARD_TYPE_ID")); + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + } + + statement.close(); + + + + } catch (SQLException ex) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + if (SeachFound == 0) { + message = "Member does not exist in the system"; + request.setAttribute("message", message); + } + + + //For Details Part Populate + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + + // ResultSet rsDetails = statement.executeQuery("select ID,MEMBER_NAME,CARD_NO,to_char(DOB,'dd/mm/yyyy') DOB from PDS_FAMILY_DTLS where HOLDER_ID= '" + headerId + "'"); + + + while (rsDetails.next()) { + + omemberEnrollmentDetailsBean = new memberEnrollmentDetailsBean(); + omemberEnrollmentDetailsBean.setDetailIdAmend(rsDetails.getString("ID")); + omemberEnrollmentDetailsBean.setCardNoFamily(rsDetails.getString("CARD_NO")); + omemberEnrollmentDetailsBean.setCardHolderNameFamily(rsDetails.getString("MEMBER_NAME")); + omemberEnrollmentDetailsBean.setDOBFamily(rsDetails.getString("DOB")); + + alMemberEnrollmentDetailsBean.add(omemberEnrollmentDetailsBean); + + + } + + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + + + request.setAttribute("omemberEnrollmentHeaderBean", omemberEnrollmentHeaderBean); + request.setAttribute("alMemberEnrollmentDetailsBeanApend", alMemberEnrollmentDetailsBean); + request.getRequestDispatcher("/Pds_JSP/memberEnrollment.jsp").forward(request, response); + + } else if ("Update".equalsIgnoreCase(ServletName)) { + String familyIdAmend = null; + String cardNoFamilyAmend = null; + String cardHolderNameFamilyAmend = null; + String DOBFamilyAmend = null; + String familyIdAmend3 = null; + + String rowStatus = null; + String detailID = null; + String deletedRows = null; + + try { + // BeanUtils.populate(omemberEnrollmentHeaderBean, request.getParameterMap()); + //BeanUtils.populate(omemberEnrollmentDetailsBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + + + proc = con.prepareCall("{ call PDS_OPERATIONS.Upsert_CARD_HOLDER_DTLS(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }");//change as required + } catch (SQLException ex) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + proc.setString(1, omemberEnrollmentHeaderBean.getHolderIdAmend()); + proc.setString(2, omemberEnrollmentHeaderBean.getCardNoAmend()); + proc.setString(3, omemberEnrollmentHeaderBean.getCustNameAmend()); + proc.setString(4, omemberEnrollmentHeaderBean.getSDWOfAmend()); + proc.setString(5, omemberEnrollmentHeaderBean.getHouseNoAmend()); + proc.setString(6, omemberEnrollmentHeaderBean.getStreetAmend()); + proc.setString(7, omemberEnrollmentHeaderBean.getGramPanchayatAmend()); + proc.setString(8, omemberEnrollmentHeaderBean.getRevenueBlockAmend()); + proc.setString(9, omemberEnrollmentHeaderBean.getSubdivisionAmend()); + proc.setString(10, omemberEnrollmentHeaderBean.getDistrictAmend()); + proc.setString(11, omemberEnrollmentHeaderBean.getStateAmend()); + proc.setString(12, omemberEnrollmentHeaderBean.getIssuedOnAmend()); + proc.setString(13, omemberEnrollmentHeaderBean.getValidUptoAmend()); + proc.setString(14, omemberEnrollmentHeaderBean.getDateOfBirthAmend()); + proc.setString(15, omemberEnrollmentHeaderBean.getCardTypeIdAmend()); + proc.setString(16, pacsId); + + proc.setString(17, ServletName); + + proc.registerOutParameter(18, java.sql.Types.VARCHAR); + proc.registerOutParameter(19, java.sql.Types.VARCHAR); + + proc.execute(); + // message = proc.getString(18); + headerId = proc.getString(19); + + + + + } catch (SQLException ex) { + try { + // con.rollback(); + } catch (Exception ex1) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + +//New And UPdate After Populating Family Details + + counter = Integer.parseInt(request.getParameter("rowCounterAmend")); + + for (int i = 1; i <= counter; i++) { + try { + + // familyIdAmend = request.getParameter("familyIdAmend" + i); + //cardNoFamilyAmend = request.getParameter("cardNoFamilyAmend" + i); + // cardHolderNameFamilyAmend = request.getParameter("cardHolderNameFamilyAmend" + i); + // DOBFamilyAmend = request.getParameter("DOBFamilyAmend" + i); + rowStatus = request.getParameter("rowStatus" + i); + detailID = request.getParameter("detailIDAmend" + i); + + + + if (rowStatus != null) { + omemberEnrollmentDetailsBean = new memberEnrollmentDetailsBean(); + omemberEnrollmentDetailsBean.setFamilyIdAmend(familyIdAmend); + omemberEnrollmentDetailsBean.setCardNoFamilyAmend(cardNoFamilyAmend); + omemberEnrollmentDetailsBean.setCardHolderNameFamilyAmend(cardHolderNameFamilyAmend); + omemberEnrollmentDetailsBean.setDOBFamilyAmend(DOBFamilyAmend); + + if (rowStatus.equals("N")) { + almemberEnrollmentDetailsBeanDetailNew.add(omemberEnrollmentDetailsBean); + + } else { + almemberEnrollmentDetailsBeanUpdated.add(omemberEnrollmentDetailsBean); + } + + + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + + + + + + + + + +//For New Insertion if there is no family earlier + + counter = Integer.parseInt(request.getParameter("rowCounterAmend3")); + + for (int i = 1; i <= counter; i++) { + try { + + // familyIdAmend = request.getParameter("familyIdAmend3" + i); + // cardNoFamilyAmend = request.getParameter("cardNoFamilyAmend3" + i); + // cardHolderNameFamilyAmend = request.getParameter("cardHolderNameFamilyAmend3" + i); + // DOBFamilyAmend = request.getParameter("DOBFamilyAmend3" + i); + rowStatus = request.getParameter("rowStatus2" + i); + + + + if (rowStatus != null) { + omemberEnrollmentDetailsBean = new memberEnrollmentDetailsBean(); + omemberEnrollmentDetailsBean.setFamilyIdAmend3(familyIdAmend); + omemberEnrollmentDetailsBean.setCardNoFamilyAmend3(cardNoFamilyAmend); + omemberEnrollmentDetailsBean.setCardHolderNameFamilyAmend3(cardHolderNameFamilyAmend); + omemberEnrollmentDetailsBean.setDOBFamilyAmend3(DOBFamilyAmend); + + if (rowStatus.equals("N")) { + almemberEnrollmentDetailsBeanNew.add(omemberEnrollmentDetailsBean); + } + + + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + + + + //For Deletion + + //deletedRows = request.getParameter("deletedRows"); + + if ((!deletedRows.equalsIgnoreCase(null)) || (!deletedRows.equalsIgnoreCase(""))&&(!headerId.equalsIgnoreCase(""))) { + StringTokenizer tokenizer = new StringTokenizer(deletedRows, ","); + + while (tokenizer.hasMoreTokens()) { + + omemberEnrollmentDetailsBean = new memberEnrollmentDetailsBean(); + omemberEnrollmentDetailsBean.setDetailIdAmend(tokenizer.nextToken()); + + almemberEnrollmentDetailsBeanDeleted.add(omemberEnrollmentDetailsBean); + + } + } + + + + + if ((almemberEnrollmentDetailsBeanUpdated.size() > 0) && (!message.equalsIgnoreCase(""))&&(!headerId.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call pds_operations.Upsert_pds_family_dtls(?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + for (int j = 0; j < almemberEnrollmentDetailsBeanUpdated.size(); j++) { + + omemberEnrollmentDetailsBean = new memberEnrollmentDetailsBean(); + + omemberEnrollmentDetailsBean = almemberEnrollmentDetailsBeanUpdated.get(j); + + + proc.setString(1, omemberEnrollmentDetailsBean.getFamilyIdAmend()); + proc.setString(2, headerId); + proc.setString(3, omemberEnrollmentDetailsBean.getCardHolderNameFamilyAmend()); + proc.setString(4, omemberEnrollmentDetailsBean.getDOBFamilyAmend()); + proc.setString(5, omemberEnrollmentDetailsBean.getCardNoFamilyAmend()); + proc.setString(6, ServletName); + + proc.addBatch(); + + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + try { + // con.rollback(); + } catch (Exception ex1) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + + //for deletion + + if ((almemberEnrollmentDetailsBeanDeleted.size() > 0) && (!message.equalsIgnoreCase(""))&&(!headerId.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call pds_operations.Upsert_pds_family_dtls(?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + for (int j = 0; j < almemberEnrollmentDetailsBeanDeleted.size(); j++) { + + omemberEnrollmentDetailsBean = new memberEnrollmentDetailsBean(); + + omemberEnrollmentDetailsBean = almemberEnrollmentDetailsBeanDeleted.get(j); + + + + proc.setString(1, omemberEnrollmentDetailsBean.getDetailIdAmend()); + proc.setString(2, null); + proc.setString(3, null); + proc.setString(4, null); + proc.setString(5, null); + + proc.setString(6, "Delete"); + // proc.registerOutParameter(7, java.sql.Types.VARCHAR); + + + proc.addBatch(); + + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + try { + // con.rollback(); + } catch (Exception ex1) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + + + //For New Insertion If no family exists earlier + + + if ((almemberEnrollmentDetailsBeanNew.size() > 0) && (!message.equalsIgnoreCase(""))&&(!headerId.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call pds_operations.Upsert_pds_family_dtls(?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + for (int j = 0; j < almemberEnrollmentDetailsBeanNew.size(); j++) { + + omemberEnrollmentDetailsBean = new memberEnrollmentDetailsBean(); + omemberEnrollmentDetailsBean = almemberEnrollmentDetailsBeanNew.get(j); + + proc.setString(1, familyIdAmend3); + proc.setString(2, headerId); + proc.setString(3, omemberEnrollmentDetailsBean.getCardHolderNameFamilyAmend3()); + proc.setString(4, omemberEnrollmentDetailsBean.getDOBFamilyAmend3()); + proc.setString(5, omemberEnrollmentDetailsBean.getCardNoFamilyAmend3()); + + proc.setString(6, "Create"); + + proc.addBatch(); + + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + try { + // con.rollback(); + } catch (Exception ex1) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + + +//For New Insertion if Family Details Exist earlier + + if ((almemberEnrollmentDetailsBeanDetailNew.size() > 0) && (!message.equalsIgnoreCase(""))&&(!headerId.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call pds_operations.Upsert_pds_family_dtls(?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + for (int j = 0; j < almemberEnrollmentDetailsBeanDetailNew.size(); j++) { + + omemberEnrollmentDetailsBean = new memberEnrollmentDetailsBean(); + omemberEnrollmentDetailsBean = almemberEnrollmentDetailsBeanDetailNew.get(j); + + proc.setString(1, familyIdAmend); + proc.setString(2, headerId); + proc.setString(3, omemberEnrollmentDetailsBean.getCardHolderNameFamilyAmend()); + proc.setString(4, omemberEnrollmentDetailsBean.getDOBFamilyAmend()); + proc.setString(5, omemberEnrollmentDetailsBean.getCardNoFamilyAmend()); + + proc.setString(6, "Create"); + + proc.addBatch(); + + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + try { + // con.rollback(); + } catch (Exception ex1) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(MemberEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Pds_JSP/memberEnrollment.jsp").forward(request, response); + } + + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + } +} diff --git a/IPKS_Updated/src/src/java/Controller/MicroFileProcesssingServlet.java b/IPKS_Updated/src/src/java/Controller/MicroFileProcesssingServlet.java new file mode 100644 index 0000000..4716060 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/MicroFileProcesssingServlet.java @@ -0,0 +1,131 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import DataEntryBean.MicroFileAccountDetBean; +import ServiceLayer.MicrofileProcessingService; +import java.io.File; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.PrintWriter; +import java.io.Reader; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import javax.servlet.http.HttpServlet; +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.fileupload.servlet.ServletFileUpload; +import org.apache.commons.io.FilenameUtils; + +/** + * + * @author 1004242 + */ + +public class MicroFileProcesssingServlet extends HttpServlet{ + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + MicrofileProcessingService service = new MicrofileProcessingService(); + String pacsId = (String) session.getAttribute("pacsId"); + //String agentId = request.getParameter("agentId"); + String tellerId = (String)session.getAttribute("user"); + String action = request.getParameter("actionTag"); + StringBuilder csvDownloadableBuilder = null; + String filePath = null; + + if (request.getSession().getAttribute("errorMessage") != null) { + request.getSession().removeAttribute("errorMessage"); + } + + try { + if (ServletFileUpload.isMultipartContent(request)) { + filePath = service.uploadCSVToServer(request,pacsId); + if (filePath != null) { + MicroFileAccountDetBean resultDetails = service.readAndInsertFromCSV(pacsId, filePath,tellerId); + System.out.println("No of Handbill entry inserted :" + resultDetails.getSuccessfulRecords() + " for pacs Id :" + pacsId); + File fileToBeDwlted = new File(filePath); + fileToBeDwlted.delete();//delete the file created locally + if(resultDetails.getSuccessfulRecords() == resultDetails.getTotalRecords()) + request.getSession().setAttribute("errorMessage", resultDetails.getSuccessfulRecords() + " out of "+resultDetails.getTotalRecords() +" details has been submitted succesfully"); + else if (resultDetails.getSuccessfulRecords() < resultDetails.getTotalRecords()) + request.getSession().setAttribute("errorMessage", resultDetails.getSuccessfulRecords() + " out of "+resultDetails.getTotalRecords() +" details has been processed. Please check for duplicate entry in your csv."); + // response.sendRedirect(request.getHeader("Referer")); + } else { + System.out.println("EOD balance file could not be read for :"+ pacsId); + request.getSession().setAttribute("errorMessage", "Request can not be processed this time"); + //response.sendRedirect(request.getHeader("Referer")); + //error case handling + } + } else if (action != null && action.equalsIgnoreCase("Download")) { + csvDownloadableBuilder = service.downloadCsvFile(pacsId,agentId); + if (csvDownloadableBuilder != null) { + response.setContentType("text/csv"); + response.setHeader("Content-Disposition", "attachment; filename=\"GL14-testfile.csv\""); + OutputStream outputStream = response.getOutputStream(); + outputStream.write(csvDownloadableBuilder.toString().getBytes()); + outputStream.flush(); + outputStream.close(); + System.out.println("Balance file downloaded for pacs id :" + pacsId); + } else { + + //return message; + System.out.println("Balance file could not get downloaded for pacs id :" + pacsId); + request.getSession().setAttribute("errorMessage", "No Record found for the given request."); + // response.sendRedirect(request.getHeader("Referer")); + } + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + request.getSession().setAttribute("errorMessage", "Request can not be processed."); + // response.sendRedirect(request.getHeader("Referer")); + + } finally { + System.out.println("Processing done."); + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/MiscChargeDeductionServlet.java b/IPKS_Updated/src/src/java/Controller/MiscChargeDeductionServlet.java new file mode 100644 index 0000000..f0938a7 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/MiscChargeDeductionServlet.java @@ -0,0 +1,146 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.DepositMiscellaneousBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.StringTokenizer; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 986137 + */ +public class MiscChargeDeductionServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + + Connection con = null; + CallableStatement proc = null; + //String txnAmt = request.getParameter("txnAmt"); + //String narration = request.getParameter("narration"); + // String type = request.getParameter("methodType"); + // String fromDt = request.getParameter("fromdate"); + // String toDt = request.getParameter("todate"); + // String prodCode = request.getParameter("prodCode"); + // String intCat = request.getParameter("intCat"); + // String minB = request.getParameter("minBal"); + String maxCash = request.getParameter("maxCashTra"); + + try { + con = DbHandler.getDBConnection(); + + proc = con.prepareCall("{ call operations2.post_yearend_charges(?,?,?,?,?,?,?,?,?,?,?,?) }"); + + proc.setString(1, pacsId); + proc.setString(2, user); + proc.setString(3, txnAmt); + proc.setString(4, narration); + proc.setString(5, type); + proc.setString(6, fromDt); + proc.setString(7, toDt); + proc.setString(8, prodCode); + proc.setString(9, intCat); + proc.registerOutParameter(10, java.sql.Types.VARCHAR); + proc.registerOutParameter(11, java.sql.Types.VARCHAR); + proc.setString(12, minB); + // proc.setString(13, maxCash); + + proc.execute(); + // message = proc.getString(10); + + request.setAttribute("message", message); + + request.getRequestDispatcher("/Deposit/MiscChargeDeduction.jsp").forward(request, response); + } + + catch (SQLException ex) { + // ex.printStackTrace(); + System.out.println("Error occurred during processing."); + System.out.println("Exception occured in MiscChargeDeductionServlet for user Id :" + user); + message= type+" Charge deduction is already done today for Product Code: " +prodCode+ " and Int cat: " +intCat+ ". Check again tomorrow."; + + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/MiscChargeDeduction.jsp").forward(request, response); + } finally { + try { + if(proc !=null) + proc.close(); + if (con != null) + con.close(); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/ModifyLoanInterestServlet.java b/IPKS_Updated/src/src/java/Controller/ModifyLoanInterestServlet.java new file mode 100644 index 0000000..9120cac --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/ModifyLoanInterestServlet.java @@ -0,0 +1,134 @@ + +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author Tcs Helpdesk10 + */ +public class ModifyLoanInterestServlet extends HttpServlet { + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + CallableStatement proc = null; + int searchFound = 0; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String headPacsId = (String) session.getAttribute("headPacsId"); + String tellerId=(String)session.getAttribute("user"); + String JSP_Name = request.getParameter("screenName"); + //String acc_no = request.getParameter("accountNo"); + //String int_rate = request.getParameter("int_rate"); + // String pen_int_rate=request.getParameter("pen_int_rate"); + //String incr_value = request.getParameter("incr_value"); + //String acc_read=request.getParameter("accountNo_read"); + // String pen_incr_value=request.getParameter("pen_incr_value"); + + System.out.println("JSP_NAME "+JSP_Name); + +if( int_rate == null || incr_value == null || int_rate.equals("") || incr_value.equals("")||pen_int_rate == null || pen_incr_value == null || pen_int_rate.equals("") || pen_incr_value.equals("") ){ + + int counter =0; + try{ + connection = DbHandler.getDBConnection(); + + String sql = "select p.intt_rate as intt_rate,p.penal_intt_rate as penal_intt_rate from loan_interest_map p where p.key_1='"+acc_no+"'"; + + + statement = connection.createStatement(); + // rs = statement.executeQuery(sql); + while (rs.next()) { + counter++; + int_rate=rs.getString("intt_rate"); + pen_int_rate=rs.getString("penal_intt_rate"); + System.out.println("Interest Rate"+int_rate ); + System.out.println("Interest Rate"+pen_int_rate ); + } + }catch(Exception ex){ + // ex.printStackTrace(); + System.out.println("Error occurred during processing."); + } finally { + try { + connection.close(); + statement.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during connection close."); + } + } + if(counter == 0){ + message = "No data exists for selected item. Please enter correct details."; + request.setAttribute("message", message); + request.setAttribute("displayFlag", "N"); + }else{ + request.setAttribute("displayFlag", "Y"); + } + + }else{ + System.out.println("Loan Update"); + System.out.println(acc_no+int_rate+incr_value); + connection = DbHandler.getDBConnection(); + + try { + proc = connection.prepareCall("{ call operations1.LOAN_INT_UPDATE(?,?,?,?,?,?) }"); + + //int i = Integer.parseInt(int_rate) + Integer.parseInt(incr_value); + + proc.setString(1, pacsId); + proc.setString(2, acc_read); + proc.setDouble(3, Double.parseDouble(incr_value)); + proc.setString(4, tellerId); + proc.registerOutParameter(5, java.sql.Types.VARCHAR); + proc.setDouble(6, Double.parseDouble(pen_incr_value)); + + proc.executeUpdate(); + + //message = proc.getString(5); + request.setAttribute("message", message); + + } catch (SQLException ex) { + message = "Error Occurred: "+ex.getMessage()+"Please contact Administrator"; + request.setAttribute("message", message); + // ex.printStackTrace(); + System.out.println("Error occurred during processing."); + } finally { + try { + connection.close(); + } catch (SQLException e) { + //System.out.println(e.toString()); + System.out.println("Error occurred during processing."); + } + } + request.setAttribute("displayFlag", "N"); + } + + request.setAttribute("int_rate", int_rate); + request.setAttribute("pen_int_rate", pen_int_rate); + request.setAttribute("acc_no", acc_no); + request.getRequestDispatcher("/Loan/LoanModify.jsp").forward(request, response); + + } +} diff --git a/IPKS_Updated/src/src/java/Controller/ModifyServicesServlet.java b/IPKS_Updated/src/src/java/Controller/ModifyServicesServlet.java new file mode 100644 index 0000000..8494c4f --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/ModifyServicesServlet.java @@ -0,0 +1,170 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import javax.servlet.http.HttpSession; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * + * @author 1004242 + */ +public class ModifyServicesServlet extends HttpServlet { + + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + CallableStatement proc = null; + int searchFound = 0; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String headPacsId = (String) session.getAttribute("headPacsId"); + String tellerId=(String)session.getAttribute("user"); + String JSP_Name = request.getParameter("screenName"); + // String acc_no = request.getParameter("accountNo"); + + String sms = request.getParameter("smsService"); + // String mob_no = request.getParameter("mob_no"); + + String mail = request.getParameter("mailservice"); + // String mail_id = request.getParameter("mail_id"); + + String miss_call = request.getParameter("miss_call"); + + System.out.println(acc_no+" "+sms+" "+mob_no+" "+mail+" "+mail_id+" "+miss_call); + + + if( sms==null && mail == null && miss_call == null && mob_no == null ) { + //search + try{ + connection = DbHandler.getDBConnection(); + + String sql = "select sms_flag,mobile_no,email_flag,email_id,misdcl_flag from ACCT_SERVICES p where p.key_1='"+acc_no+"' and p.pacs_id='"+pacsId+"'"; + int sms_flag = 0; + int email_flag = 0; + int msdcl_flag = 0; + System.out.println(sms_flag); + + statement = connection.createStatement(); + //rs = statement.executeQuery(sql); + + while (rs.next()) { + sms_flag = rs.getInt("sms_flag"); + email_flag = rs.getInt("email_flag"); + msdcl_flag = rs.getInt("misdcl_flag"); + mob_no = rs.getString("mobile_no"); + mail_id = rs.getString("email_id"); + } + request.setAttribute("sms_flag", ""+sms_flag); + request.setAttribute("email_flag", ""+email_flag); + request.setAttribute("misdcl_flag", ""+msdcl_flag); + request.setAttribute("mob_no", mob_no); + request.setAttribute("mail_id", mail_id); + request.setAttribute("acc_no", acc_no); + request.setAttribute("displayFlag", "Y"); + request.setAttribute("deact_flag", "N"); + + } catch(Exception ex){ + //ex.printStackTrace(); + System.out.println("Error occurred during processing."); + } finally { + try { + connection.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + else{ + //update + try{ + connection = DbHandler.getDBConnection(); + proc = connection.prepareCall("{ call operations1.ACCT_SERVICES_UPDATE(?,?,?,?,?,?,?,?,?) }"); + + proc.setString(1, pacsId); + proc.setString(2, acc_no); + proc.setString(3, tellerId); + + if(sms == null){ + proc.setInt(4, 0); + } + else{ + proc.setInt(4, 1); + } + proc.setString(5, mob_no); + + if(mail == null){ + proc.setInt(6, 0); + } + else{ + proc.setInt(6, 1); + } + proc.setString(7, mail_id); + + if(miss_call == null){ + proc.setInt(8, 0); + } + else{ + proc.setInt(8, 1); + } + + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + // message = proc.getString(9); + request.setAttribute("message", message); + + }catch(Exception e){ + message = "Error Occurred during processing."; + // message = "Error Occurred: "+e.getMessage()+"Please contact Administrator"; + request.setAttribute("message", message); + // e.printStackTrace(); + } finally { + try { + connection.close(); + } catch (SQLException e) { + System.out.println("Error occured during connection close."); + } + } + request.setAttribute("displayFlag", "N"); + } + request.getRequestDispatcher("/Deposit/EditServices.jsp").forward(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/MyIntimationServlet.java b/IPKS_Updated/src/src/java/Controller/MyIntimationServlet.java new file mode 100644 index 0000000..499b70c --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/MyIntimationServlet.java @@ -0,0 +1,235 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import LoginDb.DbHandler; +import DataEntryBean.MyIntimationBean; +import java.sql.SQLException; +import oracle.jdbc.OracleTypes; + +/** + * + * @author Tcs Helpdesk10 + */ +public class MyIntimationServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + CallableStatement proc = null; + int searchFound = 0; + String message = ""; + + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = session.getAttribute("user").toString(); + String viewType = session.getAttribute("moduleName").toString(); + + MyIntimationBean MyIntimationBeanObj = new MyIntimationBean(); + ArrayList alMyIntimationBean = new ArrayList(); + + + + try { + // BeanUtils.populate(MyIntimationBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(MyIntimationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(MyIntimationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call worklist.my_intimation(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(MyIntimationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, tellerId); + proc.setString(2, MyIntimationBeanObj.getRefno()); + proc.setString(3, pacsId); + proc.setString(4, MyIntimationBeanObj.getTransactiontype()); + proc.setString(5, MyIntimationBeanObj.getFromDate()); + proc.setString(6, MyIntimationBeanObj.getToDate()); + + proc.registerOutParameter(7, OracleTypes.CURSOR); + proc.registerOutParameter(8, java.sql.Types.VARCHAR); + proc.setString(8, viewType); + proc.setString(9, MyIntimationBeanObj.getCheckOption()); + proc.executeUpdate(); + + // rs = (ResultSet) proc.getObject(7); + + if (MyIntimationBeanObj.getCheckOption().equalsIgnoreCase("TXN")) { + + while (rs.next()) { + searchFound = 1; + MyIntimationBeanObj = new MyIntimationBean(); + MyIntimationBeanObj.setAccount_no(rs.getString("acct_no")); + MyIntimationBeanObj.setRefnoSearch(rs.getString("cbs_ref_no")); + MyIntimationBeanObj.setTransactiontypeSearch(rs.getString("txn_type")); + MyIntimationBeanObj.setTran_date(rs.getString("tran_date")); + MyIntimationBeanObj.setAuth_id(rs.getString("checker_id")); + MyIntimationBeanObj.setRemarks(rs.getString("remarks")); + MyIntimationBeanObj.setAmount(rs.getString("txn_amt")); + MyIntimationBeanObj.setStatus(rs.getString("status")); + MyIntimationBeanObj.setChargeToDeduct(rs.getString("charges")); + + alMyIntimationBean.add(MyIntimationBeanObj); + + request.setAttribute("displayFlag", "Y"); + + } + + } else if (MyIntimationBeanObj.getCheckOption().equalsIgnoreCase("TTP")) { + + while (rs.next()) { + searchFound = 1; + MyIntimationBeanObj = new MyIntimationBean(); + MyIntimationBeanObj.setAccount_no(rs.getString("acct_no")); + MyIntimationBeanObj.setRefnoSearch(rs.getString("cbs_ref_no")); + MyIntimationBeanObj.setTransactiontypeSearch(rs.getString("txn_type")); + MyIntimationBeanObj.setTran_date(rs.getString("tran_date")); + MyIntimationBeanObj.setAuth_id(rs.getString("checker_id")); + MyIntimationBeanObj.setRemarks(rs.getString("remarks")); + MyIntimationBeanObj.setAmount(rs.getString("txn_amt")); + MyIntimationBeanObj.setStatus(rs.getString("status")); + MyIntimationBeanObj.setChargeToDeduct(rs.getString("charges")); + + alMyIntimationBean.add(MyIntimationBeanObj); + + request.setAttribute("displayFlag", "Y"); + + } + }else if (MyIntimationBeanObj.getCheckOption().equalsIgnoreCase("ACC") + || MyIntimationBeanObj.getCheckOption().equalsIgnoreCase("LACC") || MyIntimationBeanObj.getCheckOption().equalsIgnoreCase("KCC")) { + + while (rs.next()) { + searchFound = 1; + MyIntimationBeanObj = new MyIntimationBean(); + MyIntimationBeanObj.setRefnoSearch(rs.getString("ref_id")); + MyIntimationBeanObj.setAuth_id(rs.getString("checker_ID")); + MyIntimationBeanObj.setTransactiontypeSearch(rs.getString("txn_type")); + MyIntimationBeanObj.setTran_date(rs.getString("tran_date")); + MyIntimationBeanObj.setStatus(rs.getString("status")); + MyIntimationBeanObj.setAccount_no(rs.getString("new_account_no")); + MyIntimationBeanObj.setRemarks(rs.getString("remarks")); + + alMyIntimationBean.add(MyIntimationBeanObj); + + request.setAttribute("displayFlag", "Y"); + + } + + } + + // MyIntimationBeanObj.setRefno(request.getParameter("refno")); + // MyIntimationBeanObj.setTransactiontype(request.getParameter("transactiontype")); + // MyIntimationBeanObj.setFromDate(request.getParameter("fromDate")); + // MyIntimationBeanObj.setToDate(request.getParameter("toDate")); + // MyIntimationBeanObj.setCheckOption(request.getParameter("checkOption")); + + } catch (SQLException ex) { + // Logger.getLogger(MyIntimationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(MyIntimationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + if (searchFound == 0) { + message = "No data exists for selected item"; + request.setAttribute("message", message); + } + + request.setAttribute("oMyIntimationBeanSearchObj", MyIntimationBeanObj); + request.setAttribute("alMyIntimationBean", alMyIntimationBean); + request.setAttribute("message", message); + + request.getRequestDispatcher("/MyIntimation.jsp").forward(request, response); + + + + + + } + +// + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/MyIntimationServlet_STB.java b/IPKS_Updated/src/src/java/Controller/MyIntimationServlet_STB.java new file mode 100644 index 0000000..8514540 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/MyIntimationServlet_STB.java @@ -0,0 +1,193 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import LoginDb.DbHandler; +import DataEntryBean.MyIntimationBean; +import java.sql.SQLException; +import oracle.jdbc.OracleTypes; + +/** + * + * @author Tcs Helpdesk10 + */ +public class MyIntimationServlet_STB extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + CallableStatement proc = null; + int searchFound = 0; + String message = ""; + + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = session.getAttribute("user").toString(); + String viewType = session.getAttribute("moduleName").toString(); + + MyIntimationBean MyIntimationBeanObj = new MyIntimationBean(); + ArrayList alMyIntimationBean = new ArrayList(); + + + try { + // BeanUtils.populate(MyIntimationBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(MyIntimationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(MyIntimationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call worklist.my_intimation_bank(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(MyIntimationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, tellerId); + proc.setString(2, MyIntimationBeanObj.getRefno()); + proc.setString(3, pacsId); + proc.setString(4, MyIntimationBeanObj.getTransactiontype()); + proc.setString(5, MyIntimationBeanObj.getFromDate()); + proc.setString(6, MyIntimationBeanObj.getToDate()); + + proc.registerOutParameter(7, OracleTypes.CURSOR); + proc.registerOutParameter(8, java.sql.Types.VARCHAR); + proc.setString(8, viewType); + proc.setString(9, MyIntimationBeanObj.getCheckOption()); + proc.executeUpdate(); + + //rs = (ResultSet) proc.getObject(7); + + if (MyIntimationBeanObj.getCheckOption().equalsIgnoreCase("TP")) { + + while (rs.next()) { + searchFound = 1; + MyIntimationBeanObj = new MyIntimationBean(); + MyIntimationBeanObj.setAccount_no(rs.getString("acct_no")); + MyIntimationBeanObj.setAccount_no2(rs.getString("acct_no2")); + MyIntimationBeanObj.setAccount_bal(rs.getString("avail_bal")); + MyIntimationBeanObj.setRefnoSearch(rs.getString("cbs_ref_no")); + MyIntimationBeanObj.setTran_date(rs.getString("tran_date")); + MyIntimationBeanObj.setAuth_id(rs.getString("checker_id")); + MyIntimationBeanObj.setRemarks(rs.getString("remarks")); + MyIntimationBeanObj.setAmount(rs.getString("txn_amt")); + MyIntimationBeanObj.setStatus(rs.getString("status")); + MyIntimationBeanObj.setPacsID(rs.getString("pacs_id")); + MyIntimationBeanObj.setPacsName(rs.getString("pacs_name")); + MyIntimationBeanObj.setCBSAcc(rs.getString("link_accno")); + + alMyIntimationBean.add(MyIntimationBeanObj); + + request.setAttribute("displayFlag", "Y"); + + } + } + + // MyIntimationBeanObj.setRefno(request.getParameter("refno")); + // MyIntimationBeanObj.setTransactiontype(request.getParameter("transactiontype")); + //MyIntimationBeanObj.setFromDate(request.getParameter("fromDate")); + //MyIntimationBeanObj.setToDate(request.getParameter("toDate")); + //MyIntimationBeanObj.setCheckOption(request.getParameter("checkOption")); + + + } catch (SQLException ex) { + // Logger.getLogger(MyIntimationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(MyIntimationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + if (searchFound == 0) { + message = "No data exists for selected item."; + request.setAttribute("message", message); + } + + request.setAttribute("oMyIntimationBeanSearchObj", MyIntimationBeanObj); + request.setAttribute("alMyIntimationBean", alMyIntimationBean); + request.setAttribute("message", message); + + request.getRequestDispatcher("/MyIntimation_STB.jsp").forward(request, response); + + } + +// + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/MyIntimationServlet_Trading.java b/IPKS_Updated/src/src/java/Controller/MyIntimationServlet_Trading.java new file mode 100644 index 0000000..3141d2b --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/MyIntimationServlet_Trading.java @@ -0,0 +1,193 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import LoginDb.DbHandler; +import DataEntryBean.MyIntimationBean; +import java.sql.SQLException; +import oracle.jdbc.OracleTypes; + +/** + * + * @author Tcs Helpdesk10 + */ +public class MyIntimationServlet_Trading extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + CallableStatement proc = null; + int searchFound = 0; + String message = ""; + + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = session.getAttribute("user").toString(); + String viewType = session.getAttribute("moduleName").toString(); + + MyIntimationBean MyIntimationBeanObj = new MyIntimationBean(); + ArrayList alMyIntimationBean = new ArrayList(); + + + try { + // BeanUtils.populate(MyIntimationBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(MyIntimationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(MyIntimationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call worklist.my_intimation(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(MyIntimationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, tellerId); + proc.setString(2, MyIntimationBeanObj.getRefno()); + proc.setString(3, pacsId); + proc.setString(4, MyIntimationBeanObj.getTransactiontype()); + proc.setString(5, MyIntimationBeanObj.getFromDate()); + proc.setString(6, MyIntimationBeanObj.getToDate()); + + proc.registerOutParameter(7, OracleTypes.CURSOR); + proc.registerOutParameter(8, java.sql.Types.VARCHAR); + proc.setString(8, viewType); + proc.setString(9, MyIntimationBeanObj.getCheckOption()); + proc.executeUpdate(); + + // rs = (ResultSet) proc.getObject(7); + + if (MyIntimationBeanObj.getCheckOption().equalsIgnoreCase("TTXN")) { + + while (rs.next()) { + searchFound = 1; + MyIntimationBeanObj = new MyIntimationBean(); + MyIntimationBeanObj.setAccount_no(rs.getString("acct_no")); + MyIntimationBeanObj.setAccount_no2(rs.getString("acct_no2")); + MyIntimationBeanObj.setAccount_bal(rs.getString("cum_curr_val")); + MyIntimationBeanObj.setRefnoSearch(rs.getString("cbs_ref_no")); + MyIntimationBeanObj.setTran_date(rs.getString("tran_date")); + MyIntimationBeanObj.setTransactiontypeSearch(rs.getString("txn_type")); + MyIntimationBeanObj.setAuth_id(rs.getString("checker_id")); + MyIntimationBeanObj.setRemarks(rs.getString("remarks")); + MyIntimationBeanObj.setAmount(rs.getString("txn_amt")); + MyIntimationBeanObj.setStatus(rs.getString("status")); + MyIntimationBeanObj.setSale_purchase_ref(rs.getString("SALE_PURCHASE_REF_ID")); + MyIntimationBeanObj.setTrade_product(rs.getString("trad_prod_name")); + + alMyIntimationBean.add(MyIntimationBeanObj); + + request.setAttribute("displayFlag", "Y"); + + } + } + + //MyIntimationBeanObj.setRefno(request.getParameter("refno")); + //MyIntimationBeanObj.setTransactiontype(request.getParameter("transactiontype")); + //MyIntimationBeanObj.setFromDate(request.getParameter("fromDate")); + //MyIntimationBeanObj.setToDate(request.getParameter("toDate")); + //MyIntimationBeanObj.setCheckOption(request.getParameter("checkOption")); + + + } catch (SQLException ex) { + // Logger.getLogger(MyIntimationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(MyIntimationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + if (searchFound == 0) { + message = "No data exists for selected item."; + request.setAttribute("message", message); + } + + request.setAttribute("oMyIntimationBeanSearchObj", MyIntimationBeanObj); + request.setAttribute("alMyIntimationBean", alMyIntimationBean); + request.setAttribute("message", message); + + request.getRequestDispatcher("/Trading_JSP/MyIntimation_Trading.jsp").forward(request, response); + + } + +// + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/NeftRtgsInitiationServlet.java b/IPKS_Updated/src/src/java/Controller/NeftRtgsInitiationServlet.java new file mode 100644 index 0000000..3655e9d --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/NeftRtgsInitiationServlet.java @@ -0,0 +1,275 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import java.io.InputStream; +import java.io.Reader; +import java.math.BigDecimal; +import java.net.URL; +import java.sql.Array; +import java.sql.Blob; +import java.sql.Clob; +import java.sql.Date; +import java.sql.NClob; +import java.sql.ParameterMetaData; +import java.sql.Ref; +import java.sql.ResultSetMetaData; +import java.sql.RowId; +import java.sql.SQLWarning; +import java.sql.SQLXML; +import java.sql.Time; +import java.sql.Timestamp; +import java.util.ArrayList; +import DataEntryBean.NeftRtgsEnquiryBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.Calendar; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import oracle.jdbc.OracleTypes; +import DataEntryBean.AccountCreationBean; +/** + * + * @author 981898 + */ +public class NeftRtgsInitiationServlet extends HttpServlet { + + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Statement statement = null; + Connection con = null; + CallableStatement proc = null; + String message = ""; + String trn_no=""; + String trn_no_2=""; + Integer err_count=0; + ResultSet rs=null; + Integer flag=0; + + + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + String handle=(String)request.getParameter("handle_id"); + + NeftRtgsEnquiryBean NeftRtgsEnquiryBeanObj=new NeftRtgsEnquiryBean(); + + if(handle.equalsIgnoreCase("Transfer")){ + //String ServletName = request.getParameter("handle_id"); + NeftRtgsEnquiryBean oNeftRtgsEnquiryBean = new NeftRtgsEnquiryBean(); + try { + // BeanUtils.populate(oNeftRtgsEnquiryBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + + // Logger.getLogger(NeftRtgsInitiationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + + // Logger.getLogger(NeftRtgsInitiationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call neft_rtgs_transfer(?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(NeftRtgsInitiationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + // proc.setString(1, request.getParameter("accNo")); + //proc.setString(2,request.getParameter("destAccNoVal")); + // proc.setString(3, request.getParameter("ifscNoVal")); + // proc.setString(4, request.getParameter("transAmtVal")); + proc.setString(5,user); + proc.setString(6, pacsId); + // proc.setString(7, request.getParameter("benNameVal")); + //proc.setString(8, request.getParameter("benAddressVal")); + // proc.setString(9, request.getParameter("comAmtVal")); + proc.registerOutParameter(10, java.sql.Types.VARCHAR); + proc.registerOutParameter(11, java.sql.Types.VARCHAR); + proc.registerOutParameter(12, java.sql.Types.INTEGER); + proc.registerOutParameter(13,java.sql.Types.VARCHAR); + //proc.setString(14,request.getParameter("bankOption")); + proc.execute(); + + // trn_no=proc.getString(10); + trn_no_2=proc.getString(11); + err_count=proc.getInt(12); + // message = proc.getString(13); + + if((trn_no!=null)&&(trn_no!="")) + { + request.setAttribute("displayFlag", "N"); + message="Transaction is posted for authorization with Reference ID : " + trn_no ; + } + else { + //message="Transaction failed.Please check the available balance and try again."; + request.setAttribute("message", message); + request.getRequestDispatcher("/NeftRtgsInitiation.jsp").forward(request, response); + } + + } catch (SQLException ex) { + + message="Transaction failed.Kindly provide proper input."; + // Logger.getLogger(NeftRtgsInitiationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { +// message="Transaction failed."; +// Logger.getLogger(NeftRtgsInitiationServlet.class.getName()).log(Level.SEVERE, null, ex); +// System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/NeftRtgsInitiation.jsp").forward(request, response); + } + } + + if(handle.equalsIgnoreCase("Details")){ + NeftRtgsEnquiryBean oNeftRtgsEnquiryBean = new NeftRtgsEnquiryBean(); + NeftRtgsEnquiryBean EnqBean= new NeftRtgsEnquiryBean(); + ArrayList alNeftRtgsEnquiryBean = new ArrayList(); + try { + // BeanUtils.populate(oNeftRtgsEnquiryBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(NeftRtgsInitiationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(NeftRtgsInitiationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call neft_rtgs_details(?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(NeftRtgsInitiationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + // proc.setString(1, request.getParameter("srcAccNo")); + // proc.setString(2, request.getParameter("destAccNo2")); + // proc.setString(3, request.getParameter("ifscNoVal2")); + // proc.setString(4, request.getParameter("refNo")); + // proc.setString(5, request.getParameter("txnFromDate")); + // proc.setString(6, request.getParameter("txnDate")); + proc.setString(7, pacsId); + proc.registerOutParameter(8, OracleTypes.CURSOR); + proc.registerOutParameter(9, java.sql.Types.INTEGER); + proc.registerOutParameter(10,java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(10); + //rs = (ResultSet) proc.getObject(8); + + while(rs.next()) + { + oNeftRtgsEnquiryBean = new NeftRtgsEnquiryBean(); + oNeftRtgsEnquiryBean.setTxnNo(rs.getString("TXN_NO")); + oNeftRtgsEnquiryBean.setSrcAccNo(rs.getString("SRC_AC_NO")); + oNeftRtgsEnquiryBean.setRem_ac_no(rs.getString("REM_AC_NO")); + oNeftRtgsEnquiryBean.setDestAccNo2(rs.getString("DEST_AC_NO")); + oNeftRtgsEnquiryBean.setBankName(rs.getString("BANK_NAME")); + oNeftRtgsEnquiryBean.setBranchName(rs.getString("BRANCH_NAME")); + oNeftRtgsEnquiryBean.setIfscNoVal2(rs.getString("IFSC_CODE")); + oNeftRtgsEnquiryBean.setTransAmt(rs.getString("TXN_AMT")); + oNeftRtgsEnquiryBean.setStatus(rs.getString("STATUS")); + oNeftRtgsEnquiryBean.setTxnDate(rs.getString("TXN_DATE")); + oNeftRtgsEnquiryBean.setBen_name(rs.getString("beneficiary_name")); + oNeftRtgsEnquiryBean.setBen_add(rs.getString("beneficiary_address")); + oNeftRtgsEnquiryBean.setCom_amt(rs.getString("COMM_AMOUNT")); + oNeftRtgsEnquiryBean.setCom_txn_no(rs.getString("COMM_TXN_NO")); + oNeftRtgsEnquiryBean.setQueueNo(rs.getString("queue_no")); + oNeftRtgsEnquiryBean.setQueueNo2(rs.getString("queue_no2")); + //oNeftRtgsEnquiryBean.setBen_add(trn_no); + alNeftRtgsEnquiryBean.add(oNeftRtgsEnquiryBean); + request.setAttribute("displayFlag", "Y"); + flag=1; + } + + //String srcacno=request.getParameter("srcAccNo"); + // String destacno=request.getParameter("destAccNo2"); + // String ifsc_val=request.getParameter("ifscNoVal2"); + // String ref_no=request.getParameter("refNo"); + // String tranfrmdt=request.getParameter("txnFromDate"); + // String trantodt=request.getParameter("txnDate"); + + EnqBean.setSrcAccNo(srcacno); + EnqBean.setDestAccNo2(destacno); + EnqBean.setIfscNoVal2(ifsc_val); + EnqBean.setTxnNo(ref_no); + EnqBean.setFrom_date(tranfrmdt); + EnqBean.setTo_date(trantodt); + + } catch (SQLException ex) { + // Logger.getLogger(NeftRtgsInitiationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + //System.out.println(e.toString()); + System.out.println("Error occurred during proc close"); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(NeftRtgsInitiationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + + if(flag==0) + { + message="No Record to display."; + } + + request.setAttribute("EnqBean", EnqBean); + request.setAttribute("oNeftRtgsEnquiryBean", oNeftRtgsEnquiryBean); + request.setAttribute("alNeftRtgsEnquiryBean", alNeftRtgsEnquiryBean); + request.setAttribute("message", message); + request.getRequestDispatcher("/NeftRtgsInitiation.jsp").forward(request, response); + + } + + } + + } +} diff --git a/IPKS_Updated/src/src/java/Controller/OtpResendServlet.java b/IPKS_Updated/src/src/java/Controller/OtpResendServlet.java new file mode 100644 index 0000000..66a812b --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/OtpResendServlet.java @@ -0,0 +1,81 @@ +package Controller; + +import LoginDb.OtpUtility; +import java.io.IOException; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1815522 + */ +public class OtpResendServlet extends HttpServlet { + + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + String user = (String) session.getAttribute("user"); + String pacsId = (String) session.getAttribute("pacsId"); + + //System.out.println("debug checkpoint : "+user+" "+pacsId); + + OtpUtility ou = new OtpUtility(); + String verifyId = ou.sendOtp(user, pacsId, request, response); + //System.out.println("----------------------------------" + verifyId); + if (verifyId != null) { + response.setHeader("Strict-Transport-Security", "max-age=7776000; includeSubdomains"); + request.setAttribute("otp_flag", "valid"); + session.setAttribute("verifyId", verifyId); + request.getRequestDispatcher("/Login.jsp").forward(request, response); + + } else { + request.setAttribute("error", "Error in otp generation."); + request.getRequestDispatcher("/Login.jsp").forward(request, response); + session.invalidate(); + } + + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/OtpVerificationServlet.java b/IPKS_Updated/src/src/java/Controller/OtpVerificationServlet.java new file mode 100644 index 0000000..859c582 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/OtpVerificationServlet.java @@ -0,0 +1,76 @@ +package Controller; + +import LoginDb.OtpUtility; +import java.io.IOException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +public class OtpVerificationServlet extends HttpServlet { + + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + String verifyId = (String) session.getAttribute("verifyId"); + //String otp = request.getParameter("otp"); + String user = (String) session.getAttribute("user"); + String pacsId = (String) session.getAttribute("pacsId"); + OtpUtility ou = new OtpUtility(); + + String message = ou.verifyValidateOtp(verifyId, otp, user, pacsId); + + if (message.equals("OTP Verified Successfully!")) { + + ArrayList al = (ArrayList) session.getAttribute("list"); + session.setAttribute("UserName", al.get(0)); + session.setAttribute("pacsName", al.get(1)); + session.setAttribute("userRole", al.get(2)); + session.setAttribute("RoleName", al.get(3)); + session.setAttribute("subPacsFlag", al.get(4)); + session.setAttribute("headPacsId", al.get(5)); + + //request.getRequestDispatcher("/welcome.jsp").forward(request, response); + response.sendRedirect("./welcome.jsp"); + + } else if (message.equals("OTP has been Already Verified")) { + request.setAttribute("error", "OTP has already been verified"); + request.getRequestDispatcher("/Login.jsp").forward(request, response); + session.invalidate(); + } else if (message.equals("Incorrect Otp!")) { + request.setAttribute("error", "Incorrect Otp"); + request.setAttribute("otp_flag", "valid");//required to show the otp screen again + request.getRequestDispatcher("/Login.jsp").forward(request, response); + //session.invalidate(); + } else if (message.equals("OTP has been Expired!")) { + request.setAttribute("error", "OTP has been Expired"); + request.getRequestDispatcher("/Login.jsp").forward(request, response); + session.invalidate(); + } else { + request.setAttribute("error", "Otp Error Occured"); + request.getRequestDispatcher("/Login.jsp").forward(request, response); + session.invalidate(); + } + + } + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/PDSServlet.java b/IPKS_Updated/src/src/java/Controller/PDSServlet.java new file mode 100644 index 0000000..4da4698 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/PDSServlet.java @@ -0,0 +1,72 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 986137 + */ +public class PDSServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + session.setAttribute("moduleName", "pds"); + request.getRequestDispatcher("/welcome.jsp").forward(request, response); + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/PLAppropriationServlet.java b/IPKS_Updated/src/src/java/Controller/PLAppropriationServlet.java new file mode 100644 index 0000000..8ee191e --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/PLAppropriationServlet.java @@ -0,0 +1,299 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; +import DataEntryBean.mocProcessingBean; +import java.sql.BatchUpdateException; + +/** + * + * @author 981898 + */ +public class PLAppropriationServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet BatchTransactionServlet"); + out.println(""); + out.println(""); + out.println("

Servlet BatchTransactionServlet at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + String handle_id = request.getParameter("handle_id"); + int counter = Integer.parseInt(request.getParameter("rowCounter")); + String batchID = null; + Connection con = null; + Statement proc = null; + Connection connection = null; + CallableStatement stmt = null; + mocProcessingBean oMocProcessingBean; + ArrayList alMocProcessingBean = new ArrayList(); + + if ("create".equalsIgnoreCase(handle_id)) { + + + for (int i = 1; i <= counter; i++) { + try { + oMocProcessingBean = new mocProcessingBean(); + // oMocProcessingBean.setAccNo(request.getParameter("accNo" + i)); + //oMocProcessingBean.setTxnAmt(request.getParameter("txnAmt" + i)); + // oMocProcessingBean.setTxnInd(request.getParameter("txnInd" + i)); + //oMocProcessingBean.setSec_acc_no(request.getParameter("secAccNo"+i)); + // oMocProcessingBean.setNarration(request.getParameter("txnNarration" + i)); + + alMocProcessingBean.add(oMocProcessingBean); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + + } + + if (alMocProcessingBean.size() > 0) { + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + proc = con.createStatement(); + // ResultSet rs = proc.executeQuery("select MOC_TXN_DETAILS_SEQ.NEXTVAL from dual"); + while (rs.next()) { + batchID = rs.getString(1); + } + proc.close(); + for (int j = 0; j < alMocProcessingBean.size(); j++) { + stmt = con.prepareCall("{ call operations2.moc_txn_entry_pl_appro(?,?,?,?,?,?,?,?,?) }"); + oMocProcessingBean = alMocProcessingBean.get(j); + stmt.setString(1, oMocProcessingBean.getAccNo()); + stmt.setString(2, oMocProcessingBean.getTxnAmt()); + stmt.setString(3, oMocProcessingBean.getTxnInd()); + stmt.setString(4, oMocProcessingBean.getSec_acc_no()); + stmt.setString(5, oMocProcessingBean.getNarration()); + stmt.setString(6, pacsId); + stmt.setString(7, batchID); + stmt.setString(8, user); + stmt.registerOutParameter(9, java.sql.Types.VARCHAR); + //stmt.addBatch(); + stmt.execute(); + //message = stmt.getString(9); + if (!message.equalsIgnoreCase("PL Appropriation MOC transaction details saved successfully")) { + con.rollback(); + break; + } + stmt.close(); + } + if (message.equalsIgnoreCase("PL Appropriation MOC transaction details saved successfully")) { + message = message + " with PL ID: " + batchID; + con.commit(); + } + //message = "Batch details saved successfully"; + /*message = stmt.getString(6); + if(!message.equalsIgnoreCase("Batch transaction details saved successfully")){ + con.rollback(); + }*/ + + } catch (BatchUpdateException ex) { + + try { + con.rollback(); + + //SuccessFlag = BatchExecutionFailedOperationObject.BatchExecutionFailedOperation("DepositKYCCreation.jsp", hdrId); + /*if(!stmt.getString(6).isEmpty()) + message = stmt.getString(6); + else*/ + message = "Error in savings batch details"; + // message = ex.toString(); + + + } catch (SQLException ex1) { + System.out.println("Error occurred during processing."); + } + + System.out.println("Error occurred during processing."); + } catch (SQLException ex1) { + message = "Error occurred in saving batch details. Please try Again!"; + System.out.println("Error occurred during processing."); + } finally { +// try { +// //stmt.close(); +// } catch (SQLException e) { +// System.out.println(e.toString()); +// } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/PLAppropriationOperations.jsp").forward(request, response); + } + if ("search".equalsIgnoreCase(handle_id)) { + + // batchID = request.getParameter("batchID"); + + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + try { + + // resultset = statement.executeQuery("select m.accno1,m.txn_ind,m.txn_amt,m.accno2,m.status,nvl(m.ref_no,'NA'),m.narration from PL_APPRO_MOC_POSTING_DTL m where m.batch_id = '" + batchID + "' and m.status='ACTIVE' and m.pacs_id = '" + pacsId + "' "); + + while (resultset.next()) { + oMocProcessingBean = new mocProcessingBean(); + oMocProcessingBean.setAccNo(resultset.getString(1)); + oMocProcessingBean.setTxnInd(resultset.getString(2)); + oMocProcessingBean.setTxnAmt(resultset.getString(3)); + oMocProcessingBean.setSec_acc_no(resultset.getString(4)); + oMocProcessingBean.setTxnStatus(resultset.getString(5)); + oMocProcessingBean.setTxnRefNo(resultset.getString(6)); + oMocProcessingBean.setNarration(resultset.getString(7)); + + alMocProcessingBean.add(oMocProcessingBean); + SeachFound = 1; + } + if (alMocProcessingBean.size() > 0) { + request.setAttribute("alMocProcessingBean", alMocProcessingBean); + request.setAttribute("message", ""); + request.setAttribute("handle_id", "S"); + request.setAttribute("batchID", batchID); + } + //request.setAttribute("displayFlag", "Y"); + + + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + statement.close(); + connection.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + if (SeachFound == 0) { + message = "BatchID " + batchID + " not found"; + request.setAttribute("message", message); + } + + request.getRequestDispatcher("/Deposit/PLAppropriationOperations.jsp").forward(request, response); + } + + if ("execute".equalsIgnoreCase(handle_id)) { + // batchID = request.getParameter("batchID"); + try { + connection = DbHandler.getDBConnection(); + connection.setAutoCommit(false); + stmt = connection.prepareCall("{ call operations2.PROC_MOC_POST_FIN_pl_appro(?,?,?,?) }"); + stmt.setString(1, batchID); + stmt.setString(2, pacsId); + stmt.setString(3, user); + stmt.registerOutParameter(4, java.sql.Types.VARCHAR); + //stmt.addBatch(); + stmt.execute(); + // message = stmt.getString(4); + if (message.equalsIgnoreCase("PL Appropriation MOC transactions successfully posted")) { + + connection.commit(); + } else { + connection.rollback(); + } + request.setAttribute("message", message); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + connection.close(); + stmt.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + request.getRequestDispatcher("/Deposit/PLAppropriationOperations.jsp").forward(request, response); + } + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/PacsManagementServlet.java b/IPKS_Updated/src/src/java/Controller/PacsManagementServlet.java new file mode 100644 index 0000000..73f5e36 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/PacsManagementServlet.java @@ -0,0 +1,335 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.PacsManagementBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author Tcs Helpdesk10 + */ +public class PacsManagementServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + + Connection con = null; + CallableStatement proc = null; + String message = ""; + + // String ServletName = request.getParameter("handle_id"); + + PacsManagementBean oPacsManagementBean = new PacsManagementBean(); + + if ("Create".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oPacsManagementBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(PacsManagementServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(PacsManagementServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_pacs_master(?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(PacsManagementServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oPacsManagementBean.getPacsCode()); + proc.setString(2, oPacsManagementBean.getPacsName()); + proc.setString(3, oPacsManagementBean.getDccb()); + proc.setString(4, oPacsManagementBean.getCbsBranchCode()); + proc.setString(5, oPacsManagementBean.getAddressLine1()); + proc.setString(6, oPacsManagementBean.getAddressLine2()); + proc.setString(7, oPacsManagementBean.getAddressLine3()); + proc.setString(8, oPacsManagementBean.getDistrictCode()); + proc.setString(9, oPacsManagementBean.getLiveFlag()); + proc.setString(10, oPacsManagementBean.getCmnPrkBglNo()); + proc.setString(11, oPacsManagementBean.getPacsConsAccNo()); + proc.setString(12, ServletName); + proc.setString(13, oPacsManagementBean.getHdPacsCode()); + + proc.execute(); + + message = " New PACS Created Successfully"; + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/pacsManagement.jsp").forward(request, response); + + } + + } else if ("Search".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oPacsManagementBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(PacsManagementServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(PacsManagementServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(PacsManagementServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + + // ResultSet rs = statement.executeQuery("select pacs_id,pacs_name,eff_date,dccb_code,cbs_br_code,CMN_PRK_BGLNO,PACS_CONS_ACCNO,addr1,addr2,addr3,district_code,state_code,micr_code,live_flag,head_pacs_id from pacs_master where pacs_id='" + oPacsManagementBean.getPacsCodeSearch() + "' and pacs_id!='99999' and pacs_name!='GLOBAL' "); + + while (rs.next()) { + + oPacsManagementBean.setEffectDate(rs.getString("EFF_DATE")); + oPacsManagementBean.setPacsName(rs.getString("PACS_NAME")); + oPacsManagementBean.setPacsCode(rs.getString("PACS_ID")); + oPacsManagementBean.setDccb(rs.getString("DCCB_CODE")); + oPacsManagementBean.setCbsBranchCode(rs.getString("CBS_BR_CODE")); + oPacsManagementBean.setCmnPrkBglNo(rs.getString("CMN_PRK_BGLNO")); + oPacsManagementBean.setPacsConsAccNo(rs.getString("PACS_CONS_ACCNO")); + oPacsManagementBean.setAddressLine1(rs.getString("ADDR1")); + oPacsManagementBean.setAddressLine2(rs.getString("ADDR2")); + oPacsManagementBean.setAddressLine3(rs.getString("ADDR3")); + oPacsManagementBean.setDistrictCode(rs.getString("DISTRICT_CODE")); + oPacsManagementBean.setLiveFlag(rs.getString("LIVE_FLAG")); + oPacsManagementBean.setHdPacsCode(rs.getString("head_pacs_id")); + + + SeachFound = 1; + //Displayflag needs to be set to Y here + request.setAttribute("displayFlag", "Y"); + + } + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(PacsManagementServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + if (SeachFound == 0) { + message = "PACS Code not exists in the system"; + request.setAttribute("message", message); + } + request.setAttribute("oPacsManagementBeanObj", oPacsManagementBean); + request.getRequestDispatcher("/pacsManagement.jsp").forward(request, response); + + } else if ("Update".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oPacsManagementBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(PacsManagementServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(PacsManagementServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_pacs_master(?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(PacsManagementServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oPacsManagementBean.getPacsCodeAmend()); + proc.setString(2, oPacsManagementBean.getPacsNameAmend()); + proc.setString(3, oPacsManagementBean.getDccbAmend()); + proc.setString(4, oPacsManagementBean.getCbsBranchCodeAmend()); + proc.setString(5, oPacsManagementBean.getAddressLine1Amend()); + proc.setString(6, oPacsManagementBean.getAddressLine2Amend()); + proc.setString(7, oPacsManagementBean.getAddressLine3Amend()); + proc.setString(8, oPacsManagementBean.getDistrictCodeAmend()); + proc.setString(9, oPacsManagementBean.getLiveFlagAmend()); + proc.setString(10, oPacsManagementBean.getCmnPrkBglNoAmend()); + proc.setString(11, oPacsManagementBean.getPacsConsAccNoAmend()); + + proc.setString(12, ServletName); + + proc.execute(); + + message = "PACS Updated Successfully"; + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/pacsManagement.jsp").forward(request, response); + + } + + } + + //else if ("StatusSearch".equalsIgnoreCase(ServletName)) + /*{ + + String bglCodeActivation=request.getParameter("bglCodeActivation"); + String vFlag=request.getParameter("BglstatusFlag"); + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.gl_product_Activation(?,?,?)}"); + } catch (SQLException ex) { + Logger.getLogger(PacsManagementServlet.class.getName()).log(Level.SEVERE, null, ex); + } + + proc.setString(1, bglCodeActivation); + proc.setString(2,vFlag); + proc.registerOutParameter(3, java.sql.Types.VARCHAR); + + proc.execute(); + + + message = proc.getString(3); + + } catch (SQLException ex) { + Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + } finally { + try { + proc.close(); + } catch (SQLException e) { + } + try { + con.close(); + } catch (SQLException ex) { + Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/pacsManagement.jsp").forward(request, response); + + } + + }*/ + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/PacsReportDownload.java b/IPKS_Updated/src/src/java/Controller/PacsReportDownload.java new file mode 100644 index 0000000..eba20b7 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/PacsReportDownload.java @@ -0,0 +1,91 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import javax.servlet.ServletException; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 454222 + */ +public class PacsReportDownload extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + //String fileName = request.getParameter("file_name"); + // String date = request.getParameter("datepickerhidden"); + //String directoryName = date.split("/")[0] + date.split("/")[1] + date.split("/")[2]; + String directoryName = date.split("/")[2] + date.split("/")[1] + date.split("/")[0]; + String filePath = getServletContext().getInitParameter("pacs-report") + File.separator + session.getAttribute("pacsId").toString() + File.separator + directoryName + File.separator + fileName; + + response.setContentType("text/plain"); + response.setHeader("Content-Disposition", "attachment; filename=" + fileName); + ///*Workbook workbook = (new CreateExcel()).createExcel(IcrBrBeanObj); + ServletOutputStream outStream = response.getOutputStream(); + File downloadFile = new File(filePath); + FileInputStream inStream = new FileInputStream(downloadFile); + byte[] buffer = new byte[4096]; + int bytesRead = -1; + + while ((bytesRead = inStream.read(buffer)) != -1) { + outStream.write(buffer, 0, bytesRead); + } + + //workbook.write(outStream); + outStream.close(); + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/PassbookServlet.java b/IPKS_Updated/src/src/java/Controller/PassbookServlet.java new file mode 100644 index 0000000..fd58e9c --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/PassbookServlet.java @@ -0,0 +1,750 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import java.io.PrintWriter; +import DataEntryBean.EnquiryBean; +import DataEntryBean.GLTransactionEnquiryBean; +import DataEntryBean.GlAccountEnquiryBean; +import DataEntryBean.PassbookBean; +import DataEntryBean.TransactionEnquiryBean; +import LoginDb.DbHandler; +import Passbook.PassbookPrinter; +import java.io.FileInputStream; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.Properties; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import oracle.jdbc.OracleTypes; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author IPKS + */ +public class PassbookServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet PassbookServlet"); + out.println(""); + out.println(""); + out.println("

Servlet PassbookServlet at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection connection = null; + ResultSet rs = null; + CallableStatement proc = null; + int totalCount = 0; + int gapNoOfLines = 0; + int gap = 3; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String headPacsId = (String) session.getAttribute("headPacsId"); + String pacsName = (String) session.getAttribute("pacsName"); + int date_width = 12; + int narr_width = 50; + int dr_width = 15; + int cr_width = 15; + int endbal_width = 20; + int header = 3; + int prod_width = 0; + String from_date = ""; + String to_date = ""; + String printType = ""; + String accNo = ""; + String acctSubType=""; + + int recordsPerPage = 32; + int noOfPages = 0; + + // String accType = request.getParameter("accType"); + // String accSubType = request.getParameter("accSubType"); + // String pacsName = request.getParameter("pacsName"); + + PassbookBean oPassbookBean = new PassbookBean(); + ArrayList alPassbookBean = new ArrayList(); + ArrayList arr = new ArrayList(); + + int page = 1; + String reprint = request.getParameter("reprint"); + if (request.getParameter("page") != null + && !(request.getParameter("page").equals("1")) && !(request.getParameter("page").equals("null"))) { + // page = Integer.parseInt(request.getParameter("page")); + if (null != reprint && !(reprint.equals(""))) { + if (reprint.equals("Y")) { + page = page + 1; + } + } + + } + + try { + Properties prop = new Properties(); + String propFileName = "config.properties"; + String absolute = getClass().getProtectionDomain().getCodeSource().getLocation().toExternalForm(); + absolute = absolute.substring(absolute.indexOf("/") + 1, absolute.lastIndexOf("/") + 1); + System.out.println(absolute); + absolute = absolute.replace('\\', '/'); + absolute = absolute.concat(propFileName); + + + prop.load(new FileInputStream(absolute)); + + System.out.println(absolute); + //throw new FileNotFoundException("property file '" + propFileName + "' not found in the classpath"); + gap = Integer.parseInt(prop.getProperty("GAP")); + header = Integer.parseInt(prop.getProperty("HEADER")); + recordsPerPage = Integer.parseInt(prop.getProperty("RECORDSPERPAGE")); + prod_width = Integer.parseInt(prop.getProperty("PROD_WIDTH")); + + System.out.println("header: " + header); + System.out.println("gapNoOfLines: " + gapNoOfLines); + System.out.println("recordsPerPage: " + recordsPerPage); + System.out.println("PROD_WIDTH: " +prod_width); + //inputStream.close(); + + } catch (Exception e) { + // System.out.println("Exception: " + e); + System.out.println("Error occurred during processing."); + + } finally { + System.out.println("Processing done."); + } + + int startRow = 0; + int endRow = 0; + startRow = (page - 1) * recordsPerPage + 1; + System.out.println("startROW: " + startRow); + endRow = page * recordsPerPage; + System.out.println("endROW: " + endRow); + int recordCount = 0; + + int totalRecordCount = 0; + //totalRecordCount = Integer.parseInt(request.getParameter("totalRecordCount")); + + try { + // BeanUtils.populate(oPassbookBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + printType = oPassbookBean.getPrintType(); + accNo = oPassbookBean.getAccNo(); + + if (oPassbookBean.getPrintType().equalsIgnoreCase("U")) { + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call Passbook.passbookPrint(?,?,?,?,?,?,?,?,?,?,?) }"); + System.out.println("Calling Procedure"); + } catch (SQLException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing. of Procedure"); + ex.printStackTrace(); + } + + proc.setString(1, oPassbookBean.getAccNo()); + proc.setString(2, oPassbookBean.getPrintType()); + proc.setString(3, oPassbookBean.getAccType()); + proc.setString(4, pacsId); + proc.registerOutParameter(5, OracleTypes.CURSOR); + proc.registerOutParameter(6, OracleTypes.NUMBER); + proc.registerOutParameter(7, OracleTypes.NUMBER); + proc.setString(8, oPassbookBean.getFrom_date()); + proc.setString(9, oPassbookBean.getTo_date()); + proc.setInt(10, startRow); + proc.setInt(11, endRow); + proc.executeUpdate(); + + //rs = (ResultSet) proc.getObject(5); + totalCount = proc.getInt(7); + System.out.println("totalcount: " +totalCount); + + gapNoOfLines = totalCount % recordsPerPage; + System.out.println("gapNoOfLines: " +gapNoOfLines); + if (gapNoOfLines > (recordsPerPage / 2)) { + gapNoOfLines = gapNoOfLines + 3; + } + int j = 0; + gapNoOfLines = gapNoOfLines + header; + System.out.println("gapNoOfLines after adding header: " + gapNoOfLines); + for (j = 0; j < gapNoOfLines; j++) { + oPassbookBean = new PassbookBean(); + alPassbookBean.add(oPassbookBean); + } + //j = 0; + while (rs.next()) { + + if (j == ((recordsPerPage / 2) + header)) { + for (int i = 0; i < gap; i++) { + oPassbookBean = new PassbookBean(); + alPassbookBean.add(oPassbookBean); + } + } + oPassbookBean = new PassbookBean(); + oPassbookBean.setTxn_date(rs.getString("txn_date")); + oPassbookBean.setAccNo(accNo); + oPassbookBean.setNarration(rs.getString("narration")); + if (rs.getString("DR_AMT").equalsIgnoreCase("0")) { + oPassbookBean.setDr_amt(""); + } else { + oPassbookBean.setDr_amt(rs.getString("DR_AMT")); + } + if (rs.getString("CR_AMT").equalsIgnoreCase("0")) { + oPassbookBean.setCr_amt(""); + } else { + oPassbookBean.setCr_amt(rs.getString("CR_AMT")); + } + oPassbookBean.setEnd_bal(rs.getString("end_bal")); + oPassbookBean.setCBS_REF_NO(rs.getString("CBS_REF_NO")); + + j++; + alPassbookBean.add(oPassbookBean); + } + + //recordCount = alPassbookBean.size(); + + + //request.setAttribute("alPassbookBean", alPassbookBean); + /*PassbookPrinter oPassbookPrinter = new PassbookPrinter(alPassbookBean); + + if (oPassbookPrinter.successFlag) { + try { + proc = connection.prepareCall("{ call Passbook.updTxn(?,?) }"); + } catch (SQLException ex) { + Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + } + for (int i = 0; i < alPassbookBean.size(); i++) { + + oPassbookBean = alPassbookBean.get(i); + proc.setString(1, oPassbookBean.getCBS_REF_NO()); + proc.registerOutParameter(2, OracleTypes.VARCHAR); + + proc.executeUpdate(); + } + + message = (String) proc.getObject(2); + }*/ + + String addToPrinter = new String(); + for (int i = 0; i < alPassbookBean.size(); i++) { + + oPassbookBean = alPassbookBean.get(i); + addToPrinter = addToPrinter + padString(blankNull(oPassbookBean.getTxn_date()), date_width); + addToPrinter = addToPrinter + padString(blankNull(oPassbookBean.getNarration()), narr_width); + addToPrinter = addToPrinter + padString(blankNull(oPassbookBean.getDr_amt()), dr_width); + addToPrinter = addToPrinter + padString(blankNull(oPassbookBean.getCr_amt()), cr_width); + + /*if (!(oPassbookBean.getDr_amt() == null || oPassbookBean.getCr_amt() == null)) { + if (!oPassbookBean.getDr_amt().equalsIgnoreCase("0")) { + addToPrinter = addToPrinter + padString(blankNull(oPassbookBean.getDr_amt()),dr_width); + } else { + addToPrinter = addToPrinter + padString(blankNull(oPassbookBean.getDr_amt()),dr_width); + } + + if (!oPassbookBean.getCr_amt().equalsIgnoreCase("0")) { + addToPrinter = addToPrinter + padString(blankNull(oPassbookBean.getCr_amt()),cr_width); + } else { + addToPrinter = addToPrinter ; + } + } else { + addToPrinter = addToPrinter; + }*/ + addToPrinter = addToPrinter + padString(blankNull(oPassbookBean.getEnd_bal()), endbal_width); + addToPrinter = addToPrinter + "\n"; + arr.add(addToPrinter); + + } + + addToPrinter = addToPrinter.substring(0, addToPrinter.length() - 1); + /*for(int i=0;i + + public String padString(String s, int padlen) { + for (int i = s.length(); i <= padlen; i++) { + s = s + " "; + } + return s; + } + + public String leftPadString(String s, int padlen) { + for (int i = s.length(); i <= padlen; i++) { + s = " " + s; + } + return s; + } +} diff --git a/IPKS_Updated/src/src/java/Controller/PassbookServlet_29062018.java b/IPKS_Updated/src/src/java/Controller/PassbookServlet_29062018.java new file mode 100644 index 0000000..53fe1bc --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/PassbookServlet_29062018.java @@ -0,0 +1,666 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import java.io.PrintWriter; +import DataEntryBean.EnquiryBean; +import DataEntryBean.GLTransactionEnquiryBean; +import DataEntryBean.GlAccountEnquiryBean; +import DataEntryBean.PassbookBean; +import DataEntryBean.TransactionEnquiryBean; +import LoginDb.DbHandler; +import Passbook.PassbookPrinter; +import java.io.FileInputStream; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.Properties; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import oracle.jdbc.OracleTypes; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author IPKS + */ +public class PassbookServlet_29062018 extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet PassbookServlet"); + out.println(""); + out.println(""); + out.println("

Servlet PassbookServlet at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection connection = null; + ResultSet rs = null; + CallableStatement proc = null; + int totalCount = 0; + int gapNoOfLines = 0; + int gap = 3; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String headPacsId = (String) session.getAttribute("headPacsId"); + int date_width = 12; + int narr_width = 50; + int dr_width = 15; + int cr_width = 15; + int endbal_width = 20; + int header = 3; + int prod_width=0; + String from_date = ""; + String to_date = ""; + String printType=""; + String accNo=""; + + int recordsPerPage = 32; + int noOfPages = 0; + + String subpacs_id = request.getParameter("subpacs_id"); + + PassbookBean oPassbookBean = new PassbookBean(); + ArrayList alPassbookBean = new ArrayList(); + ArrayList arr = new ArrayList(); + + int page = 1; + String reprint = request.getParameter("reprint"); + if (request.getParameter("page") != null + && !(request.getParameter("page").equals("1")) && !(request.getParameter("page").equals("null"))) { + // page = Integer.parseInt(request.getParameter("page")); + if (null != reprint && !(reprint.equals(""))) { + if (reprint.equals("Y")) { + page = page + 1; + } + } + + } + + try { + Properties prop = new Properties(); + String propFileName = "config.properties"; + String absolute = getClass().getProtectionDomain().getCodeSource().getLocation().toExternalForm(); + absolute = absolute.substring(absolute.indexOf("/") + 1, absolute.lastIndexOf("/") + 1); + System.out.println(absolute); + absolute = absolute.replace('\\', '/'); + absolute = absolute.concat(propFileName); + + + prop.load(new FileInputStream(absolute)); + + System.out.println(absolute); + //throw new FileNotFoundException("property file '" + propFileName + "' not found in the classpath"); + gap = Integer.parseInt(prop.getProperty("GAP")); + header = Integer.parseInt(prop.getProperty("HEADER")); + recordsPerPage = Integer.parseInt(prop.getProperty("RECORDSPERPAGE")); + prod_width = Integer.parseInt(prop.getProperty("PROD_WIDTH")); + + System.out.println("header: " + header); + System.out.println("gapNoOfLines: " + gapNoOfLines); + //inputStream.close(); + + } catch (Exception e) { + // System.out.println("Exception: " + e); + System.out.println("header: " + header); + System.out.println("gapNoOfLines: " + gapNoOfLines); + } + + int startRow = 0; + int endRow = 0; + startRow = (page - 1) * recordsPerPage + 1; + endRow = page * recordsPerPage; + int recordCount = 0; + int totalRecordCount = 0; + //totalRecordCount = Integer.parseInt(request.getParameter("totalRecordCount")); + + try { + // BeanUtils.populate(oPassbookBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + printType = oPassbookBean.getPrintType(); + accNo = oPassbookBean.getAccNo(); + + if (oPassbookBean.getPrintType().equalsIgnoreCase("U")) { + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call Passbook.passbookPrint(?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oPassbookBean.getAccNo()); + proc.setString(2, oPassbookBean.getPrintType()); + proc.setString(3, oPassbookBean.getAccType()); + proc.setString(4, pacsId); + proc.registerOutParameter(5, OracleTypes.CURSOR); + proc.registerOutParameter(6, OracleTypes.NUMBER); + proc.registerOutParameter(7, OracleTypes.NUMBER); + proc.setString(8, oPassbookBean.getFrom_date()); + proc.setString(9, oPassbookBean.getTo_date()); + proc.setInt(10, startRow); + proc.setInt(11, endRow); + proc.executeUpdate(); + + // rs = (ResultSet) proc.getObject(5); + totalCount = proc.getInt(7); + + gapNoOfLines = totalCount % recordsPerPage; + if (gapNoOfLines > (recordsPerPage / 2)) { + gapNoOfLines = gapNoOfLines + 3; + } + int j = 0; + gapNoOfLines = gapNoOfLines + header; + System.out.println("gapNoOfLines after adding header: " + gapNoOfLines); + for (j = 0; j < gapNoOfLines; j++) { + oPassbookBean = new PassbookBean(); + alPassbookBean.add(oPassbookBean); + } + //j = 0; + while (rs.next()) { + + if (j == ((recordsPerPage / 2) + header)) { + for (int i = 0; i < gap; i++) { + oPassbookBean = new PassbookBean(); + alPassbookBean.add(oPassbookBean); + } + } + oPassbookBean = new PassbookBean(); + oPassbookBean.setTxn_date(rs.getString("txn_date")); + oPassbookBean.setNarration(rs.getString("narration")); + if (rs.getString("DR_AMT").equalsIgnoreCase("0")) { + oPassbookBean.setDr_amt(""); + } else { + oPassbookBean.setDr_amt(rs.getString("DR_AMT")); + } + if (rs.getString("CR_AMT").equalsIgnoreCase("0")) { + oPassbookBean.setCr_amt(""); + } else { + oPassbookBean.setCr_amt(rs.getString("CR_AMT")); + } + oPassbookBean.setEnd_bal(rs.getString("end_bal")); + oPassbookBean.setCBS_REF_NO(rs.getString("CBS_REF_NO")); + + j++; + alPassbookBean.add(oPassbookBean); + } + + //recordCount = alPassbookBean.size(); + + + //request.setAttribute("alPassbookBean", alPassbookBean); + /*PassbookPrinter oPassbookPrinter = new PassbookPrinter(alPassbookBean); + + if (oPassbookPrinter.successFlag) { + try { + proc = connection.prepareCall("{ call Passbook.updTxn(?,?) }"); + } catch (SQLException ex) { + Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + } + for (int i = 0; i < alPassbookBean.size(); i++) { + + oPassbookBean = alPassbookBean.get(i); + proc.setString(1, oPassbookBean.getCBS_REF_NO()); + proc.registerOutParameter(2, OracleTypes.VARCHAR); + + proc.executeUpdate(); + } + + message = (String) proc.getObject(2); + }*/ + + String addToPrinter = new String(); + for (int i = 0; i < alPassbookBean.size(); i++) { + + oPassbookBean = alPassbookBean.get(i); + addToPrinter = addToPrinter + padString(blankNull(oPassbookBean.getTxn_date()), date_width); + addToPrinter = addToPrinter + padString(blankNull(oPassbookBean.getNarration()), narr_width); + addToPrinter = addToPrinter + padString(blankNull(oPassbookBean.getDr_amt()), dr_width); + addToPrinter = addToPrinter + padString(blankNull(oPassbookBean.getCr_amt()), cr_width); + + /*if (!(oPassbookBean.getDr_amt() == null || oPassbookBean.getCr_amt() == null)) { + if (!oPassbookBean.getDr_amt().equalsIgnoreCase("0")) { + addToPrinter = addToPrinter + padString(blankNull(oPassbookBean.getDr_amt()),dr_width); + } else { + addToPrinter = addToPrinter + padString(blankNull(oPassbookBean.getDr_amt()),dr_width); + } + + if (!oPassbookBean.getCr_amt().equalsIgnoreCase("0")) { + addToPrinter = addToPrinter + padString(blankNull(oPassbookBean.getCr_amt()),cr_width); + } else { + addToPrinter = addToPrinter ; + } + } else { + addToPrinter = addToPrinter; + }*/ + addToPrinter = addToPrinter + padString(blankNull(oPassbookBean.getEnd_bal()), endbal_width); + addToPrinter = addToPrinter + "\n"; + arr.add(addToPrinter); + + } + + /*for(int i=0;i + + public String padString(String s, int padlen) { + for (int i = s.length(); i <= padlen; i++) { + s = s + " "; + } + return s; + } + + public String leftPadString(String s, int padlen) { + for (int i = s.length(); i <= padlen; i++) { + s = " " + s; + } + return s; + } +} diff --git a/IPKS_Updated/src/src/java/Controller/PaymentAcknowledgementServlet.java b/IPKS_Updated/src/src/java/Controller/PaymentAcknowledgementServlet.java new file mode 100644 index 0000000..ac5d05d --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/PaymentAcknowledgementServlet.java @@ -0,0 +1,214 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.PaymentAcknowledgementBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 986137 + */ +public class PaymentAcknowledgementServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + Connection con = null; + CallableStatement proc = null; + String message = ""; + HttpSession session = request.getSession(); + // String ServletName = request.getParameter("handle_id"); + + PaymentAcknowledgementBean oPaymentAcknowledgementBean = new PaymentAcknowledgementBean(); + + + + try { + // BeanUtils.populate(oPaymentAcknowledgementBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call TRADING_OPERATION.trading_payment_ack(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(UserMaintenanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + String pacsId = session.getAttribute("pacsId").toString(); + String makerId = session.getAttribute("user").toString(); + + //String twothouIN = request.getParameter("twothouIN").isEmpty() ? "0" : (request.getParameter("twothouIN")); + //String twothouOUT = request.getParameter("twothouOUT").isEmpty() ? "0" : (request.getParameter("twothouOUT")); + //String fivehundredIN = request.getParameter("fivehundredIN").isEmpty() ? "0" : (request.getParameter("fivehundredIN")); + //String fivehundredOUT = request.getParameter("fivehundredOUT").isEmpty() ? "0" : (request.getParameter("fivehundredOUT")); + //String hundredIN = request.getParameter("hundredIN").isEmpty() ? "0" : (request.getParameter("hundredIN")); + //String hundredOUT = request.getParameter("hundredOUT").isEmpty() ? "0" : (request.getParameter("hundredOUT")); + //String fiftyIN = request.getParameter("fiftyIN").isEmpty() ? "0" : (request.getParameter("fiftyIN")); + //String fiftyOUT = request.getParameter("fiftyOUT").isEmpty() ? "0" : (request.getParameter("fiftyOUT")); + //String twentyIN = request.getParameter("twentyIN").isEmpty() ? "0" : (request.getParameter("twentyIN")); + //String twentyOUT = request.getParameter("twentyOUT").isEmpty() ? "0" : (request.getParameter("twentyOUT")); + //String tenIN = request.getParameter("tenIN").isEmpty() ? "0" : (request.getParameter("tenIN")); + //String tenOUT = request.getParameter("tenOUT").isEmpty() ? "0" : (request.getParameter("tenOUT")); + //String fiveIN = request.getParameter("fiveIN").isEmpty() ? "0" : (request.getParameter("fiveIN")); + //String fiveOUT = request.getParameter("fiveOUT").isEmpty() ? "0" : (request.getParameter("fiveOUT")); + //String twoIN = request.getParameter("twoIN").isEmpty() ? "0" : (request.getParameter("twoIN")); + //String twoOUT = request.getParameter("twoOUT").isEmpty() ? "0" : (request.getParameter("twoOUT")); + //String oneIN = request.getParameter("oneIN").isEmpty() ? "0" : (request.getParameter("oneIN")); + //String oneOUT = request.getParameter("oneOUT").isEmpty() ? "0" : (request.getParameter("oneOUT")); + //String fiftyPaisaIN = request.getParameter("fiftyPaisaIN").isEmpty() ? "0" : (request.getParameter("fiftyPaisaIN")); + //String fiftyPaisaOUT = request.getParameter("fiftyPaisaOUT").isEmpty() ? "0" : (request.getParameter("fiftyPaisaOUT")); + //String onePaisaIN = request.getParameter("onePaisaIN").isEmpty() ? "0" : (request.getParameter("onePaisaIN")); + //String onePaisaOUT = request.getParameter("onePaisaOUT").isEmpty() ? "0" : (request.getParameter("onePaisaOUT")); + //String twohundredIN = request.getParameter("twohundredIN").isEmpty() ? "0" : (request.getParameter("twohundredIN")); + //String twohundredOUT = request.getParameter("twohundredOUT").isEmpty() ? "0" : (request.getParameter("twohundredOUT")); + + + proc.setString(1, ServletName); + if ("V".equalsIgnoreCase(ServletName)) { + proc.setString(2, oPaymentAcknowledgementBean.getVnetAmt()); + proc.setString(3, oPaymentAcknowledgementBean.getOrderno()); + proc.setString(4, oPaymentAcknowledgementBean.getVpayMode()); + } else if ("S".equalsIgnoreCase(ServletName)) { + proc.setString(2, oPaymentAcknowledgementBean.getCnetAmt()); + proc.setString(3, oPaymentAcknowledgementBean.getSalesrefno()); + proc.setString(4, oPaymentAcknowledgementBean.getCpayMode()); + } + + proc.setString(5, makerId); + proc.setString(6, twothouIN); + proc.setString(7, fivehundredIN); + proc.setString(8, hundredIN); + proc.setString(9, fiftyIN); + proc.setString(10, twentyIN); + proc.setString(11, tenIN); + proc.setString(12, fiveIN); + proc.setString(13, twoIN); + proc.setString(14, oneIN); + proc.setString(15, fiftyPaisaIN); + proc.setString(16, onePaisaIN); + proc.setString(17, twothouOUT); + proc.setString(18, fivehundredOUT); + proc.setString(19, hundredOUT); + proc.setString(20, fiftyOUT); + proc.setString(21, twentyOUT); + proc.setString(22, tenOUT); + proc.setString(23, fiveOUT); + proc.setString(24, twoOUT); + proc.setString(25, oneOUT); + proc.setString(26, fiftyPaisaOUT); + proc.setString(27, onePaisaOUT); + if ("V".equalsIgnoreCase(ServletName)) { + proc.setString(28, oPaymentAcknowledgementBean.getVsgst()); + proc.setString(29, oPaymentAcknowledgementBean.getVcgst()); + proc.setString(31, oPaymentAcknowledgementBean.getVtrfAcc()); + proc.setString(34, oPaymentAcknowledgementBean.getVtobepaid()); + } else if ("S".equalsIgnoreCase(ServletName)) { + proc.setString(28, oPaymentAcknowledgementBean.getCsgst()); + proc.setString(29, oPaymentAcknowledgementBean.getCcgst()); + proc.setString(31, oPaymentAcknowledgementBean.getCtrfAcc()); + proc.setString(34, oPaymentAcknowledgementBean.getCtobepaid()); + } + proc.setString(30, oPaymentAcknowledgementBean.getDisAmt()); + proc.setString(32, pacsId); + proc.setString(33, oPaymentAcknowledgementBean.getProd_id()); + proc.registerOutParameter(35, java.sql.Types.VARCHAR); + proc.setString(36, twohundredIN); + proc.setString(37, twohundredOUT); + + proc.execute(); + + // message = proc.getString(35); + + } catch (SQLException ex) { + // Logger.getLogger(UserMaintenanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UserMaintenanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Trading_JSP/PaymentAcknowldgement.jsp").forward(request, response); + + } + + + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/PayrollBglMasterServlet.java b/IPKS_Updated/src/src/java/Controller/PayrollBglMasterServlet.java new file mode 100644 index 0000000..690a04b --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/PayrollBglMasterServlet.java @@ -0,0 +1,290 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.PayrollBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.sql.CallableStatement; +import java.sql.Statement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import java.lang.reflect.InvocationTargetException; + +/** + * + * @author Tcs Help desk122 + */ +public class PayrollBglMasterServlet extends HttpServlet { + + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + // String Action = request.getParameter("handle_id"); + //String checkOpt = request.getParameter("checkOption"); + + PayrollBean oPayrollBean = new PayrollBean(); + ArrayList alPayrollBean = new ArrayList(); + + try { + // BeanUtils.populate(oPayrollBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + System.out.println("Error occurred during processing."); + } + + if ("Create".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + String salaryGL = request.getParameter("salaryGL" + i); + + if (salaryGL != null) { + oPayrollBean = new PayrollBean(); + // oPayrollBean.setGlid(request.getParameter("glid" + i)); + //oPayrollBean.setTaxid(request.getParameter("taxid" + i)); + //oPayrollBean.setOtherid(request.getParameter("otherid" + i)); + //oPayrollBean.setStaffcrid(request.getParameter("staffcrid" + i)); + //oPayrollBean.setSocdrid(request.getParameter("socdrid" + i)); + //oPayrollBean.setSoccrid(request.getParameter("soccrid" + i)); + // oPayrollBean.setId(request.getParameter("id" + i)); + alPayrollBean.add(oPayrollBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alPayrollBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call payroll.BGL_Master(?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alPayrollBean.size(); j++) { + + oPayrollBean = alPayrollBean.get(j); + proc.setString(1, oPayrollBean.getId()); + proc.setString(2, pacsId); + proc.setString(3, oPayrollBean.getGlid()); + proc.setString(4, oPayrollBean.getTaxid()); + proc.setString(5, oPayrollBean.getOtherid()); + proc.setString(6, oPayrollBean.getStaffcrid()); + proc.setString(7, oPayrollBean.getSocdrid()); + proc.setString(8, oPayrollBean.getSoccrid()); + proc.setString(9, user); + proc.setString(10, Action); + proc.registerOutParameter(11, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + // message = proc.getString(11); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Payroll/PayrollBglMaster.jsp").forward(request, response); + + } else if ("Amend".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter2")); + + for (int i = 2; i <= counter; i++) { + try { + + String salaryGL = request.getParameter("salaryGL" + i); + + if (salaryGL != null) { + oPayrollBean = new PayrollBean(); + // oPayrollBean.setGlid(request.getParameter("glid" + i)); + //oPayrollBean.setTaxid(request.getParameter("taxid" + i)); + //oPayrollBean.setOtherid(request.getParameter("otherid" + i)); + //oPayrollBean.setStaffcrid(request.getParameter("staffcrid" + i)); + //oPayrollBean.setSocdrid(request.getParameter("socdrid" + i)); + //oPayrollBean.setSoccrid(request.getParameter("soccrid" + i)); + //oPayrollBean.setId(request.getParameter("id" + i)); + alPayrollBean.add(oPayrollBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alPayrollBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call payroll.BGL_Master(?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alPayrollBean.size(); j++) { + + oPayrollBean = alPayrollBean.get(j); + proc.setString(1, oPayrollBean.getId()); + proc.setString(2, pacsId); + proc.setString(3, oPayrollBean.getGlid()); + proc.setString(4, oPayrollBean.getTaxid()); + proc.setString(5, oPayrollBean.getOtherid()); + proc.setString(6, oPayrollBean.getStaffcrid()); + proc.setString(7, oPayrollBean.getSocdrid()); + proc.setString(8, oPayrollBean.getSoccrid()); + proc.setString(9, user); + proc.setString(10, Action); + proc.registerOutParameter(11, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + // message = proc.getString(11); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Payroll/PayrollBglMaster.jsp").forward(request, response); + + } else if ("getDetails".equalsIgnoreCase(Action)) { + + ResultSet resultset = null; + Statement statement = null; + + Connection connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + try { + //resultset = statement.executeQuery(" select id, pacs_id, salarydebitgl, (select gp.gl_name from gl_product gp where gp.id = salarydebitgl) salarydebitgl_name, ptaxcreditgl, (select gp.gl_name from gl_product gp where gp.id = ptaxcreditgl) ptaxcreditgl_name, otherdeducreditgl, (select gp.gl_name from gl_product gp where gp.id = otherdeducreditgl) otherdeducreditgl_name, epfstaffcreditgl, (select gp.gl_name from gl_product gp where gp.id = epfstaffcreditgl) epfstaffcreditgl_name, epfsocdebitgl, (select gp.gl_name from gl_product gp where gp.id = epfsocdebitgl) epfsocdebitgl_name, epfsoccreditgl, (select gp.gl_name from gl_product gp where gp.id = epfsoccreditgl) epfsoccreditgl_name from payroll_bgl_master k where k.pacs_id = '" + pacsId + "' "); + + while (resultset.next()) { + + oPayrollBean = new PayrollBean(); + oPayrollBean.setId(resultset.getString("id")); + oPayrollBean.setGlid(resultset.getString("salarydebitgl")); + oPayrollBean.setSalaryGL(resultset.getString("salarydebitgl_name")); + oPayrollBean.setTaxid(resultset.getString("ptaxcreditgl")); + oPayrollBean.setpTax(resultset.getString("ptaxcreditgl_name")); + oPayrollBean.setOtherid(resultset.getString("otherdeducreditgl")); + oPayrollBean.setOtherDeduct(resultset.getString("otherdeducreditgl_name")); + oPayrollBean.setStaffcrid(resultset.getString("epfstaffcreditgl")); + oPayrollBean.setEpfStaffCr(resultset.getString("epfstaffcreditgl_name")); + oPayrollBean.setSocdrid(resultset.getString("epfsocdebitgl")); + oPayrollBean.setEpfSocDr(resultset.getString("epfsocdebitgl_name")); + oPayrollBean.setSoccrid(resultset.getString("epfsoccreditgl")); + oPayrollBean.setEpfSocCr(resultset.getString("epfsoccreditgl_name")); + + alPayrollBean.add(oPayrollBean); + request.setAttribute("displayFlag", "Y"); + } + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + statement.close(); + resultset.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + } + request.setAttribute("checkOption", checkOpt); + request.setAttribute("oPayrollBean", oPayrollBean); + request.setAttribute("arrPayrollBean", alPayrollBean); + request.getRequestDispatcher("/Payroll/PayrollBglMaster.jsp").forward(request, response); + } + } + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + } +} diff --git a/IPKS_Updated/src/src/java/Controller/PayrollScheduleServlet.java b/IPKS_Updated/src/src/java/Controller/PayrollScheduleServlet.java new file mode 100644 index 0000000..1687c2f --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/PayrollScheduleServlet.java @@ -0,0 +1,278 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.PayrollBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.sql.CallableStatement; +import java.sql.Statement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import java.lang.reflect.InvocationTargetException; + +/** + * + * @author Tcs Help desk122 + */ +public class PayrollScheduleServlet extends HttpServlet { + + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + // String Action = request.getParameter("handle_id"); + // String checkOpt = request.getParameter("checkOption"); + + PayrollBean oPayrollBean = new PayrollBean(); + ArrayList alPayrollBean = new ArrayList(); + + try { + //BeanUtils.populate(oPayrollBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + System.out.println("Error occurred during processing."); + } + + if ("Create".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + // String monthyear = request.getParameter("monthyear" + i); + + if (monthyear != null) { + oPayrollBean = new PayrollBean(); + oPayrollBean.setMonthyear(monthyear); + //oPayrollBean.setProcDate(request.getParameter("procDate" + i)); + //oPayrollBean.setRemarks(request.getParameter("remarks" + i)); + //oPayrollBean.setStatus(request.getParameter("status" + i)); + //oPayrollBean.setId(request.getParameter("id" + i)); + alPayrollBean.add(oPayrollBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alPayrollBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call payroll.payroll_schedule(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alPayrollBean.size(); j++) { + + oPayrollBean = alPayrollBean.get(j); + proc.setString(1, oPayrollBean.getId()); + proc.setString(2, pacsId); + proc.setString(3, oPayrollBean.getMonthyear()); + proc.setString(4, oPayrollBean.getProcDate()); + proc.setString(5, user); + proc.setString(6, Action); + proc.setString(7, oPayrollBean.getStatus()); + proc.setString(8, oPayrollBean.getRemarks()); + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + + proc.execute(); + // message = proc.getString(9); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Payroll/PayrollSchedule.jsp").forward(request, response); + + } else if ("Amend".equalsIgnoreCase(Action)) { + + int counter = Integer.parseInt(request.getParameter("rowCounter2")); + + for (int i = 2; i <= counter; i++) { + try { + + // String monthyear = request.getParameter("monthyear" + i); + + if (monthyear != null) { + oPayrollBean = new PayrollBean(); + oPayrollBean.setMonthyear(monthyear); + // oPayrollBean.setProcDate(request.getParameter("procDate" + i)); + // oPayrollBean.setRemarks(request.getParameter("remarks" + i)); + // oPayrollBean.setStatus(request.getParameter("status" + i)); + // oPayrollBean.setId(request.getParameter("id" + i)); + alPayrollBean.add(oPayrollBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alPayrollBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call payroll.payroll_schedule(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alPayrollBean.size(); j++) { + + oPayrollBean = alPayrollBean.get(j); + proc.setString(1, oPayrollBean.getId()); + proc.setString(2, pacsId); + proc.setString(3, oPayrollBean.getMonthyear()); + proc.setString(4, oPayrollBean.getProcDate()); + proc.setString(5, user); + proc.setString(6, Action); + proc.setString(7, oPayrollBean.getStatus()); + proc.setString(8, oPayrollBean.getRemarks()); + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + + proc.execute(); + //message = proc.getString(9); + if (!message.contains("Successfully")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Payroll/PayrollSchedule.jsp").forward(request, response); + + } else if ("getDetails".equalsIgnoreCase(Action)) { + + ResultSet resultset = null; + Statement statement = null; + + Connection connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + try { + // resultset = statement.executeQuery(" select id, pacs_id, yyyymm, to_char(schedule_date,'DD/MM/YYYY')schedule_date, status, remarks from payroll_master k where pacs_id = '" + pacsId + "' and k.schedule_date > (select system_date from system_date) "); + + while (resultset.next()) { + + oPayrollBean = new PayrollBean(); + oPayrollBean.setId(resultset.getString("id")); + oPayrollBean.setMonthyear(resultset.getString("yyyymm")); + oPayrollBean.setProcDate(resultset.getString("schedule_date")); + oPayrollBean.setStatus(resultset.getString("status")); + oPayrollBean.setRemarks(resultset.getString("remarks")); + + alPayrollBean.add(oPayrollBean); + request.setAttribute("displayFlag", "Y"); + } + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + statement.close(); + resultset.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + } + request.setAttribute("checkOption", checkOpt); + request.setAttribute("oPayrollBean", oPayrollBean); + request.setAttribute("arrPayrollBean", alPayrollBean); + if (alPayrollBean.size() == 0) + { + request.setAttribute("message", "No data found."); + } + request.getRequestDispatcher("/Payroll/PayrollSchedule.jsp").forward(request, response); + } + } + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + } +} diff --git a/IPKS_Updated/src/src/java/Controller/PdsProductOperationServlet.java b/IPKS_Updated/src/src/java/Controller/PdsProductOperationServlet.java new file mode 100644 index 0000000..dd0d8d6 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/PdsProductOperationServlet.java @@ -0,0 +1,315 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import DataEntryBean.pdsProductCreationBean; + +/** + * + * @author 590685 + */ +public class PdsProductOperationServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + Connection con = null; + CallableStatement proc = null; + String message = ""; + + //String ServletName = request.getParameter("handle_id"); + + pdsProductCreationBean pdsProductCreationBeanObj=new pdsProductCreationBean(); + + + if ("Create".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(pdsProductCreationBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(PdsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(PdsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_pds_product(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(PdsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } +proc.setString(1, pdsProductCreationBeanObj.getProduct_id()); + proc.setString(2, pdsProductCreationBeanObj.getProductType()); + proc.setString(3, pdsProductCreationBeanObj.getProductDescription()); + proc.setString(4, pdsProductCreationBeanObj.getProductSubType()); + proc.setString(5, pdsProductCreationBeanObj.getProductSubTypeDescription()); + proc.setString(6, pdsProductCreationBeanObj.getUnit()); + proc.setString(7, pdsProductCreationBeanObj.getStatus()); + + + + + + + proc.setString(8, ServletName); + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(9); + + } catch (SQLException ex) { + // Logger.getLogger(PdsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(PdsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Pds_JSP/pdsProductCreation.jsp").forward(request, response); + + } + + }else if ("Search".equalsIgnoreCase(ServletName)) { + + try { + //BeanUtils.populate(pdsProductCreationBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(PdsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(PdsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + Connection connection = null; + //ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(PdsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + + //ResultSet rs = statement.executeQuery("select ID,PRODUCT_NAME,PRODUCT_CODE,UNIT,STATUS,PROFIT_FACTOR from pds_product_mst where product_code= '" + pdsProductCreationBeanObj.getInventorySearch() + "'"); + //ResultSet rs = statement.executeQuery("select ID,ITEM_TYPE,TYPE_DESC,UNIT,STATUS,ITEM_SUBTYPE,SUBTYPE_DESC from pds_product_mst where ID= '" + pdsProductCreationBeanObj.getProduct_id_search() + "'"); + while (rs.next()) { + + pdsProductCreationBeanObj.setProduct_id(rs.getString("ID")); + //pdsProductCreationBeanObj.setProductName(rs.getString("PRODUCT_NAME")); + pdsProductCreationBeanObj.setProductType(rs.getString("ITEM_TYPE")); + pdsProductCreationBeanObj.setProductDescription(rs.getString("TYPE_DESC")); + pdsProductCreationBeanObj.setProductSubType(rs.getString("ITEM_SUBTYPE")); + pdsProductCreationBeanObj.setProductSubTypeDescription(rs.getString("SUBTYPE_DESC")); + //pdsProductCreationBeanObj.setProductCode(rs.getString("PRODUCT_CODE")); + pdsProductCreationBeanObj.setUnit(rs.getString("UNIT")); + pdsProductCreationBeanObj.setStatus(rs.getString("STATUS")); + //pdsProductCreationBeanObj.setProfitFactor(rs.getString("PROFIT_FACTOR")); + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + } + + statement.close(); + connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(PdsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + if (SeachFound == 0) { + message = "PDS Product does not exist in the system"; + request.setAttribute("message", message); + } + request.setAttribute("pdsProductCreationBeanObj", pdsProductCreationBeanObj); + + request.getRequestDispatcher("/Pds_JSP/pdsProductCreation.jsp").forward(request, response); + + } else if ("Update".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(pdsProductCreationBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(PdsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(PdsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_pds_product(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(PdsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.setString(1, pdsProductCreationBeanObj.getProduct_id()); + proc.setString(2, pdsProductCreationBeanObj.getProductTypeAmend()); + proc.setString(3, pdsProductCreationBeanObj.getProductDescriptionAmend()); + proc.setString(4, pdsProductCreationBeanObj.getProductSubTypeAmend()); + proc.setString(5, pdsProductCreationBeanObj.getProductSubTypeDescriptionAmend()); + proc.setString(6, pdsProductCreationBeanObj.getUnitAmend()); + proc.setString(7, pdsProductCreationBeanObj.getStatusAmend()); + proc.setString(8, ServletName); + + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(9); + + } catch (SQLException ex) { + // Logger.getLogger(PdsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(PdsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Pds_JSP/pdsProductCreation.jsp").forward(request, response); + + } + + } else if ("StatusSearch".equalsIgnoreCase(ServletName)) { + + //String productCodeActivation = request.getParameter("productCodeActivation"); + // String productDescriptionActivation = request.getParameter("productDescriptionActivation"); + //String productSubTypeDescriptionActivation = request.getParameter("productSubTypeDescriptionActivation"); + //String vFlag = request.getParameter("productStatusFlag"); + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call pds_parameter.pds_parameter_Activation(?,?,?,?)}"); + } catch (SQLException ex) { + // Logger.getLogger(PdsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, productDescriptionActivation); + proc.setString(2, productSubTypeDescriptionActivation); + proc.setString(3, vFlag); + proc.registerOutParameter(4, java.sql.Types.VARCHAR); + + proc.execute(); + + //message = proc.getString(4); + + } catch (SQLException ex) { + // Logger.getLogger(PdsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(PdsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Pds_JSP/pdsProductCreation.jsp").forward(request, response); + + } + + } + + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/ProcurementRegisterServlet.java b/IPKS_Updated/src/src/java/Controller/ProcurementRegisterServlet.java new file mode 100644 index 0000000..24bb901 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/ProcurementRegisterServlet.java @@ -0,0 +1,166 @@ + /* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.ProcurementRegisterBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import oracle.jdbc.OracleTypes; + +/** + * + * @author Tcs Helpdesk10 + */ +public class ProcurementRegisterServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + ResultSet rs = null; + ArrayList alProcurementRegisterBean = new ArrayList(); + String message = ""; + int searchFound = 0; + String pacsId = (String) session.getAttribute("pacsId"); + // String itemCode = request.getParameter("itemTypeId"); + //String itemtype = request.getParameter("itemtype"); + //String itemSubTypeCode = request.getParameter("itemSubTypeId"); + //String itemsubtype = request.getParameter("itemsubtype"); + // String fromDate = request.getParameter("fromdate"); + // String toDate = request.getParameter("todate"); + ProcurementRegisterBean ProcurementRegisterBeanObj = null; + + ProcurementRegisterBeanObj = new ProcurementRegisterBean(); + ProcurementRegisterBeanObj.setToDate(toDate); + ProcurementRegisterBeanObj.setFromDate(fromDate); + ProcurementRegisterBeanObj.setItemCode(itemCode); + ProcurementRegisterBeanObj.setItemSubTypeCode(itemSubTypeCode); + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call GPS_Operation.procurement_register_check(?,?,?,?,?,?,?) }"); + proc.setString(1, ProcurementRegisterBeanObj.getItemCode()); + proc.setString(2, ProcurementRegisterBeanObj.getItemSubTypeCode()); + proc.setString(3, ProcurementRegisterBeanObj.getFromDate()); + proc.setString(4, ProcurementRegisterBeanObj.getToDate()); + proc.setString(5, pacsId); + proc.registerOutParameter(6, OracleTypes.CURSOR); + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + proc.execute(); + message = proc.getString(7); + // rs = (ResultSet) proc.getObject(6); + + while (rs.next()) { + searchFound = 1; + ProcurementRegisterBeanObj = new ProcurementRegisterBean(); + ProcurementRegisterBeanObj.setProcurementCode(rs.getString(1)); + ProcurementRegisterBeanObj.setProcurementId(rs.getString(2)); + ProcurementRegisterBeanObj.setProcurementDate(rs.getString(3)); + ProcurementRegisterBeanObj.setItemCodeAmmend(rs.getString(4)); + ProcurementRegisterBeanObj.setItemSubTypeCodeAmmend(rs.getString(5)); + ProcurementRegisterBeanObj.setUnit(rs.getString(6)); + ProcurementRegisterBeanObj.setRatePerUnit(rs.getString(7)); + ProcurementRegisterBeanObj.setBaseQty(rs.getString(8)); + ProcurementRegisterBeanObj.setQtyAvailable(rs.getString(9)); + ProcurementRegisterBeanObj.setQty(rs.getString(10)); + + alProcurementRegisterBean.add(ProcurementRegisterBeanObj); + request.setAttribute("displayFlag", "Y"); + } + ProcurementRegisterBeanObj.setItemCode(itemtype); + ProcurementRegisterBeanObj.setItemSubTypeCode(itemsubtype); + ProcurementRegisterBeanObj.setFromDate(fromDate); + ProcurementRegisterBeanObj.setToDate(toDate); + + if (searchFound == 0) { + + message = "No Stock Exists for the selected criteria"; + request.setAttribute("message", message); + + } + + } catch (SQLException ex) { + // Logger.getLogger(ProcurementRegisterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + + try { + proc.close(); + con.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during connection close."); + } + } + + request.setAttribute("alProcurementRegisterBean", alProcurementRegisterBean); + request.setAttribute("ProcurementRegisterBeanObj", ProcurementRegisterBeanObj); + request.getRequestDispatcher("/GPS_JSP/ProcurementRegister.jsp").forward(request, response); + + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/RDOperationServlet.java b/IPKS_Updated/src/src/java/Controller/RDOperationServlet.java new file mode 100644 index 0000000..239b0ca --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/RDOperationServlet.java @@ -0,0 +1,234 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.RDOperationBean; +import DataEntryBean.transactionOperationBean; +import DataEntryBean.TDOperationBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.commons.beanutils.BeanUtils; +import javax.servlet.http.HttpSession; + +/** + * + * @author 594267 + */ +public class RDOperationServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet RDOperationServlet"); + out.println(""); + out.println(""); + out.println("

Servlet RDOperationServlet at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + Connection con = null; + CallableStatement proc = null; + String message = ""; + String Account_type = ""; + String JSP = ""; + HttpSession session = request.getSession(); + JSP = request.getParameter("screenName") == null ? "" : (request.getParameter("screenName")); + + if (JSP.equalsIgnoreCase("RDOperation")) { + + // String transferAcc = request.getParameter("transferAcc") == null ? "" : (request.getParameter("transferAcc")); + // String transferGLAcc = request.getParameter("transferGLAcc") == null ? "" : (request.getParameter("transferGLAcc")); + // String transferMode = request.getParameter("payMode") == null ? "C" : (request.getParameter("payMode")); + + RDOperationBean oRDOperationBean = new RDOperationBean(); + + try { + // BeanUtils.populate(oRDOperationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + con = DbHandler.getDBConnection(); + try { + + proc = con.prepareCall("{ call operations.RD_operations(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + + } catch (SQLException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + String pacsId = session.getAttribute("pacsId").toString(); + String makerId = session.getAttribute("user").toString(); + + // String twothouIN = request.getParameter("twothouIN").isEmpty() ? "0" : (request.getParameter("twothouIN")); + //String twothouOUT = request.getParameter("twothouOUT").isEmpty() ? "0" : (request.getParameter("twothouOUT")); + //String fivehundredIN = request.getParameter("fivehundredIN").isEmpty() ? "0" : (request.getParameter("fivehundredIN")); + //String fivehundredOUT = request.getParameter("fivehundredOUT").isEmpty() ? "0" : (request.getParameter("fivehundredOUT")); + //String hundredIN = request.getParameter("hundredIN").isEmpty() ? "0" : (request.getParameter("hundredIN")); + //String hundredOUT = request.getParameter("hundredOUT").isEmpty() ? "0" : (request.getParameter("hundredOUT")); + //String fiftyIN = request.getParameter("fiftyIN").isEmpty() ? "0" : (request.getParameter("fiftyIN")); + //String fiftyOUT = request.getParameter("fiftyOUT").isEmpty() ? "0" : (request.getParameter("fiftyOUT")); + //String twentyIN = request.getParameter("twentyIN").isEmpty() ? "0" : (request.getParameter("twentyIN")); + //String twentyOUT = request.getParameter("twentyOUT").isEmpty() ? "0" : (request.getParameter("twentyOUT")); + //String tenIN = request.getParameter("tenIN").isEmpty() ? "0" : (request.getParameter("tenIN")); + //String tenOUT = request.getParameter("tenOUT").isEmpty() ? "0" : (request.getParameter("tenOUT")); + //String fiveIN = request.getParameter("fiveIN").isEmpty() ? "0" : (request.getParameter("fiveIN")); + //String fiveOUT = request.getParameter("fiveOUT").isEmpty() ? "0" : (request.getParameter("fiveOUT")); + //String twoIN = request.getParameter("twoIN").isEmpty() ? "0" : (request.getParameter("twoIN")); + //String twoOUT = request.getParameter("twoOUT").isEmpty() ? "0" : (request.getParameter("twoOUT")); + //String oneIN = request.getParameter("oneIN").isEmpty() ? "0" : (request.getParameter("oneIN")); + //String oneOUT = request.getParameter("oneOUT").isEmpty() ? "0" : (request.getParameter("oneOUT")); + //String fiftyPaisaIN = request.getParameter("fiftyPaisaIN").isEmpty() ? "0" : (request.getParameter("fiftyPaisaIN")); + //String fiftyPaisaOUT = request.getParameter("fiftyPaisaOUT").isEmpty() ? "0" : (request.getParameter("fiftyPaisaOUT")); + //String onePaisaIN = request.getParameter("onePaisaIN").isEmpty() ? "0" : (request.getParameter("onePaisaIN")); + //String onePaisaOUT = request.getParameter("onePaisaOUT").isEmpty() ? "0" : (request.getParameter("onePaisaOUT")); + //String twohundredIN = request.getParameter("twohundredIN").isEmpty() ? "0" : (request.getParameter("twohundredIN")); + //String twohundredOUT = request.getParameter("twohundredOUT").isEmpty() ? "0" : (request.getParameter("twohundredOUT")); + + proc.setString(1, pacsId); + proc.setString(2, oRDOperationBean.getTranType()); + proc.setString(3, oRDOperationBean.getAccNo()); + if (oRDOperationBean.getTranType().equals("D")) { + proc.setString(4, oRDOperationBean.getInstAmt()); + } else if (oRDOperationBean.getTranType().equals("W")) { + proc.setString(4, oRDOperationBean.getNetAmt()); + } else if (oRDOperationBean.getTranType().equals("P")) { + proc.setString(4, oRDOperationBean.getNetAmt()); + } + proc.setString(5, oRDOperationBean.getNarration()); + proc.setString(6, makerId); + proc.setString(7, transferMode); + proc.setString(8, transferAcc); + proc.setString(9, twothouIN); + proc.setString(10, fivehundredIN); + proc.setString(11, hundredIN); + proc.setString(12, fiftyIN); + proc.setString(13, twentyIN); + proc.setString(14, tenIN); + proc.setString(15, fiveIN); + proc.setString(16, twoIN); + proc.setString(17, oneIN); + proc.setString(18, fiftyPaisaIN); + proc.setString(19, onePaisaIN); + proc.setString(20, twothouOUT); + proc.setString(21, fivehundredOUT); + proc.setString(22, hundredOUT); + proc.setString(23, fiftyOUT); + proc.setString(24, twentyOUT); + proc.setString(25, tenOUT); + proc.setString(26, fiveOUT); + proc.setString(27, twoOUT); + proc.setString(28, oneOUT); + proc.setString(29, fiftyPaisaOUT); + proc.setString(30, onePaisaOUT); + + proc.setString(31, oRDOperationBean.getIntAdjAmt()); + proc.registerOutParameter(32, java.sql.Types.VARCHAR); + proc.setString(33, twohundredIN); + proc.setString(34, twohundredOUT); + proc.setString(35, transferGLAcc); + + proc.execute(); + + //message = proc.getString(32); + Account_type = "3"; + + } catch (SQLException ex) { + // Logger.getLogger(RDOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + Account_type = "3"; + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + Account_type = "3"; + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(RDOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + } + + request.setAttribute("message", message); + + + request.getRequestDispatcher("/Deposit/RDOperation.jsp").forward(request, response); + + + + + + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/RaiseRequisitionServlet.java b/IPKS_Updated/src/src/java/Controller/RaiseRequisitionServlet.java new file mode 100644 index 0000000..6dd901a --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/RaiseRequisitionServlet.java @@ -0,0 +1,201 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import DataEntryBean.raiseRequisitionBean; +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.text.DateFormat; +import java.text.Format; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.Locale; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.http.HttpSession; +import oracle.jdbc.OracleTypes; + +/** + * + * @author 590685 + */ +public class RaiseRequisitionServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + // String handle_id = request.getParameter("handle_id"); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + raiseRequisitionBean oraiseRequisitionBean = null; + DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss"); + Date today = Calendar.getInstance().getTime(); + String requisitionId = df.format(today); + + if (handle_id.equalsIgnoreCase("Create")) { + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + // String memberId = request.getParameter("custId").toString(); + session.setAttribute("memberId", memberId); + + + ArrayList alraiseRequisitionBean = new ArrayList(); + for (int i = 1; i <= counter; i++) { + try { + + // String product_id = request.getParameter("product_id" + i); + // String price = request.getParameter("price" + i); + // String quantity = request.getParameter("quantity" + i); + // String linetotal = request.getParameter("linetotal" + i); + // String stock_id = request.getParameter("stock_id" + i); + // String stock_quantity = request.getParameter("stock_quantity" + i); + + if (product_id != null) { + oraiseRequisitionBean = new raiseRequisitionBean(); + oraiseRequisitionBean.setProduct_id(product_id); + oraiseRequisitionBean.setPrice(price); + oraiseRequisitionBean.setQuantity(quantity); + oraiseRequisitionBean.setLinetotal(linetotal); + oraiseRequisitionBean.setStock_id(stock_id); + oraiseRequisitionBean.setStock_quantity(stock_quantity); + oraiseRequisitionBean.setRequisitionId(requisitionId); + + alraiseRequisitionBean.add(oraiseRequisitionBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + + if (alraiseRequisitionBean.size() > 0) { + + for (int j = 0; j < alraiseRequisitionBean.size(); j++) { + + oraiseRequisitionBean = alraiseRequisitionBean.get(j); + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call PDS_RAISE_REQ.Upsert_raise_requisition(?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(RaiseRequisitionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oraiseRequisitionBean.getProduct_id()); + proc.setString(2, oraiseRequisitionBean.getPrice()); + proc.setString(3, oraiseRequisitionBean.getQuantity()); + proc.setString(4, oraiseRequisitionBean.getLinetotal()); + proc.setString(5, oraiseRequisitionBean.getStock_id()); + proc.setString(6, oraiseRequisitionBean.getStock_quantity()); + proc.setString(7, oraiseRequisitionBean.getRequisitionId()); + proc.setString(8, handle_id); + proc.setString(9, pacsId); + proc.setString(10, memberId); + + proc.registerOutParameter(11, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(11); + + } catch (SQLException ex) { + // Logger.getLogger(RaiseRequisitionServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(RaiseRequisitionServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + + } + } + } + + request.setAttribute("message", message); + request.setAttribute("requisitionId", requisitionId); + if (message.equals("Required quantity is not in stock")) { + request.getRequestDispatcher("/Pds_JSP/pds_raise_requisition.jsp").forward(request, response); + } else { + request.getRequestDispatcher("/Pds_JSP/Invoice.jsp").forward(request, response); + } + + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/RationCardTypeServlet.java b/IPKS_Updated/src/src/java/Controller/RationCardTypeServlet.java new file mode 100644 index 0000000..a2de329 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/RationCardTypeServlet.java @@ -0,0 +1,695 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.RationCardTypeDetailsBean; +import DataEntryBean.RationCardTypeHeaderBean; +import DataEntryBean.VendorMasterDtlBean; +import DataEntryBean.VendorMasterHeaderBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.StringTokenizer; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 986137 + */ +public class RationCardTypeServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + Connection con = null; + CallableStatement proc = null; + String message = ""; + String ScreenStatus = ""; + String hdrID = ""; + HttpSession session = request.getSession(false); + + // String ServletName = request.getParameter("handle_id"); + + RationCardTypeHeaderBean oRationCardTypeHeaderBean = new RationCardTypeHeaderBean(); + RationCardTypeDetailsBean oRationCardTypeDetailsBean = new RationCardTypeDetailsBean(); + oRationCardTypeDetailsBean = null; + ArrayList alRationCardTypeDetailsBean = new ArrayList(); + + + //For Amend Div + + ArrayList alRationCardTypeDetailsBeanNew = new ArrayList(); + ArrayList alRationCardTypeDetailsBeanDeleted = new ArrayList(); + ArrayList alRationCardTypeDetailsBeanUpdated = new ArrayList(); + + if (ServletName.equalsIgnoreCase("Create")) { + + + try { + // BeanUtils.populate(oRationCardTypeHeaderBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(RationCardTypeServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(RationCardTypeServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call PARAMETER.Upsert_card_type_hdr(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(RationCardTypeServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oRationCardTypeHeaderBean.getCardMstIdAmend()); + proc.setString(2, oRationCardTypeHeaderBean.getCardType()); + proc.setString(3, oRationCardTypeHeaderBean.getCardDescription()); + proc.setString(4, oRationCardTypeHeaderBean.getStatus()); + proc.setString(5, ServletName); + proc.registerOutParameter(6, java.sql.Types.VARCHAR); + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + + proc.execute(); + + //message = proc.getString(6); + hdrID = proc.getString(7); + + + + } catch (SQLException ex) { + try { + // con.rollback(); + } catch (Exception ex1) { + // Logger.getLogger(RationCardTypeServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(RationCardTypeServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(RationCardTypeServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + } + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + // String productId = request.getParameter("product_id" + i); + String quantiyUnit = request.getParameter("quantiyUnit" + i); + // String quantity = request.getParameter("quantity" + i); + // String eligibility = request.getParameter("eligibility" + i); + // String frequency = request.getParameter("frequency" + i); + // String saleRatePerUnit = request.getParameter("saleRatePerUnit" + i); + // String expiryDate = request.getParameter("expiryDate" + i); + + + + + if (productId != null) { + oRationCardTypeDetailsBean = new RationCardTypeDetailsBean(); + oRationCardTypeDetailsBean.setProduct_id(productId); + oRationCardTypeDetailsBean.setQuantity(quantity); + oRationCardTypeDetailsBean.setFrequency(frequency); + oRationCardTypeDetailsBean.setSaleRatePerUnit(saleRatePerUnit); + oRationCardTypeDetailsBean.setEligibility(eligibility); + oRationCardTypeDetailsBean.setExpiryDate(expiryDate); + + alRationCardTypeDetailsBean.add(oRationCardTypeDetailsBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alRationCardTypeDetailsBean.size() > 0) && (!message.equalsIgnoreCase("")) && (!hdrID.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_card_type_dtl(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(RationCardTypeServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + for (int j = 0; j < alRationCardTypeDetailsBean.size(); j++) { + + oRationCardTypeDetailsBean = alRationCardTypeDetailsBean.get(j); + + + proc.setString(1, hdrID); + proc.setString(2, oRationCardTypeDetailsBean.getDetailId()); + proc.setString(3, oRationCardTypeDetailsBean.getProduct_id()); + proc.setString(4, oRationCardTypeDetailsBean.getQuantity()); + proc.setString(5, oRationCardTypeDetailsBean.getEligibility()); + proc.setString(6, oRationCardTypeDetailsBean.getFrequency()); + proc.setString(7, oRationCardTypeDetailsBean.getSaleRatePerUnit()); + proc.setString(8, oRationCardTypeDetailsBean.getExpiryDate()); + proc.setString(9, ServletName); + proc.addBatch(); + + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + try { + // con.rollback(); + } catch (Exception ex1) { + // Logger.getLogger(RationCardTypeServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(RationCardTypeServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(RationCardTypeServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Pds_JSP/pdsRationCardTypeMaster.jsp").forward(request, response); + + } else if ("Search".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oRationCardTypeHeaderBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(RationCardTypeServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(RationCardTypeServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + + // ResultSet rs = statement.executeQuery("select card_type_id,card_type,card_desc,status from pds_card_type_mst where card_type_id= '" + oRationCardTypeHeaderBean.getCard_type_mst_id() + "' "); + + while (rs.next()) { + + oRationCardTypeHeaderBean.setCardMstIdAmend(rs.getString("card_type_id")); + oRationCardTypeHeaderBean.setCardType(rs.getString("card_type")); + oRationCardTypeHeaderBean.setCardDescription(rs.getString("card_desc")); + oRationCardTypeHeaderBean.setStatus(rs.getString("status")); + + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + } + + // statement.close(); + + + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + statement.close(); + } catch (Exception e) { + System.out.println("Error occurred during connection close."); + } + } + + if (SeachFound == 0) { + message = "Card Type not exists in the system"; + request.setAttribute("message", message); + } + + //For Details Part Populate + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + + //ResultSet rs = statement.executeQuery(" Select p.id,(p.item_type||':'||p.type_desc) as type_dtls,(p.item_subtype||':'||p.subtype_desc) as sub_dtls, " + + " t.elig_qty,t.id as detailId,t.elig_expiry,t.unit_sell_rate,t.elig_basis,t.frequency,decode(p.unit,'1','K.g.','2','Lt.','3','Packets') unit, nvl(sum(l.qty_remaining),0) as qty_remaining " + + " from pds_card_type_dtl t,pds_card_type_mst m,pds_product_mst p,pds_ration_ledger l,pds_card_holders h " + + " where m.card_type_id=t.hdr_id and t.prod_id=p.id and l.holder_id=h.id(+) and l.prod_id(+) =t.prod_id " + + " and t.hdr_id= '" + oRationCardTypeHeaderBean.getCardMstIdAmend() + "'" + + " group by p.id,(p.item_type || ':' || p.type_desc) ,(p.item_subtype || ':' || p.subtype_desc)," + + "t.elig_qty,t.id ,t.elig_expiry,t.unit_sell_rate,t.elig_basis,t.frequency," + + "decode(p.unit, '1', 'K.g.', '2', 'Lt.', '3', 'Packets') "); + + while (rs.next()) { + + oRationCardTypeDetailsBean = new RationCardTypeDetailsBean(); + oRationCardTypeDetailsBean.setProduct_id(rs.getString("id")); + oRationCardTypeDetailsBean.setProductType(rs.getString("type_dtls")); + oRationCardTypeDetailsBean.setProductSubType(rs.getString("sub_dtls")); + oRationCardTypeDetailsBean.setQuantity(rs.getString("elig_qty")); + oRationCardTypeDetailsBean.setExpiryDate(rs.getString("elig_expiry")); + oRationCardTypeDetailsBean.setSaleRatePerUnit(rs.getString("unit_sell_rate")); + oRationCardTypeDetailsBean.setEligibility(rs.getString("elig_basis")); + oRationCardTypeDetailsBean.setFrequency(rs.getString("frequency")); + oRationCardTypeDetailsBean.setDetailId(rs.getString("detailId")); + oRationCardTypeDetailsBean.setQuantityUnit(rs.getString("unit")); + oRationCardTypeDetailsBean.setLedgerQty_remaining(rs.getString("qty_remaining")); + + alRationCardTypeDetailsBean.add(oRationCardTypeDetailsBean); + + } + + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(RationCardTypeServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + request.setAttribute("orationCardTypeHeaderBean", oRationCardTypeHeaderBean); + request.setAttribute("alRationCardTypeDetailsBeanApend", alRationCardTypeDetailsBean); + request.getRequestDispatcher("/Pds_JSP/pdsRationCardTypeMaster.jsp").forward(request, response); + + } else if (ServletName.equalsIgnoreCase("Update")) { + + String productId = null; + String rowStatus = null; + String detailID = null; + String deletedRows = null; + + try { + // BeanUtils.populate(oRationCardTypeHeaderBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call PARAMETER.Upsert_card_type_hdr(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oRationCardTypeHeaderBean.getCardMstIdAmend()); + proc.setString(2, oRationCardTypeHeaderBean.getCardTypeAmend()); + proc.setString(3, oRationCardTypeHeaderBean.getCardDescriptionAmend()); + proc.setString(4, oRationCardTypeHeaderBean.getStatusAmend()); + proc.setString(5, ServletName); + proc.registerOutParameter(6, java.sql.Types.VARCHAR); + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + + + + proc.execute(); + + // message = proc.getString(6); + hdrID = proc.getString(7); + + + } catch (SQLException ex) { + try { + // con.rollback(); + } catch (Exception ex1) { + // Logger.getLogger(RationCardTypeServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + } + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + // productId = request.getParameter("product_id_Amend" + i); + String quantiyUnit = request.getParameter("quantiyUnitAmend" + i); + //String quantity = request.getParameter("quantityAmend" + i); + //String eligibility = request.getParameter("eligibilityAmend" + i); + //String frequency = request.getParameter("frequencyAmend" + i); + //String saleRatePerUnit = request.getParameter("saleRatePerUnitAmend" + i); + //detailID = request.getParameter("detailIDAmend" + i); + rowStatus = request.getParameter("rowStatus" + i); + // String expiryDate = request.getParameter("expiryDateAmend" + i); + + + if (productId != null && rowStatus != null) { + oRationCardTypeDetailsBean = new RationCardTypeDetailsBean(); + oRationCardTypeDetailsBean.setProduct_id(productId); + oRationCardTypeDetailsBean.setQuantity(quantity); + oRationCardTypeDetailsBean.setFrequency(frequency); + oRationCardTypeDetailsBean.setSaleRatePerUnit(saleRatePerUnit); + oRationCardTypeDetailsBean.setDetailId(detailID); + oRationCardTypeDetailsBean.setEligibility(eligibility); + oRationCardTypeDetailsBean.setExpiryDate(expiryDate); + + if (rowStatus.equals("N")) { + alRationCardTypeDetailsBeanNew.add(oRationCardTypeDetailsBean); + } else { + alRationCardTypeDetailsBeanUpdated.add(oRationCardTypeDetailsBean); + } + + + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + + //For Deletion + + // deletedRows = request.getParameter("deletedRows"); + + if ((!deletedRows.equalsIgnoreCase(null)) || (!deletedRows.equalsIgnoreCase(""))) { + StringTokenizer tokenizer = new StringTokenizer(deletedRows, ","); + + while (tokenizer.hasMoreTokens()) { + + oRationCardTypeDetailsBean = new RationCardTypeDetailsBean(); + oRationCardTypeDetailsBean.setDetailId(tokenizer.nextToken()); + + alRationCardTypeDetailsBeanDeleted.add(oRationCardTypeDetailsBean); + + } + } + + + if ((alRationCardTypeDetailsBeanUpdated.size() > 0) && (!message.equalsIgnoreCase("")) && (!hdrID.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_card_type_dtl(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alRationCardTypeDetailsBeanUpdated.size(); j++) { + + oRationCardTypeDetailsBean = new RationCardTypeDetailsBean(); + + oRationCardTypeDetailsBean = alRationCardTypeDetailsBeanUpdated.get(j); + + proc.setString(1, hdrID); + proc.setString(2, oRationCardTypeDetailsBean.getDetailId()); + proc.setString(3, oRationCardTypeDetailsBean.getProduct_id()); + proc.setString(4, oRationCardTypeDetailsBean.getQuantity()); + proc.setString(5, oRationCardTypeDetailsBean.getEligibility()); + proc.setString(6, oRationCardTypeDetailsBean.getFrequency()); + proc.setString(7, oRationCardTypeDetailsBean.getSaleRatePerUnit()); + proc.setString(8, oRationCardTypeDetailsBean.getExpiryDate()); + proc.setString(9, ServletName); + proc.addBatch(); + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + try { + // con.rollback(); + } catch (Exception ex1) { + // Logger.getLogger(RationCardTypeServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { +// Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); +// System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + + //for deletion + + if ((alRationCardTypeDetailsBeanDeleted.size() > 0) && (!message.equalsIgnoreCase("")) && (!hdrID.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_card_type_dtl(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + for (int j = 0; j < alRationCardTypeDetailsBeanDeleted.size(); j++) { + + oRationCardTypeDetailsBean = new RationCardTypeDetailsBean(); + + oRationCardTypeDetailsBean = alRationCardTypeDetailsBeanDeleted.get(j); + + + proc.setString(1, hdrID); + proc.setString(2, oRationCardTypeDetailsBean.getDetailId()); + proc.setString(3, null); + proc.setString(4, null); + proc.setString(5, null); + proc.setString(6, null); + proc.setString(7, null); + proc.setString(8, null); + proc.setString(9, "Delete"); + proc.addBatch(); + + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + try { + // con.rollback(); + } catch (Exception ex1) { + // Logger.getLogger(RationCardTypeServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { +// Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); +// System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + + + //For New Insertion + + + if ((alRationCardTypeDetailsBeanNew.size() > 0) && (!message.equalsIgnoreCase("")) && (!hdrID.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_card_type_dtl(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + for (int j = 0; j < alRationCardTypeDetailsBeanNew.size(); j++) { + + oRationCardTypeDetailsBean = new RationCardTypeDetailsBean(); + oRationCardTypeDetailsBean = alRationCardTypeDetailsBeanNew.get(j); + + + proc.setString(1, hdrID); + proc.setString(2, oRationCardTypeDetailsBean.getDetailId()); + proc.setString(3, oRationCardTypeDetailsBean.getProduct_id()); + proc.setString(4, oRationCardTypeDetailsBean.getQuantity()); + proc.setString(5, oRationCardTypeDetailsBean.getEligibility()); + proc.setString(6, oRationCardTypeDetailsBean.getFrequency()); + proc.setString(7, oRationCardTypeDetailsBean.getSaleRatePerUnit()); + proc.setString(8, oRationCardTypeDetailsBean.getExpiryDate()); + proc.setString(9, "Create"); + proc.addBatch(); + + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + try { + // con.rollback(); + } catch (Exception ex1) { + // Logger.getLogger(RationCardTypeServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { +// Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); +// System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + + + request.setAttribute("message", message); + request.getRequestDispatcher("/Pds_JSP/pdsRationCardTypeMaster.jsp").forward(request, response); + + } + } + // + + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/RationingLedgerServlet.java b/IPKS_Updated/src/src/java/Controller/RationingLedgerServlet.java new file mode 100644 index 0000000..3325b83 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/RationingLedgerServlet.java @@ -0,0 +1,159 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import DataEntryBean.RationingLedgerHeaderBean; +import DataEntryBean.RationingLedgerDetailsBean; +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.http.HttpSession; +import oracle.jdbc.OracleTypes; + +/** + * + * @author 1320035 + */ +public class RationingLedgerServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + //String handle_id = request.getParameter("handle_id"); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + RationingLedgerHeaderBean orationingLedgerHeaderBean = null; + RationingLedgerDetailsBean orationingLedgerDetailsBean = null; + ResultSet rs = null; + ArrayList alRationingLedgerDetailsBeanApend = new ArrayList(); + + + String productDetails = ""; + int searchFound = 0; + //String customerId = request.getParameter("customerId"); + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call pds_operations.pds_ration_ledger_view(?,?,?,?) }"); + + proc.setString(1, customerId); + proc.setString(2, pacsId); + proc.registerOutParameter(3, OracleTypes.CURSOR); + proc.registerOutParameter(4, java.sql.Types.VARCHAR); + proc.execute(); + message = proc.getString(4); + //rs = (ResultSet) proc.getObject(3); + + while (rs.next()) { + searchFound = 1; + orationingLedgerDetailsBean = new RationingLedgerDetailsBean(); + orationingLedgerDetailsBean.setProductTypeDetails(rs.getString(1)); + orationingLedgerDetailsBean.setProductSubTypeDetails(rs.getString(2)); + orationingLedgerDetailsBean.setEligibilityBeginDate(rs.getString("ELIG_FROM_DATE")); + orationingLedgerDetailsBean.setEligibilityEndDate(rs.getString("ELIG_TO_DATE")); + orationingLedgerDetailsBean.setExpiryDate(rs.getString("exp_DATE")); + orationingLedgerDetailsBean.setBaseQuantity(rs.getString("BASE_QTY")); + orationingLedgerDetailsBean.setAvailedQuantity(rs.getString("QTY_AVAILED")); + orationingLedgerDetailsBean.setQuantityAvailable(rs.getString("QTY_REMAINING")); + + + + alRationingLedgerDetailsBeanApend.add(orationingLedgerDetailsBean); + request.setAttribute("displayFlag", "Y"); + } + + orationingLedgerHeaderBean=new RationingLedgerHeaderBean(); + // orationingLedgerHeaderBean.setCardHolderName(request.getParameter("cardHolderName")); + //orationingLedgerHeaderBean.setCardType(request.getParameter("cardType")); + //orationingLedgerHeaderBean.setCardNo(request.getParameter("cardNo")); + + + + if (searchFound == 0) { + + message = "No Details Exist for the selected criteria"; + request.setAttribute("message", message); + + } + + } catch (SQLException ex) { + // Logger.getLogger(RationingLedgerServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + + try { + proc.close(); + con.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during connection close."); + } + } + + request.setAttribute("oRationingLedgerHeaderBean", orationingLedgerHeaderBean); + request.setAttribute("alRationingLedgerDetailsBeanApend", alRationingLedgerDetailsBeanApend); + request.getRequestDispatcher("/Pds_JSP/pdsRationingLedger.jsp").forward(request, response); + + // } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/ReadOnlyServlet.java b/IPKS_Updated/src/src/java/Controller/ReadOnlyServlet.java new file mode 100644 index 0000000..255dac9 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/ReadOnlyServlet.java @@ -0,0 +1,299 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.AccountCreationBean; +import DataEntryBean.DepositAccountCreationBean; +import DataEntryBean.LoanAccountCreationBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import oracle.jdbc.OracleTypes; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 590685 + */ +public class ReadOnlyServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + CallableStatement proc = null; + int searchFound = 0; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + + //String index = request.getParameter("detailId"); + // String AuthActivity = request.getParameter("checkOption"); + // String refID = request.getParameter("refno" + request.getParameter("detailId")); + //String AuthActivity = request.getAttribute("AuthActivity").toString(); + //String refID = request.getAttribute("refID").toString(); + System.out.println("AuthActivity is "+AuthActivity+" and refID is "+refID); + String filter = ""; + + DepositAccountCreationBean oDepositAccountCreationBean = new DepositAccountCreationBean(); + AccountCreationBean oAccountCreationBean = new AccountCreationBean(); + LoanAccountCreationBean oLoanAccountCreationBean = new LoanAccountCreationBean(); + + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call worklist.view_details(?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.setString(1, refID); + proc.setString(2, pacsId); + proc.setString(3, AuthActivity); + proc.registerOutParameter(4, OracleTypes.CURSOR); + proc.registerOutParameter(5, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + + // rs = (ResultSet) proc.getObject(4); + filter = proc.getObject(5).toString(); + + if (filter.equalsIgnoreCase("DEPOSIT")) { + + while (rs.next()) { + searchFound = 1; + oDepositAccountCreationBean = new DepositAccountCreationBean(); + oDepositAccountCreationBean.setCifNumber(rs.getString(1)); + oDepositAccountCreationBean.setProductName(rs.getString(2)); + oDepositAccountCreationBean.setInttDescription(rs.getString(3)); + oDepositAccountCreationBean.setAccOpenDate(rs.getString(4)); + oDepositAccountCreationBean.setODlimit(rs.getString(5)); + oDepositAccountCreationBean.setActivityCode(rs.getString(6)); + oDepositAccountCreationBean.setCustomerType(rs.getString(7)); + oDepositAccountCreationBean.setInttrepmethod(rs.getString(8)); + oDepositAccountCreationBean.setIntttransacc(rs.getString(9)); + oDepositAccountCreationBean.setSegmentCode(rs.getString(10)); + oDepositAccountCreationBean.setId(rs.getString(11)); + oDepositAccountCreationBean.setTermValue(rs.getString(12)); + oDepositAccountCreationBean.setTermDays(rs.getString(13)); + oDepositAccountCreationBean.setTermMonth(rs.getString(14)); + oDepositAccountCreationBean.setTermYears(rs.getString(15)); + oDepositAccountCreationBean.setInstAmt(rs.getString(16)); + oDepositAccountCreationBean.setCifName(rs.getString(18)); + //Changed SetCifNumber2 to setJt_cifNumber1 Bitan + oDepositAccountCreationBean.setJt_cifNumber1(rs.getString(19)); + oDepositAccountCreationBean.setJt_cifName1(rs.getString(20)); + //End + oDepositAccountCreationBean.setNominee(rs.getString(21)); + oDepositAccountCreationBean.setNomineeName(rs.getString(22)); + //Changes Added Bitan For 10 Secondary CIF + oDepositAccountCreationBean.setJt_cifNumber2(rs.getString(23)); + oDepositAccountCreationBean.setJt_cifName2(rs.getString(24)); + oDepositAccountCreationBean.setJt_cifNumber3(rs.getString(25)); + oDepositAccountCreationBean.setJt_cifName3(rs.getString(26)); + oDepositAccountCreationBean.setJt_cifNumber4(rs.getString(27)); + oDepositAccountCreationBean.setJt_cifName4(rs.getString(28)); + oDepositAccountCreationBean.setJt_cifNumber5(rs.getString(29)); + oDepositAccountCreationBean.setJt_cifName5(rs.getString(30)); + oDepositAccountCreationBean.setJt_cifNumber6(rs.getString(31)); + oDepositAccountCreationBean.setJt_cifName6(rs.getString(32)); + oDepositAccountCreationBean.setJt_cifNumber7(rs.getString(33)); + oDepositAccountCreationBean.setJt_cifName7(rs.getString(34)); + oDepositAccountCreationBean.setJt_cifNumber8(rs.getString(35)); + oDepositAccountCreationBean.setJt_cifName8(rs.getString(36)); + oDepositAccountCreationBean.setJt_cifNumber8(rs.getString(37)); + oDepositAccountCreationBean.setJt_cifName8(rs.getString(38)); + oDepositAccountCreationBean.setJt_cifNumber10(rs.getString(39)); + oDepositAccountCreationBean.setJt_cifName10(rs.getString(40)); + //END + request.setAttribute("displayFlag", "Y"); + + } + } + + if (filter.equalsIgnoreCase("KCC")) { + + while (rs.next()) { + searchFound = 1; + oAccountCreationBean = new AccountCreationBean(); + oAccountCreationBean.setCifNumber(rs.getString(1)); + oAccountCreationBean.setProductName(rs.getString(2)); + oAccountCreationBean.setInttDescription(rs.getString(3)); + oAccountCreationBean.setActivityCode(rs.getString(4)); + oAccountCreationBean.setCustomerType(rs.getString(5)); + oAccountCreationBean.setSegmentCode(rs.getString(6)); + oAccountCreationBean.setId(rs.getString(7)); + oAccountCreationBean.setCbsSavingsAccount(rs.getString(8)); + oAccountCreationBean.setLimit(rs.getString(9)); + oAccountCreationBean.setLimit_kind(rs.getString(10)); + oAccountCreationBean.setLimitExpiryDate(rs.getString(11)); + oAccountCreationBean.setCollateralType(rs.getString(12)); + oAccountCreationBean.setLandinAcres(rs.getString(13)); + oAccountCreationBean.setDescription(rs.getString(14)); + oAccountCreationBean.setCurrentValuation(rs.getString(15)); + oAccountCreationBean.setSafeLendingMargin(rs.getString(16)); + oAccountCreationBean.setIntRate(rs.getString(17)); + oAccountCreationBean.setPenIntRate(rs.getString(18)); + + request.setAttribute("displayFlag", "Y"); + } + + } + + if (filter.equalsIgnoreCase("LOAN")) { + + while (rs.next()) { + searchFound = 1; + oLoanAccountCreationBean = new LoanAccountCreationBean(); + oLoanAccountCreationBean.setProductCode(rs.getString(1)); + oLoanAccountCreationBean.setInttCategory(rs.getString(2)); + oLoanAccountCreationBean.setActivityCode(rs.getString(3)); + oLoanAccountCreationBean.setSegmentCode(rs.getString(4)); + oLoanAccountCreationBean.setId(rs.getString(5)); + oLoanAccountCreationBean.setCifNumber(rs.getString(6)); + oLoanAccountCreationBean.setCustomerType(rs.getString(7)); + oLoanAccountCreationBean.setLoanappAmt(rs.getString(8)); + oLoanAccountCreationBean.setLoanTerm(rs.getString(9)); + oLoanAccountCreationBean.setSchemeCode(rs.getString(10)); + oLoanAccountCreationBean.setPurposeCode(rs.getString(11)); + oLoanAccountCreationBean.setCollateralType(rs.getString(12)); + oLoanAccountCreationBean.setDescription(rs.getString(13)); + oLoanAccountCreationBean.setCurrentValuation(rs.getString(14)); + oLoanAccountCreationBean.setSafeLendingMargin(rs.getString(15)); + oLoanAccountCreationBean.setEligAmt(rs.getString(16)); + oLoanAccountCreationBean.setGurantorName(rs.getString(17)); + oLoanAccountCreationBean.setGuarantorAddress(rs.getString(18)); + oLoanAccountCreationBean.setGuarantorDOB(rs.getString(19)); + oLoanAccountCreationBean.setGuarantorJob(rs.getString(20)); + oLoanAccountCreationBean.setGurantorIncome(rs.getString(21)); + oLoanAccountCreationBean.setGuarRelation(rs.getString(22)); + oLoanAccountCreationBean.setGuarIdType(rs.getString(23)); + oLoanAccountCreationBean.setGuarIdNo(rs.getString(24)); + oLoanAccountCreationBean.setCustName(rs.getString(25)); + oLoanAccountCreationBean.setIntRate(rs.getString(26)); + oLoanAccountCreationBean.setPenIntRate(rs.getString(27)); + + request.setAttribute("displayFlag", "Y"); + + } + } + if (searchFound == 0) { + message = "No data exists for selected item"; + request.setAttribute("message", message); + } + + request.setAttribute("message", message); + + if (filter.equalsIgnoreCase("DEPOSIT")) { + request.setAttribute("oDepositAccountCreationBean", oDepositAccountCreationBean); + request.getRequestDispatcher("/Deposit/DepositAccountCreationReadonly.jsp").forward(request, response); + } else if (filter.equalsIgnoreCase("KCC")) { + request.setAttribute("oAccountCreationBean", oAccountCreationBean); + request.getRequestDispatcher("/accountCreationReadOnly.jsp").forward(request, response); + } else if (filter.equalsIgnoreCase("LOAN")) { + request.setAttribute("oLoanAccountCreationBean", oLoanAccountCreationBean); + request.getRequestDispatcher("/Loan/LoanAccountCreationReadOnly.jsp").forward(request, response); + } + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } +// if (searchFound == 0) { +// message = "No data exists for selected item"; +// request.setAttribute("message", message); +// } +// +// request.setAttribute("message", message); +// +// if (filter.equalsIgnoreCase("DEPOSIT")) { +// request.setAttribute("oDepositAccountCreationBean", oDepositAccountCreationBean); +// request.getRequestDispatcher("/Deposit/DepositAccountCreationReadonly.jsp").forward(request, response); +// } else if (filter.equalsIgnoreCase("KCC")) { +// request.setAttribute("oAccountCreationBean", oAccountCreationBean); +// request.getRequestDispatcher("/accountCreationReadOnly.jsp").forward(request, response); +// }else if (filter.equalsIgnoreCase("LOAN")) { +// request.setAttribute("oLoanAccountCreationBean", oLoanAccountCreationBean); +// request.getRequestDispatcher("/Loan/LoanAccountCreationReadOnly.jsp").forward(request, response); +// +// } + + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/RemoveLienServlet.java b/IPKS_Updated/src/src/java/Controller/RemoveLienServlet.java new file mode 100644 index 0000000..29e6a68 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/RemoveLienServlet.java @@ -0,0 +1,340 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +//import Dao.LienMarkingDao; +//import DataEntryBean.ChequeDetailsBean; +//import java.io.IOException; +//import java.util.ArrayList; +//import javax.servlet.ServletException; +//import javax.servlet.http.HttpServlet; +//import javax.servlet.http.HttpServletRequest; +//import javax.servlet.http.HttpServletResponse; +//import javax.servlet.http.HttpSession; +import DataEntryBean.LienMarkingBean; +import DataEntryBean.NscDetailsBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.BatchUpdateException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 1004242 + */ +public class RemoveLienServlet extends HttpServlet{ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + String lienType = ""; + // String comment = request.getParameter("comment"); + + CallableStatement stmt = null; + NscDetailsBean oNscDetailsBean = null; + String qno = ""; + String nscMessage = ""; + int counter = 0; + ArrayList alNscDetailsBean = new ArrayList(); + LienMarkingBean oLienMarkingBean = new LienMarkingBean(); + try { + // BeanUtils.populate(oLienMarkingBean, request.getParameterMap()); + lienType = request.getParameter("lienType"); + } catch (IllegalAccessException ex) { + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call operations2.RemoveGoldLien(?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oLienMarkingBean.getLoanAccount()); + proc.setString(2, pacsId); + proc.setString(3, user); + proc.setString(4, comment); + proc.registerOutParameter(5, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(5); + +// if (message.contains("#") && lienType!=null && lienType.equalsIgnoreCase("K")) { +// qno = message.substring(message.indexOf("#") + 1); +// counter = Integer.parseInt(request.getParameter("rowCounter")); +// for (int i = 1; i <= counter; i++) { +// try { +// +// String refno = request.getParameter("ref" + i); +// String amt = request.getParameter("amt" + i); +// String openDt = request.getParameter("openDt" + i); +// String expDt = request.getParameter("expDt" + i); +// +// if (refno != null) { +// oNscDetailsBean = new NscDetailsBean(); +// oNscDetailsBean.setRefno(refno); +// oNscDetailsBean.setAmt(amt); +// oNscDetailsBean.setOpenDt(openDt); +// oNscDetailsBean.setExpDt(expDt); +// alNscDetailsBean.add(oNscDetailsBean); +// } +// } catch (Exception e) { +// System.out.println("Error occurred during processing."); +// } +// } +// +// if (alNscDetailsBean.size() > 0) { +// try { +// +// for (int j = 0; j < alNscDetailsBean.size(); j++) { +// stmt = con.prepareCall("{ call Operations2.saveNscDetails(?,?,?,?,?,?) }"); +// oNscDetailsBean = alNscDetailsBean.get(j); +// stmt.setString(1, qno); +// stmt.setString(2, oNscDetailsBean.getRefno()); +// stmt.setString(3, oNscDetailsBean.getAmt()); +// stmt.setString(4, oNscDetailsBean.getOpenDt()); +// stmt.setString(5, oNscDetailsBean.getExpDt()); +// stmt.registerOutParameter(6, java.sql.Types.VARCHAR); +// stmt.execute(); +// nscMessage = stmt.getString(6); +// +// if (!nscMessage.equalsIgnoreCase("NSC Details inserted")) { +// con.rollback(); +// message = nscMessage; +// break; +// } +// +// stmt.close(); +// } +// +// if (nscMessage.equalsIgnoreCase("NSC Details inserted")) { +// con.commit(); +// } +// } catch (BatchUpdateException ex) { +// try { +// con.rollback(); +// message = "Entered NSC details already tagged"; +// } catch (SQLException ex1) { +// // Logger.getLogger(LienMarkingServlet.class.getName()).log(Level.SEVERE, null, ex1); +// System.out.println("Error occurred during processing."); +// } +// +// +// // Logger.getLogger(LienMarkingServlet.class.getName()).log(Level.SEVERE, null, ex); +// // System.out.println(ex.toString()); +// System.out.println("Error occurred during processing."); +// } catch (SQLException ex1) { +// try { +// con.rollback(); +// } catch (SQLException e) { +// // Logger.getLogger(LienMarkingServlet.class.getName()).log(Level.SEVERE, null, e); +// System.out.println("Error occurred during processing."); +// } +// message = "Error occurred while saving NSC details. Please try Again!"; +// // Logger.getLogger(LienMarkingServlet.class.getName()).log(Level.SEVERE, null, ex1); +// System.out.println("Error occurred during processing."); +// } finally { +// try { +// stmt.close(); +// } catch (SQLException e) { +// // System.out.println(e.toString()); +// System.out.println("Error occurred during stmt close."); +// } +// try { +// con.commit(); +// con.close(); +// } catch (SQLException ex) { +// // Logger.getLogger(LienMarkingServlet.class.getName()).log(Level.SEVERE, null, ex); +// // System.out.println(ex.toString()); +// System.out.println("Error occurred during connection close."); +// } +// } +// +// } +// } if (message.contains("#") && lienType!=null && lienType.equalsIgnoreCase("G")) { +// qno = message.substring(message.indexOf("#") + 1); +// counter = Integer.parseInt(request.getParameter("rowCounter")); +// for (int i = 1; i <= counter; i++) { +// try { +// +// String bond = request.getParameter("bond" + i); +// String grossW = request.getParameter("grossW" + i); +// String netW = request.getParameter("netW" + i); +// +// if (bond != null) { +// oNscDetailsBean = new NscDetailsBean(); +// oNscDetailsBean.setBond(bond); +// oNscDetailsBean.setGrossW(grossW); +// oNscDetailsBean.setNetW(netW); +// alNscDetailsBean.add(oNscDetailsBean); +// } +// } catch (Exception e) { +// System.out.println("Error occurred during processing."); +// } +// } +// +// if (alNscDetailsBean.size() > 0) { +// try { +// +// for (int j = 0; j < alNscDetailsBean.size(); j++) { +// stmt = con.prepareCall("{ call Operations2.saveGoldDetails(?,?,?,?,?) }"); +// oNscDetailsBean = alNscDetailsBean.get(j); +// stmt.setString(1, qno); +// stmt.setString(2, oNscDetailsBean.getBond()); +// stmt.setString(3, oNscDetailsBean.getGrossW()); +// stmt.setString(4, oNscDetailsBean.getNetW()); +// stmt.registerOutParameter(5, java.sql.Types.VARCHAR); +// stmt.execute(); +// nscMessage = stmt.getString(5); +// +// if (!nscMessage.equalsIgnoreCase("Gold Details inserted")) { +// con.rollback(); +// message = nscMessage; +// break; +// } +// stmt.close(); +// } +// +// if (nscMessage.equalsIgnoreCase("Gold Details inserted")) { +// con.commit(); +// } +// } catch (BatchUpdateException ex) { +// try { +// con.rollback(); +// message = "Entered Gold details already tagged"; +// } catch (SQLException ex1) { +// System.out.println("Error occurred during processing."); +// } +// +// System.out.println("Error occurred during processing."); +// } catch (SQLException ex1) { +// try { +// con.rollback(); +// } catch (SQLException e) { +// System.out.println("Error occurred during processing."); +// } +// message = "Error occurred while saving Gold details. Please try Again!"; +// System.out.println("Error occurred during processing."); +// } finally { +// try { +// stmt.close(); +// } catch (SQLException e) { +// System.out.println("Error occurred during stmt close."); +// } +// try { +// con.commit(); +// con.close(); +// } catch (SQLException ex) { +// System.out.println("Error occurred during connection close."); +// } +// } +// +// } +// } + + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.commit(); + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Loan/RemoveLien.jsp").forward(request, response); + + } + } + +// HttpSession session = request.getSession(false); +// String pacsId = (String) session.getAttribute("pacsId"); +// String tellerId = (String)session.getAttribute("user"); +// LienMarkingDao aiDao = new LienMarkingDao(); +// String result = null; +// +// +// try{ +// +// String lienType = request.getParameter("lienType"); +// String KVPNo = request.getParameter("KVPNo"); +// String LoanAccount = request.getParameter("LoanAccount"); +// String DepAccount = request.getParameter("dep_acc_no"); +// String SecurityAmt = request.getParameter("currentValuation"); +// String safeLendingMargin = request.getParameter("safeLendingMargin"); +// String description = request.getParameter("description"); +// String Expdt = request.getParameter("expDt"); +// String OpenDt = request.getParameter("openDt"); +// +// result = aiDao.LienMarkingServletProc(LoanAccount, DepAccount, KVPNo, lienType, SecurityAmt, safeLendingMargin, description, Expdt, OpenDt, tellerId, pacsId); +// +// request.setAttribute("message1", result); +// request.getRequestDispatcher("/Deposit/LienMarking.jsp").forward(request, response); +// +// } catch (Exception e) { +// e.printStackTrace(); +// request.setAttribute("message1", "Error occured. Please try again"); +// request.getRequestDispatcher("/Deposit/LienMarking.jsp").forward(request, response); +// } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + @Override + public String getServletInfo() { + return "Short description"; + }//
+} diff --git a/IPKS_Updated/src/src/java/Controller/RepayLoanServlet.java b/IPKS_Updated/src/src/java/Controller/RepayLoanServlet.java new file mode 100644 index 0000000..d5eb01e --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/RepayLoanServlet.java @@ -0,0 +1,217 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.RepayLoanBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 1000974 + */ +public class RepayLoanServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet RepayLoanServlet"); + out.println(""); + out.println(""); + out.println("

Servlet RepayLoanServlet at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + // processRequest(request, response); + + Connection con = null; + CallableStatement proc = null; + String message = ""; + String JSP = ""; + HttpSession session = request.getSession(); + JSP = request.getParameter("screenName") == null ? "" : (request.getParameter("screenName")); + + RepayLoanBean oRepayLoanBean = new RepayLoanBean(); + + try { + // BeanUtils.populate(oRepayLoanBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(RepayLoanServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + if (JSP.equalsIgnoreCase("RepayLoan")) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call operations.POST_LOAN_REP_TXN(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}"); + + } catch (SQLException ex) { + // Logger.getLogger(RepayLoanServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + String pacsId = session.getAttribute("pacsId").toString(); + String makerId = session.getAttribute("user").toString(); + //String twothouIN = (String) request.getParameter("twothouIN") == "" ? "0" : (request.getParameter("twothouIN")); + //String twothouOUT = request.getParameter("twothouOUT") == "" ? "0" : (request.getParameter("twothouOUT")); + // String fivehundredIN = request.getParameter("fivehundredIN") == "" ? "0" : (request.getParameter("fivehundredIN")); + //String fivehundredOUT = request.getParameter("fivehundredOUT") == "" ? "0" : (request.getParameter("fivehundredOUT")); + //String hundredIN = request.getParameter("hundredIN") == "" ? "0" : (request.getParameter("hundredIN")); + //String hundredOUT = request.getParameter("hundredOUT") == "" ? "0" : (request.getParameter("hundredOUT")); + //String fiftyIN = request.getParameter("fiftyIN") == "" ? "0" : (request.getParameter("fiftyIN")); + //String fiftyOUT = request.getParameter("fiftyOUT") == "" ? "0" : (request.getParameter("fiftyOUT")); + //String twentyIN = request.getParameter("twentyIN") == "" ? "0" : (request.getParameter("twentyIN")); + //String twentyOUT = request.getParameter("twentyOUT") == "" ? "0" : (request.getParameter("twentyOUT")); + //String tenIN = request.getParameter("tenIN") == "" ? "0" : (request.getParameter("tenIN")); + //String tenOUT = request.getParameter("tenOUT") == "" ? "0" : (request.getParameter("tenOUT")); + //String fiveIN = request.getParameter("fiveIN") == "" ? "0" : (request.getParameter("fiveIN")); + //String fiveOUT = request.getParameter("fiveOUT") == "" ? "0" : (request.getParameter("fiveOUT")); + //String twoIN = request.getParameter("twoIN") == "" ? "0" : (request.getParameter("twoIN")); + //String twoOUT = request.getParameter("twoOUT") == "" ? "0" : (request.getParameter("twoOUT")); + //String oneIN = request.getParameter("oneIN") == "" ? "0" : (request.getParameter("oneIN")); + //String oneOUT = request.getParameter("oneOUT") == "" ? "0" : (request.getParameter("oneOUT")); + //String fiftyPaisaIN = request.getParameter("fiftyPaisaIN") == "" ? "0" : (request.getParameter("fiftyPaisaIN")); + //String fiftyPaisaOUT = request.getParameter("fiftyPaisaOUT") == "" ? "0" : (request.getParameter("fiftyPaisaOUT")); + //String onePaisaIN = request.getParameter("onePaisaIN") == "" ? "0" : (request.getParameter("onePaisaIN")); + //String onePaisaOUT = request.getParameter("onePaisaOUT") == "" ? "0" : (request.getParameter("onePaisaOUT")); + //String twohundredIN = request.getParameter("twohundredIN") == "" ? "0" : (request.getParameter("twohundredIN")); + //String twohundredOUT = request.getParameter("twohundredOUT") == "" ? "0" : (request.getParameter("twohundredOUT")); + //String memberId=request.getParameter("memberId"); + + + proc.setString(1, pacsId); + proc.setString(2, oRepayLoanBean.getLoanAcc()); + proc.setString(3, oRepayLoanBean.getRepayAmt()); + proc.setString(4, oRepayLoanBean.getPayMode()); + if(oRepayLoanBean.getPayMode().equalsIgnoreCase("G")) + proc.setString(5, oRepayLoanBean.getGlAcc()); + else if(oRepayLoanBean.getPayMode().equalsIgnoreCase("T") || oRepayLoanBean.getPayMode().equalsIgnoreCase("C")) + proc.setString(5, oRepayLoanBean.getTransAcc()); + proc.setString(6, makerId); + proc.setString(7, "59235"); + proc.setString(8, oRepayLoanBean.getNarration()); + proc.setString(9, twothouIN); + proc.setString(10, fivehundredIN); + proc.setString(11, hundredIN); + proc.setString(12, fiftyIN); + proc.setString(13, twentyIN); + proc.setString(14, tenIN); + proc.setString(15, fiveIN); + proc.setString(16, twoIN); + proc.setString(17, oneIN); + proc.setString(18, fiftyPaisaIN); + proc.setString(19, onePaisaIN); + proc.setString(20, twothouOUT); + proc.setString(21, fivehundredOUT); + proc.setString(22, hundredOUT); + proc.setString(23, fiftyOUT); + proc.setString(24, twentyOUT); + proc.setString(25, tenOUT); + proc.setString(26, fiveOUT); + proc.setString(27, twoOUT); + proc.setString(28, oneOUT); + proc.setString(29, fiftyPaisaOUT); + proc.setString(30, onePaisaOUT); + proc.registerOutParameter(31, java.sql.Types.VARCHAR); + proc.setString(32, oRepayLoanBean.getRepayType()); + proc.setString(33, oRepayLoanBean.getIntAdjAmt()); + proc.setString(34, memberId); + proc.setString(35, twohundredIN); + proc.setString(36, twohundredOUT); + + proc.execute(); + + // message = proc.getString(31); + + + } catch (SQLException ex) { + // Logger.getLogger(RepayLoanServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(RepayLoanServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Loan/RepayLoan.jsp").forward(request, response); + } + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/SBRateSlabServlet.java b/IPKS_Updated/src/src/java/Controller/SBRateSlabServlet.java new file mode 100644 index 0000000..323df68 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/SBRateSlabServlet.java @@ -0,0 +1,301 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import java.io.IOException; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import DataEntryBean.GovtOrderCreationDetailBean; +import DataEntryBean.GovtOrderCreationExpenseBean; +import DataEntryBean.GovtOrderCreationHeaderBean; +import DataEntryBean.DepositRateSlabBean; +import LoginDb.DbHandler; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.StringTokenizer; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 590685 + */ +public class SBRateSlabServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException, SQLException { + + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = (String) session.getAttribute("user"); + + String ServletName = request.getParameter("handle_id"); + String dep_product_id = request.getParameter("dep_product_id"); + + DepositRateSlabBean oDepositRateSlabBean = new DepositRateSlabBean(); + DepositRateSlabBean oDepositRateSlabBeanHeader = new DepositRateSlabBean(); + ArrayList alDepositRateSlabBean = new ArrayList(); + ArrayList alDepositRateSlabBeanNew = new ArrayList(); + ArrayList alDepositRateSlabBeanUpdated = new ArrayList(); + + try { + // BeanUtils.populate(oDepositRateSlabBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + System.out.println("Error occurred during processing."); + } + + if ("Search".equalsIgnoreCase(ServletName)) { + + dep_product_id = request.getParameter("dep_product_id"); + + Connection connection = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + try { + + // String query = "select t.rate, t.term_from, t.term_to, t.from_amt, t.to_amt, t.id as slap_table_id,p.prod_code,p.int_cat,p.prod_desc,p.intt_cat_desc,t.product_id from TD_RATE_SLAB t,dep_product p where t.product_id = p.id and t.product_id = '" + dep_product_id + "' order by t.rate asc "; + String query = " select t.intt_rate, t.threshold_bal, t.threshold_intt_rate, t.min_bal, t.max_bal, t.min_wdl, t.max_wdl, " + +" t.int_cap_freq, t.dr_txn_flag, t.dormancy, t.id, p.prod_code, p.int_cat, p.prod_desc, p.intt_cat_desc from sb_prod_map t, dep_product p where t.id = p.id and substr(p.prod_code,1,2)='11' and t.pacs_id = '" + pacsId + "' "; + // ResultSet rs = statement.executeQuery(query); + + while (rs.next()) { + + oDepositRateSlabBean = new DepositRateSlabBean(); + oDepositRateSlabBean.setDep_product_id(rs.getString("id")); + oDepositRateSlabBean.setInttRate(rs.getString("intt_rate")); + oDepositRateSlabBean.setInttCapFreq(rs.getString("int_cap_freq")); + oDepositRateSlabBean.setProdCode(rs.getString("prod_code")); + oDepositRateSlabBean.setProdDesc(rs.getString("prod_desc")); + oDepositRateSlabBean.setInttCat(rs.getString("int_cat")); + oDepositRateSlabBean.setInttCatDesc(rs.getString("intt_cat_desc")); + oDepositRateSlabBean.setThresholdBal(rs.getString("threshold_bal")); + oDepositRateSlabBean.setThresholdInttRate(rs.getString("threshold_intt_rate")); + oDepositRateSlabBean.setMinBal(rs.getString("min_bal")); + oDepositRateSlabBean.setMaxBal(rs.getString("max_bal")); + oDepositRateSlabBean.setMinWithdraw(rs.getString("min_wdl")); + oDepositRateSlabBean.setMaxWithdraw(rs.getString("max_wdl")); + oDepositRateSlabBean.setDrTxnFlag(rs.getString("dr_txn_flag")); + oDepositRateSlabBean.setDormancy(rs.getString("dormancy")); + + + alDepositRateSlabBean.add(oDepositRateSlabBean); + request.setAttribute("displayFlag", "Y"); + } + + statement.close(); + rs.close(); + + + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + connection.close(); + } + + request.setAttribute("oDepositRateSlabBean", oDepositRateSlabBeanHeader); + request.setAttribute("alDepositRateSlabBean", alDepositRateSlabBean); + + request.getRequestDispatcher("/Deposit/SBRateSlab.jsp").forward(request, response); + + } else if ("Update".equalsIgnoreCase(ServletName)) { + + int add = Integer.parseInt(request.getParameter("add")); + int counterfor_Detail = Integer.parseInt(request.getParameter("rowCounterAmend")); + counterfor_Detail = counterfor_Detail + add; + + for (int i = 1; i <= counterfor_Detail; i++) { + try { + + //String depProdId = request.getParameter("dep_product_id" +i); + //String inttRateAmend = request.getParameter("inttRateAmend" + i); + //String inttCapFreq = request.getParameter("inttCapFreq" + i); + String prodCode = request.getParameter("prodCode" + i); + String prodDesc = request.getParameter("prodDesc" + i); + String inttCat = request.getParameter("inttCat" + i); + String inttCatDesc = request.getParameter("inttCatDesc" + i); + // String thresholdBal = request.getParameter("thresholdBal" + i); + // String thresholdInttRate = request.getParameter("thresholdInttRate" + i); + //String minBal = request.getParameter("minBal" + i); + //String maxBal = request.getParameter("maxBal" + i); + //String minWithdraw = request.getParameter("minWithdraw" + i); + //String maxWithdraw = request.getParameter("maxWithdraw" + i); + //String drTxnFlag = request.getParameter("drTxnFlag" + i); + //String dormancy = request.getParameter("dormancy" + i); + String rowStatus = request.getParameter("rowStatus" + i); + String detailID = request.getParameter("slabTable_id" + i); + + if ( depProdId!= null && inttRateAmend != null && inttCapFreq != null && prodCode != null && prodDesc != null && inttCat != null && inttCatDesc != null && thresholdBal != null && thresholdInttRate != null && minBal != null && maxBal != null && minWithdraw != null && maxWithdraw != null && drTxnFlag != null && dormancy != null && rowStatus != null && detailID != null) { + oDepositRateSlabBean = new DepositRateSlabBean(); + oDepositRateSlabBean.setDep_product_id(depProdId); + oDepositRateSlabBean.setInttRateAmend(inttRateAmend); + oDepositRateSlabBean.setInttCapFreq(inttCapFreq); + oDepositRateSlabBean.setProdCode(prodCode); + oDepositRateSlabBean.setProdDesc(prodDesc); + oDepositRateSlabBean.setInttCat(inttCat); + oDepositRateSlabBean.setInttCatDesc(inttCatDesc); + oDepositRateSlabBean.setThresholdBal(thresholdBal); + oDepositRateSlabBean.setThresholdInttRate(thresholdInttRate); + oDepositRateSlabBean.setMinBal(minBal); + oDepositRateSlabBean.setMaxBal(maxBal); + oDepositRateSlabBean.setMinWithdraw(minWithdraw); + oDepositRateSlabBean.setMaxWithdraw(maxWithdraw); + oDepositRateSlabBean.setDrTxnFlag(drTxnFlag); + oDepositRateSlabBean.setDormancy(dormancy); + oDepositRateSlabBean.setSlabTable_id(detailID); + + if (rowStatus.equals("N")) { + alDepositRateSlabBeanNew.add(oDepositRateSlabBean); + } else { + alDepositRateSlabBeanUpdated.add(oDepositRateSlabBean); + } + } + + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + + if (alDepositRateSlabBeanUpdated.size() > 0) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call operations2.upsert_sb_rate_slab(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alDepositRateSlabBeanUpdated.size(); j++) { + oDepositRateSlabBean = alDepositRateSlabBeanUpdated.get(j); + + + proc.setString(1, oDepositRateSlabBean.getDep_product_id()); + proc.setString(2, oDepositRateSlabBean.getInttRateAmend()); + proc.setString(3, oDepositRateSlabBean.getThresholdBal()); + proc.setString(4, oDepositRateSlabBean.getThresholdInttRate()); + proc.setString(5, oDepositRateSlabBean.getMinBal()); + proc.setString(6, oDepositRateSlabBean.getMaxBal()); + proc.setString(7, oDepositRateSlabBean.getMinWithdraw()); + proc.setString(8, oDepositRateSlabBean.getMaxWithdraw()); + proc.setString(9, oDepositRateSlabBean.getInttCapFreq()); + proc.setString(10, oDepositRateSlabBean.getDrTxnFlag()); + proc.setString(11, oDepositRateSlabBean.getDormancy()); + proc.setString(12, "Update"); + proc.setString(13, pacsId); + proc.setString(14, tellerId); + proc.registerOutParameter(15, java.sql.Types.VARCHAR); + + proc.execute(); + // message = proc.getString(15); + if (!message.equalsIgnoreCase("SB rate slab successfully updated")) { + con.rollback(); + break; + } + } + con.commit(); + // message = proc.getString(15); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/SBRateSlab.jsp").forward(request, response); + } + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + try { + processRequest(request, response); + + } catch (SQLException ex) { + // Logger.getLogger(DepositRateSlabServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + try { + processRequest(request, response); + + } catch (SQLException ex) { + // Logger.getLogger(DepositRateSlabServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/SHGServlet.java b/IPKS_Updated/src/src/java/Controller/SHGServlet.java new file mode 100644 index 0000000..377a311 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/SHGServlet.java @@ -0,0 +1,77 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 986137 + */ +public class SHGServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + //session.setAttribute("moduleName", "shg"); + if( String.valueOf(session.getAttribute("moduleName")).equalsIgnoreCase("SpecialBothShg") || String.valueOf(session.getAttribute("moduleName")).equalsIgnoreCase("SpecialBothDep")) + session.setAttribute("moduleName", "SpecialBothShg"); + else if(!String.valueOf(session.getAttribute("moduleName")).equalsIgnoreCase("SpecialKcc") ) + session.setAttribute("moduleName", "shg"); + + request.getRequestDispatcher("/welcome.jsp").forward(request, response); + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/SODEODServlet.java b/IPKS_Updated/src/src/java/Controller/SODEODServlet.java new file mode 100644 index 0000000..fbf78db --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/SODEODServlet.java @@ -0,0 +1,72 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 986137 + */ +public class SODEODServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + session.setAttribute("moduleName", "eod"); + request.getRequestDispatcher("/welcome.jsp").forward(request, response); + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/SalGenerationForCBS.java b/IPKS_Updated/src/src/java/Controller/SalGenerationForCBS.java new file mode 100644 index 0000000..3872147 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/SalGenerationForCBS.java @@ -0,0 +1,128 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author Tcs Helpdesk10 + */ +public class SalGenerationForCBS extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + String handle_id = request.getParameter("handle_id"); + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call prepare_sal_main_acc(?) }"); + } catch (SQLException ex) { + // Logger.getLogger(kycCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.registerOutParameter(1, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(1); + + } catch (SQLException ex) { + // Logger.getLogger(kycCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(kycCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/P2P_I2I_Report.jsp").forward(request, response); + + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/SellProcureItemServlet.java b/IPKS_Updated/src/src/java/Controller/SellProcureItemServlet.java new file mode 100644 index 0000000..e3af9b0 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/SellProcureItemServlet.java @@ -0,0 +1,365 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.GPSSellProcurementBean; +import DataEntryBean.GovtOrderCreationExpenseBean; +import java.io.IOException; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import DataEntryBean.SellProcureItemBean; +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.http.HttpSession; + +/** + * + * @author 590685 + */ +/** + * + * @author Tcs Helpdesk10 + */ +public class SellProcureItemServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException, SQLException { + + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + ResultSet rs = null; + String message = ""; + String orderId = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + long num = (long) Math.floor(Math.random() * 8100000000000L) + 2100000000000L; + String sellId = String.valueOf(num); + + SellProcureItemBean oSellProcureItemBean = null; + GovtOrderCreationExpenseBean oGovtOrderCreationExpenseBean = null; + ArrayList alGovtOrderCreationExpenseBean = new ArrayList(); + + GPSSellProcurementBean oGPSSellProcurementBean = new GPSSellProcurementBean(); + ArrayList alGPSSellProcurementBean = null; + + String handle_id = request.getParameter("handle_id"); + // String sell = request.getParameter("sellTo"); + // String deliver = request.getParameter("deliveredTo"); + // String addr = request.getParameter("addr"); + // String orderCode = request.getParameter("govProcCode"); + // orderId = request.getParameter("govtProcId"); + // String expenseGrandTotal = request.getParameter("expense_total"); + String commission = request.getParameter("commission"); + String totalCommission = ""; + String CommissionRate = ""; + int counter = 0; + counter = Integer.parseInt(request.getParameter("rowCounter")); + + if (handle_id.equalsIgnoreCase("calculate")) { + + con = DbHandler.getDBConnection(); + float totalExpense = 0; + try { + + + int totalQty = 0; + int totalAmt = 0; + try { + for (int i = 1; i <= counter; i++) { + // String sell_qty = request.getParameter("sell_qty" + i); + totalQty = totalQty + Integer.parseInt(sell_qty); + // String sell_amt = request.getParameter("total" + i); + totalAmt = totalAmt + Integer.parseInt(sell_amt); + + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } + System.out.print(totalQty); + + proc = con.prepareCall("select ed.expense_head,ed.expense_rate,ed.expense_rate*'" + totalQty + "',g.commissionrate*'" + totalAmt + "'/100,g.commissionrate from order_expense_detail ed, GPS_GOVT_PROC_HEADER g where ed.order_id='" + orderId + "' and ed.order_id=g.id "); + // rs = proc.executeQuery(); + while (rs.next()) { + oGovtOrderCreationExpenseBean = new GovtOrderCreationExpenseBean(); + oGovtOrderCreationExpenseBean.setExpense_head(rs.getString(1)); + oGovtOrderCreationExpenseBean.setExpense_rate_per_unit(rs.getString(2)); + oGovtOrderCreationExpenseBean.setExpense_total_individual(rs.getString(3)); + totalExpense = totalExpense + Float.parseFloat(rs.getString(3)); + totalCommission = rs.getString(4); + CommissionRate = rs.getString(5); + + alGovtOrderCreationExpenseBean.add(oGovtOrderCreationExpenseBean); + request.setAttribute("displayFlag", "Y"); + } + //int rowCounter = Integer.parseInt(request.getParameter("rowCounter")); + alGPSSellProcurementBean = new ArrayList(); + for (int i = 1; i <= counter; i++) { + try { + + // String item_desc = request.getParameter("item_desc" + i); + // String subtype_desc = request.getParameter("subtype_desc" + i); + // String procId = request.getParameter("procId" + i); + //String item_unit = request.getParameter("item_unit" + i); + //String item_rateperunit = request.getParameter("item_rateperunit" + i); + //String qty = request.getParameter("qty" + i); + //String sell_qty = request.getParameter("sell_qty" + i); + //String total = request.getParameter("total" + i); + //String commodityId = request.getParameter("commodityId" + i); + //String item_type = request.getParameter("item_type" + i); + //String item_subtype = request.getParameter("item_subtype" + i); + //String sellerId = request.getParameter("sellerId" + i); + //String stockId = request.getParameter("stockId" + i); + + + oGPSSellProcurementBean = new GPSSellProcurementBean(); + oGPSSellProcurementBean.setCommodityId(commodityId); + oGPSSellProcurementBean.setItem_desc(item_desc); + oGPSSellProcurementBean.setSubtype_desc(subtype_desc); + oGPSSellProcurementBean.setProcId(procId); + oGPSSellProcurementBean.setItem_unit(item_unit); + oGPSSellProcurementBean.setItem_rateperunit(item_rateperunit); + oGPSSellProcurementBean.setQty(qty); + oGPSSellProcurementBean.setSell_qty(sell_qty); + oGPSSellProcurementBean.setTotal(total); + oGPSSellProcurementBean.setItem_type(item_type); + oGPSSellProcurementBean.setItem_subtype(item_subtype); + oGPSSellProcurementBean.setSellerId(sellerId); + oGPSSellProcurementBean.setStockId(stockId); + + + if (!item_desc.equals("") || !item_desc.equals(null)) { + alGPSSellProcurementBean.add(oGPSSellProcurementBean); + } + + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + + } catch (SQLException ex) { + // Logger.getLogger(SellProcureItemServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(SellProcureItemServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + + oGovtOrderCreationExpenseBean = new GovtOrderCreationExpenseBean(); + oGovtOrderCreationExpenseBean.setSell(sell); + oGovtOrderCreationExpenseBean.setDeliver(deliver); + oGovtOrderCreationExpenseBean.setAddress(addr); + oGovtOrderCreationExpenseBean.setGovtOrderId(orderId); + oGovtOrderCreationExpenseBean.setGovtOrderCode(orderCode); + oGovtOrderCreationExpenseBean.setExpense_total_grand(String.valueOf(totalExpense)); + oGovtOrderCreationExpenseBean.setCommissionRate(totalCommission); + + } else if (handle_id.equalsIgnoreCase("Create")) { + + con = DbHandler.getDBConnection(); + + int counter1 = Integer.parseInt(request.getParameter("rowCounter_afterCalculate")); + String indToatl[] = new String[counter1]; + ArrayList alSellProcureItemBean = new ArrayList(); + + proc = con.prepareCall("select g.commissionrate from GPS_GOVT_PROC_HEADER g where g.id='" + orderId + "' "); + rs = proc.executeQuery(); + while (rs.next()) { + CommissionRate = rs.getString(1); + } + + for (int i = 0; i < counter1; i++) { + try { + + // String procId = request.getParameter("procIdAfterCalc" + i); + // String item_type = request.getParameter("item_typeAfterCalc" + i); + // String item_subtype = request.getParameter("item_subtypeAfterCalc" + i); + // String item_unit = request.getParameter("item_unitAfterCalc" + i); + // String item_rateperunit = request.getParameter("item_rateperunitAfterCalc" + i); + String qty = request.getParameter("qtyAfterCalc" + i); + // String sell_qty = request.getParameter("sell_qtyAfterCalc" + i); + // String total = request.getParameter("totalAfterCalc" + i); + // String commodityId = request.getParameter("commodityIdAfterCalc" + i); + // String sellerId = request.getParameter("sellerIdAfterCalc" + i); + // String stockId = request.getParameter("StockIdAfterCalc" + i); + // String expenseCharges = request.getParameter("expense_charges"); + + indToatl[i] = total; + + oSellProcureItemBean = new SellProcureItemBean(); + oSellProcureItemBean.setProcId(procId); + oSellProcureItemBean.setItemType(item_type); + oSellProcureItemBean.setSubType(item_subtype); + oSellProcureItemBean.setItemUnit(item_unit); + oSellProcureItemBean.setItemRatePerUnit(item_rateperunit); + oSellProcureItemBean.setQty(qty); + oSellProcureItemBean.setSellQty(sell_qty); + oSellProcureItemBean.setItemTotal(total); + oSellProcureItemBean.setCommodityId(commodityId); + oSellProcureItemBean.setSellerId(sellerId); + oSellProcureItemBean.setStockId(stockId); + oGPSSellProcurementBean.setExpenseCharges(expenseCharges); + + alSellProcureItemBean.add(oSellProcureItemBean); + + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + con.close(); + } + if (alSellProcureItemBean.size() > 0) { + + oGovtOrderCreationExpenseBean = new GovtOrderCreationExpenseBean(); + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call GPS_Operation.item_sell_entry(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + for (int j = 0; j < alSellProcureItemBean.size(); j++) { + oSellProcureItemBean = alSellProcureItemBean.get(j); + float Commission = (Float.parseFloat(CommissionRate) * Integer.parseInt(indToatl[j]))/100 ; + proc.setString(1, sell); + proc.setString(2, deliver); + proc.setString(3, addr); + proc.setString(4, orderCode); + proc.setString(5, orderId); + proc.setString(6, oSellProcureItemBean.getProcId()); + proc.setString(7, oSellProcureItemBean.getItemType()); + proc.setString(8, oSellProcureItemBean.getSubType()); + proc.setString(9, oSellProcureItemBean.getItemUnit()); + proc.setString(10, oSellProcureItemBean.getItemRatePerUnit()); + proc.setString(11, oSellProcureItemBean.getSellQty()); + proc.setString(12, oSellProcureItemBean.getItemTotal()); + proc.setString(13, oSellProcureItemBean.getCommodityId()); + proc.setString(14, expenseGrandTotal); + proc.setString(15, sellId); + proc.setString(16, pacsId); + proc.setString(17, oSellProcureItemBean.getStockId()); + proc.setString(18, oSellProcureItemBean.getSellerId()); + proc.setString(19, String.valueOf(Commission)); + proc.setString(20, oGPSSellProcurementBean.getExpenseCharges()); + + proc.addBatch(); + + } + proc.executeBatch(); + message = "Sale Register Succesfully. Sale ID is: " + sellId; + + } catch (SQLException ex) { + // Logger.getLogger(SellProcureItemServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(SellProcureItemServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + + } + + } + request.setAttribute("alGPSSellProcurementBean", alGPSSellProcurementBean); + request.setAttribute("oGovtOrderCreationExpenseBean", oGovtOrderCreationExpenseBean); + request.setAttribute("alGovtOrderCreationExpenseBean", alGovtOrderCreationExpenseBean); + if (!message.equals("")) { + request.setAttribute("message", message); + request.setAttribute("sellId", sellId); + request.getRequestDispatcher("/GPS_JSP/SellItemChallan.jsp").forward(request, response); + } else { + request.getRequestDispatcher("/GPS_JSP/SellProcureItem.jsp").forward(request, response); + } + + } + +// + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + try { + processRequest(request, response); + + } catch (SQLException ex) { + // Logger.getLogger(SellProcureItemServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + try { + processRequest(request, response); + + } catch (SQLException ex) { + // Logger.getLogger(SellProcureItemServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + } + + /** + * Returns a short nameription of the servlet. + * + * @return a String containing servlet nameription + */ + @Override + public String getServletInfo() { + return "Short nameription"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/SellPurchaseAdjustmentServlet.java b/IPKS_Updated/src/src/java/Controller/SellPurchaseAdjustmentServlet.java new file mode 100644 index 0000000..96dd626 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/SellPurchaseAdjustmentServlet.java @@ -0,0 +1,133 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 986137 + */ +public class SellPurchaseAdjustmentServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + Connection con = null; + CallableStatement proc = null; + String message = ""; + HttpSession session = request.getSession(); + + String pacsId = session.getAttribute("pacsId").toString(); + String userId = session.getAttribute("user").toString(); + + String handleId = request.getParameter("handle_id"); + //String purchaseRef = request.getParameter("orderno"); + //String salesNo = request.getParameter("salesrefno"); + + try { + con = DbHandler.getDBConnection(); + + if ("purchase".equalsIgnoreCase(handleId)) + { + try { + proc = con.prepareCall("{ call TRADING_OPERATION.update_trading_stock_on_purchase_reject(?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + proc.setString(1, purchaseRef); + proc.setString(2, pacsId); + proc.setString(3, userId); + proc.registerOutParameter(4, java.sql.Types.VARCHAR); + + } else if ("stock".equalsIgnoreCase(handleId)) + { + try { + proc = con.prepareCall("{ call TRADING_OPERATION.update_trading_stock_on_sale_reject(?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + proc.setString(1, salesNo); + proc.setString(2, pacsId); + proc.setString(3, userId); + proc.registerOutParameter(4, java.sql.Types.VARCHAR); + } + + proc.execute(); + // message = proc.getString(4); + + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Trading_JSP/SellPurchaseAdjustment.jsp").forward(request, response); + + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/ShareDividentpayoutServlet.java b/IPKS_Updated/src/src/java/Controller/ShareDividentpayoutServlet.java new file mode 100644 index 0000000..8647af4 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/ShareDividentpayoutServlet.java @@ -0,0 +1,155 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import DataEntryBean.ShareAccountCreationBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.ResultSet; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +/** + * + * @author 986517 + */ +public class ShareDividentpayoutServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + String ServletName = request.getParameter("handle_id"); + + ShareAccountCreationBean ShareAccountCreationBeanObj = new ShareAccountCreationBean(); + + + if ("Update".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(ShareAccountCreationBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(ShareTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(ShareTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call POST_transfer_txn(?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(ShareTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + + proc.setString(1, pacsId); + proc.setString(2, user); + proc.setString(3, "DR"); + proc.setString(4, ShareAccountCreationBeanObj.getShareNo()); + proc.setString(5, ShareAccountCreationBeanObj.getAccNo()); + proc.setString(6, ShareAccountCreationBeanObj.getDivamt()); + proc.setString(7, ShareAccountCreationBeanObj.getNarration()); + proc.setString(8, "s2d"); + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + proc.registerOutParameter(10, java.sql.Types.VARCHAR); + + + + + + proc.execute(); + + // message = proc.getString(10); + + } catch (SQLException ex) { + // Logger.getLogger(ShareTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(ShareTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Share_Module/dividendpayout.jsp").forward(request, response); + + } + + } + + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { +processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + + } \ No newline at end of file diff --git a/IPKS_Updated/src/src/java/Controller/ShareServlet.java b/IPKS_Updated/src/src/java/Controller/ShareServlet.java new file mode 100644 index 0000000..0a20ad5 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/ShareServlet.java @@ -0,0 +1,77 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 986137 + */ +public class ShareServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + + if( String.valueOf(session.getAttribute("moduleName")).equalsIgnoreCase("SpecialBothShare") || String.valueOf(session.getAttribute("moduleName")).equalsIgnoreCase("SpecialBothDep")) + session.setAttribute("moduleName", "SpecialBothShare"); + else if(!String.valueOf(session.getAttribute("moduleName")).equalsIgnoreCase("SpecialKcc") ) + session.setAttribute("moduleName", "share"); + + request.getRequestDispatcher("/welcome.jsp").forward(request, response); + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/ShareTransactionOperationServlet.java b/IPKS_Updated/src/src/java/Controller/ShareTransactionOperationServlet.java new file mode 100644 index 0000000..d596a55 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/ShareTransactionOperationServlet.java @@ -0,0 +1,293 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import DataEntryBean.transactionOperationBean; +import DataEntryBean.TDOperationBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.commons.beanutils.BeanUtils; +import javax.servlet.http.HttpSession; + +/** + * + * @author 986517 + */ +public class ShareTransactionOperationServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here. You may use following sample code. */ + out.println(""); + out.println(""); + out.println(""); + out.println("Servlet ShareTransactionOperationServlet"); + out.println(""); + out.println(""); + out.println("

Servlet ShareTransactionOperationServlet at " + request.getContextPath() + "

"); + out.println(""); + out.println(""); + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + + Connection con = null; + CallableStatement proc = null; + String message = ""; + String Account_type = ""; + String JSP = ""; + HttpSession session = request.getSession(); + JSP = request.getParameter("screenName") == null ? "" : (request.getParameter("screenName")); + + transactionOperationBean otransactionOperationBean = new transactionOperationBean(); + + try { + // BeanUtils.populate(otransactionOperationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(ShareTransactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(ShareTransactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + //For Loan + + if (JSP.equalsIgnoreCase("LoanTransactionOperation")) { + + try { + con = DbHandler.getDBConnection(); + try { + + proc = con.prepareCall("{ call operations.POST_Loan_TXN_authorization(?,?,?,?,?,?,?,?,?) }"); + + } catch (SQLException ex) { + // Logger.getLogger(ShareTransactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + String pacsId = session.getAttribute("pacsId").toString(); + String makerId = session.getAttribute("user").toString(); + + proc.setString(1, pacsId); + proc.setString(2, makerId); + proc.setString(3, otransactionOperationBean.getTranType()); + proc.setString(4, otransactionOperationBean.getAccNo()); + proc.setString(5, otransactionOperationBean.getTrAmount()); + proc.setString(6, otransactionOperationBean.getChargeToDeduct()); + proc.setString(7, otransactionOperationBean.getNarration()); + proc.registerOutParameter(8, java.sql.Types.VARCHAR); + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(9); + Account_type = proc.getString(8); + + } catch (SQLException ex) { + // Logger.getLogger(ShareTransactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(ShareTransactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + } + + //For KCC and Deposit + + } else { + + try { + con = DbHandler.getDBConnection(); + try { + + + proc = con.prepareCall("{ call operations.POST_KCC_TXN_authorization(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + + } catch (SQLException ex) { + // Logger.getLogger(ShareTransactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + String pacsId = session.getAttribute("pacsId").toString(); + String makerId = session.getAttribute("user").toString(); + // String twothouIN = (String) request.getParameter("twothouIN") == "" ? "0" : (request.getParameter("twothouIN")); + // String twothouOUT = request.getParameter("twothouOUT") == "" ? "0" : (request.getParameter("twothouOUT")); + // String fivehundredIN = request.getParameter("fivehundredIN") == "" ? "0" : (request.getParameter("fivehundredIN")); + // String fivehundredOUT = request.getParameter("fivehundredOUT") == "" ? "0" : (request.getParameter("fivehundredOUT")); + // String hundredIN = request.getParameter("hundredIN") == "" ? "0" : (request.getParameter("hundredIN")); + // String hundredOUT = request.getParameter("hundredOUT") == "" ? "0" : (request.getParameter("hundredOUT")); + // String fiftyIN = request.getParameter("fiftyIN") == "" ? "0" : (request.getParameter("fiftyIN")); + // String fiftyOUT = request.getParameter("fiftyOUT") == "" ? "0" : (request.getParameter("fiftyOUT")); + // String twentyIN = request.getParameter("twentyIN") == "" ? "0" : (request.getParameter("twentyIN")); + // String twentyOUT = request.getParameter("twentyOUT") == "" ? "0" : (request.getParameter("twentyOUT")); + // String tenIN = request.getParameter("tenIN") == "" ? "0" : (request.getParameter("tenIN")); + // String tenOUT = request.getParameter("tenOUT") == "" ? "0" : (request.getParameter("tenOUT")); + // String fiveIN = request.getParameter("fiveIN") == "" ? "0" : (request.getParameter("fiveIN")); + // String fiveOUT = request.getParameter("fiveOUT") == "" ? "0" : (request.getParameter("fiveOUT")); + // String twoIN = request.getParameter("twoIN") == "" ? "0" : (request.getParameter("twoIN")); + // String twoOUT = request.getParameter("twoOUT") == "" ? "0" : (request.getParameter("twoOUT")); + // String oneIN = request.getParameter("oneIN") == "" ? "0" : (request.getParameter("oneIN")); + // String oneOUT = request.getParameter("oneOUT") == "" ? "0" : (request.getParameter("oneOUT")); + // String fiftyPaisaIN = request.getParameter("fiftyPaisaIN") == "" ? "0" : (request.getParameter("fiftyPaisaIN")); + // String fiftyPaisaOUT = request.getParameter("fiftyPaisaOUT") == "" ? "0" : (request.getParameter("fiftyPaisaOUT")); + // String onePaisaIN = request.getParameter("onePaisaIN") == "" ? "0" : (request.getParameter("onePaisaIN")); + // String onePaisaOUT = request.getParameter("onePaisaOUT") == "" ? "0" : (request.getParameter("onePaisaOUT")); + // String twohundredIN = request.getParameter("twohundredIN") == "" ? "0" : (request.getParameter("twohundredIN")); + // String twohundredOUT = request.getParameter("twohundredOUT") == "" ? "0" : (request.getParameter("twohundredOUT")); + + proc.setString(1, pacsId); + proc.setString(2, makerId); + proc.setString(3, otransactionOperationBean.getTranType()); + proc.setString(4, otransactionOperationBean.getAccNo()); + proc.setString(5, otransactionOperationBean.getTrAmount()); + proc.setString(6, twothouIN); + proc.setString(7, fivehundredIN); + proc.setString(8, hundredIN); + proc.setString(9, fiftyIN); + proc.setString(10, twentyIN); + proc.setString(11, tenIN); + proc.setString(12, fiveIN); + proc.setString(13, twoIN); + proc.setString(14, oneIN); + proc.setString(15, fiftyPaisaIN); + proc.setString(16, onePaisaIN); + proc.setString(17, twothouOUT); + proc.setString(18, fivehundredOUT); + proc.setString(19, hundredOUT); + proc.setString(20, fiftyOUT); + proc.setString(21, twentyOUT); + proc.setString(22, tenOUT); + proc.setString(23, fiveOUT); + proc.setString(24, twoOUT); + proc.setString(25, oneOUT); + proc.setString(26, fiftyPaisaOUT); + proc.setString(27, onePaisaOUT); + proc.setString(28, otransactionOperationBean.getNarration()); + proc.registerOutParameter(29, java.sql.Types.VARCHAR); + proc.registerOutParameter(30, java.sql.Types.VARCHAR); + proc.setString(31, otransactionOperationBean.getIntAdjAmt()); + proc.setString(32, otransactionOperationBean.getPayMode()); + proc.setString(33, otransactionOperationBean.getTransferAcc()); + proc.registerOutParameter(34, java.sql.Types.VARCHAR); + proc.setString(35, twohundredIN); + proc.setString(36, twohundredOUT); + + proc.execute(); + + // message = proc.getString(30); + Account_type = proc.getString(29); + + + + } catch (SQLException ex) { + // Logger.getLogger(ShareTransactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(ShareTransactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + } + + request.setAttribute("message", message); + + + if (Account_type.equalsIgnoreCase("1") || Account_type.equalsIgnoreCase("5") || Account_type.equalsIgnoreCase("2")) { + + if (Account_type.equalsIgnoreCase("2")) { + request.getRequestDispatcher("/Deposit/TDOperation.jsp").forward(request, response); + } else { + request.getRequestDispatcher("/Share_Module/shareaccounttransaction.jsp").forward(request, response); + } + + } else if (Account_type.equalsIgnoreCase("7")) { + + request.getRequestDispatcher("/Loan/LoanTransactionOperation.jsp").forward(request, response); + + } else { + + request.getRequestDispatcher("/transactionOperation.jsp").forward(request, response); + + } + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/ShareTransactionServlet.java b/IPKS_Updated/src/src/java/Controller/ShareTransactionServlet.java new file mode 100644 index 0000000..78cf676 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/ShareTransactionServlet.java @@ -0,0 +1,148 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import DataEntryBean.ShareAccountCreationBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.ResultSet; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +/** + * + * @author 986517 + */ +public class ShareTransactionServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + String ServletName = request.getParameter("handle_id"); + + ShareAccountCreationBean ShareAccountCreationBeanObj = new ShareAccountCreationBean(); + + + if ("Update".equalsIgnoreCase(ServletName)) { + + try { + //BeanUtils.populate(ShareAccountCreationBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(ShareTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(ShareTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call share_operation.share_transaction(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(ShareTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + proc.setString(1, ShareAccountCreationBeanObj.getShareNo()); + proc.setString(2, ShareAccountCreationBeanObj.getMemNo()); + proc.setString(3, ShareAccountCreationBeanObj.getShareval()); + proc.setString(4, pacsId); + proc.setString(5, ShareAccountCreationBeanObj.getShareamt()); + proc.setString(6, ShareAccountCreationBeanObj.getShareno()); + + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(7); + + } catch (SQLException ex) { + // Logger.getLogger(ShareTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(ShareTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Share_Module/shareOperations.jsp").forward(request, response); + + } + + } + + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { +processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + + } \ No newline at end of file diff --git a/IPKS_Updated/src/src/java/Controller/ShareValueCreationServlet.java b/IPKS_Updated/src/src/java/Controller/ShareValueCreationServlet.java new file mode 100644 index 0000000..6b64b01 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/ShareValueCreationServlet.java @@ -0,0 +1,148 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import DataEntryBean.ShareAccountCreationBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.ResultSet; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 986517 + */ +public class ShareValueCreationServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + String ServletName = request.getParameter("handle_id"); + + ShareAccountCreationBean ShareAccountCreationBeanObj = new ShareAccountCreationBean(); + + + if ("Update".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(ShareAccountCreationBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(ShareValueCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(ShareValueCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_sharevalue(?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(ShareValueCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + proc.setString(1, ShareAccountCreationBeanObj.getProductCodeDetails()); + proc.setString(2, ShareAccountCreationBeanObj.getShareval()); + proc.setInt(3, 1017); + proc.setString(5, ShareAccountCreationBeanObj.getSharepercent()); + proc.setString(6, ShareAccountCreationBeanObj.getDivpercent()); + + proc.registerOutParameter(4, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(4); + + } catch (SQLException ex) { + // Logger.getLogger(ShareValueCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(ShareValueCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Share_Module/sharevaluecreation.jsp").forward(request, response); + + } + + } + + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { +processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + + } \ No newline at end of file diff --git a/IPKS_Updated/src/src/java/Controller/ShgActivitiesServlet.java b/IPKS_Updated/src/src/java/Controller/ShgActivitiesServlet.java new file mode 100644 index 0000000..b0cdadd --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/ShgActivitiesServlet.java @@ -0,0 +1,374 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import DataEntryBean.ShgActivitiesBean; +import DataEntryBean.BasicInformationBean; + + +public class ShgActivitiesServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + + + // String ServletName = request.getParameter("handle_id"); + + ShgActivitiesBean ShgActivitiesBeanObj = new ShgActivitiesBean(); + + + if ("Create".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(ShgActivitiesBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(ShgActivitiesServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(ShgActivitiesServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call SHG_OPERATIONS.Upsert_shg_activities(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(ShgActivitiesServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.setString(1, ShgActivitiesBeanObj.getShgcode()); + proc.setString(2, ShgActivitiesBeanObj.getPresidentname()); + proc.setString(3, ShgActivitiesBeanObj.getPresidentoccupation()); + proc.setString(4, ShgActivitiesBeanObj.getPresidentmobile()); + proc.setString(5, ShgActivitiesBeanObj.getSecretaryname()); + proc.setString(6, ShgActivitiesBeanObj.getSecretaryoccupation()); + proc.setString(7, ShgActivitiesBeanObj.getSecretarymobile()); + proc.setString(8, ShgActivitiesBeanObj.getTreasurername()); + proc.setString(9, ShgActivitiesBeanObj.getTreasureroccupation()); + proc.setString(10, ShgActivitiesBeanObj.getTreasurermobile()); + proc.setString(11, ShgActivitiesBeanObj.getGrpmeeting()); + proc.setString(12, ShgActivitiesBeanObj.getResolution()); + proc.setString(13, ShgActivitiesBeanObj.getRegister()); + proc.setString(14, ShgActivitiesBeanObj.getCash()); + proc.setString(15, ShgActivitiesBeanObj.getSavings()); + proc.setString(16, ShgActivitiesBeanObj.getOther()); + + proc.setString(17, ServletName); + + proc.registerOutParameter(18, java.sql.Types.VARCHAR); + proc.setString(19, pacsId); + + proc.execute(); + + // message = proc.getString(18); + + } catch (SQLException ex) { + // Logger.getLogger(ShgActivitiesServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(ShgActivitiesServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Shg_JSP/ShgActivities.jsp").forward(request, response); + + } + + } else if ("Search".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(ShgActivitiesBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(ShgActivitiesServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(ShgActivitiesServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(ShgActivitiesServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + + // ResultSet rs = statement.executeQuery("SELECT PRESIDENT_NAME, PRESIDENT_OCCUPATION, PRESIDENT_MOBILE,SECRETARY_NAME,SECRETARY_OCCUPATION, SECRETARY_MOBILE,TREASURER_NAME, TREASURER_OCCUPATION, TREASURER_MOBILE, GRP_MEETING , RESOLUTION_BOOK , REGISTER ,CASH_BOOK,SAVINGS_BOOK,OTHERS, SHG_CODE from SHG_ACTIVITIES sa where SHG_CODE= '" + ShgActivitiesBeanObj.getShgSearch() + "' and sa.shg_id = (select to_number(shg_id) from basic_info bi where bi.shg_code = '" + ShgActivitiesBeanObj.getShgSearch() + "' and bi.pacs_id = '" +pacsId+ "') "); + + while (rs.next()) { + ShgActivitiesBeanObj = new ShgActivitiesBean(); + ShgActivitiesBeanObj.setPresidentname(rs.getString("PRESIDENT_NAME")); + ShgActivitiesBeanObj.setPresidentoccupation(rs.getString("PRESIDENT_OCCUPATION")); + ShgActivitiesBeanObj.setPresidentmobile(rs.getString("PRESIDENT_MOBILE")); + ShgActivitiesBeanObj.setSecretaryname(rs.getString("SECRETARY_NAME")); + ShgActivitiesBeanObj.setSecretaryoccupation(rs.getString("SECRETARY_OCCUPATION")); + ShgActivitiesBeanObj.setSecretarymobile(rs.getString("SECRETARY_MOBILE")); + ShgActivitiesBeanObj.setTreasurername(rs.getString("TREASURER_NAME")); + ShgActivitiesBeanObj.setTreasureroccupation(rs.getString("TREASURER_OCCUPATION")); + ShgActivitiesBeanObj.setTreasurermobile(rs.getString("TREASURER_MOBILE")); + ShgActivitiesBeanObj.setGrpmeeting(rs.getString("GRP_MEETING")); + ShgActivitiesBeanObj.setResolution(rs.getString("RESOLUTION_BOOK")); + ShgActivitiesBeanObj.setRegister(rs.getString("REGISTER")); + ShgActivitiesBeanObj.setCash(rs.getString("CASH_BOOK")); + ShgActivitiesBeanObj.setSavings(rs.getString("SAVINGS_BOOK")); + ShgActivitiesBeanObj.setOther(rs.getString("OTHERS")); + ShgActivitiesBeanObj.setShgcode(rs.getString("SHG_CODE")); + + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + } + + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(ShgActivitiesServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + if (SeachFound == 0) { + message = "SHG Code does not exist in the system"; + request.setAttribute("message", message); + } + request.setAttribute("ShgActivitiesBeanObj", ShgActivitiesBeanObj); + + request.getRequestDispatcher("/Shg_JSP/ShgActivities.jsp").forward(request, response); + + }else if ("Search Code".equalsIgnoreCase(ServletName)) { + BasicInformationBean BasicInformationBeanObj = new BasicInformationBean(); + try { + // BeanUtils.populate(BasicInformationBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(ShgActivitiesServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(ShgActivitiesServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(ShgActivitiesServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { +ResultSet rs = statement.executeQuery("select NAME_OF_SHG, GRP_CATEGORY, to_char(DATE_OF_FORMATION,'DD-MON-RRRR') as DATE_OF_FORMATION , DURATION, SHG_CODE from BASIC_INFO "); + + while (rs.next()) { + BasicInformationBeanObj.setNameOfShg(rs.getString("NAME_OF_SHG")); + BasicInformationBeanObj.setGroupCategory(rs.getString("GRP_CATEGORY")); + BasicInformationBeanObj.setDateOfFormation(rs.getString("DATE_OF_FORMATION")); + BasicInformationBeanObj.setDuration(rs.getString("DURATION")); + BasicInformationBeanObj.setShgcode(rs.getString("SHG_CODE")); + + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + } + + // statement.close(); + // connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(ShgActivitiesServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + if (SeachFound == 0) { + message = "SHG Code does not exist in the system"; + request.setAttribute("message", message); + } + request.setAttribute("ShgActivitiesBeanObj", ShgActivitiesBeanObj); + + request.getRequestDispatcher("/Shg_JSP/ShgActivities.jsp").forward(request, response); + + } else if ("Update".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(ShgActivitiesBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(ShgActivitiesServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(ShgActivitiesServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call SHG_OPERATIONS.Upsert_shg_activities(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(ShgActivitiesServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, ShgActivitiesBeanObj.getShgcodeAmend()); + proc.setString(2, ShgActivitiesBeanObj.getPresidentnameAmend()); + proc.setString(3, ShgActivitiesBeanObj.getPresidentoccupationAmend()); + proc.setString(4, ShgActivitiesBeanObj.getPresidentmobileAmend()); + proc.setString(5, ShgActivitiesBeanObj.getSecretarynameAmend()); + proc.setString(6, ShgActivitiesBeanObj.getSecretaryoccupationAmend()); + proc.setString(7, ShgActivitiesBeanObj.getSecretarymobileAmend()); + proc.setString(8, ShgActivitiesBeanObj.getTreasurernameAmend()); + proc.setString(9, ShgActivitiesBeanObj.getTreasureroccupationAmend()); + proc.setString(10, ShgActivitiesBeanObj.getTreasurermobileAmend()); + proc.setString(11, ShgActivitiesBeanObj.getGrpmeetingAmend()); + proc.setString(12, ShgActivitiesBeanObj.getResolutionAmend()); + proc.setString(13, ShgActivitiesBeanObj.getRegisterAmend()); + proc.setString(14, ShgActivitiesBeanObj.getCashAmend()); + proc.setString(15, ShgActivitiesBeanObj.getSavingsAmend()); + proc.setString(16, ShgActivitiesBeanObj.getOtherAmend()); + proc.setString(17, ServletName); + + proc.registerOutParameter(18, java.sql.Types.VARCHAR); + proc.setString(19, pacsId); + + proc.execute(); + + // message = proc.getString(18); + + } catch (SQLException ex) { + // Logger.getLogger(ShgActivitiesServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(ShgActivitiesServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Shg_JSP/ShgActivities.jsp").forward(request, response); + + } + + } + + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} + diff --git a/IPKS_Updated/src/src/java/Controller/SigUploadFile.java b/IPKS_Updated/src/src/java/Controller/SigUploadFile.java new file mode 100644 index 0000000..b1bc9ef --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/SigUploadFile.java @@ -0,0 +1,144 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import java.io.File; +import javax.servlet.ServletContext; +import java.io.IOException; +import java.util.List; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.FileItemFactory; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.fileupload.servlet.ServletFileUpload; +import java.util.UUID; +import javax.servlet.http.HttpSession; + +/** + * + * @author 986137 + */ +public class SigUploadFile extends HttpServlet { + + private static final long serialVersionUID = 1L; + private final String UPLOAD_DIRECTORY = "C:/Files"; + private String uploadPathMain; + private String uploadPath; + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet UploadFile"); + out.println(""); + out.println(""); + out.println("

Servlet UploadFile at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + boolean isMultipart = ServletFileUpload.isMultipartContent(request); + + HttpSession session = request.getSession(false); + String uuid = UUID.randomUUID().toString(); + String sigPhotoName =""; + // process only if it is multipart content + ServletContext servletContext = getServletContext(); + // uploadPathMain = servletContext.getRealPath(File.separator); + uploadPath = uploadPathMain + "/" + "UploadedFiles"; + File destinationDir = new File(uploadPath); + + if (!destinationDir.exists()) { + destinationDir.mkdir(); + } + if (isMultipart) { + // Create a factory for disk-based file items + FileItemFactory factory = new DiskFileItemFactory(); + + // Create a new file upload handler + ServletFileUpload upload = new ServletFileUpload(factory); + try { + // Parse the request + List multiparts = upload.parseRequest(request); + + for (FileItem item : multiparts) { + if (!item.isFormField()) { + String name = new File(uuid).getName(); + name +=".jpg"; + sigPhotoName = name; + item.write(new File(uploadPath + File.separator + name)); + } + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + + } finally { + System.out.println("Processing done."); + } + } + session.setAttribute("sigPhotoName", sigPhotoName); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/SodServlet.java b/IPKS_Updated/src/src/java/Controller/SodServlet.java new file mode 100644 index 0000000..7725448 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/SodServlet.java @@ -0,0 +1,75 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.Statement; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * + * @author LENOVO + */ +public class SodServlet extends HttpServlet { + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + } + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + Connection con = null; + Statement st = null; + CallableStatement proc = null; + String message = ""; + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call EODSOD.proc_sod(?) }"); + } catch (SQLException ex) { + // Logger.getLogger(SodServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.registerOutParameter(1, java.sql.Types.VARCHAR); + proc.executeUpdate(); + + // message = proc.getString(1); + } catch (Exception e) { + // Logger.getLogger(SodServlet.class.getName()).log(Level.SEVERE, null, e); + System.out.println("Error occurred during processing."); + } finally { + try { + con.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during connection close."); + } + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/sod.jsp").forward(request, response); + + } + + @Override + public String getServletInfo() { + return "Short description"; + }//
+ +} diff --git a/IPKS_Updated/src/src/java/Controller/StandingInstructionServlet.java b/IPKS_Updated/src/src/java/Controller/StandingInstructionServlet.java new file mode 100644 index 0000000..05f59f4 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/StandingInstructionServlet.java @@ -0,0 +1,340 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.StringTokenizer; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import DataEntryBean.StandingInstructionBean; +import javax.servlet.http.HttpSession; + +/** + * + * @author 986137 + */ +public class StandingInstructionServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + + //String ServletName = request.getParameter("handle_id"); + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + + StandingInstructionBean oStandingInstructionBean = new StandingInstructionBean(); + + if ("Create".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oStandingInstructionBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(StandingInstructionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(StandingInstructionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call operations.POST_SI_Details(?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(StandingInstructionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, pacsId); + proc.setString(2, oStandingInstructionBean.getFromAcc()); + proc.setString(3, oStandingInstructionBean.getToAcc()); + proc.setString(4, oStandingInstructionBean.getFromDate()); + proc.setString(5, oStandingInstructionBean.getToDate()); + proc.setString(6, oStandingInstructionBean.getSiAmount()); + proc.setString(7, oStandingInstructionBean.getFreqOption()); + proc.setString(8, oStandingInstructionBean.getChaseDay()); + proc.setString(9, user); + proc.setString(10, ServletName); + proc.setString(11, oStandingInstructionBean.getOpsType()); + + proc.registerOutParameter(12, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(12); + + } catch (SQLException ex) { + // Logger.getLogger(StandingInstructionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(StandingInstructionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/StandingInstructionCreation.jsp").forward(request, response); + + } + + } else if ("Amend".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oStandingInstructionBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(StandingInstructionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(StandingInstructionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(StandingInstructionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + + // ResultSet rs = statement.executeQuery("select t.from_acct,t.to_acct,t.amount,t.freq,to_char(t.start_date,'DD/MM/YYYY') as start_date,to_char(t.end_date,'DD/MM/YYYY') as end_date,t.chase_days,t.operation_type from si_details t" + + " where t.from_acct = '" + oStandingInstructionBean.getFromAccSearch() + "' and t.to_acct = '" + oStandingInstructionBean.getToAccSearch() + "' and t.operation_type = '" + oStandingInstructionBean.getOpsTypeSearch() + "'"); + + while (rs.next()) { + + oStandingInstructionBean.setFromAcc(rs.getString("from_acct")); + oStandingInstructionBean.setToAcc(rs.getString("to_acct")); + oStandingInstructionBean.setSiAmount(rs.getString("amount")); + oStandingInstructionBean.setFreqOption(rs.getString("freq")); + oStandingInstructionBean.setFromDate(rs.getString("start_date")); + oStandingInstructionBean.setToDate(rs.getString("end_date")); + oStandingInstructionBean.setChaseDay(rs.getString("chase_days")); + oStandingInstructionBean.setOpsType(rs.getString("operation_type")); + + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + } + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(StandingInstructionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + if (SeachFound == 0) { + message = "No Result Found! Please try again."; + request.setAttribute("message", message); + } + + request.setAttribute("oStandingInstructionBeanObj", oStandingInstructionBean); + request.getRequestDispatcher("/StandingInstructionCreation.jsp").forward(request, response); + + } else if ("AmendUpdate".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oStandingInstructionBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(StandingInstructionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(StandingInstructionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call operations.POST_SI_Details(?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(StandingInstructionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.setString(1, pacsId); + proc.setString(2, oStandingInstructionBean.getFromAccAmend()); + proc.setString(3, oStandingInstructionBean.getToAccAmend()); + proc.setString(4, oStandingInstructionBean.getFromDateAmend()); + proc.setString(5, oStandingInstructionBean.getToDateAmend()); + proc.setString(6, oStandingInstructionBean.getSiAmountAmend()); + proc.setString(7, oStandingInstructionBean.getFreqOptionAmend()); + proc.setString(8, oStandingInstructionBean.getChaseDayAmend()); + proc.setString(9, user); + proc.setString(10, ServletName); + proc.setString(11, oStandingInstructionBean.getOpsTypeAmend()); + + proc.registerOutParameter(12, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(12); + + } catch (SQLException ex) { + // Logger.getLogger(StandingInstructionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(StandingInstructionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/StandingInstructionCreation.jsp").forward(request, response); + + } + + } +// else if ("Search".equalsIgnoreCase(ServletName)) { +// +// try { +// BeanUtils.populate(oStandingInstructionBean, request.getParameterMap()); +// } catch (IllegalAccessException ex) { +// Logger.getLogger(StandingInstructionServlet.class.getName()).log(Level.SEVERE, null, ex); +// } catch (InvocationTargetException ex) { +// Logger.getLogger(StandingInstructionServlet.class.getName()).log(Level.SEVERE, null, ex); +// } +// +// Connection connection = null; +// ResultSet resultset = null; +// Statement statement = null; +// connection = DbHandler.getDBConnection(); +// int SeachFound = 0; +// +// try { +// statement = connection.createStatement(); +// } catch (SQLException ex) { +// Logger.getLogger(StandingInstructionServlet.class.getName()).log(Level.SEVERE, null, ex); +// } +// try { +// +// ResultSet rs = statement.executeQuery("select distinct s.id, s.from_acct, s.to_acct, s.amount, decode(s.operation_type,'s2s','Dep to Dep', 's2r','Dep to RD', 's2l','Dep to Loan') op_typ," +// + " s.start_date, s.end_date, s.active_flag from si_details s where s.pacs_id='" + pacsId + "' and s.active_flag='Y' and s.from_acct = '" + oStandingInstructionBean.getFromAccSearch() + "' "); +// +// while (rs.next()) { +// +// oStandingInstructionBean.setID(rs.getString("id")); +// oStandingInstructionBean.setFromAcc(rs.getString("from_acct")); +// oStandingInstructionBean.setToAcc(rs.getString("to_acct")); +// oStandingInstructionBean.setSiAmount(rs.getString("amount")); +// oStandingInstructionBean.setOpsType(rs.getString("op_typ")); +// oStandingInstructionBean.setFromDate(rs.getString("start_date")); +// oStandingInstructionBean.setToDate(rs.getString("end_date")); +// //oStandingInstructionBean.setFlag(rs.getString("active_flag")); +// +// SeachFound = 1; +// // request.setAttribute("displayFlag", "Y"); +// } +// statement.close(); +// connection.close(); +// +// } catch (SQLException ex) { +// Logger.getLogger(StandingInstructionServlet.class.getName()).log(Level.SEVERE, null, ex); +// } +// +// if (SeachFound == 0) { +// message = "No Result Found! Please try again."; +// request.setAttribute("message", message); +// } +// +// request.setAttribute("oStandingInstructionBeanObj", oStandingInstructionBean); +// request.getRequestDispatcher("/StandingInstructionCreation.jsp").forward(request, response); +// +// } + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/SwapCashDenoServlet.java b/IPKS_Updated/src/src/java/Controller/SwapCashDenoServlet.java new file mode 100644 index 0000000..98a6794 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/SwapCashDenoServlet.java @@ -0,0 +1,203 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.CashDenoBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.commons.beanutils.BeanUtils; +import javax.servlet.http.HttpSession; + +/** + * + * @author 594267 + */ +public class SwapCashDenoServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + CashDenoBean oCashDenoBean = null; + Connection conn = null; + CallableStatement proc = null; + HttpSession session = request.getSession(); + ResultSet rs = null; + String pacsid = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + // String opType = (String) request.getParameter("operationType"); + String handle_id = (String) request.getParameter("handle_id"); + handle_id = handle_id == null ? "" : handle_id; + Statement statement = null; + String message = ""; + try { + conn = DbHandler.getDBConnection(); + if (handle_id.isEmpty()) { + oCashDenoBean = new CashDenoBean(); + try { + statement = conn.createStatement(); + // rs = statement.executeQuery("select nvl(cr.deno_2000,0),nvl(cr.deno_500,0),nvl(cr.deno_100,0),nvl(cr.deno_50,0),nvl(cr.deno_20,0),nvl(cr.deno_10,0),nvl(cr.deno_5,0),nvl(cr.deno_2,0),nvl(cr.deno_1,0),nvl(cr.deno_50p,0),nvl(cr.deno_1p,0),nvl(cr.deno_200,0) from cash_reserve cr where cr.pacs_id='" + pacsid + "'"); + + while (rs.next()) { + oCashDenoBean.setDeno_2000(rs.getString(1)); + oCashDenoBean.setDeno_500(rs.getString(2)); + oCashDenoBean.setDeno_100(rs.getString(3)); + oCashDenoBean.setDeno_50(rs.getString(4)); + oCashDenoBean.setDeno_20(rs.getString(5)); + oCashDenoBean.setDeno_10(rs.getString(6)); + oCashDenoBean.setDeno_5(rs.getString(7)); + oCashDenoBean.setDeno_2(rs.getString(8)); + oCashDenoBean.setDeno_1(rs.getString(9)); + oCashDenoBean.setDeno_50p(rs.getString(10)); + oCashDenoBean.setDeno_1p(rs.getString(11)); + oCashDenoBean.setDeno_200(rs.getString(12)); + } + } catch (Exception e) { + // Logger.getLogger(SwapCashDenoServlet.class.getName()).log(Level.SEVERE, null, e); + System.out.println("Error occurred during processing."); + } + + request.setAttribute("oCashDenoBean", oCashDenoBean); + request.getRequestDispatcher("/swapCashDeno.jsp").forward(request, response); + + } else if(!(handle_id.isEmpty()) &&handle_id.equalsIgnoreCase("update")){ + oCashDenoBean = new CashDenoBean(); + try { + // BeanUtils.populate(oCashDenoBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + proc = conn.prepareCall("{ call cash_denominations.swap_cash_reserve(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (Exception e) { + // Logger.getLogger(SwapCashDenoServlet.class.getName()).log(Level.SEVERE, null, e); + System.out.println("Error occurred during processing."); + } + try { + proc.setString(1, user); + proc.setString(2, oCashDenoBean.getDeno_2000()); + proc.setString(3, oCashDenoBean.getDeno_500()); + proc.setString(4, oCashDenoBean.getDeno_100()); + proc.setString(5, oCashDenoBean.getDeno_50()); + proc.setString(6, oCashDenoBean.getDeno_20()); + proc.setString(7, oCashDenoBean.getDeno_10()); + proc.setString(8, oCashDenoBean.getDeno_5()); + proc.setString(9, oCashDenoBean.getDeno_2()); + proc.setString(10, oCashDenoBean.getDeno_1()); + proc.setString(11, oCashDenoBean.getDeno_50p()); + proc.setString(12, oCashDenoBean.getDeno_1p()); + proc.setString(13, pacsid); + proc.setString(14, opType); + proc.registerOutParameter(15, java.sql.Types.VARCHAR); + proc.setString(16, oCashDenoBean.getDeno_200()); + + proc.execute(); + + // message = proc.getString(15); + + statement = conn.createStatement(); + // rs = statement.executeQuery("select nvl(cr.deno_2000,0),nvl(cr.deno_500,0),nvl(cr.deno_100,0),nvl(cr.deno_50,0),nvl(cr.deno_20,0),nvl(cr.deno_10,0),nvl(cr.deno_5,0),nvl(cr.deno_2,0),nvl(cr.deno_1,0),nvl(cr.deno_50p,0),nvl(cr.deno_1p,0),nvl(cr.deno_200,0) from cash_reserve cr where cr.pacs_id='" + pacsid + "'"); + + while (rs.next()) { + oCashDenoBean.setDeno_2000(rs.getString(1)); + oCashDenoBean.setDeno_500(rs.getString(2)); + oCashDenoBean.setDeno_100(rs.getString(3)); + oCashDenoBean.setDeno_50(rs.getString(4)); + oCashDenoBean.setDeno_20(rs.getString(5)); + oCashDenoBean.setDeno_10(rs.getString(6)); + oCashDenoBean.setDeno_5(rs.getString(7)); + oCashDenoBean.setDeno_2(rs.getString(8)); + oCashDenoBean.setDeno_1(rs.getString(9)); + oCashDenoBean.setDeno_50p(rs.getString(10)); + oCashDenoBean.setDeno_1p(rs.getString(11)); + oCashDenoBean.setDeno_200(rs.getString(12)); + } + } catch (SQLException ex) { + // Logger.getLogger(SwapCashDenoServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // Logger.getLogger(SwapCashDenoServlet.class.getName()).log(Level.SEVERE, null, e); + System.out.println("Error occurred during proc close."); + } + } + request.setAttribute("message", message); + request.setAttribute("oCashDenoBean", oCashDenoBean); + request.getRequestDispatcher("/swapCashDeno.jsp").forward(request, response); + } + } catch (Exception e) { + // Logger.getLogger(SwapCashDenoServlet.class.getName()).log(Level.SEVERE, null, e); + System.out.println("Error occurred during processing."); + } finally { + try { + conn.close(); + } catch (SQLException ex) { + // Logger.getLogger(TradingProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/TDRepayMethodServlet.java b/IPKS_Updated/src/src/java/Controller/TDRepayMethodServlet.java new file mode 100644 index 0000000..c4d0e87 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/TDRepayMethodServlet.java @@ -0,0 +1,143 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.DepositMiscellaneousBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.StringTokenizer; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 986137 + */ +public class TDRepayMethodServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String depositAccSearch = ""; + ResultSet rs = null; + int SeachFound = 0; + String message = ""; + String resetBy=null; + String action = request.getParameter("handle_id"); + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + //added by rajdiip + StringBuilder query = null; + PreparedStatement ps = null; + int res = 0; + // String txnOrAccntNo = null; + + // DepositMiscellaneousBean oDepositMiscellaneousBean = new DepositMiscellaneousBean(); + + Connection con = null; + CallableStatement proc = null; + + try { + con = DbHandler.getDBConnection(); + // String acc = request.getParameter("depAccount"); + //String trfMode = request.getParameter("methodType"); + //String trfAcc = request.getParameter("trfAccount"); + + proc = con.prepareCall("{ call operations2.td_mat_trf_modechange(?,?,?,?,?,?) }"); + + proc.setString(1, acc); + proc.setString(2, pacsId); + proc.setString(3, user); + proc.setString(4, trfMode); + proc.setString(5, trfAcc); + proc.registerOutParameter(6, java.sql.Types.VARCHAR); + + proc.execute(); + // message = proc.getString(6); + + request.setAttribute("message", message); + + request.getRequestDispatcher("/Deposit/TDRepayMethod.jsp").forward(request, response); + } + + catch (SQLException ex) { + // ex.printStackTrace(); + System.out.println("Exception occured in TDRepayMethodServlet for user Id :" + user); + message= "Error occured. Please try again"; + // Logger.getLogger(AccountModeOfOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + if(proc !=null) + proc.close(); + if (con != null) + con.close(); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/TermDepositOperationServlet.java b/IPKS_Updated/src/src/java/Controller/TermDepositOperationServlet.java new file mode 100644 index 0000000..2820730 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/TermDepositOperationServlet.java @@ -0,0 +1,342 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.transactionOperationBean; +import DataEntryBean.TDOperationBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.commons.beanutils.BeanUtils; +import javax.servlet.http.HttpSession; + +/** + * + * @author Shub + */ +public class TermDepositOperationServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here. You may use following sample code. */ + out.println(""); + out.println(""); + out.println(""); + out.println("Servlet transactionOperationServlet"); + out.println(""); + out.println(""); + out.println("

Servlet transactionOperationServlet at " + request.getContextPath() + "

"); + out.println(""); + out.println(""); + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + + Connection con = null; + CallableStatement proc = null; + String message = ""; + String JSP = ""; + HttpSession session = request.getSession(); + JSP = request.getParameter("screenName") == null ? "" : (request.getParameter("screenName")); + + transactionOperationBean otransactionOperationBean = new transactionOperationBean(); + + try { + // BeanUtils.populate(otransactionOperationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + //For Loan + + if (JSP.equalsIgnoreCase("TDOperation")) { + // String transferAcc = request.getParameter("transferAcc") == null ? "" : (request.getParameter("transferAcc")); + // String transferGLAcc = request.getParameter("transferGLAcc") == null ? "" : (request.getParameter("transferGLAcc")); + // String transferMode = request.getParameter("payMode") == null ? "" : (request.getParameter("payMode")); + + TDOperationBean oTDOperationBean = new TDOperationBean(); + + try { + // BeanUtils.populate(oTDOperationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(TermDepositOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(TermDepositOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + if(oTDOperationBean.getTranType().equalsIgnoreCase("R")){ + try { + con = DbHandler.getDBConnection(); + try { + + proc = con.prepareCall("{ call renew_td(?,?,?,?,?) }"); + + } catch (SQLException ex) { + // Logger.getLogger(TermDepositOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + String pacsId = session.getAttribute("pacsId").toString(); + String makerId = session.getAttribute("user").toString(); + //proc.setString(1, pacsId); + //proc.setString(2, oTDOperationBean.getTranType()); + proc.setString(1, oTDOperationBean.getAccNo()); + proc.setString(2, oTDOperationBean.getTrmYr()); + proc.setString(3, oTDOperationBean.getTrmMon()); + proc.setString(4, oTDOperationBean.getTrmDay()); + proc.registerOutParameter(5, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(5); + } catch (SQLException ex) { + // Logger.getLogger(TermDepositOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + // con.commit(); + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(TermDepositOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + } + + } else { + + try { + con = DbHandler.getDBConnection(); + try { + + proc = con.prepareCall("{ call operations.POST_TD_operations(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + + } catch (SQLException ex) { + // Logger.getLogger(TermDepositOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + String pacsId = session.getAttribute("pacsId").toString(); + String makerId = session.getAttribute("user").toString(); + + // String twothouIN = (String) request.getParameter("twothouIN") == "" ? "0" : (request.getParameter("twothouIN")); + //String twothouOUT = request.getParameter("twothouOUT") == "" ? "0" : (request.getParameter("twothouOUT")); + //String fivehundredIN = request.getParameter("fivehundredIN") == "" ? "0" : (request.getParameter("fivehundredIN")); + //String fivehundredOUT = request.getParameter("fivehundredOUT") == "" ? "0" : (request.getParameter("fivehundredOUT")); + //String hundredIN = request.getParameter("hundredIN") == "" ? "0" : (request.getParameter("hundredIN")); + //String hundredOUT = request.getParameter("hundredOUT") == "" ? "0" : (request.getParameter("hundredOUT")); + //String fiftyIN = request.getParameter("fiftyIN") == "" ? "0" : (request.getParameter("fiftyIN")); + //String fiftyOUT = request.getParameter("fiftyOUT") == "" ? "0" : (request.getParameter("fiftyOUT")); + //String twentyIN = request.getParameter("twentyIN") == "" ? "0" : (request.getParameter("twentyIN")); + //String twentyOUT = request.getParameter("twentyOUT") == "" ? "0" : (request.getParameter("twentyOUT")); + //String tenIN = request.getParameter("tenIN") == "" ? "0" : (request.getParameter("tenIN")); + //String tenOUT = request.getParameter("tenOUT") == "" ? "0" : (request.getParameter("tenOUT")); + //String fiveIN = request.getParameter("fiveIN") == "" ? "0" : (request.getParameter("fiveIN")); + //String fiveOUT = request.getParameter("fiveOUT") == "" ? "0" : (request.getParameter("fiveOUT")); + //String twoIN = request.getParameter("twoIN") == "" ? "0" : (request.getParameter("twoIN")); + //String twoOUT = request.getParameter("twoOUT") == "" ? "0" : (request.getParameter("twoOUT")); + //String oneIN = request.getParameter("oneIN") == "" ? "0" : (request.getParameter("oneIN")); + //String oneOUT = request.getParameter("oneOUT") == "" ? "0" : (request.getParameter("oneOUT")); + //String fiftyPaisaIN = request.getParameter("fiftyPaisaIN") == "" ? "0" : (request.getParameter("fiftyPaisaIN")); + //String fiftyPaisaOUT = request.getParameter("fiftyPaisaOUT") == "" ? "0" : (request.getParameter("fiftyPaisaOUT")); + //String onePaisaIN = request.getParameter("onePaisaIN") == "" ? "0" : (request.getParameter("onePaisaIN")); + //String onePaisaOUT = request.getParameter("onePaisaOUT") == "" ? "0" : (request.getParameter("onePaisaOUT")); + //String twohundredIN = request.getParameter("twohundredIN") == "" ? "0" : (request.getParameter("twohundredIN")); + //String twohundredOUT = request.getParameter("twohundredOUT") == "" ? "0" : (request.getParameter("twohundredOUT")); + + //added for interest portion + // String twothouIN_intt = (String) request.getParameter("twothouIN_intt") == "" ? "0" : (request.getParameter("twothouIN_intt")); + //String twothouOUT_intt = request.getParameter("twothouOUT_intt") == "" ? "0" : (request.getParameter("twothouOUT_intt")); + //String fivehundredIN_intt = request.getParameter("fivehundredIN_intt") == "" ? "0" : (request.getParameter("fivehundredIN_intt")); + //String fivehundredOUT_intt = request.getParameter("fivehundredOUT_intt") == "" ? "0" : (request.getParameter("fivehundredOUT_intt")); + //String hundredIN_intt = request.getParameter("hundredIN_intt") == "" ? "0" : (request.getParameter("hundredIN_intt")); + //String hundredOUT_intt = request.getParameter("hundredOUT_intt") == "" ? "0" : (request.getParameter("hundredOUT_intt")); + //String fiftyIN_intt = request.getParameter("fiftyIN_intt") == "" ? "0" : (request.getParameter("fiftyIN_intt")); + //String fiftyOUT_intt = request.getParameter("fiftyOUT_intt") == "" ? "0" : (request.getParameter("fiftyOUT_intt")); + //String twentyIN_intt = request.getParameter("twentyIN_intt") == "" ? "0" : (request.getParameter("twentyIN_intt")); + //String twentyOUT_intt = request.getParameter("twentyOUT_intt") == "" ? "0" : (request.getParameter("twentyOUT_intt")); + //String tenIN_intt = request.getParameter("tenIN_intt") == "" ? "0" : (request.getParameter("tenIN_intt")); + //String tenOUT_intt = request.getParameter("tenOUT_intt") == "" ? "0" : (request.getParameter("tenOUT_intt")); + //String fiveIN_intt = request.getParameter("fiveIN_intt") == "" ? "0" : (request.getParameter("fiveIN_intt")); + //String fiveOUT_intt = request.getParameter("fiveOUT_intt") == "" ? "0" : (request.getParameter("fiveOUT_intt")); + //String twoIN_intt = request.getParameter("twoIN_intt") == "" ? "0" : (request.getParameter("twoIN_intt")); + //String twoOUT_intt = request.getParameter("twoOUT_intt") == "" ? "0" : (request.getParameter("twoOUT_intt")); + //String oneIN_intt = request.getParameter("oneIN_intt") == "" ? "0" : (request.getParameter("oneIN_intt")); + //String oneOUT_intt = request.getParameter("oneOUT_intt") == "" ? "0" : (request.getParameter("oneOUT_intt")); + //String fiftyPaisaIN_intt = request.getParameter("fiftyPaisaIN_intt") == "" ? "0" : (request.getParameter("fiftyPaisaIN_intt")); + //String fiftyPaisaOUT_intt = request.getParameter("fiftyPaisaOUT_intt") == "" ? "0" : (request.getParameter("fiftyPaisaOUT_intt")); + //String onePaisaIN_intt = request.getParameter("onePaisaIN_intt") == "" ? "0" : (request.getParameter("onePaisaIN_intt")); + //String onePaisaOUT_intt = request.getParameter("onePaisaOUT_intt") == "" ? "0" : (request.getParameter("onePaisaOUT_intt")); + //String twohundredIN_intt = request.getParameter("twohundredIN_intt") == "" ? "0" : (request.getParameter("twohundredIN_intt")); + //String twohundredOUT_intt = request.getParameter("twohundredOUT_intt") == "" ? "0" : (request.getParameter("twohundredOUT_intt")); + + + proc.setString(1, pacsId); + proc.setString(2, oTDOperationBean.getTranType()); + proc.setString(3, oTDOperationBean.getAccNo()); + if(oTDOperationBean.getTranType().equalsIgnoreCase("W") || oTDOperationBean.getTranType().equalsIgnoreCase("P")) + proc.setString(4, oTDOperationBean.getNetAmt()); + else if(oTDOperationBean.getTranType().equalsIgnoreCase("D")) + proc.setString(4, oTDOperationBean.getTrAmount()); + proc.setString(5, oTDOperationBean.getNarration()); + proc.setString(6, makerId); + proc.setString(7, transferMode); + proc.setString(8, transferAcc); + proc.setString(9, twothouIN); + proc.setString(10, fivehundredIN); + proc.setString(11, hundredIN); + proc.setString(12, fiftyIN); + proc.setString(13, twentyIN); + proc.setString(14, tenIN); + proc.setString(15, fiveIN); + proc.setString(16, twoIN); + proc.setString(17, oneIN); + proc.setString(18, fiftyPaisaIN); + proc.setString(19, onePaisaIN); + proc.setString(20, twothouOUT); + proc.setString(21, fivehundredOUT); + proc.setString(22, hundredOUT); + proc.setString(23, fiftyOUT); + proc.setString(24, twentyOUT); + proc.setString(25, tenOUT); + proc.setString(26, fiveOUT); + proc.setString(27, twoOUT); + proc.setString(28, oneOUT); + proc.setString(29, fiftyPaisaOUT); + proc.setString(30, onePaisaOUT); + proc.setString(31, twothouIN_intt); + proc.setString(32, fivehundredIN_intt); + proc.setString(33, hundredIN_intt); + proc.setString(34, fiftyIN_intt); + proc.setString(35, twentyIN_intt); + proc.setString(36, tenIN_intt); + proc.setString(37, fiveIN_intt); + proc.setString(38, twoIN_intt); + proc.setString(39, oneIN_intt); + proc.setString(40, fiftyPaisaIN_intt); + proc.setString(41, onePaisaIN_intt); + proc.setString(42, twothouOUT_intt); + proc.setString(43, fivehundredOUT_intt); + proc.setString(44, hundredOUT_intt); + proc.setString(45, fiftyOUT_intt); + proc.setString(46, twentyOUT_intt); + proc.setString(47, tenOUT_intt); + proc.setString(48, fiveOUT_intt); + proc.setString(49, twoOUT_intt); + proc.setString(50, oneOUT_intt); + proc.setString(51, fiftyPaisaOUT_intt); + proc.setString(52, onePaisaOUT_intt); + proc.setString(53, oTDOperationBean.getIntAdjAmt()); + proc.registerOutParameter(54, java.sql.Types.VARCHAR); + proc.setString(55, twohundredIN); + proc.setString(56, twohundredOUT); + proc.setString(57, twohundredIN_intt); + proc.setString(58, twohundredOUT_intt); + proc.setString(59, transferGLAcc); + + proc.execute(); + + // message = proc.getString(54); + + + } catch (SQLException ex) { + // Logger.getLogger(TermDepositOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + // con.commit(); + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(TermDepositOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + } + } + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/TDOperation.jsp").forward(request, response); + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/TotalCashDepositDDSServlet.java b/IPKS_Updated/src/src/java/Controller/TotalCashDepositDDSServlet.java new file mode 100644 index 0000000..fb0fbc9 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/TotalCashDepositDDSServlet.java @@ -0,0 +1,77 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import Dao.CashWithdrawlDDSDao; +import Dao.MicroFileProcessingDao; +import DataEntryBean.MicroFileAccountDetBean; +import ServiceLayer.CashWithdrawlDDSService; +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +public class TotalCashDepositDDSServlet extends HttpServlet { + + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = (String) session.getAttribute("user"); + String tellerName = (String) session.getAttribute("UserName"); + //String agentId = request.getParameter("agntIdname"); + // String amnt = request.getParameter("trAmount"); + String result = null; + CashWithdrawlDDSDao ddsDao = new CashWithdrawlDDSDao(); + + try { + result = ddsDao.TotalCashDepositOperation(tellerId,pacsId,amnt,agentId , request); + if (result !=null){ + request.setAttribute("message", result); + request.getRequestDispatcher("/DDS/TotalCashDepositDDS.jsp").forward(request, response); + }else + { + request.setAttribute("message", "Request can not be processed."); + request.getRequestDispatcher("/DDS/TotalCashDepositDDS.jsp").forward(request, response); + } + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + request.setAttribute("message", "Request can not be processed."); + request.getRequestDispatcher("/DDS/TotalCashDepositDDS.jsp").forward(request, response); + + } finally { + System.out.println("Error occurred during processing."); + } + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + @Override + public String getServletInfo() { + return "Short description"; + }//
+ +} diff --git a/IPKS_Updated/src/src/java/Controller/TradingCustomerEnrollmentServlet.java b/IPKS_Updated/src/src/java/Controller/TradingCustomerEnrollmentServlet.java new file mode 100644 index 0000000..26977a1 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/TradingCustomerEnrollmentServlet.java @@ -0,0 +1,292 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import DataEntryBean.CustomerEnrollmentBean; + + + + +/** + * + * @author 590685 + */ +public class TradingCustomerEnrollmentServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + + // String ServletName = request.getParameter("handle_id"); + + + CustomerEnrollmentBean CustomerEnrollmentBeanObj = new CustomerEnrollmentBean(); + + + if ("Create".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(CustomerEnrollmentBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(TradingCustomerEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(TradingCustomerEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call trading_operation.trading_customer_upsert(?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TradingCustomerEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, CustomerEnrollmentBeanObj.getCustomer_id()); + proc.setString(2, CustomerEnrollmentBeanObj.getName()); + proc.setString(3, CustomerEnrollmentBeanObj.getAddress()); + proc.setString(4, CustomerEnrollmentBeanObj.getPhone()); + proc.setString(5, CustomerEnrollmentBeanObj.getContactperson()); + proc.setString(6, CustomerEnrollmentBeanObj.getCheckOption1()); + proc.setString(7, CustomerEnrollmentBeanObj.getCif_no()); + proc.setString(8, pacsId); + proc.setString(9, ServletName); + + proc.registerOutParameter(10, java.sql.Types.VARCHAR); + proc.setString(11, CustomerEnrollmentBeanObj.getGstin()); + + proc.execute(); + + // message = proc.getString(10); + + } catch (SQLException ex) { + // Logger.getLogger(TradingCustomerEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(TradingCustomerEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Trading_JSP/CustomerEnrollment.jsp").forward(request, response); + + } + + } else if ("Search".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(CustomerEnrollmentBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(TradingCustomerEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(TradingCustomerEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(TradingCustomerEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + + // rs = statement.executeQuery("select CIF_NO, CUST_ID,CUST_NAME, CUST_ADDRESS, CONTACT_PERSON, CONTACT_NO, MEMBER_FLAG,CIF_NO from TRADING_CUSTOMER where CUST_ID= '" + CustomerEnrollmentBeanObj.getCustomer_id() + "' "); + + while (rs.next()) { + + CustomerEnrollmentBeanObj.setName(rs.getString("CUST_NAME")); + CustomerEnrollmentBeanObj.setAddress(rs.getString("CUST_ADDRESS")); + CustomerEnrollmentBeanObj.setPhone(rs.getString("CONTACT_NO")); + CustomerEnrollmentBeanObj.setContactperson(rs.getString("CONTACT_PERSON")); + CustomerEnrollmentBeanObj.setCheckOption1(rs.getString("MEMBER_FLAG")); + CustomerEnrollmentBeanObj.setCif_no(rs.getString("CIF_NO")); + CustomerEnrollmentBeanObj.setCustomer_id(rs.getString("CUST_ID")); + + + + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + } + + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(TradingCustomerEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + if (SeachFound == 0) { + message = "Customer does not exist in the system"; + request.setAttribute("message", message); + } + request.setAttribute("CustomerEnrollmentBeanObj", CustomerEnrollmentBeanObj); + + request.getRequestDispatcher("/Trading_JSP/CustomerEnrollment.jsp").forward(request, response); + + } + + else if ("Update".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(CustomerEnrollmentBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(TradingCustomerEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(TradingCustomerEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call trading_operation.trading_customer_upsert(?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TradingCustomerEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, CustomerEnrollmentBeanObj.getCif_noAmend()); + proc.setString(2, CustomerEnrollmentBeanObj.getNamesearch()); + proc.setString(3, CustomerEnrollmentBeanObj.getAddressAmend()); + proc.setString(4, CustomerEnrollmentBeanObj.getPhoneAmend()); + proc.setString(5, CustomerEnrollmentBeanObj.getContactpersonAmend()); + + + proc.setString(6, CustomerEnrollmentBeanObj.getCheckOption1Amend()); + proc.setString(7, CustomerEnrollmentBeanObj.getCif_noAmend()); + proc.setString(8, pacsId); + proc.setString(9, ServletName); + + proc.registerOutParameter(10, java.sql.Types.VARCHAR); + proc.setString(11, CustomerEnrollmentBeanObj.getGstinAmend()); + + proc.execute(); + + // message = proc.getString(10); + + } catch (SQLException ex) { + // Logger.getLogger(TradingCustomerEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(TradingCustomerEnrollmentServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Trading_JSP/CustomerEnrollment.jsp").forward(request, response); + + } + + } + + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/TradingProductOperationServlet.java b/IPKS_Updated/src/src/java/Controller/TradingProductOperationServlet.java new file mode 100644 index 0000000..46ccb9e --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/TradingProductOperationServlet.java @@ -0,0 +1,320 @@ + + +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import DataEntryBean.tradingProductCreationBean; + +/** + * + * @author 590685 + */ +public class TradingProductOperationServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + + String pacsId = (String) session.getAttribute("pacsId"); + //String ServletName = request.getParameter("handle_id"); + tradingProductCreationBean tradingProductCreationBeanObj = null; + tradingProductCreationBeanObj = new tradingProductCreationBean(); + System.out.println(tradingProductCreationBeanObj.getPricePerUnit()); + + + if ("Create".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(tradingProductCreationBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(TradingProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(TradingProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_trading_product(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TradingProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, tradingProductCreationBeanObj.getProduct_id()); + proc.setString(2, tradingProductCreationBeanObj.getCommoditytype()); + proc.setString(3, tradingProductCreationBeanObj.getTypeDesc()); + proc.setString(4, tradingProductCreationBeanObj.getCommoditysubtype()); + proc.setString(5, tradingProductCreationBeanObj.getSubtypeDesc()); + proc.setString(6, tradingProductCreationBeanObj.getUnit()); + proc.setString(7, tradingProductCreationBeanObj.getStatus()); + proc.setString(8, ServletName); + + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + proc.setString(10, tradingProductCreationBeanObj.getLease()); + proc.setString(11, tradingProductCreationBeanObj.getPricePerUnit()); + proc.setString(12, tradingProductCreationBeanObj.getPriceFreq()); + proc.setString(13, tradingProductCreationBeanObj.getMinDays()); + proc.setString(14, tradingProductCreationBeanObj.getMaxDays()); + proc.setString(15, tradingProductCreationBeanObj.getLandArea()); + proc.setString(16, tradingProductCreationBeanObj.getCgst()); + proc.setString(17, tradingProductCreationBeanObj.getSgst()); + proc.setString(18, tradingProductCreationBeanObj.getPacsId()); + proc.setString(19, tradingProductCreationBeanObj.getPurchaseID()); + proc.setString(20, tradingProductCreationBeanObj.getSaleID()); + proc.setString(21, tradingProductCreationBeanObj.getCloseID()); + proc.setString(22, tradingProductCreationBeanObj.getTradeID()); + + proc.execute(); + + // message = proc.getString(9); + + } catch (SQLException ex) { + // Logger.getLogger(TradingProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(TradingProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Trading_JSP/tradingProductCreation.jsp").forward(request, response); + + } + + } else if ("Search".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(tradingProductCreationBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(TradingProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(TradingProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(TradingProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + + // ResultSet rs = statement.executeQuery(" select ID, comm_type, TYPE_DESC, comm_subtype, SUBTYPE_DESC, UNIT, active_flag, nvl(lease_flag, 'N') lease_flag, price_per_unit, price_freq, min_trm, max_trm, land_area, cgst, sgst, pacs_id, purchase_gl_id, (select gp.gl_name from gl_product gp where gp.id = purchase_gl_id) purchase_gl_name, sale_gl_id, (select gp.gl_name from gl_product gp where gp.id = sale_gl_id) sale_gl_name, closing_stock_gl, (select gp.gl_name from gl_product gp where gp.id = closing_stock_gl) closing_stock_gl_name, stock_trade_gl, (select gp.gl_name from gl_product gp where gp.id = stock_trade_gl) stock_trade_gl_name from trading_product_mst where id = '" + tradingProductCreationBeanObj.getProduct_id() + "' and pacs_id = '" +pacsId+ "' "); + + while (rs.next()) { + + tradingProductCreationBeanObj.setCommoditytype(rs.getString("comm_type")); + tradingProductCreationBeanObj.setTypeDesc(rs.getString("TYPE_DESC")); + tradingProductCreationBeanObj.setCommoditysubtype(rs.getString("comm_subtype")); + tradingProductCreationBeanObj.setSubtypeDesc(rs.getString("SUBTYPE_DESC")); + tradingProductCreationBeanObj.setUnit(rs.getString("UNIT")); + tradingProductCreationBeanObj.setStatus(rs.getString("active_flag")); + tradingProductCreationBeanObj.setProduct_id(rs.getString("ID")); + tradingProductCreationBeanObj.setLease(rs.getString("lease_flag")); + tradingProductCreationBeanObj.setPricePerUnit(rs.getString("price_per_unit")); + tradingProductCreationBeanObj.setPriceFreq(rs.getString("price_freq")); + tradingProductCreationBeanObj.setMinDays(rs.getString("min_trm")); + tradingProductCreationBeanObj.setMaxDays(rs.getString("max_trm")); + tradingProductCreationBeanObj.setLandArea(rs.getString("land_area")); + tradingProductCreationBeanObj.setCgst(rs.getString("cgst")); + tradingProductCreationBeanObj.setSgst(rs.getString("sgst")); + tradingProductCreationBeanObj.setPacsId(rs.getString("pacs_id")); + tradingProductCreationBeanObj.setPurchaseGL(rs.getString("purchase_gl_name")); + tradingProductCreationBeanObj.setPurchaseID(rs.getString("purchase_gl_id")); + tradingProductCreationBeanObj.setSaleGL(rs.getString("sale_gl_name")); + tradingProductCreationBeanObj.setSaleID(rs.getString("sale_gl_id")); + tradingProductCreationBeanObj.setCloseGL(rs.getString("closing_stock_gl_name")); + tradingProductCreationBeanObj.setCloseID(rs.getString("closing_stock_gl")); + tradingProductCreationBeanObj.setTradeGL(rs.getString("stock_trade_gl_name")); + tradingProductCreationBeanObj.setTradeID(rs.getString("stock_trade_gl")); + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + } + + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(TradingProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + if (SeachFound == 0) { + message = "Trading Commodity type/Subtype Code not exists in the system"; + request.setAttribute("message", message); + } + request.setAttribute("ServletName","Amend"); + request.setAttribute("tradingProductCreationBeanObj", tradingProductCreationBeanObj); + + request.getRequestDispatcher("/Trading_JSP/tradingProductCreation.jsp").forward(request, response); + + } else if ("Update".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(tradingProductCreationBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(TradingProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(TradingProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_trading_product(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TradingProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, tradingProductCreationBeanObj.getProduct_id()); + proc.setString(2, tradingProductCreationBeanObj.getCommoditytypeAmend()); + proc.setString(3, tradingProductCreationBeanObj.getTypeDescAmend()); + proc.setString(4, tradingProductCreationBeanObj.getCommoditysubtypeAmend()); + proc.setString(5, tradingProductCreationBeanObj.getSubtypeDescAmend()); + proc.setString(6, tradingProductCreationBeanObj.getUnitAmend()); + proc.setString(7, tradingProductCreationBeanObj.getStatusAmend()); + proc.setString(8, ServletName); + + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + proc.setString(10, tradingProductCreationBeanObj.getLeaseAmend()); + proc.setString(11, tradingProductCreationBeanObj.getPricePerUnitAmend()); + proc.setString(12, tradingProductCreationBeanObj.getPriceFreqAmend()); + proc.setString(13, tradingProductCreationBeanObj.getMinDaysAmend()); + proc.setString(14, tradingProductCreationBeanObj.getMaxDaysAmend()); + proc.setString(15, tradingProductCreationBeanObj.getLandAreaAmend()); + proc.setString(16, tradingProductCreationBeanObj.getCgstAmend()); + proc.setString(17, tradingProductCreationBeanObj.getSgstAmend()); + proc.setString(18, tradingProductCreationBeanObj.getPacsId()); + proc.setString(19, tradingProductCreationBeanObj.getPurchaseIDAmend()); + proc.setString(20, tradingProductCreationBeanObj.getSaleIDAmend()); + proc.setString(21, tradingProductCreationBeanObj.getCloseIDAmend()); + proc.setString(22, tradingProductCreationBeanObj.getTradeIDAmend()); + + proc.execute(); + + // message = proc.getString(9); + + } catch (SQLException ex) { + // Logger.getLogger(TradingProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(TradingProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Trading_JSP/tradingProductCreation.jsp").forward(request, response); + + } + + } + + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/TradingSaleItemEntry.java b/IPKS_Updated/src/src/java/Controller/TradingSaleItemEntry.java new file mode 100644 index 0000000..f70f216 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/TradingSaleItemEntry.java @@ -0,0 +1,242 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.TradingSaleItemEntryBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.StringTokenizer; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author Tcs Help desk122 + */ +public class TradingSaleItemEntry extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + String handle_id = request.getParameter("handle_id"); + String optionValue = request.getParameter("checkOption"); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + TradingSaleItemEntryBean tradingSaleItemEntryBeanObj = new TradingSaleItemEntryBean(); + String hdrID = ""; + ArrayList alTradingSaleItemEntryBean = new ArrayList(); + + if (handle_id.equalsIgnoreCase("Create")) { + + + try { + // BeanUtils.populate(tradingSaleItemEntryBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call trading_operation.insert_trading_sales_hdr(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, tradingSaleItemEntryBeanObj.getMemberId()); + proc.setString(2, tradingSaleItemEntryBeanObj.getCheckOption()); + proc.setString(3, tradingSaleItemEntryBeanObj.getDueDate()); + proc.setString(4, tradingSaleItemEntryBeanObj.getGrandTotal()); + proc.setString(5, pacsId); + proc.registerOutParameter(6, java.sql.Types.VARCHAR); + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(6); + // hdrID = proc.getString(7); + + + + } catch (SQLException ex) { + + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + } + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + // String productId = request.getParameter("product_id" + i); + // String p_order_id = request.getParameter("p_order_id" + i); + // String quantity = request.getParameter("quantity" + i); + // String price = request.getParameter("price" + i); + + if (productId != null) { + tradingSaleItemEntryBeanObj = new TradingSaleItemEntryBean(); + tradingSaleItemEntryBeanObj.setProduct_id(productId); + tradingSaleItemEntryBeanObj.setStockId(p_order_id); + tradingSaleItemEntryBeanObj.setQuantity(quantity); + tradingSaleItemEntryBeanObj.setPrice(price); + alTradingSaleItemEntryBean.add(tradingSaleItemEntryBeanObj); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alTradingSaleItemEntryBean.size() > 0) && (!message.equalsIgnoreCase("")) && (!hdrID.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call trading_operation.insert_trading_sales_dtl(?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + for (int j = 0; j < alTradingSaleItemEntryBean.size(); j++) { + + tradingSaleItemEntryBeanObj = alTradingSaleItemEntryBean.get(j); + + + proc.setString(1, hdrID); + proc.setString(2, tradingSaleItemEntryBeanObj.getStockId()); + proc.setString(3, tradingSaleItemEntryBeanObj.getProduct_id()); + proc.setString(4, tradingSaleItemEntryBeanObj.getQuantity()); + proc.setString(5, tradingSaleItemEntryBeanObj.getPrice()); + proc.addBatch(); + + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + try { + // con.rollback(); + } catch (Exception ex1) { + // Logger.getLogger(TradingSaleItemEntry.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + + + + + request.setAttribute("message", message); + request.setAttribute("requisitionId", hdrID); + request.getRequestDispatcher("/Trading_JSP/TradingInvoice.jsp").forward(request, response); + + } + + } + // + + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, + IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, + IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + } +} diff --git a/IPKS_Updated/src/src/java/Controller/TradingSaleRegisterServlet.java b/IPKS_Updated/src/src/java/Controller/TradingSaleRegisterServlet.java new file mode 100644 index 0000000..2178d1a --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/TradingSaleRegisterServlet.java @@ -0,0 +1,161 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.TradingSaleRegisterBean; +import DataEntryBean.TrandinStockRegisterBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import oracle.jdbc.OracleTypes; + +/** + * + * @author Tcs Help desk122 + */ +public class TradingSaleRegisterServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + String handle_id = request.getParameter("handle_id"); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + TradingSaleRegisterBean tradingSaleRegisterBeanObj = null; + ResultSet rs = null; + ArrayList alTradingSaleRegisterBean = new ArrayList(); + + if (handle_id.equalsIgnoreCase("display")) { + + // String productId = request.getParameter("product_id"); + // String customerId = request.getParameter("customer_id"); + tradingSaleRegisterBeanObj = new TradingSaleRegisterBean(); + tradingSaleRegisterBeanObj.setProduct_id(productId); + tradingSaleRegisterBeanObj.setCustomer_id(customerId); + // tradingSaleRegisterBeanObj.setFromdate(request.getParameter("fromdate")); + // tradingSaleRegisterBeanObj.setTodate(request.getParameter("todate")); + int searchFound = 0; + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call Trading_Operation.trading_sales_register(?,?,?,?,?,?,?) }"); + proc.setString(1, tradingSaleRegisterBeanObj.getProduct_id()); + proc.setString(2, tradingSaleRegisterBeanObj.getFromdate()); + proc.setString(3, tradingSaleRegisterBeanObj.getTodate()); + proc.setString(4, tradingSaleRegisterBeanObj.getCustomer_id()); + proc.setString(5, pacsId); + proc.registerOutParameter(6, OracleTypes.CURSOR); + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + proc.executeUpdate(); + message = proc.getString(7); + // rs = (ResultSet) proc.getObject(6); + + while (rs.next()) { + searchFound = 1; + tradingSaleRegisterBeanObj = new TradingSaleRegisterBean(); + tradingSaleRegisterBeanObj.setSalesref_id(rs.getString(1)); + tradingSaleRegisterBeanObj.setMemberName(rs.getString(2)); + tradingSaleRegisterBeanObj.setCommoditytype(rs.getString(3)); + tradingSaleRegisterBeanObj.setCommoditysubtype(rs.getString(4)); + tradingSaleRegisterBeanObj.setSaleDate(rs.getString(5)); + tradingSaleRegisterBeanObj.setStock_id(rs.getString(6)); + tradingSaleRegisterBeanObj.setQuantity(rs.getString(7)); + tradingSaleRegisterBeanObj.setPrice(rs.getString(8)); + tradingSaleRegisterBeanObj.setTotal(rs.getString(9)); + alTradingSaleRegisterBean.add(tradingSaleRegisterBeanObj); + request.setAttribute("displayFlag", "Y"); + } + + if (searchFound == 0) { + + message = "No Sale Exists for the selected criteria"; + request.setAttribute("message", message); + + } + + } catch (SQLException ex) { + // Logger.getLogger(TradingSaleRegisterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + + try { + proc.close(); + con.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during connection close."); + } + } + + request.setAttribute("alTradingSaleRegisterBeanApend", alTradingSaleRegisterBean); + request.getRequestDispatcher("/Trading_JSP/SalesRegister.jsp").forward(request, response); + + } + + }// + + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + } +} diff --git a/IPKS_Updated/src/src/java/Controller/TradingSevlet.java b/IPKS_Updated/src/src/java/Controller/TradingSevlet.java new file mode 100644 index 0000000..8ef0213 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/TradingSevlet.java @@ -0,0 +1,72 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 986137 + */ +public class TradingSevlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + session.setAttribute("moduleName", "trading"); + request.getRequestDispatcher("/welcome.jsp").forward(request, response); + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/TradingStockRegisterServlet.java b/IPKS_Updated/src/src/java/Controller/TradingStockRegisterServlet.java new file mode 100644 index 0000000..bdbdffa --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/TradingStockRegisterServlet.java @@ -0,0 +1,536 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.TrandinStockRegisterBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.CallableStatement; +import java.sql.Statement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import oracle.jdbc.OracleTypes; +import org.apache.commons.beanutils.BeanUtils; +import java.lang.reflect.InvocationTargetException; +//import com.itextpdf.text.BaseColor; +//import com.itextpdf.text.Document; +//import com.itextpdf.text.DocumentException; +//import com.itextpdf.text.Rectangle; +//import com.itextpdf.text.pdf.Barcode; +//import com.itextpdf.text.pdf.Barcode128; +//import com.itextpdf.text.pdf.PdfPCell; +//import com.itextpdf.text.pdf.PdfPTable; +//import com.itextpdf.text.pdf.PdfWriter; +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import javax.servlet.ServletOutputStream; + + + +/** + * + * @author Tcs Help desk122 + */ +public class TradingStockRegisterServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + + private static final String FILE_NAME = "/barcode"+System.currentTimeMillis()+".pdf"; + + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + ResultSet rs = null; + int searchFound = 0; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + String ServletName = request.getParameter("handle_id"); + ServletOutputStream stream = null; + BufferedInputStream buf = null; + + TrandinStockRegisterBean oTrandinStockRegisterBean = new TrandinStockRegisterBean(); + + ArrayList alTrandinStockRegisterBean = new ArrayList(); + + if ("Enterstock".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oTrandinStockRegisterBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(TradingStockRegisterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(TradingStockRegisterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + // String purchaseId = request.getParameter("purchase_id" + i); + // String productId = request.getParameter("product_id" + i); + + if (purchaseId != null) { + oTrandinStockRegisterBean = new TrandinStockRegisterBean(); + oTrandinStockRegisterBean.setPurchase_id(purchaseId); + oTrandinStockRegisterBean.setProduct_id(productId); + // oTrandinStockRegisterBean.setStkexpiryDate(request.getParameter("stkexpiryDate" + i)); + //oTrandinStockRegisterBean.setSelectperish(request.getParameter("selectperish" + i)); + //oTrandinStockRegisterBean.setPrice_unit(request.getParameter("price_unit" + i)); + //oTrandinStockRegisterBean.setQuantity(request.getParameter("quantity" + i)); + //oTrandinStockRegisterBean.setPfnm(request.getParameter("pfnm" + i)); + //oTrandinStockRegisterBean.setGodown_id(request.getParameter("godown_id" + i)); + //oTrandinStockRegisterBean.setStockdesc(request.getParameter("stockdesc" + i)); + //oTrandinStockRegisterBean.setPfm(request.getParameter("pfm" + i)); + alTrandinStockRegisterBean.add(oTrandinStockRegisterBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + //int p = alTrandinStockRegisterBean.size(); + if ((alTrandinStockRegisterBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call trading_operation.trading_stock_reg_entry(?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TradingStockRegisterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alTrandinStockRegisterBean.size(); j++) { + + oTrandinStockRegisterBean = alTrandinStockRegisterBean.get(j); + proc.setString(1, oTrandinStockRegisterBean.getProduct_id()); + proc.setString(2, oTrandinStockRegisterBean.getPurchase_id()); + proc.setString(3, pacsId); + proc.setString(4, oTrandinStockRegisterBean.getStkexpiryDate()); + proc.setString(5, oTrandinStockRegisterBean.getSelectperish()); + proc.setString(6, oTrandinStockRegisterBean.getPrice_unit()); + proc.setString(7, oTrandinStockRegisterBean.getQuantity()); + proc.setString(8, oTrandinStockRegisterBean.getPfnm()); + proc.setString(9, oTrandinStockRegisterBean.getGodown_id()); + proc.setString(10, oTrandinStockRegisterBean.getStockdesc()); + proc.setString(11, oTrandinStockRegisterBean.getPfm()); + + proc.addBatch(); + } + + proc.executeBatch(); + message = "Data inserted successfully!!"; + } catch (SQLException ex) { + // Logger.getLogger(TradingStockRegisterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(TradingStockRegisterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Trading_JSP/TradingStockRegister.jsp").forward(request, response); + + } else if ("Viewstock".equalsIgnoreCase(ServletName)) { + + oTrandinStockRegisterBean = new TrandinStockRegisterBean(); + + alTrandinStockRegisterBean = new ArrayList(); + try { + // BeanUtils.populate(oTrandinStockRegisterBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(TradingStockRegisterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(TradingStockRegisterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call TRADING_OPERATION.trading_View_Stock_register(?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TradingStockRegisterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.setString(1, oTrandinStockRegisterBean.getCommoditytypeSearch()); + proc.setString(2, oTrandinStockRegisterBean.getCommoditySubtypeSearch()); + proc.setString(3, oTrandinStockRegisterBean.getVendor_id()); + proc.setString(4, pacsId); + + proc.registerOutParameter(5, OracleTypes.CURSOR); + proc.registerOutParameter(6, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + // message = proc.getString(6); + + // rs = (ResultSet) proc.getObject(5); + + while (rs.next()) { + searchFound = 1; + oTrandinStockRegisterBean = new TrandinStockRegisterBean(); + oTrandinStockRegisterBean.setStock_id(rs.getString(1)); + oTrandinStockRegisterBean.setName(rs.getString(2)); + oTrandinStockRegisterBean.setCommoditytype(rs.getString(3)); + oTrandinStockRegisterBean.setCommoditysubtype(rs.getString(4)); + oTrandinStockRegisterBean.setEntDate(rs.getString(5)); + oTrandinStockRegisterBean.setSelectperish(rs.getString(6)); + oTrandinStockRegisterBean.setStkexpiryDate(rs.getString(7)); + oTrandinStockRegisterBean.setPrice_unit(rs.getString(8)); + oTrandinStockRegisterBean.setQuantity(rs.getString(9)); + oTrandinStockRegisterBean.setQuantity_availed(rs.getString(10)); + oTrandinStockRegisterBean.setQuantity_available(rs.getString(11)); + oTrandinStockRegisterBean.setPfnm(rs.getString(12)); + oTrandinStockRegisterBean.setPfm(rs.getString(13)); + + alTrandinStockRegisterBean.add(oTrandinStockRegisterBean); + request.setAttribute("displayFlag", "Y"); + + } + } catch (SQLException ex) { + // Logger.getLogger(TradingStockRegisterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(TradingStockRegisterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + } + if (searchFound == 0) { + message = "No data exists for selected item"; + request.setAttribute("message", message); + } + request.setAttribute("oTrandinStockRegisterBean", oTrandinStockRegisterBean); + request.setAttribute("arrTrandinStockRegisterBean", alTrandinStockRegisterBean); + request.setAttribute("message", message); + + request.getRequestDispatcher("/Trading_JSP/TradingStockRegister.jsp").forward(request, response); + + } else if ("editStock".equalsIgnoreCase(ServletName)) { + + oTrandinStockRegisterBean = new TrandinStockRegisterBean(); + + alTrandinStockRegisterBean = new ArrayList(); + try { + // BeanUtils.populate(oTrandinStockRegisterBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + System.out.println("Error occurred during processing."); + } + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call TRADING_OPERATION.trading_edit_Stock_register(?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + proc.setString(1, oTrandinStockRegisterBean.getCommoditytypeSearch()); + proc.setString(2, oTrandinStockRegisterBean.getCommoditySubtypeSearch()); + proc.setString(3, oTrandinStockRegisterBean.getVendor_id()); + proc.setString(4, pacsId); + + proc.registerOutParameter(5, OracleTypes.CURSOR); + proc.registerOutParameter(6, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + // message = proc.getString(6); + + // rs = (ResultSet) proc.getObject(5); + + while (rs.next()) { + searchFound = 1; + oTrandinStockRegisterBean = new TrandinStockRegisterBean(); + oTrandinStockRegisterBean.setStock_id(rs.getString(1)); + oTrandinStockRegisterBean.setName(rs.getString(2)); + oTrandinStockRegisterBean.setCommoditytype(rs.getString(17)); + oTrandinStockRegisterBean.setCommoditysubtype(rs.getString(18)); + oTrandinStockRegisterBean.setEntDate(rs.getString(5)); + oTrandinStockRegisterBean.setSelectperish(rs.getString(6)); + oTrandinStockRegisterBean.setStkexpiryDate(rs.getString(7)); + oTrandinStockRegisterBean.setPrice_unit(rs.getString(8)); + oTrandinStockRegisterBean.setQuantity(rs.getString(9)); + oTrandinStockRegisterBean.setQuantity_availed(rs.getString(10)); + oTrandinStockRegisterBean.setQuantity_available(rs.getString(11)); + oTrandinStockRegisterBean.setPfnm(rs.getString(12)); + oTrandinStockRegisterBean.setPfm(rs.getString(13)); + oTrandinStockRegisterBean.setPurchase_id(rs.getString(14)); + oTrandinStockRegisterBean.setGodown_id(rs.getString(15)); + oTrandinStockRegisterBean.setStockdesc(rs.getString(16)); + + alTrandinStockRegisterBean.add(oTrandinStockRegisterBean); + request.setAttribute("displayFlag", "Y"); + + } + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + } + if (searchFound == 0) { + message = "No data exists for selected item"; + request.setAttribute("message", message); + } + // oTrandinStockRegisterBean.setCheckOption(request.getParameter("checkOption")); + request.setAttribute("oTrandinStockRegisterBean", oTrandinStockRegisterBean); + request.setAttribute("arrTrandinStockRegisterBean", alTrandinStockRegisterBean); + request.setAttribute("message", message); + + request.getRequestDispatcher("/Trading_JSP/TradingStockRegisterEdit.jsp").forward(request, response); + + } if ("EditSubmit".equalsIgnoreCase(ServletName)) + { + try { + // BeanUtils.populate(oTrandinStockRegisterBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + System.out.println("Error occurred during processing."); + } + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + // String purchaseId = request.getParameter("purchase_id" + i); + // String productId = request.getParameter("stock_id" + i); + + if (purchaseId != null) { + oTrandinStockRegisterBean = new TrandinStockRegisterBean(); + oTrandinStockRegisterBean.setPurchase_id(purchaseId); + oTrandinStockRegisterBean.setProduct_id(productId); + // oTrandinStockRegisterBean.setStkexpiryDate(request.getParameter("stkexpiryDate" + i)); + // oTrandinStockRegisterBean.setSelectperish(request.getParameter("selectperish" + i)); + // oTrandinStockRegisterBean.setPrice_unit(request.getParameter("price_unit" + i)); + // oTrandinStockRegisterBean.setQuantity(request.getParameter("quantity" + i)); + // oTrandinStockRegisterBean.setPfnm(request.getParameter("pfnm" + i)); + // oTrandinStockRegisterBean.setGodown_id(request.getParameter("godown_id" + i)); + // oTrandinStockRegisterBean.setStockdesc(request.getParameter("stockdesc" + i)); + // oTrandinStockRegisterBean.setPfm(request.getParameter("pfm" + i)); + // oTrandinStockRegisterBean.setCommoditytype(request.getParameter("commoditytype" + i)); + // oTrandinStockRegisterBean.setCommoditysubtype(request.getParameter("commoditysubtype" + i)); + // oTrandinStockRegisterBean.setQuantity_availed(request.getParameter("quantity_availed" + i)); + oTrandinStockRegisterBean.setQuantity_available(request.getParameter("quantity_available" + i)); + alTrandinStockRegisterBean.add(oTrandinStockRegisterBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alTrandinStockRegisterBean.size() > 0)) { + + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + try { + proc = con.prepareCall("{ call trading_operation.upsert_edit_stock_register(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } + + for (int j = 0; j < alTrandinStockRegisterBean.size(); j++) { + + oTrandinStockRegisterBean = alTrandinStockRegisterBean.get(j); + proc.setString(1, oTrandinStockRegisterBean.getCommoditytype()); + proc.setString(2, oTrandinStockRegisterBean.getCommoditysubtype()); + proc.setString(3, oTrandinStockRegisterBean.getProduct_id()); + proc.setString(4, oTrandinStockRegisterBean.getSelectperish()); + proc.setString(5, oTrandinStockRegisterBean.getStkexpiryDate()); + proc.setString(6, oTrandinStockRegisterBean.getPrice_unit()); + proc.setString(7, oTrandinStockRegisterBean.getQuantity()); + proc.setString(8, oTrandinStockRegisterBean.getQuantity_availed()); + proc.setString(9, oTrandinStockRegisterBean.getQuantity_available()); + proc.setString(10, oTrandinStockRegisterBean.getPfnm()); + proc.setString(11, oTrandinStockRegisterBean.getPfm()); + proc.setString(12, oTrandinStockRegisterBean.getPurchase_id()); + proc.setString(13, oTrandinStockRegisterBean.getGodown_id()); + proc.setString(14, oTrandinStockRegisterBean.getStockdesc()); + proc.setString(15, "Update"); + proc.setString(16, pacsId); + proc.setString(17, user); + proc.registerOutParameter(18, java.sql.Types.VARCHAR); + + proc.execute(); + // message = proc.getString(18); + if (!message.equalsIgnoreCase("Stock Register successfully updated")) { + con.rollback(); + break; + } + } + con.commit(); + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Trading_JSP/TradingStockRegisterEdit.jsp").forward(request, response); + + } else if ("PrintBarCode".equalsIgnoreCase(ServletName)) { + + + String indicator = request.getParameter("indicator"); + String inventoryId = request.getParameter("stock_id" + indicator); + float noOfPrints = Float.valueOf(request.getParameter("qty" + indicator)); + File barcodeFile = new File(FILE_NAME); +// try { +// Rectangle pagesize = new Rectangle(215,71); +// Document document = new Document(pagesize); +// PdfPTable table = new PdfPTable(2); +// PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(barcodeFile)); +// document.open(); +// document.setMargins(0, 0, 5, 0); +// table.setWidthPercentage(100); +// for (int i = 1; i <= noOfPrints; i++) { +// table.addCell(createBarcode(writer,inventoryId)); +// if(i%2==0) +// { +// document.add(table); +// table = null; +// table = new PdfPTable(2); +// table.setWidthPercentage(100); +// } +// } +// +// document.close(); +// if (barcodeFile != null) { +// stream = response.getOutputStream(); +// // request.getSession().setAttribute("errorMessage", result); +// //request.setAttribute("message", result); +// response.setContentType("application/pdf"); +// response.addHeader("Content-Disposition", "attachment; filename=" +// + "Barcode_" + inventoryId + ".pdf"); +// response.setContentLength((int) barcodeFile.length()); +// FileInputStream input = new FileInputStream(barcodeFile); +// buf = new BufferedInputStream(input); +// int readBytes = 0; +// +// while ((readBytes = buf.read()) != -1) { +// stream.write(readBytes); +// } +// +// barcodeFile.delete(); +// } +// } catch (Exception e) { +// // e.printStackTrace(); +// System.out.println("Error occurred during processing."); +// request.setAttribute("message", "Error in generating barcode "); +// request.getRequestDispatcher("/Trading_JSP/TradingStockRegister.jsp").forward(request, response); +// return; +// +// } finally { +// System.out.println("Processing done."); +// } + } + } +// public static PdfPCell createBarcode(PdfWriter writer, String code) throws DocumentException, IOException { +// Barcode128 barcode128 = new Barcode128(); +// barcode128.setCode(code); +// barcode128.setCodeType(Barcode.CODE128); +// PdfPCell cell = new PdfPCell(barcode128.createImageWithBarcode(writer.getDirectContent(), null,null), true); +// cell.setPadding(11); +// cell.setBorderColor(BaseColor.WHITE); +// return cell; +// } + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + } +} + + + + diff --git a/IPKS_Updated/src/src/java/Controller/TransactionAuthorizationServlet.java b/IPKS_Updated/src/src/java/Controller/TransactionAuthorizationServlet.java new file mode 100644 index 0000000..95e17b8 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/TransactionAuthorizationServlet.java @@ -0,0 +1,615 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import LoginDb.DbHandler; +import DataEntryBean.myWorlistBean; +import java.io.OutputStream; +import java.net.HttpURLConnection; +import java.net.URL; +import java.sql.PreparedStatement; +import java.sql.SQLException; +import oracle.jdbc.OracleTypes; + +/** + * + * @author Tcs Helpdesk10 + */ +public class TransactionAuthorizationServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + CallableStatement proc = null; + int searchFound = 0; + String flag = "1"; + String message = ""; + String showButton = "N"; + String handle_id = request.getParameter("handle_id"); + String pacsId = (String) session.getAttribute("pacsId"); + String CheckerId = session.getAttribute("user").toString(); + String viewType = session.getAttribute("moduleName").toString(); + + myWorlistBean myWorlistBeanObj = new myWorlistBean(); + ArrayList almyWorlistBean = new ArrayList(); + + while (flag.equalsIgnoreCase("1")) { + + if (handle_id.equalsIgnoreCase("Search")) { + flag = "2"; + + try { + // BeanUtils.populate(myWorlistBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call worklist.my_Worklist_info(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, CheckerId); + proc.setString(2, myWorlistBeanObj.getRefno()); + proc.setString(3, pacsId); + proc.setString(4, myWorlistBeanObj.getTransactiontype()); + proc.setString(5, myWorlistBeanObj.getFromDate()); + proc.setString(6, myWorlistBeanObj.getToDate()); + + proc.registerOutParameter(7, OracleTypes.CURSOR); + proc.registerOutParameter(8, java.sql.Types.VARCHAR); + proc.setString(8, viewType); + proc.setString(9, myWorlistBeanObj.getCheckOption()); + + proc.executeUpdate(); + + // rs = (ResultSet) proc.getObject(7); + + if (myWorlistBeanObj.getCheckOption().equalsIgnoreCase("TXN")) { + + while (rs.next()) { + searchFound = 1; + myWorlistBeanObj = new myWorlistBean(); + myWorlistBeanObj.setAccount_no(rs.getString("acct_no")); + myWorlistBeanObj.setAccount_no2(rs.getString("acct_no2")); + myWorlistBeanObj.setAccount_bal(rs.getString("avail_bal")); + myWorlistBeanObj.setRefnoSearch(rs.getString("cbs_ref_no")); + myWorlistBeanObj.setIntitiator(rs.getString("maker_id")); + myWorlistBeanObj.setTxn_amount(rs.getString("txn_amt")); + myWorlistBeanObj.setTransactiontypeSearch(rs.getString("txn_type")); + myWorlistBeanObj.setTxn_date(rs.getString("tran_date")); + myWorlistBeanObj.setChargeToDeduct(rs.getString("charges")); + myWorlistBeanObj.setCust_name(rs.getString("cust_name")); + myWorlistBeanObj.setCust_no(rs.getString("cif_no")); + myWorlistBeanObj.setTran_ind(rs.getString("tran_ind")); + if (viewType.equalsIgnoreCase("LOAN") || viewType.equalsIgnoreCase("KCC")) { + myWorlistBeanObj.setPrinrepayamt(rs.getString("PRINREPAYAMT")); + myWorlistBeanObj.setInttrepayamt(rs.getString("INTTREPAYAMT")); + } + + almyWorlistBean.add(myWorlistBeanObj); + + request.setAttribute("displayFlag", "Y"); + + } + + } else if (myWorlistBeanObj.getCheckOption().equalsIgnoreCase("TTP")) { + + while (rs.next()) { + searchFound = 1; + myWorlistBeanObj = new myWorlistBean(); + myWorlistBeanObj.setAccount_no(rs.getString("acct_no")); + myWorlistBeanObj.setAccount_no2(rs.getString("acct_no2")); + myWorlistBeanObj.setAccount_bal(rs.getString("cum_curr_val")); + myWorlistBeanObj.setRefnoSearch(rs.getString("cbs_ref_no")); + myWorlistBeanObj.setIntitiator(rs.getString("maker_id")); + myWorlistBeanObj.setTxn_amount(rs.getString("txn_amt")); + myWorlistBeanObj.setTransactiontypeSearch(rs.getString("txn_type")); + myWorlistBeanObj.setTxn_date(rs.getString("tran_date")); + myWorlistBeanObj.setChargeToDeduct(rs.getString("charges")); + myWorlistBeanObj.setCust_name(rs.getString("cust_name")); + myWorlistBeanObj.setCust_no(rs.getString("cif_no")); + myWorlistBeanObj.setTran_ind(rs.getString("tran_ind")); + + almyWorlistBean.add(myWorlistBeanObj); + + request.setAttribute("displayFlag", "Y"); + + } + + } else if (myWorlistBeanObj.getCheckOption().equalsIgnoreCase("ACC") + || myWorlistBeanObj.getCheckOption().equalsIgnoreCase("LACC") + || myWorlistBeanObj.getCheckOption().equalsIgnoreCase("KCC")) { + + while (rs.next()) { + searchFound = 1; + myWorlistBeanObj = new myWorlistBean(); + myWorlistBeanObj.setRefnoSearch(rs.getString("ref_id")); + myWorlistBeanObj.setIntitiator(rs.getString("teller_id")); + myWorlistBeanObj.setTransactiontypeSearch(rs.getString("txn_type")); + myWorlistBeanObj.setTxn_date(rs.getString("tran_date")); + + almyWorlistBean.add(myWorlistBeanObj); + + request.setAttribute("displayFlag", "Y"); + + } + + } + // myWorlistBeanObj.setRefno(request.getParameter("refno")); + //myWorlistBeanObj.setTransactiontype(request.getParameter("transactiontype")); + //myWorlistBeanObj.setFromDate(request.getParameter("fromDate")); + //myWorlistBeanObj.setToDate(request.getParameter("toDate")); + //myWorlistBeanObj.setCheckOption(request.getParameter("checkOption")); + + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + if (searchFound == 0) { + if (message.equalsIgnoreCase("")) { + message = "No data exists for selected item"; + request.setAttribute("message", message); + } + } + + request.setAttribute("myWorlistBeanObj", myWorlistBeanObj); + request.setAttribute("almyWorlistBean", almyWorlistBean); + request.setAttribute("message", message); + + request.getRequestDispatcher("/TransactionAuthorization.jsp").forward(request, response); + } else if (handle_id.equalsIgnoreCase("Authorise")) { + + String index = request.getParameter("detailId"); + + //String refno = request.getParameter("refno" + index); + //String account_no = request.getParameter("account_no" + index); + //String transactiontype = request.getParameter("transactiontype" + index); + //String txn_amount = request.getParameter("txn_amount" + index); + //String remarks = request.getParameter("remarks" + index); + //String AuthStatus = request.getParameter("AuthStatus" + index); + + try { + // BeanUtils.populate(myWorlistBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call worklist.proc_Authorization(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, CheckerId); + proc.setString(2, refno); + proc.setString(3, pacsId); + proc.setString(4, transactiontype); + proc.setString(5, txn_amount); + proc.setString(6, account_no); + proc.setString(7, remarks); + proc.setString(8, AuthStatus); + + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + + // message = proc.getString(9); + + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + request.setAttribute("message", message); + + if (message.contains("successfully")) { + String refNo = message.substring(message.indexOf('#') + 1, message.indexOf('#') + 16); + + try { + Connection cn = DbHandler.getDBConnection(); + String query = "SELECT TXN_NO FROM NEFT_RTGS_TXN WHERE TXN_NO = ?"; + PreparedStatement ps = cn.prepareStatement(query); + ps.setString(1, refNo); + ResultSet rs1 = ps.executeQuery(); + boolean bool = rs1.next(); + System.out.println("bool values is " + bool); + if (bool) { + sendOutwardNeft(refNo); + } + cn.close(); + ps.close(); + rs1.close(); + } catch (SQLException sqe) { + sqe.printStackTrace(); + } + } + + if (message.startsWith("Transaction posted successfully")) { + if (message.equalsIgnoreCase("Transaction posted successfully. Matured amount withdrawn completed. Account closed")) { + showButton = "N"; + } else { + showButton = "Y"; + } + request.setAttribute("showButton", showButton); + } + handle_id = "Search"; + /*request.setAttribute("handle_id1", handle_id); + request.setAttribute("refno", myWorlistBeanObj.getRefno()); + request.setAttribute("transactiontype", transactiontype); + request.setAttribute("checkOption", myWorlistBeanObj.getCheckOption()); + request.setAttribute("fromDate", myWorlistBeanObj.getFromDate()); + request.setAttribute("toDate", myWorlistBeanObj.getToDate()); + request.getRequestDispatcher("/TransactionAuthorizationServlet").forward(request, response);*/ + + } //For View Details + else if (handle_id.equalsIgnoreCase("ViewDetails")) { + + String index = request.getParameter("detailId"); + + // String refno = request.getParameter("refno" + index); + // String checkOption = request.getParameter("checkOption"); + + request.setAttribute("refID", refno); + request.setAttribute("AuthActivity", checkOption); + + if (checkOption.equalsIgnoreCase("ACC") || checkOption.equalsIgnoreCase("LACC") || checkOption.equalsIgnoreCase("KCC")) { + request.getRequestDispatcher("ReadOnlyServlet").forward(request, response); + // request.getRequestDispatcher("/TransactionAuthorization.jsp").forward(request, response); + } + + } //For Successful Authorization + else if (handle_id.equalsIgnoreCase("AuthorizeAccOpen")) { + + flag = "2"; + //String refno = request.getParameter("SearchID"); + //String AuthActivity = request.getParameter("AuthActivity"); + + if (AuthActivity.equalsIgnoreCase("DEPOSIT_ACCOUNT") + || AuthActivity.equalsIgnoreCase("KCC_ACCOUNT")) { + + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call worklist.Authorization_AccountOpening(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, CheckerId); + proc.setString(2, refno); + proc.setString(3, pacsId); + proc.setString(4, "A"); + proc.setString(5, AuthActivity); + // proc.setString(6, request.getParameter("AuthComment").toString()); + + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + + // message = proc.getString(7); + + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + } else if (AuthActivity.equalsIgnoreCase("LOAN_ACCOUNT")) { + + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call worklist.Authorization_LoanOpening(?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, CheckerId); + proc.setString(2, refno); + proc.setString(3, pacsId); + proc.setString(4, "A"); + // proc.setString(5, request.getParameter("sancAmt").toString()); + // proc.setString(6, request.getParameter("charges").toString()); + // proc.setString(7, request.getParameter("AuthComment").toString()); + + proc.registerOutParameter(8, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + + // message = proc.getString(8); + + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + } + + request.setAttribute("message", message); + + if (AuthActivity.equalsIgnoreCase("DEPOSIT_ACCOUNT")) { + + request.getRequestDispatcher("/Deposit/DepositAccountCreationReadonly.jsp").forward(request, response); + + } else if (AuthActivity.equalsIgnoreCase("KCC_ACCOUNT")) { + + request.getRequestDispatcher("/accountCreationReadOnly.jsp").forward(request, response); + + } else if (AuthActivity.equalsIgnoreCase("LOAN_ACCOUNT")) { + + request.getRequestDispatcher("/Loan/LoanAccountCreationReadOnly.jsp").forward(request, response); + } + + } //For Rejection + else if (handle_id.equalsIgnoreCase("RejectAccOpen")) { + + flag = "2"; + //String refno = request.getParameter("SearchID"); + String AuthActivity = request.getParameter("AuthActivity"); + + if (AuthActivity.equalsIgnoreCase("DEPOSIT_ACCOUNT") + || AuthActivity.equalsIgnoreCase("KCC_ACCOUNT")) { + + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call worklist.Authorization_AccountOpening(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, CheckerId); + proc.setString(2, refno); + proc.setString(3, pacsId); + proc.setString(4, "R"); + proc.setString(5, null); + // proc.setString(6, request.getParameter("AuthComment").toString()); + + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + + // message = proc.getString(7); + + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + } + if (AuthActivity.equalsIgnoreCase("LOAN_ACCOUNT")) { + + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call worklist.Authorization_LoanOpening(?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, CheckerId); + proc.setString(2, refno); + proc.setString(3, pacsId); + proc.setString(4, "R"); + // proc.setString(5, request.getParameter("sancAmt").toString()); + // proc.setString(6, request.getParameter("charges").toString()); + // proc.setString(7, request.getParameter("AuthComment").toString()); + + proc.registerOutParameter(8, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + + // message = proc.getString(8); + + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + } + + request.setAttribute("message", message); + + if (AuthActivity.equalsIgnoreCase("DEPOSIT_ACCOUNT")) { + + request.getRequestDispatcher("/Deposit/DepositAccountCreationReadonly.jsp").forward(request, response); + + } else if (AuthActivity.equalsIgnoreCase("KCC_ACCOUNT")) { + + request.getRequestDispatcher("/accountCreationReadOnly.jsp").forward(request, response); + + } else if (AuthActivity.equalsIgnoreCase("LOAN_ACCOUNT")) { + + request.getRequestDispatcher("/Loan/LoanAccountCreationReadOnly.jsp").forward(request, response); + } + + } + } + + } + + private void sendOutwardNeft(String refNo) { + + try { + System.out.println("pinging url"); + URL url = new URL("http://30.0.2.57:8083/neftOutward"); + HttpURLConnection urlconnection = (HttpURLConnection) url.openConnection(); + urlconnection.setRequestMethod("POST"); + urlconnection.setRequestProperty("Content-Type", "application/json"); + urlconnection.setDoOutput(true);//enables writing data to urlconnection + String payLoad = "{\"transactionNumber\":" + refNo + "}"; + OutputStream os = urlconnection.getOutputStream(); + os.write(payLoad.getBytes()); + System.out.println("network IO writes successfully"); + os.flush(); + os.close(); + int responseCode = urlconnection.getResponseCode(); + System.out.println(responseCode); + System.out.println("reference number in sendOutwardNeft is : " + refNo); + urlconnection.disconnect(); + + } catch (Exception ee) { + System.out.println("reference number in catch block sendOutwardNeft is : " + refNo); + ee.printStackTrace(); + //System.out.println(ee.getMessage()); + } + + } + +// + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/TransactionAuthorizationServlet_STB.java b/IPKS_Updated/src/src/java/Controller/TransactionAuthorizationServlet_STB.java new file mode 100644 index 0000000..67442f8 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/TransactionAuthorizationServlet_STB.java @@ -0,0 +1,526 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import Controller.UploadServlet; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import LoginDb.DbHandler; +import DataEntryBean.myWorlistBean; +import java.sql.SQLException; +import oracle.jdbc.OracleTypes; + +/** + * + * @author Tcs Helpdesk10 + */ +public class TransactionAuthorizationServlet_STB extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + CallableStatement proc = null; + int searchFound = 0; + String flag="1"; + String message = ""; + String showButton = "N"; + String handle_id = request.getParameter("handle_id"); + String pacsId = (String) session.getAttribute("pacsId"); + String CheckerId = session.getAttribute("user").toString(); + String viewType = session.getAttribute("moduleName").toString(); + + myWorlistBean myWorlistBeanObj = new myWorlistBean(); + ArrayList almyWorlistBean = new ArrayList(); + + while(flag.equalsIgnoreCase("1")) { + + if (handle_id.equalsIgnoreCase("Search")) { + flag = "2"; + + try { + // BeanUtils.populate(myWorlistBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call worklist.my_Worklist_info_bank(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, CheckerId); + proc.setString(2, myWorlistBeanObj.getRefno()); + proc.setString(3, pacsId); + proc.setString(4, myWorlistBeanObj.getTransactiontype()); + proc.setString(5, myWorlistBeanObj.getFromDate()); + proc.setString(6, myWorlistBeanObj.getToDate()); + + proc.registerOutParameter(7, OracleTypes.CURSOR); + proc.registerOutParameter(8, java.sql.Types.VARCHAR); + proc.setString(8, viewType); + proc.setString(9, myWorlistBeanObj.getCheckOption()); + + proc.executeUpdate(); + + // rs = (ResultSet) proc.getObject(7); + + if (myWorlistBeanObj.getCheckOption().equalsIgnoreCase("TP")) { + + while (rs.next()) { + searchFound = 1; + myWorlistBeanObj = new myWorlistBean(); + myWorlistBeanObj.setAccount_no(rs.getString("acct_no")); + myWorlistBeanObj.setAccount_no2(rs.getString("acct_no2")); + myWorlistBeanObj.setAccount_bal(rs.getString("avail_bal")); + myWorlistBeanObj.setRefnoSearch(rs.getString("cbs_ref_no")); + myWorlistBeanObj.setIntitiator(rs.getString("maker_id")); + myWorlistBeanObj.setTxn_amount(rs.getString("txn_amt")); + myWorlistBeanObj.setTransactiontypeSearch(rs.getString("txn_type")); + myWorlistBeanObj.setTxn_date(rs.getString("tran_date")); + myWorlistBeanObj.setChargeToDeduct(rs.getString("Charges")); + myWorlistBeanObj.setCust_name(rs.getString("cust_name")); + myWorlistBeanObj.setCust_no(rs.getString("cif_no")); + myWorlistBeanObj.setTran_ind(rs.getString("tran_ind")); + myWorlistBeanObj.setPacsID(rs.getString("pacs_id")); + myWorlistBeanObj.setPacsName(rs.getString("pacs_name")); + myWorlistBeanObj.setCBSAcc(rs.getString("link_accno")); + + almyWorlistBean.add(myWorlistBeanObj); + request.setAttribute("displayFlag", "Y"); + + } + } + + // myWorlistBeanObj.setRefno(request.getParameter("refno")); + // myWorlistBeanObj.setTransactiontype(request.getParameter("transactiontype")); + // myWorlistBeanObj.setFromDate(request.getParameter("fromDate")); + // myWorlistBeanObj.setToDate(request.getParameter("toDate")); + // myWorlistBeanObj.setCheckOption(request.getParameter("checkOption")); + + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + if (searchFound == 0) { + if(message.equalsIgnoreCase("")) { + message = "No data exists for selected item."; + request.setAttribute("message", message); + } + } + + request.setAttribute("myWorlistBeanObj", myWorlistBeanObj); + request.setAttribute("almyWorlistBean", almyWorlistBean); + request.setAttribute("message", message); + + request.getRequestDispatcher("/TransactionAuthorization_STB.jsp").forward(request, response); + + } else if (handle_id.equalsIgnoreCase("Authorise")) { + + String index = request.getParameter("detailId"); + + // String refno = request.getParameter("refno" + index); + // String account_no = request.getParameter("account_no" + index); + // String transactiontype = request.getParameter("transactiontype" + index); + // String txn_amount = request.getParameter("txn_amount" + index); + // String remarks = request.getParameter("remarks" + index); + // String AuthStatus = request.getParameter("AuthStatus" + index); + + try { + // BeanUtils.populate(myWorlistBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call worklist.proc_Authorization_bank(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, CheckerId); + proc.setString(2, refno); + proc.setString(3, pacsId); + proc.setString(4, transactiontype); + proc.setString(5, txn_amount); + proc.setString(6, account_no); + proc.setString(7, remarks); + proc.setString(8, AuthStatus); + + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + + // message = proc.getString(9); + + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + request.setAttribute("message", message); + if(message.startsWith("Transaction posted successfully")) { + if(message.equalsIgnoreCase("Transaction posted successfully. Matured amount withdrawn completed. Account closed")) + showButton = "N"; + else + showButton = "Y"; + request.setAttribute("showButton", showButton); + } + handle_id="Search"; + /*request.setAttribute("handle_id1", handle_id); + request.setAttribute("refno", myWorlistBeanObj.getRefno()); + request.setAttribute("transactiontype", transactiontype); + request.setAttribute("checkOption", myWorlistBeanObj.getCheckOption()); + request.setAttribute("fromDate", myWorlistBeanObj.getFromDate()); + request.setAttribute("toDate", myWorlistBeanObj.getToDate()); + request.getRequestDispatcher("/TransactionAuthorizationServlet").forward(request, response);*/ + + } //For View Details + else if (handle_id.equalsIgnoreCase("ViewDetails")) { + + String index = request.getParameter("detailId"); + + // String refno = request.getParameter("refno" + index); + // String checkOption = request.getParameter("checkOption"); + + request.setAttribute("refID", refno); + request.setAttribute("AuthActivity", checkOption); + + if (checkOption.equalsIgnoreCase("ACC") || checkOption.equalsIgnoreCase("LACC") || checkOption.equalsIgnoreCase("KCC") ) { + request.getRequestDispatcher("ReadOnlyServlet").forward(request, response); + // request.getRequestDispatcher("/TransactionAuthorization.jsp").forward(request, response); + } + + } //For Successful Authorization + else if (handle_id.equalsIgnoreCase("AuthorizeAccOpen")) { + + flag = "2"; + // String refno = request.getParameter("SearchID"); + // String AuthActivity = request.getParameter("AuthActivity"); + + if (AuthActivity.equalsIgnoreCase("DEPOSIT_ACCOUNT") + || AuthActivity.equalsIgnoreCase("KCC_ACCOUNT")) { + + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call worklist.Authorization_AccountOpening(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, CheckerId); + proc.setString(2, refno); + proc.setString(3, pacsId); + proc.setString(4, "A"); + proc.setString(5, AuthActivity); + // proc.setString(6, request.getParameter("AuthComment").toString()); + + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + + // message = proc.getString(7); + + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + } else if (AuthActivity.equalsIgnoreCase("LOAN_ACCOUNT")) { + + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call worklist.Authorization_LoanOpening(?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, CheckerId); + proc.setString(2, refno); + proc.setString(3, pacsId); + proc.setString(4, "A"); + // proc.setString(5, request.getParameter("sancAmt").toString()); + //proc.setString(6, request.getParameter("charges").toString()); + //proc.setString(7, request.getParameter("AuthComment").toString()); + + proc.registerOutParameter(8, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + + // message = proc.getString(8); + + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + + } + + request.setAttribute("message", message); + + + if (AuthActivity.equalsIgnoreCase("DEPOSIT_ACCOUNT")) { + + request.getRequestDispatcher("/Deposit/DepositAccountCreationReadonly.jsp").forward(request, response); + + } else if (AuthActivity.equalsIgnoreCase("KCC_ACCOUNT")) { + + request.getRequestDispatcher("/accountCreationReadOnly.jsp").forward(request, response); + + } else if (AuthActivity.equalsIgnoreCase("LOAN_ACCOUNT")) { + + request.getRequestDispatcher("/Loan/LoanAccountCreationReadOnly.jsp").forward(request, response); + } + + + + } //For Rejection + else if (handle_id.equalsIgnoreCase("RejectAccOpen")) { + + flag = "2"; + // String refno = request.getParameter("SearchID"); + String AuthActivity = request.getParameter("AuthActivity"); + + if (AuthActivity.equalsIgnoreCase("DEPOSIT_ACCOUNT") + || AuthActivity.equalsIgnoreCase("KCC_ACCOUNT")) { + + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call worklist.Authorization_AccountOpening(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, CheckerId); + proc.setString(2, refno); + proc.setString(3, pacsId); + proc.setString(4, "R"); + proc.setString(5, null); + // proc.setString(6, request.getParameter("AuthComment").toString()); + + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + + // message = proc.getString(7); + + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + } + if (AuthActivity.equalsIgnoreCase("LOAN_ACCOUNT")) { + + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call worklist.Authorization_LoanOpening(?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, CheckerId); + proc.setString(2, refno); + proc.setString(3, pacsId); + proc.setString(4, "R"); + // proc.setString(5, request.getParameter("sancAmt").toString()); + // proc.setString(6, request.getParameter("charges").toString()); + // proc.setString(7, request.getParameter("AuthComment").toString()); + + proc.registerOutParameter(8, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + + // message = proc.getString(8); + + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + + } + + request.setAttribute("message", message); + + if (AuthActivity.equalsIgnoreCase("DEPOSIT_ACCOUNT")) { + + request.getRequestDispatcher("/Deposit/DepositAccountCreationReadonly.jsp").forward(request, response); + + } else if (AuthActivity.equalsIgnoreCase("KCC_ACCOUNT")) { + + request.getRequestDispatcher("/accountCreationReadOnly.jsp").forward(request, response); + + }else if (AuthActivity.equalsIgnoreCase("LOAN_ACCOUNT")) { + + request.getRequestDispatcher("/Loan/LoanAccountCreationReadOnly.jsp").forward(request, response); + } + + } + } + + + } + +// + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/TransactionAuthorizationServlet_Trading.java b/IPKS_Updated/src/src/java/Controller/TransactionAuthorizationServlet_Trading.java new file mode 100644 index 0000000..c9c3fba --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/TransactionAuthorizationServlet_Trading.java @@ -0,0 +1,529 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import Controller.UploadServlet; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import LoginDb.DbHandler; +import DataEntryBean.myWorlistBean; +import java.sql.SQLException; +import oracle.jdbc.OracleTypes; + +/** + * + * @author Tcs Helpdesk10 + */ +public class TransactionAuthorizationServlet_Trading extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + CallableStatement proc = null; + int searchFound = 0; + String flag="1"; + String message = ""; + String showButton = "N"; + String handle_id = request.getParameter("handle_id"); + String pacsId = (String) session.getAttribute("pacsId"); + String CheckerId = session.getAttribute("user").toString(); + String viewType = session.getAttribute("moduleName").toString(); + + myWorlistBean myWorlistBeanObj = new myWorlistBean(); + ArrayList almyWorlistBean = new ArrayList(); + + while(flag.equalsIgnoreCase("1")) { + + if (handle_id.equalsIgnoreCase("Search")) { + flag = "2"; + + try { + // BeanUtils.populate(myWorlistBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call worklist.my_Worklist_info(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, CheckerId); + proc.setString(2, myWorlistBeanObj.getRefno()); + proc.setString(3, pacsId); + proc.setString(4, myWorlistBeanObj.getTransactiontype()); + proc.setString(5, myWorlistBeanObj.getFromDate()); + proc.setString(6, myWorlistBeanObj.getToDate()); + + proc.registerOutParameter(7, OracleTypes.CURSOR); + proc.registerOutParameter(8, java.sql.Types.VARCHAR); + proc.setString(8, viewType); + proc.setString(9, myWorlistBeanObj.getCheckOption()); + + proc.executeUpdate(); + + //rs = (ResultSet) proc.getObject(7); + + if (myWorlistBeanObj.getCheckOption().equalsIgnoreCase("TTXN")) { + + while (rs.next()) { + searchFound = 1; + myWorlistBeanObj = new myWorlistBean(); + myWorlistBeanObj.setAccount_no(rs.getString("acct_no")); + myWorlistBeanObj.setAccount_no2(rs.getString("acct_no2")); + myWorlistBeanObj.setAccount_bal(rs.getString("cum_curr_val")); + myWorlistBeanObj.setRefnoSearch(rs.getString("cbs_ref_no")); + myWorlistBeanObj.setIntitiator(rs.getString("maker_id")); + myWorlistBeanObj.setTxn_amount(rs.getString("amt_to_be_paid")); + myWorlistBeanObj.setTransactiontypeSearch(rs.getString("txn_type")); + myWorlistBeanObj.setTxn_date(rs.getString("tran_date")); + myWorlistBeanObj.setCust_name(rs.getString("cust_name")); + myWorlistBeanObj.setCust_no(rs.getString("cif_no")); + myWorlistBeanObj.setTran_ind(rs.getString("tran_ind")); + myWorlistBeanObj.setSgst_amount(rs.getString("sgst_amt")); + myWorlistBeanObj.setCgst_amount(rs.getString("cgst_amt")); + myWorlistBeanObj.setDis_amount(rs.getString("dis_amt")); + myWorlistBeanObj.setNet_amount(rs.getString("net_amt")); + myWorlistBeanObj.setSale_purchase_ref(rs.getString("SALE_PURCHASE_REF_ID")); + myWorlistBeanObj.setTrade_product(rs.getString("trad_prod_name")); + + almyWorlistBean.add(myWorlistBeanObj); + request.setAttribute("displayFlag", "Y"); + + } + } + + // myWorlistBeanObj.setRefno(request.getParameter("refno")); + // myWorlistBeanObj.setTransactiontype(request.getParameter("transactiontype")); + // myWorlistBeanObj.setFromDate(request.getParameter("fromDate")); + // myWorlistBeanObj.setToDate(request.getParameter("toDate")); + // myWorlistBeanObj.setCheckOption(request.getParameter("checkOption")); + + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + if (searchFound == 0) { + if(message.equalsIgnoreCase("")) { + message = "No data exists for selected item."; + request.setAttribute("message", message); + } + } + + request.setAttribute("myWorlistBeanObj", myWorlistBeanObj); + request.setAttribute("almyWorlistBean", almyWorlistBean); + request.setAttribute("message", message); + + request.getRequestDispatcher("/Trading_JSP/TransactionAuthorization_Trading.jsp").forward(request, response); + + } else if (handle_id.equalsIgnoreCase("Authorise")) { + + String index = request.getParameter("detailId"); + + // String refno = request.getParameter("refno" + index); + // String account_no = request.getParameter("account_no" + index); + // String transactiontype = request.getParameter("transactiontype" + index); + // String txn_amount = request.getParameter("txn_amount" + index); + // String remarks = request.getParameter("remarks" + index); + // String AuthStatus = request.getParameter("AuthStatus" + index); + + try { + // BeanUtils.populate(myWorlistBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call worklist.proc_Authorization(?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, CheckerId); + proc.setString(2, refno); + proc.setString(3, pacsId); + proc.setString(4, transactiontype); + proc.setString(5, txn_amount); + proc.setString(6, account_no); + proc.setString(7, remarks); + proc.setString(8, AuthStatus); + + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + + // message = proc.getString(9); + + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + request.setAttribute("message", message); + if(message.startsWith("Transaction posted successfully")) { + if(message.equalsIgnoreCase("Transaction posted successfully. Matured amount withdrawn completed. Account closed")) + showButton = "N"; + else + showButton = "Y"; + request.setAttribute("showButton", showButton); + } + handle_id="Search"; + request.setAttribute("displayFlag", "Y"); + /*request.setAttribute("handle_id1", handle_id);*/ + /* request.setAttribute("refno", myWorlistBeanObj.getRefno()); + request.setAttribute("transactiontype", transactiontype); + request.setAttribute("checkOption", myWorlistBeanObj.getCheckOption()); + request.setAttribute("fromDate", myWorlistBeanObj.getFromDate()); + request.setAttribute("toDate", myWorlistBeanObj.getToDate()); + request.getRequestDispatcher("/TransactionAuthorizationServlet_Trading").forward(request, response); */ + + } //For View Details + else if (handle_id.equalsIgnoreCase("ViewDetails")) { + + String index = request.getParameter("detailId"); + + //String refno = request.getParameter("refno" + index); + //String checkOption = request.getParameter("checkOption"); + + request.setAttribute("refID", refno); + request.setAttribute("AuthActivity", checkOption); + + if (checkOption.equalsIgnoreCase("ACC") || checkOption.equalsIgnoreCase("LACC") || checkOption.equalsIgnoreCase("KCC") ) { + request.getRequestDispatcher("ReadOnlyServlet").forward(request, response); + // request.getRequestDispatcher("/TransactionAuthorization.jsp").forward(request, response); + } + + } //For Successful Authorization + else if (handle_id.equalsIgnoreCase("AuthorizeAccOpen")) { + + flag = "2"; + //String refno = request.getParameter("SearchID"); + //String AuthActivity = request.getParameter("AuthActivity"); + + if (AuthActivity.equalsIgnoreCase("DEPOSIT_ACCOUNT") + || AuthActivity.equalsIgnoreCase("KCC_ACCOUNT")) { + + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call worklist.Authorization_AccountOpening(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, CheckerId); + proc.setString(2, refno); + proc.setString(3, pacsId); + proc.setString(4, "A"); + proc.setString(5, AuthActivity); + // proc.setString(6, request.getParameter("AuthComment").toString()); + + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + + // message = proc.getString(7); + + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + } else if (AuthActivity.equalsIgnoreCase("LOAN_ACCOUNT")) { + + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call worklist.Authorization_LoanOpening(?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, CheckerId); + proc.setString(2, refno); + proc.setString(3, pacsId); + proc.setString(4, "A"); + //proc.setString(5, request.getParameter("sancAmt").toString()); + //proc.setString(6, request.getParameter("charges").toString()); + //proc.setString(7, request.getParameter("AuthComment").toString()); + + proc.registerOutParameter(8, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + + // message = proc.getString(8); + + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + + } + + request.setAttribute("message", message); + + + if (AuthActivity.equalsIgnoreCase("DEPOSIT_ACCOUNT")) { + + request.getRequestDispatcher("/Deposit/DepositAccountCreationReadonly.jsp").forward(request, response); + + } else if (AuthActivity.equalsIgnoreCase("KCC_ACCOUNT")) { + + request.getRequestDispatcher("/accountCreationReadOnly.jsp").forward(request, response); + + } else if (AuthActivity.equalsIgnoreCase("LOAN_ACCOUNT")) { + + request.getRequestDispatcher("/Loan/LoanAccountCreationReadOnly.jsp").forward(request, response); + } + + + + } //For Rejection + else if (handle_id.equalsIgnoreCase("RejectAccOpen")) { + + flag = "2"; + // String refno = request.getParameter("SearchID"); + String AuthActivity = request.getParameter("AuthActivity"); + + if (AuthActivity.equalsIgnoreCase("DEPOSIT_ACCOUNT") + || AuthActivity.equalsIgnoreCase("KCC_ACCOUNT")) { + + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call worklist.Authorization_AccountOpening(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, CheckerId); + proc.setString(2, refno); + proc.setString(3, pacsId); + proc.setString(4, "R"); + proc.setString(5, null); + //proc.setString(6, request.getParameter("AuthComment").toString()); + + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + + // message = proc.getString(7); + + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + } + if (AuthActivity.equalsIgnoreCase("LOAN_ACCOUNT")) { + + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call worklist.Authorization_LoanOpening(?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, CheckerId); + proc.setString(2, refno); + proc.setString(3, pacsId); + proc.setString(4, "R"); + // proc.setString(5, request.getParameter("sancAmt").toString()); + // proc.setString(6, request.getParameter("charges").toString()); + //proc.setString(7, request.getParameter("AuthComment").toString()); + + proc.registerOutParameter(8, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + + // message = proc.getString(8); + + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(TransactionAuthorizationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + + } + + request.setAttribute("message", message); + + if (AuthActivity.equalsIgnoreCase("DEPOSIT_ACCOUNT")) { + + request.getRequestDispatcher("/Deposit/DepositAccountCreationReadonly.jsp").forward(request, response); + + } else if (AuthActivity.equalsIgnoreCase("KCC_ACCOUNT")) { + + request.getRequestDispatcher("/accountCreationReadOnly.jsp").forward(request, response); + + }else if (AuthActivity.equalsIgnoreCase("LOAN_ACCOUNT")) { + + request.getRequestDispatcher("/Loan/LoanAccountCreationReadOnly.jsp").forward(request, response); + } + + } + } + + + } + +// + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/TransactionDDSServlet.java b/IPKS_Updated/src/src/java/Controller/TransactionDDSServlet.java new file mode 100644 index 0000000..30eb7f9 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/TransactionDDSServlet.java @@ -0,0 +1,160 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import Dao.CashWithdrawlDDSDao; +import DataEntryBean.MicroFileAccountDetBean; +import ServiceLayer.CashWithdrawlDDSService; +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +public class TransactionDDSServlet extends HttpServlet { + + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = (String) session.getAttribute("user"); + String tellerName = (String) session.getAttribute("UserName"); + String tranType = request.getParameter("tranType"); + // String from_dt = request.getParameter("from_date"); + // String to_dt = request.getParameter("to_date"); + CashWithdrawlDDSDao ddsDao = new CashWithdrawlDDSDao(); + MicroFileAccountDetBean accountDet = new MicroFileAccountDetBean(); + ArrayList accountDetlist = new ArrayList(); + CashWithdrawlDDSService ddsService = new CashWithdrawlDDSService(); + String result = null; + ServletOutputStream stream = null; + BufferedInputStream buf = null; + File pdfReceipt = null; + if (request.getSession().getAttribute("errorMessage") != null) { + request.getSession().removeAttribute("errorMessage"); + } + try { + + accountDet.setTxnType(tranType); + accountDet.setProdType(request.getParameter("accntType")); + accountDet.setMessage("FAILURE"); + + if (tranType.equalsIgnoreCase("all")) { + ddsDao.getTotalTransactionForAgent(tellerId, pacsId, accountDet , from_dt , to_dt); + + if (accountDet.getMessage().equalsIgnoreCase("SUCCESS")) { + pdfReceipt = ddsService.createAllTransactionReceipt(accountDet, tellerId, tellerName, pacsId); + + if (pdfReceipt != null) { + stream = response.getOutputStream(); + response.setContentType("text/plain"); + response.addHeader("Content-Disposition", "attachment; filename=" + + "AllTransactionReciept.txt"); + response.setContentLength((int) pdfReceipt.length()); + FileInputStream input = new FileInputStream(pdfReceipt); + buf = new BufferedInputStream(input); + int readBytes = 0; + + while ((readBytes = buf.read()) != -1) { + stream.write(readBytes); + } + + } else { + if (accountDet.getMessage().equalsIgnoreCase("SUCCESS")) { + request.setAttribute("message", "Error in generating receipt"); + request.getRequestDispatcher("/DDS/TransactionReport.jsp").forward(request, response); + } else { + request.setAttribute("message", "Error in fetching report"); + request.getRequestDispatcher("/DDS/TransactionReport.jsp").forward(request, response); + } + } + } else { + request.setAttribute("message", "Error in fetching report"); + request.getRequestDispatcher("/DDS/TransactionReport.jsp").forward(request, response); + } + } else if (tranType.equalsIgnoreCase("single")) { + + accountDetlist = ddsDao.getTransactionForAgent(tellerId, pacsId, accountDet,from_dt,to_dt); + + if (accountDetlist.size() !=0) { + pdfReceipt = ddsService.createTransactionReceiptDetailed(accountDetlist); + + if (pdfReceipt != null) { + stream = response.getOutputStream(); + response.setContentType("text/plain"); + response.addHeader("Content-Disposition", "attachment; filename=" + + "DetailedTransactionReciept.txt"); + response.setContentLength((int) pdfReceipt.length()); + FileInputStream input = new FileInputStream(pdfReceipt); + buf = new BufferedInputStream(input); + int readBytes = 0; + + while ((readBytes = buf.read()) != -1) { + stream.write(readBytes); + } + + } else { + if (accountDet.getMessage().equalsIgnoreCase("SUCCESS")) { + request.setAttribute("message", "Error in generating receipt"); + request.getRequestDispatcher("/DDS/TransactionReport.jsp").forward(request, response); + } else { + request.setAttribute("message", "Error in fetching report"); + request.getRequestDispatcher("/DDS/TransactionReport.jsp").forward(request, response); + } + } + } else { + request.setAttribute("message", "Error in fetching report"); + request.getRequestDispatcher("/DDS/TransactionReport.jsp").forward(request, response); + } + } + + + } catch (IOException ioe) { + // ioe.printStackTrace(); + System.out.println("Error occurred during processing."); + request.setAttribute("message", result + ".Error in generating receipt"); + request.getRequestDispatcher("/DDS/CashWidrawlDeposit.jsp").forward(request, response); + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + request.setAttribute("message", "Request can not be processed."); + request.getRequestDispatcher("/DDS/CashWidrawlDeposit.jsp").forward(request, response); + } finally { + if (stream != null) { + stream.close(); + } + if (buf != null) { + buf.close(); + } + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/TrickleFeedFileMover.java b/IPKS_Updated/src/src/java/Controller/TrickleFeedFileMover.java new file mode 100644 index 0000000..543e6a1 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/TrickleFeedFileMover.java @@ -0,0 +1,87 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import java.io.File; +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.apache.commons.io.FileUtils; + +/** + * + * @author 590685 + */ +public class TrickleFeedFileMover { + + public void TrickleFeedFileMover(String FileName, String PacsId) throws IOException { + try { + + + + String DATE_FORMAT = "yyyyMMdd"; + SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT); + Calendar c1 = Calendar.getInstance(); + String DirectoryDate = sdf.format(c1.getTime()); + + + + File sourceFile = new File("E:\\TRICKLEFEED\\" + FileName); + File destinationDir = new File("E:\\TRICKLEFEED\\" + PacsId + "\\" + DirectoryDate); + + if (!destinationDir.exists()) { + destinationDir.mkdir(); + } + + FileUtils.copyFileToDirectory(sourceFile, destinationDir, true); + sourceFile.delete(); + + } catch (IOException ex) { + // Logger.getLogger(TrickleFeedFileMover.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + + } finally { + System.out.println("Processing done."); + } + + } + + + public static void CBSFileMover(String FileName) throws IOException { + try { + + + + String DATE_FORMAT = "yyyyMMdd"; + SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT); + Calendar c1 = Calendar.getInstance(); + String DirectoryDate = sdf.format(c1.getTime()); + + + + File sourceFile = new File("E:\\CBS_EXTRACT\\" + FileName); + File destinationDir = new File("E:\\CBS_EXTRACT\\Archived\\"+ DirectoryDate); + + if (!destinationDir.exists()) { + destinationDir.mkdir(); + } + + FileUtils.copyFileToDirectory(sourceFile, destinationDir, true); + + + } catch (IOException ex) { + // Logger.getLogger(TrickleFeedFileMover.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + + } finally { + System.out.println("Processing done."); + } + + } + + +} diff --git a/IPKS_Updated/src/src/java/Controller/UpdatePacsDetailsServlet.java b/IPKS_Updated/src/src/java/Controller/UpdatePacsDetailsServlet.java new file mode 100644 index 0000000..0ca5d7c --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/UpdatePacsDetailsServlet.java @@ -0,0 +1,129 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + + +import LoginDb.DbHandler; +import java.io.IOException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 986137 + */ +public class UpdatePacsDetailsServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + + Connection con = null; + CallableStatement proc = null; + // String pacsName = request.getParameter("pacsName"); + // String addrs1 = request.getParameter("add1"); + // String addrs2 = request.getParameter("add2"); + // String addrs3 = request.getParameter("add3"); + // String gst = request.getParameter("gstin"); + + try { + con = DbHandler.getDBConnection(); + + proc = con.prepareCall("{ call operations2.PACS_ADDRESS_CHANGE(?,?,?,?,?,?,?,?) }"); + + proc.setString(1, pacsId); + proc.setString(2, user); + proc.setString(3, pacsName); + proc.setString(4, addrs1); + proc.setString(5, addrs2); + proc.setString(6, addrs3); + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + proc.setString(8, gst); + + proc.execute(); + // message = proc.getString(7); + + request.setAttribute("message", message); + + request.getRequestDispatcher("/Deposit/UpdatePacsDetails.jsp").forward(request, response); + } + + catch (SQLException ex) { + // ex.printStackTrace(); + System.out.println("Error occurred during processing."); + System.out.println("Exception occured in UpdatePacsDetailsServlet for user Id :" + user); + message= "Exception occured in UpdatePacsDetailsServlet for user Id :" + user +"."; + + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/UpdatePacsDetails.jsp").forward(request, response); + + } finally { + try { + if(proc !=null) + proc.close(); + if (con != null) + con.close(); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/UploadExcelServlet.java b/IPKS_Updated/src/src/java/Controller/UploadExcelServlet.java new file mode 100644 index 0000000..b793386 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/UploadExcelServlet.java @@ -0,0 +1,457 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.FileUploadDataBean; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.*; +import java.util.*; +import javax.servlet.http.HttpSession; +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.fileupload.servlet.ServletFileUpload; +import java.util.Iterator; +import jxl.Workbook; +import jxl.read.biff.BiffException; +import java.util.ArrayList; +import javax.servlet.*; +import jxl.Cell; +import jxl.CellType; +import jxl.Sheet; +import jxl.Workbook; +import java.sql.*; +import LoginDb.DbHandler; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author 454222 + */ +public class UploadExcelServlet extends HttpServlet { + + private boolean isMultipart; + private int maxFileSize = 5000 * 1024; + private int maxMemSize = 4 * 1024; + Connection con = null; + CallableStatement proc = null; + + + @Override + public void init() { + } + + @Override + public void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, java.io.IOException { + + HttpSession session = request.getSession(false); + String message = ""; + + String UploadName = ""; + String UploadValue = ""; + String pacsId=(String) session.getAttribute("pacsId"); + + // Check that we have a file upload request + isMultipart = ServletFileUpload.isMultipartContent(request); + System.out.println("Check that we have a file upload request :" + isMultipart); + response.setContentType("text/html"); + if (!isMultipart) { + message = "Uploaded file is not in Excel Format"; + request.setAttribute("message", message); + request.getRequestDispatcher("/pacsFileUpload.jsp").forward(request, response); + } + DiskFileItemFactory factory = new DiskFileItemFactory(); + // maximum size that will be stored in memory + factory.setSizeThreshold(maxMemSize); + // Create a new file upload handler + ServletFileUpload upload = new ServletFileUpload(factory); + // maximum file size to be uploaded. + upload.setSizeMax(maxFileSize); + + Workbook workbook = null; + try { + // Parse the request to get file items. + // List fileItems = upload.parseRequest(request); + + // Process the uploaded file items + + Iterator itr2 = fileItems.iterator(); + while (itr2.hasNext()) { + FileItem fi2 = (FileItem) itr2.next(); + UploadName = fi2.getFieldName(); + + if (UploadName.equalsIgnoreCase("UploadType")) { + + UploadValue = fi2.getString(); + } + } + + Iterator itr = fileItems.iterator(); + while (itr.hasNext()) { + FileItem fi = (FileItem) itr.next(); + + if (!fi.isFormField()) { + // Get the uploaded file parameters + String fieldName = fi.getFieldName(); + String fileName = fi.getName(); + String contentType = fi.getContentType(); + boolean isInMemory = fi.isInMemory(); + long sizeInBytes = fi.getSize(); + //check if the uploaded file is an excel file + String fileExtention = fileName.substring(fileName.length() - 3, fileName.length()).toLowerCase(); + if (!fileExtention.equals("xls")) { + //return to jsp with an error message + message = "Uploaded file is not in Excel Format"; + throw new Exception(); + } else { + } + FileInputStream fileXls = (FileInputStream) fi.getInputStream(); + workbook = Workbook.getWorkbook(fileXls); + + + FileUploadDataBean FileUploadDataBeanObj = null; + ArrayList FileUploadArrayList = new ArrayList(); + Sheet sheet = workbook.getSheet(0); + + //Upload Type Bifurcation + + if (UploadValue.equalsIgnoreCase("CC")) { + + for (int i = 2; i < sheet.getRows(); i++) { + FileUploadDataBeanObj = new FileUploadDataBean(); + for (int j = 0; j < sheet.getColumns(); j++) { + Cell cell = sheet.getCell(j, i); + switch (j) { + case 0: + FileUploadDataBeanObj.setAccount_type(cell.getContents()); + break; + case 1: + FileUploadDataBeanObj.setIntt_category(cell.getContents()); + break; + case 2: + FileUploadDataBeanObj.setSegment_code(cell.getContents()); + break; + case 3: + FileUploadDataBeanObj.setLimit(cell.getContents()); + break; + case 4: + FileUploadDataBeanObj.setRate(cell.getContents()); + break; + case 5: + FileUploadDataBeanObj.setRate_type(cell.getContents()); + break; + case 6: + FileUploadDataBeanObj.setExpiry_date(cell.getContents()); + break; + case 7: + FileUploadDataBeanObj.setApproval_amt(cell.getContents()); + break; + case 8: + FileUploadDataBeanObj.setCust_number(cell.getContents()); + break; + case 9: + FileUploadDataBeanObj.setMember_id(cell.getContents()); + break; + case 10: + FileUploadDataBeanObj.setPacs_main_acct(cell.getContents()); + break; + case 11: + FileUploadDataBeanObj.setPacs_sub_acct(cell.getContents()); + break; + case 12: + FileUploadDataBeanObj.setSecurity_indicator(cell.getContents()); + break; + case 13: + FileUploadDataBeanObj.setActivity_code(cell.getContents()); + break; + case 14: + FileUploadDataBeanObj.setScheme_code(cell.getContents()); + break; + case 15: + FileUploadDataBeanObj.setCustomer_type(cell.getContents()); + break; + case 16: + FileUploadDataBeanObj.setSector_indicator(cell.getContents()); + break; + case 17: + FileUploadDataBeanObj.setExpiry_rate(cell.getContents()); + break; + case 18: + FileUploadDataBeanObj.setExpiry_rate_type(cell.getContents()); + break; + } + } + FileUploadArrayList.add(FileUploadDataBeanObj); + } + + //Now Fetch The Arraylist Data to save in databse + try { + con = DbHandler.getDBConnection(); + + for (int i = 0; i < FileUploadArrayList.size(); i++) { + + FileUploadDataBeanObj = FileUploadArrayList.get(i); + System.out.println(FileUploadDataBeanObj.getAccount_type()); + System.out.println(FileUploadDataBeanObj.getIntt_category()); + System.out.println(FileUploadDataBeanObj.getSegment_code()); + System.out.println(FileUploadDataBeanObj.getLimit()); + System.out.println(FileUploadDataBeanObj.getRate()); + System.out.println(FileUploadDataBeanObj.getRate_type()); + System.out.println(FileUploadDataBeanObj.getExpiry_date()); + System.out.println(FileUploadDataBeanObj.getApproval_amt()); + System.out.println(FileUploadDataBeanObj.getCust_number()); + System.out.println(FileUploadDataBeanObj.getMember_id()); + System.out.println(FileUploadDataBeanObj.getPacs_main_acct()); + System.out.println(FileUploadDataBeanObj.getPacs_sub_acct()); + System.out.println(FileUploadDataBeanObj.getSecurity_indicator()); + System.out.println(FileUploadDataBeanObj.getActivity_code()); + System.out.println(FileUploadDataBeanObj.getScheme_code()); + System.out.println(FileUploadDataBeanObj.getCustomer_type()); + System.out.println(FileUploadDataBeanObj.getSector_indicator()); + System.out.println(FileUploadDataBeanObj.getExpiry_rate()); + System.out.println(FileUploadDataBeanObj.getExpiry_rate_type()); + + + try { + proc = con.prepareCall("{ call PACS_filetodb(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1,UploadValue) ; + proc.setString(2, FileUploadDataBeanObj.getAccount_type()); + proc.setString(3, FileUploadDataBeanObj.getIntt_category()); + proc.setString(4, FileUploadDataBeanObj.getSegment_code()); + proc.setString(5, FileUploadDataBeanObj.getLimit()); + proc.setString(6, FileUploadDataBeanObj.getRate()); + proc.setString(7, FileUploadDataBeanObj.getRate_type()); + proc.setString(8, FileUploadDataBeanObj.getExpiry_date()); + proc.setString(9, FileUploadDataBeanObj.getApproval_amt()); + proc.setString(10, FileUploadDataBeanObj.getCust_number()); + proc.setString(11, FileUploadDataBeanObj.getMember_id()); + proc.setString(12, FileUploadDataBeanObj.getPacs_main_acct()); + proc.setString(13, FileUploadDataBeanObj.getPacs_sub_acct()); + proc.setString(14, FileUploadDataBeanObj.getSecurity_indicator()); + proc.setString(15, FileUploadDataBeanObj.getActivity_code()); + proc.setString(16, FileUploadDataBeanObj.getScheme_code()); + proc.setString(17, FileUploadDataBeanObj.getCustomer_type()); + proc.setString(18, FileUploadDataBeanObj.getSector_indicator()); + proc.setString(19, FileUploadDataBeanObj.getExpiry_rate()); + proc.setString(20, FileUploadDataBeanObj.getExpiry_rate_type()); + proc.setString(21,pacsId); + + + proc.execute(); + } + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + //Data Entry Ends + + } else if (UploadValue.equalsIgnoreCase("SB")) { + + for (int i = 1; i < sheet.getRows(); i++) { + FileUploadDataBeanObj = new FileUploadDataBean(); + for (int j = 0; j < sheet.getColumns(); j++) { + Cell cell = sheet.getCell(j, i); + switch (j) { + case 0: + FileUploadDataBeanObj.setStudentRecordType(cell.getContents()); + break; + case 1: + FileUploadDataBeanObj.setStudentNumber(cell.getContents()); + break; + case 2: + FileUploadDataBeanObj.setFirstName(cell.getContents()); + break; + case 3: + FileUploadDataBeanObj.setMiddleName(cell.getContents()); + break; + case 4: + FileUploadDataBeanObj.setLastName(cell.getContents()); + break; + case 5: + FileUploadDataBeanObj.setAddress1(cell.getContents()); + break; + case 6: + FileUploadDataBeanObj.setAddress2(cell.getContents()); + break; + case 7: + FileUploadDataBeanObj.setAddress3(cell.getContents()); + break; + case 8: + FileUploadDataBeanObj.setCityCode(cell.getContents()); + break; + case 9: + FileUploadDataBeanObj.setStateCode(cell.getContents()); + break; + case 10: + FileUploadDataBeanObj.setPostBoxNumber(cell.getContents()); + break; + case 11: + FileUploadDataBeanObj.setPhoneNumber(cell.getContents()); + break; + case 12: + FileUploadDataBeanObj.setIdType(cell.getContents()); + break; + case 13: + FileUploadDataBeanObj.setIdNumber(cell.getContents()); + break; + case 14: + FileUploadDataBeanObj.setBirthDate(cell.getContents()); + break; + case 15: + FileUploadDataBeanObj.setGender(cell.getContents()); + break; + case 16: + FileUploadDataBeanObj.setMotherName(cell.getContents()); + break; + case 17: + FileUploadDataBeanObj.setResidentialStatus(cell.getContents()); + break; + case 18: + FileUploadDataBeanObj.setNationalityCode(cell.getContents()); + break; + case 19: + FileUploadDataBeanObj.setCustomerType(cell.getContents()); + break; + case 20: + FileUploadDataBeanObj.setTitle(cell.getContents()); + break; + } + } + FileUploadArrayList.add(FileUploadDataBeanObj); + } + + //Now Fetch The Arraylist Data to save in databse + + try { + con = DbHandler.getDBConnection(); + + for (int i = 0; i < FileUploadArrayList.size(); i++) { + + FileUploadDataBeanObj = FileUploadArrayList.get(i); + System.out.println(FileUploadDataBeanObj.getStudentRecordType()); + System.out.println(FileUploadDataBeanObj.getStudentNumber()); + System.out.println(FileUploadDataBeanObj.getFirstName()); + System.out.println(FileUploadDataBeanObj.getMiddleName()); + System.out.println(FileUploadDataBeanObj.getLastName()); + System.out.println(FileUploadDataBeanObj.getAddress1()); + System.out.println(FileUploadDataBeanObj.getAddress2()); + System.out.println(FileUploadDataBeanObj.getAddress3()); + System.out.println(FileUploadDataBeanObj.getCityCode()); + System.out.println(FileUploadDataBeanObj.getStateCode()); + System.out.println(FileUploadDataBeanObj.getPostBoxNumber()); + System.out.println(FileUploadDataBeanObj.getPhoneNumber()); + System.out.println(FileUploadDataBeanObj.getIdType()); + System.out.println(FileUploadDataBeanObj.getIdNumber()); + System.out.println(FileUploadDataBeanObj.getBirthDate()); + System.out.println(FileUploadDataBeanObj.getGender()); + System.out.println(FileUploadDataBeanObj.getMotherName()); + System.out.println(FileUploadDataBeanObj.getResidentialStatus()); + System.out.println(FileUploadDataBeanObj.getNationalityCode()); + System.out.println(FileUploadDataBeanObj.getCustomerType()); + System.out.println(FileUploadDataBeanObj.getTitle()); + + try { + proc = con.prepareCall("{ call PACS_AccountFiletodb(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1,UploadValue) ; + proc.setString(2,FileUploadDataBeanObj.getStudentRecordType()); + proc.setString(3,FileUploadDataBeanObj.getStudentNumber()); + proc.setString(4,FileUploadDataBeanObj.getFirstName()); + proc.setString(5,FileUploadDataBeanObj.getMiddleName()); + proc.setString(6,FileUploadDataBeanObj.getLastName()); + proc.setString(7,FileUploadDataBeanObj.getAddress1()); + proc.setString(8,FileUploadDataBeanObj.getAddress2()); + proc.setString(9,FileUploadDataBeanObj.getAddress3()); + proc.setString(10,FileUploadDataBeanObj.getCityCode()); + proc.setString(11,FileUploadDataBeanObj.getStateCode()); + proc.setString(12,FileUploadDataBeanObj.getPostBoxNumber()); + proc.setString(13,FileUploadDataBeanObj.getPhoneNumber()); + proc.setString(14,FileUploadDataBeanObj.getIdType()); + proc.setString(15,FileUploadDataBeanObj.getIdNumber()); + proc.setString(16,FileUploadDataBeanObj.getBirthDate()); + proc.setString(17,FileUploadDataBeanObj.getGender()); + proc.setString(18,FileUploadDataBeanObj.getMotherName()); + proc.setString(19,FileUploadDataBeanObj.getResidentialStatus()); + proc.setString(20,FileUploadDataBeanObj.getNationalityCode()); + proc.setString(21,FileUploadDataBeanObj.getCustomerType()); + proc.setString(22,FileUploadDataBeanObj.getTitle()); + proc.setString(23,pacsId); + + proc.execute(); + } + + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + } + + } + + } + + message = "File Uploaded Successfully"; + + } catch (Exception ex) { + // ex.printStackTrace(); + System.out.println("Error occurred during processing."); + message = "Unable to read Excel/Excel is Tampered"; + + } finally { + request.setAttribute("message", message); + request.getRequestDispatcher("/pacsFileUpload.jsp").forward(request, response); + } + + + } + + @Override + public void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, java.io.IOException { + + throw new ServletException("GET method used with " + getClass().getName() + ": POST method required."); + } +} diff --git a/IPKS_Updated/src/src/java/Controller/UploadFile.java b/IPKS_Updated/src/src/java/Controller/UploadFile.java new file mode 100644 index 0000000..4c868c3 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/UploadFile.java @@ -0,0 +1,144 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import java.io.File; +import javax.servlet.ServletContext; +import java.io.IOException; +import java.util.List; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.FileItemFactory; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.fileupload.servlet.ServletFileUpload; +import java.util.UUID; +import javax.servlet.http.HttpSession; + +/** + * + * @author 986137 + */ +public class UploadFile extends HttpServlet { + + private static final long serialVersionUID = 1L; + private final String UPLOAD_DIRECTORY = "C:/Files"; + private String uploadPathMain; + private String uploadPath; + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet UploadFile"); + out.println(""); + out.println(""); + out.println("

Servlet UploadFile at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + boolean isMultipart = ServletFileUpload.isMultipartContent(request); + + HttpSession session = request.getSession(false); + String uuid = UUID.randomUUID().toString(); + String lastPhotoName =""; + // process only if it is multipart content + ServletContext servletContext = getServletContext(); + //uploadPathMain = servletContext.getRealPath(File.separator); + uploadPath = uploadPathMain + "/" + "UploadedFiles"; + File destinationDir = new File(uploadPath); + + if (!destinationDir.exists()) { + destinationDir.mkdir(); + } + if (isMultipart) { + // Create a factory for disk-based file items + FileItemFactory factory = new DiskFileItemFactory(); + + // Create a new file upload handler + ServletFileUpload upload = new ServletFileUpload(factory); + try { + // Parse the request + List multiparts = upload.parseRequest(request); + + for (FileItem item : multiparts) { + if (!item.isFormField()) { + String name = new File(uuid).getName(); + name +=".jpg"; + lastPhotoName = name; + item.write(new File(uploadPath + File.separator + name)); + } + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + + } finally { + System.out.println("Processing done."); + } + } + session.setAttribute("lastPhotoName", lastPhotoName); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/UploadIdFile.java b/IPKS_Updated/src/src/java/Controller/UploadIdFile.java new file mode 100644 index 0000000..ebea0ba --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/UploadIdFile.java @@ -0,0 +1,158 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import java.io.File; +import javax.servlet.ServletContext; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.String; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.FileItemFactory; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.fileupload.servlet.ServletFileUpload; +import java.util.UUID; +import javax.servlet.http.HttpSession; + +/** + * + * @author 981898 + */ +public class UploadIdFile extends HttpServlet { + + private String uploadPathMain; + private String uploadPath; + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet UploadIdFile"); + out.println(""); + out.println(""); + out.println("

Servlet UploadIdFile at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + boolean isMultipart = ServletFileUpload.isMultipartContent(request); + + HttpSession session = request.getSession(false); + String uuid = UUID.randomUUID().toString(); + //String uuid = UUID.fromString("scanImg").toString(); + // process only if it is multipart content + ServletContext servletContext = getServletContext(); + // uploadPathMain = servletContext.getRealPath(File.separator); + uploadPath = uploadPathMain + "/" + "UploadedFiles"; + File destinationDir = new File(uploadPath); + int fieldName =0; + ArrayList upldFile = null; + if(session.getAttribute("upldFile") == null) + upldFile = new ArrayList(Arrays.asList("", + "","","","","","","","","")); + else + upldFile= (ArrayList) session.getAttribute("upldFile"); + String lastPhotoName = (String) request.getAttribute("name"); + if (!destinationDir.exists()) { + destinationDir.mkdir(); + } + if (isMultipart) { + // Create a factory for disk-based file items + FileItemFactory factory = new DiskFileItemFactory(); + + // Create a new file upload handler + ServletFileUpload upload = new ServletFileUpload(factory); + try { + // Parse the request + List multiparts = upload.parseRequest(request); + + //multiparts. + for (FileItem item : multiparts) { + if (!item.isFormField()) { + fieldName = Integer.parseInt(item.getFieldName().substring(4)) - 1; + String name = new File(uuid).getName(); + name +=".jpg"; + lastPhotoName = name; + item.write(new File(uploadPath + File.separator + name)); + } + } + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + + } finally { + System.out.println("Processing done."); + } + } + + upldFile.set(fieldName, lastPhotoName); + for(int i =0; i + +} diff --git a/IPKS_Updated/src/src/java/Controller/UploadServlet.java b/IPKS_Updated/src/src/java/Controller/UploadServlet.java new file mode 100644 index 0000000..d83cdc2 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/UploadServlet.java @@ -0,0 +1,166 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import java.io.IOException; +import java.io.PrintWriter; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.*; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.*; +import java.io.File; +import org.apache.commons.fileupload.FileItemFactory; +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.FileUploadException; +import org.apache.commons.fileupload.servlet.ServletFileUpload; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.io.*; +import java.sql.*; +import LoginDb.DbHandler; + +/** + * + * @author Administrator + */ +public class UploadServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet UploadServlet"); + out.println(""); + out.println(""); + out.println("

Servlet UploadServlet at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + /** ----------------- + * File Save Code + * -----------------*/ + boolean isMultipart = ServletFileUpload.isMultipartContent(request); + String content = ""; + Connection con = null; + CallableStatement proc = null; + + + + if (isMultipart) { + FileItemFactory factory = new DiskFileItemFactory(); + ServletFileUpload upload = new ServletFileUpload(factory); + List items = null; + try { + // items = upload.parseRequest(request); + } catch (FileUploadException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + Iterator iter = items.iterator(); + try { + con = DbHandler.getDBConnection(); + + while (iter.hasNext()) { + FileItem item = (FileItem) iter.next(); + if (!item.isFormField()) { + BufferedReader bReader = new BufferedReader(new InputStreamReader(item.getInputStream())); + while (true) { + // content = bReader.readLine(); + if (null == content) { + bReader.close(); + break; + } + System.out.println("Writing line..." + content); + + try { + proc = con.prepareCall("{ call post_filetodb(?) }"); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.setString(1, content); + + proc.execute(); + + } + } + } + } catch (SQLException ex) { + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + System.out.println("Error occurred during connection close."); + } + } + } + + + (request.getRequestDispatcher("/pacsFileUpload.jsp")).forward(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/UserAmendmentServlet.java b/IPKS_Updated/src/src/java/Controller/UserAmendmentServlet.java new file mode 100644 index 0000000..7ce650f --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/UserAmendmentServlet.java @@ -0,0 +1,98 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import Dao.UserAmendmentDao; +import DataEntryBean.ChequeDetailsBean; +import java.io.IOException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +public class UserAmendmentServlet extends HttpServlet{ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = (String)session.getAttribute("user"); + UserAmendmentDao aiDao = new UserAmendmentDao(); + String result = null; + String staticIP =null; + + // try{ + + // String userName = (String) request.getParameter("userName"); + // String userRole = (String) request.getParameter("roleId"); + // String userId = (String) request.getParameter("userId"); + // String opType = (String) request.getParameter("opType"); + // String ipFlag = (String) request.getParameter("ipFlag"); + staticIP = (String) request.getParameter("staticIP"); + if ("Y".equals(ipFlag) && (staticIP.contains("A") || staticIP.contains("N"))) + { + System.out.println("Please enter valid Static IP."); + request.setAttribute("message1", "Please enter valid Static IP."); + (request.getRequestDispatcher("/Deposit/UserAmendment.jsp")).forward(request, response); + } else { + + try{ + if ("N".equals(ipFlag)) + { + staticIP = null; + } else { + // staticIP = (String) request.getParameter("staticIP"); + } + + result = aiDao.UserAmendmentServletProc(pacsId, userName, userRole, userId, opType, tellerId, ipFlag, staticIP); + + request.setAttribute("message1", result); + request.getRequestDispatcher("/Deposit/UserAmendment.jsp").forward(request, response); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + request.setAttribute("message1", "Error occured. Please try again"); + request.getRequestDispatcher("/Deposit/UserAmendment.jsp").forward(request, response); + + } finally { + System.out.println("Processing done."); + } + } + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + @Override + public String getServletInfo() { + return "Short description"; + }//
+} diff --git a/IPKS_Updated/src/src/java/Controller/UserCreationServlet.java b/IPKS_Updated/src/src/java/Controller/UserCreationServlet.java new file mode 100644 index 0000000..115a1fc --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/UserCreationServlet.java @@ -0,0 +1,82 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import Dao.UserCreationDao; +import DataEntryBean.ChequeDetailsBean; +import java.io.IOException; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +public class UserCreationServlet extends HttpServlet{ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = (String)session.getAttribute("user"); + UserCreationDao aiDao = new UserCreationDao(); + String result = null; + + + try{ + + // String userName = (String) request.getParameter("userName"); + // String userRole = (String) request.getParameter("userRole"); + // String limit = (String) request.getParameter("limit"); + // String ipFlag = (String) request.getParameter("ipFlag"); + // String staticIP = (String) request.getParameter("staticIP"); + result = aiDao.UserCreationServletProc(pacsId, userName, userRole, limit, tellerId, ipFlag, staticIP); + + request.setAttribute("message1", result); + request.getRequestDispatcher("/Deposit/UserCreation.jsp").forward(request, response); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + request.setAttribute("message1", "Error occured. Please try again"); + request.getRequestDispatcher("/Deposit/UserCreation.jsp").forward(request, response); + + } finally { + System.out.println("Processing done."); + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + @Override + public String getServletInfo() { + return "Short description"; + }//
+} diff --git a/IPKS_Updated/src/src/java/Controller/UserLoginManagementServlet.java b/IPKS_Updated/src/src/java/Controller/UserLoginManagementServlet.java new file mode 100644 index 0000000..892a885 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/UserLoginManagementServlet.java @@ -0,0 +1,102 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import Dao.LoginDao; +import Dao.UsertimeManagementDao; +import Dao.WelcomeDao; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.List; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ + +//@WebServlet("/UserLoginManagementServlet") +public class UserLoginManagementServlet extends HttpServlet { + + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String userId = (String) session.getAttribute("user"); + String action = request.getParameter("temp"); + String result = null; + UsertimeManagementDao umDao = new UsertimeManagementDao(); + //"{\"pQue\": \"30\"}"; + try { + if (action.equalsIgnoreCase("seacrh")) { + response.setContentType("application/json"); + PrintWriter out = response.getWriter(); + String jsonStr = umDao.gettellerDetails(userId, pacsId); + out.print(jsonStr); + out.flush(); + } else if (action.equalsIgnoreCase("submit")) { + // String targetTeller = request.getParameter("telerId"); + result = umDao.updateLoginTimings(request, targetTeller, pacsId); + if(result == null)result="Processing unsuccesfull.Please try again."; + request.setAttribute("message", result); + request.getRequestDispatcher("/userLoginManagement.jsp").forward(request, response); + } else if (action.equalsIgnoreCase("info")) { + response.setContentType("application/json"); + PrintWriter out2 = response.getWriter(); + // String targetTeller = request.getParameter("teller"); + String jsonStrTeller = umDao.gettellerLoginDetails(targetTeller, pacsId); + out2.print(jsonStrTeller); + out2.flush(); + } + + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + if (action.equalsIgnoreCase("submit")) + { + request.setAttribute("message", "Error occured during the process"); + request.getRequestDispatcher("/userLoginManagement.jsp").forward(request, response); + } + + } finally { + System.out.println("Processing done."); + } + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }//
+} diff --git a/IPKS_Updated/src/src/java/Controller/UserMaintenanceServlet.java b/IPKS_Updated/src/src/java/Controller/UserMaintenanceServlet.java new file mode 100644 index 0000000..ca3e250 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/UserMaintenanceServlet.java @@ -0,0 +1,325 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.UserMaintainanceBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author SUBHAM + */ +public class UserMaintenanceServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + Connection con = null; + CallableStatement proc = null; + String message = ""; + + // String ServletName = request.getParameter("handle_id"); + + UserMaintainanceBean oUserMaintainanceBean = new UserMaintainanceBean(); + + if ("Create".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oUserMaintainanceBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call user_maintenance.Upsert_user_details(?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(UserMaintenanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oUserMaintainanceBean.getTellerId()); + proc.setString(2, oUserMaintainanceBean.getTellerName()); + proc.setString(3, oUserMaintainanceBean.getPacsId()); + proc.setString(4, oUserMaintainanceBean.getUserType()); + proc.setString(5, oUserMaintainanceBean.getUserStatus()); + proc.setString(6, oUserMaintainanceBean.getMobileNumber()); + proc.setString(7, ServletName); + proc.registerOutParameter(8, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(8); + + } catch (SQLException ex) { + // Logger.getLogger(UserMaintenanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UserMaintenanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/userMaintenance.jsp").forward(request, response); + + } + + } else if ("Search".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oUserMaintainanceBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(UserMaintenanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(UserMaintenanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(UserMaintenanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + + // ResultSet rs = statement.executeQuery("select t.login_id,t.login_name,t.pacs_id,m.pacs_id||':'||m.pacs_name pacsDetails,t.user_status,r.role_code,t.mobile_no,m.dccb_code from login_details t,sys_roles r,pacs_master m where t.pacs_id=m.pacs_id and r.id=t.user_role_id and t.login_id= '" + oUserMaintainanceBean.getTellerIdSearch() + "'"); + + while (rs.next()) { + + oUserMaintainanceBean.setTellerName(rs.getString("login_name")); + oUserMaintainanceBean.setPacsId(rs.getString("pacs_id")); + oUserMaintainanceBean.setPacsDetails(rs.getString("pacsDetails")); + oUserMaintainanceBean.setUserStatus(rs.getString("user_status")); + oUserMaintainanceBean.setUserType(rs.getString("role_code")); + oUserMaintainanceBean.setMobileNumber(rs.getString("mobile_no")); + oUserMaintainanceBean.setDccbCode(rs.getString("dccb_code")); + oUserMaintainanceBean.setTellerId(rs.getString("login_id")); + oUserMaintainanceBean.setCheckOption("update"); + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + } + + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(UserMaintenanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + if (SeachFound == 0) { + message = "Teller ID not exists in the system"; + request.setAttribute("message", message); + } + request.setAttribute("oUserMaintainanceBeanObj", oUserMaintainanceBean); + + request.getRequestDispatcher("/userMaintenance.jsp").forward(request, response); + + } else if ("Update".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oUserMaintainanceBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call user_maintenance.Upsert_user_details(?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(UserMaintenanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oUserMaintainanceBean.getTellerIdAmend()); + proc.setString(2, oUserMaintainanceBean.getTellerNameAmend()); + // proc.setString(3, request.getParameter("pacsIdUpdated")); + proc.setString(4, oUserMaintainanceBean.getUserTypeAmend()); + proc.setString(5, oUserMaintainanceBean.getUserStatusAmend()); + proc.setString(6, oUserMaintainanceBean.getMobileNumberAmend()); + proc.setString(7, ServletName); + proc.registerOutParameter(8, java.sql.Types.VARCHAR); + + proc.execute(); + + //message = proc.getString(8); + + } catch (SQLException ex) { + // Logger.getLogger(UserMaintenanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UserMaintenanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/userMaintenance.jsp").forward(request, response); + + } + + } else if ("ResetPassword".equalsIgnoreCase(ServletName)) { + try { + // BeanUtils.populate(oUserMaintainanceBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call user_maintenance.password_reset(?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(UserMaintenanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oUserMaintainanceBean.getTellerIdReset()); + proc.registerOutParameter(2, java.sql.Types.VARCHAR); + proc.execute(); + + // message = proc.getString(2); + + } catch (SQLException ex) { + // Logger.getLogger(UserMaintenanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UserMaintenanceServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/userMaintenance.jsp").forward(request, response); + + } + } + + } + +// + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/VendorMasterServlet.java b/IPKS_Updated/src/src/java/Controller/VendorMasterServlet.java new file mode 100644 index 0000000..ef0f73d --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/VendorMasterServlet.java @@ -0,0 +1,644 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.VendorMasterDtlBean; +import DataEntryBean.VendorMasterHeaderBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.StringTokenizer; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 986137 + */ +public class VendorMasterServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + Connection con = null; + CallableStatement proc = null; + String message = ""; + String ScreenStatus = ""; + String hdrID = ""; + HttpSession session = request.getSession(false); + + // String ServletName = request.getParameter("handle_id"); + String pacsId = (String) session.getAttribute("pacsId"); + + VendorMasterHeaderBean oVendorMasterHeaderBean = new VendorMasterHeaderBean(); + VendorMasterDtlBean oVendorMasterDtlBean = new VendorMasterDtlBean(); + oVendorMasterDtlBean = null; + ArrayList alVendorMasterDtlBean = new ArrayList(); + + + + //For Amend Div + + ArrayList alVendorMasterDtlBeanNew = new ArrayList(); + ArrayList alVendorMasterDtlBeanDeleted = new ArrayList(); + ArrayList alVendorMasterDtlBeanUpdated = new ArrayList(); + + if (ServletName.equalsIgnoreCase("Create")) { + + + try { + // BeanUtils.populate(oVendorMasterHeaderBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call PARAMETER.Upsert_vendor_hdr(?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oVendorMasterHeaderBean.getVendorID()); + proc.setString(2, oVendorMasterHeaderBean.getVendorname()); + proc.setString(3, oVendorMasterHeaderBean.getAddress()); + proc.setString(4, oVendorMasterHeaderBean.getPhone()); + proc.setString(5, oVendorMasterHeaderBean.getContactperson()); + proc.setString(6, ServletName); + proc.setString(7, pacsId); + proc.registerOutParameter(8, java.sql.Types.VARCHAR); + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + proc.setString(10, oVendorMasterHeaderBean.getGstin()); + + proc.execute(); + + // message = proc.getString(8); + hdrID = proc.getString(9); + + + + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + } + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + // String productId = request.getParameter("product_id" + i); + + + if (productId != null) { + oVendorMasterDtlBean = new VendorMasterDtlBean(); + oVendorMasterDtlBean.setProduct_id(productId); + alVendorMasterDtlBean.add(oVendorMasterDtlBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alVendorMasterDtlBean.size() > 0) && (!message.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_vendor_dtl(?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + for (int j = 0; j < alVendorMasterDtlBean.size(); j++) { + + oVendorMasterDtlBean = alVendorMasterDtlBean.get(j); + + + proc.setString(1, hdrID); + proc.setString(2, oVendorMasterDtlBean.getDetailID()); + proc.setString(3, oVendorMasterDtlBean.getProduct_id()); + proc.setString(4, ServletName); + proc.addBatch(); + + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + try { + // con.rollback(); + } catch (Exception ex1) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/Trading_JSP/VendorEnrollmentEnquiry.jsp").forward(request, response); + + } else if ("Search".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oVendorMasterHeaderBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + + // ResultSet rs = statement.executeQuery("select t.id,t.name,t.address,t.phn_no,t.contact_prsn,gst_no from trading_vendor_mst t where id= '" + oVendorMasterHeaderBean.getVendorID() + "' "); + + while (rs.next()) { + + oVendorMasterHeaderBean.setVendorID(rs.getString("id")); + oVendorMasterHeaderBean.setVendorname(rs.getString("name")); + oVendorMasterHeaderBean.setAddress(rs.getString("address")); + oVendorMasterHeaderBean.setPhone(rs.getString("phn_no")); + oVendorMasterHeaderBean.setContactperson(rs.getString("contact_prsn")); + oVendorMasterHeaderBean.setGstin(rs.getString("gst_no")); + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + + } + + statement.close(); + + + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + if (SeachFound == 0) { + message = "Vendor not exists in the system"; + request.setAttribute("message", message); + } + + + //For Details Part Populate + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + + // ResultSet rs = statement.executeQuery("select d.ID,m.comm_type, m.TYPE_DESC, m.comm_subtype, m.SUBTYPE_DESC,d.prod_id " + + " from trading_product_mst m,trading_vendor_dtl d" + + " where m.id=d.prod_id" + + " and d.vnd_mst_id= '" + oVendorMasterHeaderBean.getVendorID() + "' "); + + while (rs.next()) { + + oVendorMasterDtlBean = new VendorMasterDtlBean(); + oVendorMasterDtlBean.setDetailID(rs.getString("id")); + oVendorMasterDtlBean.setCommoditytype(rs.getString("comm_type")); + oVendorMasterDtlBean.setTypeDesc(rs.getString("TYPE_DESC")); + oVendorMasterDtlBean.setCommoditysubtype(rs.getString("comm_subtype")); + oVendorMasterDtlBean.setSubtypeDesc(rs.getString("SUBTYPE_DESC")); + oVendorMasterDtlBean.setProduct_id(rs.getString("prod_id")); + + alVendorMasterDtlBean.add(oVendorMasterDtlBean); + + } + + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + + request.setAttribute("VendorMasterHeaderBeanObj", oVendorMasterHeaderBean); + request.setAttribute("alVendorMasterDtlBean", alVendorMasterDtlBean); + request.getRequestDispatcher("/Trading_JSP/VendorEnrollmentEnquiry.jsp").forward(request, response); + + } else if (ServletName.equalsIgnoreCase("Update")) { + + + + String productId = null; + String rowStatus = null; + String detailID = null; + String deletedRows = null; + + + try { + // BeanUtils.populate(oVendorMasterHeaderBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call PARAMETER.Upsert_vendor_hdr(?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oVendorMasterHeaderBean.getVendorID()); + proc.setString(2, oVendorMasterHeaderBean.getVendornameAmend()); + proc.setString(3, oVendorMasterHeaderBean.getAddressAmend()); + proc.setString(4, oVendorMasterHeaderBean.getPhoneAmend()); + proc.setString(5, oVendorMasterHeaderBean.getContactpersonAmend()); + proc.setString(6, ServletName); + proc.setString(7, pacsId); + proc.registerOutParameter(8, java.sql.Types.VARCHAR); + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + proc.setString(10, oVendorMasterHeaderBean.getGstinAmend()); + + proc.execute(); + + // message = proc.getString(8); + hdrID = proc.getString(9); + + + + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + } + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + // productId = request.getParameter("product_idAmend" + i); + rowStatus = request.getParameter("rowStatus" + i); + // detailID = request.getParameter("detailIDAmend" + i); + + + if (productId != null && rowStatus != null) { + oVendorMasterDtlBean = new VendorMasterDtlBean(); + oVendorMasterDtlBean.setProduct_id(productId); + oVendorMasterDtlBean.setDetailID(detailID); + + if (rowStatus.equals("N")) { + alVendorMasterDtlBeanNew.add(oVendorMasterDtlBean); + } else { + alVendorMasterDtlBeanUpdated.add(oVendorMasterDtlBean); + } + + + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + + + + //For Deletion + + // deletedRows = request.getParameter("deletedRows"); + + if ((!deletedRows.equalsIgnoreCase(null)) || (!deletedRows.equalsIgnoreCase(""))) { + StringTokenizer tokenizer = new StringTokenizer(deletedRows, ","); + + while (tokenizer.hasMoreTokens()) { + + oVendorMasterDtlBean = new VendorMasterDtlBean(); + oVendorMasterDtlBean.setDetailID(tokenizer.nextToken()); + + alVendorMasterDtlBeanDeleted.add(oVendorMasterDtlBean); + + } + } + + + + + if ((alVendorMasterDtlBeanUpdated.size() > 0) && (!message.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_vendor_dtl(?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + for (int j = 0; j < alVendorMasterDtlBeanUpdated.size(); j++) { + + oVendorMasterDtlBean = new VendorMasterDtlBean(); + + oVendorMasterDtlBean = alVendorMasterDtlBeanUpdated.get(j); + + + proc.setString(1, hdrID); + proc.setString(2, oVendorMasterDtlBean.getDetailID()); + proc.setString(3, oVendorMasterDtlBean.getProduct_id()); + proc.setString(4, ServletName); + proc.addBatch(); + + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + try { + // con.rollback(); + } catch (Exception ex1) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + + //for deletion + + if ((alVendorMasterDtlBeanDeleted.size() > 0) && (!message.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_vendor_dtl(?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + for (int j = 0; j < alVendorMasterDtlBeanDeleted.size(); j++) { + + oVendorMasterDtlBean = new VendorMasterDtlBean(); + + oVendorMasterDtlBean = alVendorMasterDtlBeanDeleted.get(j); + + + proc.setString(1, hdrID); + proc.setString(2, oVendorMasterDtlBean.getDetailID()); + proc.setString(3, null); + proc.setString(4, "Delete"); + proc.addBatch(); + + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + try { + // con.rollback(); + } catch (Exception ex1) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + + + //For New Insertion + + + if ((alVendorMasterDtlBeanNew.size() > 0) && (!message.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_vendor_dtl(?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + for (int j = 0; j < alVendorMasterDtlBeanNew.size(); j++) { + + oVendorMasterDtlBean = new VendorMasterDtlBean(); + oVendorMasterDtlBean = alVendorMasterDtlBeanNew.get(j); + + + proc.setString(1, hdrID); + proc.setString(2, oVendorMasterDtlBean.getDetailID()); + proc.setString(3, oVendorMasterDtlBean.getProduct_id()); + proc.setString(4, "Create"); + proc.addBatch(); + + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + try { + // con.rollback(); + } catch (Exception ex1) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + + + request.setAttribute("message", message); + request.getRequestDispatcher("/Trading_JSP/VendorEnrollmentEnquiry.jsp").forward(request, response); + + } + + + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/WelcomeServlet.java b/IPKS_Updated/src/src/java/Controller/WelcomeServlet.java new file mode 100644 index 0000000..751985a --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/WelcomeServlet.java @@ -0,0 +1,86 @@ + +package Controller; + +import Dao.LoginDao; +import Dao.WelcomeDao; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.List; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +//@WebServlet("/WelcomeServlet") + +public class WelcomeServlet extends HttpServlet { + + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String userId = request.getParameter("userName"); + WelcomeDao wDao = new WelcomeDao(); + String action = request.getParameter("temp"); + + //"{\"pQue\": \"30\"}"; + try { + if (action.equalsIgnoreCase("search")) { + response.setContentType("application/json"); + PrintWriter out = response.getWriter(); + String jsonStr = wDao.getQueDetails(userId ,pacsId); + out.print(jsonStr); + out.flush(); + } + else if (action.equalsIgnoreCase("allTran")) + { + response.setContentType("application/json"); + PrintWriter out = response.getWriter(); + String jsonStr = wDao.getAllTranDetails(userId ,pacsId); + out.print(jsonStr); + out.flush(); + } + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + + } finally { + System.out.println("Processing done."); + } + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }//
+} diff --git a/IPKS_Updated/src/src/java/Controller/cbsExtractPostingServlet.java b/IPKS_Updated/src/src/java/Controller/cbsExtractPostingServlet.java new file mode 100644 index 0000000..9318476 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/cbsExtractPostingServlet.java @@ -0,0 +1,458 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.CBSDataPostingBean; +import DataEntryBean.EnquiryBean; +import LoginDb.DbHandler; +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import oracle.jdbc.OracleTypes; + +/** + * + * @author Tcs Helpdesk10 + */ +public class cbsExtractPostingServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String find_Status = ""; + String filePath = getServletContext().getInitParameter("cbs-extract"); + + CBSDataPostingBean oCBSDataPostingBean = new CBSDataPostingBean(); + ArrayList alCBSDataPostingBean = new ArrayList(); + + CallableStatement proc = null; + String message = ""; + Connection connection = null; + ResultSet rs = null; + String handle_id = ""; + String screen_name = ""; + + // handle_id = request.getParameter("handle_id"); + // screen_name = request.getParameter("screen_name"); + + //For Bulk CBS Transaction Posting + if (screen_name.equalsIgnoreCase("CBSDataPosting.jsp")) { + + if (handle_id.equalsIgnoreCase("cbsUpload")) { + + //For Listing the file name + find_Status = getList(filePath, handle_id); + + if (find_Status.equalsIgnoreCase("Success")) { + //For Loading the file content in stagging table + + find_Status = FIleUploadToStagging(handle_id); + + if (find_Status.equalsIgnoreCase("Success")) { + + message = "CBS File has been uploaded successfully"; + request.setAttribute("message", message); + + } + } + + request.getRequestDispatcher("/CBSDataPosting.jsp").forward(request, response); + + } else if (handle_id.equalsIgnoreCase("viewStatus")) { + + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ ?=call file_enquiry(?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.registerOutParameter(1, OracleTypes.CURSOR); + proc.setString(2, screen_name); + + proc.executeUpdate(); + + // rs = (ResultSet) proc.getObject(1); + + while (rs.next()) { + + oCBSDataPostingBean = new CBSDataPostingBean(); + + oCBSDataPostingBean.setFileName(rs.getString(1)); + oCBSDataPostingBean.setDccbName(rs.getString(2)); + oCBSDataPostingBean.setUploadStatus(rs.getString(3)); + + alCBSDataPostingBean.add(oCBSDataPostingBean); + + request.setAttribute("displayFlag", "Y"); + + } + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + } + + request.setAttribute("alCBSDataPostingBean", alCBSDataPostingBean); + request.getRequestDispatcher("/CBSDataPosting.jsp").forward(request, response); + + } else if (handle_id.equalsIgnoreCase("cbsPost")) { + + String errorlog = ""; + + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call EODSOD.post_txn_bulk(?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.registerOutParameter(1, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + + //errorlog = proc.getString(1); + + message = errorlog; + request.setAttribute("message", message); + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + (request.getRequestDispatcher("/CBSDataPosting.jsp")).forward(request, response); + + } + + + + //For Bulk KYC Details Posting + } else if (screen_name.equalsIgnoreCase("CBSKycPosting.jsp")) { + + if (handle_id.equalsIgnoreCase("kycUpload")) { + + //For Listing the file name + find_Status = getList(filePath, handle_id); + + if (find_Status.equalsIgnoreCase("Success")) { + //For Loading the file content in stagging table + + find_Status = FIleUploadToStagging(handle_id); + + if (find_Status.equalsIgnoreCase("Success")) { + + message = "Customer Information File has been uploaded successfully"; + request.setAttribute("message", message); + + } + } + + (request.getRequestDispatcher("/CBSKycPosting.jsp")).forward(request, response); + + } else if (handle_id.equalsIgnoreCase("viewStatus")) { + + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ ?=call file_enquiry(?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.registerOutParameter(1, OracleTypes.CURSOR); + proc.setString(2, screen_name); + + proc.executeUpdate(); + + //rs = (ResultSet) proc.getObject(1); + + while (rs.next()) { + + oCBSDataPostingBean = new CBSDataPostingBean(); + + oCBSDataPostingBean.setFileName(rs.getString(1)); + oCBSDataPostingBean.setDccbName(rs.getString(2)); + oCBSDataPostingBean.setUploadStatus(rs.getString(3)); + + alCBSDataPostingBean.add(oCBSDataPostingBean); + + request.setAttribute("displayFlag", "Y"); + + } + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connetion close."); + } + + } + + request.setAttribute("alCBSDataPostingBean", alCBSDataPostingBean); + request.getRequestDispatcher("/CBSKycPosting.jsp").forward(request, response); + + } else if (handle_id.equalsIgnoreCase("kycPost")) { + + String errorlog = ""; + + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call EODSOD.post_kyc_bulk(?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.registerOutParameter(1, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + + // errorlog = proc.getString(1); + + message = errorlog; + request.setAttribute("message", message); + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + } + (request.getRequestDispatcher("/CBSKycPosting.jsp")).forward(request, response); + + } + + } + + public static String getList(String directory, String handle_id) { + File path = new File(directory); + String[] list = path.list(); + String element = ""; + String UploadStatus = "PENDING"; + + CallableStatement proc = null; + Connection connection = null; + String find_Status = "Failure"; + + for (int i = 0; i < list.length; i++) { + if (!list[i].equalsIgnoreCase("Archived")) { + + if (handle_id.equalsIgnoreCase("kycUpload")) { + + if ((list[i].substring(0, list[i].indexOf("_"))).toUpperCase().equalsIgnoreCase("depd8007")) { + + element = list[i]; + } + } else if (handle_id.equalsIgnoreCase("cbsUpload")) { + + if ((list[i].substring(0, list[i].indexOf("_"))).toUpperCase().equalsIgnoreCase("depd0721")) { + + element = list[i]; + } + } + + } + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call csv_files_dccb_map(?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(cbsExtractPostingServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, element); + proc.registerOutParameter(2, java.sql.Types.VARCHAR); + + proc.executeUpdate(); + + find_Status = proc.getString(2); + + } catch (SQLException ex) { + // Logger.getLogger(cbsExtractPostingServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(cbsExtractPostingServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + } + + try { + TrickleFeedFileMover.CBSFileMover(element); + } catch (IOException ex) { + // Logger.getLogger(cbsExtractPostingServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + } + return find_Status; + } + + public static String FIleUploadToStagging(String handle_id) { + + String errorlog = ""; + Connection connection = null; + CallableStatement proc = null; + + //For Posting the File in Stagging table + try { + connection = DbHandler.getDBConnection(); + try { + proc = connection.prepareCall("{ call load_csv(?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(cbsExtractPostingServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.registerOutParameter(1, java.sql.Types.VARCHAR); + proc.setString(2, handle_id); + + proc.executeUpdate(); + + errorlog = proc.getString(1); + + } catch (SQLException ex) { + // Logger.getLogger(cbsExtractPostingServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(cbsExtractPostingServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + //Ends Here + + return errorlog; + + } + +// + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/config.properties b/IPKS_Updated/src/src/java/Controller/config.properties new file mode 100644 index 0000000..f68287c --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/config.properties @@ -0,0 +1,13 @@ +WIDTH=540 +HEIGHT=525 +MARGIN=5 +HEADER=4 +RECORDSPERPAGE=32 +DATE_WIDTH=55 +NARA_WIDTH=220 +CHEQUE_WIDTH=60 +WITHDRAW_WIDTH=80 +DEPOSIT_WIDTH=60 +NO_OF_LINES=17 +GAP=3 +PROD_WIDTH=75 \ No newline at end of file diff --git a/IPKS_Updated/src/src/java/Controller/customerEnquiryServlet.java b/IPKS_Updated/src/src/java/Controller/customerEnquiryServlet.java new file mode 100644 index 0000000..233c208 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/customerEnquiryServlet.java @@ -0,0 +1,239 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.customerEnquiryBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author Kaushik + */ +public class customerEnquiryServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + // String cifNumber = request.getParameter("cifNumber"); + String flag = "N"; + Connection connection = null; + ResultSet rs = null; + ResultSet rs1 = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + String message = ""; + Connection con = null; + CallableStatement proc = null; + + + String action=request.getParameter("handle_id"); + + customerEnquiryBean ocustomerEnquiryBean = new customerEnquiryBean(); + + if (action.equalsIgnoreCase("SearchCIF")) { + + + try { + // BeanUtils.populate(ocustomerEnquiryBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(customerEnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(customerEnquiryServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + statement = connection.createStatement(); +// rs = statement.executeQuery("select cif_no," +// + "customer_type," +// + "linked_sb_accno," +// + "title," +// + "first_name," +// + "middle_name," +// + "last_name," +// + "guardian_name," +// + "address_1," +// + "address_2," +// + "address_3," +// + "district," +// + "city," +// + "state," +// + "birth_date," +// + "gender," +// + "mobile_no," +// + "id_type," +// + "id_no," +// + "id_issue_date,share_amount_due,share_amount_paid,block," +// + "id_issued_at,PHOTO_UPLOADED,sig_photo,religion,caste from kyc_details where cif_no='" + cifNumber + "'"); + + // rs = statement.executeQuery( "select s.cif_no," + +"customer_type," + +"linked_sb_accno," + +"title," + +"first_name," + +"middle_name," + +"last_name," + +"guardian_name," + +"address_1," + +"address_2," + +"address_3," + +"district," + +"city," + +"state," + +"birth_date," + +"gender," + +"mobile_no," + +"id_type," + +"id_no," + +"email_id," + +"id_issue_date,share_amount_due,share_amount_paid,block," + +"id_issued_at,PHOTO_UPLOADED,sig_photo,religion,caste ," + +"nvl((select i.insurance_details from kyc_ins i where i.cif_no=s.cif_no),'NA') as ins_no," + +"nvl((select to_char(i.insurance_issu_date,'dd-Mon-yyyy') from kyc_ins i where i.cif_no=s.cif_no),'NA') as issu_dt," + +"nvl((select i.insurance_company from kyc_ins i where i.cif_no=s.cif_no),'NA') as ins_cmpny," + +"nvl((select i.status from kyc_ins i where i.cif_no=s.cif_no),'NA') as status " + +"from kyc_details s where s.cif_no like '" + cifNumber + "'"); + + while (rs.next()) { + + ocustomerEnquiryBean.setCif(rs.getString("cif_no")); + ocustomerEnquiryBean.setcType(rs.getString("customer_type")); + ocustomerEnquiryBean.setLinkedAccount(rs.getString("linked_sb_accno")); + ocustomerEnquiryBean.setTittle(rs.getString("title")); + ocustomerEnquiryBean.setfName(rs.getString("first_name")); + ocustomerEnquiryBean.setmName(rs.getString("middle_name")); + ocustomerEnquiryBean.setlName(rs.getString("last_name")); + ocustomerEnquiryBean.setgName(rs.getString("guardian_name")); + ocustomerEnquiryBean.setAdd1(rs.getString("address_1")); + ocustomerEnquiryBean.setAdd2(rs.getString("address_2")); + ocustomerEnquiryBean.setAdd3(rs.getString("address_3")); + ocustomerEnquiryBean.setDistname(rs.getString("district")); + ocustomerEnquiryBean.setCityname(rs.getString("city")); + ocustomerEnquiryBean.setStatename(rs.getString("state")); + ocustomerEnquiryBean.setDob(rs.getString("birth_date")); + ocustomerEnquiryBean.setGender(rs.getString("gender")); + ocustomerEnquiryBean.setmNumber(rs.getString("mobile_no")); + ocustomerEnquiryBean.setIdType(rs.getString("id_type")); + ocustomerEnquiryBean.setIdNumber(rs.getString("id_no")); + ocustomerEnquiryBean.setIdIssueDate(rs.getString("id_issue_date")); + ocustomerEnquiryBean.setIdIssueAt(rs.getString("id_issued_at")); + ocustomerEnquiryBean.setShareAmountDue(rs.getString("share_amount_due")); + ocustomerEnquiryBean.setShareAmountPaid(rs.getString("share_amount_paid")); + ocustomerEnquiryBean.setBlock(rs.getString("block")); + ocustomerEnquiryBean.setFile(rs.getString("photo_uploaded")); + ocustomerEnquiryBean.setSigUpld(rs.getString("sig_photo")); + ocustomerEnquiryBean.setReligion(rs.getString("religion")); + ocustomerEnquiryBean.setCaste(rs.getString("caste")); + ocustomerEnquiryBean.setInsNo(rs.getString("ins_no")); + ocustomerEnquiryBean.setInsCom(rs.getString("ins_cmpny")); + ocustomerEnquiryBean.setInsIssDate(rs.getString("issu_dt")); + ocustomerEnquiryBean.setInsStatus(rs.getString("status")); + ocustomerEnquiryBean.setEmailId(rs.getString("email_id")); + + + SeachFound = 1; + + request.setAttribute("flag", "Y"); + + } + // statement.close(); + // connection.close(); + + if (SeachFound == 0) { + message = "CIF Details not exists in the system"; + request.setAttribute("message", message); + } + + request.setAttribute("ocustomerEnquiryBeanObj", ocustomerEnquiryBean); + + request.getRequestDispatcher("/customerEnquiry.jsp").forward(request, response); + + } catch (Exception e) { + + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + } + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/interestComputationServlet.java b/IPKS_Updated/src/src/java/Controller/interestComputationServlet.java new file mode 100644 index 0000000..8aa16d4 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/interestComputationServlet.java @@ -0,0 +1,134 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + + +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author Tcs Helpdesk10 + */ +public class interestComputationServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + Connection con = null; + CallableStatement proc = null; + String message = ""; + + String ServletName = request.getParameter("handle_id"); + + + if ("InterestPosting".equalsIgnoreCase(ServletName)) { + + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call EODSOD.compute_kcc_intt(?) }"); + } catch (SQLException ex) { + // Logger.getLogger(PacsManagementServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.registerOutParameter(1, java.sql.Types.VARCHAR); + + proc.execute(); + + //message = proc.getString(1); + + } catch (SQLException ex) { + // Logger.getLogger(interestComputationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(interestComputationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/EODinttComputation.jsp").forward(request, response); + + } + + } + + + + + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/IPKS_Updated/src/src/java/Controller/kycCreationServlet.java b/IPKS_Updated/src/src/java/Controller/kycCreationServlet.java new file mode 100644 index 0000000..f2e8043 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/kycCreationServlet.java @@ -0,0 +1,371 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.kycCreationBean; +import LoginDb.DbHandler; +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.Iterator; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.fileupload.servlet.ServletFileUpload; + +/** + * + * @author TCS + */ +public class kycCreationServlet extends HttpServlet { + + private boolean isMultipart; + private int maxFileSize = 5000 * 1024; + private int maxMemSize = 4 * 1024; + private String uploadPathMain; + private String uploadPath; + private File file; + private int fileUpload = 0; + private File renameFile; + private boolean t; + private boolean s; + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here. You may use following sample code. */ + out.println(""); + out.println(""); + out.println(""); + out.println("Servlet kycCreationServlet"); + out.println(""); + out.println(""); + out.println("

Servlet kycCreationServlet at " + request.getContextPath() + "

"); + out.println(""); + out.println(""); + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + Statement statement = null; + ResultSet rs = null; + String message = ""; + String PhotouploadedFlag = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + String handle_id = request.getParameter("handle_id"); + String lastPhotoName = (String) session.getAttribute("lastPhotoName"); + String sigPhotoName = (String) session.getAttribute("sigPhotoName"); + //System.out.println(lastPhotoName); + + kycCreationBean okycCreationBean = new kycCreationBean(); + try { + // BeanUtils.populate(okycCreationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(kycCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + ServletContext servletContext = getServletContext(); + // uploadPathMain = servletContext.getRealPath(File.separator); + uploadPath = uploadPathMain + "/" + "UploadedFiles"; + File destinationDir = new File(uploadPath); + + if (!destinationDir.exists()) { + destinationDir.mkdir(); + } + + if (!lastPhotoName.isEmpty()) { + File f = null; + File f1 = null; + try { + // create new File objects + f = new File(uploadPath + File.separator + lastPhotoName); + f1 = new File(uploadPath + File.separator + okycCreationBean.getCif() + ".jpg"); + + // rename file + t = f.renameTo(f1); + } catch (Exception e) { + // if any error occurs + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } + } + + //For Signature + if (!sigPhotoName.isEmpty()) { + File f = null; + File f1 = null; + try { + // create new File objects + f = new File(uploadPath + File.separator + sigPhotoName); + f1 = new File(uploadPath + File.separator + "sig-" + okycCreationBean.getCif() + ".jpg"); + + // rename file + s = f.renameTo(f1); + } catch (Exception e) { + // if any error occurs + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } + } + + /* + try { + + + //For Photo Upload Starts Here + + // Check that we have a file upload request + isMultipart = ServletFileUpload.isMultipartContent(request); + System.out.println("Check that we have a file upload request :" + isMultipart); + response.setContentType("text/html"); + if (!isMultipart) { + message = "Photo Not in proper Format"; + request.setAttribute("message", message); + request.getRequestDispatcher("/kycCreation.jsp").forward(request, response); + } + DiskFileItemFactory factory = new DiskFileItemFactory(); + // maximum size that will be stored in memory + factory.setSizeThreshold(maxMemSize); + // Create a new file upload handler + ServletFileUpload upload = new ServletFileUpload(factory); + // maximum file size to be uploaded. + upload.setSizeMax(maxFileSize); + // Parse the request to get file items. + List fileItems = upload.parseRequest(request); + Iterator itr = fileItems.iterator(); + + Iterator itr2 = fileItems.iterator(); + while (itr2.hasNext()) { + FileItem fi2 = (FileItem) itr2.next(); + + BeanUtils.setProperty(okycCreationBean, fi2.getFieldName(), fi2.getString()); + + } + con = DbHandler.getDBConnection(); + try { + statement = con.createStatement(); + rs = statement.executeQuery("select d.photo_uploaded from kyc_details d where d.cif_no = '" + okycCreationBean.getCif() + "'"); + while (rs.next()) { + PhotouploadedFlag = rs.getString(1); + } + + statement.close(); + con.close(); + } catch (Exception e) { + } + while (itr.hasNext()) { + FileItem fi = (FileItem) itr.next(); + + if (!fi.isFormField()) { + if (!fi.getFieldName().equalsIgnoreCase("")) { + // Get the uploaded file parameters + String fieldName = fi.getFieldName(); + String fileName = fi.getName(); + String contentType = fi.getContentType(); + boolean isInMemory = fi.isInMemory(); + long sizeInBytes = fi.getSize(); + //check if the uploaded file is an excel file + String fileExtention = fileName.substring(fileName.length() - 3, fileName.length()).toLowerCase(); + if (!fileExtention.equals("jpg")) { + //return to jsp with an error message + message = "Uploaded Photo is not in jpg Format"; + throw new Exception(); + } else { + + ServletContext servletContext = getServletContext(); + uploadPathMain = servletContext.getRealPath(File.separator); + uploadPath = uploadPathMain + "/" + "UploadedFiles"; + File destinationDir = new File(uploadPath); + + if (!destinationDir.exists()) { + destinationDir.mkdir(); + } + + // Write the file + if (fileName.lastIndexOf("\\") >= 0) { + file = new File(uploadPath + + fileName.substring(fileName.lastIndexOf("\\"))); + } else { + file = new File(uploadPath + File.separator + + fileName.substring(fileName.lastIndexOf("\\") + 1)); + } + + File checkfileExists = new File(uploadPath + File.separator + okycCreationBean.getCif() + ".jpg"); + //System.out.println("checking if same file exists or not " + checkfileExists.exists()); + + if (checkfileExists.exists() && PhotouploadedFlag.equalsIgnoreCase("Y")) { + message = "Photograph for this customer is already registered!"; + request.setAttribute("message", message); + request.getRequestDispatcher("/kycCreation.jsp").forward(request, response); + } else { + fi.write(file); + renameFile = new File(uploadPath + File.separator + okycCreationBean.getCif() + ".jpg"); + file.renameTo(renameFile); + fileUpload = 1; + } + + } + + } */ + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call operations.create_kyc_details(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(kycCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.setString(1, okycCreationBean.getCif()); + proc.setString(2, okycCreationBean.getcType()); + proc.setString(3, okycCreationBean.getLinkedAccount()); + proc.setString(4, okycCreationBean.getTittle()); + proc.setString(5, okycCreationBean.getfName()); + proc.setString(6, okycCreationBean.getmName()); + proc.setString(7, okycCreationBean.getlName()); + proc.setString(8, okycCreationBean.getgName()); + proc.setString(9, okycCreationBean.getAdd1()); + proc.setString(10, okycCreationBean.getAdd2()); + proc.setString(11, okycCreationBean.getAdd3()); + proc.setString(12, okycCreationBean.getDistname()); + proc.setString(13, okycCreationBean.getCityname()); + proc.setString(14, okycCreationBean.getStatename()); + proc.setString(15, okycCreationBean.getDob()); + proc.setString(16, okycCreationBean.getGender()); + proc.setString(17, okycCreationBean.getmNumber()); + proc.setString(18, okycCreationBean.getIdType()); + proc.setString(19, okycCreationBean.getIdNumber()); + proc.setString(20, okycCreationBean.getIdIssueDate()); + proc.setString(21, okycCreationBean.getIdIssueAt()); + proc.setString(22, "Create"); + proc.setString(23, pacsId); + proc.setString(24, okycCreationBean.getBlock()); + proc.setString(25, okycCreationBean.getEmailId()); + + + proc.registerOutParameter(25, java.sql.Types.VARCHAR); + if (!t) { + proc.setString(26, ""); + } else { + proc.setString(26, okycCreationBean.getCif() + ".jpg"); + } + //For Signature + if (!s) { + proc.setString(27, ""); + } else { + proc.setString(27, "sig-" + okycCreationBean.getCif() + ".jpg"); + } + + proc.setString(28, okycCreationBean.getReligion()); + proc.setString(29, okycCreationBean.getCaste()); + + proc.execute(); + + // message = proc.getString(25); + //generatedCIF = okycCreationBean.getCif(); + + } catch (SQLException ex) { + // Logger.getLogger(kycCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + //if (fileUpload == 1) { + // renameFile.delete(); + // } + + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(kycCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/kycCreation.jsp").forward(request, response); + } + + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/mocOperationsServlet.java b/IPKS_Updated/src/src/java/Controller/mocOperationsServlet.java new file mode 100644 index 0000000..3acc7a2 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/mocOperationsServlet.java @@ -0,0 +1,311 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; +import DataEntryBean.mocProcessingBean; +import java.sql.BatchUpdateException; + +/** + * + * @author 981898 + */ +public class mocOperationsServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet BatchTransactionServlet"); + out.println(""); + out.println(""); + out.println("

Servlet BatchTransactionServlet at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + String handle_id = request.getParameter("handle_id"); + int counter = Integer.parseInt(request.getParameter("rowCounter")); + String batchID = null; + Connection con = null; + Statement proc = null; + Connection connection = null; + CallableStatement stmt = null; + mocProcessingBean oMocProcessingBean; + ArrayList alMocProcessingBean = new ArrayList(); + + if ("create".equalsIgnoreCase(handle_id)) { + + + for (int i = 1; i <= counter; i++) { + try { + oMocProcessingBean = new mocProcessingBean(); + // oMocProcessingBean.setAccNo(request.getParameter("accNo" + i)); + // oMocProcessingBean.setTxnAmt(request.getParameter("txnAmt" + i)); + // oMocProcessingBean.setTxnInd(request.getParameter("txnInd" + i)); + // oMocProcessingBean.setSec_acc_no(request.getParameter("secAccNo"+i)); + // oMocProcessingBean.setNarration(request.getParameter("txnNarration" + i)); + + alMocProcessingBean.add(oMocProcessingBean); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + + } + + if (alMocProcessingBean.size() > 0) { + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + proc = con.createStatement(); + //ResultSet rs = proc.executeQuery("select MOC_TXN_DETAILS_SEQ.NEXTVAL from dual"); + while (rs.next()) { + batchID = rs.getString(1); + } + proc.close(); + for (int j = 0; j < alMocProcessingBean.size(); j++) { + stmt = con.prepareCall("{ call moc_txn_entry(?,?,?,?,?,?,?,?,?) }"); + oMocProcessingBean = alMocProcessingBean.get(j); + stmt.setString(1, oMocProcessingBean.getAccNo()); + stmt.setString(2, oMocProcessingBean.getTxnAmt()); + stmt.setString(3, oMocProcessingBean.getTxnInd()); + stmt.setString(4, oMocProcessingBean.getSec_acc_no()); + stmt.setString(5, oMocProcessingBean.getNarration()); + stmt.setString(6, pacsId); + stmt.setString(7, batchID); + stmt.setString(8, user); + stmt.registerOutParameter(9, java.sql.Types.VARCHAR); + //stmt.addBatch(); + stmt.execute(); + // message = stmt.getString(9); + if (!message.equalsIgnoreCase("MOC transaction details saved successfully")) { + con.rollback(); + break; + } + stmt.close(); + } + if (message.equalsIgnoreCase("MOC transaction details saved successfully")) { + message = message + " with MOC ID: " + batchID; + con.commit(); + } + //message = "Batch details saved successfully"; + /*message = stmt.getString(6); + if(!message.equalsIgnoreCase("Batch transaction details saved successfully")){ + con.rollback(); + }*/ + + } catch (BatchUpdateException ex) { + + try { + con.rollback(); + + //SuccessFlag = BatchExecutionFailedOperationObject.BatchExecutionFailedOperation("DepositKYCCreation.jsp", hdrId); + /*if(!stmt.getString(6).isEmpty()) + message = stmt.getString(6); + else*/ + message = "Error in savings batch details"; + // message = ex.toString(); + + + } catch (SQLException ex1) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + + + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } catch (SQLException ex1) { + message = "Error occurred in saving batch details. Please try Again!"; + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } finally { +// try { +// //stmt.close(); +// } catch (SQLException e) { +// System.out.println(e.toString()); +// } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Deposit/mocOperations.jsp").forward(request, response); + } + if ("search".equalsIgnoreCase(handle_id)) { + + // batchID = request.getParameter("batchID"); + + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + + // resultset = statement.executeQuery("select m.accno1,m.txn_ind,m.txn_amt,m.accno2,m.status,nvl(m.ref_no,'NA'),m.narration from moc_posting_dtl m where m.batch_id = '" + batchID + "' and m.status='ACTIVE' and m.pacs_id = '" + pacsId + "' "); + + while (resultset.next()) { + oMocProcessingBean = new mocProcessingBean(); + oMocProcessingBean.setAccNo(resultset.getString(1)); + oMocProcessingBean.setTxnInd(resultset.getString(2)); + oMocProcessingBean.setTxnAmt(resultset.getString(3)); + oMocProcessingBean.setSec_acc_no(resultset.getString(4)); + oMocProcessingBean.setTxnStatus(resultset.getString(5)); + oMocProcessingBean.setTxnRefNo(resultset.getString(6)); + oMocProcessingBean.setNarration(resultset.getString(7)); + + alMocProcessingBean.add(oMocProcessingBean); + SeachFound = 1; + } + if (alMocProcessingBean.size() > 0) { + request.setAttribute("alMocProcessingBean", alMocProcessingBean); + request.setAttribute("message", ""); + request.setAttribute("handle_id", "S"); + request.setAttribute("batchID", batchID); + } + //request.setAttribute("displayFlag", "Y"); + + + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + statement.close(); + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(BatchTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + if (SeachFound == 0) { + message = "BatchID " + batchID + " not found"; + request.setAttribute("message", message); + } + + request.getRequestDispatcher("/Deposit/mocOperations.jsp").forward(request, response); + } + + if ("execute".equalsIgnoreCase(handle_id)) { + // batchID = request.getParameter("batchID"); + try { + connection = DbHandler.getDBConnection(); + connection.setAutoCommit(false); + stmt = connection.prepareCall("{ call PROC_MOC_POST_FIN(?,?,?,?) }"); + stmt.setString(1, batchID); + stmt.setString(2, pacsId); + stmt.setString(3, user); + stmt.registerOutParameter(4, java.sql.Types.VARCHAR); + //stmt.addBatch(); + stmt.execute(); + // message = stmt.getString(4); + if (message.equalsIgnoreCase("MOC transactions successfully posted")) { + + connection.commit(); + } else { + connection.rollback(); + } + request.setAttribute("message", message); + } catch (SQLException ex) { + // Logger.getLogger(mocOperationsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + connection.close(); + stmt.close(); + } catch (SQLException ex) { + // Logger.getLogger(mocOperationsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + request.getRequestDispatcher("/Deposit/mocOperations.jsp").forward(request, response); + } + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/pacsProductOperationServlet.java b/IPKS_Updated/src/src/java/Controller/pacsProductOperationServlet.java new file mode 100644 index 0000000..8d37251 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/pacsProductOperationServlet.java @@ -0,0 +1,423 @@ +package Controller; + +import DataEntryBean.pacsProductOperationBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author Tcs Helpdesk10 + */ +public class pacsProductOperationServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + /*response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + + out.println(""); + out.println(""); + out.println(""); + out.println("Servlet GlProductOperationServlet"); + out.println(""); + out.println(""); + out.println("

Servlet GlProductOperationServlet at " + request.getContextPath() + "

"); + out.println(""); + out.println(""); + } finally { + out.close(); + }*/ + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + + Connection con = null; + CallableStatement proc = null; + String message = ""; + + //String ServletName = request.getParameter("handle_id"); + + pacsProductOperationBean oPacsProductOperationBean = new pacsProductOperationBean(); + + if ("Create".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oPacsProductOperationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(pacsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(pacsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_dep_product(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(pacsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, oPacsProductOperationBean.getProductcode()); + proc.setString(2, oPacsProductOperationBean.getInttcategory()); + proc.setString(3, oPacsProductOperationBean.getProductname()); + proc.setString(4, oPacsProductOperationBean.getProductdescription()); + proc.setString(5, oPacsProductOperationBean.getIntcatdescription()); + proc.setString(6, oPacsProductOperationBean.getSegmentCode()); + proc.setString(7, oPacsProductOperationBean.getGlCode()); + proc.setString(8, oPacsProductOperationBean.getStatus()); + proc.setString(9, oPacsProductOperationBean.getIntrate()); + proc.setString(10, oPacsProductOperationBean.getInttfrequency()); + proc.setString(11, oPacsProductOperationBean.getInttmethod()); + proc.setString(12, oPacsProductOperationBean.getMinbal()); + proc.setString(13, oPacsProductOperationBean.getMaxbal()); + proc.setString(14, oPacsProductOperationBean.getOdindicator()); + proc.setString(15, oPacsProductOperationBean.getPenalinttrate()); + proc.setString(16, oPacsProductOperationBean.getPenalinttfrequency()); + proc.setString(17, oPacsProductOperationBean.getPenalinttmethod()); + proc.setString(18, oPacsProductOperationBean.getMaxlimit()); + proc.setString(19, oPacsProductOperationBean.getDrawingpower()); + proc.setString(20, oPacsProductOperationBean.getDebitComp1()); + proc.setString(21, oPacsProductOperationBean.getDebitComp2()); + proc.setString(22, oPacsProductOperationBean.getCreditComp1()); + proc.setString(23, oPacsProductOperationBean.getCreditComp2()); + proc.setString(24, null); + proc.setString(25, null); + proc.setString(26, oPacsProductOperationBean.getInttcapfrequency()); + proc.setString(27, null); + proc.setString(28, null); + proc.setString(29, null); + proc.setString(30, ServletName); + proc.setString(31, null); + proc.setString(32, null); + proc.setString(33, null); + proc.setString(34, null); + proc.setString(35, null); + proc.setString(36, null); + proc.setString(37, null); + proc.setString(38, null); + proc.setString(39, null); + proc.setString(40, oPacsProductOperationBean.getCropIns()); + proc.setString(41, null); + proc.registerOutParameter(42, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(42); + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/pacsProductOperation.jsp").forward(request, response); + + } + + } else if ("Search".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oPacsProductOperationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(pacsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(pacsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(pacsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + try { + + // ResultSet rs = statement.executeQuery("select dp.id, prod_code,int_cat,prod_name,prod_desc," + + "intt_cat_desc,segment_code,gl_prod_id as Gl_Description,status," + + "intt_rate,intt_freq,int_method,min_bal,max_bal," + + "to_char(effec_dt,'dd/mm/yyyy') as eff_date, od_indicator," + + "od_pen_int_rate,od_pen_intt_freq,od_pen_int_method,max_limit,dp_flag,debit_comp1,debit_comp2,credit_comp1,credit_comp2,CROP_INT_RATE,INT_CAP_FREQ,GL_ID_INTT_PAYABLE,GL_ID_INTT_PAID from dep_product dp" + + " where to_number(substr(prod_code,1,1)) > 5 and int_cat= '" + oPacsProductOperationBean.getIntcatSearch() + "' AND prod_code='" + oPacsProductOperationBean.getProductcodeSearch() + "'"); + + while (rs.next()) { + + oPacsProductOperationBean.setDep_product_id(rs.getString("id")); + oPacsProductOperationBean.setProductcode(rs.getString("prod_code")); + oPacsProductOperationBean.setInttcategory(rs.getString("int_cat")); + oPacsProductOperationBean.setProductname(rs.getString("prod_name")); + oPacsProductOperationBean.setProductdescription(rs.getString("prod_desc")); + oPacsProductOperationBean.setIntcatdescription(rs.getString("intt_cat_desc")); + oPacsProductOperationBean.setSegmentCode(rs.getString("segment_code")); + oPacsProductOperationBean.setGlCode(rs.getString("Gl_Description")); + oPacsProductOperationBean.setStatus(rs.getString("status")); + oPacsProductOperationBean.setIntrate(rs.getString("intt_rate")); + oPacsProductOperationBean.setInttfrequency(rs.getString("intt_freq")); + oPacsProductOperationBean.setInttmethod(rs.getString("int_method")); + oPacsProductOperationBean.setMinbal(rs.getString("min_bal")); + oPacsProductOperationBean.setMaxbal(rs.getString("max_bal")); + oPacsProductOperationBean.setEffectDate(rs.getString("eff_date")); + oPacsProductOperationBean.setOdindicator(rs.getString("od_indicator")); + oPacsProductOperationBean.setPenalinttrate(rs.getString("od_pen_int_rate")); + oPacsProductOperationBean.setPenalinttfrequency(rs.getString("od_pen_intt_freq")); + oPacsProductOperationBean.setPenalinttmethod(rs.getString("od_pen_int_method")); + oPacsProductOperationBean.setMaxlimit(rs.getString("max_limit")); + oPacsProductOperationBean.setDrawingpower(rs.getString("dp_flag")); + oPacsProductOperationBean.setDebitComp1(rs.getString("debit_comp1")); + oPacsProductOperationBean.setDebitComp2(rs.getString("debit_comp2")); + oPacsProductOperationBean.setCreditComp1(rs.getString("credit_comp1")); + oPacsProductOperationBean.setCreditComp2(rs.getString("credit_comp2")); + oPacsProductOperationBean.setCropIns(rs.getString("CROP_INT_RATE")); + oPacsProductOperationBean.setInttcapfrequency(rs.getString("INT_CAP_FREQ")); + oPacsProductOperationBean.setGlCodeInttPAYABLE(rs.getString("GL_ID_INTT_PAYABLE")); + oPacsProductOperationBean.setGlCodeInttPAID(rs.getString("GL_ID_INTT_PAID")); + + SeachFound = 1; + request.setAttribute("displayFlag", "Y"); + } + // statement.close(); + // connection.close(); + + } catch (SQLException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + if (SeachFound == 0) { + message = "Product Code or Interest Category not exists in the system"; + request.setAttribute("message", message); + } + + request.setAttribute("oPacsProductOperationBeanObj", oPacsProductOperationBean); + request.getRequestDispatcher("/pacsProductOperation.jsp").forward(request, response); + + } else if ("Update".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(oPacsProductOperationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.Upsert_dep_product(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.setString(1, oPacsProductOperationBean.getProductcodeAmend()); + proc.setString(2, oPacsProductOperationBean.getInttcategoryAmend()); + proc.setString(3, oPacsProductOperationBean.getProductnameAmend()); + proc.setString(4, oPacsProductOperationBean.getProductdescriptionAmend()); + proc.setString(5, oPacsProductOperationBean.getIntcatdescriptionAmend()); + proc.setString(6, oPacsProductOperationBean.getSegmentCodeAmend()); + proc.setString(7, oPacsProductOperationBean.getGlCodeAmend()); + proc.setString(8, oPacsProductOperationBean.getStatusAmend()); + proc.setString(9, oPacsProductOperationBean.getIntrateAmend()); + proc.setString(10, oPacsProductOperationBean.getInttfrequencyAmend()); + proc.setString(11, oPacsProductOperationBean.getInttmethodAmend()); + proc.setString(12, oPacsProductOperationBean.getMinbalAmend()); + proc.setString(13, oPacsProductOperationBean.getMaxbalAmend()); + proc.setString(14, oPacsProductOperationBean.getOdindicatorAmend()); + proc.setString(15, oPacsProductOperationBean.getPenalinttrateAmend()); + proc.setString(16, oPacsProductOperationBean.getPenalinttfrequencyAmend()); + proc.setString(17, oPacsProductOperationBean.getPenalinttmethodAmend()); + proc.setString(18, oPacsProductOperationBean.getMaxlimitAmend()); + proc.setString(19, oPacsProductOperationBean.getDrawingpowerAmend()); + proc.setString(20, oPacsProductOperationBean.getDebitComp1Amend()); + proc.setString(21, oPacsProductOperationBean.getDebitComp2Amend()); + proc.setString(22, oPacsProductOperationBean.getCreditComp1Amend()); + proc.setString(23, oPacsProductOperationBean.getCreditComp2Amend()); + proc.setString(24, null); + proc.setString(25, null); + proc.setString(26, oPacsProductOperationBean.getInttcapfrequencyAmend()); + proc.setString(27, null); + proc.setString(28, null); + proc.setString(29, null); + proc.setString(30, ServletName); + proc.setString(31, null); + proc.setString(32, null); + proc.setString(33, null); + proc.setString(34, null); + proc.setString(35, null); + proc.setString(36, null); + proc.setString(37, null); + proc.setString(38, oPacsProductOperationBean.getGlCodeInttPAYABLE_Amend()); + proc.setString(39, oPacsProductOperationBean.getGlCodeInttPAID_Amend()); + proc.setString(40, oPacsProductOperationBean.getCropInsAmend()); + proc.setString(41, null); + + proc.registerOutParameter(42, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(42); + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/pacsProductOperation.jsp").forward(request, response); + + } + + } else if ("StatusSearch".equalsIgnoreCase(ServletName)) { + + //String inttCategoryActivation = request.getParameter("inttCategoryActivation"); + // String productCodeActivation = request.getParameter("productCodeActivation"); + //String vFlag = request.getParameter("PacsproductstatusFlag"); + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call parameter.pacs_product_Activation(?,?,?,?)}"); + } catch (SQLException ex) { + // Logger.getLogger(pacsProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, inttCategoryActivation); + proc.setString(2, productCodeActivation); + proc.setString(3, vFlag); + proc.registerOutParameter(4, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(4); + + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.getRequestDispatcher("/pacsProductOperation.jsp").forward(request, response); + + } + + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/pdsSalesRegisterServlet.java b/IPKS_Updated/src/src/java/Controller/pdsSalesRegisterServlet.java new file mode 100644 index 0000000..aa7a11a --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/pdsSalesRegisterServlet.java @@ -0,0 +1,180 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +/** + * + * @author 1320035 + */ +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import DataEntryBean.pdsSalesRegisterHeaderBean; +import DataEntryBean.pdsSalesRegisterDetailsBean; +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.http.HttpSession; +import oracle.jdbc.OracleTypes; + +/** + * + * @author 1249241 + */ +public class pdsSalesRegisterServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + // String handle_id = request.getParameter("handle_id"); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + pdsSalesRegisterHeaderBean opdsSalesRegisterHeaderBean = null; + pdsSalesRegisterDetailsBean opdsSalesRegisterDetailsBean = null; + ResultSet rs = null; + ArrayList alpdsSalesRegisterDetailsBeanApend = new ArrayList(); + //String toDate = request.getParameter("toDate"); + // String fromDate = request.getParameter("fromDate"); + //String productId = request.getParameter("productIdSearch"); + // String productType = request.getParameter("productTypeSearch"); + //String productSubType = request.getParameter("productSubTypeSearch"); + //String cardNo = request.getParameter("cardNoSearch"); + //String custName = request.getParameter("custNameSearch"); + //String cardNoPk = request.getParameter("cardNoPk"); + String productTypeDetails; + String productSubTypeDetails; + opdsSalesRegisterHeaderBean = new pdsSalesRegisterHeaderBean(); + opdsSalesRegisterHeaderBean.setToDate(toDate); + opdsSalesRegisterHeaderBean.setFromDate(fromDate); + opdsSalesRegisterHeaderBean.setProductIdSearch(productId); + opdsSalesRegisterHeaderBean.setProductTypeSearch(productType); + opdsSalesRegisterHeaderBean.setProductSubTypeSearch(productSubType); + opdsSalesRegisterHeaderBean.setCardNoSearch(cardNo); + opdsSalesRegisterHeaderBean.setCustNameSearch(custName); + opdsSalesRegisterHeaderBean.setCardNoPk(cardNoPk ); + + int searchFound = 0; + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call pds_operations.pds_salesregisterview(?,?,?,?,?,?,?) }"); + proc.setString(1, opdsSalesRegisterHeaderBean.getProductIdSearch()); + proc.setString(2, opdsSalesRegisterHeaderBean.getToDate()); + proc.setString(3, opdsSalesRegisterHeaderBean.getFromDate()); + proc.setString(4, opdsSalesRegisterHeaderBean.getCardNoPk()); + proc.setString(5, pacsId); + proc.registerOutParameter(6, OracleTypes.CURSOR); + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + proc.execute(); + message = proc.getString(7); + // rs = (ResultSet) proc.getObject(6); + + while (rs.next()) { + searchFound = 1; + opdsSalesRegisterDetailsBean = new pdsSalesRegisterDetailsBean(); + productTypeDetails = rs.getString("ITEM_TYPE") + ":" + rs.getString("TYPE_DESC"); + productSubTypeDetails = rs.getString("ITEM_SUBTYPE") + ":" + rs.getString("SUBTYPE_DESC"); + + opdsSalesRegisterDetailsBean.setProductType(productTypeDetails); + opdsSalesRegisterDetailsBean.setProductSubType(productSubTypeDetails); + opdsSalesRegisterDetailsBean.setSaleRefNo(rs.getString("SALES_REF_NO")); + opdsSalesRegisterDetailsBean.setName(rs.getString("NAME")); + opdsSalesRegisterDetailsBean.setCardNo(rs.getString("CARD_NO")); + opdsSalesRegisterDetailsBean.setQuantity(rs.getString("QTY")); + opdsSalesRegisterDetailsBean.setUnitSalePrice(rs.getString("UNIT_SP")); + opdsSalesRegisterDetailsBean.setStockId(rs.getString("STOCK_ID")); + opdsSalesRegisterDetailsBean.setSaleDate(rs.getString("SALES_DATE")); + opdsSalesRegisterDetailsBean.setTotal(rs.getString("TOTAL_AMT")); + + + + alpdsSalesRegisterDetailsBeanApend.add(opdsSalesRegisterDetailsBean); + request.setAttribute("displayFlag", "Y"); + } + + if (searchFound == 0) { + + message = "No Sales Exist for the selected criteria"; + request.setAttribute("message", message); + + } + + } catch (SQLException ex) { + // Logger.getLogger(pdsStockRegisterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + + try { + proc.close(); + con.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during connection close."); + } + } + + request.setAttribute("opdsSalesRegisterHeaderBean", opdsSalesRegisterHeaderBean); + request.setAttribute("alpdsSalesRegisterDetailsBeanApend", alpdsSalesRegisterDetailsBeanApend); + request.getRequestDispatcher("/Pds_JSP/pdsSalesRegister.jsp").forward(request, response); + + + + }// + + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + } +} diff --git a/IPKS_Updated/src/src/java/Controller/pdsStockRegisterServlet.java b/IPKS_Updated/src/src/java/Controller/pdsStockRegisterServlet.java new file mode 100644 index 0000000..0f2c1e4 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/pdsStockRegisterServlet.java @@ -0,0 +1,246 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import DataEntryBean.pdsStockRegisterBean; +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.http.HttpSession; +import oracle.jdbc.OracleTypes; + +/** + * + * @author 1249241 + */ +public class pdsStockRegisterServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String handle_id = request.getParameter("handle_id"); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + pdsStockRegisterBean opdsStockRegisterBean = null; + ResultSet rs = null; + ArrayList alpdsStockRegisterBeanApend = new ArrayList(); + + + if (handle_id.equalsIgnoreCase("enterStock")) { + + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + + ArrayList alpdsStockRegisterBean = new ArrayList(); + for (int i = 1; i <= counter; i++) { + try { + + // String productId = request.getParameter("product_id" + i); + + // String price = request.getParameter("price" + i); + //String quantity = request.getParameter("quantity" + i); + String linetotal = request.getParameter("total" + i); + //String purchaseDate = request.getParameter("purchaseDate" + i); + // String perishableFlag = request.getParameter("perishableFlag" + i); + // String stockExpiryDate = request.getParameter("stockExpiryDate" + i); + if (productId != null) { + opdsStockRegisterBean = new pdsStockRegisterBean(); + opdsStockRegisterBean.setProductId(productId); + opdsStockRegisterBean.setPrice(price); + opdsStockRegisterBean.setQuantity(quantity); + opdsStockRegisterBean.setTotal(linetotal); + opdsStockRegisterBean.setPerishableFlag(perishableFlag); + opdsStockRegisterBean.setStockExpiryDate(stockExpiryDate); + + alpdsStockRegisterBean.add(opdsStockRegisterBean); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if (alpdsStockRegisterBean.size() > 0) { + + for (int j = 0; j < alpdsStockRegisterBean.size(); j++) { + + opdsStockRegisterBean = alpdsStockRegisterBean.get(j); + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call pds_operations.Upsert_stock_register_dtls(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(pdsStockRegisterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + proc.setString(1, opdsStockRegisterBean.getProductId()); + proc.setString(2, opdsStockRegisterBean.getPrice()); + proc.setString(3, opdsStockRegisterBean.getQuantity()); + proc.setString(4, pacsId); + proc.setString(5, opdsStockRegisterBean.getStockExpiryDate()); + proc.setString(6, opdsStockRegisterBean.getPerishableFlag()); + proc.registerOutParameter(7, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(7); + + } catch (SQLException ex) { + // Logger.getLogger(pdsStockRegisterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(pdsStockRegisterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Pds_JSP/pds_stock_register.jsp").forward(request, response); + + + } else if (handle_id.equalsIgnoreCase("checkStock")) { + + + // String toDate = request.getParameter("toDate"); + // String fromDate = request.getParameter("fromDate"); + // String productId = request.getParameter("product_id_search"); + String productDetails; + // String productSubType = request.getParameter("productSubType");*/ + opdsStockRegisterBean = new pdsStockRegisterBean(); + opdsStockRegisterBean.setToDate(toDate); + opdsStockRegisterBean.setFromDate(fromDate); + opdsStockRegisterBean.setProductIdSearch(productId); + int searchFound = 0; + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call pds_operations.pds_stockView(?,?,?,?,?,?) }"); + proc.setString(1, opdsStockRegisterBean.getProductIdSearch()); + proc.setString(2, opdsStockRegisterBean.getToDate()); + proc.setString(3, opdsStockRegisterBean.getFromDate()); + proc.setString(4, pacsId); + proc.registerOutParameter(5, OracleTypes.CURSOR); + proc.registerOutParameter(6, java.sql.Types.VARCHAR); + proc.execute(); + message = proc.getString(6); + // rs = (ResultSet) proc.getObject(5); + + while (rs.next()) { + searchFound = 1; + opdsStockRegisterBean = new pdsStockRegisterBean(); + productDetails=rs.getString("ITEM_TYPE")+":"+rs.getString("TYPE_DESC")+":"+rs.getString("ITEM_SUBTYPE")+":"+rs.getString("SUBTYPE_DESC"); + + opdsStockRegisterBean.setProductDetails(productDetails); + opdsStockRegisterBean.setStockEntryDate(rs.getString("STOCK_ENTRY_DATE")); + opdsStockRegisterBean.setPrice(rs.getString("UNIT_PRICE")); + opdsStockRegisterBean.setQuantity(rs.getString("BASE_QTY")); + opdsStockRegisterBean.setQuantityAbled(rs.getString("QTY_AVAILED")); + opdsStockRegisterBean.setQuantityAvailable(rs.getString("QTY_REMAINING")); + opdsStockRegisterBean.setStockExpiryDate(rs.getString("STOCK_EXPIRY_DATE")); + opdsStockRegisterBean.setPerishableFlag(rs.getString("PERISHABLE")); + opdsStockRegisterBean.setStockId(rs.getString("STOCK_ID")); + + + alpdsStockRegisterBeanApend.add(opdsStockRegisterBean); + request.setAttribute("displayFlag", "Y"); + } + + if (searchFound == 0) { + + message = "No Stock Exists for the selected criteria"; + request.setAttribute("message", message); + + } + + } catch (SQLException ex) { + // Logger.getLogger(pdsStockRegisterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + + try { + proc.close(); + con.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during connection close."); + } + } + + request.setAttribute("alpdsStockRegisterBeanApend", alpdsStockRegisterBeanApend); + request.getRequestDispatcher("/Pds_JSP/pds_stock_register.jsp").forward(request, response); + + } + + }// + + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + } +} diff --git a/IPKS_Updated/src/src/java/Controller/pdssaleitemEntry.java b/IPKS_Updated/src/src/java/Controller/pdssaleitemEntry.java new file mode 100644 index 0000000..107e2af --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/pdssaleitemEntry.java @@ -0,0 +1,264 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.PdsSellItemEntryBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.StringTokenizer; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.StringTokenizer; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author 986137 + */ +public class pdssaleitemEntry extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + String handle_id = request.getParameter("handle_id"); + String optionValue = request.getParameter("checkOption"); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + PdsSellItemEntryBean PdsSellItemEntryBeanObj = new PdsSellItemEntryBean(); + String hdrID = ""; + ArrayList alPdsSellItemEntryBean = new ArrayList(); + BatchExecutionFailedOperation BatchExecutionFailedOperationObject=new BatchExecutionFailedOperation(); + boolean SuccessFlag; + String memberId=null; + + if (handle_id.equalsIgnoreCase("Create")) { + + + try { + //BeanUtils.populate(PdsSellItemEntryBeanObj, request.getParameterMap()); + memberId=PdsSellItemEntryBeanObj.getMemberId(); + } catch (IllegalAccessException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call PDS_operations.insert_pds_sales_hdr(?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, PdsSellItemEntryBeanObj.getMemberId()); + proc.setString(2, PdsSellItemEntryBeanObj.getGrandTotal()); + proc.setString(3, pacsId); + proc.registerOutParameter(4, java.sql.Types.VARCHAR); + proc.registerOutParameter(5, java.sql.Types.VARCHAR); + + proc.execute(); + + //message = proc.getString(4); + //hdrID = proc.getString(5); + + + + } catch (SQLException ex) { + + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + } + int counter = Integer.parseInt(request.getParameter("rowCounter")); + + for (int i = 1; i <= counter; i++) { + try { + + // String productId = request.getParameter("product_id" + i); + // String p_order_id = request.getParameter("p_order_id" + i); + // String quantity = request.getParameter("quantity" + i); + // String price = request.getParameter("price" + i); + + + + if (productId != null) { + PdsSellItemEntryBeanObj = new PdsSellItemEntryBean(); + PdsSellItemEntryBeanObj.setProduct_id(productId); + PdsSellItemEntryBeanObj.setStockId(p_order_id); + PdsSellItemEntryBeanObj.setQuantity(quantity); + PdsSellItemEntryBeanObj.setPrice(price); + alPdsSellItemEntryBean.add(PdsSellItemEntryBeanObj); + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + } + if ((alPdsSellItemEntryBean.size() > 0) && (!message.equalsIgnoreCase("")) && (!hdrID.equalsIgnoreCase(""))) { + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call PDS_operations.insert_pds_sales_dtl(?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + for (int j = 0; j < alPdsSellItemEntryBean.size(); j++) { + + PdsSellItemEntryBeanObj = alPdsSellItemEntryBean.get(j); + + + proc.setString(1, hdrID); + proc.setString(2, PdsSellItemEntryBeanObj.getStockId()); + proc.setString(3, PdsSellItemEntryBeanObj.getProduct_id()); + proc.setString(4, PdsSellItemEntryBeanObj.getQuantity()); + proc.setString(5, PdsSellItemEntryBeanObj.getPrice()); + proc.setString(6,memberId); + proc.setString(7,pacsId); + proc.addBatch(); + + + } + + proc.executeBatch(); + + } catch (SQLException ex) { + try { + // con.rollback(); + + SuccessFlag=BatchExecutionFailedOperationObject.BatchExecutionFailedOperation("PdsSellItem.jsp", hdrID); + + message=ex.toString(); + + + } catch (Exception ex1) { + // Logger.getLogger(TradingSaleItemEntry.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(VendorMasterServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + } + + + + + request.setAttribute("message", message); + request.setAttribute("requisitionId",hdrID); + request.getRequestDispatcher("/Pds_JSP/PdsInvoice.jsp").forward(request, response); + + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/privacyPolicyServlet.java b/IPKS_Updated/src/src/java/Controller/privacyPolicyServlet.java new file mode 100644 index 0000000..2d2352a --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/privacyPolicyServlet.java @@ -0,0 +1,90 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import Dao.CBSAccountMappingDao; +import DataEntryBean.ChequeDetailsBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +public class privacyPolicyServlet extends HttpServlet{ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String tellerId = (String)session.getAttribute("user"); + Connection connection = null; + Statement statement = null; + + if ( pacsId !=null && tellerId !=null) + { + + try { + connection = DbHandler.getDBConnection(); + statement = connection.createStatement(); + ResultSet rs = statement.executeQuery(" insert into policy_log (policy_type, pacs_id, login_id, proc_date, proc_time) values \n" + + "('PRIVACY', '"+ pacsId +"', '"+ tellerId +"', (select system_date from system_date), to_date(to_char(SYSTIMESTAMP, 'DD-MON-RRHH24:MI:SS'), 'DD-MON-RRHH24:MI:SS')) "); + + } catch (Exception e) { + System.out.println("Error occurred during processing."); + + } + finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + request.getRequestDispatcher("/privacyPolicy1.jsp").forward(request, response); + } + } + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/purchaseDetailServlet.java b/IPKS_Updated/src/src/java/Controller/purchaseDetailServlet.java new file mode 100644 index 0000000..e2b1cb6 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/purchaseDetailServlet.java @@ -0,0 +1,143 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.PurchaseDetailBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author Tcs Help desk122 + */ +public class purchaseDetailServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + Connection conn = DbHandler.getDBConnection(); + PreparedStatement pstmt = null; + ResultSet resultSet = null; + ArrayList alPurchaseDetailBean = null; + String message = ""; + int searchFound = 0; + // String memberId = request.getParameter("custId"); + PurchaseDetailBean purchaseDetailBeanObj = null; + + String headerQry = "select md.member_id,md.name,pm.product_name,pm.product_code,r.quantity,r.price,r.total,to_char(r.purchase_date,'DD/MM/YYYY') " + + " from PDS_raise_requisition r,pds_product_mst pm,pds_members_details md " + + " where r.member_id=md.member_id and pm.id=r.product_id and md.member_id='" + memberId + "'"; + + try{ + alPurchaseDetailBean = new ArrayList(); + pstmt = conn.prepareStatement(headerQry); + // resultSet = pstmt.executeQuery(); + while(resultSet.next()){ + searchFound = 1; + purchaseDetailBeanObj = new PurchaseDetailBean(); + purchaseDetailBeanObj.setMemberId(resultSet.getString(1)); + purchaseDetailBeanObj.setMemberName(resultSet.getString(2)); + purchaseDetailBeanObj.setProductName(resultSet.getString(3)); + purchaseDetailBeanObj.setProductCode(resultSet.getString(4)); + purchaseDetailBeanObj.setQuantity(resultSet.getString(5)); + purchaseDetailBeanObj.setPrice(resultSet.getString(6)); + purchaseDetailBeanObj.setTotal(resultSet.getString(7)); + purchaseDetailBeanObj.setPurchaseDate(resultSet.getString(8)); + alPurchaseDetailBean.add(purchaseDetailBeanObj); + request.setAttribute("displayFlag", "Y"); + } + + // conn.close(); + } catch (Exception e) { + // Logger.getLogger(purchaseDetailServlet.class.getName()).log(Level.SEVERE, null, e); + // System.out.println(e.toString()); + System.out.println("Error occurred during processing."); + } finally{ + +// if (searchFound == 0) { +// message = "No details exists for selected member ID"; +// request.setAttribute("message", message); +// } + try { + if(conn !=null) { + conn.close(); + } + } catch (Exception e) { + System.out.println("Error occured during connection close."); + } + +// request.setAttribute("alPurchaseDetailBean",alPurchaseDetailBean); +// request.getRequestDispatcher("/Pds_JSP/purchasedetail.jsp").forward(request, response); + } + if (searchFound == 0) { + message = "No details exists for selected member ID"; + request.setAttribute("message", message); + } + request.setAttribute("alPurchaseDetailBean",alPurchaseDetailBean); + request.getRequestDispatcher("/Pds_JSP/purchasedetail.jsp").forward(request, response); + + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/resetLoginServlet.java b/IPKS_Updated/src/src/java/Controller/resetLoginServlet.java new file mode 100644 index 0000000..2a31940 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/resetLoginServlet.java @@ -0,0 +1,101 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import Dao.LoginDao; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +public class resetLoginServlet extends HttpServlet { + + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String modifierLoginId = (String) session.getAttribute("user"); + String pacsId = (String) session.getAttribute("pacsId"); + // String resetableUserId = request.getParameter("userName"); + LoginDao lDao = new LoginDao(); + boolean result = false; + int counter = 0; + List userSessionList = new ArrayList(); + try { + if (!(modifierLoginId.equalsIgnoreCase(resetableUserId))) { + result = lDao.verifySamPacsForUser(resetableUserId, pacsId); + if (result) { + userSessionList = lDao.deleteFromLoggedInUser(resetableUserId, pacsId); + for (String sessionId : userSessionList) { + if (LoginServlet.sesssionMap.containsKey(sessionId)) { + HttpSession sessionFromMap = LoginServlet.sesssionMap.get(sessionId); + sessionFromMap.invalidate(); + LoginServlet.sesssionMap.remove(sessionId); + counter++; + } + } + System.out.println("No of User login entry deleted from sessionMap :" + counter); + if (counter == 0) { + request.setAttribute("error", "No active session for the user."); + request.getRequestDispatcher("/ResetLogin.jsp").forward(request, response); + } else { + lDao.insertToResetLoginActivity(modifierLoginId, resetableUserId, pacsId); + request.setAttribute("error", "User login succesfully reset. Please login again to check. "); + request.getRequestDispatcher("/ResetLogin.jsp").forward(request, response); + } + } else { + request.setAttribute("error", "Target User for reset doesnot belong to your pacs.Activity is unauthorized"); + request.getRequestDispatcher("/ResetLogin.jsp").forward(request, response); + } + } else { + request.setAttribute("error", "Unauthorized activity.You can not force logout your own account."); + request.getRequestDispatcher("/ResetLogin.jsp").forward(request, response); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + request.setAttribute("error", "Soemthing is wrong. PLease try again."); + request.getRequestDispatcher("/ResetLogin.jsp").forward(request, response); + + } finally { + System.out.println("Processing done."); + } + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/resetPasswordServlet.java b/IPKS_Updated/src/src/java/Controller/resetPasswordServlet.java new file mode 100644 index 0000000..b2bd28f --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/resetPasswordServlet.java @@ -0,0 +1,112 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import Dao.LoginDao; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * + * @author 1004242 + */ +public class resetPasswordServlet extends HttpServlet { + + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String modifierLoginId = (String) session.getAttribute("user"); + String pacsId = (String) session.getAttribute("pacsId"); + //String resetableUserId = request.getParameter("userId"); + LoginDao lDao = new LoginDao(); + boolean result = false; + boolean result1 = false; + List userSessionList = new ArrayList(); + int counter= 0; + + try { + if (!(modifierLoginId.equalsIgnoreCase(resetableUserId))) { + result = lDao.verifySamPacsForUser(resetableUserId, pacsId); + if (result) { + result1 = lDao.resetUserPassword(resetableUserId, pacsId); + if (result1) { + // request.setAttribute("error", "Reset password is succesful!"); + // request.getRequestDispatcher("/Deposit/ResetPassword.jsp").forward(request, response); + //response.sendRedirect("./login.jsp"); + // session.removeAttribute("resetableUserId"); + // session.invalidate(); + userSessionList = lDao.deleteFromLoggedInUser(resetableUserId, pacsId); + for (String sessionId : userSessionList) { + if (LoginServlet.sesssionMap.containsKey(sessionId)) { + HttpSession sessionFromMap = LoginServlet.sesssionMap.get(sessionId); + sessionFromMap.invalidate(); + LoginServlet.sesssionMap.remove(sessionId); + counter++; + + request.setAttribute("error", "User login successfully reset. Please login again to check."); + request.getRequestDispatcher("/Deposit/ResetPassword.jsp").forward(request, response); + } + } + // lDao.insertToResetLoginActivity(modifierLoginId, resetableUserId, pacsId); + request.setAttribute("error", "User login successfully reset. Please login again to check."); + request.getRequestDispatcher("/Deposit/ResetPassword.jsp").forward(request, response); + } + else { + request.setAttribute("error", "Soemthing is wrong. PLease try again."); + request.getRequestDispatcher("/Deposit/ResetPassword.jsp").forward(request, response); + } + } + else { + request.setAttribute("error", "Target User for reset does not belong to your PACS. Activity is unauthorized."); + request.getRequestDispatcher("/Deposit/ResetPassword.jsp").forward(request, response); + } + } else { + request.setAttribute("error", "Unauthorized activity. You cannot reset password of your current user."); + request.getRequestDispatcher("/Deposit/ResetPassword.jsp").forward(request, response); + } + } catch (Exception e) { + // e.printStackTrace(); + request.setAttribute("error", "Soemthing is wrong. PLease try again."); + request.getRequestDispatcher("/Deposit/ResetPassword.jsp").forward(request, response); + + } finally { + System.out.println("Processing done."); + } + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/tradingFinancialYearAdjustmentServlet.java b/IPKS_Updated/src/src/java/Controller/tradingFinancialYearAdjustmentServlet.java new file mode 100644 index 0000000..93ce2d2 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/tradingFinancialYearAdjustmentServlet.java @@ -0,0 +1,312 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Controller; + +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; +import DataEntryBean.tradingFinancialYearAdjustmentBean; +import java.sql.BatchUpdateException; + +/** + * + * @author 981898 + */ +public class tradingFinancialYearAdjustmentServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here + out.println(""); + out.println(""); + out.println("Servlet BatchTransactionServlet"); + out.println(""); + out.println(""); + out.println("

Servlet BatchTransactionServlet at " + request.getContextPath () + "

"); + out.println(""); + out.println(""); + */ + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + String handle_id = request.getParameter("handle_id"); + int counter = Integer.parseInt(request.getParameter("rowCounter")); + String batchID = null; + Connection con = null; + Statement proc = null; + Connection connection = null; + CallableStatement stmt = null; + tradingFinancialYearAdjustmentBean oMocProcessingBean; + ArrayList alMocProcessingBean = new ArrayList(); + + if ("create".equalsIgnoreCase(handle_id)) { + + + for (int i = 1; i <= counter; i++) { + try { + oMocProcessingBean = new tradingFinancialYearAdjustmentBean(); + // oMocProcessingBean.setAccNo(request.getParameter("accNo" + i)); + // oMocProcessingBean.setTxnAmt(request.getParameter("txnAmt" + i)); + // oMocProcessingBean.setTxnInd(request.getParameter("txnInd" + i)); + // oMocProcessingBean.setSec_acc_no(request.getParameter("secAccNo"+i)); + // oMocProcessingBean.setNarration(request.getParameter("txnNarration" + i)); + + alMocProcessingBean.add(oMocProcessingBean); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } + + } + + if (alMocProcessingBean.size() > 0) { + try { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + proc = con.createStatement(); + //ResultSet rs = proc.executeQuery("select MOC_TXN_DETAILS_SEQ.NEXTVAL from dual"); + while (rs.next()) { + batchID = rs.getString(1); + } + proc.close(); + for (int j = 0; j < alMocProcessingBean.size(); j++) { + stmt = con.prepareCall("{ call trading_operation.trading_moc_txn_entry(?,?,?,?,?,?,?,?,?) }"); + oMocProcessingBean = alMocProcessingBean.get(j); + stmt.setString(1, oMocProcessingBean.getAccNo()); + stmt.setString(2, oMocProcessingBean.getTxnAmt()); + stmt.setString(3, oMocProcessingBean.getTxnInd()); + stmt.setString(4, oMocProcessingBean.getSec_acc_no()); + stmt.setString(5, oMocProcessingBean.getNarration()); + stmt.setString(6, pacsId); + stmt.setString(7, batchID); + stmt.setString(8, user); + stmt.registerOutParameter(9, java.sql.Types.VARCHAR); + //stmt.addBatch(); + stmt.execute(); + // message = stmt.getString(9); + if (!message.equalsIgnoreCase("Trading Financial Yr adjustment transaction details saved successfully")) { + con.rollback(); + break; + } + stmt.close(); + } + if (message.equalsIgnoreCase("Trading Financial Yr adjustment transaction details saved successfully")) { + message = message + " with MOC ID: " + batchID; + con.commit(); + } + //message = "Batch details saved successfully"; + /*message = stmt.getString(6); + if(!message.equalsIgnoreCase("Batch transaction details saved successfully")){ + con.rollback(); + }*/ + + } catch (BatchUpdateException ex) { + + try { + con.rollback(); + + //SuccessFlag = BatchExecutionFailedOperationObject.BatchExecutionFailedOperation("DepositKYCCreation.jsp", hdrId); + /*if(!stmt.getString(6).isEmpty()) + message = stmt.getString(6); + else*/ + message = "Error in savings batch details"; + // message = ex.toString(); + + + } catch (SQLException ex1) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + } + + + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during processing."); + } catch (SQLException ex1) { + message = "Error occurred in saving batch details. Please try Again!"; + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex1); + System.out.println("Error occurred during processing."); + + } finally { +// try { +// //stmt.close(); +// } catch (SQLException e) { +// System.out.println(e.toString()); +// } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(DepositKYCCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + // System.out.println(ex.toString()); + System.out.println("Error occurred during connection close."); + } + } + + } + request.setAttribute("message", message); + request.getRequestDispatcher("/Trading_JSP/tradingFinancialYearAdjustment.jsp").forward(request, response); + } + if ("search".equalsIgnoreCase(handle_id)) { + + // batchID = request.getParameter("batchID"); + + ResultSet resultset = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + int SeachFound = 0; + + try { + statement = connection.createStatement(); + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + + // resultset = statement.executeQuery("select m.accno1,m.txn_ind,m.txn_amt,m.accno2,m.status,nvl(m.ref_no,'NA'),m.narration from trading_MOC_POSTING_DTL m where m.batch_id = '" + batchID + "' and m.status='ACTIVE' and m.pacs_id = '" + pacsId + "' "); + + while (resultset.next()) { + oMocProcessingBean = new tradingFinancialYearAdjustmentBean(); + oMocProcessingBean.setAccNo(resultset.getString(1)); + oMocProcessingBean.setTxnInd(resultset.getString(2)); + oMocProcessingBean.setTxnAmt(resultset.getString(3)); + oMocProcessingBean.setSec_acc_no(resultset.getString(4)); + oMocProcessingBean.setTxnStatus(resultset.getString(5)); + oMocProcessingBean.setTxnRefNo(resultset.getString(6)); + oMocProcessingBean.setNarration(resultset.getString(7)); + + alMocProcessingBean.add(oMocProcessingBean); + SeachFound = 1; + } + if (alMocProcessingBean.size() > 0) { + request.setAttribute("alMocProcessingBean", alMocProcessingBean); + request.setAttribute("message", ""); + request.setAttribute("handle_id", "S"); + request.setAttribute("batchID", batchID); + } + //request.setAttribute("displayFlag", "Y"); + + + } catch (SQLException ex) { + // Logger.getLogger(GovtOrderCreationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + statement.close(); + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(BatchTransactionServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + if (SeachFound == 0) { + message = "BatchID " + batchID + " not found"; + request.setAttribute("message", message); + } + + request.getRequestDispatcher("/Trading_JSP/tradingFinancialYearAdjustment.jsp").forward(request, response); + } + + if ("execute".equalsIgnoreCase(handle_id)) { + // batchID = request.getParameter("batchID"); + try { + connection = DbHandler.getDBConnection(); + connection.setAutoCommit(false); + stmt = connection.prepareCall("{ call trading_operation.trading_PROC_MOC_POST_FIN(?,?,?,?) }"); + stmt.setString(1, batchID); + stmt.setString(2, pacsId); + stmt.setString(3, user); + stmt.registerOutParameter(4, java.sql.Types.VARCHAR); + //stmt.addBatch(); + stmt.execute(); + // message = stmt.getString(4); + if (message.equalsIgnoreCase("Trading Financial Yr adjustment transactions successfully posted")) { + + connection.commit(); + } else { + connection.rollback(); + } + request.setAttribute("message", message); + } catch (SQLException ex) { + // Logger.getLogger(mocOperationsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + connection.close(); + stmt.close(); + } catch (SQLException ex) { + // Logger.getLogger(mocOperationsServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + request.getRequestDispatcher("/Trading_JSP/tradingFinancialYearAdjustment.jsp").forward(request, response); + } + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Controller/tradingPurchaseOrderServlet.java b/IPKS_Updated/src/src/java/Controller/tradingPurchaseOrderServlet.java new file mode 100644 index 0000000..cb56a32 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/tradingPurchaseOrderServlet.java @@ -0,0 +1,155 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.tradingPurchaseOrderBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.ResultSet; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.beanutils.BeanUtils; + +/** + * + * @author TCS + */ +public class tradingPurchaseOrderServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + HttpSession session = request.getSession(false); + Connection con = null; + CallableStatement proc = null; + String message = ""; + String pacsId = (String) session.getAttribute("pacsId"); + String user = (String) session.getAttribute("user"); + String ServletName = request.getParameter("handle_id"); + + tradingPurchaseOrderBean tradingPurchaseOrderBeanObj = new tradingPurchaseOrderBean(); + + + if ("Update".equalsIgnoreCase(ServletName)) { + + try { + // BeanUtils.populate(tradingPurchaseOrderBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(tradingPurchaseOrderServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(tradingPurchaseOrderServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call trading_operation.trading_po(?,?,?,?,?,?,?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(tradingPurchaseOrderServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + + proc.setString(1, tradingPurchaseOrderBeanObj.getProduct_id()); + proc.setString(2, tradingPurchaseOrderBeanObj.getVendor_id()); + proc.setString(3, tradingPurchaseOrderBeanObj.getUnit_price()); + proc.setString(4, pacsId); + proc.setString(5, tradingPurchaseOrderBeanObj.getPurchaseref()); + proc.setString(6, tradingPurchaseOrderBeanObj.getPurchasedesc()); + proc.setString(7, tradingPurchaseOrderBeanObj.getUnit()); + proc.setString(8, tradingPurchaseOrderBeanObj.getCheckOption()); + proc.setString(9, tradingPurchaseOrderBeanObj.getCredisp()); + + proc.registerOutParameter(10, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(10); + + } catch (SQLException ex) { + // Logger.getLogger(tradingPurchaseOrderServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(tradingPurchaseOrderServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.setAttribute("message", message); + request.setAttribute("requisitionId", (message.split("#")[1]).trim()); + request.getRequestDispatcher("/Trading_JSP/TradingPO.jsp").forward(request, response); + + } + + } + + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { +processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + + + } \ No newline at end of file diff --git a/IPKS_Updated/src/src/java/Controller/transactionOperationServlet.java b/IPKS_Updated/src/src/java/Controller/transactionOperationServlet.java new file mode 100644 index 0000000..5c652d9 --- /dev/null +++ b/IPKS_Updated/src/src/java/Controller/transactionOperationServlet.java @@ -0,0 +1,467 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import DataEntryBean.transactionOperationBean; +import DataEntryBean.TDOperationBean; +import LoginDb.DbHandler; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.commons.beanutils.BeanUtils; +import javax.servlet.http.HttpSession; +import oracle.jdbc.OracleTypes; +import java.sql.*; +import java.util.*; + +/** + * + * @author Shub + */ +public class transactionOperationServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + /* TODO output your page here. You may use following sample code. */ + out.println(""); + out.println(""); + out.println(""); + out.println("Servlet transactionOperationServlet"); + out.println(""); + out.println(""); + out.println("

Servlet transactionOperationServlet at " + request.getContextPath() + "

"); + out.println(""); + out.println(""); + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //processRequest(request, response); + + Connection con = null; + CallableStatement proc = null; + String message = ""; + String Account_type = ""; + String JSP = ""; + HttpSession session = request.getSession(); + JSP = request.getParameter("screenName") == null ? "" : (request.getParameter("screenName")); + String ttype =request.getParameter("tranType"); + String ref_no=null; + String ac_no=null; + String txn_type=null; + + transactionOperationBean otransactionOperationBean = new transactionOperationBean(); + + try { + // BeanUtils.populate(otransactionOperationBean, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } catch (InvocationTargetException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + //For Loan + + if (JSP.equalsIgnoreCase("LoanTransactionOperation")) { + + try { + con = DbHandler.getDBConnection(); + try { + + proc = con.prepareCall("{ call operations.POST_Loan_TXN_authorization(?,?,?,?,?,?,?,?,?) }"); + + } catch (SQLException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + String pacsId = session.getAttribute("pacsId").toString(); + String makerId = session.getAttribute("user").toString(); + + proc.setString(1, pacsId); + proc.setString(2, makerId); + proc.setString(3, otransactionOperationBean.getTranType()); + proc.setString(4, otransactionOperationBean.getAccNo()); + proc.setString(5, otransactionOperationBean.getTrAmount()); + proc.setString(6, otransactionOperationBean.getChargeToDeduct()); + proc.setString(7, otransactionOperationBean.getNarration()); + proc.registerOutParameter(8, java.sql.Types.VARCHAR); + proc.registerOutParameter(9, java.sql.Types.VARCHAR); + + proc.execute(); + + // message = proc.getString(9); + Account_type = proc.getString(8); + + } catch (SQLException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + } + + //For KCC and Deposit + + }else if(JSP.equalsIgnoreCase("ShgTransaction")){ + + transactionOperationBean oTransactionBean=new transactionOperationBean(); + ArrayList alTransactionBean=new ArrayList (); + try { + con = DbHandler.getDBConnection(); + try { + + proc = con.prepareCall("{ call shg_member_details(?,?,?,?) }"); + + } catch (SQLException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + String pacsId = session.getAttribute("pacsId").toString(); + // String shgId = request.getParameter("accNo").toString(); + //String tranType=request.getParameter("tranType").toString(); + + + proc.setString(1, pacsId); + proc.setString(2, shgId); + proc.registerOutParameter(3, OracleTypes.CURSOR); + proc.registerOutParameter(4, java.sql.Types.VARCHAR); + + + proc.execute(); + + + // message = proc.getString(4); + + //ResultSet rs=(ResultSet)proc.getObject(3); + + while(rs.next()) + { + oTransactionBean=new transactionOperationBean(); + oTransactionBean.setMember_id(rs.getString("member_id")); + oTransactionBean.setMember_name(rs.getString("member_name")); + alTransactionBean.add(oTransactionBean); + request.setAttribute("displayFlag", "Y"); + } + + request.setAttribute("alTransactionBean", alTransactionBean); + request.setAttribute("message", message); + request.setAttribute("accNo", shgId); + //request.setAttribute("narration",request.getParameter("narration")); + request.setAttribute("tranTp", tranType); + // request.setAttribute("status", request.getParameter("status")); + // request.setAttribute("product_id", request.getParameter("product_id")); + // request.setAttribute("cust_no", request.getParameter("cust_no")); + // request.setAttribute("member_count", request.getParameter("member_count")); + + } catch (SQLException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + + request.getRequestDispatcher("/Deposit/DepositTransactionOperation.jsp").forward(request, response); + } + } + else { + + + try { + con = DbHandler.getDBConnection(); + try { + + + proc = con.prepareCall("{ call operations.POST_KCC_TXN_authorization(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + + } catch (SQLException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + String pacsId = session.getAttribute("pacsId").toString(); + String makerId = session.getAttribute("user").toString(); + // String twothouIN = (String) request.getParameter("twothouIN") == "" ? "0" : (request.getParameter("twothouIN")); + // String twothouOUT = request.getParameter("twothouOUT") == "" ? "0" : (request.getParameter("twothouOUT")); + // String fivehundredIN = request.getParameter("fivehundredIN") == "" ? "0" : (request.getParameter("fivehundredIN")); + // String fivehundredOUT = request.getParameter("fivehundredOUT") == "" ? "0" : (request.getParameter("fivehundredOUT")); + // String hundredIN = request.getParameter("hundredIN") == "" ? "0" : (request.getParameter("hundredIN")); + // String hundredOUT = request.getParameter("hundredOUT") == "" ? "0" : (request.getParameter("hundredOUT")); + // String fiftyIN = request.getParameter("fiftyIN") == "" ? "0" : (request.getParameter("fiftyIN")); + // String fiftyOUT = request.getParameter("fiftyOUT") == "" ? "0" : (request.getParameter("fiftyOUT")); + // String twentyIN = request.getParameter("twentyIN") == "" ? "0" : (request.getParameter("twentyIN")); + // String twentyOUT = request.getParameter("twentyOUT") == "" ? "0" : (request.getParameter("twentyOUT")); + // String tenIN = request.getParameter("tenIN") == "" ? "0" : (request.getParameter("tenIN")); + // String tenOUT = request.getParameter("tenOUT") == "" ? "0" : (request.getParameter("tenOUT")); + // String fiveIN = request.getParameter("fiveIN") == "" ? "0" : (request.getParameter("fiveIN")); + //String fiveOUT = request.getParameter("fiveOUT") == "" ? "0" : (request.getParameter("fiveOUT")); + //String twoIN = request.getParameter("twoIN") == "" ? "0" : (request.getParameter("twoIN")); + //String twoOUT = request.getParameter("twoOUT") == "" ? "0" : (request.getParameter("twoOUT")); + //String oneIN = request.getParameter("oneIN") == "" ? "0" : (request.getParameter("oneIN")); + //String oneOUT = request.getParameter("oneOUT") == "" ? "0" : (request.getParameter("oneOUT")); + //String fiftyPaisaIN = request.getParameter("fiftyPaisaIN") == "" ? "0" : (request.getParameter("fiftyPaisaIN")); + //String fiftyPaisaOUT = request.getParameter("fiftyPaisaOUT") == "" ? "0" : (request.getParameter("fiftyPaisaOUT")); + //String onePaisaIN = request.getParameter("onePaisaIN") == "" ? "0" : (request.getParameter("onePaisaIN")); + //String onePaisaOUT = request.getParameter("onePaisaOUT") == "" ? "0" : (request.getParameter("onePaisaOUT")); + //String twohundredIN = request.getParameter("twohundredIN") == "" ? "0" : (request.getParameter("twohundredIN")); + //String twohundredOUT = request.getParameter("twohundredOUT") == "" ? "0" : (request.getParameter("twohundredOUT")); + //String product_id=request.getParameter("product_id"); + + ac_no=otransactionOperationBean.getAccNo(); + txn_type=otransactionOperationBean.getTranType(); + + + + + proc.setString(1, pacsId); + proc.setString(2, makerId); + proc.setString(3, otransactionOperationBean.getTranType()); + proc.setString(4, otransactionOperationBean.getAccNo()); + proc.setString(5, otransactionOperationBean.getTrAmount()); + proc.setString(6, twothouIN); + proc.setString(7, fivehundredIN); + proc.setString(8, hundredIN); + proc.setString(9, fiftyIN); + proc.setString(10, twentyIN); + proc.setString(11, tenIN); + proc.setString(12, fiveIN); + proc.setString(13, twoIN); + proc.setString(14, oneIN); + proc.setString(15, fiftyPaisaIN); + proc.setString(16, onePaisaIN); + proc.setString(17, twothouOUT); + proc.setString(18, fivehundredOUT); + proc.setString(19, hundredOUT); + proc.setString(20, fiftyOUT); + proc.setString(21, twentyOUT); + proc.setString(22, tenOUT); + proc.setString(23, fiveOUT); + proc.setString(24, twoOUT); + proc.setString(25, oneOUT); + proc.setString(26, fiftyPaisaOUT); + proc.setString(27, onePaisaOUT); + proc.setString(28, otransactionOperationBean.getNarration()); + proc.registerOutParameter(29, java.sql.Types.VARCHAR); + proc.registerOutParameter(30, java.sql.Types.VARCHAR); + proc.setString(31, otransactionOperationBean.getIntAdjAmt()); + proc.setString(32, otransactionOperationBean.getTranMode()); + proc.setString(33, otransactionOperationBean.getTransferAcc()); + proc.registerOutParameter(34, java.sql.Types.VARCHAR); + proc.setString(35, twohundredIN); + proc.setString(36, twohundredOUT); + //proc.setString(34, product_id); + + + proc.execute(); + + //message = proc.getString(30); + Account_type = proc.getString(29); + ref_no=proc.getString(34); + + + + + } catch (SQLException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException e) { + System.out.println("Error occurred during proc close."); + } + try { + con.close(); + } catch (SQLException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during connection close."); + } + } + + + + con = DbHandler.getDBConnection(); + try { + + + proc = con.prepareCall("{ call shg_txn_insert(?,?,?,?,?) }"); + + } catch (SQLException ex) { + // Logger.getLogger(transactionOperationServlet.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } finally { + try { + con.close(); + } catch (SQLException e) { + // System.out.println(e.toString()); + System.out.println("Error occurred during connection close."); + } + } + + transactionOperationBean oTransactionBean=new transactionOperationBean(); + ArrayList alTransactionBean=new ArrayList (); + + try{ + + String mem_count=request.getParameter("member_count")== "" ? "0" :request.getParameter("member_count"); + int rec_count=0; + + if(txn_type.equalsIgnoreCase("1")) + { + txn_type="CR"; + } + else + { + txn_type="DR"; + } + + if(Integer.parseInt(mem_count)>0) + { + for (int i=1;i<=(Integer.parseInt(mem_count));i++) + { + String txn_amt=request.getParameter("txnAmount" + i); + + if(txn_amt.equals("")==true ) + { + txn_amt="0"; + } + + Integer amt=Integer.parseInt(txn_amt); + if(amt>0) + { + oTransactionBean=new transactionOperationBean(); + //oTransactionBean.setMember_id(request.getParameter("member_id" + i)); + //oTransactionBean.setTrAmount(request.getParameter("txnAmount" + i)); + alTransactionBean.add(oTransactionBean); + rec_count++; + } + + } + } + + if(rec_count>0) + { + for (int j = 0; j < alTransactionBean.size(); j++) { + + oTransactionBean=alTransactionBean.get(j); + + proc.setString(1,ref_no); + proc.setString(2,ac_no); + proc.setString(3,txn_type); + proc.setString(4,oTransactionBean.getMember_id()); + proc.setString(5,oTransactionBean.getTrAmount()); + proc.addBatch(); + } + + proc.executeBatch(); + } + + }catch (Exception e) { + System.out.println("Error occurred during processing."); + } + + } + + request.setAttribute("message", message); + + + if (Account_type.equalsIgnoreCase("1") || Account_type.equalsIgnoreCase("5") || Account_type.equalsIgnoreCase("2")) { + + if (Account_type.equalsIgnoreCase("2")) { + request.getRequestDispatcher("/Deposit/TDOperation.jsp").forward(request, response); + } else { + request.getRequestDispatcher("/Deposit/DepositTransactionOperation.jsp").forward(request, response); + } + + } else if (Account_type.equalsIgnoreCase("7")) { + + request.getRequestDispatcher("/Loan/LoanTransactionOperation.jsp").forward(request, response); + + } else { + + request.getRequestDispatcher("/transactionOperation.jsp").forward(request, response); + } + + + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/Dao/AccAmendDao.java b/IPKS_Updated/src/src/java/Dao/AccAmendDao.java new file mode 100644 index 0000000..5b771fb --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/AccAmendDao.java @@ -0,0 +1,435 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Dao; + +import DataEntryBean.AccountAmendBean; +import LoginDb.DbHandler; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; +import oracle.jdbc.OracleTypes; +import org.codehaus.jackson.map.ObjectMapper; + +/** + * + * @author 981898 + */ +public class AccAmendDao { + + public String searchAccounts(String accNo, String pacsId) { + Connection con = null; + Statement qry = null; + ResultSet rs = null; + List tdBeanList = new ArrayList(); + AccountAmendBean tdBean = null; + ObjectMapper objmap = new ObjectMapper(); + String jsonString = null; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + rs = qry.executeQuery(" select 'DEP' accType, da.key_1, " + + " dp.prod_name, " + + " da.customer_no, " + + " (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) cust_name, " + + " to_char(da.acct_open_dt, 'DD-MON-YYYY') accOpenDt, " + + " da.avail_bal " + + " from dep_account da, dep_product dp, kyc_hdr k " + + " where da.dep_prod_id = dp.id " + + " and da.customer_no = k.cif_no " +// + " and da.curr_status = 'O' " + + " and da.pacs_id = '" + pacsId + "'" + + " and da.key_1 = '" + accNo + "' " + + " union all " + + " select 'LON' accType, la.key_1, " + + " lp.prod_name, " + + " la.customer_no, " + + " (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) cust_name, " + + " to_char(la.acct_open_dt, 'DD-MON-YYYY') accOpenDt, " + + " la.outst_bal " + + " from loan_account la, loan_product lp, kyc_hdr k " + + " where la.loan_prod_id = lp.id " + + " and la.customer_no = k.cif_no " +// + " and la.curr_status in ('02', '03') " + + " and la.pacs_id = '" + pacsId + "'" + + " and la.key_1 = '" + accNo + "' " + + " order by 1 "); + + while (rs.next()) { + + tdBean = new AccountAmendBean(); + tdBean.setAccType(rs.getString(1) == null ? "NA" : rs.getString(1)); + tdBean.setAccNo(rs.getString(2) == null ? "NA" : rs.getString(2)); + tdBean.setProdName(rs.getString(3) == null ? "NA" : rs.getString(3)); + tdBean.setCif1(rs.getString(4) == null ? "NA" : rs.getString(4)); + tdBean.setCustName(rs.getString(5) == null ? "NA" : rs.getString(5)); + tdBean.setAccOpenDt(rs.getString(6) == null ? "NA" : rs.getString(6)); + tdBean.setAvailBal(rs.getString(7) == null ? "NA" : rs.getString(7)); + tdBeanList.add(tdBean); + } + jsonString = objmap.writeValueAsString(tdBeanList); + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in searchAccounts for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return jsonString; + } + + public String getAccDtl(String accNo, String pacsId, String accType) { + Connection con = null; + Statement qry = null; + ResultSet rs = null; + String s; + List tdBeanList = new ArrayList(); + AccountAmendBean tdBean = null; + ObjectMapper objmap = new ObjectMapper(); + String jsonString = null; + if (!accType.equalsIgnoreCase("DEP")) { + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + s = "select la.key_1, " + + " lp.prod_name,la.customer_no, " + + " (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) name1, " + + " to_date(la.acct_open_dt, 'DD-MON-YYYY') accOpenDt, " + + " la.outst_bal " + + " from loan_account la, loan_product lp, kyc_hdr k " + + " where la.loan_prod_id = lp.id " + + " and la.customer_no = k.cif_no " + + " and la.curr_status in ('02','03') " + + " and la.pacs_id = '" + pacsId + "' " + + " and la.key_1 = '" + accNo + "' "; + System.out.println(s); + rs = qry.executeQuery(s); + + while (rs.next()) { + + tdBean = new AccountAmendBean(); + tdBean.setAccNo(rs.getString(1) == null ? "NA" : rs.getString(1)); + tdBean.setProdName(rs.getString(2) == null ? "NA" : rs.getString(2)); + tdBean.setCif1(rs.getString(3) == null ? "NA" : rs.getString(3)); + tdBean.setCustName(rs.getString(4) == null ? "NA" : rs.getString(4)); + tdBeanList.add(tdBean); + } + jsonString = objmap.writeValueAsString(tdBeanList); + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in searchAccounts for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + } else { + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + s = "select da.key_1," + + " dp.prod_name," + + " da.customer_no cif1," + + " (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) name1," + + " nvl(da.cif_no2, 'NA')," + + " (case" + + " when da.cif_no2 is not null then" + + " (select nvl(h.first_name, '') || ' ' || nvl(h.middle_name, '') || ' ' ||" + + " nvl(h.last_name, '')" + + " from kyc_hdr h" + + " where h.cif_no = da.cif_no2)" + + " else" + + " 'NA'" + + " end) name2," + + " nvl(da.cif_no3, 'NA')," + + " (case" + + " when da.cif_no3 is not null then" + + " (select nvl(h.first_name, '') || ' ' || nvl(h.middle_name, '') || ' ' ||" + + " nvl(h.last_name, '')" + + " from kyc_hdr h" + + " where h.cif_no = da.cif_no3)" + + " else" + + " 'NA'" + + " end) name3," + + " nvl(da.cif_no4, 'NA')," + + " (case" + + " when da.cif_no4 is not null then" + + " (select nvl(h.first_name, '') || ' ' || nvl(h.middle_name, '') || ' ' ||" + + " nvl(h.last_name, '')" + + " from kyc_hdr h" + + " where h.cif_no = da.cif_no4)" + + " else" + + " 'NA'" + + " end) name4," + + " nvl(da.cif_no5, 'NA')," + + " (case" + + " when da.cif_no5 is not null then" + + " (select nvl(h.first_name, '') || ' ' || nvl(h.middle_name, '') || ' ' ||" + + " nvl(h.last_name, '')" + + " from kyc_hdr h" + + " where h.cif_no = da.cif_no5)" + + " else" + + " 'NA'" + + " end) name5," + + " nvl(da.cif_no6, 'NA')," + + " (case" + + " when da.cif_no6 is not null then" + + " (select nvl(h.first_name, '') || ' ' || nvl(h.middle_name, '') || ' ' ||" + + " nvl(h.last_name, '')" + + " from kyc_hdr h" + + " where h.cif_no = da.cif_no6)" + + " else" + + " 'NA'" + + " end) name6," + + " nvl(da.cif_no7, 'NA')," + + " (case" + + " when da.cif_no7 is not null then" + + " (select nvl(h.first_name, '') || ' ' || nvl(h.middle_name, '') || ' ' ||" + + " nvl(h.last_name, '')" + + " from kyc_hdr h" + + " where h.cif_no = da.cif_no7)" + + " else" + + " 'NA'" + + " end) name7," + + " nvl(da.cif_no8, 'NA')," + + " (case" + + " when da.cif_no8 is not null then" + + " (select nvl(h.first_name, '') || ' ' || nvl(h.middle_name, '') || ' ' ||" + + " nvl(h.last_name, '')" + + " from kyc_hdr h" + + " where h.cif_no = da.cif_no8)" + + " else" + + " 'NA'" + + " end) name8," + + " nvl(da.cif_no9, 'NA')," + + " (case" + + " when da.cif_no9 is not null then" + + " (select nvl(h.first_name, '') || ' ' || nvl(h.middle_name, '') || ' ' ||" + + " nvl(h.last_name, '')" + + " from kyc_hdr h" + + " where h.cif_no = da.cif_no9)" + + " else" + + " 'NA'" + + " end) name9," + + " nvl(da.cif_no10, 'NA')," + + " (case" + + " when da.cif_no10 is not null then" + + " (select nvl(h.first_name, '') || ' ' || nvl(h.middle_name, '') || ' ' ||" + + " nvl(h.last_name, '')" + + " from kyc_hdr h" + + " where h.cif_no = da.cif_no10)" + + " else" + + " 'NA'" + + " end) name10," + + " nvl(da.cif_no11, 'NA')," + + " (case" + + " when da.cif_no11 is not null then" + + " (select nvl(h.first_name, '') || ' ' || nvl(h.middle_name, '') || ' ' ||" + + " nvl(h.last_name, '')" + + " from kyc_hdr h" + + " where h.cif_no = da.cif_no11)" + + " else" + + " 'NA'" + + " end) name11," + + " to_char(da.acct_open_dt, 'DD-MON-YYYY') accOpenDt," + + " da.avail_bal" + + " from dep_account da, dep_product dp, kyc_hdr k" + + " where da.dep_prod_id = dp.id" + + " and da.customer_no = k.cif_no" + // + " and da.curr_status = 'O'" + + " and da.pacs_id = '" + pacsId + "'" + + " and da.key_1 = '" + accNo + "'"; + System.out.println(s); + rs = qry.executeQuery(s); + + while (rs.next()) { + + tdBean = new AccountAmendBean(); + tdBean.setAccNo(rs.getString(1) == null ? "NA" : rs.getString(1)); + tdBean.setProdName(rs.getString(2) == null ? "NA" : rs.getString(2)); + tdBean.setCif1(rs.getString(3) == null ? "NA" : rs.getString(3)); + tdBean.setCustName(rs.getString(4) == null ? "NA" : rs.getString(4)); + tdBean.setCif2(rs.getString(5)); + tdBean.setName2(rs.getString(6)); + tdBean.setCif3(rs.getString(7)); + tdBean.setName3(rs.getString(8)); + tdBean.setCif4(rs.getString(9)); + tdBean.setName4(rs.getString(10)); + tdBean.setCif5(rs.getString(11)); + tdBean.setName5(rs.getString(12)); + tdBean.setCif6(rs.getString(13)); + tdBean.setName6(rs.getString(14)); + tdBean.setCif7(rs.getString(15)); + tdBean.setName7(rs.getString(16)); + tdBean.setCif8(rs.getString(17)); + tdBean.setName8(rs.getString(18)); + tdBean.setCif9(rs.getString(19)); + tdBean.setName9(rs.getString(20)); + tdBean.setCif10(rs.getString(21)); + tdBean.setName10(rs.getString(22)); + tdBean.setCif11(rs.getString(23)); + tdBean.setName11(rs.getString(24)); + tdBeanList.add(tdBean); + } + jsonString = objmap.writeValueAsString(tdBeanList); + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in searchAccounts for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + } + + return jsonString; + } + + public String getNewCif(String newCif, String pacsId) { + Connection con = null; + Statement qry = null; + ResultSet rs = null; + List tdBeanList = new ArrayList(); + AccountAmendBean tdBean = null; + ObjectMapper objmap = new ObjectMapper(); + String jsonString = null; + String s = ""; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + s = "select t.cif_no," + + " (t.first_name ||" + + " nvl2(t.middle_name, ' ' || t.middle_name, '') ||" + + " nvl2(t.last_name, ' ' || t.last_name, '')) name," + + " t.guardian_name" + + " from kyc_hdr t" + + " where t.cif_no = '" + newCif + "' " + + " and t.pacs_id in (select pacs_id from pacs_master pm where pm.head_pacs_id in " + + " (select head_pacs_id from pacs_master where pacs_id = '" + pacsId + "')) order by 2"; + System.out.println(s); + rs = qry.executeQuery(s); + + while (rs.next()) { + + tdBean = new AccountAmendBean(); + tdBean.setCif1(rs.getString(1) == null ? "NA" : rs.getString(1)); + tdBean.setCustName(rs.getString(2) == null ? "NA" : rs.getString(2)); + tdBean.setGuardianName(rs.getString(3) == null ? "NA" : rs.getString(3)); + tdBeanList.add(tdBean); + } + jsonString = objmap.writeValueAsString(tdBeanList); + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in getNewCif for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return jsonString; + } + + public String updateCif(String user, String pacsId, String accNo, AccountAmendBean oAccountAmendBean, String remarks) { + Connection con = null; + CallableStatement proc = null; + String retnMsg = null; + String s = ""; + + try { + con = DbHandler.getDBConnection(); + try { + proc = con.prepareCall("{ call operations1.ACCT_CIF_UPDATE(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}"); + + } catch (SQLException ex) { + // Logger.getLogger(AccAmendDao.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + + proc.setString(1, user); + proc.setString(2, pacsId); + proc.setString(3, accNo); + proc.setString(4, oAccountAmendBean.getCif1()); + proc.setString(5, oAccountAmendBean.getCif2()); + proc.setString(6, oAccountAmendBean.getCif3()); + proc.setString(7, oAccountAmendBean.getCif4()); + proc.setString(8, oAccountAmendBean.getCif5()); + proc.setString(9, oAccountAmendBean.getCif6()); + proc.setString(10, oAccountAmendBean.getCif7()); + proc.setString(11, oAccountAmendBean.getCif8()); + proc.setString(12, oAccountAmendBean.getCif9()); + proc.setString(13, oAccountAmendBean.getCif10()); + proc.setString(14, oAccountAmendBean.getCif11()); + proc.setString(15, remarks); + proc.registerOutParameter(16, java.sql.Types.VARCHAR); + + proc.execute(); + // retnMsg = proc.getString(16); + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in getNewCif for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return retnMsg; + } +} diff --git a/IPKS_Updated/src/src/java/Dao/AgentLimitDao.java b/IPKS_Updated/src/src/java/Dao/AgentLimitDao.java new file mode 100644 index 0000000..6b94684 --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/AgentLimitDao.java @@ -0,0 +1,68 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Dao; + +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; +import oracle.jdbc.OracleTypes; + +/** + * + * @author 1004242 + */ +public class AgentLimitDao { + + public String createUpdateAgentLimit(String tellerId, String pacsId, String agentId, String limit) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + String txnType; + int count = 0; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + rs = qry.executeQuery("select count(*) from DDS_AGENT_LIMIT where agent_id='" + agentId + "' and pacs_id='" + pacsId + "'"); + while (rs.next()) { + count = Integer.parseInt(rs.getString(1)); + } + txnType = (count > 0) ? "UPDATE" : "CREATE"; + proc = con.prepareCall("{ call operations1.DDS_AGENT_LIMIT(?,?,?,?,?,?) }"); + + proc.setString(1, tellerId); + proc.setString(2, pacsId); + proc.setString(3, agentId); + proc.setString(4, limit); + proc.setString(5, txnType); + proc.registerOutParameter(6, OracleTypes.VARCHAR); + + proc.executeUpdate(); + + // res = proc.getString(6);//error message from dds procedure + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Exception occured in createUpdateAgentLimit for user Id :" + tellerId); + res = "Exception occured in createUpdateAgentLimit for user Id :" + tellerId; + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return res; + } +} diff --git a/IPKS_Updated/src/src/java/Dao/AgentMappingDao.java b/IPKS_Updated/src/src/java/Dao/AgentMappingDao.java new file mode 100644 index 0000000..f922170 --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/AgentMappingDao.java @@ -0,0 +1,61 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Dao; + +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import oracle.jdbc.OracleTypes; + +/** + * + * @author 1004242 + */ +public class AgentMappingDao { + + + public String createOrUpdateAgentMapping(String tellerId, String pacsId,String accNo,String agntId,String txnType ) { + Connection con = null; + CallableStatement proc = null; + String res = null; + System.out.println("CreateOrUpdateAgentMapping for user Id :" + tellerId +" ops type:"+txnType); + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call operations1.DDS_ACCT_AGENT_MAPPING(?,?,?,?,?,?) }"); + + proc.setString(1, tellerId); + proc.setString(2, pacsId); + proc.setString(3, accNo); + proc.setString(4, agntId); + proc.setString(5, txnType); + proc.registerOutParameter(6, OracleTypes.VARCHAR); + + + + proc.executeUpdate(); + + // res = proc.getString(6);//error message from dds procedure + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in createOrUpdateAgentMapping for user Id :" + tellerId); + System.out.println("Error occurred during processing."); + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return res; + } + +} diff --git a/IPKS_Updated/src/src/java/Dao/AmendInterestDao.java b/IPKS_Updated/src/src/java/Dao/AmendInterestDao.java new file mode 100644 index 0000000..453fd15 --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/AmendInterestDao.java @@ -0,0 +1,62 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Dao; + + +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import oracle.jdbc.OracleTypes; + +/** + * + * @author 1242938 + */ +public class AmendInterestDao { + + public String AmendInterestProc(String pacsId, String accNo, String newCurrInt, String newPenalInt, String newNpaInt, String tellerId) { + Connection con = null; + CallableStatement proc = null; + String res = null; + + + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call operations2.LOAN_OUSTINT_UPDATE(?,?,?,?,?,?,?) }"); + + proc.setString(1, pacsId); + proc.setString(2, accNo); + proc.setString(3, newCurrInt); + proc.setString(4, newPenalInt); + proc.setString(5, newNpaInt); + proc.setString(6, tellerId); + proc.registerOutParameter(7, OracleTypes.VARCHAR); + + + proc.executeUpdate(); + + // res = proc.getString(7);//error message from dds procedure + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in AmendInterestProc for user Id :" + tellerId); + // res= "Error occured. Please try again"; + System.out.println("Error occurred during processing."); + } finally { + try { + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return res; + } + + +} diff --git a/IPKS_Updated/src/src/java/Dao/BGLAccountCreationDao.java b/IPKS_Updated/src/src/java/Dao/BGLAccountCreationDao.java new file mode 100644 index 0000000..1ab2204 --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/BGLAccountCreationDao.java @@ -0,0 +1,59 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Dao; + + +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import oracle.jdbc.OracleTypes; + +/** + * + * @author 1242938 + */ +public class BGLAccountCreationDao { + + public String BGLAccountCreationServletProc(String glProductId, String pacsId, String glName) { + Connection con = null; + CallableStatement proc = null; + String res = null; + + + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call operations2.create_gl_account_AL(?,?,?,?) }"); + + proc.setString(1, glProductId); + proc.setString(2, pacsId); + proc.setString(3, glName); + proc.registerOutParameter(4, OracleTypes.VARCHAR); + + + proc.executeUpdate(); + + // res = proc.getString(4);//error message + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in BGLAccountCreationServletProc for :" + glName); + // res= "Error occured. Please try again"; + System.out.println("Error occurred during processing."); + } finally { + try { + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return res; + } + + +} diff --git a/IPKS_Updated/src/src/java/Dao/BulkMarkDao.java b/IPKS_Updated/src/src/java/Dao/BulkMarkDao.java new file mode 100644 index 0000000..8a63b1d --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/BulkMarkDao.java @@ -0,0 +1,729 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Dao; + +import DataEntryBean.TransactioDetailsBean; +import LoginDb.DbHandler; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.List; +import oracle.jdbc.OracleTypes; +import org.codehaus.jackson.map.ObjectMapper; + +/** + * + * @author 1004242 + */ +public class BulkMarkDao { + + public String bulkMarkAccounts(String accNo, String pacsId) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + List tdBeanList = new ArrayList(); + TransactioDetailsBean tdBean = null; + ObjectMapper objmap = new ObjectMapper(); + String jsonString = null; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + rs = qry.executeQuery(" select * from ( select (select p.prod_name from dep_product p where p.id=d.dep_prod_id) as prod,d.key_1," + +" d.customer_no,(select r.first_name||' '||r.middle_name||' '||r.last_name from kyc_hdr r where r.cif_no=d.customer_no) as cust_name," + +" nvl((select r.guardian_name from kyc_hdr r where r.cif_no=d.customer_no),'NA') as guardian_name,(select r.bank_cif from kyc_hdr r where r.cif_no=d.customer_no) as bank_cif " + +" from dep_account d where d.key_1 not in (select k.key_1 from bulk_acct_mark k where k.pacs_id='"+pacsId+"' ) and d.dep_prod_id in (select p.id from dep_product p where p.prod_code in ('1101','1102' )" + +" and substr(p.int_cat,0,1)='1') and trim(d.link_accno) is null and d.pacs_id='"+pacsId+"' and d.key_1 = '"+accNo+"' and d.curr_status='O') where bank_cif is null"); + + while (rs.next()) { + + tdBean = new TransactioDetailsBean(); + tdBean.setAuthorisedQ(rs.getString("prod")==null?"NA":rs.getString("prod")); + tdBean.setRejectedQ(rs.getString("key_1")==null?"NA":rs.getString("key_1")); + tdBean.setPendingQ(rs.getString("cust_name")==null?"NA":rs.getString("cust_name")); + tdBean.setCashIn(rs.getString("guardian_name")==null?"NA":rs.getString("guardian_name")); + tdBeanList.add(tdBean); + } + jsonString = objmap.writeValueAsString(tdBeanList); + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in bulkMarkAccounts for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return jsonString; + } + public String bulkMarkAccounts_Exs(String accNo, String pacsId) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + List tdBeanList = new ArrayList(); + TransactioDetailsBean tdBean = null; + ObjectMapper objmap = new ObjectMapper(); + String jsonString = null; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + rs = qry.executeQuery(" select * from ( select (select p.prod_name from dep_product p where p.id=d.dep_prod_id) as prod,d.key_1," + +" d.customer_no,(select r.first_name||' '||r.middle_name||' '||r.last_name from kyc_hdr r where r.cif_no=d.customer_no) as cust_name," + +" nvl((select r.guardian_name from kyc_hdr r where r.cif_no=d.customer_no),'NA') as guardian_name,(select r.bank_cif from kyc_hdr r where r.cif_no=d.customer_no) as bank_cif " + +" from dep_account d where d.key_1 not in (select k.key_1 from bulk_acct_mark k where k.pacs_id='"+pacsId+"' ) and d.dep_prod_id in (select p.id from dep_product p where p.prod_code in ('1101','1102' )" + +" and substr(p.int_cat,0,1)='1') and trim(d.link_accno) is null and d.pacs_id='"+pacsId+"' and d.key_1 = '"+accNo+"' and d.curr_status='O') where bank_cif is not null"); + + while (rs.next()) { + + tdBean = new TransactioDetailsBean(); + tdBean.setAuthorisedQ(rs.getString("prod")==null?"NA":rs.getString("prod")); + tdBean.setRejectedQ(rs.getString("key_1")==null?"NA":rs.getString("key_1")); + tdBean.setPendingQ(rs.getString("cust_name")==null?"NA":rs.getString("cust_name")); + tdBean.setCashIn(rs.getString("guardian_name")==null?"NA":rs.getString("guardian_name")); + tdBean.setBankCif(rs.getString("bank_cif")==null?"NA":rs.getString("bank_cif")); + tdBeanList.add(tdBean); + } + jsonString = objmap.writeValueAsString(tdBeanList); + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in bulkMarkAccounts for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return jsonString; + } + + public String markBulkAccount(String accno , String pacsId , String tellerId, String markType) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + String txnType; + int count = 0; + + try { + con = DbHandler.getDBConnection(); + + + proc = con.prepareCall("{ call operations1.BULK_ACCT_MARKING(?,?,?,?,?) }"); + + proc.setString(1, pacsId); + proc.setString(2, accno); + proc.setString(3, tellerId); + proc.registerOutParameter(4, OracleTypes.VARCHAR); + proc.setString(5, markType); + + proc.executeUpdate(); + + // res = proc.getString(4);//error message from dds procedure + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in markBulkAccount for pacs Id :" + pacsId); + res = "Exception occured in markBulkAccount for pacs Id :" + pacsId; + System.out.println("Error occurred during processing."); + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return "{ \"result\": \" "+res+"\" }" ; + } + + public String markBulkAccount_Exs(String accno , String pacsId , String tellerId, String markType) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + String txnType; + int count = 0; + + try { + con = DbHandler.getDBConnection(); + + + proc = con.prepareCall("{ call operations1.BULK_ACCT_MARKING(?,?,?,?,?) }"); + + proc.setString(1, pacsId); + proc.setString(2, accno); + proc.setString(3, tellerId); + proc.registerOutParameter(4, OracleTypes.VARCHAR); + proc.setString(5, markType); + + proc.executeUpdate(); + + // res = proc.getString(4);//error message from dds procedure + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in markBulkAccount for pacs Id :" + pacsId); + res = "Exception occured in markBulkAccount for pacs Id :" + pacsId; + System.out.println("Error occurred during processing."); + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return "{ \"result\": \" "+res+"\" }" ; + } + + public String unmarkAccountFromAuth(String accNo, String pacsId, String tellerId) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + int rs = 0; + List tdBeanList = new ArrayList(); + TransactioDetailsBean tdBean = null; + ObjectMapper objmap = new ObjectMapper(); + String jsonString = null; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + rs = qry.executeUpdate("insert into bulk_acct_mark_hist (pacs_id, key_1, mark_teller_id, tran_dt, tran_tym, status, remarks, send_teller_id, send_dt, send_tym) select pacs_id, key_1, mark_teller_id, tran_dt, tran_tym, status, 'UNMARKED', " + + " "+tellerId+ ", (select system_date from system_date), to_char(SYSTIMESTAMP, 'DD-MON-RRHH12:MI:SS') from bulk_acct_mark where KEY_1= '"+accNo+"' and PACS_ID = '"+pacsId+"'"); + rs = qry.executeUpdate("update bulk_acct_mark set status = 'RBA' where KEY_1= '"+accNo+"' and PACS_ID = '"+pacsId+"'"); + + if(rs != 0) + { + res="Account has been unmarked successfully"; + }else + { + res="Account unmarking unsuccessfull"; + } + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in bulkMarkAccountsAuth for pacs Id :" + pacsId); + res = "Exception occured in bulkMarkAccountsAuth for pacs Id :" + pacsId; + System.out.println("Error occurred during processing."); + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return "{ \"result\": \" "+res+"\" }" ; + + + } + + public String bulkMarkAccountsAuth( String pacsId ) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + List tdBeanList = new ArrayList(); + TransactioDetailsBean tdBean = null; + ObjectMapper objmap = new ObjectMapper(); + String jsonString = null; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + rs = qry.executeQuery(" select (select p.prod_name from dep_product p where p.id=d.dep_prod_id) as prod,d.key_1," + +" d.customer_no,(select r.first_name||' '||r.middle_name||' '||r.last_name from kyc_hdr r where r.cif_no=d.customer_no) as cust_name," + +" nvl((select r.guardian_name from kyc_hdr r where r.cif_no=d.customer_no),'NA') as guardian_name," + +" (select (case k.id_type when '06' then 'VOTER CARD' when '47' then 'AADHAR CARD' when '08' then 'RATION CARD' when '09' then 'EMPLOYER ID CARD' when '04' then 'PASSPORT' " + +" when '10' then 'DRIVING LICENCE' when '41' then 'INTRODUCED BY MEMBER' when '07' then 'PAN CARD' when '38' then 'BOARD RESOLUTION' end) from bulk_acct_mark k where k.key_1 = d.key_1 and k.pacs_id = '"+pacsId+"' " + +" and k.status = 'A' and k.mark_type = 'N') id_type, (select k.id_number from bulk_acct_mark k where k.key_1 = d.key_1 and k.pacs_id = '"+pacsId+"' and k.status = 'A' and k.mark_type = 'N') id_number ," + + +" (select (case k.id_type_two when '06' then 'VOTER CARD' when '47' then 'AADHAR CARD' when '08' then 'RATION CARD' when '09' then 'EMPLOYER ID CARD' when '04' then 'PASSPORT' " + +" when '10' then 'DRIVING LICENCE' when '41' then 'INTRODUCED BY MEMBER' when '07' then 'PAN CARD' when '38' then 'BOARD RESOLUTION' end) from bulk_acct_mark k where k.key_1 = d.key_1 and k.pacs_id = '"+pacsId+"' " + +" and k.status = 'A' and k.mark_type = 'N') id_type_two, (select k.id_number_two from bulk_acct_mark k where k.key_1 = d.key_1 and k.pacs_id = '"+pacsId+"' and k.status = 'A' and k.mark_type = 'N') id_number_two " + + +" from dep_account d where d.dep_prod_id in (select p.id from dep_product p where p.prod_code in ('1101','1102' )" + +" and substr(p.int_cat,0,1)='1') and trim(d.link_accno) is null and d.pacs_id='"+pacsId+"' and d.key_1 in ( select key_1 from bulk_acct_mark where pacs_id= '"+pacsId+"' and status = 'A' and mark_type= 'N') "); + + while (rs.next()) { + + tdBean = new TransactioDetailsBean(); + tdBean.setAuthorisedQ(rs.getString("prod")==null?"NA":rs.getString("prod")); + tdBean.setRejectedQ(rs.getString("key_1")==null?"NA":rs.getString("key_1")); + tdBean.setPendingQ(rs.getString("cust_name")==null?"NA":rs.getString("cust_name")); + tdBean.setCashIn(rs.getString("guardian_name")==null?"NA":rs.getString("guardian_name")); + tdBean.setCashOut(rs.getString("id_type")==null?"NA":rs.getString("id_type")); + tdBean.setGuardianName(rs.getString("id_number")==null?"NA":rs.getString("id_number")); + tdBean.setIdTypeTwo(rs.getString("id_type_two")==null?"NA":rs.getString("id_type_two")); + tdBean.setIdNumberTwo(rs.getString("id_number_two")==null?"NA":rs.getString("id_number_two")); + tdBeanList.add(tdBean); + } + jsonString = objmap.writeValueAsString(tdBeanList); + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in bulkMarkAccounts for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return jsonString; + } + + public String bulkMarkAccountsAuth_Exs( String pacsId ) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + List tdBeanList = new ArrayList(); + TransactioDetailsBean tdBean = null; + ObjectMapper objmap = new ObjectMapper(); + String jsonString = null; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + rs = qry.executeQuery(" select (select p.prod_name from dep_product p where p.id=d.dep_prod_id) as prod,d.key_1," + +" d.customer_no,(select r.first_name||' '||r.middle_name||' '||r.last_name from kyc_hdr r where r.cif_no=d.customer_no) as cust_name," + +" nvl((select r.guardian_name from kyc_hdr r where r.cif_no=d.customer_no),'NA') as guardian_name," + +" (select (case k.id_type when '06' then 'VOTER CARD' when '47' then 'AADHAR CARD' when '08' then 'RATION CARD' when '09' then 'EMPLOYER ID CARD' when '04' then 'PASSPORT' " + +" when '10' then 'DRIVING LICENCE' when '41' then 'INTRODUCED BY MEMBER' when '07' then 'PAN CARD' when '38' then 'BOARD RESOLUTION' end) from bulk_acct_mark k where k.key_1 = d.key_1 and k.pacs_id = '"+pacsId+"' " + +" and k.status = 'A' and k.mark_type = 'E') id_type, (select k.id_number from bulk_acct_mark k where k.key_1 = d.key_1 and k.pacs_id = '"+pacsId+"' and k.status = 'A' and k.mark_type = 'E') id_number, " + +" (select r.bank_cif from kyc_hdr r where r.cif_no=d.customer_no) as bank_cif " + +" from dep_account d where d.dep_prod_id in (select p.id from dep_product p where p.prod_code in ('1101','1102' )" + +" and substr(p.int_cat,0,1)='1') and trim(d.link_accno) is null and d.pacs_id='"+pacsId+"' and d.key_1 in ( select key_1 from bulk_acct_mark where pacs_id= '"+pacsId+"' and status = 'A' and mark_type= 'E') "); + + while (rs.next()) { + + tdBean = new TransactioDetailsBean(); + tdBean.setAuthorisedQ(rs.getString("prod")==null?"NA":rs.getString("prod")); + tdBean.setRejectedQ(rs.getString("key_1")==null?"NA":rs.getString("key_1")); + tdBean.setPendingQ(rs.getString("cust_name")==null?"NA":rs.getString("cust_name")); + tdBean.setCashIn(rs.getString("guardian_name")==null?"NA":rs.getString("guardian_name")); + tdBean.setCashOut(rs.getString("id_type")==null?"NA":rs.getString("id_type")); + tdBean.setGuardianName(rs.getString("id_number")==null?"NA":rs.getString("id_number")); + tdBean.setBankCif(rs.getString("bank_cif")==null?"NA":rs.getString("bank_cif")); + tdBeanList.add(tdBean); + } + jsonString = objmap.writeValueAsString(tdBeanList); + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in bulkMarkAccounts for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return jsonString; + } + + public String authoriseBulk(String pacsId , String tellerId, String mark) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + String txnType; + int count = 0; + + try { + con = DbHandler.getDBConnection(); + + + proc = con.prepareCall("{ call generate_bulk_acct_auto(?,?,?,?) }"); + + + proc.setString(1, pacsId); + proc.setString(2, tellerId); + proc.setString(4, mark); + + proc.registerOutParameter(3, OracleTypes.VARCHAR); + + proc.executeUpdate(); + + // res = proc.getString(3);//error message from dds procedure + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in authoriseBulk for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + res = "Something went wrong. Please try agian."; + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return res ; + } + + public File gerateBulkFlatFile1( String pacsId , String tellerId ) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + File bulkFile = null; + boolean bool = false; + + BufferedWriter writer = null; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + rs = qry.executeQuery("select " + + " rpad(nvl(trim(h.record_type),' '),2,' ')||' '|| " + + " rpad(nvl(trim(h.branch_number),' '),5,' ')||' '|| " + + " rpad(nvl(trim(h.account_type),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.interest_category),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.segment_code),' '),4,' ')|| ' '|| " + + " rpad(nvl(trim(h.term_length),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.term_basis),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.term_amount),' '),10,' ')||' '|| " + + " rpad(nvl(trim(h.account_open_date),' '),8,' ')||' '|| " + + " rpad(nvl(trim(h.term_frequency),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.Term_Days),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.term_months),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.term_years),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.installment_due_date),' '),2,' ')||' '|| " + + " rpad(nvl(trim(h.installment_frequency),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.language_code),' '),2,' ')||' '|| " + + " rpad(nvl(trim(h.teller_number),' '),7,' ')||' '|| " + + " rpad(nvl(trim(h.stop_required),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.data_a),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.interest_payment_method_trap),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.backdate_account_opening_flag),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.existing_cif),' '),16,' ')||' '|| " + + " rpad(nvl(trim(h.transfer_account_number),' '),16,' ')||' '|| " + + " lpad(nvl(trim(h.description_1),' '),50,' ')||' '|| " + + " rpad(nvl(trim(h.sal_or_other),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.employer_name),' '),60,' ')||' '|| " + + " rpad(nvl(trim(h.beneficiary_name),' '),118,' ') " + + " from hh_format_auto h where h.pacs_id= "+pacsId+" "); + + while (rs.next()) { + + bulkFile = new File("BulkFlatFile" + System.currentTimeMillis() + ".txt"); + writer = new BufferedWriter(new FileWriter(bulkFile)); + + String header = rs.getString(1); + writer.write(header); + + + } + + qry = null; + rs = null; + if (bulkFile != null) { + qry = con.createStatement(); + rs = qry.executeQuery("select " + + "rpad(nvl(trim(t.record_type),' '),2,' ')|| " + + "rpad(nvl(trim(t.student_number),' '),15,' ')|| " + + "rpad(nvl(trim(t.first_name),' '),40,' ')|| " + + "rpad(nvl(trim(t.middle_name),' '),40,' ')|| " + + "rpad(nvl(trim(t.last_name),' '),40,' ')|| " + + "rpad(nvl(trim(t.add_1),' '),40,' ')|| " + + "rpad(nvl(trim(t.add_2),' '),40,' ')|| " + + "rpad(nvl(trim(t.add_3),' '),24,' ')|| " + + "rpad(nvl(trim(t.city_code),' '),3,' ')|| " + + "rpad(nvl(trim(t.state_code),' '),3,' ')|| " + + "rpad(nvl(trim(t.po_number),' '),8,' ')|| " + + "rpad(nvl(trim(t.phn_number),' '),12,' ')|| " + + "rpad(nvl(trim(t.id_type),' '),2,' ')|| " + + "rpad(nvl(trim(t.id_number),' '),14,' ')|| " + + "rpad(nvl(trim(t.birth_date),' '),8,' ')|| " + + "rpad(nvl(trim(t.gender),' '),1,' ')|| " + + "rpad(nvl(trim(t.mother_name),' '),25,' ')|| " + + "rpad(nvl(trim(t.residential_status),' '),1,' ')|| " + + "rpad(nvl(trim(t.nationality_code),' '),3,' ')|| " + + "rpad(nvl(trim(t.customer_type),' '),8,' ')|| " + + "rpad(nvl(trim(t.title),' '),2,' ') " + + "from BULK_ACC_TRICKLEFEED_FILE_auto t where t.pacs_id="+pacsId+" and " + + "t.status='R' and t.mark_type='N' and t.teller_id="+tellerId+" "); +// + "(select system_date from system_date) "); + + while (rs.next()) { + + writer.write("\r\n"); + //writer.newLine(); + String line1 = rs.getString(1); + //line1 = line1.replaceAll("\\r|\\n|\\r|\\n", ""); + //String line = rs.getString(1).substring(0, rs.getString(1).length()-2); + //line1 = line1.trim(); + writer.write(line1); + + } + } + + if(writer != null) + { + writer.flush(); + writer.close(); + } + //updating sttaus of the generated bulks to S + updateBulkAuthStatusToS(pacsId); + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in bulkMarkAccounts for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + bulkFile = null; + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return bulkFile; + } + + public File gerateBulkFlatFile2( String pacsId , String tellerId ) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + File bulkFile = null; + boolean bool = false; + + BufferedWriter writer = null; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + rs = qry.executeQuery("select " + + " rpad(nvl(trim(h.record_type),' '),2,' ')||' '|| " + + " rpad(nvl(trim(h.branch_number),' '),5,' ')||' '|| " + + " rpad(nvl(trim(h.account_type),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.interest_category),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.segment_code),' '),4,' ')|| ' '|| " + + " rpad(nvl(trim(h.term_length),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.term_basis),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.term_amount),' '),10,' ')||' '|| " + + " rpad(nvl(trim(h.account_open_date),' '),8,' ')||' '|| " + + " rpad(nvl(trim(h.term_frequency),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.Term_Days),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.term_months),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.term_years),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.installment_due_date),' '),2,' ')||' '|| " + + " rpad(nvl(trim(h.installment_frequency),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.language_code),' '),2,' ')||' '|| " + + " rpad(nvl(trim(h.teller_number),' '),7,' ')||' '|| " + + " rpad(nvl(trim(h.stop_required),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.data_a),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.interest_payment_method_trap),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.backdate_account_opening_flag),' '),1,' ')||' '|| " + + " lpad(nvl(substr(t.bank_cif, 1, length(t.bank_cif) - 1), ' '),16,'0') || ' ' || " + //+ " rpad(nvl(trim(h.existing_cif),' '),16,' ')||' '|| " + + " rpad(nvl(trim(h.transfer_account_number),' '),16,' ')||' '|| " + + " rpad(nvl(trim('BULK ACCOUNT'), ' '), 50, ' ') || ' ' || " + //+ " lpad(nvl(trim(h.description_1),' '),50,' ')||' '|| " + + " rpad(nvl(trim(h.sal_or_other),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.employer_name),' '),60,' ')||' '|| " + + " rpad(nvl(trim(h.beneficiary_name),' '),118,' ') " + + " from hh_format_auto h, BULK_ACC_TRICKLEFEED_FILE_auto t where h.pacs_id = t.pacs_id and " + + " h.pacs_id= "+pacsId+" and t.pacs_id="+pacsId+" and t.status='R' and t.mark_type='E' and t.teller_id="+tellerId+" "); + + bulkFile = new File("BulkFlatFile" + System.currentTimeMillis() + ".txt"); + writer = new BufferedWriter(new FileWriter(bulkFile)); + while (rs.next()) { + + //writer.newLine(); + String line1 = rs.getString(1); + //line1 = line1.replaceAll("\\r|\\n|\\r|\\n", ""); + //String line = rs.getString(1).substring(0, rs.getString(1).length()-2); + //line1 = line1.trim(); + writer.write(line1); + writer.write("\r\n"); + writer.write("DD000000000000000 5320000000000000000000000000 00000000 "); + writer.write("\r\n"); + } + + if(writer != null) + { + writer.flush(); + writer.close(); + } + //updating sttaus of the generated bulks to S + updateBulkAuthStatusToS_Exs(pacsId); + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in bulkMarkAccounts for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + bulkFile = null; + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return bulkFile; + } + + + public void updateBulkAuthStatusToS(String pacsId) { + Connection con = null; + Statement qry = null; + ResultSet rs = null; + int count = 0; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + count = qry.executeUpdate(" update bulk_acct_mark k set k.status='S' where k.pacs_id= "+pacsId +" and k.status='R' and k.mark_type='N' " + +" and k.key_1 in ( select trim(o.add_1) from BULK_ACC_TRICKLEFEED_FILE_auto o where o.status='R' and o.mark_type='N' )"); + if (count > 0) { + count=0; + count = qry.executeUpdate(" update BULK_ACC_TRICKLEFEED_FILE_auto o set o.status='S' where o.pacs_id="+pacsId+" and o.status='R' and o.mark_type='N' "); + } + + if (count != 0) { + System.out.println("Bulk auth status updated to S :" + pacsId); + } else { + System.out.println("Bulk auth status updatation failed :" + pacsId); + } + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in updateBulkAuthStatusToS for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + } + + public void updateBulkAuthStatusToS_Exs(String pacsId) { + Connection con = null; + Statement qry = null; + ResultSet rs = null; + int count = 0; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + count = qry.executeUpdate(" update bulk_acct_mark k set k.status='S' where k.pacs_id= "+pacsId +" and k.status='R' and k.mark_type='E' " + +" and k.key_1 in ( select trim(o.add_1) from BULK_ACC_TRICKLEFEED_FILE_auto o where o.status='R' and o.mark_type='E' )"); + if (count > 0) { + count=0; + count = qry.executeUpdate(" update BULK_ACC_TRICKLEFEED_FILE_auto o set o.status='S' where o.pacs_id="+pacsId+" and o.status='R' and o.mark_type='E' "); + } + + if (count != 0) { + System.out.println("Bulk auth status updated to S :" + pacsId); + } else { + System.out.println("Bulk auth status updatation failed :" + pacsId); + } + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in updateBulkAuthStatusToS_Exs for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + } +} + diff --git a/IPKS_Updated/src/src/java/Dao/BulkMarkDaoSTB.java b/IPKS_Updated/src/src/java/Dao/BulkMarkDaoSTB.java new file mode 100644 index 0000000..bd47b78 --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/BulkMarkDaoSTB.java @@ -0,0 +1,869 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Dao; + +import DataEntryBean.TransactioDetailsBean; +import LoginDb.DbHandler; +import java.io.FileWriter; +import java.io.InputStream; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Properties; +import java.util.Random; +import oracle.jdbc.OracleTypes; +import org.codehaus.jackson.map.ObjectMapper; + +/** + * + * @author 1004242 + */ +public class BulkMarkDaoSTB { + + public String bulkMarkAccounts(String accNo, String pacsId) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + List tdBeanList = new ArrayList(); + TransactioDetailsBean tdBean = null; + ObjectMapper objmap = new ObjectMapper(); + String jsonString = null; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + rs = qry.executeQuery(" select (select p.prod_name from dep_product p where p.id=d.dep_prod_id) as prod,d.key_1," + +" d.customer_no,(select r.first_name||' '||r.middle_name||' '||r.last_name from kyc_hdr r where r.cif_no=d.customer_no) as cust_name," + +" nvl((select r.guardian_name from kyc_hdr r where r.cif_no=d.customer_no),'NA') as guardian_name, " + +" (select (case k.id_type when '06' then 'VOTER CARD' when '47' then 'AADHAR CARD' when '08' then 'RATION CARD' when '09' then 'EMPLOYER ID CARD' when '04' then 'PASSPORT' " + +" when '10' then 'DRIVING LICENCE' when '41' then 'INTRODUCED BY MEMBER' when '07' then 'PAN CARD' end) from bulk_acc_tricklefeed_file_auto k where k.add_1 = d.key_1 and k.pacs_id = '"+pacsId+"' " + +" and k.status = 'R') id_type, (select k.id_number from bulk_acc_tricklefeed_file_auto k where k.add_1 = d.key_1 and k.pacs_id = '"+pacsId+"' and k.status = 'R') id_number " + +" from dep_account d where d.key_1 not in (select k.key_1 from bulk_acct_mark k where k.pacs_id='"+pacsId+"') and d.dep_prod_id in (select p.id from dep_product p where p.prod_code in ('1101','1102' )" + +" and substr(p.int_cat,0,1)='1') and trim(d.link_accno) is null and d.pacs_id='"+pacsId+"' and d.key_1 like '%"+accNo+"%' and d.curr_status='O'"); + + while (rs.next()) { + + tdBean = new TransactioDetailsBean(); + tdBean.setAuthorisedQ(rs.getString("prod")==null?"NA":rs.getString("prod")); + tdBean.setRejectedQ(rs.getString("key_1")==null?"NA":rs.getString("key_1")); + tdBean.setPendingQ(rs.getString("cust_name")==null?"NA":rs.getString("cust_name")); + tdBean.setCashIn(rs.getString("guardian_name")==null?"NA":rs.getString("guardian_name")); + tdBean.setCashOut(rs.getString("id_type")==null?"NA":rs.getString("id_type")); + tdBean.setGuardianName(rs.getString("id_number")==null?"NA":rs.getString("id_number")); + tdBeanList.add(tdBean); + } + jsonString = objmap.writeValueAsString(tdBeanList); + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in bulkMarkAccounts for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return jsonString; + } + + public String markBulkAccount(String accno , String pacsId , String tellerId) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + String txnType; + int count = 0; + + try { + con = DbHandler.getDBConnection(); + + + proc = con.prepareCall("{ call operations1.BULK_ACCT_MARKING(?,?,?,?) }"); + + proc.setString(1, pacsId); + proc.setString(2, accno); + proc.setString(3, tellerId); + proc.registerOutParameter(4, OracleTypes.VARCHAR); + + proc.executeUpdate(); + + // res = proc.getString(4);//error message from dds procedure + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in markBulkAccount for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + res = "Exception occured in markBulkAccount for pacs Id :" + pacsId; + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return "{ \"result\": \" "+res+"\" }" ; + } + + public String unmarkAccountFromAuth(String accNo, String pacsId, String tellerId) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + int rs = 0; + List tdBeanList = new ArrayList(); + TransactioDetailsBean tdBean = null; + ObjectMapper objmap = new ObjectMapper(); + String jsonString = null; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + String query = "insert into bulk_acct_mark_hist (pacs_id, key_1, mark_teller_id, tran_dt, tran_tym, status, remarks, send_teller_id, send_dt, send_tym) select pacs_id, key_1, mark_teller_id, tran_dt, tran_tym, status, 'UNMARKED', " + + " " +tellerId+ ", (select system_date from system_date), to_char(SYSTIMESTAMP, 'DD-MON-RRHH12:MI:SS') from bulk_acct_mark where KEY_1= '"+accNo+"' and PACS_ID = '"+pacsId+"'"; + System.out.println(query); + rs = qry.executeUpdate(query); + rs = qry.executeUpdate("update bulk_acct_mark set status = 'RBB' where KEY_1= '"+accNo+"' and PACS_ID = '"+pacsId+"'"); + int rs1 = qry.executeUpdate("delete from BULK_ACC_TRICKLEFEED_FILE_auto where add_1= '"+accNo+"' and PACS_ID = '"+pacsId+"'"); + + if(rs != 0 && rs1 !=0) + { + res="Account has been unmarked successfully"; + }else + { + res="Account unmarking unsuccessfull"; + // con.rollback(); + } + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in bulkMarkAccountsAuth for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + res = "Exception occured in bulkMarkAccountsAuth for pacs Id :" + pacsId; + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return "{ \"result\": \" "+res+"\" }" ; + + + } + + public String bulkMarkAccountsAuth( String pacsId ) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + List tdBeanList = new ArrayList(); + TransactioDetailsBean tdBean = null; + ObjectMapper objmap = new ObjectMapper(); + String jsonString = null; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + rs = qry.executeQuery(" select (select p.prod_name from dep_product p where p.id=d.dep_prod_id) as prod,d.key_1," + +" d.customer_no,(select r.first_name||' '||r.middle_name||' '||r.last_name from kyc_hdr r where r.cif_no=d.customer_no) as cust_name," + +" nvl((select r.guardian_name from kyc_hdr r where r.cif_no=d.customer_no),'NA') as guardian_name, " + +" (select (case k.id_type when '06' then 'VOTER CARD' when '47' then 'AADHAR CARD' when '08' then 'RATION CARD' when '09' then 'EMPLOYER ID CARD' when '04' then 'PASSPORT' " + +" when '10' then 'DRIVING LICENCE' when '41' then 'INTRODUCED BY MEMBER' when '07' then 'PAN CARD' when '38' then 'BOARD RESOLUTION' end) from bulk_acc_tricklefeed_file_auto k where k.add_1 = d.key_1 and k.pacs_id = '"+pacsId+"' " + +" and k.status = 'R' and k.mark_type = 'N') id_type, (select k.id_number from bulk_acc_tricklefeed_file_auto k where k.add_1 = d.key_1 and k.pacs_id = '"+pacsId+"' and k.status = 'R' and k.mark_type = 'N') id_number ," + + +" (select (case k.id_type_two when '06' then 'VOTER CARD' when '47' then 'AADHAR CARD' when '08' then 'RATION CARD' when '09' then 'EMPLOYER ID CARD' when '04' then 'PASSPORT' " + +" when '10' then 'DRIVING LICENCE' when '41' then 'INTRODUCED BY MEMBER' when '07' then 'PAN CARD' when '38' then 'BOARD RESOLUTION' end) from bulk_acc_tricklefeed_file_auto k where k.add_1 = d.key_1 and k.pacs_id = '"+pacsId+"' " + +" and k.status = 'R' and k.mark_type = 'N') id_type_two, (select k.id_number_two from bulk_acc_tricklefeed_file_auto k where k.add_1 = d.key_1 and k.pacs_id = '"+pacsId+"' and k.status = 'R' and k.mark_type = 'N') id_number_two " + + +" from dep_account d where d.dep_prod_id in (select p.id from dep_product p where p.prod_code in ('1101','1102' )" + +" and substr(p.int_cat,0,1)='1') and trim(d.link_accno) is null and d.pacs_id='"+pacsId+"' and d.key_1 in ( select key_1 from bulk_acct_mark where pacs_id= '"+pacsId+"' and status = 'R' and mark_type = 'N' ) "); + + while (rs.next()) { + + tdBean = new TransactioDetailsBean(); + tdBean.setAuthorisedQ(rs.getString("prod")==null?"NA":rs.getString("prod")); + tdBean.setRejectedQ(rs.getString("key_1")==null?"NA":rs.getString("key_1")); + tdBean.setPendingQ(rs.getString("cust_name")==null?"NA":rs.getString("cust_name")); + tdBean.setCashIn(rs.getString("guardian_name")==null?"NA":rs.getString("guardian_name")); + tdBean.setCashOut(rs.getString("id_type")==null?"NA":rs.getString("id_type")); + tdBean.setGuardianName(rs.getString("id_number")==null?"NA":rs.getString("id_number")); + tdBean.setIdTypeTwo(rs.getString("id_type_two")==null?"NA":rs.getString("id_type_two")); + tdBean.setIdNumberTwo(rs.getString("id_number_two")==null?"NA":rs.getString("id_number_two")); + tdBeanList.add(tdBean); + } + jsonString = objmap.writeValueAsString(tdBeanList); + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in bulkMarkAccounts for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return jsonString; + } + + public String bulkMarkAccountsAuth_Exs( String pacsId ) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + List tdBeanList = new ArrayList(); + TransactioDetailsBean tdBean = null; + ObjectMapper objmap = new ObjectMapper(); + String jsonString = null; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + rs = qry.executeQuery(" select (select p.prod_name from dep_product p where p.id=d.dep_prod_id) as prod,d.key_1," + +" d.customer_no,(select r.first_name||' '||r.middle_name||' '||r.last_name from kyc_hdr r where r.cif_no=d.customer_no) as cust_name," + +" nvl((select r.guardian_name from kyc_hdr r where r.cif_no=d.customer_no),'NA') as guardian_name, " + +" (select (case k.id_type when '06' then 'VOTER CARD' when '47' then 'AADHAR CARD' when '08' then 'RATION CARD' when '09' then 'EMPLOYER ID CARD' when '04' then 'PASSPORT' " + +" when '10' then 'DRIVING LICENCE' when '41' then 'INTRODUCED BY MEMBER' when '07' then 'PAN CARD' when '38' then 'BOARD RESOLUTION' end) from bulk_acc_tricklefeed_file_auto k where k.add_1 = d.key_1 and k.pacs_id = '"+pacsId+"' " + +" and k.status = 'R' and k.mark_type = 'E') id_type, (select k.id_number from bulk_acc_tricklefeed_file_auto k where k.add_1 = d.key_1 and k.pacs_id = '"+pacsId+"' and k.status = 'R' and k.mark_type = 'E') id_number, " + +" (select r.bank_cif from kyc_hdr r where r.cif_no=d.customer_no) as bank_cif " + +" from dep_account d where d.dep_prod_id in (select p.id from dep_product p where p.prod_code in ('1101','1102' )" + +" and substr(p.int_cat,0,1)='1') and trim(d.link_accno) is null and d.pacs_id='"+pacsId+"' and d.key_1 in ( select key_1 from bulk_acct_mark where pacs_id= '"+pacsId+"' and status = 'R' and mark_type = 'E' ) "); + + while (rs.next()) { + + tdBean = new TransactioDetailsBean(); + tdBean.setAuthorisedQ(rs.getString("prod")==null?"NA":rs.getString("prod")); + tdBean.setRejectedQ(rs.getString("key_1")==null?"NA":rs.getString("key_1")); + tdBean.setPendingQ(rs.getString("cust_name")==null?"NA":rs.getString("cust_name")); + tdBean.setCashIn(rs.getString("guardian_name")==null?"NA":rs.getString("guardian_name")); + tdBean.setCashOut(rs.getString("id_type")==null?"NA":rs.getString("id_type")); + tdBean.setGuardianName(rs.getString("id_number")==null?"NA":rs.getString("id_number")); + tdBean.setBankCif(rs.getString("bank_cif")==null?"NA":rs.getString("bank_cif")); + tdBeanList.add(tdBean); + } + jsonString = objmap.writeValueAsString(tdBeanList); + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in bulkMarkAccounts for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return jsonString; + } + + public String authoriseBulk(String pacsId , String tellerId) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + String txnType; + int count = 0; + + try { + con = DbHandler.getDBConnection(); + + + proc = con.prepareCall("{ call generate_bulk_acct_auto(?,?,?) }"); + + + proc.setString(1, pacsId); + proc.setString(2, tellerId); + + proc.registerOutParameter(3, OracleTypes.VARCHAR); + + proc.executeUpdate(); + + res = proc.getString(3);//error message from dds procedure + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in authoriseBulk for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + res = "Something went wrong. Please try agian."; + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return res ; + } + + public String gerateBulkFlatFile( String pacsId , String tellerId ) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + // File bulkFile = null; + FileWriter fWrite=null; + boolean bool = false; + + SimpleDateFormat sdf = new SimpleDateFormat("ddMMyyyy"); + String date = sdf.format(new Date()); + String bank_code=""; + String brch_code=""; + System.out.println(date); + + String OUTPUT_FOLDER_PATH=""; + String OUTPUT_FILENAME=""; + + try{ + + ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); + InputStream input = classLoader.getResourceAsStream("Dao/BulkMarkSTB.properties"); + Properties properties = new Properties(); + properties.load(input); + + OUTPUT_FOLDER_PATH = properties.getProperty("OUTPUT_FOLDER_PATH"); + OUTPUT_FILENAME = properties.getProperty("OUTPUT_FILENAME"); + + }catch(Exception e){ + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } + // BufferedWriter writer = null; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + + //rs = qry.executeQuery("select r.bank_code,p.cbs_br_code from rupay_kcc_api_map r ,pacs_master p where r.dccb_code=p.dccb_code and p.pacs_id='"+pacsId+"'"); + + while(rs.next()){ + bank_code = rs.getString("bank_code"); + brch_code = rs.getString("cbs_br_code"); + } + System.out.println("Bank Code: "+bank_code); + + SimpleDateFormat fileDateFormat = new SimpleDateFormat("ddMMyyyy_HHmmSS_ddMMyyyy"); + String fileDate = fileDateFormat.format(new Date()); + + System.out.println(fileDate); + String fileDate1 = fileDate.substring(0, 15); + String fileDate2 = fileDate.substring(16, 25); + String fileDate3 = fileDate1+fileDate2; + + + Random r = new Random(); + String seq =""+ (r.nextInt((999 - 100) + 1) + 100); + + System.out.println(OUTPUT_FILENAME); + + OUTPUT_FILENAME = OUTPUT_FILENAME.replace("{BANK_CODE}", brch_code); + OUTPUT_FILENAME = OUTPUT_FILENAME.replace("{TIMESTAMP}", fileDate3); + OUTPUT_FILENAME = OUTPUT_FILENAME.replace("{SEQ}", seq); + + OUTPUT_FILENAME = bank_code +"-"+ OUTPUT_FILENAME; + + System.out.println(OUTPUT_FILENAME); + + rs = null; + String sql= "select " + + " rpad(nvl(trim(h.record_type),' '),2,' ')||' '|| " + + " rpad(nvl(trim(h.branch_number),' '),5,' ')||' '|| " + + " rpad(nvl(trim(h.account_type),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.interest_category),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.segment_code),' '),4,' ')|| ' '|| " + + " rpad(nvl(trim(h.term_length),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.term_basis),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.term_amount),' '),10,' ')||' '|| " + //+ " rpad(nvl(trim(h.account_open_date),' '),8,' ')||' '|| " + + " rpad('"+date+"',8,' ')||' '|| " + + " rpad(nvl(trim(h.term_frequency),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.Term_Days),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.term_months),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.term_years),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.installment_due_date),' '),2,' ')||' '|| " + + " rpad(nvl(trim(h.installment_frequency),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.language_code),' '),2,' ')||' '|| " + + " rpad(nvl(trim(h.teller_number),' '),7,' ')||' '|| " + //+" rpad(lpad('"+tellerId+"',7,'0'),7,' ')||' '|| " + + " rpad(nvl(trim(h.stop_required),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.data_a),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.interest_payment_method_trap),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.backdate_account_opening_flag),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.existing_cif),' '),16,' ')||' '|| " + + " rpad(nvl(trim(h.transfer_account_number),' '),16,' ')||' '|| " + + " lpad(nvl(trim(h.description_1),' '),50,' ')||' '|| " + + " rpad(nvl(trim(h.sal_or_other),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.employer_name),' '),60,' ')||' '|| " + + " rpad(nvl(trim(h.beneficiary_name),' '),118,' ') " + + " from hh_format_auto h where h.pacs_id= "+pacsId+" "; + + rs = qry.executeQuery(sql); + System.out.println(sql); + + while (rs.next()) { + + // bulkFile = new File("BulkFlatFile" + System.currentTimeMillis() + ".txt"); + // writer = new BufferedWriter(new FileWriter(bulkFile)); + + String header = rs.getString(1); + // writer.write(header); + + fWrite = new FileWriter(OUTPUT_FOLDER_PATH+OUTPUT_FILENAME); + fWrite.write(header); + + } + + qry = null; + rs = null; + //if (bulkFile != null) { + qry = con.createStatement(); + rs = qry.executeQuery("select " + + "rpad(nvl(trim(t.record_type),' '),2,' ')|| " + + "rpad(nvl(trim(t.student_number),' '),15,' ')|| " + + "rpad(nvl(trim(t.first_name),' '),40,' ')|| " + + "rpad(nvl(trim(t.middle_name),' '),40,' ')|| " + + "rpad(nvl(trim(t.last_name),' '),40,' ')|| " + + "rpad(nvl(trim(t.add_1),' '),40,' ')|| " + + "rpad(nvl(trim(t.add_2),' '),40,' ')|| " + + "rpad(nvl(trim(t.add_3),' '),24,' ')|| " + + "rpad(nvl(trim(t.city_code),' '),3,' ')|| " + + "rpad(nvl(trim(t.state_code),' '),3,' ')|| " + + "rpad(nvl(trim(t.po_number),' '),8,' ')|| " + + "rpad(nvl(trim(t.phn_number),' '),12,' ')|| " + + "rpad(nvl(trim(t.id_type),' '),2,' ')|| " + + "rpad(nvl(trim(t.id_number),' '),14,' ')|| " + + "rpad(nvl(trim(t.birth_date),' '),8,' ')|| " + + "rpad(nvl(trim(t.gender),' '),1,' ')|| " + + "rpad(nvl(trim(t.mother_name),' '),25,' ')|| " + + "rpad(nvl(trim(t.residential_status),' '),1,' ')|| " + + "rpad(nvl(trim(t.nationality_code),' '),3,' ')|| " + + "rpad(nvl(trim(t.customer_type),' '),8,' ')|| " + + "rpad(nvl(trim(t.title),' '),2,' ')|| " + + + "rpad(nvl(trim(t.id_type_two),' '),2,' ')|| " + + "rpad(nvl(trim(t.id_number_two),' '),14,' ') " + + + "from BULK_ACC_TRICKLEFEED_FILE_auto t where t.pacs_id="+pacsId+" and " + + "t.status='R' and t.mark_type='N' "); +// + "(select system_date from system_date) "); + + while (rs.next()) { + + // writer.write("\r\n"); + fWrite.write("\r\n"); + //writer.newLine(); + String line1 = rs.getString(1); + //line1 = line1.replaceAll("\\r|\\n|\\r|\\n", ""); + //String line = rs.getString(1).substring(0, rs.getString(1).length()-2); + //line1 = line1.trim(); + //writer.write(line1); + fWrite.write(line1); + + } + //} +// if(writer != null) +// { +// writer.flush(); +// writer.close(); +// fWrite.close(); +// } + //updating sttaus of the generated bulks to S + fWrite.close(); + updateBulkAuthStatusToS(pacsId); + + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in bulkMarkAccounts for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + return "Failed to Process request. Please try again"; + // bulkFile = null; + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return "File Sent to Destination Server"; + } + + public String gerateBulkFlatFile_Exs( String pacsId , String tellerId ) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + // File bulkFile = null; + FileWriter fWrite=null; + boolean bool = false; + + SimpleDateFormat sdf = new SimpleDateFormat("ddMMyyyy"); + String date = sdf.format(new Date()); + String bank_code=""; + String brch_code=""; + System.out.println(date); + + String OUTPUT_FOLDER_PATH=""; + String OUTPUT_FILENAME=""; + + try{ + + ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); + InputStream input = classLoader.getResourceAsStream("Dao/BulkMarkSTB.properties"); + Properties properties = new Properties(); + properties.load(input); + + OUTPUT_FOLDER_PATH = properties.getProperty("OUTPUT_FOLDER_PATH"); + OUTPUT_FILENAME = properties.getProperty("OUTPUT_FILENAME"); + + }catch(Exception e){ + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } + // BufferedWriter writer = null; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + + // rs = qry.executeQuery("select r.bank_code,p.cbs_br_code from rupay_kcc_api_map r ,pacs_master p where r.dccb_code=p.dccb_code and p.pacs_id='"+pacsId+"'"); + + while(rs.next()){ + bank_code = rs.getString("bank_code"); + brch_code = rs.getString("cbs_br_code"); + } + System.out.println("Bank Code: "+bank_code); + + SimpleDateFormat fileDateFormat = new SimpleDateFormat("ddMMyyyy_HHmmSS_ddMMyyyy"); + String fileDate = fileDateFormat.format(new Date()); + + System.out.println(fileDate); + String fileDate1 = fileDate.substring(0, 15); + String fileDate2 = fileDate.substring(16, 25); + String fileDate3 = fileDate1+fileDate2; + + + Random r = new Random(); + String seq =""+ (r.nextInt((999 - 100) + 1) + 100); + + System.out.println(OUTPUT_FILENAME); + + OUTPUT_FILENAME = OUTPUT_FILENAME.replace("{BANK_CODE}", brch_code); + OUTPUT_FILENAME = OUTPUT_FILENAME.replace("{TIMESTAMP}", fileDate3); + OUTPUT_FILENAME = OUTPUT_FILENAME.replace("{SEQ}", seq); + + OUTPUT_FILENAME = bank_code +"-"+ OUTPUT_FILENAME; + + System.out.println(OUTPUT_FILENAME); + + rs = qry.executeQuery("select " + + " rpad(nvl(trim(h.record_type),' '),2,' ')||' '|| " + + " rpad(nvl(trim(h.branch_number),' '),5,' ')||' '|| " + + " rpad(nvl(trim(h.account_type),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.interest_category),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.segment_code),' '),4,' ')|| ' '|| " + + " rpad(nvl(trim(h.term_length),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.term_basis),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.term_amount),' '),10,' ')||' '|| " + + " rpad(nvl(trim(h.account_open_date),' '),8,' ')||' '|| " + + " rpad(nvl(trim(h.term_frequency),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.Term_Days),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.term_months),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.term_years),' '),4,' ')||' '|| " + + " rpad(nvl(trim(h.installment_due_date),' '),2,' ')||' '|| " + + " rpad(nvl(trim(h.installment_frequency),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.language_code),' '),2,' ')||' '|| " + + " rpad(nvl(trim(h.teller_number),' '),7,' ')||' '|| " + + " rpad(nvl(trim(h.stop_required),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.data_a),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.interest_payment_method_trap),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.backdate_account_opening_flag),' '),1,' ')||' '|| " + + " lpad(nvl(substr(t.bank_cif, 1, length(t.bank_cif)-1), ' '),16,'0') || ' ' || " + //+ " rpad(nvl(trim(h.existing_cif),' '),16,' ')||' '|| " + + " rpad(nvl(trim(h.transfer_account_number),' '),16,' ')||' '|| " + + " rpad(nvl(trim('BULK ACCOUNT'), ' '), 50, ' ') || ' ' || " + //+ " lpad(nvl(trim(h.description_1),' '),50,' ')||' '|| " + + " rpad(nvl(trim(h.sal_or_other),' '),1,' ')||' '|| " + + " rpad(nvl(trim(h.employer_name),' '),60,' ')||' '|| " + + " rpad(nvl(trim(h.beneficiary_name),' '),118,' ') " + + " from hh_format_auto h, BULK_ACC_TRICKLEFEED_FILE_auto t where h.pacs_id = t.pacs_id and " + + " t.pacs_id="+pacsId+" and t.status='R' and t.mark_type='E' "); + + fWrite = new FileWriter(OUTPUT_FOLDER_PATH+OUTPUT_FILENAME); + while (rs.next()) { + + String line1 = rs.getString(1); + fWrite.write(line1); + fWrite.write("\r\n"); + fWrite.write("DD000000000000000 5320000000000000000000000000 00000000 "); + fWrite.write("\r\n"); + } + + if(fWrite != null) + { + fWrite.flush(); + fWrite.close(); + } + updateBulkAuthStatusToS_Exs(pacsId); + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in bulkMarkAccounts for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + return "Failed to Process request. Please try again"; + // bulkFile = null; + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return "File Sent to Destination Server"; + } + + public void updateBulkAuthStatusToS(String pacsId) { + Connection con = null; + Statement qry = null; + ResultSet rs = null; + int count = 0; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + count = qry.executeUpdate(" update bulk_acct_mark k set k.status='S',k.send_dt=(select system_date from system_date),k.send_tym=to_date(to_char(SYSTIMESTAMP, 'DD-MON-RRHH24:MI:SS'),'DD-MON-RRHH24:MI:SS') where k.pacs_id= "+pacsId +" and k.status='R'" + +" and k.key_1 in ( select trim(o.add_1) from BULK_ACC_TRICKLEFEED_FILE_auto o where o.status='R' and o.mark_type='N')"); + if (count > 0) { + count=0; + count = qry.executeUpdate(" update BULK_ACC_TRICKLEFEED_FILE_auto o set o.status='S' where o.pacs_id="+pacsId+" and o.status='R' and o.mark_type='N' "); + } + + if (count != 0) { + System.out.println("Bulk auth status updated to S :" + pacsId); + } else { + System.out.println("Bulk auth status updatation failed :" + pacsId); + } + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in updateBulkAuthStatusToS for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + } + public void updateBulkAuthStatusToS_Exs(String pacsId) { + Connection con = null; + Statement qry = null; + ResultSet rs = null; + int count = 0; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + count = qry.executeUpdate(" update bulk_acct_mark k set k.status='S',k.send_dt=(select system_date from system_date),k.send_tym=to_date(to_char(SYSTIMESTAMP, 'DD-MON-RRHH24:MI:SS'),'DD-MON-RRHH24:MI:SS') where k.pacs_id= "+pacsId +" and k.status='R'" + +" and k.key_1 in ( select trim(o.add_1) from BULK_ACC_TRICKLEFEED_FILE_auto o where o.status='R' and o.mark_type='E')"); + if (count > 0) { + count=0; + count = qry.executeUpdate(" update BULK_ACC_TRICKLEFEED_FILE_auto o set o.status='S' where o.pacs_id="+pacsId+" and o.status='R' and o.mark_type='E' "); + } + + if (count != 0) { + System.out.println("Bulk auth status updated to S :" + pacsId); + } else { + System.out.println("Bulk auth status updatation failed :" + pacsId); + } + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in updateBulkAuthStatusToS for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + } +//Added For Pacs wise count for Bank Login + public String viewBulkMarkAccountsAuth( String pacsId ) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + List tdBeanList = new ArrayList(); + TransactioDetailsBean tdBean = null; + ObjectMapper objmap = new ObjectMapper(); + String jsonString = null; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + rs = qry.executeQuery("select count(key_1) as Acct_Cnt, pm.pacs_id, pm.pacs_name from bulk_acct_mark k, pacs_master pm "+ + "where pm.pacs_id = k.pacs_id and pm.pacs_id in (select pacs_id from pacs_master p "+ + "where lpad(to_number(p.dccb_code), 2, '0') || lpad(to_number(p.cbs_br_code), 3, '0') in "+ + "(select pacs_id from pacs_master pa where pa.pacs_id = '"+pacsId+"' and pacs_id in (select pacs_id " + + " from login_details ld where ld.user_role_id = '201603000008020')) and to_number(pm.dccb_code) = to_number(p.dccb_code) " + + " and lpad(pm.cbs_br_code, 5, '0') = lpad(p.cbs_br_code, 5, '0')) and status = 'R' and k.mark_type = 'N' "+ + "and pm.pacs_id <> '"+pacsId+"' group by pm.pacs_id, pm.pacs_name"); + + while (rs.next()) { + + tdBean = new TransactioDetailsBean(); + tdBean.setAuthorisedQ(rs.getString("Acct_Cnt")==null?"NA":rs.getString("Acct_Cnt")); + tdBean.setRejectedQ(rs.getString("pacs_id")==null?"NA":rs.getString("pacs_id")); + tdBean.setPendingQ(rs.getString("pacs_name")==null?"NA":rs.getString("pacs_name")); + tdBeanList.add(tdBean); + } + jsonString = objmap.writeValueAsString(tdBeanList); + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in bulkMarkAccounts for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return jsonString; + } + + public String viewBulkMarkAccountsAuth_Exs( String pacsId ) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + List tdBeanList = new ArrayList(); + TransactioDetailsBean tdBean = null; + ObjectMapper objmap = new ObjectMapper(); + String jsonString = null; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + rs = qry.executeQuery("select count(key_1) as Acct_Cnt, pm.pacs_id, pm.pacs_name from bulk_acct_mark k, pacs_master pm "+ + "where pm.pacs_id = k.pacs_id and pm.pacs_id in (select pacs_id from pacs_master p "+ + "where lpad(to_number(p.dccb_code), 2, '0') || lpad(to_number(p.cbs_br_code), 3, '0') in "+ + "(select pacs_id from pacs_master pa where pa.pacs_id = '"+pacsId+"' and pacs_id in (select pacs_id " + + " from login_details ld where ld.user_role_id = '201603000008020')) and to_number(pm.dccb_code) = to_number(p.dccb_code) " + + " and lpad(pm.cbs_br_code, 5, '0') = lpad(p.cbs_br_code, 5, '0')) and status = 'R' and k.mark_type = 'E' "+ + "and pm.pacs_id <> '"+pacsId+"' group by pm.pacs_id, pm.pacs_name"); + + while (rs.next()) { + + tdBean = new TransactioDetailsBean(); + tdBean.setAuthorisedQ(rs.getString("Acct_Cnt")==null?"NA":rs.getString("Acct_Cnt")); + tdBean.setRejectedQ(rs.getString("pacs_id")==null?"NA":rs.getString("pacs_id")); + tdBean.setPendingQ(rs.getString("pacs_name")==null?"NA":rs.getString("pacs_name")); + tdBeanList.add(tdBean); + } + jsonString = objmap.writeValueAsString(tdBeanList); + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in bulkMarkAccounts for pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return jsonString; + } +//End Changes +} + diff --git a/IPKS_Updated/src/src/java/Dao/BulkMarkSTB.properties b/IPKS_Updated/src/src/java/Dao/BulkMarkSTB.properties new file mode 100644 index 0000000..f7cec38 --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/BulkMarkSTB.properties @@ -0,0 +1,7 @@ +# To change this template, choose Tools | Templates +# and open the template in the editor. +#OUTPUT_FOLDER_PATH=C:\\Users\\1242938\\Desktop\\test\\ +#OUTPUT_FOLDER_PATH=/home/ec2-user/FILES/ +OUTPUT_FOLDER_PATH=/dev/app/BULK_FILES/ +OUTPUT_FILENAME=BLK_{BANK_CODE}_{TIMESTAMP}_{SEQ}.txt +APPLICATION_FOLDER_PATH=/dev/app/applicationfiles/ diff --git a/IPKS_Updated/src/src/java/Dao/CBSAccountMappingDao.java b/IPKS_Updated/src/src/java/Dao/CBSAccountMappingDao.java new file mode 100644 index 0000000..d7c213b --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/CBSAccountMappingDao.java @@ -0,0 +1,63 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Dao; + + +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import oracle.jdbc.OracleTypes; + +/** + * + * @author 1242938 + */ +public class CBSAccountMappingDao { + + public String CBSAccountMappingProc(String pacsId, String tellerId, String accNo, String linkAcc, String checkOpt, String newpin, String currAcc) { + Connection con = null; + CallableStatement proc = null; + String res = null; + + + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call operations2.MAP_CBS_ACCT(?,?,?,?,?,?,?,?) }"); + + proc.setString(1, pacsId); + proc.setString(2, tellerId); + proc.setString(3, accNo); + proc.setString(4, linkAcc); + proc.setString(5, checkOpt); + proc.registerOutParameter(6, OracleTypes.VARCHAR); + proc.setString(7, newpin); + proc.setString(8, currAcc); + + proc.executeUpdate(); + + // res = proc.getString(6);//error message + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in CBSAccountMappingProc for user Id :" + tellerId); + System.out.println("Error occurred during processing."); + res= "Error occured. Please try again"; + + } finally { + try { + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return res; + } + + +} diff --git a/IPKS_Updated/src/src/java/Dao/CL_Disbursement_Vidyasagar.properties b/IPKS_Updated/src/src/java/Dao/CL_Disbursement_Vidyasagar.properties new file mode 100644 index 0000000..313ea32 --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/CL_Disbursement_Vidyasagar.properties @@ -0,0 +1,13 @@ +#below path is for test environment in local system +#TEMP_FOLDER_PATH = C:\\Users\\1815522\\Desktop\\VCCB_Temp\\ + +#below 2 paths are for production environment in application server +TEMP_FOLDER_PATH = /home/ec2-user/VCCB_Temp/ +SOURCE_FOLDER_PATH = /home/ec2-user/VCCB_Temp/ #for production: updaodTextToServer variable + +REMOTE_HOST = 30.0.2.57 +REMOTE_USER = ipkssupport +REMOTE_PASS = IPKS@2023# +REMOTE_PORT = 22 + +REMOTE_FOLDER_PATH = /home/ec2-user/RuPayKCCFiles_VidyasagarBank \ No newline at end of file diff --git a/IPKS_Updated/src/src/java/Dao/CashWithdrawlDDSDao.java b/IPKS_Updated/src/src/java/Dao/CashWithdrawlDDSDao.java new file mode 100644 index 0000000..260df46 --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/CashWithdrawlDDSDao.java @@ -0,0 +1,392 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Dao; + +import DataEntryBean.MicroFileAccountDetBean; +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.ArrayList; +import javax.servlet.http.HttpServletRequest; +import oracle.jdbc.OracleTypes; + +/** + * + * @author 1004242 + */ +public class CashWithdrawlDDSDao { + + + public String CashDepositOperation(String tellerId, String pacsId,String accNo,Double amt,String txnType , MicroFileAccountDetBean accountDet ) { + Connection con = null; + CallableStatement proc = null; + String message = null; + String res= null; + + + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call operations1.DDS_CASH_TXN(?,?,?,?,?,?,?) }"); + + proc.setString(1, tellerId); + proc.setString(2, pacsId); + proc.setString(3, accNo); + proc.setDouble(4, amt); + proc.setString(5, txnType); + proc.registerOutParameter(6, OracleTypes.VARCHAR); + proc.registerOutParameter(7, OracleTypes.VARCHAR); + + + + proc.executeUpdate(); + + res= proc.getString(7);//success/failure + accountDet.setMessage(res); + // message = proc.getString(6);//error message from dds procedure + if(res.equalsIgnoreCase("SUCCESS")) + { + accountDet.setTxnRefNo(message.split("#")[1]); + } + else + { + System.out.println("Unsuccesfull CashDeposit/WithdrawOperation for user Id :" + tellerId); + } + + } catch (Exception e) { + message = "Error occured in processing.Please try again."; + // e.printStackTrace(); + // System.out.println("Exception occured in CashDepositOperation for user Id :" + tellerId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return message; + } + public void getreciptDetailsFromDB(MicroFileAccountDetBean accountDet) + { + + Connection con = null; + StringBuilder accountGetQuery = null; + ResultSet rs = null; + PreparedStatement ps= null; + + try{ + con = DbHandler.getDBConnection(); + accountGetQuery = new StringBuilder() +// .append(" select (select substr( nvl(r.first_name,' ')||' '||nvl(r.middle_name,' ')||' '||nvl(r.last_name,' '),0,20) from kyc_hdr r where r.cif_no=d.customer_no) cust_name,") +// .append("(select substr(nvl(r.address_1,'NA') ,0,16) from kyc_hdr r where r.cif_no=d.customer_no) addrs1,") +// .append("(select substr(nvl(r.address_2,'NA') ,0,16) from kyc_hdr r where r.cif_no=d.customer_no) addrs2,") +// .append("(select substr(nvl(r.address_3,'NA') ,0,16) from kyc_hdr r where r.cif_no=d.customer_no) addrs3,")//.append(pacsId) +// .append("to_char(d.acct_open_dt,'dd-Mon-YYYY') acct_opn_date, ") +// .append (" to_char(d.mat_dt,'dd-Mon-YYYY') mat_date, ") +// .append("d.avail_bal from dep_account d where d.key_1=?"); +// + .append(" select (select substr(nvl(r.first_name, ' ') || ' ' || nvl(r.middle_name, ' ') || ' ' || nvl(r.last_name, ' '),0,20) from kyc_hdr r") + .append(" where r.cif_no = d.customer_no) cust_name,(select substr(nvl(r.address_1, 'NA'), 0, 16) from kyc_hdr r where r.cif_no = d.customer_no) addrs1,") + .append("(select substr(nvl(r.address_2, 'NA'), 0, 16) from kyc_hdr r where r.cif_no = d.customer_no) addrs2,(select substr(nvl(r.address_3, 'NA'), 0, 16) ") + .append(" from kyc_hdr r where r.cif_no = d.customer_no) addrs3,to_char(d.acct_open_dt, 'dd-Mon-YYYY') acct_opn_date, to_char(d.mat_dt, 'dd-Mon-YYYY') mat_date,")//.append(pacsId) + .append(" d.avail_bal from dep_account d where d.key_1 = ? UNION ALL select (select substr(nvl(r.first_name, ' ') || ' ' || nvl(r.middle_name, ' ') || ' ' ||nvl(r.last_name, ' '), ") + .append(" 0,20) from kyc_hdr r where r.cif_no = l.customer_no) cust_name,(select substr(nvl(r.address_1, 'NA'), 0, 16) from kyc_hdr r where r.cif_no = l.customer_no) addrs1,") + .append(" (select substr(nvl(r.address_2, 'NA'), 0, 16) from kyc_hdr r where r.cif_no = l.customer_no) addrs2,(select substr(nvl(r.address_3, 'NA'), 0, 16) from kyc_hdr r") + .append(" where r.cif_no = l.customer_no) addrs3, to_char(l.acct_open_dt, 'dd-Mon-YYYY') acct_opn_date, 'NA' mat_date,l.prin_outst from loan_account l where l.key_1 = ?"); + + + + ps = con.prepareStatement(accountGetQuery.toString()); + ps.setString(1,accountDet.getAccountCode() ); + ps.setString(2,accountDet.getAccountCode() ); + rs= ps.executeQuery(); + while(rs.next()) + { + accountDet.setAccountName(rs.getString("cust_name")==null ?"N/A":rs.getString("cust_name")); + accountDet.setAdd1(rs.getString("addrs1")==null ?"N/A":rs.getString("addrs1")); + accountDet.setAdd2(rs.getString("addrs2")==null?"N/A":rs.getString("addrs2")); + accountDet.setAdd3(rs.getString("addrs3")==null?"N/A":rs.getString("addrs3")); + accountDet.setAccntOpenDate(rs.getString("acct_opn_date").equals("")?"N/A":rs.getString("acct_opn_date")); + accountDet.setAccntMaturityDate(rs.getString("mat_date").equals("")?"N/A":rs.getString("mat_date")); + + } + } + catch(Exception e){ + // e.printStackTrace(); + // System.out.println("Exception occured fetching dept details for account in getreciptDetails :"+ accountDet.getAccountCode()); + System.out.println("Error occurred during processing."); + } + finally + { + try { + if (rs != null) { + rs.close(); + } + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + } + + + public ArrayList getTransactionForAgent(String tellerId, String pacsId ,MicroFileAccountDetBean accountDet , String from_date , String to_date) + { + + Connection con = null; + StringBuilder accountGetQuery = null; + ResultSet rs = null; + PreparedStatement ps= null; + ArrayList accountDetlist = new ArrayList(); + MicroFileAccountDetBean accountDetails = null; + + try{ + con = DbHandler.getDBConnection(); + accountGetQuery = new StringBuilder() +// .append(" select to_char(rownum) sl_no,n.acct_no acct,(select substr((r.first_name||' '||r.middle_name||' '||r.last_name),0,20) ") +// .append(" from kyc_hdr r where r.cif_no=(select d.customer_no from dep_account d where d.key_1=n.acct_no)) cust_name, ") +// .append(" (case n.tran_ind when 'CR' then 'Deposit' else 'Withdrawl' end ) typ,abs(n.txn_amt) txnAmt ") +// .append(" from dep_txn n where n.acct_no in (select d.key_1 from dep_account d where d.pacs_id=?) ") +// .append(" and upper(n.narration) like '%POS MACHINE CASH%' and get_user_role(n.checker_id)='201603000004020'and n.checker_id=? ") +// .append(" and n.tran_date =(select system_date from system_date)union all select ' ' sl_no,'Total' acct,(' :') cust_name, ") +// .append(" ' ' typ,sum(n.txn_amt)from dep_txn n where n.acct_no in (select d.key_1 from dep_account d where d.pacs_id=?) ") +// .append(" and upper(n.narration) like '%POS MACHINE CASH%' and get_user_role(n.checker_id)='201603000004020' ") +// .append(" and n.checker_id= ? and n.tran_date =(select system_date from system_date) "); +// + .append(" select to_char(rownum) sl_no, nvl(n.acct_no, 'NA') acct, (select substr((r.first_name || ' ' || r.middle_name || ' ' || r.last_name), 0,20)") + .append(" from kyc_hdr r where r.cif_no = (select d.customer_no from dep_account d where d.key_1 = n.acct_no)) cust_name, (case n.tran_ind when 'CR' then ") + .append(" 'cr' else 'dr' end) typ, abs(n.txn_amt) txnAmt from dep_txn n where '0'||substr(n.checker_id,0,4)= ? and upper(n.narration) like '%POS MACHINE CASH%' and get_user_role(n.checker_id) = '201603000004020'") + .append(" and n.checker_id = ? and n.tran_date >= to_date(?, 'dd/mm/yyyy') and n.tran_date <= to_date(?, 'dd/mm/yyyy') union all select to_char(rownum) sl_no,nvl(n.acct_no, 'NA') acct,") + .append(" (select substr((r.first_name || ' ' || r.middle_name || ' ' || r.last_name), 0, 20) from kyc_hdr r where r.cif_no = (select d.customer_no from dep_account d") + .append(" where d.key_1 = n.acct_no)) cust_name, (case n.tran_ind when 'CR' then 'cr' else 'dr' end) typ, abs(n.txn_amt) txnAmt from loan_txn n where '0'||substr(n.checker_id,0,4)= ? ") + .append(" and upper(n.narration) like '%FROM POS MACHINE%' and get_user_role(n.checker_id) = '201603000004020' and trim(n.checker_id) = ? and n.tran_date>= to_date(?,'dd/mm/yyyy') and n.tran_date<= to_date(?,'dd/mm/yyyy') "); + + + ps = con.prepareStatement(accountGetQuery.toString()); + ps.setString(1,pacsId ); + ps.setString(2,tellerId ); + ps.setString(3,from_date ); + ps.setString(4,to_date ); + ps.setString(5,pacsId ); + ps.setString(6,tellerId ); + ps.setString(7,from_date ); + ps.setString(8,to_date ); + rs= ps.executeQuery(); + while(rs.next()) + { + accountDetails = new MicroFileAccountDetBean(); + accountDetails.setSlNo(rs.getString("SL_NO")); + accountDetails.setAccountCode(rs.getString("ACCT")); + accountDetails.setAvailBal(rs.getDouble("TXNAMT")); + accountDetails.setProdType(rs.getString("TYP")); + accountDetlist.add(accountDetails); + + } + } + catch(Exception e){ + // e.printStackTrace(); + // System.out.println("Exception occured fetching dept details for account in getTotalTransactionForAgent fro agent :"+ tellerId); + System.out.println("Error occurred during processing."); + } + finally + { + try { + if (rs != null) { + rs.close(); + } + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return accountDetlist; + } + + public void getTotalTransactionForAgent(String tellerId, String pacsId ,MicroFileAccountDetBean accountDet , String from_date , String to_date) + { + + Connection con = null; + StringBuilder accountGetQuery = null; + ResultSet rs = null; + PreparedStatement ps= null; + + try{ + con = DbHandler.getDBConnection(); + accountGetQuery = new StringBuilder() +// .append(" select (select to_char(system_date,'dd-Mon-YYYY') from system_date) dt,(select sum(n.txn_amt) ") +// .append(" from dep_txn n where n.acct_no in (select d.key_1 from dep_account d where d.pacs_id= ? )") +// .append(" and upper(n.narration) like '%POS MACHINE CASH%' and get_user_role(n.checker_id)='201603000004020'") +// .append(" and n.checker_id= ? and n.tran_date =(select system_date from system_date) and n.tran_ind='CR') cr_total,(select ") +// .append(" sum(n.txn_amt) from dep_txn n where n.acct_no in (select d.key_1 from dep_account d where d.pacs_id=?) and upper(n.narration) like '%POS MACHINE CASH%'") +// .append(" and get_user_role(n.checker_id)='201603000004020' and n.checker_id=? and n.tran_date =(select system_date from system_date)") +// .append(" and n.tran_ind='DR') dr_total from dual"); + + .append(" select t.dt,sum(t.cr_total) cr_total,sum(t.dr_total) dr_total from ( select (select to_char(system_date, 'dd-Mon-YYYY') from system_date) dt,") + .append(" nvl((select sum(n.txn_amt) from dep_txn n where '0'||substr(n.checker_id,0,4)= ? and upper(n.narration) like '%POS MACHINE CASH%' and get_user_role(n.checker_id) = '201603000004020'") + .append(" and n.checker_id = ? and n.tran_date>= to_date(?,'dd/mm/yyyy') and n.tran_date<= to_date(?,'dd/mm/yyyy') and n.tran_ind = 'CR'),0) cr_total, nvl((select sum(n.txn_amt) from dep_txn n") + .append(" where '0'||substr(n.checker_id,0,4)= ? and upper(n.narration) like '%POS MACHINE CASH%' and get_user_role(n.checker_id) = '201603000004020' and n.checker_id = ? and n.tran_date >= to_date(?, 'dd/mm/yyyy') and n.tran_date <= to_date(?, 'dd/mm/yyyy')") + .append(" and n.tran_ind = 'DR'),0) dr_total from dual union all select (select to_char(system_date, 'dd-Mon-YYYY') from system_date) dt, nvl((select sum(n.txn_amt) from loan_txn n where '0'||substr(n.checker_id,0,4)=?") + .append(" and upper(n.narration) like '%FROM POS MACHINE%' and get_user_role(n.checker_id) = '201603000004020' and n.checker_id = ? and n.tran_date>= to_date(?,'dd/mm/yyyy') and n.tran_date<= to_date(?,'dd/mm/yyyy') and n.tran_ind = 'CR'),0) cr_total,") + .append(" nvl((select sum(n.txn_amt) from loan_txn n where '0'||substr(n.checker_id,0,4)= ? and upper(n.narration) like '%FROM POS MACHINE%' and get_user_role(n.checker_id) = '201603000004020' and n.checker_id = ?") + .append(" and n.tran_date>= to_date(?,'dd/mm/yyyy') and n.tran_date<= to_date(?,'dd/mm/yyyy') and n.tran_ind = 'DR'),0) dr_total from dual)t group by t.dt"); + + + ps = con.prepareStatement(accountGetQuery.toString()); + ps.setString(1,pacsId); + ps.setString(2,tellerId ); + ps.setString(3,from_date ); + ps.setString(4,to_date ); + ps.setString(5,pacsId ); + ps.setString(6,tellerId ); + ps.setString(7,from_date ); + ps.setString(8,to_date ); + ps.setString(9,pacsId); + ps.setString(10,tellerId ); + ps.setString(11,from_date ); + ps.setString(12,to_date ); + ps.setString(13,pacsId ); + ps.setString(14,tellerId ); + ps.setString(15,from_date ); + ps.setString(16,to_date ); + + rs= ps.executeQuery(); + while(rs.next()) + { + accountDet.setAccntMaturityDate(rs.getString("dt")); + accountDet.setCrTotal(rs.getDouble("cr_total")); + accountDet.setDrTotal(rs.getDouble("dr_total")); + accountDet.setMessage("SUCCESS"); + + } + } + catch(Exception e){ + // e.printStackTrace(); + // System.out.println("Exception occured fetching dept details for account in getTotalTransactionForAgent for agent :"+ tellerId); + System.out.println("Error occurred during processing."); + } + finally + { + try { + if (rs != null) { + rs.close(); + } + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + } + + public String TotalCashDepositOperation(String tellerId, String pacsId, String amnt, String agentId, HttpServletRequest request) { + Connection con = null; + CallableStatement proc = null; + String res = null; + //String twothouIN = (String) request.getParameter("twothouIN") == "" ? "0" : (request.getParameter("twothouIN")); + //String twothouOUT = request.getParameter("twothouOUT") == "" ? "0" : (request.getParameter("twothouOUT")); + //String fivehundredIN = request.getParameter("fivehundredIN") == "" ? "0" : (request.getParameter("fivehundredIN")); + //String fivehundredOUT = request.getParameter("fivehundredOUT") == "" ? "0" : (request.getParameter("fivehundredOUT")); + //String hundredIN = request.getParameter("hundredIN") == "" ? "0" : (request.getParameter("hundredIN")); + //String hundredOUT = request.getParameter("hundredOUT") == "" ? "0" : (request.getParameter("hundredOUT")); + //String fiftyIN = request.getParameter("fiftyIN") == "" ? "0" : (request.getParameter("fiftyIN")); + //String fiftyOUT = request.getParameter("fiftyOUT") == "" ? "0" : (request.getParameter("fiftyOUT")); + //String twentyIN = request.getParameter("twentyIN") == "" ? "0" : (request.getParameter("twentyIN")); + //String twentyOUT = request.getParameter("twentyOUT") == "" ? "0" : (request.getParameter("twentyOUT")); + //String tenIN = request.getParameter("tenIN") == "" ? "0" : (request.getParameter("tenIN")); + //String tenOUT = request.getParameter("tenOUT") == "" ? "0" : (request.getParameter("tenOUT")); + //String fiveIN = request.getParameter("fiveIN") == "" ? "0" : (request.getParameter("fiveIN")); + //String fiveOUT = request.getParameter("fiveOUT") == "" ? "0" : (request.getParameter("fiveOUT")); + //String twoIN = request.getParameter("twoIN") == "" ? "0" : (request.getParameter("twoIN")); + //String twoOUT = request.getParameter("twoOUT") == "" ? "0" : (request.getParameter("twoOUT")); + //String oneIN = request.getParameter("oneIN") == "" ? "0" : (request.getParameter("oneIN")); + //String oneOUT = request.getParameter("oneOUT") == "" ? "0" : (request.getParameter("oneOUT")); + //String fiftyPaisaIN = request.getParameter("fiftyPaisaIN") == "" ? "0" : (request.getParameter("fiftyPaisaIN")); + //String fiftyPaisaOUT = request.getParameter("fiftyPaisaOUT") == "" ? "0" : (request.getParameter("fiftyPaisaOUT")); + //String onePaisaIN = request.getParameter("onePaisaIN") == "" ? "0" : (request.getParameter("onePaisaIN")); + //String onePaisaOUT = request.getParameter("onePaisaOUT") == "" ? "0" : (request.getParameter("onePaisaOUT")); + //String twohundredIN = request.getParameter("twohundredIN") == "" ? "0" : (request.getParameter("twohundredIN")); + //String twohundredOUT = request.getParameter("twohundredOUT") == "" ? "0" : (request.getParameter("twohundredOUT")); + + + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call operations1.DDS_AGENT_CASH_DEPOSIT(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + + proc.setString(1, tellerId); + proc.setString(2, pacsId); + proc.setString(3, agentId); + proc.setString(4, amnt); + proc.setString(5, twothouIN); + proc.setString(6, fivehundredIN); + proc.setString(7, hundredIN); + proc.setString(8, fiftyIN); + proc.setString(9, twentyIN); + proc.setString(10, tenIN); + proc.setString(11, fiveIN); + proc.setString(12, twoIN); + proc.setString(13, oneIN); + proc.setString(14, fiftyPaisaIN); + proc.setString(15, onePaisaIN); + proc.setString(16, twothouOUT); + proc.setString(17, fivehundredOUT); + proc.setString(18, hundredOUT); + proc.setString(19, fiftyOUT); + proc.setString(20, twentyOUT); + proc.setString(21, tenOUT); + proc.setString(22, fiveOUT); + proc.setString(23, twoOUT); + proc.setString(24, oneOUT); + proc.setString(25, fiftyPaisaOUT); + proc.setString(26, onePaisaOUT); + proc.registerOutParameter(27, OracleTypes.VARCHAR); + proc.setString(28, twohundredIN); + proc.setString(29, twohundredOUT); + + proc.executeUpdate(); + + // res = proc.getString(27);//success/failure + + } catch (Exception e) { + res = "Error occured in processing.Please try again."; + // e.printStackTrace(); + // System.out.println("Exception occured in TotalCashDepositOperation for user Id :" + tellerId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + // return res; + } + return res; + } + +} diff --git a/IPKS_Updated/src/src/java/Dao/ChangeUserPasswordDao.java b/IPKS_Updated/src/src/java/Dao/ChangeUserPasswordDao.java new file mode 100644 index 0000000..179cae3 --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/ChangeUserPasswordDao.java @@ -0,0 +1,98 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Dao; + +import LoginDb.DbHandler; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author 1004242 + */ +public class ChangeUserPasswordDao { + + + public List CheckPreviousPwd(String user) { + Connection con = null; + StringBuilder checkPrevPwdQuery = null; + PreparedStatement ps = null; + ResultSet res = null; + List passwordList = new ArrayList(); + + try { + con = DbHandler.getDBConnection(); + checkPrevPwdQuery = new StringBuilder("select PREV_PWD_OLD,PREV_PWD, password from login_details where login_id = ?"); + + ps = con.prepareStatement(checkPrevPwdQuery.toString()); + ps.setString(1, user); + + res = ps.executeQuery(); + if (res.next()) { + passwordList.add(res.getString("password")); + passwordList.add(res.getString("PREV_PWD")); + passwordList.add(res.getString("PREV_PWD_OLD")); + } + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured fetching prev_pwd in CheckPreviousPwd for user Id :" + user); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return passwordList; + } + + public int updateNewAndOldPwd(String user, String newPwd, String currentPwd, String prevPwd, String pacs_Id) { + Connection con = null; + StringBuilder updatePwdQuery = null; + PreparedStatement ps = null; + int res = 0; + try { + + con = DbHandler.getDBConnection(); + updatePwdQuery = new StringBuilder("update login_details set password= ?, prev_pwd = ?, prev_pwd_old = ? ,first_login_flag='T',PWD_UPDATE_DATE=trunc(sysdate),PWD_EXPIRY_DATE=trunc(sysdate)+30,IS_PWD_EXPIRED='N' where login_id = ? and pacs_id = ? "); + + ps = con.prepareStatement(updatePwdQuery.toString()); + ps.setString(1, newPwd); + ps.setString(2, currentPwd); + ps.setString(3, prevPwd); + ps.setString(4, user); + ps.setString(5, pacs_Id); + res = ps.executeUpdate(); + // con.commit(); + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured updating prev_pwd in updateNewAndOldPwd for user Id :" + user); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + return res; + } +} diff --git a/IPKS_Updated/src/src/java/Dao/ChequePostingDao.java b/IPKS_Updated/src/src/java/Dao/ChequePostingDao.java new file mode 100644 index 0000000..c001c86 --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/ChequePostingDao.java @@ -0,0 +1,160 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Dao; + +import DataEntryBean.ChequeDetailsBean; +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.ArrayList; +import oracle.jdbc.OracleTypes; + +/** + * + * @author 1004242 + */ +public class ChequePostingDao { + + public String PostChequeProc(String tellerId, String pacsId, String accNo, String chqNo, String chqDt, Double chqAmt, String chqBnk) { + Connection con = null; + CallableStatement proc = null; + String res = null; + + + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call operations1.POST_CHEQUE(?,?,?,?,?,?,?,?) }"); + + proc.setString(1, tellerId); + proc.setString(2, pacsId); + proc.setString(3, accNo); + proc.setString(4, chqNo); + proc.setString(5, chqDt); + proc.setDouble(6, chqAmt); + proc.setString(7, chqBnk); + proc.registerOutParameter(8, OracleTypes.VARCHAR); + + + proc.executeUpdate(); + + // res = proc.getString(8);//error message from dds procedure + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in PostChequeProc for user Id :" + tellerId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return res; + } + + public ArrayList getChequedetails(String pacsId, String accNo) { + + ArrayList allChequeList = new ArrayList(); + ResultSet rs = null; + PreparedStatement ps = null; + Connection con = null; + StringBuilder chequeGetQuery = null; + ChequeDetailsBean chqDet = null; + + try { + + con = DbHandler.getDBConnection(); + chequeGetQuery = new StringBuilder() + .append(" Select CHQ_NO ,to_char(CHQ_DATE,'dd-mm-yyyy') CHQ_DATE ,CHQ_AMT,CHQ_CLR_BANK,to_char(POST_DATE,'dd-mm-yyyy') POST_DATE,KEY_1 from INWARD_CHQ_DETAILS ") + .append(" where key_1 = ? and pacs_id = ? and status='PENDING' "); + ps = con.prepareStatement(chequeGetQuery.toString()); + ps.setString(1, accNo); + ps.setString(2, pacsId); + // rs = ps.executeQuery(); + while (rs.next()) { + + chqDet = new ChequeDetailsBean(); + chqDet.setChqno(rs.getString("CHQ_NO")); + chqDet.setChqDate(rs.getString("CHQ_DATE")); + chqDet.setChqAmnt(rs.getDouble("CHQ_AMT")); + chqDet.setChqBank(rs.getString("CHQ_CLR_BANK")); + chqDet.setChqPostDate(rs.getString("POST_DATE")); + + allChequeList.add(chqDet); + } + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured fetching dept details for pacs :" + pacsId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (rs != null) { + rs.close(); + } + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + return allChequeList; + } + + + public String ProcessChequeProc(String tellerId, String pacsId, String accNo, String chqNo, Double comission, String action , String narration) { + Connection con = null; + CallableStatement proc = null; + String res = null; + + + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call operations1.POST_CHEQUE_TXN(?,?,?,?,?,?,?,?) }"); + + proc.setString(1, tellerId); + proc.setString(2, pacsId); + proc.setString(3, accNo); + proc.setString(4, chqNo); + proc.setString(5, action); + proc.setDouble(6, comission); + proc.registerOutParameter(7, OracleTypes.VARCHAR); + proc.setString(8, narration); + + + proc.executeUpdate(); + + // res = proc.getString(7);//error message from dds procedure + + } catch (Exception e) { + res= "Error in processsing cheque No :"+chqNo; + // e.printStackTrace(); + // System.out.println("Exception occured in ProcessChequeProc for user Id :" + tellerId); + System.out.println("Error occurred during processing."); + } finally { + try { + // con.commit(); + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return res; + } +} diff --git a/IPKS_Updated/src/src/java/Dao/ChequePostingDao_old.java b/IPKS_Updated/src/src/java/Dao/ChequePostingDao_old.java new file mode 100644 index 0000000..b7302db --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/ChequePostingDao_old.java @@ -0,0 +1,67 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Dao; + +import DataEntryBean.MicroFileAccountDetBean; +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import oracle.jdbc.OracleTypes; + +/** + * + * @author 1004242 + */ +public class ChequePostingDao_old { + + + public String PostChequeProc(String tellerId, String pacsId,String accNo,String chqNo,String chqDt,Double chqAmt,String chqBnk) { + Connection con = null; + CallableStatement proc = null; + String res = null; + + + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call operations1.POST_CHEQUE(?,?,?,?,?,?,?,?) }"); + + proc.setString(1, tellerId); + proc.setString(2, pacsId); + proc.setString(3, accNo); + proc.setString(4, chqNo); + proc.setString(5, chqDt); + proc.setDouble(6, chqAmt); + proc.setString(7, chqBnk); + proc.registerOutParameter(8, OracleTypes.VARCHAR); + + + proc.executeUpdate(); + + res = proc.getString(8);//error message from dds procedure + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in PostChequeProc for user Id :" + tellerId); + System.out.println("Error occurred during processing."); + } finally { + try { + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return res; + } + + + +} diff --git a/IPKS_Updated/src/src/java/Dao/FamerDetailsUpdationDao.java b/IPKS_Updated/src/src/java/Dao/FamerDetailsUpdationDao.java new file mode 100644 index 0000000..3200652 --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/FamerDetailsUpdationDao.java @@ -0,0 +1,106 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Dao; + +import DataEntryBean.ChequeDetailsBean; +import DataEntryBean.FarmerDetailsBean; +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import oracle.jdbc.OracleTypes; + +/** + * + * @author 1004242 + */ +public class FamerDetailsUpdationDao { + + + + public String saveFarmerlandDetails(String tellerId, String pacsId, String cif ,ArrayList alFarmerDetList) { + Connection con = null; + CallableStatement proc = null; + int res = 0; + FarmerDetailsBean farmerLandDet=null; + String message = null; + String messageBackEnd = null; + + try { + + if (alFarmerDetList.size() > 0) { + con = DbHandler.getDBConnection(); + con.setAutoCommit(false); + for (int j = 0; j < alFarmerDetList.size(); j++) { + proc = con.prepareCall("{ call operations1.farmer_details(?,?,?,?,?,?,?,?,?,?,?,?) }"); + farmerLandDet = alFarmerDetList.get(j); + + proc.setString(1, pacsId); + proc.setString(2, null); + proc.setString(3, tellerId); + proc.setString(4, cif); + proc.setString(5, farmerLandDet.getManja()); + proc.setString(6, farmerLandDet.getDgNo()); + proc.setString(7, farmerLandDet.getgP()); + proc.setString(8, farmerLandDet.getVillage()); + proc.setString(9, farmerLandDet.getKhatiyan()); + proc.setDouble(10, farmerLandDet.getArea()); + proc.registerOutParameter(11, OracleTypes.NUMBER); + proc.registerOutParameter(12, OracleTypes.VARCHAR); + proc.executeUpdate(); + + res = proc.getInt(11);//error message from procedure + // messageBackEnd = proc.getString(12); + if (res != 0) { + con.rollback(); + break; + } + + proc.close(); + } + + if (res ==0 ) { + message = messageBackEnd; + con.commit(); + } + else + { + message = messageBackEnd; + } + } + + } catch (Exception e) { + message= "Error in processsing cif land details Updation for :"+cif; + if (con != null) { + try { + con.rollback(); + } catch (SQLException ex) { + // Logger.getLogger(FamerDetailsUpdationDao.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error occurred during processing."); + } + } + // e.printStackTrace(); + // System.out.println("Exception occured in saveFarmerlandDetails for user Id :" + tellerId); + System.out.println("Error occurred during processing."); + } finally { + try { + con.commit(); + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return message; + } +} diff --git a/IPKS_Updated/src/src/java/Dao/ForceAccountClosureDao.java b/IPKS_Updated/src/src/java/Dao/ForceAccountClosureDao.java new file mode 100644 index 0000000..ff12dcf --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/ForceAccountClosureDao.java @@ -0,0 +1,59 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Dao; + + +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import oracle.jdbc.OracleTypes; + +/** + * + * @author 1242938 + */ +public class ForceAccountClosureDao { + + public String ForceAccountClosureServletProc(String pacsId, String accNo, String tellerId) { + Connection con = null; + CallableStatement proc = null; + String res = null; + + + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call operations2.force_acc_close(?,?,?,?) }"); + + proc.setString(1, pacsId); + proc.setString(2, accNo); + proc.setString(3, tellerId); + proc.registerOutParameter(4, OracleTypes.VARCHAR); + + + proc.executeUpdate(); + + // res = proc.getString(4);//error message + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in ForceAccountClosureServletProc for user Id :" + tellerId); + System.out.println("Error occurred during processing."); + res= "Error occured. Please try again"; + } finally { + try { + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return res; + } + + +} diff --git a/IPKS_Updated/src/src/java/Dao/ForceDebitCapitalisationDao.java b/IPKS_Updated/src/src/java/Dao/ForceDebitCapitalisationDao.java new file mode 100644 index 0000000..ce24cae --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/ForceDebitCapitalisationDao.java @@ -0,0 +1,60 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Dao; + + +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import oracle.jdbc.OracleTypes; + +/** + * + * @author 1242938 + */ +public class ForceDebitCapitalisationDao { + + public String ForceDebitCapitalisationProc(String accNo, String pacsId, String frcdInt, String tellerId) { + Connection con = null; + CallableStatement proc = null; + String res = null; + + + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call operations2.POST_FORCE_DR_CAP(?,?,?,?,?) }"); + + proc.setString(1, accNo); + proc.setString(2, pacsId); + proc.setString(3, frcdInt); + proc.setString(4, tellerId); + proc.registerOutParameter(5, OracleTypes.VARCHAR); + + + proc.executeUpdate(); + + // res = proc.getString(5);//error message + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in ForceDebitCapitalisationProc for user Id :" + tellerId); + System.out.println("Error occurred during processing."); + res= "Error occured. Please try again"; + } finally { + try { + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return res; + } + + +} diff --git a/IPKS_Updated/src/src/java/Dao/InsuranceAdditionDao.java b/IPKS_Updated/src/src/java/Dao/InsuranceAdditionDao.java new file mode 100644 index 0000000..c2f2787 --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/InsuranceAdditionDao.java @@ -0,0 +1,67 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Dao; + +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import oracle.jdbc.OracleTypes; + +/** + * + * @author 1004242 + */ +public class InsuranceAdditionDao { + + + public String createOrUpdateInsurance(String tellerId, String pacsId,String cif ,String insNo,String insDate,String insCompany,String txnType ) { + Connection con = null; + CallableStatement proc = null; + String res = "Request can not be processed"; + int countErr=0; + System.out.println("createOrUpdateInsurance for user Id :" + tellerId +" ops type:"+txnType); + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call operations1.POST_CGS_INS(?,?,?,?,?,?,?,?,?) }"); + + proc.setString(1, pacsId); + proc.setString(2, tellerId); + proc.setString(3, cif); + proc.setString(4, insNo); + proc.setString(5, insDate); + proc.setString(6, insCompany); + proc.setString(7, txnType); + proc.registerOutParameter(8, OracleTypes.VARCHAR); + proc.registerOutParameter(9, OracleTypes.NUMBER); + + + + proc.executeUpdate(); + + // res = proc.getString(8);//error message + countErr = proc.getInt(9);//error count + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in createOrUpdateInsurance for user Id :" + tellerId); + System.out.println("Error occurred during processing."); + res = "Request can not be processed"; + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return res; + } + +} diff --git a/IPKS_Updated/src/src/java/Dao/KCCForceCapitalisationDao.java b/IPKS_Updated/src/src/java/Dao/KCCForceCapitalisationDao.java new file mode 100644 index 0000000..998d10b --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/KCCForceCapitalisationDao.java @@ -0,0 +1,60 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Dao; + + +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import oracle.jdbc.OracleTypes; + +/** + * + * @author 1242938 + */ +public class KCCForceCapitalisationDao { + + public String KCCForceCapitalisationProc(String accNo, String pacsId, String frcdInt, String tellerId) { + Connection con = null; + CallableStatement proc = null; + String res = null; + + + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call operations2.POST_FORCE_DR_CAP_kcc(?,?,?,?,?) }"); + + proc.setString(1, accNo); + proc.setString(2, pacsId); + proc.setString(3, frcdInt); + proc.setString(4, tellerId); + proc.registerOutParameter(5, OracleTypes.VARCHAR); + + + proc.executeUpdate(); + + // res = proc.getString(5);//error message + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in ForceDebitCapitalisationProc for user Id :" + tellerId); + System.out.println("Error occurred during processing."); + res= "Error occured. Please try again"; + } finally { + try { + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return res; + } + + +} diff --git a/IPKS_Updated/src/src/java/Dao/LoanPrincipalAdjustmentDao.java b/IPKS_Updated/src/src/java/Dao/LoanPrincipalAdjustmentDao.java new file mode 100644 index 0000000..452ac52 --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/LoanPrincipalAdjustmentDao.java @@ -0,0 +1,62 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Dao; + + +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import oracle.jdbc.OracleTypes; + +/** + * + * @author 1242938 + */ +public class LoanPrincipalAdjustmentDao { + + public String loanPrinAdjProc(String pacsId, String accNo, String bglAccNo, String newPrincipal, String tellerId, String narration) { + Connection con = null; + CallableStatement proc = null; + String res = null; + + + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call operations2.LOAN_PRIN_UPDATE(?,?,?,?,?,?,?) }"); + + proc.setString(1, pacsId); + proc.setString(2, accNo); + proc.setString(3, bglAccNo); + proc.setString(4, newPrincipal); + proc.setString(5, tellerId); + proc.setString(6, narration); + proc.registerOutParameter(7, OracleTypes.VARCHAR); + + + proc.executeUpdate(); + + // res = proc.getString(7);//error message from dds procedure + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in loanPrinAdjProc for user Id :" + tellerId); + System.out.println("Error occurred during processing."); + res= "Error occured. Please try again"; + } finally { + try { + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return res; + } + + +} diff --git a/IPKS_Updated/src/src/java/Dao/LogOutDao.java b/IPKS_Updated/src/src/java/Dao/LogOutDao.java new file mode 100644 index 0000000..eecde59 --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/LogOutDao.java @@ -0,0 +1,67 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package Dao; + +import LoginDb.DbHandler; +import java.sql.Connection; +import java.sql.PreparedStatement; + +/** + * + * @author 981898 + */ +public class LogOutDao { + + public int removeFromLoggedInUsers(String sessionId, String userId, int temp) { + Connection con = null; + StringBuilder userLoginDetailsRemovequery = null; + PreparedStatement ps = null; + int res = 0; + try { + con = DbHandler.getDBConnection(); + if (temp == 0) { + userId = "tomcatDownEventUsers"; + sessionId = "ALL"; + userLoginDetailsRemovequery = new StringBuilder("Delete from logged_in_users"); + } else if (temp == 1 || temp == 2) { + if (temp == 2) { + userId = "tomcatSessionOutUsers"; + } + + userLoginDetailsRemovequery = new StringBuilder("Delete from logged_in_users where session_id=?"); + } + ps = con.prepareStatement(userLoginDetailsRemovequery.toString()); + + if (temp == 1 || temp == 2) { + ps.setString(1, sessionId); + } + + + res = ps.executeUpdate(); + if (res != 0) { + System.out.println("User removed from on logout logged_in_users for session Id :" + sessionId + " and user Id :" + userId); + } else { + System.out.println("No user login details found in logged_in_users on logout for session Id :" + sessionId + " and user Id :" + userId); + } + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured removing details in logged_in_users for session Id :" + sessionId + " and user Id :" + userId); + System.out.println("Error occurred during processing."); + } finally { + try { + if (con != null) { + con.close(); + } + userLoginDetailsRemovequery = null; + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + return res; + } +} diff --git a/IPKS_Updated/src/src/java/Dao/LoginDao.java b/IPKS_Updated/src/src/java/Dao/LoginDao.java new file mode 100644 index 0000000..5a014f0 --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/LoginDao.java @@ -0,0 +1,636 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Dao; + +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import javax.servlet.http.HttpSession; +import oracle.jdbc.OracleTypes; + +/** + * + * @author 1004242 + */ +public class LoginDao { + + public int insertTotLoginDetails(HttpSession session) { + Connection con = null; + StringBuilder userLoginDetailsInsertquery = null; + PreparedStatement ps = null; + int res = 0; + String sessionId = session.getId(); + String user = (String) session.getAttribute("user"); + String pacsId = (String) session.getAttribute("pacsId"); + try { + con = DbHandler.getDBConnection(); + userLoginDetailsInsertquery = new StringBuilder("INSERT INTO logged_in_users (SESSION_ID,USER_ID,LOGIN_TIME,PACS_ID) values (?,?,sysdate,?)"); + + ps = con.prepareStatement(userLoginDetailsInsertquery.toString()); + ps.setString(1, sessionId); + ps.setString(2, user); + ps.setString(3, pacsId); + + + res = ps.executeUpdate(); + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured inserting details in login_details for pacs :" + pacsId + " and user Id :" + user); + System.out.println("Error occurred during processing."); + } finally { + try { + + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + return res; + + } + + public boolean checkIfUserLoggedIn(String user, String pacsId, int temp) { + Connection con = null; + StringBuilder checkUserLoggedInQuery = null; + PreparedStatement ps = null; + ResultSet res = null; + + try { + con = DbHandler.getDBConnection(); + + checkUserLoggedInQuery = new StringBuilder("select * from logged_in_users where "); + if (temp == 1) { + checkUserLoggedInQuery.append(" user_id = ? and pacs_Id = ?"); + } else if (temp == 0) { + checkUserLoggedInQuery.append(" session_id = ? and pacs_Id = ?"); + } + + ps = con.prepareStatement(checkUserLoggedInQuery.toString()); + ps.setString(1, user); + ps.setString(2, pacsId); + + res = ps.executeQuery(); + if (res.next()) { + return true; + } else { + return false; + } + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured fetching details in logged_in_users for user Id :" + user); + System.out.println("Error occurred during processing."); + return false; + } finally { + try { + + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + } + + public boolean verifySamPacsForUser(String userModifiable, String userLoggedInPacs) { + Connection con = null; + StringBuilder checkUserPacs = null; + PreparedStatement ps = null; + ResultSet res = null; + String userModifiablePacs = null; + + + try { + con = DbHandler.getDBConnection(); + checkUserPacs = new StringBuilder("select pacs_id from login_details where login_id = ? and pacs_id = ?"); + + ps = con.prepareStatement(checkUserPacs.toString()); + // ps.setString(1, userLoggedInPacs); + ps.setString(1, userModifiable); + ps.setString(2, userLoggedInPacs); + + res = ps.executeQuery(); + if (res.next()) { + userModifiablePacs = res.getString("pacs_id"); + if (userLoggedInPacs.equalsIgnoreCase(userModifiablePacs)) { + return true; + } + } + return false; + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured fetching details in verifySamPacsForUser for user Id :" + userModifiable); + System.out.println("Error occurred during processing."); + return false; + } finally { + try { + + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + } + + public boolean resetUserPassword(String userModifiable, String userLoggedInPacs) { + Connection con = null; + StringBuilder checkUserPacs = null; + PreparedStatement ps = null; + ResultSet res = null; + try { + con = DbHandler.getDBConnection(); + checkUserPacs = new StringBuilder("update login_details l set l.password='77+977+9Wd6T77+977+977+977+977+977+977+9fV5e77+9UFPvv73vv73vv71S77+977+977+9\n" + + "TUFkC++/vQrvv70=', l.FIRST_LOGIN_FLAG='F' where l.login_id= ? and l.pacs_id = ?"); + ps = con.prepareStatement(checkUserPacs.toString()); + ps.setString(1, userModifiable); + ps.setString(2, userLoggedInPacs); + res = ps.executeQuery(); + // con.commit(); + return true; +// if (res.next()) { +// userModifiablePacs = res.getString("pacs_id"); +// if (userLoggedInPacs.equalsIgnoreCase(userModifiablePacs)) { +// return true; +// } +// } + //return true; + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured fetching details in resetUserPassword for user Id :" + userModifiable); + System.out.println("Error occurred during processing."); + return false; + } finally { + try { + + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + } + + public List deleteFromLoggedInUser(String userId, String pacsId) { + Connection con = null; + StringBuilder deletUserFromLoggedIn = null; + StringBuilder selectUserSessionFromLoggedIn = null; + PreparedStatement ps = null; + ResultSet res = null; + int result = 0; + List userSessionList = new ArrayList(); + try { + con = DbHandler.getDBConnection(); + selectUserSessionFromLoggedIn = new StringBuilder("select SESSION_ID from logged_in_users where user_id = ? and pacs_Id = ? "); + + ps = con.prepareStatement(selectUserSessionFromLoggedIn.toString()); + ps.setString(1, userId); + ps.setString(2, pacsId); + + res = ps.executeQuery(); + while (res.next()) { + userSessionList.add(res.getString("SESSION_ID")); + } + System.out.println("Session Entry found for the user Id :" + userId + "in loggedIn_users:" + userSessionList.size()); + + ps = null; + res = null; + deletUserFromLoggedIn = new StringBuilder("delete from logged_in_users where user_id = ? and pacs_Id = ?"); + ps = con.prepareStatement(deletUserFromLoggedIn.toString()); + ps.setString(1, userId); + ps.setString(2, pacsId); + + result = ps.executeUpdate(); + if (result != 0) { + System.out.println("Session Entry deleted for the user Id :" + userId + "in loggedIn_users:" + res); + } + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured fetching details in deleteFromLoggedInUser for user Id :" + userId); + System.out.println("Error occurred during processing."); + } finally { + try { + + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + return userSessionList; + } + + public int insertToResetLoginActivity(String ownerUser, String resetableUser, String pacsId) { + // + Connection con = null; + StringBuilder userLoginResetActivityInsertquery = null; + PreparedStatement ps = null; + int res = 0; + String narration = "User Id " + resetableUser + " login status reset"; + java.util.Date myDate = new java.util.Date(); + java.sql.Date sqlDate = new java.sql.Date(myDate.getTime()); + try { + con = DbHandler.getDBConnection(); + userLoginResetActivityInsertquery = new StringBuilder("INSERT INTO user_activity (PACS_ID,USER_ID,POST_DATE,POST_TIME,ACTIVITY_TYP,NARATION) values (?,?,?,to_date(to_char(SYSTIMESTAMP, 'DD-MON-RRHH24:MI:SS'),'DD-MON-RRHH24:MI:SS'),?,?)"); + + ps = con.prepareStatement(userLoginResetActivityInsertquery.toString()); + ps.setString(1, pacsId); + ps.setString(2, ownerUser); + ps.setDate(3, sqlDate); + ps.setString(4, "FORCE LOGOUT"); + ps.setString(5, narration); + + res = ps.executeUpdate(); + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured inserting details in user_activity for pacs :" + pacsId + " and user Id :" + ownerUser); + System.out.println("Error occurred during processing."); + } finally { + try { + + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + return res; + + } + + public String findHolidayList(String pacsId) { + Connection con = null; + PreparedStatement ps = null; + Statement qry = null; + ResultSet rs = null; + String holidayList = ""; + int i = 0; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + // rs = qry.executeQuery("select to_char(h.holiday_dt, 'DD-MON-YYYY') h_dt, upper(h.reason)" + + " from holiday_list h" + + " where (select system_date from system_date) <= h.holiday_dt and h.holiday_dt - (select system_date from system_date) <= 15" + + " order by h.holiday_dt"); + + while(rs.next()){ + if(i > 0) + holidayList = holidayList + ", "; + + holidayList = holidayList + rs.getString(1) + " (" + rs.getString(2) + ")"; + i = i + 1; + } + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured while checking holiday list"); + System.out.println("Error occurred during processing."); + } finally { + try { + + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return holidayList; + } + +public String checkKCCBalanceTransfer(String pacsId) { + Connection con = null; + PreparedStatement ps = null; + Statement qry = null; + ResultSet rs = null; + String kccBalanceTransfer = ""; + + int i = 0; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + // rs = qry.executeQuery("select distinct dccb_name || ' on ' || to_char(trunc(sysdate - 1),'DD-MM-YYYY') from dccb_br_map r where r.dccb_code in (select distinct dccb_code from kcc_sftp_log li where to_date(li.proc_dt, 'DDMMYYYY') = trunc(sysdate) - 1 and li.file_id not in (select L.file_id from rupay_kcc_response_sal_files l where to_date(l.proc_dt, 'DDMMYYYY') = trunc(sysdate) - 1) and li.file_type = 'SBZERO')"); + + while(rs.next()){ + if(i > 0) + kccBalanceTransfer = kccBalanceTransfer + ", "; + + kccBalanceTransfer = kccBalanceTransfer + rs.getString(1); + i = i + 1; + } + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured while checking holiday list"); + System.out.println("Error occurred during processing."); + } finally { + try { + + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return kccBalanceTransfer; + } + +// public boolean checkIfDiffeUserLoggedInWithSameSession(String sessionId) +// { +// Connection con = null; +// StringBuilder checkUserLoggedInQuery = null; +// PreparedStatement ps = null; +// ResultSet res = null; +// +// try { +// con = DbHandler.getDBConnection(); +// checkUserLoggedInQuery = new StringBuilder("select * from logged_in_users where session_id = ?"); +// +// ps = con.prepareStatement(checkUserLoggedInQuery.toString()); +// ps.setString(1, sessionId); +// +// res = ps.executeQuery(); +// if (res.next()) { +// +// if(res.getString("user_id").equalsIgnoreCase()) +// return true; +// } else { +// return false; +// } +// +// } catch (Exception e) { +// e.printStackTrace(); +// System.out.println("Exception occured fetching details in logged_in_users for user Id :" + user); +// return false; +// } finally { +// try { +// +// if (con != null) { +// con.close(); +// } +// } catch (Exception e) { +// e.printStackTrace(); +// } +// } +// } + public String checkLoginPrivilages(String user, String userLoggedInPacs) { + Connection con = null; + Connection con2 = null; + CallableStatement proc = null; + StringBuilder checkUserPacs = null; + PreparedStatement ps = null; + ResultSet res = null; + String userModifiablePacs = null; + String result = null; + int count = 0; + SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); + String time = sdf.format(new Date()); + + + try { + con = DbHandler.getDBConnection(); + checkUserPacs = new StringBuilder("select count(*) from holiday_list h where h.holiday_dt = (select system_date from system_date)"); + + ps = con.prepareStatement(checkUserPacs.toString()); + res = ps.executeQuery(); + + if (res.next()) { + + if (res.getInt(1) > 0) { + return "HOLIDAY";//Restrict login on Holiday + } else { + result = "TRUE";// allow login if not a holiday + } + } + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured while checking for holiday list"); + System.out.println("Error occurred during processing."); + return result; + } finally { + try { + + if (con != null) { + con.close(); + } + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + + try { + con = DbHandler.getDBConnection(); + checkUserPacs = new StringBuilder("select count(1) as countEntry from pacs_ip_map p where p.pacs_id=? and p.status='Y'"); + + ps = con.prepareStatement(checkUserPacs.toString()); + ps.setString(1, userLoggedInPacs); + + res = ps.executeQuery(); + // count= res.getInt("countEntry"); + if (res.next()) { + + if (res.getInt("countEntry") > 0) { + con2 = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call user_maintenance.user_validation(?,?,?,?,?) }"); + + proc.setString(1, userLoggedInPacs); + proc.setString(2, user); + proc.setString(3, null); + proc.setString(4, time); + proc.registerOutParameter(5, OracleTypes.VARCHAR); + + proc.executeUpdate(); + result = proc.getString(5);//error message from dds procedure + } else { + result = "TRUE";// allow login fi no entry in ip table. + } + } else { + result = "TRUE";// allow login fi no entry in ip table. + } + return result; + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured fetching details in verifySamPacsForUser for user Id :" + userModifiablePacs); + System.out.println("Error occurred during processing."); + return result; + } finally { + try { + + if (con != null) { + con.close(); + } + if (con2 != null) { + con2.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + } + + public String checkInterfacePacsOrNot(String pacsId) { + Connection con = null; + StringBuilder checkPacs = null; + PreparedStatement ps = null; + ResultSet res = null; + + try { + con = DbHandler.getDBConnection(); + + checkPacs = new StringBuilder("select * from pacs_neft_interface where pacs_id= ? and status='ACTIVE' "); + + + ps = con.prepareStatement(checkPacs.toString()); + ps.setString(1, pacsId); + + res = ps.executeQuery(); + if (res.next()) { + return res.getString("TYPE"); + } else { + return null; + } + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured fetching details in checkInterfacePacsOrNot for Pacs Id :" + pacsId); + System.out.println("Error occurred during processing."); + return null; + } finally { + try { + + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + } + + public String checkEodStatus() { + + Connection conn = DbHandler.getDBConnection(); + ResultSet rs = null; + String eodResult = null; + + try { + String eodSQL = "select COALESCE(TRNSFR_2_TEMP_STATUS,TRNSFR_2_DEPPRETRIALBAL_STATUS) as TRNSFR_2_TEMP_STATUS,TRNSFR_2_DEPPRETRIALBAL_STATUS from Dep_Account_Data_Transfer_Logs where system_date = (select to_char(trunc(SYSTEM_DATE - 1),'DD-MON-YY') from SYSTEM_DATE) "; + PreparedStatement ps = conn.prepareStatement(eodSQL); + rs = ps.executeQuery(); + + if (rs.next()) { + + String TRNSFR_2_TEMP_STATUS = rs.getString("TRNSFR_2_TEMP_STATUS"); + System.out.println("the value of TRNSFER is "+TRNSFR_2_TEMP_STATUS); + + String TRNSFR_2_DEPPRETRIALBAL_STATUS = rs.getString("TRNSFR_2_DEPPRETRIALBAL_STATUS"); + + if (TRNSFR_2_DEPPRETRIALBAL_STATUS != null) { + eodResult = "Success"; + + } else { + eodResult = "Failure"; + } + } else{ + eodResult = "Success"; + } + return eodResult; + } catch (Exception e) { + e.printStackTrace(); + + System.out.println("Error occurred during processing."); + return eodResult; + } finally { + try { + + if (conn != null) { + conn.close(); + } + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + } + +public String checkBroadcastMessage() { + String broadcastMessage = null; + String returnMessage = null; + Connection connection = null; + // ResultSet rs = null; + // PreparedStatement statement = null; + try { + connection = DbHandler.getDBConnection(); + String query = "select message from BROADCAST_MESSAGE where trunc(CREATED_AT)= trunc(SYSDATE)"; + PreparedStatement statement = connection.prepareStatement(query); + // ResultSet rs = statement.executeQuery(); + if (rs.next()) { + broadcastMessage = rs.getString("message"); + System.out.println("broad:" + broadcastMessage); + if (broadcastMessage != null) { + //session.setAttribute("messagevisible", true); + returnMessage = broadcastMessage; + + } else { + // session.setAttribute("messagevisible", false); + returnMessage = "False"; + } + rs.close(); + statement.close(); + } + return returnMessage; + } catch (Exception e) { + e.printStackTrace(); + return returnMessage; + } finally { + try { + if (connection != null) { + connection.close(); + } + } catch (SQLException se) { + } + } + } + + +} diff --git a/IPKS_Updated/src/src/java/Dao/MicroFileProcessingDao.java b/IPKS_Updated/src/src/java/Dao/MicroFileProcessingDao.java new file mode 100644 index 0000000..7565f84 --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/MicroFileProcessingDao.java @@ -0,0 +1,716 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Dao; + +import DataEntryBean.MicroFileAccountDetBean; +import LoginDb.DbHandler; +import java.io.File; +import java.sql.*; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; +import oracle.jdbc.OracleTypes; + +/** + * + * @author 981898 + */ +public class MicroFileProcessingDao { + + public ArrayList getAccountDetails(String pacsId, String agentId) { + + ArrayList accountDetailsForPacs = new ArrayList(); + Connection con = null; + StringBuilder accountGetQuery = null; + // String prodCode1 = "3001"; + //String prodCode2 = "1101"; + ResultSet rs = null; + PreparedStatement ps = null; + MicroFileAccountDetBean accountDetails = null; + String accountName = null; + String todayAsString = new SimpleDateFormat("ddMMyyyy").format(new Date(System.currentTimeMillis())); + try { + con = DbHandler.getDBConnection(); + +//accountGetQuery = new StringBuilder().append(" select da.key_1 , da.avail_bal ,nvl(to_char(da.mat_dt, 'ddmmyyyy'),'NA') as mat_dt,to_char(da.acct_open_dt,'ddmmyyyy') as open_dt, dp.prod_name, kh.first_name,kh.middle_name,").append("kh.last_name,kh.address_1 , kh.address_2 , kh.address_3 from ").append("dep_account da ,dep_product dp , kyc_hdr kh where kh.cif_no = da.customer_no and da.dep_prod_id=dp.id and ").append("da.pacs_id= ?")//.append(pacsId) + // .append(" and dp.prod_code in( ? ,?) ")//.append(prodCode) + // .append(" and dp.int_cat like '2%' ").append("and da.curr_status='O'"); + +accountGetQuery = new StringBuilder(" select da.key_1 , da.avail_bal ,to_char(da.mat_dt, 'ddmmyyyy') as mat_dt,to_char(da.acct_open_dt,'ddmmyyyy') as open_dt, dp.prod_name, translate(kh.first_name, chr(10) || chr(13) || chr(09), ' ') first_name, translate(kh.middle_name, chr(10) || chr(13) || chr(09), ' ') middle_name, translate(kh.last_name, chr(10) || chr(13) || chr(09), ' ') last_name, translate(kh.address_1, chr(10) || chr(13) || chr(09), ' ') address_1, translate(kh.address_2, chr(10) || chr(13) || chr(09), ' ') address_2, translate(kh.address_3, chr(10) || chr(13) || chr(09), ' ') address_3, translate(kh.guardian_name, chr(10) || chr(13) || chr(09), ' ') guardian_name from dep_account da ,dep_product dp , kyc_hdr kh, dds_agent_acct di where kh.cif_no = da.customer_no and da.dep_prod_id=dp.id and da.pacs_id= ? and dp.prod_code in ('3001','1101') and dp.int_cat like '2%' and da.key_1=di.DDS_ACCT and di.pacs_id=di.pacs_id and di.agent_id= ? and da.curr_status='O'"); + + ps = con.prepareStatement(accountGetQuery.toString()); + ps.setString(1, pacsId); + ps.setString(2, agentId); + //ps.setString(3, prodCode2); + // rs = ps.executeQuery(); + System.out.println(rs); + while (rs.next()) { + + accountDetails = new MicroFileAccountDetBean(); + accountDetails.setAccountCode(rs.getString("key_1")); + accountDetails.setAdd1(rs.getString("address_1") != null ? rs.getString("address_1") : "NA"); + accountDetails.setAdd2(rs.getString("address_2") != null ? rs.getString("address_2") : "NA"); + accountDetails.setAdd3(rs.getString("address_3") != null ? rs.getString("address_3") : "NA"); + accountDetails.setProdName(rs.getString("prod_name") != null ? rs.getString("prod_name") : "NA"); + accountDetails.setProdType("DEPOSIT"); + accountDetails.setAvailBal(rs.getDouble("avail_bal") != 0 ? rs.getDouble("avail_bal") : 0); + + accountName = null; + accountName = ((rs.getString("first_name") != null) ? rs.getString("first_name").trim() : "") + " " + + ((rs.getString("middle_name") != null) ? rs.getString("middle_name").trim() : "") + " " + + ((rs.getString("last_name") != null) ? rs.getString("last_name").trim() : "NA"); + + accountDetails.setAccountName(accountName); + accountDetails.setAccntMaturityDate(rs.getString("mat_dt") != null ? rs.getString("mat_dt") : todayAsString); + accountDetails.setAccntOpenDate(rs.getString("open_dt") != null ? rs.getString("open_dt") : todayAsString); + accountDetails.setGuardianName(rs.getString("guardian_name") != null ? rs.getString("guardian_name") : "NA"); + accountDetailsForPacs.add(accountDetails); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Exception occured fetching dept details for pacs :" + pacsId); + } finally { + try { + if (rs != null) { + rs.close(); + } + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + return accountDetailsForPacs; + } + + public int insertIntoHandbillTemp(ArrayList accountDetailsList, String pacsId, String tellerId) { + Connection con = null; + StringBuilder accountInsertquery = null; + PreparedStatement ps = null; + int res = 0; + int procRes = 0; + CallableStatement proc = null; + try { + + // con = DbHandler.getDBConnection(); + for (MicroFileAccountDetBean accountDetail : accountDetailsList) { + try { + + con = DbHandler.getDBConnection(); + accountInsertquery = new StringBuilder("INSERT INTO handbill_temp_bkp (OLD_ACCT_NO,CUST_NAME,END_BAL,PROSD_FLAG,PACS_ID,CRT_DATE,DR_TOTAL,CR_TOTAL,STATUS,TELLER_ID) values (?,?,?,?,?,trunc(sysdate),?,?,?,?)"); + + + ps = con.prepareStatement(accountInsertquery.toString()); + + ps.setString(1, accountDetail.getAccountCode()); + ps.setString(2, accountDetail.getAccountName()); + ps.setDouble(3, accountDetail.getAvailBal()); + ps.setString(4, "N"); + ps.setString(5, pacsId); + ps.setDouble(6, accountDetail.getDrTotal());//added 29062018 rajdip + ps.setDouble(7, accountDetail.getCrTotal());//added 29062018 rajdip + ps.setString(8, "PENDING");//added 04072018 rajdip + ps.setString(9, tellerId);//added 04072018 rajdip + + res = res + ps.executeUpdate(); + + ps = null; + accountInsertquery = null; + con.close(); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } finally { + if(con!=null) { + con.close(); + } + } + } + + if (res != 0) { + synchronized (this) { + + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call handbill_pacs(?,?,?) }"); + proc.setString(1, pacsId); + proc.setString(2, tellerId); + proc.registerOutParameter(3, OracleTypes.VARCHAR); + + proc.executeUpdate(); + + // procRes = proc.getInt(3);//error message from dds procedure + con.close(); + } + } + + } catch (Exception e) { + // e.printStackTrace(); + procRes = 0; + System.out.println("Exception occured inserting details in handBill_temp for pacs :" + pacsId); + } finally { + try { + + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + return procRes; + } + + public String insertIntoBulkFileDetails(ArrayList accountDetailsList, String pacsId, String tellerId, String filePath) { + Connection con = null; + StringBuilder accountInsertquery = null; + PreparedStatement ps = null; + PreparedStatement ps2 = null; + int res = 0; + String procRes = null; + CallableStatement proc = null; + String fileId = null; + try { + try { + + con = DbHandler.getDBConnection(); + StringBuilder fileIdQry = new StringBuilder("select FILE_NAME_SEQ.NEXTVAL from dual"); + ps = con.prepareStatement(fileIdQry.toString()); + synchronized (this) { + ResultSet rs = ps.executeQuery(); + while (rs.next()) { + fileId = rs.getString(1); + } + } + ps = null; + File bulkFile = new File(filePath); + + accountInsertquery = new StringBuilder("INSERT INTO BULK_FILES_DETAILS (PACS_ID,TELLER_ID,FILE_NAME,POST_DATE,POST_TIME,STATUS,NO_OF_ROWS,FILE_ID ) values (?,?,?,trunc(sysdate), to_date(to_char(SYSTIMESTAMP, 'DD-MON-RRHH24:MI:SS'),'DD-MON-RRHH24:MI:SS'),?,?,? )"); + + + ps = con.prepareStatement(accountInsertquery.toString()); + + ps.setString(1, pacsId); + ps.setString(2, tellerId); + ps.setString(3, bulkFile.getName().split(".csv")[0] + ".csv");//filename + ps.setString(4, "PENDING"); + ps.setInt(5, accountDetailsList.size()); + ps.setString(6, fileId); + + res = ps.executeUpdate(); + + ps = null; + accountInsertquery = null; + // con.close(); + + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + + } finally { + try { + con.close(); + } catch (Exception e) { + System.out.println("Error occured during connection close."); + } + } + + try { + // con = DbHandler.getDBConnection(); + + if (res != 0) { + res = 0; + for (MicroFileAccountDetBean accountDetail : accountDetailsList) { + try { + + con = DbHandler.getDBConnection(); + + accountInsertquery = new StringBuilder("INSERT INTO BULK_TXN_DETAILS (FILE_ID,PACS_ID,FROM_ACCT,TO_ACCT,TXN_AMT,TXN_TYP,NARATION,COL_ID,STATUS,TXN_DATE ) values (?,?,?,?,?,?,?,COL_ID_SEQ.NEXTVAL,?,trunc(sysdate) )"); + + + ps = con.prepareStatement(accountInsertquery.toString()); + + ps.setString(1, fileId); + ps.setString(2, pacsId); + ps.setString(3, accountDetail.getFromAccBulk()); + ps.setString(4, accountDetail.getToAccBulk()); + ps.setDouble(5, accountDetail.getCrTotal()); + ps.setString(6, accountDetail.getTxnType()); + ps.setString(7, accountDetail.getMessage()); + ps.setString(8, "PENDING"); + + + res = res + ps.executeUpdate(); + + ps = null; + accountInsertquery = null; + con.close(); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + res = 0; +// if (con != null) { +// con.close(); +// } + //reverting if one insert failed + con = DbHandler.getDBConnection(); + StringBuilder fileIdQry = new StringBuilder("update BULK_TXN_DETAILS set status = 'FAILED' where FILE_ID = ? and PACS_ID =?"); + ps = con.prepareStatement(fileIdQry.toString()); + ps.setString(1, fileId); + ps.setString(2, pacsId); + int deleres = ps.executeUpdate(); + StringBuilder fileIdQry2 = new StringBuilder("update BULK_FILE_DETAILS set status = 'FAILED' where FILE_ID = ? and PACS_ID =?"); + ps2 = con.prepareStatement(fileIdQry2.toString()); + ps2.setString(1, fileId); + ps2.setString(2, pacsId); + int update = ps2.executeUpdate(); + procRes = "Error in file format. Please check the file again."; + con.close(); + break; + + } finally { + System.out.println("Processing done."); + } + } + } + + if (res != 0) { + synchronized (this) { + + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call operations1.POST_BULK_TXN(?,?,?,?,?) }"); + proc.setString(1, pacsId); + proc.setString(2, tellerId); + proc.setString(3, fileId); + proc.registerOutParameter(4, OracleTypes.VARCHAR); + proc.registerOutParameter(5, OracleTypes.NUMBER); + + + proc.executeUpdate(); + + // procRes = proc.getString(4);//error message from dds procedure + con.close(); + } + } + } catch (Exception e) { + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + con.close(); + } + } catch (Exception e) { + System.out.println("Error occured during connection close."); + } + } + + } catch (Exception e) { + // e.printStackTrace(); + procRes = "error occured during process"; + System.out.println("Exception occured inserting details in BULK_TXN_DETAILS for pacs :" + pacsId); + } finally { + System.out.println("Processing done."); + + } + return procRes; + } + + public String insertIntoBulkFileDetailsAccountRenewal(ArrayList accountDetailsList, String pacsId, String tellerId, String filePath) { + Connection con = null; + StringBuilder accountInsertquery = null; + PreparedStatement ps = null; + PreparedStatement ps2 = null; + int res = 0; + String procRes = null; + CallableStatement proc = null; + String fileId = null; + try { + try { + + con = DbHandler.getDBConnection(); + StringBuilder fileIdQry = new StringBuilder("select FILE_NAME_SEQ.NEXTVAL from dual"); + ps = con.prepareStatement(fileIdQry.toString()); + synchronized (this) { + ResultSet rs = ps.executeQuery(); + while (rs.next()) { + fileId = rs.getString(1); + } + } + ps = null; + File bulkFile = new File(filePath); + + accountInsertquery = new StringBuilder("INSERT INTO bulk_kcc_renewal_files (PACS_ID,TELLER_ID,FILE_NAME,POST_DATE,POST_TIME,STATUS,NO_OF_ROWS,FILE_ID ) values (?,?,?,trunc(sysdate), to_date(to_char(SYSTIMESTAMP, 'DD-MON-RRHH24:MI:SS'),'DD-MON-RRHH24:MI:SS'),?,?,? )"); + + + ps = con.prepareStatement(accountInsertquery.toString()); + + ps.setString(1, pacsId); + ps.setString(2, tellerId); + ps.setString(3, bulkFile.getName().split(".csv")[0] + ".csv");//filename + ps.setString(4, "PENDING"); + ps.setInt(5, accountDetailsList.size()); + ps.setString(6, fileId); + + res = ps.executeUpdate(); + + ps = null; + accountInsertquery = null; + // con.close(); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } finally { + try { + con.close(); + } catch (Exception e) { + System.out.println("Error occured during connection close."); + } + } + + try { + // con = DbHandler.getDBConnection(); + + if (res != 0) { + res = 0; + for (MicroFileAccountDetBean accountDetail : accountDetailsList) { + try { + + con = DbHandler.getDBConnection(); + accountInsertquery = new StringBuilder("INSERT INTO BULK_KCC_RENEW_ACC (FILE_ID,PACS_ID,KEY_1,SANCTION_LIMIT,STATUS,TXN_DATE,TXN_TIME,LIMIT_EXP_DATE,COL_ID ) values (?,?,?,?,?,to_date(to_char(SYSTIMESTAMP, 'DD-MON-RRHH24:MI:SS'),'DD-MON-RRHH24:MI:SS'),trunc(sysdate),?,COL_ID_SEQ.NEXTVAL )"); + + ps = con.prepareStatement(accountInsertquery.toString()); + + ps.setString(1, fileId); + ps.setString(2, pacsId); + ps.setString(3, accountDetail.getToAccBulk()); + ps.setString(4, accountDetail.getLimit()); + ps.setString(5, "PENDING"); + ps.setString(6, accountDetail.getAccntMaturityDate());//limitExpiry date + + res = res + ps.executeUpdate(); + + ps = null; + accountInsertquery = null; + con.close(); + + } catch (Exception e) { + // e.printStackTrace(); + res = 0; + //reverting if one insert failed + con = DbHandler.getDBConnection(); + StringBuilder fileIdQry = new StringBuilder("update BULK_KCC_RENEW_ACC set status = 'FAILED' where FILE_ID = ? and PACS_ID =?"); + ps = con.prepareStatement(fileIdQry.toString()); + ps.setString(1, fileId); + ps.setString(2, pacsId); + int deleres = ps.executeUpdate(); + StringBuilder fileIdQry2 = new StringBuilder("update BULK_KCC_RENEWAL_FILES set status = 'FAILED' where FILE_ID = ? and PACS_ID =?"); + ps2 = con.prepareStatement(fileIdQry2.toString()); + ps2.setString(1, fileId); + ps2.setString(2, pacsId); + int update = ps2.executeUpdate(); + procRes = "Error in file format. Please check the file again."; + con.close(); + break; + + } finally { + System.out.println("Processing done."); + } + } + } + + if (res != 0) { + synchronized (this) { + + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call operations1.POST_KCC_RENEWAL(?,?,?,?,?) }"); + proc.setString(1, pacsId); + proc.setString(2, tellerId); + proc.setString(3, fileId); + proc.registerOutParameter(4, OracleTypes.VARCHAR); + proc.registerOutParameter(5, OracleTypes.NUMBER); + + proc.executeUpdate(); + + // procRes = proc.getString(4);//error message from dds procedure + con.close(); + + } + } + } catch (Exception e) { + System.out.println("Error occured during processing."); + } finally { + try { + if (con != null) { + con.close(); + } + } catch (Exception e) { + System.out.println("Error occured during connection close."); + } + } + + } catch (Exception e) { + // e.printStackTrace(); + procRes = "error occured during process"; + System.out.println("Exception occured inserting details in handBill_temp for pacs :" + pacsId); + } finally { + System.out.println("Processing done."); + } + return procRes; + } + + public String insertIntoBankPostKCCRenewal(ArrayList accountDetailsList, String pacsId, String tellerId, String filePath) { + Connection con = null; + StringBuilder accountInsertquery = null; + PreparedStatement ps = null; + PreparedStatement ps2 = null; + int res = 0; + String procRes = null; + CallableStatement proc = null; + String fileId = null; + try { + try { + + con = DbHandler.getDBConnection(); + StringBuilder fileIdQry = new StringBuilder("select FILE_NAME_SEQ.NEXTVAL from dual"); + ps = con.prepareStatement(fileIdQry.toString()); + synchronized (this) { + ResultSet rs = ps.executeQuery(); + while (rs.next()) { + fileId = rs.getString(1); + } + } + ps = null; + File bulkFile = new File(filePath); + + accountInsertquery = new StringBuilder("INSERT INTO bulk_kcc_renewal_files (PACS_ID,TELLER_ID,FILE_NAME,POST_DATE,POST_TIME,STATUS,NO_OF_ROWS,FILE_ID ) values (?,?,?,trunc(sysdate), to_date(to_char(SYSTIMESTAMP, 'DD-MON-RRHH24:MI:SS'),'DD-MON-RRHH24:MI:SS'),?,?,? )"); + + + ps = con.prepareStatement(accountInsertquery.toString()); + + ps.setString(1, pacsId); + ps.setString(2, tellerId); + ps.setString(3, bulkFile.getName().split(".csv")[0] + ".csv");//filename + ps.setString(4, "PENDING"); + ps.setInt(5, accountDetailsList.size()); + ps.setString(6, fileId); + + res = ps.executeUpdate(); + + ps = null; + accountInsertquery = null; + // con.close(); + + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + con.close(); + } + } catch (Exception e) { + System.out.println("Error occured during connection close."); + } + } + + try { + // con = DbHandler.getDBConnection(); + + if (res != 0) { + res = 0; + for (MicroFileAccountDetBean accountDetail : accountDetailsList) { + try { + + con = DbHandler.getDBConnection(); + + accountInsertquery = new StringBuilder("INSERT INTO BULK_KCC_RENEW_ACC (FILE_ID,PACS_ID,KEY_1,SANCTION_LIMIT,STATUS,TXN_DATE,TXN_TIME,LIMIT_EXP_DATE,COL_ID ) values (?,?,?,?,?,to_date(to_char(SYSTIMESTAMP, 'DD-MON-RRHH24:MI:SS'),'DD-MON-RRHH24:MI:SS'),trunc(sysdate),?,COL_ID_SEQ.NEXTVAL )"); + + + ps = con.prepareStatement(accountInsertquery.toString()); + + ps.setString(1, fileId); + ps.setString(2, pacsId); + ps.setString(3, accountDetail.getToAccBulk()); + ps.setString(4, accountDetail.getLimit()); + ps.setString(5, "PENDING"); + ps.setString(6, accountDetail.getAccntMaturityDate());//limitExpiry date + + + res = res + ps.executeUpdate(); + + ps = null; + accountInsertquery = null; + con.close(); + + + } catch (Exception e) { + // e.printStackTrace(); + res = 0; + //reverting if one insert failed + con = DbHandler.getDBConnection(); + StringBuilder fileIdQry = new StringBuilder("update BULK_KCC_RENEW_ACC set status = 'FAILED' where FILE_ID = ?"); + ps = con.prepareStatement(fileIdQry.toString()); + ps.setString(1, fileId); + int deleres = ps.executeUpdate(); + StringBuilder fileIdQry2 = new StringBuilder("update BULK_KCC_RENEWAL_FILES set status = 'FAILED' where FILE_ID = ?"); + ps2 = con.prepareStatement(fileIdQry2.toString()); + ps2.setString(1, fileId); + int update = ps2.executeUpdate(); + procRes = "Error in file format. Please check the file again."; + con.close(); + break; + } finally { + System.out.println("Processing done."); + } + } + } + + if (res != 0) { + synchronized (this) { + + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call operations2.BANK_POST_KCC_RENEWAL(?,?,?,?,?) }"); + proc.setString(1, pacsId); + proc.setString(2, tellerId); + proc.setString(3, fileId); + proc.registerOutParameter(4, OracleTypes.VARCHAR); + proc.registerOutParameter(5, OracleTypes.NUMBER); + + + proc.executeUpdate(); + + // procRes = proc.getString(4);//error message from dds procedure + con.close(); + } + } + } catch (Exception e) { + System.out.println("Error occured during processing."); + } finally { + try { + if (con != null) { + con.close(); + } + } catch (Exception e) { + System.out.println("Error occured during connection close."); + } + } + + } catch (Exception e) { + // e.printStackTrace(); + procRes = "error occured during process"; + System.out.println("Exception occured inserting details in handBill_temp for pacs :" + pacsId); + } finally { + System.out.println("Processing done."); + } + + return procRes; + } + + public String insertBulkAccMap(List accntdetailsList, String pacsId, String tellerId) { + + Connection con = null; + PreparedStatement ps = null; + int i = 0; + String accNo[] = null; + CallableStatement proc = null; + String outMsg = ""; + + try { + con = DbHandler.getDBConnection(); + //i = accntdetailsList.size(); + + try { + while (i <= accntdetailsList.size() - 1) { + + accNo = accntdetailsList.get(i).split("\\:"); + ps = con.prepareStatement("insert into bulk_acct_map (pacs_id, key_1, cbs_acct, teller_id, map_dt, map_tym, status, id_typ, id_no) " + + " values (?,?,?,?,(select system_date from system_date),to_char(SYSTIMESTAMP, 'DD-MON-RRHH12:MI:SS'),'PENDING','','')"); + + ps.setString(1, pacsId); + ps.setString(2, accNo[0]); + ps.setString(3, accNo[1]); + ps.setString(4, tellerId); + + ps.executeQuery(); + // con.commit(); + i = i + 1; + + } + } catch (SQLException ex) { + // Logger.getLogger(MicroFileProcessingDao.class.getName()).log(Level.SEVERE, null, ex); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException ep) { + // Logger.getLogger(MicroFileProcessingDao.class.getName()).log(Level.SEVERE, null, ep); + System.out.println("Error occurred during processing."); + } catch (Exception e) { + // Logger.getLogger(MicroFileProcessingDao.class.getName()).log(Level.SEVERE, null, e); + System.out.println("Error occurred during processing."); + } + + // return "SQL error in inserting bulk_acct_map"; + } finally { + System.out.println("SQL error in inserting bulk_acct_map."); + } + + try { + proc = con.prepareCall("{ call operations1.BULK_ACCT_MAPPING(?,?,?,?) }"); + + proc.setString(1, pacsId); + proc.setString(2, tellerId); + proc.registerOutParameter(3, java.sql.Types.VARCHAR); + proc.registerOutParameter(4, OracleTypes.NUMBER); + + proc.executeUpdate(); + + // outMsg = proc.getString(3); + // con.commit(); + } catch (SQLException ex) { + // Logger.getLogger(MicroFileProcessingDao.class.getName()).log(Level.SEVERE, null, ex); + // ex.printStackTrace(); + System.out.println("Error occurred during processing."); + try { + if (proc != null) { + proc.close(); + } + + } catch (Exception e) { + // Logger.getLogger(MicroFileProcessingDao.class.getName()).log(Level.SEVERE, null, e); + System.out.println("Error occurred during processing."); + } + + // return "Procedure error in bulk account mapping"; + } finally { + System.out.println("Procedure error in bulk account mapping."); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } finally { + try { + if (con != null) { + con.close(); + } + } catch (Exception e) { + // Logger.getLogger(MicroFileProcessingDao.class.getName()).log(Level.SEVERE, null, e); + System.out.println("Error occurred during connection close."); + } + } + return outMsg; + } +} diff --git a/IPKS_Updated/src/src/java/Dao/UserAmendmentDao.java b/IPKS_Updated/src/src/java/Dao/UserAmendmentDao.java new file mode 100644 index 0000000..d7ecd12 --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/UserAmendmentDao.java @@ -0,0 +1,63 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Dao; + + +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import oracle.jdbc.OracleTypes; + +/** + * + * @author 1242938 + */ +public class UserAmendmentDao { + + public String UserAmendmentServletProc(String pacsId, String userName, String userRole, String userId, String opType, String tellerId, String ipFlag, String staticIP) { + Connection con = null; + CallableStatement proc = null; + String res = null; + + + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call operations2.dds_user_deletion(?,?,?,?,?,?,?,?,?) }"); + + proc.setString(1, pacsId); + proc.setString(2, userName); + proc.setString(3, userRole); + proc.setString(4, userId); + proc.setString(5, tellerId); + proc.setString(6, opType); + proc.registerOutParameter(7, OracleTypes.VARCHAR); + proc.setString(8, ipFlag); + proc.setString(9, staticIP); + + proc.executeUpdate(); + + // res = proc.getString(7);//error message + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in UserAmendmentServletProc for user Id :" + tellerId); + System.out.println("Error occurred during processing."); + res= "Error occured. Please try again"; + } finally { + try { + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return res; + } + + +} diff --git a/IPKS_Updated/src/src/java/Dao/UserCreationDao.java b/IPKS_Updated/src/src/java/Dao/UserCreationDao.java new file mode 100644 index 0000000..59dfe45 --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/UserCreationDao.java @@ -0,0 +1,62 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Dao; + + +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import oracle.jdbc.OracleTypes; + +/** + * + * @author 1242938 + */ +public class UserCreationDao { + + public String UserCreationServletProc(String pacsId, String userName, String userRole, String limit, String tellerId, String ipFlag, String staticIP) { + Connection con = null; + CallableStatement proc = null; + String res = null; + + + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call operations2.user_creation(?,?,?,?,?,?,?,?) }"); + + proc.setString(1, pacsId); + proc.setString(2, userName); + proc.setString(3, userRole); + proc.setString(4, limit); + proc.setString(5, tellerId); + proc.registerOutParameter(6, OracleTypes.VARCHAR); + proc.setString(7, ipFlag); + proc.setString(8, staticIP); + + proc.executeUpdate(); + + // res = proc.getString(6);//error message + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in UserCreationServletProc for user Id :" + tellerId); + System.out.println("Error occurred during processing."); + res= "Error occured. Please try again."; + } finally { + try { + if (con != null) { + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return res; + } + + +} diff --git a/IPKS_Updated/src/src/java/Dao/UsertimeManagementDao.java b/IPKS_Updated/src/src/java/Dao/UsertimeManagementDao.java new file mode 100644 index 0000000..9c53bf0 --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/UsertimeManagementDao.java @@ -0,0 +1,238 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Dao; + +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.List; +import javax.servlet.http.HttpServletRequest; +import oracle.jdbc.OracleTypes; +import org.codehaus.jackson.*; +import org.codehaus.jackson.map.ObjectMapper; + +/** + * + * @author 1004242 + */ +public class UsertimeManagementDao { + + public String gettellerDetails(String tellerId, String pacsId) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + String txnType; + List tellesList = new ArrayList(); + ObjectMapper objmap = new ObjectMapper(); + String jsonString = null; + + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + rs = qry.executeQuery("select login_id from login_details where pacs_id='"+pacsId+"' and user_role_id <> '201606000004041'"); + + while (rs.next()) { + + tellesList.add(rs.getString("login_id")); + + } + + if(tellesList != null && tellesList.size()!=0){ + jsonString = objmap.writeValueAsString(tellesList); + } + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in gettellerDetails for user Id :" + tellerId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return jsonString; + } + + public String gettellerLoginDetails(String tellerId, String pacsId) { + Connection con = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + List tellesList = new ArrayList(); + ObjectMapper objmap = new ObjectMapper(); + String jsonString = null; + String defTime= " "; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + //rs = qry.executeQuery("select * from login_tym where pacs_id='"+pacsId+"' and tellerid = '"+tellerId+"'"); + + if (rs.next()) { + // "{ \"pQue\": \" "+ pQ+"\" , \"aQue\": \" "+ aQ+"\",\"rQue\": \" "+ rQ+"\",\"cIn\": \" "+ cin+"\",\"cOut\": \" "+ cout+"\",\"cDf\": \" "+ cdiff+"\" }"; + jsonString="{ \"mS\": \""+(rs.getString("MONDAY_START_TYM")==null?defTime:rs.getString("MONDAY_START_TYM"))+"\","+ + "\"mE\": \""+(rs.getString("MONDAY_END_TYM")==null?defTime:rs.getString("MONDAY_END_TYM"))+"\"," + + "\"mC\": \""+(rs.getString("MONDAY_FLAG")==null?"N":rs.getString("MONDAY_FLAG"))+"\"," + + "\"tS\": \""+(rs.getString("TUESDAY_START_TYM")==null?defTime:rs.getString("TUESDAY_START_TYM"))+"\"," + + "\"tE\": \""+(rs.getString("TUESDAY_END_TYM")==null?defTime:rs.getString("TUESDAY_END_TYM"))+"\"," + + "\"tC\": \""+(rs.getString("TUESDAY_FLAG")==null?"N":rs.getString("TUESDAY_FLAG"))+"\"," + + "\"wS\": \""+(rs.getString("WEDNESDAY_START_TYM")==null?defTime:rs.getString("WEDNESDAY_START_TYM"))+"\"," + + "\"wE\": \""+(rs.getString("WEDNESDAY_END_TYM")==null?defTime:rs.getString("WEDNESDAY_END_TYM"))+"\"," + + "\"wC\": \""+(rs.getString("WEDNESDAY_FLAG")==null?"N":rs.getString("WEDNESDAY_FLAG"))+"\"," + + "\"thS\": \""+(rs.getString("THURSDAY_START_TYM")==null?defTime:rs.getString("THURSDAY_START_TYM"))+"\"," + + "\"thE\": \""+(rs.getString("THURSDAY_END_TYM")==null?defTime:rs.getString("THURSDAY_END_TYM"))+"\"," + + "\"thC\": \""+(rs.getString("THURSDAY_FLAG")==null?"N":rs.getString("THURSDAY_FLAG"))+"\"," + + "\"fS\": \""+(rs.getString("FRIDAY_START_TYM")==null?defTime:rs.getString("FRIDAY_START_TYM"))+"\"," + + "\"fE\": \""+(rs.getString("FRIDAY_END_TYM")==null?defTime:rs.getString("FRIDAY_END_TYM"))+"\"," + + "\"fC\": \""+(rs.getString("FRIDAY_FLAG")==null?"N":rs.getString("FRIDAY_FLAG"))+"\"," + + "\"saS\": \""+(rs.getString("SATURDAY_START_TYM")==null?defTime:rs.getString("SATURDAY_START_TYM"))+"\"," + + "\"saE\": \""+(rs.getString("SATURDAY_END_TYM")==null?defTime:rs.getString("SATURDAY_END_TYM"))+"\"," + + "\"saC\": \""+(rs.getString("SATURDAY_FLAG")==null?"N":rs.getString("SATURDAY_FLAG"))+"\"," + + "\"suS\": \""+(rs.getString("SUNDAY_START_TYM")==null?defTime:rs.getString("SUNDAY_START_TYM"))+"\"," + + "\"suE\": \""+(rs.getString("SUNDAY_END_TYM")==null?defTime:rs.getString("SUNDAY_END_TYM"))+"\"," + + "\"suC\": \""+(rs.getString("SUNDAY_FLAG")==null?"N":rs.getString("SUNDAY_FLAG"))+"\" }"; + + + }else + { + jsonString="{ \"mS\": \""+defTime+"\","+ + "\"mE\": \""+defTime+"\"," + + "\"mC\": \""+"N"+"\"," + + "\"tS\": \""+defTime+"\"," + + "\"tE\": \""+defTime+"\"," + + "\"tC\": \""+"N"+"\"," + + "\"wS\": \""+defTime+"\"," + + "\"wE\": \""+defTime+"\"," + + "\"wC\": \""+"N"+"\"," + + "\"thS\": \""+defTime+"\"," + + "\"thE\": \""+defTime+"\"," + + "\"thC\": \""+"N"+"\"," + + "\"fS\": \""+defTime+"\"," + + "\"fE\": \""+defTime+"\"," + + "\"fC\": \""+"N"+"\"," + + "\"saS\": \""+defTime+"\"," + + "\"saE\": \""+defTime+"\"," + + "\"saC\": \""+"N"+"\"," + + "\"suS\": \""+defTime+"\"," + + "\"suE\": \""+defTime+"\"," + + "\"suC\": \""+"N"+"\" }"; + } + + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in gettellerDetails for user Id :" + tellerId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return jsonString; + } + public String updateLoginTimings(HttpServletRequest request ,String teller , String pacsId) { + Connection con = null; + CallableStatement proc = null; + String res = null; + + // String monS = request.getParameter("dayMonS"); + // String monE = request.getParameter("dayMonE"); + // String tueS = request.getParameter("dayTueS"); + // String tueE = request.getParameter("dayTueE"); + // String wedS = request.getParameter("dayWedS"); + // String wedE = request.getParameter("dayWedE"); + // String thuS = request.getParameter("dayThuS"); + // String thuE = request.getParameter("dayThuE"); + // String friS = request.getParameter("dayFriS"); + // String friE = request.getParameter("dayFriE"); + // String satS = request.getParameter("daySatS"); + // String satE = request.getParameter("daySatE"); + // String sunS = request.getParameter("daySunS"); + // String sunE = request.getParameter("daySunE"); + + String monChk = request.getParameter("monCheck")!=null?"Y":"N"; + String tueChk = request.getParameter("tueCheck")!=null?"Y":"N"; + String wedChk = request.getParameter("wedCheck")!=null?"Y":"N"; + String thuChk = request.getParameter("thuCheck")!=null?"Y":"N"; + String friChk = request.getParameter("friCheck")!=null?"Y":"N"; + String satChk = request.getParameter("satCheck")!=null?"Y":"N"; + String sunChk = request.getParameter("sunCheck")!=null?"Y":"N"; + + + + try { + con = DbHandler.getDBConnection(); + proc = con.prepareCall("{ call user_maintenance.user_login_tym(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }"); + + proc.setString(1, teller); + proc.setString(2, pacsId); + proc.setString(3, monChk); + proc.setString(4, tueChk); + proc.setString(5, wedChk); + proc.setString(6, thuChk); + proc.setString(7, friChk); + proc.setString(8, satChk); + proc.setString(9, sunChk); + + proc.setString(10, monS); + proc.setString(11, monE); + proc.setString(12, tueS); + proc.setString(13, tueE); + proc.setString(14, wedS); + proc.setString(15, wedE); + proc.setString(16, thuS); + proc.setString(17, thuE); + proc.setString(18, friS); + proc.setString(19, friE); + proc.setString(20, satS); + proc.setString(21, satE); + proc.setString(22, sunS); + proc.setString(23, sunE); + proc.registerOutParameter(24, OracleTypes.VARCHAR); + + proc.executeUpdate(); + + // res = proc.getString(24);//error message from dds procedure + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in updateLoginTimings for user Id :" + teller); + System.out.println("Error occurred during processing."); + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return res; + } +} diff --git a/IPKS_Updated/src/src/java/Dao/WelcomeDao.java b/IPKS_Updated/src/src/java/Dao/WelcomeDao.java new file mode 100644 index 0000000..e7cd0fc --- /dev/null +++ b/IPKS_Updated/src/src/java/Dao/WelcomeDao.java @@ -0,0 +1,379 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Dao; + +import DataEntryBean.TransactioDetailsBean; +import LoginDb.DbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.List; +import oracle.jdbc.OracleTypes; +import org.codehaus.jackson.map.ObjectMapper; + +/** + * + * @author 1004242 + */ +public class WelcomeDao { + + public String getQueDetails(String tellerId, String pacsId) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + ResultSet rs2 = null; + String txnType; + int count = 0; + int pQ=0; + int rQ=0; + int aQ=0; + long cin=0; + long cout=0; + long cdiff=0; + long cinH = 0; + int iQ=0; + int iQ2 = 0; + + res= "{ \"pQue\": \" "+ pQ+"\" , \"aQue\": \" "+ aQ+"\",\"rQue\": \" "+ rQ+"\",\"cIn\": \" "+ cin+"\",\"cOut\": \" "+ cout+"\",\"cDf\": \" "+ cdiff+"\",\"iQ\": \" "+ iQ+"\",\"cinH\": \" "+ cinH+"\",\"iQ2\": \" "+ iQ2+"\" }"; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + rs = qry.executeQuery(" SELECT A.*,A.TOTAL_CASH_IN-A.TOTAL_CASH_OUT AS CASH_DIFFERENCE FROM " ++" (SELECT " ++" (select SUM((C.DENO_2000_IN*2000)+(C.DENO_500_IN*500)+(C.DENO_200_IN*200)+(C.DENO_100_IN*100)+ " ++" (C.DENO_50_IN*50)+(C.DENO_20_IN*20) +(C.DENO_10_IN*10) +(C.DENO_5_IN*5)+(C.DENO_2_IN*2)+ " ++" (C.DENO_1_IN*1)+(C.DENO_50p_IN*0.5)+(C.DENO_1p_IN*0.01)) from cash_txn_hist c " ++" where c.txn_date=(select system_date from system_date) " ++" and c.pacs_id="+pacsId ++" and c.status='A' " ++" GROUP BY "+pacsId+") AS TOTAL_CASH_IN, " ++" " ++" (SELECT " ++" SUM((C.DENO_2000_OUT*2000)+(C.DENO_500_OUT*500)+(C.DENO_200_OUT*200)+(C.DENO_100_OUT*100)+ " ++" (C.DENO_50_OUT*50)+(C.DENO_20_OUT*20)+(C.DENO_10_OUT*10)+(C.DENO_5_OUT*5)+(C.DENO_2_OUT*2)+ " ++" (C.DENO_1_OUT*1)+(C.DENO_50p_OUT*0.5)+(C.DENO_1p_OUT*0.01)) from cash_txn_hist c " ++" where c.txn_date=(select system_date from system_date) " ++" and c.pacs_id="+pacsId ++" and c.status='A' " ++" GROUP BY "+pacsId+") AS TOTAL_CASH_OUT, " ++" (select g.cum_curr_val from gl_account g where g.pacs_id='"+pacsId+"' and g.gl_prod_id='201611000001184') as CASH_IN_HAND ," ++" (SELECT " ++" (SELECT COUNT(*) FROM DEP_ACCOUNT_AUTHORIZATION DAA WHERE DAA.Pacs_Id="+pacsId ++" AND DAA.TXN_STATUS='A' AND DAA.ACCT_OPEN_DT=(select system_date from system_date))+ " ++" (SELECT COUNT(*) FROM LOAN_ACCOUNT_AUTH DAA2 WHERE DAA2.pacs_id="+pacsId ++" AND DAA2.STATUS='A' AND DAA2.APPL_DT=(select system_date from system_date))+ " ++" (SELECT COUNT(*) FROM DEP_TXN_AUTHORIZATION D WHERE D.POST_DATE= " ++" (select system_date from system_date) " ++" and d.pacs_id="+pacsId+" and d.txn_status='A')+ " ++" (SELECT COUNT(*) FROM LOAN_TXN_AUTHORIZATION D WHERE D.POST_DATE= " ++" (select system_date from system_date) " ++" and d.pacs_id="+pacsId+" and d.txn_status='A') FROM DUAL) AS TOTAL_ACCEPTED_QUEUE, " ++" " ++" (SELECT " ++" (SELECT COUNT(*) FROM DEP_ACCOUNT_AUTHORIZATION DAA WHERE DAA.Pacs_Id="+pacsId ++" AND DAA.TXN_STATUS='R' AND DAA.ACCT_OPEN_DT=(select system_date from system_date))+ " ++" (SELECT COUNT(*) FROM LOAN_ACCOUNT_AUTH DAA2 WHERE DAA2.pacs_id="+pacsId ++" AND DAA2.STATUS='R' AND DAA2.APPL_DT=(select system_date from system_date))+ " ++" (SELECT COUNT(*) FROM DEP_TXN_AUTHORIZATION D WHERE D.POST_DATE= " ++" (select system_date from system_date) " ++" and d.pacs_id="+pacsId+" and d.txn_status='R')+ " ++" (SELECT COUNT(*) FROM LOAN_TXN_AUTHORIZATION D WHERE D.POST_DATE= " ++" (select system_date from system_date) " ++" and d.pacs_id="+pacsId+" and d.txn_status='R') FROM DUAL) AS TOTAL_REJECTED_QUEUE, " ++" " ++" (SELECT " ++" (SELECT COUNT(*) FROM DEP_ACCOUNT_AUTHORIZATION DAA WHERE DAA.Pacs_Id="+pacsId ++" AND DAA.TXN_STATUS='P' )+ " ++" (SELECT COUNT(*) FROM LOAN_ACCOUNT_AUTH DAA2 WHERE DAA2.pacs_id="+pacsId ++" AND DAA2.STATUS='P' )+ " ++" (SELECT COUNT(*) FROM DEP_TXN_AUTHORIZATION D WHERE D.POST_DATE= " ++" (select system_date from system_date) " ++" and d.pacs_id="+pacsId+" and d.txn_status='P')+ " ++" (SELECT COUNT(*) FROM LOAN_TXN_AUTHORIZATION D WHERE D.POST_DATE= " ++" (select system_date from system_date) " ++" and d.pacs_id="+pacsId+" and d.txn_status='P') FROM DUAL) AS TOTAL_PENDING_QUEUE " ++" FROM DUAL)A "); + + while (rs.next()) { + pQ =rs.getInt("TOTAL_PENDING_QUEUE"); + rQ =rs.getInt("TOTAL_REJECTED_QUEUE"); + aQ =rs.getInt("TOTAL_ACCEPTED_QUEUE"); + cin =rs.getLong("TOTAL_CASH_IN"); + cout =rs.getLong("TOTAL_CASH_OUT"); + cdiff = rs.getLong("CASH_DIFFERENCE"); + cinH = rs.getLong("CASH_IN_HAND"); + } + + rs=null; + qry = null; + qry = con.createStatement(); + rs = qry.executeQuery(" select count(*) as count from investment_dtl l where l.pacs_id="+pacsId+" and l.maturity_date>=(select system_date from system_date) and l.maturity_date <=(select (system_date+15) from system_date) and l.active_flag='Yes'"); + while (rs.next()) { + + iQ= rs.getInt("count"); + } + + rs2 = qry.executeQuery(" select count(*) as count from nsc_collateral l where l.acc_no in (select key_1 from loan_account la where la.pacs_id = " +pacsId+ ") and l.exp_dt >= (select system_date from system_date) and l.exp_dt <= (select (system_date + 15) from system_date) and l.status = 'A' "); + + while (rs2.next()) { + + iQ2= rs2.getInt("count"); + } + + res= "{ \"pQue\": \" "+ pQ+"\" , \"aQue\": \" "+ aQ+"\",\"rQue\": \" "+ rQ+"\",\"cIn\": \" "+ cin+"\",\"cOut\": \" "+ cout+"\",\"cDf\": \" "+ cdiff+"\",\"iQ\": \" "+ iQ+"\",\"cinH\": \" "+ cinH+"\",\"iQ2\": \" "+ iQ2+"\" }"; + + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in getQueDetails for user Id :" + tellerId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (SQLException e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return res; + } + +// public int getNSCKVPExp(String tellerId, String pacsId) { +// Connection con = null; +// CallableStatement proc = null; +// Statement qry = null; +// //String res = null; +// ResultSet rs = null; +// int iQ2 = 0; +// +// try { +// con = DbHandler.getDBConnection(); +// qry = con.createStatement(); +// rs = qry.executeQuery(" select count(*) as count from nsc_collateral l where l.acc_no in (select key_1 from loan_account la where la.pacs_id = " +pacsId+ ") and l.exp_dt >= (select system_date from system_date) and l.exp_dt <= (select (system_date + 15) from system_date) and l.status = 'A' "); +// +// while (rs.next()) { +// iQ2= rs.getInt("count"); +// } +// } +// catch(Exception e){ +// e.printStackTrace(); +// System.out.println("Exception occured in getNSCKVPExp for user Id :" + tellerId); +// } +// finally { +// try { +// if (con != null) { +// con.commit(); +// con.close(); +// } +// } catch (Exception e) { +// e.printStackTrace(); +// } +// } +// return iQ2; +// } + + + public String getAllTranDetails(String tellerId, String pacsId) { + Connection con = null; + CallableStatement proc = null; + Statement qry = null; + String res = null; + ResultSet rs = null; + List tdBeanList = new ArrayList(); + TransactioDetailsBean tdBean = null; + ObjectMapper objmap = new ObjectMapper(); + String jsonString = null; + + try { + con = DbHandler.getDBConnection(); + qry = con.createStatement(); + rs = qry.executeQuery(" SELECT authorized_queues, rejected_queues, " ++ " pending_queues, " ++ " TOTAL_CASH_IN, " ++ " TOTAL_CASH_OUT, " ++ " (TOTAL_CASH_IN - TOTAL_CASH_OUT) as CASH_difference, " ++ " i.teller_id, " ++ " i.pacs_id " ++ " from (SELECT nvl(sum(a_1), 0) as authorized_queues, teller_id, pacs_id " ++ " from (SELECT COUNT(*) AS a_1, daa.teller_id, daa.pacs_id " ++ " FROM DEP_ACCOUNT_AUTHORIZATION DAA " ++ " WHERE DAA.Pacs_Id ="+pacsId ++ " AND DAA.TXN_STATUS = 'A' " ++ " AND DAA.ACCT_OPEN_DT = " ++ " (select system_date from system_date) " ++ " group by daa.pacs_id, daa.teller_id " ++ " union all " ++ " SELECT COUNT(*) AS a_2, daa2.teller_id, daa2.pacs_id " ++ " FROM LOAN_ACCOUNT_AUTH DAA2 " ++ " WHERE DAA2.pacs_id ="+pacsId ++ " AND DAA2.STATUS = 'A' " ++ " AND DAA2.APPL_DT = (select system_date from system_date) " ++ " group by daa2.pacs_id, daa2.teller_id " ++ " union all " ++ " SELECT COUNT(*) AS a_3, d.maker_id teller_id, d.pacs_id " ++ " FROM DEP_TXN_AUTHORIZATION D " ++ " WHERE D.POST_DATE = (select system_date from system_date) " ++ " and d.pacs_id ="+pacsId ++ " and d.txn_status = 'A' " ++ " group by d.maker_id, d.pacs_id " ++ " union all " ++ " SELECT COUNT(*) AS a_4, d.maker_id teller_id, d.pacs_id " ++ " FROM LOAN_TXN_AUTHORIZATION D " ++ " WHERE D.POST_DATE = (select system_date from system_date) " ++ " and d.pacs_id ="+pacsId ++ " and d.txn_status = 'A' " ++ " group by d.maker_id, d.pacs_id) " ++ " group by teller_id, pacs_id) j, " ++ " " ++ " (SELECT nvl(sum(r_1), 0) as rejected_queues, teller_id, pacs_id " ++ " from (SELECT COUNT(*) AS r_1, daa.teller_id, daa.pacs_id " ++ " FROM DEP_ACCOUNT_AUTHORIZATION DAA " ++ " WHERE DAA.Pacs_Id ="+pacsId ++ " AND DAA.TXN_STATUS = 'R' " ++ " AND DAA.ACCT_OPEN_DT = " ++ " (select system_date from system_date) " ++ " group by daa.pacs_id, daa.teller_id " ++ " union all " ++ " SELECT COUNT(*) AS r_2, daa2.teller_id, daa2.pacs_id " ++ " FROM LOAN_ACCOUNT_AUTH DAA2 " ++ " WHERE DAA2.pacs_id ="+pacsId ++ " AND DAA2.STATUS = 'R' " ++ " AND DAA2.APPL_DT = (select system_date from system_date) " ++ " group by daa2.pacs_id, daa2.teller_id " ++ " union all " ++ " SELECT COUNT(*) AS r_3, d.maker_id teller_id, d.pacs_id " ++ " FROM DEP_TXN_AUTHORIZATION D " ++ " WHERE D.POST_DATE = (select system_date from system_date) " ++ " and d.pacs_id ="+pacsId ++ " and d.txn_status = 'R' " ++ " group by d.maker_id, d.pacs_id " ++ " union all " ++ " SELECT COUNT(*) AS r_4, d.maker_id teller_id, d.pacs_id " ++ " FROM LOAN_TXN_AUTHORIZATION D " ++ " WHERE D.POST_DATE = (select system_date from system_date) " ++ " and d.pacs_id ="+pacsId ++ " and d.txn_status = 'R' " ++ " group by d.maker_id, d.pacs_id) " ++ " group by teller_id, pacs_id) h, " ++ " " ++ " (SELECT nvl(sum(p_1), 0) as pending_queues, teller_id, pacs_id " ++ " from (SELECT COUNT(*) AS p_1, daa.teller_id, daa.pacs_id " ++ " FROM DEP_ACCOUNT_AUTHORIZATION DAA " ++ " WHERE DAA.Pacs_Id ="+pacsId ++ " AND DAA.TXN_STATUS = 'P' " ++ " group by daa.pacs_id, daa.teller_id " ++ " union all " ++ " SELECT COUNT(*) AS p_2, daa2.teller_id, daa2.pacs_id " ++ " FROM LOAN_ACCOUNT_AUTH DAA2 " ++ " WHERE DAA2.pacs_id ="+pacsId ++ " AND DAA2.STATUS = 'P' " ++ " group by daa2.pacs_id, daa2.teller_id " ++ " union all " ++" SELECT COUNT(*) AS p_3, d.maker_id teller_id, d.pacs_id " ++" FROM DEP_TXN_AUTHORIZATION D " ++" WHERE D.POST_DATE = (select system_date from system_date) " ++" and d.pacs_id ="+pacsId ++" and d.txn_status = 'P' " ++" group by d.maker_id, d.pacs_id " ++" union all " ++" SELECT COUNT(*) AS p_4, d.maker_id teller_id, d.pacs_id " ++" FROM LOAN_TXN_AUTHORIZATION D " ++" WHERE D.POST_DATE = (select system_date from system_date) " ++" and d.pacs_id ="+pacsId ++" and d.txn_status = 'P' " ++" group by d.maker_id, d.pacs_id) " ++" group by teller_id, pacs_id) i, " ++" (select nvl(SUM((C.DENO_2000_IN * 2000) + (C.DENO_500_IN * 500) + " ++" (C.DENO_200_IN * 200) + (C.DENO_100_IN * 100) + " ++" (C.DENO_50_IN * 50) + (C.DENO_20_IN * 20) + " ++" (C.DENO_10_IN * 10) + (C.DENO_5_IN * 5) + " ++" (C.DENO_2_IN * 2) + (C.DENO_1_IN * 1) + " ++" (c.deno_50p_in * 0.5) + (c.deno_1p_in * 0.01)), " ++" 0) AS TOTAL_CASH_IN, " ++" c.teller_id, " ++" c.pacs_id " ++" from cash_txn_hist c " ++" where c.txn_date = (select system_date from system_date) " ++" and c.pacs_id ="+pacsId ++" and c.status = 'A' " ++" GROUP BY c.teller_id, c.pacs_id) b, " ++" " ++" (SELECT nvl(SUM((C.DENO_2000_OUT * 2000) + (C.DENO_500_OUT * 500) + " ++" (C.DENO_200_OUT * 200) +(C.DENO_100_OUT * 100) + " ++" (C.DENO_50_OUT * 50) + (C.DENO_20_OUT * 20) + " ++" (C.DENO_10_out * 10) + (C.DENO_5_OUT * 5) + " ++" (C.DENO_2_OUT * 2) + (C.DENO_1_OUT * 1) + " ++" (c.deno_50p_out * 0.5) + (c.deno_1p_out * 0.01)), " ++" 0) AS TOTAL_CASH_OUT, " ++" c.teller_id, " ++" c.pacs_id " ++" from cash_txn_hist c " ++" where c.txn_date = (select system_date from system_date) " ++" and c.pacs_id ="+pacsId ++" and c.status = 'A' " ++" GROUP BY c.teller_id, c.pacs_id) c " ++" where i.pacs_id = j.pacs_id(+) " ++" and i.pacs_id = h.pacs_id(+) " ++" and i.teller_id = j.teller_id(+) " ++" and i.teller_id = h.teller_id(+) " ++" and i.pacs_id = b.pacs_id(+) " ++" and i.teller_id = b.teller_id(+) " ++" and i.pacs_id = c.pacs_id(+) " ++" and i.teller_id = c.teller_id(+) " ); + + + + + + + + + + + while (rs.next()) { + + tdBean = new TransactioDetailsBean(); + tdBean.setAuthorisedQ(rs.getString("authorized_queues")==null?"0":rs.getString("authorized_queues")); + tdBean.setRejectedQ(rs.getString("rejected_queues")==null?"0":rs.getString("rejected_queues")); + tdBean.setPendingQ(rs.getString("pending_queues")==null?"0":rs.getString("pending_queues")); + tdBean.setCashIn(rs.getString("TOTAL_CASH_IN")==null?"0":rs.getString("TOTAL_CASH_IN")); + tdBean.setCashOut(rs.getString("TOTAL_CASH_OUT")==null?"0":rs.getString("TOTAL_CASH_OUT")); + tdBean.setCashDiff(rs.getString("CASH_difference")==null?"0":rs.getString("CASH_difference")); + tdBean.setTellerId(rs.getString("teller_id")); + + tdBeanList.add(tdBean); + } + jsonString = objmap.writeValueAsString(tdBeanList); + } catch (Exception e) { + // e.printStackTrace(); + // System.out.println("Exception occured in getQueDetails for user Id :" + tellerId); + System.out.println("Error occurred during processing."); + + } finally { + try { + if (con != null) { + // con.commit(); + con.close(); + } + } catch (SQLException e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + + return jsonString; + } +} + diff --git a/IPKS_Updated/src/src/java/DataEntryBean/AccountAmendBean.java b/IPKS_Updated/src/src/java/DataEntryBean/AccountAmendBean.java new file mode 100644 index 0000000..b83bfad --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/AccountAmendBean.java @@ -0,0 +1,284 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author 981898 + */ +public class AccountAmendBean { + + private String accNo; + private String newLimit; + private String newExpDate; + private String cif1; + private String accType; + private String prodName; + private String custName; + private String accOpenDt; + private String availBal; + private String guardianName; + private String cif2; + private String cif3; + private String cif4; + private String cif5; + private String cif6; + private String cif7; + private String cif8; + private String cif9; + private String cif10; + private String cif11; + private String name2; + private String name3; + private String name4; + private String name5; + private String name6; + private String name7; + private String name8; + private String name9; + private String name10; + private String name11; + + + public String getCif11() { + return cif11; + } + + public void setCif11(String cif11) { + this.cif11 = cif11; + } + + public String getName11() { + return name11; + } + + public void setName11(String name11) { + this.name11 = name11; + } + + public String getCif10() { + return cif10; + } + + public void setCif10(String cif10) { + this.cif10 = cif10; + } + + public String getCif2() { + return cif2; + } + + public void setCif2(String cif2) { + this.cif2 = cif2; + } + + public String getCif3() { + return cif3; + } + + public void setCif3(String cif3) { + this.cif3 = cif3; + } + + public String getCif4() { + return cif4; + } + + public void setCif4(String cif4) { + this.cif4 = cif4; + } + + public String getCif5() { + return cif5; + } + + public void setCif5(String cif5) { + this.cif5 = cif5; + } + + public String getCif6() { + return cif6; + } + + public void setCif6(String cif6) { + this.cif6 = cif6; + } + + public String getCif7() { + return cif7; + } + + public void setCif7(String cif7) { + this.cif7 = cif7; + } + + public String getCif8() { + return cif8; + } + + public void setCif8(String cif8) { + this.cif8 = cif8; + } + + public String getCif9() { + return cif9; + } + + public void setCif9(String cif9) { + this.cif9 = cif9; + } + + public String getName10() { + return name10; + } + + public void setName10(String name10) { + this.name10 = name10; + } + + public String getName2() { + return name2; + } + + public void setName2(String name2) { + this.name2 = name2; + } + + public String getName3() { + return name3; + } + + public void setName3(String name3) { + this.name3 = name3; + } + + public String getName4() { + return name4; + } + + public void setName4(String name4) { + this.name4 = name4; + } + + public String getName5() { + return name5; + } + + public void setName5(String name5) { + this.name5 = name5; + } + + public String getName6() { + return name6; + } + + public void setName6(String name6) { + this.name6 = name6; + } + + public String getName7() { + return name7; + } + + public void setName7(String name7) { + this.name7 = name7; + } + + public String getName8() { + return name8; + } + + public void setName8(String name8) { + this.name8 = name8; + } + + public String getName9() { + return name9; + } + + public void setName9(String name9) { + this.name9 = name9; + } + + public String getGuardianName() { + return guardianName; + } + + public void setGuardianName(String guardianName) { + this.guardianName = guardianName; + } + + public String getAccType() { + return accType; + } + + public void setAccType(String accType) { + this.accType = accType; + } + + public String getAccOpenDt() { + return accOpenDt; + } + + public void setAccOpenDt(String accOpenDt) { + this.accOpenDt = accOpenDt; + } + + public String getAvailBal() { + return availBal; + } + + public void setAvailBal(String availBal) { + this.availBal = availBal; + } + + public String getCustName() { + return custName; + } + + public void setCustName(String custName) { + this.custName = custName; + } + + public String getProdName() { + return prodName; + } + + public void setProdName(String prodName) { + this.prodName = prodName; + } + + public String getCif1() { + return cif1; + } + + public void setCif1(String cif1) { + this.cif1 = cif1; + } + + public String getAccNo() { + return accNo; + } + + public void setAccNo(String accNo) { + this.accNo = accNo; + } + + public String getNewExpDate() { + return newExpDate; + } + + public void setNewExpDate(String newExpDate) { + this.newExpDate = newExpDate; + } + + public String getNewLimit() { + return newLimit; + } + + public void setNewLimit(String newLimit) { + this.newLimit = newLimit; + } +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/AccountCreationBean.java b/IPKS_Updated/src/src/java/DataEntryBean/AccountCreationBean.java new file mode 100644 index 0000000..b7816cb --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/AccountCreationBean.java @@ -0,0 +1,318 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Shubhrangshu + */ +public class AccountCreationBean { + private String productCode; + private String inttCategory; + private String segmentCode; + private String cifNumber; + private String cbsSavingsAccount; + private String limit; + private String limitExpiryDate; + private String collateralType; + private String landinAcres; + private String description; + private String currentValuation; + private String safeLendingMargin; + private String activityCode; + private String customerType; + private String dep_product_id; + private String inttDescription; + private String productName; + private String id; + private String limit_kind; + private String intRate; + private String penIntRate; + private String custName; + + + + public String getCustName() { + return custName; + } + + public void setCustName(String custName) { + this.custName = custName; + } + + public String getIntRate() { + return intRate; + } + + public void setIntRate(String intRate) { + this.intRate = intRate; + } + + public String getPenIntRate() { + return penIntRate; + } + + public void setPenIntRate(String penIntRate) { + this.penIntRate = penIntRate; + } + /** + * @return the productCode + */ + public String getProductCode() { + return productCode; + } + + /** + * @param productCode the productCode to set + */ + public void setProductCode(String productCode) { + this.productCode = productCode; + } + + /** + * @return the inttCategory + */ + public String getInttCategory() { + return inttCategory; + } + + /** + * @param inttCategory the inttCategory to set + */ + public void setInttCategory(String inttCategory) { + this.inttCategory = inttCategory; + } + + /** + * @return the segmentCode + */ + public String getSegmentCode() { + return segmentCode; + } + + /** + * @param segmentCode the segmentCode to set + */ + public void setSegmentCode(String segmentCode) { + this.segmentCode = segmentCode; + } + + /** + * @return the cifNumber + */ + public String getCifNumber() { + return cifNumber; + } + + /** + * @param cifNumber the cifNumber to set + */ + public void setCifNumber(String cifNumber) { + this.cifNumber = cifNumber; + } + + /** + * @return the cbsSavingsAccount + */ + public String getCbsSavingsAccount() { + return cbsSavingsAccount; + } + + /** + * @param cbsSavingsAccount the cbsSavingsAccount to set + */ + public void setCbsSavingsAccount(String cbsSavingsAccount) { + this.cbsSavingsAccount = cbsSavingsAccount; + } + + /** + * @return the limit + */ + public String getLimit() { + return limit; + } + + /** + * @param limit the limit to set + */ + public void setLimit(String limit) { + this.limit = limit; + } + + /** + * @return the limitExpiryDate + */ + public String getLimitExpiryDate() { + return limitExpiryDate; + } + + /** + * @param limitExpiryDate the limitExpiryDate to set + */ + public void setLimitExpiryDate(String limitExpiryDate) { + this.limitExpiryDate = limitExpiryDate; + } + + /** + * @return the collateralType + */ + public String getCollateralType() { + return collateralType; + } + + /** + * @param collateralType the collateralType to set + */ + public void setCollateralType(String collateralType) { + this.collateralType = collateralType; + } + + /** + * @return the landinAcres + */ + public String getLandinAcres() { + return landinAcres; + } + + /** + * @param landinAcres the landinAcres to set + */ + public void setLandinAcres(String landinAcres) { + this.landinAcres = landinAcres; + } + + /** + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * @param description the description to set + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * @return the currentValuation + */ + public String getCurrentValuation() { + return currentValuation; + } + + /** + * @param currentValuation the currentValuation to set + */ + public void setCurrentValuation(String currentValuation) { + this.currentValuation = currentValuation; + } + + /** + * @return the safeLendingMargin + */ + public String getSafeLendingMargin() { + return safeLendingMargin; + } + + /** + * @param safeLendingMargin the safeLendingMargin to set + */ + public void setSafeLendingMargin(String safeLendingMargin) { + this.safeLendingMargin = safeLendingMargin; + } + + /** + * @return the activityCode + */ + public String getActivityCode() { + return activityCode; + } + + /** + * @param activityCode the activityCode to set + */ + public void setActivityCode(String activityCode) { + this.activityCode = activityCode; + } + + public String getCustomerType() { + return customerType; + } + + /** + * @param customerType the customerType to set + */ + public void setCustomerType(String customerType) { + this.customerType = customerType; + } + + /** + * @return the dep_product_id + */ + public String getDep_product_id() { + return dep_product_id; + } + + /** + * @param dep_product_id the dep_product_id to set + */ + public void setDep_product_id(String dep_product_id) { + this.dep_product_id = dep_product_id; + } + + /** + * @return the inttDescription + */ + public String getInttDescription() { + return inttDescription; + } + + /** + * @param inttDescription the inttDescription to set + */ + public void setInttDescription(String inttDescription) { + this.inttDescription = inttDescription; + } + + /** + * @return the productName + */ + public String getProductName() { + return productName; + } + + /** + * @param productName the productName to set + */ + public void setProductName(String productName) { + this.productName = productName; + } + + /** + * @return the id + */ + public String getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(String id) { + this.id = id; + } + + public String getLimit_kind() { + return limit_kind; + } + + public void setLimit_kind(String limit_kind) { + this.limit_kind = limit_kind; + } + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/AccountDetailsBean.java b/IPKS_Updated/src/src/java/DataEntryBean/AccountDetailsBean.java new file mode 100644 index 0000000..a18e72a --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/AccountDetailsBean.java @@ -0,0 +1,517 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +/** + * + * @author 1320030 + */ +package DataEntryBean; + +public class AccountDetailsBean { + String shgSearch; + private String checkOption3; + private String lastdisbursementdate; + private String accountnumber; + private String source; + private String bankname; + private String shgcode; + private String shgname; + private String accountopendate; + private String accountnumber1; + private String source1; + private String bankname1; + private String shgcode1; + private String shgname1; + private String accountopendate1; + private String accountnumber1Amend; + private String sourceAmend; + private String banknameAmend; + private String shgcode1Amend; + private String shgname1Amend; + private String accountopendate1Amend; + private String source1Amend; + private String bankname1Amend; + + private String loanamount; + private String principaloutstanding; + private String principalpaid; + private String interestoutstanding; + private String interestpaid; + private String outstandingbalance; + private String interestaccrued; + private String lasttransactiondate; + + private String accountnumberAmend; + private String lastdisbursementdateAmend; + private String accountopendateAmend; + private String loanamountAmend; + private String principaloutstandingAmend; + private String principalpaidAmend; + private String interestoutstandingAmend; + private String interestpaidAmend; + private String outstandingbalanceAmend; + private String interestaccruedAmend; + private String lasttransactiondateAmend; + private String shgnameAmend; + + private String shgcodeAmend; + private String acc_id; + private String Txn_ref_no; + private String Txn_amt; + private String Member_name; + private String Txn_type; + private String member_id; + private String withdrawl; + private String deposit; + private String total_bal; + private String member_code; + + public String getMember_code() { + return member_code; + } + + public void setMember_code(String member_code) { + this.member_code = member_code; + } + + + public String getTotal_bal() { + return total_bal; + } + + public void setTotal_bal(String total_bal) { + this.total_bal = total_bal; + } + + + public String getDeposit() { + return deposit; + } + + public void setDeposit(String deposit) { + this.deposit = deposit; + } + + public String getMember_id() { + return member_id; + } + + public void setMember_id(String member_id) { + this.member_id = member_id; + } + + public String getWithdrawl() { + return withdrawl; + } + + public void setWithdrawl(String withdrawl) { + this.withdrawl = withdrawl; + } + + + + + public String getTxn_type() { + return Txn_type; + } + + public void setTxn_type(String Txn_type) { + this.Txn_type = Txn_type; + } + + + + public String getMember_name() { + return Member_name; + } + + public void setMember_name(String Member_name) { + this.Member_name = Member_name; + } + + public String getTxn_amt() { + return Txn_amt; + } + + public void setTxn_amt(String Txn_amt) { + this.Txn_amt = Txn_amt; + } + + public String getTxn_ref_no() { + return Txn_ref_no; + } + + public void setTxn_ref_no(String Txn_ref_no) { + this.Txn_ref_no = Txn_ref_no; + } + + + + + public String getCheckOption3() { + return checkOption3; + } + + public void setCheckOption3(String checkOption3) { + this.checkOption3 = checkOption3; + } + + public String getAccountnumber() { + return accountnumber; + } + + public void setAccountnumber(String accountnumber) { + this.accountnumber = accountnumber; + } + + public String getAccountnumberAmend() { + return accountnumberAmend; + } + + public void setAccountnumberAmend(String accountnumberAmend) { + this.accountnumberAmend = accountnumberAmend; + } + + public String getAccountopendate() { + return accountopendate; + } + + public void setAccountopendate(String accountopendate) { + this.accountopendate = accountopendate; + } + + public String getAccountopendateAmend() { + return accountopendateAmend; + } + + public void setAccountopendateAmend(String accountopendateAmend) { + this.accountopendateAmend = accountopendateAmend; + } + + public String getInterestaccrued() { + return interestaccrued; + } + + public void setInterestaccrued(String interestaccrued) { + this.interestaccrued = interestaccrued; + } + + public String getInterestaccruedAmend() { + return interestaccruedAmend; + } + + public void setInterestaccruedAmend(String interestaccruedAmend) { + this.interestaccruedAmend = interestaccruedAmend; + } + + public String getInterestoutstanding() { + return interestoutstanding; + } + + public void setInterestoutstanding(String interestoutstanding) { + this.interestoutstanding = interestoutstanding; + } + + public String getInterestoutstandingAmend() { + return interestoutstandingAmend; + } + + public void setInterestoutstandingAmend(String interestoutstandingAmend) { + this.interestoutstandingAmend = interestoutstandingAmend; + } + + public String getInterestpaid() { + return interestpaid; + } + + public void setInterestpaid(String interestpaid) { + this.interestpaid = interestpaid; + } + + public String getInterestpaidAmend() { + return interestpaidAmend; + } + + public void setInterestpaidAmend(String interestpaidAmend) { + this.interestpaidAmend = interestpaidAmend; + } + + public String getLastdisbursementdate() { + return lastdisbursementdate; + } + + public void setLastdisbursementdate(String lastdisbursementdate) { + this.lastdisbursementdate = lastdisbursementdate; + } + + public String getLastdisbursementdateAmend() { + return lastdisbursementdateAmend; + } + + public void setLastdisbursementdateAmend(String lastdisbursementdateAmend) { + this.lastdisbursementdateAmend = lastdisbursementdateAmend; + } + + public String getLasttransactiondate() { + return lasttransactiondate; + } + + public void setLasttransactiondate(String lasttransactiondate) { + this.lasttransactiondate = lasttransactiondate; + } + + public String getLasttransactiondateAmend() { + return lasttransactiondateAmend; + } + + public void setLasttransactiondateAmend(String lasttransactiondateAmend) { + this.lasttransactiondateAmend = lasttransactiondateAmend; + } + + public String getLoanamount() { + return loanamount; + } + + public void setLoanamount(String loanamount) { + this.loanamount = loanamount; + } + + public String getLoanamountAmend() { + return loanamountAmend; + } + + public void setLoanamountAmend(String loanamountAmend) { + this.loanamountAmend = loanamountAmend; + } + + public String getOutstandingbalance() { + return outstandingbalance; + } + + public void setOutstandingbalance(String outstandingbalance) { + this.outstandingbalance = outstandingbalance; + } + + public String getOutstandingbalanceAmend() { + return outstandingbalanceAmend; + } + + public void setOutstandingbalanceAmend(String outstandingbalanceAmend) { + this.outstandingbalanceAmend = outstandingbalanceAmend; + } + + public String getPrincipaloutstanding() { + return principaloutstanding; + } + + public void setPrincipaloutstanding(String principaloutstanding) { + this.principaloutstanding = principaloutstanding; + } + + public String getPrincipaloutstandingAmend() { + return principaloutstandingAmend; + } + + public void setPrincipaloutstandingAmend(String principaloutstandingAmend) { + this.principaloutstandingAmend = principaloutstandingAmend; + } + + public String getPrincipalpaid() { + return principalpaid; + } + + public void setPrincipalpaid(String principalpaid) { + this.principalpaid = principalpaid; + } + + public String getPrincipalpaidAmend() { + return principalpaidAmend; + } + + public void setPrincipalpaidAmend(String principalpaidAmend) { + this.principalpaidAmend = principalpaidAmend; + } + + public String getShgSearch() { + return shgSearch; + } + + public void setShgSearch(String shgSearch) { + this.shgSearch = shgSearch; + } + + + + public String getShgcode() { + return shgcode; + } + + public void setShgcode(String shgcode) { + this.shgcode = shgcode; + } + + public String getShgcodeAmend() { + return shgcodeAmend; + } + + public void setShgcodeAmend(String shgcodeAmend) { + this.shgcodeAmend = shgcodeAmend; + } + + public String getShgname() { + return shgname; + } + + public void setShgname(String shgname) { + this.shgname = shgname; + } + + public String getShgnameAmend() { + return shgnameAmend; + } + + public void setShgnameAmend(String shgnameAmend) { + this.shgnameAmend = shgnameAmend; + } + + public String getAccountnumber1() { + return accountnumber1; + } + + public void setAccountnumber1(String accountnumber1) { + this.accountnumber1 = accountnumber1; + } + + public String getAccountnumber1Amend() { + return accountnumber1Amend; + } + + public void setAccountnumber1Amend(String accountnumber1Amend) { + this.accountnumber1Amend = accountnumber1Amend; + } + + public String getAccountopendate1() { + return accountopendate1; + } + + public void setAccountopendate1(String accountopendate1) { + this.accountopendate1 = accountopendate1; + } + + public String getAccountopendate1Amend() { + return accountopendate1Amend; + } + + public void setAccountopendate1Amend(String accountopendate1Amend) { + this.accountopendate1Amend = accountopendate1Amend; + } + + public String getBankname() { + return bankname; + } + + public void setBankname(String bankname) { + this.bankname = bankname; + } + + public String getBankname1() { + return bankname1; + } + + public void setBankname1(String bankname1) { + this.bankname1 = bankname1; + } + + public String getBankname1Amend() { + return bankname1Amend; + } + + public void setBankname1Amend(String bankname1Amend) { + this.bankname1Amend = bankname1Amend; + } + + public String getBanknameAmend() { + return banknameAmend; + } + + public void setBanknameAmend(String banknameAmend) { + this.banknameAmend = banknameAmend; + } + + public String getShgcode1() { + return shgcode1; + } + + public void setShgcode1(String shgcode1) { + this.shgcode1 = shgcode1; + } + + public String getShgcode1Amend() { + return shgcode1Amend; + } + + public void setShgcode1Amend(String shgcode1Amend) { + this.shgcode1Amend = shgcode1Amend; + } + + public String getShgname1() { + return shgname1; + } + + public void setShgname1(String shgname1) { + this.shgname1 = shgname1; + } + + public String getShgname1Amend() { + return shgname1Amend; + } + + public void setShgname1Amend(String shgname1Amend) { + this.shgname1Amend = shgname1Amend; + } + + public String getSource() { + return source; + } + + public void setSource(String source) { + this.source = source; + } + + public String getSource1() { + return source1; + } + + public void setSource1(String source1) { + this.source1 = source1; + } + + public String getSource1Amend() { + return source1Amend; + } + + public void setSource1Amend(String source1Amend) { + this.source1Amend = source1Amend; + } + + public String getSourceAmend() { + return sourceAmend; + } + + public void setSourceAmend(String sourceAmend) { + this.sourceAmend = sourceAmend; + } + + public String getAcc_id() { + return acc_id; + } + + public void setAcc_id(String acc_id) { + this.acc_id = acc_id; + } + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/AccountRenewalBean.java b/IPKS_Updated/src/src/java/DataEntryBean/AccountRenewalBean.java new file mode 100644 index 0000000..43f5add --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/AccountRenewalBean.java @@ -0,0 +1,317 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Shubhrangshu + */ +public class AccountRenewalBean +{ + private String productCode; + private String inttCategory; + private String segmentCode; + private String cifNumber; + private String ccAccount; + private String limit; + private String limitExpiryDate; + private String collateralType; + private String landinAcres; + private String description; + private String currentValuation; + private String safeLendingMargin; + private String activityCode; + private String customerType; + private String dep_product_id; + private String inttDescription; + private String productName; + private String id; + private String cbsSavingsAccount; + + private String accNumber; + + + /** + * @return the productCode + */ + public String getProductCode() { + return productCode; + } + + /** + * @param productCode the productCode to set + */ + public void setProductCode(String productCode) { + this.productCode = productCode; + } + + /** + * @return the inttCategory + */ + public String getInttCategory() { + return inttCategory; + } + + /** + * @param inttCategory the inttCategory to set + */ + public void setInttCategory(String inttCategory) { + this.inttCategory = inttCategory; + } + + /** + * @return the segmentCode + */ + public String getSegmentCode() { + return segmentCode; + } + + /** + * @param segmentCode the segmentCode to set + */ + public void setSegmentCode(String segmentCode) { + this.segmentCode = segmentCode; + } + + /** + * @return the cifNumber + */ + public String getCifNumber() { + return cifNumber; + } + + /** + * @param cifNumber the cifNumber to set + */ + public void setCifNumber(String cifNumber) { + this.cifNumber = cifNumber; + } + + + /** + * @return the limit + */ + public String getLimit() { + return limit; + } + + /** + * @param limit the limit to set + */ + public void setLimit(String limit) { + this.limit = limit; + } + + /** + * @return the limitExpiryDate + */ + public String getLimitExpiryDate() { + return limitExpiryDate; + } + + /** + * @param limitExpiryDate the limitExpiryDate to set + */ + public void setLimitExpiryDate(String limitExpiryDate) { + this.limitExpiryDate = limitExpiryDate; + } + + /** + * @return the collateralType + */ + public String getCollateralType() { + return collateralType; + } + + /** + * @param collateralType the collateralType to set + */ + public void setCollateralType(String collateralType) { + this.collateralType = collateralType; + } + + /** + * @return the landinAcres + */ + public String getLandinAcres() { + return landinAcres; + } + + /** + * @param landinAcres the landinAcres to set + */ + public void setLandinAcres(String landinAcres) { + this.landinAcres = landinAcres; + } + + /** + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * @param description the description to set + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * @return the currentValuation + */ + public String getCurrentValuation() { + return currentValuation; + } + + /** + * @param currentValuation the currentValuation to set + */ + public void setCurrentValuation(String currentValuation) { + this.currentValuation = currentValuation; + } + + /** + * @return the safeLendingMargin + */ + public String getSafeLendingMargin() { + return safeLendingMargin; + } + + /** + * @param safeLendingMargin the safeLendingMargin to set + */ + public void setSafeLendingMargin(String safeLendingMargin) { + this.safeLendingMargin = safeLendingMargin; + } + + /** + * @return the activityCode + */ + public String getActivityCode() { + return activityCode; + } + + /** + * @param activityCode the activityCode to set + */ + public void setActivityCode(String activityCode) { + this.activityCode = activityCode; + } + + public String getCustomerType() { + return customerType; + } + + /** + * @param customerType the customerType to set + */ + public void setCustomerType(String customerType) { + this.customerType = customerType; + } + + /** + * @return the dep_product_id + */ + public String getDep_product_id() { + return dep_product_id; + } + + /** + * @param dep_product_id the dep_product_id to set + */ + public void setDep_product_id(String dep_product_id) { + this.dep_product_id = dep_product_id; + } + + /** + * @return the inttDescription + */ + public String getInttDescription() { + return inttDescription; + } + + /** + * @param inttDescription the inttDescription to set + */ + public void setInttDescription(String inttDescription) { + this.inttDescription = inttDescription; + } + + /** + * @return the productName + */ + public String getProductName() { + return productName; + } + + /** + * @param productName the productName to set + */ + public void setProductName(String productName) { + this.productName = productName; + } + + /** + * @return the id + */ + public String getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(String id) { + this.id = id; + } + + /** + * @return the accNumber + */ + public String getAccNumber() { + return accNumber; + } + + /** + * @param accNumber the accNumber to set + */ + public void setAccNumber(String accNumber) { + this.accNumber = accNumber; + } + + /** + * @return the ccAccount + */ + public String getCcAccount() { + return ccAccount; + } + + /** + * @param ccAccount the ccAccount to set + */ + public void setCcAccount(String ccAccount) { + this.ccAccount = ccAccount; + } + + /** + * @return the cbsSavingsAccount + */ + public String getCbsSavingsAccount() { + return cbsSavingsAccount; + } + + /** + * @param cbsSavingsAccount the cbsSavingsAccount to set + */ + public void setCbsSavingsAccount(String cbsSavingsAccount) { + this.cbsSavingsAccount = cbsSavingsAccount; + } + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/AddressDetailsBean.java b/IPKS_Updated/src/src/java/DataEntryBean/AddressDetailsBean.java new file mode 100644 index 0000000..011bbe3 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/AddressDetailsBean.java @@ -0,0 +1,308 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author 1320029 + */ +public class AddressDetailsBean { + + + private String district; + String shgSearch; + private String subdivisions; + private String municipality; + private String panchayat; + private String village; + private String policestation; + private String postoffice; + private String pincode; + private String districtAmend; + private String subdivisionsAmend; + private String municipalityAmend; + private String panchayatAmend; + private String villageAmend; + private String policestationAmend; + private String postofficeAmend; + private String pincodeAmend; + private String shgcode; + private String shgcodeAmend; + private String shg_id; + + /** + * @return the district + */ + public String getDistrict() { + return district; + } + + /** + * @param district the district to set + */ + public void setDistrict(String district) { + this.district = district; + } + + /** + * @return the subdivisions + */ + public String getSubdivisions() { + return subdivisions; + } + + /** + * @param subdivisions the subdivisions to set + */ + public void setSubdivisions(String subdivisions) { + this.subdivisions = subdivisions; + } + + /** + * @return the municipality + */ + public String getMunicipality() { + return municipality; + } + + /** + * @param municipality the municipality to set + */ + public void setMunicipality(String municipality) { + this.municipality = municipality; + } + + /** + * @return the panchayat + */ + public String getPanchayat() { + return panchayat; + } + + /** + * @param panchayat the panchayat to set + */ + public void setPanchayat(String panchayat) { + this.panchayat = panchayat; + } + + /** + * @return the village + */ + public String getVillage() { + return village; + } + + /** + * @param village the village to set + */ + public void setVillage(String village) { + this.village = village; + } + + /** + * @return the policestation + */ + public String getPolicestation() { + return policestation; + } + + /** + * @param policestation the policestation to set + */ + public void setPolicestation(String policestation) { + this.policestation = policestation; + } + + /** + * @return the postoffice + */ + public String getPostoffice() { + return postoffice; + } + + /** + * @param postoffice the postoffice to set + */ + public void setPostoffice(String postoffice) { + this.postoffice = postoffice; + } + + /** + * @return the pincode + */ + public String getPincode() { + return pincode; + } + + /** + * @param pincode the pincode to set + */ + public void setPincode(String pincode) { + this.pincode = pincode; + } + + /** + * @return the districtAmend + */ + public String getDistrictAmend() { + return districtAmend; + } + + /** + * @param districtAmend the districtAmend to set + */ + public void setDistrictAmend(String districtAmend) { + this.districtAmend = districtAmend; + } + + /** + * @return the subdivisionsAmend + */ + public String getSubdivisionsAmend() { + return subdivisionsAmend; + } + + /** + * @param subdivisionsAmend the subdivisionsAmend to set + */ + public void setSubdivisionsAmend(String subdivisionsAmend) { + this.subdivisionsAmend = subdivisionsAmend; + } + + /** + * @return the municipalityAmend + */ + public String getMunicipalityAmend() { + return municipalityAmend; + } + + /** + * @param municipalityAmend the municipalityAmend to set + */ + public void setMunicipalityAmend(String municipalityAmend) { + this.municipalityAmend = municipalityAmend; + } + + /** + * @return the panchayatAmend + */ + public String getPanchayatAmend() { + return panchayatAmend; + } + + /** + * @param panchayatAmend the panchayatAmend to set + */ + public void setPanchayatAmend(String panchayatAmend) { + this.panchayatAmend = panchayatAmend; + } + + /** + * @return the villageAmend + */ + public String getVillageAmend() { + return villageAmend; + } + + /** + * @param villageAmend the villageAmend to set + */ + public void setVillageAmend(String villageAmend) { + this.villageAmend = villageAmend; + } + + /** + * @return the policestationAmend + */ + public String getPolicestationAmend() { + return policestationAmend; + } + + /** + * @param policestationAmend the policestationAmend to set + */ + public void setPolicestationAmend(String policestationAmend) { + this.policestationAmend = policestationAmend; + } + + /** + * @return the postofficeAmend + */ + public String getPostofficeAmend() { + return postofficeAmend; + } + + /** + * @param postofficeAmend the postofficeAmend to set + */ + public void setPostofficeAmend(String postofficeAmend) { + this.postofficeAmend = postofficeAmend; + } + + /** + * @return the pincodeAmend + */ + public String getPincodeAmend() { + return pincodeAmend; + } + + /** + * @param pincodeAmend the pincodeAmend to set + */ + public void setPincodeAmend(String pincodeAmend) { + this.pincodeAmend = pincodeAmend; + } + + /** + * @return the shgcode + */ + public String getShgcode() { + return shgcode; + } + + /** + * @param shgcode the shgcode to set + */ + public void setShgcode(String shgcode) { + this.shgcode = shgcode; + } + + /** + * @return the shgcodeAmend + */ + public String getShgcodeAmend() { + return shgcodeAmend; + } + + /** + * @param shgcodeAmend the shgcodeAmend to set + */ + public void setShgcodeAmend(String shgcodeAmend) { + this.shgcodeAmend = shgcodeAmend; + } + + /** + * @return the shg_id + */ + public String getShg_id() { + return shg_id; + } + + /** + * @param shg_id the shg_id to set + */ + public void setShg_id(String shg_id) { + this.shg_id = shg_id; + } + + public String getShgSearch() { + return shgSearch; + } + + public void setShgSearch(String shgSearch) { + this.shgSearch = shgSearch; + } +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/AssetEntryBean.java b/IPKS_Updated/src/src/java/DataEntryBean/AssetEntryBean.java new file mode 100644 index 0000000..07eed55 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/AssetEntryBean.java @@ -0,0 +1,159 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Helpdesk10 + */ +public class AssetEntryBean { + + private String asset_type; + private String asset_subtype; + private String asset_mst_id; + private String asset_id; + private String description; + private String curr_val; + private String mode_of_aqr; + + private String purchaseDate; + private String glcode; + private String depRate; + private String status; + private String id; + private String glid; + private String remarks; + private String comp1; + private String comp2; + + public String getComp1() { + return comp1; + } + + public void setComp1(String comp1) { + this.comp1 = comp1; + } + + public String getComp2() { + return comp2; + } + + public void setComp2(String comp2) { + this.comp2 = comp2; + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks; + } + + public String getGlid() { + return glid; + } + + public void setGlid(String glid) { + this.glid = glid; + } + + public String getPurchaseDate() { + return purchaseDate; + } + + public void setPurchaseDate(String purchaseDate) { + this.purchaseDate = purchaseDate; + } + + public String getGlcode() { + return glcode; + } + + public void setGlcode(String glcode) { + this.glcode = glcode; + } + + public String getDepRate() { + return depRate; + } + + public void setDepRate(String depRate) { + this.depRate = depRate; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getAsset_id() { + return asset_id; + } + + public void setAsset_id(String asset_id) { + this.asset_id = asset_id; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getCurr_val() { + return curr_val; + } + + public void setCurr_val(String curr_val) { + this.curr_val = curr_val; + } + + public String getAsset_type() { + return asset_type; + } + + public void setAsset_type(String asset_type) { + this.asset_type = asset_type; + } + + public String getAsset_subtype() { + return asset_subtype; + } + + public void setAsset_subtype(String asset_subtype) { + this.asset_subtype = asset_subtype; + } + + public String getAsset_mst_id() { + return asset_mst_id; + } + + public void setAsset_mst_id(String asset_mst_id) { + this.asset_mst_id = asset_mst_id; + } + + public String getMode_of_aqr() { + return mode_of_aqr; + } + + public void setMode_of_aqr(String mode_of_aqr) { + this.mode_of_aqr = mode_of_aqr; + } +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/AssetMasterBean.java b/IPKS_Updated/src/src/java/DataEntryBean/AssetMasterBean.java new file mode 100644 index 0000000..55eb5a9 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/AssetMasterBean.java @@ -0,0 +1,161 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Helpdesk10 + */ +public class AssetMasterBean { + + private String asset_id; + + + private String asset_type; + private String asset_type_desc; + private String asset_sub_type; + private String asset_subtype_desc; + private String long_desc; + private String depr_rate; + + private String asset_typeAmend; + private String asset_type_descAmend; + private String asset_subtypeAmend; + private String asset_subtype_descAmend; + private String long_descAmend; + private String depr_rateAmend; + + private String asset_typeSearch; + private String asset_subtypeSearch; + + public String getAsset_id() { + return asset_id; + } + + public void setAsset_id(String asset_id) { + this.asset_id = asset_id; + } + + public String getAsset_typeSearch() { + return asset_typeSearch; + } + + public void setAsset_typeSearch(String asset_typeSearch) { + this.asset_typeSearch = asset_typeSearch; + } + + public String getAsset_subtypeSearch() { + return asset_subtypeSearch; + } + + public void setAsset_subtypeSearch(String asset_subtypeSearch) { + this.asset_subtypeSearch = asset_subtypeSearch; + } + + + + + + public String getAsset_type() { + return asset_type; + } + + public void setAsset_type(String asset_type) { + this.asset_type = asset_type; + } + + public String getAsset_type_desc() { + return asset_type_desc; + } + + public void setAsset_type_desc(String asset_type_desc) { + this.asset_type_desc = asset_type_desc; + } + + public String getAsset_sub_type() { + return asset_sub_type; + } + + public void setAsset_sub_type(String asset_sub_type) { + this.asset_sub_type = asset_sub_type; + } + + public String getAsset_subtype_desc() { + return asset_subtype_desc; + } + + public void setAsset_subtype_desc(String asset_subtype_desc) { + this.asset_subtype_desc = asset_subtype_desc; + } + + public String getLong_desc() { + return long_desc; + } + + public void setLong_desc(String long_desc) { + this.long_desc = long_desc; + } + + public String getDepr_rate() { + return depr_rate; + } + + public void setDepr_rate(String depr_rate) { + this.depr_rate = depr_rate; + } + + public String getAsset_typeAmend() { + return asset_typeAmend; + } + + public void setAsset_typeAmend(String asset_typeAmend) { + this.asset_typeAmend = asset_typeAmend; + } + + public String getAsset_type_descAmend() { + return asset_type_descAmend; + } + + public void setAsset_type_descAmend(String asset_type_descAmend) { + this.asset_type_descAmend = asset_type_descAmend; + } + + public String getAsset_subtypeAmend() { + return asset_subtypeAmend; + } + + public void setAsset_subtypeAmend(String asset_subtypeAmend) { + this.asset_subtypeAmend = asset_subtypeAmend; + } + + public String getAsset_subtype_descAmend() { + return asset_subtype_descAmend; + } + + public void setAsset_subtype_descAmend(String asset_subtype_descAmend) { + this.asset_subtype_descAmend = asset_subtype_descAmend; + } + + public String getLong_descAmend() { + return long_descAmend; + } + + public void setLong_descAmend(String long_descAmend) { + this.long_descAmend = long_descAmend; + } + + public String getDepr_rateAmend() { + return depr_rateAmend; + } + + public void setDepr_rateAmend(String depr_rateAmend) { + this.depr_rateAmend = depr_rateAmend; + } + + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/AssetRegisterBean.java b/IPKS_Updated/src/src/java/DataEntryBean/AssetRegisterBean.java new file mode 100644 index 0000000..b7cf665 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/AssetRegisterBean.java @@ -0,0 +1,150 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Helpdesk10 + */ +public class AssetRegisterBean { + + private String asset_type; + private String asset_subtypoe; + private String asset_mst_id; + + private String asset_id; + private String int_value; + private String pres_val; + private String description; + private String mode_of_aqr; + private String detail_id; + private String status; + private String entry_date; + private String purchase_date; + private String glcode; + private String depRate; + + + public String getPurchase_date() { + return purchase_date; + } + + public void setPurchase_date(String purchase_date) { + this.purchase_date = purchase_date; + } + + public String getGlcode() { + return glcode; + } + + public void setGlcode(String glcode) { + this.glcode = glcode; + } + + public String getDepRate() { + return depRate; + } + + public void setDepRate(String depRate) { + this.depRate = depRate; + } + + public String getEntry_date() { + return entry_date; + } + + public void setEntry_date(String entry_date) { + this.entry_date = entry_date; + } + + + public String getDetail_id() { + return detail_id; + } + + public void setDetail_id(String detail_id) { + this.detail_id = detail_id; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public String getInt_value() { + return int_value; + } + + public void setInt_value(String int_value) { + this.int_value = int_value; + } + + public String getPres_val() { + return pres_val; + } + + public void setPres_val(String pres_val) { + this.pres_val = pres_val; + } + + + + public String getAsset_id() { + return asset_id; + } + + public void setAsset_id(String asset_id) { + this.asset_id = asset_id; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + + public String getMode_of_aqr() { + return mode_of_aqr; + } + + public void setMode_of_aqr(String mode_of_aqr) { + this.mode_of_aqr = mode_of_aqr; + } + + + + public String getAsset_type() { + return asset_type; + } + + public void setAsset_type(String asset_type) { + this.asset_type = asset_type; + } + + public String getAsset_subtypoe() { + return asset_subtypoe; + } + + public void setAsset_subtypoe(String asset_subtypoe) { + this.asset_subtypoe = asset_subtypoe; + } + + public String getAsset_mst_id() { + return asset_mst_id; + } + + public void setAsset_mst_id(String asset_mst_id) { + this.asset_mst_id = asset_mst_id; + } + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/Asset_EnquiryBean.java b/IPKS_Updated/src/src/java/DataEntryBean/Asset_EnquiryBean.java new file mode 100644 index 0000000..5734da1 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/Asset_EnquiryBean.java @@ -0,0 +1,151 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 1319104 + */ +public class Asset_EnquiryBean { + private String asset_type; + private String asset_subtypoe; + private String asset_mst_id; + + + private String asset_id; + private String int_value; + private String pres_val; + private String description; + private String mode_of_aqr; + private String detail_id; + private String status; + private String entry_date; + private String purchase_date; + private String glcode; + private String depRate; + + public String getPurchase_date() { + return purchase_date; + } + + public void setPurchase_date(String purchase_date) { + this.purchase_date = purchase_date; + } + + public String getGlcode() { + return glcode; + } + + public void setGlcode(String glcode) { + this.glcode = glcode; + } + + public String getDepRate() { + return depRate; + } + + public void setDepRate(String depRate) { + this.depRate = depRate; + } + + public String getEntry_date() { + return entry_date; + } + + public void setEntry_date(String entry_date) { + this.entry_date = entry_date; + } + + + public String getDetail_id() { + return detail_id; + } + + public void setDetail_id(String detail_id) { + this.detail_id = detail_id; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public String getInt_value() { + return int_value; + } + + public void setInt_value(String int_value) { + this.int_value = int_value; + } + + public String getPres_val() { + return pres_val; + } + + public void setPres_val(String pres_val) { + this.pres_val = pres_val; + } + + + + public String getAsset_id() { + return asset_id; + } + + public void setAsset_id(String asset_id) { + this.asset_id = asset_id; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + + public String getMode_of_aqr() { + return mode_of_aqr; + } + + public void setMode_of_aqr(String mode_of_aqr) { + this.mode_of_aqr = mode_of_aqr; + } + + + + public String getAsset_type() { + return asset_type; + } + + public void setAsset_type(String asset_type) { + this.asset_type = asset_type; + } + + public String getAsset_subtypoe() { + return asset_subtypoe; + } + + public void setAsset_subtypoe(String asset_subtypoe) { + this.asset_subtypoe = asset_subtypoe; + } + + public String getAsset_mst_id() { + return asset_mst_id; + } + + public void setAsset_mst_id(String asset_mst_id) { + this.asset_mst_id = asset_mst_id; + } + +} + + diff --git a/IPKS_Updated/src/src/java/DataEntryBean/BasicInformationBean.java b/IPKS_Updated/src/src/java/DataEntryBean/BasicInformationBean.java new file mode 100644 index 0000000..5b71f3d --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/BasicInformationBean.java @@ -0,0 +1,203 @@ +package DataEntryBean; + + +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +public class BasicInformationBean { + String nameOfShg; + String groupCategory; + String dateOfFormation; + + String duration; + String nameOfShgAmend; + String shgSearch; + String cif; + + public String getCif() { + return cif; + } + + public void setCif(String cif) { + this.cif = cif; + } + + public String getShgcodeAmend() { + return shgcodeAmend; + } + + public void setShgcodeAmend(String shgcodeAmend) { + this.shgcodeAmend = shgcodeAmend; + } + String groupCategoryAmend; + String dateOfFormationAmend; + String durationAmend; + String shgcode; + String shgcodeAmend; + String shg_id; + String cifamend; + + public String getCifamend() { + return cifamend; + } + + public void setCifamend(String cifamend) { + this.cifamend = cifamend; + } + /** + * @return the nameOfShg + */ + public String getNameOfShg() { + return nameOfShg; + } + + /** + * @param nameOfShg the nameOfShg to set + */ + public void setNameOfShg(String nameOfShg) { + this.nameOfShg = nameOfShg; + } + + public String getShgSearch() { + return shgSearch; + } + + public void setShgSearch(String shgSearch) { + this.shgSearch = shgSearch; + } + + /** + * @return the groupCategory + */ + public String getGroupCategory() { + return groupCategory; + } + + /** + * @param groupCategory the groupCategory to set + */ + + public void setGroupCategory(String groupCategory) { + this.groupCategory = groupCategory; + } + /** + * @return the dateOfFormation + */ + + public String getDateOfFormation() { + return dateOfFormation; + } + + /** + * @param dateOfFormation the dateOfFormation to set + */ + public void setDateOfFormation(String dateOfFormation) { + this.dateOfFormation = dateOfFormation; + } + + + /** + * @return the duration + */ + + public String getDuration() { + return duration; + } + + /** + * @param duration the duration to set + */ + public void setDuration(String duration) { + this.duration = duration; + } + /** + * @param shgcode the shgcode to set + */ + /** + * @return the nameOfShgAmend + */ + public String getNameOfShgAmend() { + return nameOfShgAmend; + } + + /** + * @param nameOfShgAmend the nameOfShgAmend to set + */ + public void setNameOfShgAmend(String nameOfShgAmend) { + this.nameOfShgAmend = nameOfShgAmend; + } + + /** + * @return the groupCategoryAmend + */ + public String getGroupCategoryAmend() { + return groupCategoryAmend; + } + + /** + * @param groupCategory the groupCategory to set + */ + + public void setGroupCategoryAmend(String groupCategoryAmend) { + this.groupCategoryAmend = groupCategoryAmend; + } + /** + * @return the dateOfFormationAmend + */ + + public String getDateOfFormationAmend() { + return dateOfFormationAmend; + } + + /** + * @param dateOfFormationAmend the dateOfFormationAmend to set + */ + public void setDateOfFormationAmend(String dateOfFormationAmend) { + this.dateOfFormationAmend = dateOfFormationAmend; + } + + + /** + * @return the durationAmend + */ + + public String getDurationAmend() { + return durationAmend; + } + + /** + * @param durationAmend the durationAmend to set + */ + public void setDurationAmend(String durationAmend) { + this.durationAmend = durationAmend; + } + /** + * @param shgcode the shgcode to set + */ + public String getShgcode() { + return shgcode; + } + + public void setShgcode(String shgcode) { + this.shgcode = shgcode; + } + + /** + * @return the shg_id + */ + public String getShg_id() { + return shg_id; + } + + /** + * @param shg_id the shg_id to set + */ + public void setShg_id(String shg_id) { + this.shg_id = shg_id; + } + + +} + diff --git a/IPKS_Updated/src/src/java/DataEntryBean/BatchProcessingBean.java b/IPKS_Updated/src/src/java/DataEntryBean/BatchProcessingBean.java new file mode 100644 index 0000000..a17b593 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/BatchProcessingBean.java @@ -0,0 +1,88 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 594267 + */ +public class BatchProcessingBean { + + private String accType; + private String accNo; + private String txnAmt; + private String txnInd; + private String txnStatus; + private String txnRefNo; + private String narration; + private String accName; + + public String getAccName() { + return accName; + } + + public void setAccName(String accName) { + this.accName = accName; + } + + public String getNarration() { + return narration; + } + + public void setNarration(String narration) { + this.narration = narration; + } + + public String getTxnRefNo() { + return txnRefNo; + } + + public void setTxnRefNo(String txnRefNo) { + this.txnRefNo = txnRefNo; + } + + public String getTxnStatus() { + return txnStatus; + } + + public void setTxnStatus(String txnStatus) { + this.txnStatus = txnStatus; + } + + public String getAccNo() { + return accNo; + } + + public void setAccNo(String accNo) { + this.accNo = accNo; + } + + public String getAccType() { + return accType; + } + + public void setAccType(String accType) { + this.accType = accType; + } + + public String getTxnAmt() { + return txnAmt; + } + + public void setTxnAmt(String txnAmt) { + this.txnAmt = txnAmt; + } + + public String getTxnInd() { + return txnInd; + } + + public void setTxnInd(String txnInd) { + this.txnInd = txnInd; + } + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/BorrowingCreationBean.java b/IPKS_Updated/src/src/java/DataEntryBean/BorrowingCreationBean.java new file mode 100644 index 0000000..e213885 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/BorrowingCreationBean.java @@ -0,0 +1,99 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 1027350 + */ +public class BorrowingCreationBean { + + String acno; + String bank_name; + String branch_name; + String amt; + String ac_opn_dt; + String int_rate; + String ovd_dt; + String active_flag; + String od_int_rate; + + + + public String getOd_int_rate() { + return od_int_rate; + } + + public void setOd_int_rate(String od_int_rate) { + this.od_int_rate = od_int_rate; + } + + public String getAc_opn_dt() { + return ac_opn_dt; + } + + public void setAc_opn_dt(String ac_opn_dt) { + this.ac_opn_dt = ac_opn_dt; + } + + public String getAcno() { + return acno; + } + + public void setAcno(String acno) { + this.acno = acno; + } + + public String getActive_flag() { + return active_flag; + } + + public void setActive_flag(String active_flag) { + this.active_flag = active_flag; + } + + public String getAmt() { + return amt; + } + + public void setAmt(String amt) { + this.amt = amt; + } + + public String getBank_name() { + return bank_name; + } + + public void setBank_name(String bank_name) { + this.bank_name = bank_name; + } + + public String getBranch_name() { + return branch_name; + } + + public void setBranch_name(String branch_name) { + this.branch_name = branch_name; + } + + public String getInt_rate() { + return int_rate; + } + + public void setInt_rate(String int_rate) { + this.int_rate = int_rate; + } + + public String getOvd_dt() { + return ovd_dt; + } + + public void setOvd_dt(String ovd_dt) { + this.ovd_dt = ovd_dt; + } + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/BucketWiseLoanOutstandingJsonBean.java b/IPKS_Updated/src/src/java/DataEntryBean/BucketWiseLoanOutstandingJsonBean.java new file mode 100644 index 0000000..2c2e711 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/BucketWiseLoanOutstandingJsonBean.java @@ -0,0 +1,14 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 1320035 + */ +public class BucketWiseLoanOutstandingJsonBean { + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/BulkAcctMap.java b/IPKS_Updated/src/src/java/DataEntryBean/BulkAcctMap.java new file mode 100644 index 0000000..bc1dd88 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/BulkAcctMap.java @@ -0,0 +1,34 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 981898 + */ +public class BulkAcctMap { + + private String acctNo; + private String cbsAcctNo; + + public String getAcctNo() { + return acctNo; + } + + public void setAcctNo(String acctNo) { + this.acctNo = acctNo; + } + + public String getCbsAcctNo() { + return cbsAcctNo; + } + + public void setCbsAcctNo(String cbsAcctNo) { + this.cbsAcctNo = cbsAcctNo; + } + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/CBSDataPostingBean.java b/IPKS_Updated/src/src/java/DataEntryBean/CBSDataPostingBean.java new file mode 100644 index 0000000..72a8ad5 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/CBSDataPostingBean.java @@ -0,0 +1,75 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Kaushik + */ +public class CBSDataPostingBean { + + private String serialNumber; + private String fileName; + private String uploadStatus; + private String dccbName; + + /** + * @return the serialNumber + */ + public String getSerialNumber() { + return serialNumber; + } + + /** + * @param serialNumber the serialNumber to set + */ + public void setSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + } + + /** + * @return the fileName + */ + public String getFileName() { + return fileName; + } + + /** + * @param fileName the fileName to set + */ + public void setFileName(String fileName) { + this.fileName = fileName; + } + + /** + * @return the uploadStatus + */ + public String getUploadStatus() { + return uploadStatus; + } + + /** + * @param uploadStatus the uploadStatus to set + */ + public void setUploadStatus(String uploadStatus) { + this.uploadStatus = uploadStatus; + } + + /** + * @return the dccbName + */ + public String getDccbName() { + return dccbName; + } + + /** + * @param dccbName the dccbName to set + */ + public void setDccbName(String dccbName) { + this.dccbName = dccbName; + } + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/CashDenoBean.java b/IPKS_Updated/src/src/java/DataEntryBean/CashDenoBean.java new file mode 100644 index 0000000..db09707 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/CashDenoBean.java @@ -0,0 +1,122 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 594267 + */ +public class CashDenoBean { + String deno_2000; + String deno_500; + String deno_200; + String deno_100; + String deno_50; + String deno_20; + String deno_10; + String deno_5; + String deno_2; + String deno_1; + String deno_50p; + String deno_1p; + + public String getDeno_1p() { + return deno_1p; + } + + public void setDeno_1p(String deno_1p) { + this.deno_1p = deno_1p; + } + + public String getDeno_50p() { + return deno_50p; + } + + public void setDeno_50p(String deno_50p) { + this.deno_50p = deno_50p; + } + + public String getDeno_1() { + return deno_1; + } + + public void setDeno_1(String deno_1) { + this.deno_1 = deno_1; + } + + public String getDeno_10() { + return deno_10; + } + + public void setDeno_10(String deno_10) { + this.deno_10 = deno_10; + } + + public String getDeno_100() { + return deno_100; + } + + public void setDeno_100(String deno_100) { + this.deno_100 = deno_100; + } + + public String getDeno_2() { + return deno_2; + } + + public void setDeno_2(String deno_2) { + this.deno_2 = deno_2; + } + + public String getDeno_20() { + return deno_20; + } + + public void setDeno_20(String deno_20) { + this.deno_20 = deno_20; + } + + public String getDeno_200() { + return deno_200; + } + + public void setDeno_200(String deno_200) { + this.deno_200 = deno_200; + } + + public String getDeno_2000() { + return deno_2000; + } + + public void setDeno_2000(String deno_2000) { + this.deno_2000 = deno_2000; + } + + public String getDeno_5() { + return deno_5; + } + + public void setDeno_5(String deno_5) { + this.deno_5 = deno_5; + } + + public String getDeno_50() { + return deno_50; + } + + public void setDeno_50(String deno_50) { + this.deno_50 = deno_50; + } + + public String getDeno_500() { + return deno_500; + } + + public void setDeno_500(String deno_500) { + this.deno_500 = deno_500; + } + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/CashDrawerBean.java b/IPKS_Updated/src/src/java/DataEntryBean/CashDrawerBean.java new file mode 100644 index 0000000..29f54f7 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/CashDrawerBean.java @@ -0,0 +1,197 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 986137 + */ +public class CashDrawerBean { + private String cashDrawerID; + private String txnRefID; + + private String twothouOUT; + private String fivehundredOUT; + private String hundredOUT; + private String fiftyOUT; + private String twentyOUT; + private String tenOUT; + private String fiveOUT; + private String twoOUT; + private String oneOUT; + + private String twothouIN; + private String fivehundredIN; + private String hundredIN; + private String fiftyIN; + private String twentyIN; + private String tenIN; + private String fiveIN; + private String twoIN; + private String oneIN; + + public String getCashDrawerID() { + return cashDrawerID; + } + + public void setCashDrawerID(String cashDrawerID) { + this.cashDrawerID = cashDrawerID; + } + + public String getFiftyIN() { + return fiftyIN; + } + + public void setFiftyIN(String fiftyIN) { + this.fiftyIN = fiftyIN; + } + + public String getFiftyOUT() { + return fiftyOUT; + } + + public void setFiftyOUT(String fiftyOUT) { + this.fiftyOUT = fiftyOUT; + } + + public String getFiveIN() { + return fiveIN; + } + + public void setFiveIN(String fiveIN) { + this.fiveIN = fiveIN; + } + + public String getFiveOUT() { + return fiveOUT; + } + + public void setFiveOUT(String fiveOUT) { + this.fiveOUT = fiveOUT; + } + + public String getFivehundredIN() { + return fivehundredIN; + } + + public void setFivehundredIN(String fivehundredIN) { + this.fivehundredIN = fivehundredIN; + } + + public String getFivehundredOUT() { + return fivehundredOUT; + } + + public void setFivehundredOUT(String fivehundredOUT) { + this.fivehundredOUT = fivehundredOUT; + } + + public String getHundredIN() { + return hundredIN; + } + + public void setHundredIN(String hundredIN) { + this.hundredIN = hundredIN; + } + + public String getHundredOUT() { + return hundredOUT; + } + + public void setHundredOUT(String hundredOUT) { + this.hundredOUT = hundredOUT; + } + + public String getOneIN() { + return oneIN; + } + + public void setOneIN(String oneIN) { + this.oneIN = oneIN; + } + + public String getOneOUT() { + return oneOUT; + } + + public void setOneOUT(String oneOUT) { + this.oneOUT = oneOUT; + } + + public String getTenIN() { + return tenIN; + } + + public void setTenIN(String tenIN) { + this.tenIN = tenIN; + } + + public String getTenOUT() { + return tenOUT; + } + + public void setTenOUT(String tenOUT) { + this.tenOUT = tenOUT; + } + + public String getTwentyIN() { + return twentyIN; + } + + public void setTwentyIN(String twentyIN) { + this.twentyIN = twentyIN; + } + + public String getTwentyOUT() { + return twentyOUT; + } + + public void setTwentyOUT(String twentyOUT) { + this.twentyOUT = twentyOUT; + } + + public String getTwoIN() { + return twoIN; + } + + public void setTwoIN(String twoIN) { + this.twoIN = twoIN; + } + + public String getTwoOUT() { + return twoOUT; + } + + public void setTwoOUT(String twoOUT) { + this.twoOUT = twoOUT; + } + + public String getTwothouIN() { + return twothouIN; + } + + public void setTwothouIN(String twothouIN) { + this.twothouIN = twothouIN; + } + + public String getTwothouOUT() { + return twothouOUT; + } + + public void setTwothouOUT(String twothouOUT) { + this.twothouOUT = twothouOUT; + } + + public String getTxnRefID() { + return txnRefID; + } + + public void setTxnRefID(String txnRefID) { + this.txnRefID = txnRefID; + } + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/CcOdBean.java b/IPKS_Updated/src/src/java/DataEntryBean/CcOdBean.java new file mode 100644 index 0000000..3ececa0 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/CcOdBean.java @@ -0,0 +1,300 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author Administrator + */ +public class CcOdBean +{ + private String account_no; + private String cust_name; + private String acc_type; + private String sub_cat; + private String prod_desc; + private String outstanding; + private String lend_status; + private String intt_accrd; + private String daily_int; + private String lim_amt; + private String lim_date; + private String NPA_date; + private String lim_exp_dt; + private String amt_irr; + private String eff_DP; + private String intt_rate; + private String exp_rate; + private String new_IRAC; + private String landRegister; + + + /** + * @return the account_no + */ + public String getAccount_no() { + return account_no; + } + + /** + * @param account_no the account_no to set + */ + public void setAccount_no(String account_no) { + this.account_no = account_no; + } + + /** + * @return the cust_name + */ + public String getCust_name() { + return cust_name; + } + + /** + * @param cust_name the cust_name to set + */ + public void setCust_name(String cust_name) { + this.cust_name = cust_name; + } + + /** + * @return the acc_type + */ + public String getAcc_type() { + return acc_type; + } + + /** + * @param acc_type the acc_type to set + */ + public void setAcc_type(String acc_type) { + this.acc_type = acc_type; + } + + /** + * @return the sub_cat + */ + public String getSub_cat() { + return sub_cat; + } + + /** + * @param sub_cat the sub_cat to set + */ + public void setSub_cat(String sub_cat) { + this.sub_cat = sub_cat; + } + + /** + * @return the prod_desc + */ + public String getProd_desc() { + return prod_desc; + } + + /** + * @param prod_desc the prod_desc to set + */ + public void setProd_desc(String prod_desc) { + this.prod_desc = prod_desc; + } + + /** + * @return the outstanding + */ + public String getOutstanding() { + return outstanding; + } + + /** + * @param outstanding the outstanding to set + */ + public void setOutstanding(String outstanding) { + this.outstanding = outstanding; + } + + /** + * @return the lend_status + */ + public String getLend_status() { + return lend_status; + } + + /** + * @param lend_status the lend_status to set + */ + public void setLend_status(String lend_status) { + this.lend_status = lend_status; + } + + /** + * @return the intt_accrd + */ + public String getIntt_accrd() { + return intt_accrd; + } + + /** + * @param intt_accrd the intt_accrd to set + */ + public void setIntt_accrd(String intt_accrd) { + this.intt_accrd = intt_accrd; + } + + /** + * @return the daily_int + */ + public String getDaily_int() { + return daily_int; + } + + /** + * @param daily_int the daily_int to set + */ + public void setDaily_int(String daily_int) { + this.daily_int = daily_int; + } + + /** + * @return the lim_amt + */ + public String getLim_amt() { + return lim_amt; + } + + /** + * @param lim_amt the lim_amt to set + */ + public void setLim_amt(String lim_amt) { + this.lim_amt = lim_amt; + } + + /** + * @return the lim_date + */ + public String getLim_date() { + return lim_date; + } + + /** + * @param lim_date the lim_date to set + */ + public void setLim_date(String lim_date) { + this.lim_date = lim_date; + } + + /** + * @return the NPA_date + */ + public String getNPA_date() { + return NPA_date; + } + + /** + * @param NPA_date the NPA_date to set + */ + public void setNPA_date(String NPA_date) { + this.NPA_date = NPA_date; + } + + /** + * @return the lim_exp_dt + */ + public String getLim_exp_dt() { + return lim_exp_dt; + } + + /** + * @param lim_exp_dt the lim_exp_dt to set + */ + public void setLim_exp_dt(String lim_exp_dt) { + this.lim_exp_dt = lim_exp_dt; + } + + /** + * @return the amt_irr + */ + public String getAmt_irr() { + return amt_irr; + } + + /** + * @param amt_irr the amt_irr to set + */ + public void setAmt_irr(String amt_irr) { + this.amt_irr = amt_irr; + } + + /** + * @return the eff_DP + */ + public String getEff_DP() { + return eff_DP; + } + + /** + * @param eff_DP the eff_DP to set + */ + public void setEff_DP(String eff_DP) { + this.eff_DP = eff_DP; + } + + /** + * @return the intt_rate + */ + public String getIntt_rate() { + return intt_rate; + } + + /** + * @param intt_rate the intt_rate to set + */ + public void setIntt_rate(String intt_rate) { + this.intt_rate = intt_rate; + } + + /** + * @return the exp_rate + */ + public String getExp_rate() { + return exp_rate; + } + + /** + * @param exp_rate the exp_rate to set + */ + public void setExp_rate(String exp_rate) { + this.exp_rate = exp_rate; + } + + /** + * @return the new_IRAC + */ + public String getNew_IRAC() { + return new_IRAC; + } + + /** + * @param new_IRAC the new_IRAC to set + */ + public void setNew_IRAC(String new_IRAC) { + this.new_IRAC = new_IRAC; + } + + /** + * @return the landRegister + */ + public String getLandRegister() { + return landRegister; + } + + /** + * @param landRegister the landRegister to set + */ + public void setLandRegister(String landRegister) { + this.landRegister = landRegister; + } +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/ChequeDetailsBean.java b/IPKS_Updated/src/src/java/DataEntryBean/ChequeDetailsBean.java new file mode 100644 index 0000000..449c954 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/ChequeDetailsBean.java @@ -0,0 +1,78 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 1004242 + */ +public class ChequeDetailsBean { + + String chqno ; + String chqDate; + String accNo; + String pacsId; + String chqPostDate; + + public Double getChqAmnt() { + return ChqAmnt; + } + + public void setChqAmnt(Double ChqAmnt) { + this.ChqAmnt = ChqAmnt; + } + + public String getAccNo() { + return accNo; + } + + public void setAccNo(String accNo) { + this.accNo = accNo; + } + + public String getChqBank() { + return chqBank; + } + + public void setChqBank(String chqBank) { + this.chqBank = chqBank; + } + + public String getChqDate() { + return chqDate; + } + + public void setChqDate(String chqDate) { + this.chqDate = chqDate; + } + + public String getChqPostDate() { + return chqPostDate; + } + + public void setChqPostDate(String chqPostDate) { + this.chqPostDate = chqPostDate; + } + + public String getChqno() { + return chqno; + } + + public void setChqno(String chqno) { + this.chqno = chqno; + } + + public String getPacsId() { + return pacsId; + } + + public void setPacsId(String pacsId) { + this.pacsId = pacsId; + } + Double ChqAmnt; + String chqBank; + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/CommodityMasterBean.java b/IPKS_Updated/src/src/java/DataEntryBean/CommodityMasterBean.java new file mode 100644 index 0000000..3669510 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/CommodityMasterBean.java @@ -0,0 +1,169 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Helpdesk10 + */ +public class CommodityMasterBean { + //for create + private String pacsid; + private String commodityId; + private String itemType; + private String itemDesc; + private String subType; + private String subtypeDesc; + private String qtyUnit; + + +//for amend + private String CommodityIdAmend; + private String itemTypeAmend; + private String itemDescAmend; + private String subtypeAmend; + private String subtypeDescAmend; + private String qtyUnitAmend; + private String itemType_Amend; + private String itemDesc_Amend; + + public String getItemType_Amend() { + return itemType_Amend; + } + + public void setItemType_Amend(String itemType_Amend) { + this.itemType_Amend = itemType_Amend; + } + + public String getItemDesc_Amend() { + return itemDesc_Amend; + } + + public void setItemDesc_Amend(String itemDesc_Amend) { + this.itemDesc_Amend = itemDesc_Amend; + } + + + + public String getPacsid() { + return pacsid; + } + + public void setPacsid(String pacsid) { + this.pacsid = pacsid; + } + + public String getCommodityId() { + return commodityId; + } + + public void setCommodityId(String commodityId) { + this.commodityId = commodityId; + } + + + + public String getCommodityIdAmend() { + return CommodityIdAmend; + } + + public void setCommodityIdAmend(String CommodityIdAmend) { + this.CommodityIdAmend = CommodityIdAmend; + } + + + public String getItemType() { + return itemType; + } + + public void setItemType(String itemType) { + this.itemType = itemType; + } + + + public String getSubType() { + return subType; + } + + public void setSubType(String subType) { + this.subType = subType; + } + + public String getSubtypeDesc() { + return subtypeDesc; + } + + public void setSubtypeDesc(String subtypeDesc) { + this.subtypeDesc = subtypeDesc; + } + + public String getQtyUnit() { + return qtyUnit; + } + + public void setQtyUnit(String qtyUnit) { + this.qtyUnit = qtyUnit; + } + + public String getItemTypeAmend() { + return itemTypeAmend; + } + + public void setItemTypeAmend(String itemTypeAmend) { + this.itemTypeAmend = itemTypeAmend; + } + + public String getSubtypeAmend() { + return subtypeAmend; + } + + public void setSubtypeAmend(String subtypeAmend) { + this.subtypeAmend = subtypeAmend; + } + + + + + public String getSubtypeDescAmend() { + return subtypeDescAmend; + } + + public void setSubtypeDescAmend(String subtypeDescAmend) { + this.subtypeDescAmend = subtypeDescAmend; + } + + public String getQtyUnitAmend() { + return qtyUnitAmend; + } + + public void setQtyUnitAmend(String qtyUnitAmend) { + this.qtyUnitAmend = qtyUnitAmend; + } + + public String getItemDesc() { + return itemDesc; + } + + public void setItemDesc(String itemDesc) { + this.itemDesc = itemDesc; + } + + public String getItemDescAmend() { + return itemDescAmend; + } + + public void setItemDescAmend(String itemDescAmend) { + this.itemDescAmend = itemDescAmend; + } + + + + + +} + + + \ No newline at end of file diff --git a/IPKS_Updated/src/src/java/DataEntryBean/CustomerEnrollmentBean.java b/IPKS_Updated/src/src/java/DataEntryBean/CustomerEnrollmentBean.java new file mode 100644 index 0000000..1e7f10a --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/CustomerEnrollmentBean.java @@ -0,0 +1,163 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 1319106 + */ +public class CustomerEnrollmentBean { + //create + private String customer_id; + private String cif_no; + private String name; + private String address; + private String contactperson; + private String phone; + private String checkOption1; + private String gstin; + + //amend + private String nameAmend; + private String addressAmend; + private String contactpersonAmend; + private String phoneAmend; + private String checkOption1Amend; + private String cif_noAmend; + private String namesearch; + private String gstinAmend; + + + public String getGstin() { + return gstin; + } + + public void setGstin(String gstin) { + this.gstin = gstin; + } + + public String getGstinAmend() { + return gstinAmend; + } + + public void setGstinAmend(String gstinAmend) { + this.gstinAmend = gstinAmend; + } + + public String getNamesearch() { + return namesearch; + } + + public void setNamesearch(String namesearch) { + this.namesearch = namesearch; + } + + public String getCif_noAmend() { + return cif_noAmend; + } + + public void setCif_noAmend(String cif_noAmend) { + this.cif_noAmend = cif_noAmend; + } + + public String getCif_no() { + return cif_no; + } + + public void setCif_no(String cif_no) { + this.cif_no = cif_no; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getAddressAmend() { + return addressAmend; + } + + public void setAddressAmend(String addressAmend) { + this.addressAmend = addressAmend; + } + + public String getCheckOption1() { + return checkOption1; + } + + public void setCheckOption1(String checkOption1) { + this.checkOption1 = checkOption1; + } + + public String getCheckOption1Amend() { + return checkOption1Amend; + } + + public void setCheckOption1Amend(String checkOption1Amend) { + this.checkOption1Amend = checkOption1Amend; + } + + public String getContactperson() { + return contactperson; + } + + public void setContactperson(String contactperson) { + this.contactperson = contactperson; + } + + public String getContactpersonAmend() { + return contactpersonAmend; + } + + public void setContactpersonAmend(String contactpersonAmend) { + this.contactpersonAmend = contactpersonAmend; + } + + public String getCustomer_id() { + return customer_id; + } + + public void setCustomer_id(String customer_id) { + this.customer_id = customer_id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getNameAmend() { + return nameAmend; + } + + public void setNameAmend(String nameAmend) { + this.nameAmend = nameAmend; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getPhoneAmend() { + return phoneAmend; + } + + public void setPhoneAmend(String phoneAmend) { + this.phoneAmend = phoneAmend; + } + + +} \ No newline at end of file diff --git a/IPKS_Updated/src/src/java/DataEntryBean/CustomerIdentificationBean.java b/IPKS_Updated/src/src/java/DataEntryBean/CustomerIdentificationBean.java new file mode 100644 index 0000000..4f94da8 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/CustomerIdentificationBean.java @@ -0,0 +1,420 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author Administrator + */ +public class CustomerIdentificationBean { + + private String cif; + private String idype; + private String issueat; + private String remark; + private String fidno; + private String idissuedate; + private String secondid; + private String secondidno; + private String rmanager; + private String homebr; + private String cusevltn; + private String intro; + private String inb; + private String emailid; + private String emailadd; + private String bankref; + private String visadet; + private String visaissueby; + private String visaissuedate; + private String visaexpr; + private String domrisk; + private String countryrisk; + private String borderrisk; + private String segment; + private String locker; + private String cis; + private String tfn; + + /** + * @return the idype + */ + public String getIdype() { + return idype; + } + + /** + * @param idype the idype to set + */ + public void setIdype(String idype) { + this.idype = idype; + } + + /** + * @return the issueat + */ + public String getIssueat() { + return issueat; + } + + /** + * @param issueat the issueat to set + */ + public void setIssueat(String issueat) { + this.issueat = issueat; + } + + /** + * @return the remark + */ + public String getRemark() { + return remark; + } + + /** + * @param remark the remark to set + */ + public void setRemark(String remark) { + this.remark = remark; + } + + /** + * @return the fidno + */ + public String getFidno() { + return fidno; + } + + /** + * @param fidno the fidno to set + */ + public void setFidno(String fidno) { + this.fidno = fidno; + } + + /** + * @return the idissuedate + */ + public String getIdissuedate() { + return idissuedate; + } + + /** + * @param idissuedate the idissuedate to set + */ + public void setIdissuedate(String idissuedate) { + this.idissuedate = idissuedate; + } + + /** + * @return the secondid + */ + public String getSecondid() { + return secondid; + } + + /** + * @param secondid the secondid to set + */ + public void setSecondid(String secondid) { + this.secondid = secondid; + } + + /** + * @return the secondidno + */ + public String getSecondidno() { + return secondidno; + } + + /** + * @param secondidno the secondidno to set + */ + public void setSecondidno(String secondidno) { + this.secondidno = secondidno; + } + + /** + * @return the rmanager + */ + public String getRmanager() { + return rmanager; + } + + /** + * @param rmanager the rmanager to set + */ + public void setRmanager(String rmanager) { + this.rmanager = rmanager; + } + + /** + * @return the homebr + */ + public String getHomebr() { + return homebr; + } + + /** + * @param homebr the homebr to set + */ + public void setHomebr(String homebr) { + this.homebr = homebr; + } + + /** + * @return the cusevltn + */ + public String getCusevltn() { + return cusevltn; + } + + /** + * @param cusevltn the cusevltn to set + */ + public void setCusevltn(String cusevltn) { + this.cusevltn = cusevltn; + } + + /** + * @return the intro + */ + public String getIntro() { + return intro; + } + + /** + * @param intro the intro to set + */ + public void setIntro(String intro) { + this.intro = intro; + } + + /** + * @return the inb + */ + public String getInb() { + return inb; + } + + /** + * @param inb the inb to set + */ + public void setInb(String inb) { + this.inb = inb; + } + + /** + * @return the emailid + */ + public String getEmailid() { + return emailid; + } + + /** + * @param emailid the emailid to set + */ + public void setEmailid(String emailid) { + this.emailid = emailid; + } + + /** + * @return the emailadd + */ + public String getEmailadd() { + return emailadd; + } + + /** + * @param emailadd the emailadd to set + */ + public void setEmailadd(String emailadd) { + this.emailadd = emailadd; + } + + /** + * @return the bankref + */ + public String getBankref() { + return bankref; + } + + /** + * @param bankref the bankref to set + */ + public void setBankref(String bankref) { + this.bankref = bankref; + } + + /** + * @return the visadet + */ + public String getVisadet() { + return visadet; + } + + /** + * @param visadet the visadet to set + */ + public void setVisadet(String visadet) { + this.visadet = visadet; + } + + /** + * @return the visaissueby + */ + public String getVisaissueby() { + return visaissueby; + } + + /** + * @param visaissueby the visaissueby to set + */ + public void setVisaissueby(String visaissueby) { + this.visaissueby = visaissueby; + } + + /** + * @return the visaissuedate + */ + public String getVisaissuedate() { + return visaissuedate; + } + + /** + * @param visaissuedate the visaissuedate to set + */ + public void setVisaissuedate(String visaissuedate) { + this.visaissuedate = visaissuedate; + } + + /** + * @return the visaexpr + */ + public String getVisaexpr() { + return visaexpr; + } + + /** + * @param visaexpr the visaexpr to set + */ + public void setVisaexpr(String visaexpr) { + this.visaexpr = visaexpr; + } + + /** + * @return the domrisk + */ + public String getDomrisk() { + return domrisk; + } + + /** + * @param domrisk the domrisk to set + */ + public void setDomrisk(String domrisk) { + this.domrisk = domrisk; + } + + /** + * @return the countryrisk + */ + public String getCountryrisk() { + return countryrisk; + } + + /** + * @param countryrisk the countryrisk to set + */ + public void setCountryrisk(String countryrisk) { + this.countryrisk = countryrisk; + } + + /** + * @return the borderrisk + */ + public String getBorderrisk() { + return borderrisk; + } + + /** + * @param borderrisk the borderrisk to set + */ + public void setBorderrisk(String borderrisk) { + this.borderrisk = borderrisk; + } + + /** + * @return the segment + */ + public String getSegment() { + return segment; + } + + /** + * @param segment the segment to set + */ + public void setSegment(String segment) { + this.segment = segment; + } + + /** + * @return the locker + */ + public String getLocker() { + return locker; + } + + /** + * @param locker the locker to set + */ + public void setLocker(String locker) { + this.locker = locker; + } + + /** + * @return the cis + */ + public String getCis() { + return cis; + } + + /** + * @param cis the cis to set + */ + public void setCis(String cis) { + this.cis = cis; + } + + /** + * @return the tfn + */ + public String getTfn() { + return tfn; + } + + /** + * @param tfn the tfn to set + */ + public void setTfn(String tfn) { + this.tfn = tfn; + } + + /** + * @return the cif + */ + public String getCif() { + return cif; + } + + /** + * @param cif the cif to set + */ + public void setCif(String cif) { + this.cif = cif; + } + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/CustomerInfBean.java b/IPKS_Updated/src/src/java/DataEntryBean/CustomerInfBean.java new file mode 100644 index 0000000..e717f9b --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/CustomerInfBean.java @@ -0,0 +1,437 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author SUBHAM + */ +public class CustomerInfBean { + + private String cif; + private String ctype; + private String title; + private String fname; + private String mname; + private String lname; + private String fsname; + private String mthname; + private String flatno; + private String streetname; + private String localityname; + private String distname; + private String cityname; + private String statename; + private String countryname; + private String postcode; + private String language; + private String phhome; + private String dob; + private String phbusiness; + private String gencode; + private String mob; + private String mstatus; + private String fax; + private String nationality; + private String domicile; + private String occupation; + private String resstatus; + + //Getters and Setters + + /** + * @return the ctype + */ + public String getCtype() { + return ctype; + } + + /** + * @param ctype the ctype to set + */ + public void setCtype(String ctype) { + this.ctype = ctype; + } + + /** + * @return the title + */ + public String getTitle() { + return title; + } + + /** + * @param title the title to set + */ + public void setTitle(String title) { + this.title = title; + } + + /** + * @return the fname + */ + public String getFname() { + return fname; + } + + /** + * @param fname the fname to set + */ + public void setFname(String fname) { + this.fname = fname; + } + + /** + * @return the mname + */ + public String getMname() { + return mname; + } + + /** + * @param mname the mname to set + */ + public void setMname(String mname) { + this.mname = mname; + } + + /** + * @return the lname + */ + public String getLname() { + return lname; + } + + /** + * @param lname the lname to set + */ + public void setLname(String lname) { + this.lname = lname; + } + + /** + * @return the fsname + */ + public String getFsname() { + return fsname; + } + + /** + * @param fsname the fsname to set + */ + public void setFsname(String fsname) { + this.fsname = fsname; + } + + /** + * @return the mthname + */ + public String getMthname() { + return mthname; + } + + /** + * @param mthname the mthname to set + */ + public void setMthname(String mthname) { + this.mthname = mthname; + } + + /** + * @return the flatno + */ + public String getFlatno() { + return flatno; + } + + /** + * @param flatno the flatno to set + */ + public void setFlatno(String flatno) { + this.flatno = flatno; + } + + /** + * @return the streetname + */ + public String getStreetname() { + return streetname; + } + + /** + * @param streetname the streetname to set + */ + public void setStreetname(String streetname) { + this.streetname = streetname; + } + + /** + * @return the localityname + */ + public String getLocalityname() { + return localityname; + } + + /** + * @param localityname the localityname to set + */ + public void setLocalityname(String localityname) { + this.localityname = localityname; + } + + /** + * @return the distname + */ + public String getDistname() { + return distname; + } + + /** + * @param distname the distname to set + */ + public void setDistname(String distname) { + this.distname = distname; + } + + /** + * @return the cityname + */ + public String getCityname() { + return cityname; + } + + /** + * @param cityname the cityname to set + */ + public void setCityname(String cityname) { + this.cityname = cityname; + } + + /** + * @return the statename + */ + public String getStatename() { + return statename; + } + + /** + * @param statename the statename to set + */ + public void setStatename(String statename) { + this.statename = statename; + } + + /** + * @return the countryname + */ + public String getCountryname() { + return countryname; + } + + /** + * @param countryname the countryname to set + */ + public void setCountryname(String countryname) { + this.countryname = countryname; + } + + /** + * @return the postcode + */ + public String getPostcode() { + return postcode; + } + + /** + * @param postcode the postcode to set + */ + public void setPostcode(String postcode) { + this.postcode = postcode; + } + + /** + * @return the language + */ + public String getLanguage() { + return language; + } + + /** + * @param language the language to set + */ + public void setLanguage(String language) { + this.language = language; + } + + /** + * @return the phhome + */ + public String getPhhome() { + return phhome; + } + + /** + * @param phhome the phhome to set + */ + public void setPhhome(String phhome) { + this.phhome = phhome; + } + + /** + * @return the dob + */ + public String getDob() { + return dob; + } + + /** + * @param dob the dob to set + */ + public void setDob(String dob) { + this.dob = dob; + } + + /** + * @return the phbusiness + */ + public String getPhbusiness() { + return phbusiness; + } + + /** + * @param phbusiness the phbusiness to set + */ + public void setPhbusiness(String phbusiness) { + this.phbusiness = phbusiness; + } + + /** + * @return the gencode + */ + public String getGencode() { + return gencode; + } + + /** + * @param gencode the gencode to set + */ + public void setGencode(String gencode) { + this.gencode = gencode; + } + + /** + * @return the mob + */ + public String getMob() { + return mob; + } + + /** + * @param mob the mob to set + */ + public void setMob(String mob) { + this.mob = mob; + } + + /** + * @return the mstatus + */ + public String getMstatus() { + return mstatus; + } + + /** + * @param mstatus the mstatus to set + */ + public void setMstatus(String mstatus) { + this.mstatus = mstatus; + } + + /** + * @return the fax + */ + public String getFax() { + return fax; + } + + /** + * @param fax the fax to set + */ + public void setFax(String fax) { + this.fax = fax; + } + + /** + * @return the nationality + */ + public String getNationality() { + return nationality; + } + + /** + * @param nationality the nationality to set + */ + public void setNationality(String nationality) { + this.nationality = nationality; + } + + /** + * @return the domicile + */ + public String getDomicile() { + return domicile; + } + + /** + * @param domicile the domicile to set + */ + public void setDomicile(String domicile) { + this.domicile = domicile; + } + + /** + * @return the occupation + */ + public String getOccupation() { + return occupation; + } + + /** + * @param occupation the occupation to set + */ + public void setOccupation(String occupation) { + this.occupation = occupation; + } + + /** + * @return the resstatus + */ + public String getResstatus() { + return resstatus; + } + + /** + * @param resstatus the resstatus to set + */ + public void setResstatus(String resstatus) { + this.resstatus = resstatus; + } + + /** + * @return the cif + */ + public String getCif() { + return cif; + } + + /** + * @param cif the cif to set + */ + public void setCif(String cif) { + this.cif = cif; + } + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/DepositAccountCreationBean.java b/IPKS_Updated/src/src/java/DataEntryBean/DepositAccountCreationBean.java new file mode 100644 index 0000000..a88ac25 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/DepositAccountCreationBean.java @@ -0,0 +1,629 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Shubhrangshu + */ +public class DepositAccountCreationBean { + private String productCode; + private String inttCategory; + private String segmentCode; + private String cifNumber; + private String cbsSavingsAccount; + private String limit; + private String limitExpiryDate; + private String collateralType; + private String landinAcres; + private String description; + private String currentValuation; + private String safeLendingMargin; + private String activityCode; + private String customerType; + private String dep_product_id; + private String inttDescription; + private String productName; + private String id; + + private String accOpenDate; + private String ODlimit; + private String inttrepmethod; + private String intttransacc; + private String termValue; + private String termYears; + private String termMonth; + private String termDays; + private String instAmt; + private String memberno; + private String cifNumber2; + private String cifName; + private String cifName2; + private String nominee; + private String nomineeName; +/*Added New Fileds by bitan For multiple CIF to same Dep Account*/ + private String jt_cifNumber1; + private String jt_cifNumber2; + private String jt_cifNumber3; + private String jt_cifNumber4; + private String jt_cifNumber5; + private String jt_cifNumber6; + private String jt_cifNumber7; + private String jt_cifNumber8; + private String jt_cifNumber9; + private String jt_cifNumber10; + + private String jt_cifName1; + private String jt_cifName2; + private String jt_cifName3; + private String jt_cifName4; + private String jt_cifName5; + private String jt_cifName6; + private String jt_cifName7; + private String jt_cifName8; + private String jt_cifName9; + private String jt_cifName10; + private String intRate; + private String penIntRate; + + public String getIntRate() { + return intRate; + } + + public void setIntRate(String intRate) { + this.intRate = intRate; + } + + public String getPenIntRate() { + return penIntRate; + } + + public void setPenIntRate(String penIntRate) { + this.penIntRate = penIntRate; + } + /*END*/ + public String getNomineeName() { + return nomineeName; + } + + public void setNomineeName(String nomineeName) { + this.nomineeName = nomineeName; + } + + public String getNominee() { + return nominee; + } + + public void setNominee(String nominee) { + this.nominee = nominee; + } + + public String getCifName() { + return cifName; + } + + public void setCifName(String cifName) { + this.cifName = cifName; + } + + public String getCifName2() { + return cifName2; + } + + public void setCifName2(String cifName2) { + this.cifName2 = cifName2; + } + + public String getCifNumber2() { + return cifNumber2; + } + + public void setCifNumber2(String cifNumber2) { + this.cifNumber2 = cifNumber2; + } + + public String getMemberno() { + return memberno; + } + + public void setMemberno(String memberno) { + this.memberno = memberno; + } + + public String getInstAmt() { + return instAmt; + } + + public void setInstAmt(String instAmt) { + this.instAmt = instAmt; + } + + public String getTermDays() { + return termDays; + } + + public void setTermDays(String termDays) { + this.termDays = termDays; + } + + public String getTermMonth() { + return termMonth; + } + + public void setTermMonth(String termMonth) { + this.termMonth = termMonth; + } + + public String getTermYears() { + return termYears; + } + + public void setTermYears(String termYears) { + this.termYears = termYears; + } + + + + public String getTermValue() { + return termValue; + } + + public void setTermValue(String termValue) { + this.termValue = termValue; + } + + + + public String getInttrepmethod() { + return inttrepmethod; + } + + public void setInttrepmethod(String inttrepmethod) { + this.inttrepmethod = inttrepmethod; + } + + public String getIntttransacc() { + return intttransacc; + } + + public void setIntttransacc(String intttransacc) { + this.intttransacc = intttransacc; + } + + + + public String getAccOpenDate() { + return accOpenDate; + } + + public void setAccOpenDate(String accOpenDate) { + this.accOpenDate = accOpenDate; + } + + public String getODlimit() { + return ODlimit; + } + + public void setODlimit(String ODlimit) { + this.ODlimit = ODlimit; + } + + + + + /** + * @return the productCode + */ + public String getProductCode() { + return productCode; + } + + /** + * @param productCode the productCode to set + */ + public void setProductCode(String productCode) { + this.productCode = productCode; + } + + /** + * @return the inttCategory + */ + public String getInttCategory() { + return inttCategory; + } + + /** + * @param inttCategory the inttCategory to set + */ + public void setInttCategory(String inttCategory) { + this.inttCategory = inttCategory; + } + + /** + * @return the segmentCode + */ + public String getSegmentCode() { + return segmentCode; + } + + /** + * @param segmentCode the segmentCode to set + */ + public void setSegmentCode(String segmentCode) { + this.segmentCode = segmentCode; + } + + /** + * @return the cifNumber + */ + public String getCifNumber() { + return cifNumber; + } + + /** + * @param cifNumber the cifNumber to set + */ + public void setCifNumber(String cifNumber) { + this.cifNumber = cifNumber; + } + + /** + * @return the cbsSavingsAccount + */ + public String getCbsSavingsAccount() { + return cbsSavingsAccount; + } + + /** + * @param cbsSavingsAccount the cbsSavingsAccount to set + */ + public void setCbsSavingsAccount(String cbsSavingsAccount) { + this.cbsSavingsAccount = cbsSavingsAccount; + } + + /** + * @return the limit + */ + public String getLimit() { + return limit; + } + + /** + * @param limit the limit to set + */ + public void setLimit(String limit) { + this.limit = limit; + } + + /** + * @return the limitExpiryDate + */ + public String getLimitExpiryDate() { + return limitExpiryDate; + } + + /** + * @param limitExpiryDate the limitExpiryDate to set + */ + public void setLimitExpiryDate(String limitExpiryDate) { + this.limitExpiryDate = limitExpiryDate; + } + + /** + * @return the collateralType + */ + public String getCollateralType() { + return collateralType; + } + + /** + * @param collateralType the collateralType to set + */ + public void setCollateralType(String collateralType) { + this.collateralType = collateralType; + } + + /** + * @return the landinAcres + */ + public String getLandinAcres() { + return landinAcres; + } + + /** + * @param landinAcres the landinAcres to set + */ + public void setLandinAcres(String landinAcres) { + this.landinAcres = landinAcres; + } + + /** + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * @param description the description to set + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * @return the currentValuation + */ + public String getCurrentValuation() { + return currentValuation; + } + + /** + * @param currentValuation the currentValuation to set + */ + public void setCurrentValuation(String currentValuation) { + this.currentValuation = currentValuation; + } + + /** + * @return the safeLendingMargin + */ + public String getSafeLendingMargin() { + return safeLendingMargin; + } + + /** + * @param safeLendingMargin the safeLendingMargin to set + */ + public void setSafeLendingMargin(String safeLendingMargin) { + this.safeLendingMargin = safeLendingMargin; + } + + /** + * @return the activityCode + */ + public String getActivityCode() { + return activityCode; + } + + /** + * @param activityCode the activityCode to set + */ + public void setActivityCode(String activityCode) { + this.activityCode = activityCode; + } + + public String getCustomerType() { + return customerType; + } + + /** + * @param customerType the customerType to set + */ + public void setCustomerType(String customerType) { + this.customerType = customerType; + } + + /** + * @return the dep_product_id + */ + public String getDep_product_id() { + return dep_product_id; + } + + /** + * @param dep_product_id the dep_product_id to set + */ + public void setDep_product_id(String dep_product_id) { + this.dep_product_id = dep_product_id; + } + + /** + * @return the inttDescription + */ + public String getInttDescription() { + return inttDescription; + } + + /** + * @param inttDescription the inttDescription to set + */ + public void setInttDescription(String inttDescription) { + this.inttDescription = inttDescription; + } + + /** + * @return the productName + */ + public String getProductName() { + return productName; + } + + /** + * @param productName the productName to set + */ + public void setProductName(String productName) { + this.productName = productName; + } + + /** + * @return the id + */ + public String getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(String id) { + this.id = id; + } + + public String getJt_cifNumber1() { + return jt_cifNumber1; + } + + + public String getJt_cifNumber2() { + return jt_cifNumber2; + } + + public String getJt_cifNumber3() { + return jt_cifNumber3; + } + + public String getJt_cifNumber4() { + return jt_cifNumber4; + } + + public String getJt_cifNumber5() { + return jt_cifNumber5; + } + + public String getJt_cifNumber6() { + return jt_cifNumber6; + } + + public String getJt_cifNumber7() { + return jt_cifNumber7; + } + + public String getJt_cifNumber8() { + return jt_cifNumber8; + } + + public String getJt_cifNumber9() { + return jt_cifNumber9; + } + + public String getJt_cifNumber10() { + return jt_cifNumber10; + } + + + public void setJt_cifNumber1(String jt_cifNumber1) { + this.jt_cifNumber1 = jt_cifNumber1; + } + + public void setJt_cifNumber2(String jt_cifNumber2) { + this.jt_cifNumber2 = jt_cifNumber2; + } + + public void setJt_cifNumber3(String jt_cifNumber3) { + this.jt_cifNumber3 = jt_cifNumber3; + } + + public void setJt_cifNumber4(String jt_cifNumber4) { + this.jt_cifNumber4 = jt_cifNumber4; + } + + public void setJt_cifNumber5(String jt_cifNumber5) { + this.jt_cifNumber5 = jt_cifNumber5; + } + + public void setJt_cifNumber6(String jt_cifNumber6) { + this.jt_cifNumber6 = jt_cifNumber6; + } + + public void setJt_cifNumber7(String jt_cifNumber7) { + this.jt_cifNumber7 = jt_cifNumber7; + } + + public void setJt_cifNumber8(String jt_cifNumber8) { + this.jt_cifNumber8 = jt_cifNumber8; + } + + public void setJt_cifNumber9(String jt_cifNumber9) { + this.jt_cifNumber9 = jt_cifNumber9; + } + + public void setJt_cifNumber10(String jt_cifNumber10) { + this.jt_cifNumber10 = jt_cifNumber10; + } + + public String getJt_cifName1() { + return jt_cifName1; + } + + public String getJt_cifName10() { + return jt_cifName10; + } + + public String getJt_cifName2() { + return jt_cifName2; + } + + public String getJt_cifName3() { + return jt_cifName3; + } + + public String getJt_cifName4() { + return jt_cifName4; + } + + public String getJt_cifName5() { + return jt_cifName5; + } + + public String getJt_cifName6() { + return jt_cifName6; + } + + public String getJt_cifName7() { + return jt_cifName7; + } + + public String getJt_cifName8() { + return jt_cifName8; + } + + public String getJt_cifName9() { + return jt_cifName9; + } + + public void setJt_cifName1(String jt_cifName1) { + this.jt_cifName1 = jt_cifName1; + } + + public void setJt_cifName10(String jt_cifName10) { + this.jt_cifName10 = jt_cifName10; + } + + public void setJt_cifName2(String jt_cifName2) { + this.jt_cifName2 = jt_cifName2; + } + + public void setJt_cifName3(String jt_cifName3) { + this.jt_cifName3 = jt_cifName3; + } + + public void setJt_cifName4(String jt_cifName4) { + this.jt_cifName4 = jt_cifName4; + } + + public void setJt_cifName5(String jt_cifName5) { + this.jt_cifName5 = jt_cifName5; + } + + public void setJt_cifName6(String jt_cifName6) { + this.jt_cifName6 = jt_cifName6; + } + + public void setJt_cifName7(String jt_cifName7) { + this.jt_cifName7 = jt_cifName7; + } + + public void setJt_cifName8(String jt_cifName8) { + this.jt_cifName8 = jt_cifName8; + } + + public void setJt_cifName9(String jt_cifName9) { + this.jt_cifName9 = jt_cifName9; + } + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/DepositKYCCreationDetailBean.java b/IPKS_Updated/src/src/java/DataEntryBean/DepositKYCCreationDetailBean.java new file mode 100644 index 0000000..d758c11 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/DepositKYCCreationDetailBean.java @@ -0,0 +1,168 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author 986137 + */ +public class DepositKYCCreationDetailBean { + + private String idType; + private String idNumber; + private String idIssueDate; + private String idIssueAt; + private String KYCCreation_dtl_id; + private String document_mst_id; + private String scanImg; + + + //For Update + + private String idTypeAmend; + private String idNumberAmend; + private String idIssueDateAmend; + private String idIssueAtAmend; + private String document_mst_idAmend; + private String IDScoreAmend; + private String IDScore; + + public String getScanImg() { + return scanImg; + } + + public void setScanImg(String scanImg) { + this.scanImg = scanImg; + } + + public String getIDScore() { + return IDScore; + } + + public void setIDScore(String IDScore) { + this.IDScore = IDScore; + } + + + public String getDocument_mst_id() { + return document_mst_id; + } + + public void setDocument_mst_id(String document_mst_id) { + this.document_mst_id = document_mst_id; + } + + public String getKYCCreation_dtl_id() { + return KYCCreation_dtl_id; + } + + public void setKYCCreation_dtl_id(String KYCCreation_dtl_id) { + this.KYCCreation_dtl_id = KYCCreation_dtl_id; + } + + public String getIdType() { + return idType; + } + + /** + * @param idType the idType to set + */ + public void setIdType(String idType) { + this.idType = idType; + } + + /** + * @return the idNumber + */ + public String getIdNumber() { + return idNumber; + } + + /** + * @param idNumber the idNumber to set + */ + public void setIdNumber(String idNumber) { + this.idNumber = idNumber; + } + + /** + * @return the idIssueDate + */ + public String getIdIssueDate() { + return idIssueDate; + } + + /** + * @param idIssueDate the idIssueDate to set + */ + public void setIdIssueDate(String idIssueDate) { + this.idIssueDate = idIssueDate; + } + + /** + * @return the idIssueAt + */ + public String getIdIssueAt() { + return idIssueAt; + } + + /** + * @param idIssueAt the idIssueAt to set + */ + public void setIdIssueAt(String idIssueAt) { + this.idIssueAt = idIssueAt; + } + + public String getIDScoreAmend() { + return IDScoreAmend; + } + + public void setIDScoreAmend(String IDScoreAmend) { + this.IDScoreAmend = IDScoreAmend; + } + + public String getDocument_mst_idAmend() { + return document_mst_idAmend; + } + + public void setDocument_mst_idAmend(String document_mst_idAmend) { + this.document_mst_idAmend = document_mst_idAmend; + } + + public String getIdIssueAtAmend() { + return idIssueAtAmend; + } + + public void setIdIssueAtAmend(String idIssueAtAmend) { + this.idIssueAtAmend = idIssueAtAmend; + } + + public String getIdIssueDateAmend() { + return idIssueDateAmend; + } + + public void setIdIssueDateAmend(String idIssueDateAmend) { + this.idIssueDateAmend = idIssueDateAmend; + } + + public String getIdNumberAmend() { + return idNumberAmend; + } + + public void setIdNumberAmend(String idNumberAmend) { + this.idNumberAmend = idNumberAmend; + } + + public String getIdTypeAmend() { + return idTypeAmend; + } + + public void setIdTypeAmend(String idTypeAmend) { + this.idTypeAmend = idTypeAmend; + } + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/DepositKYCCreationHdrBean.java b/IPKS_Updated/src/src/java/DataEntryBean/DepositKYCCreationHdrBean.java new file mode 100644 index 0000000..02576c1 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/DepositKYCCreationHdrBean.java @@ -0,0 +1,657 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author TCS + */ +public class DepositKYCCreationHdrBean { + + private String cif; + private String cType; + private String linkedAccount; + private String title; + private String fName; + private String mName; + private String lName; + private String gName; + private String add1; + private String add2; + private String add3; + private String distname; + private String city; + private String statename; + private String dob; + private String gender; + private String religion; + private String caste; + private String mNumber; + private String block; + private String nameOfFile; + private String file; + private String motherName; + private String pin; + private String ward; //Added for member share report + + public String getEmailId() { + return emailId; + } + + public void setEmailId(String emailId) { + this.emailId = emailId; + } + private String sigUpld; + private String emailId; + + //for update + private String cifNoAmend; + private String cTypeAmend; + private String linkedAccountAmend; + private String tittleAmend; + private String fNameAmend; + private String mNameAmend; + private String lNameAmend; + private String gNameAmend; + private String add1Amend; + private String add2Amend; + private String add3Amend; + private String distnameAmend; + private String citynameAmend; + private String statenameAmend; + private String dobAmend; + private String genderAmend; + private String religionAmend; + private String casteAmend; + private String mNumberAmend; + private String blockAmend; + private String mem_no; + private String farmerType; + private String cifName;//used in DepositKYCDocumentUpload.jsp + private String mem_noAmend; + private String farmerTypeAmend; + private String bankCIF; + private String aliveDead; + private String doDeath; + private String lstatus; + private String motherNameAmend; + private String pinAmend; + private String wardAmend; // Added for meber share report + + public String getwardAmend(){ + return wardAmend; + } + + public void setwardAmend(String wardAmend) + { + this.wardAmend = wardAmend; + } + + public String getMotherName() { + return motherName; + } + + public void setMotherName(String motherName) { + this.motherName = motherName; + } + + public String getPin() { + return pin; + } + + public void setPin(String pin) { + this.pin = pin; + } + + public String getMotherNameAmend() { + return motherNameAmend; + } + + public void setMotherNameAmend(String motherNameAmend) { + this.motherNameAmend = motherNameAmend; + } + + public String getPinAmend() { + return pinAmend; + } + + public void setPinAmend(String pinAmend) { + this.pinAmend = pinAmend; + } + + public String getLstatus() { + return lstatus; + } + + public void setLstatus(String lstatus) { + this.lstatus = lstatus; + } + + public String getAliveDead() { + return aliveDead; + } + + public void setAliveDead(String AliveDead) { + this.aliveDead = AliveDead; + } + + public String getBankCIF() { + return bankCIF; + } + + public void setBankCIF(String bankCIF) { + this.bankCIF = bankCIF; + } + + public String getDoDeath() { + return doDeath; + } + + public void setDoDeath(String doDeath) { + this.doDeath = doDeath; + } + + public String getFarmerTypeAmend() { + return farmerTypeAmend; + } + + public void setFarmerTypeAmend(String farmerTypeAmend) { + this.farmerTypeAmend = farmerTypeAmend; + } + + public String getMem_noAmend() { + return mem_noAmend; + } + + public void setMem_noAmend(String mem_noAmend) { + this.mem_noAmend = mem_noAmend; + } + + public String getFarmerType() { + return farmerType; + } + + public void setFarmerType(String farmerType) { + this.farmerType = farmerType; + } + + public String getMem_no() { + return mem_no; + } + + public void setMem_no(String mem_no) { + this.mem_no = mem_no; + } + public String getCasteAmend() { + return casteAmend; + } + + public void setCasteAmend(String casteAmend) { + this.casteAmend = casteAmend; + } + + public String getReligionAmend() { + return religionAmend; + } + + public void setReligionAmend(String religionAmend) { + this.religionAmend = religionAmend; + } + + public String getCaste() { + return caste; + } + + public void setCaste(String caste) { + this.caste = caste; + } + + public String getReligion() { + return religion; + } + + public void setReligion(String religion) { + this.religion = religion; + } + + public String getSigUpld() { + return sigUpld; + } + + public void setSigUpld(String sigUpld) { + this.sigUpld = sigUpld; + } + + public String getFile() { + return file; + } + + public void setFile(String file) { + this.file = file; + } + + public String getNameOfFile() { + return nameOfFile; + } + + public void setNameOfFile(String nameOfFile) { + this.nameOfFile = nameOfFile; + } + + + public String getCifName() { + return cifName; + } + + public void setCifName(String cifName) { + this.cifName = cifName; + } + + public String getBlock() { + return block; + } + + /** + * @return the idType + */ + public void setBlock(String block) { + this.block = block; + } + + public String getWard() + { + return ward; + } + + public void setWard(String ward){ + this.ward = ward; + } + /** + * @return the cif + */ + public String getCif() { + return cif; + } + + /** + * @param cif the cif to set + */ + public void setCif(String cif) { + this.cif = cif; + } + + /** + * @return the cType + */ + public String getcType() { + return cType; + } + + /** + * @param cType the cType to set + */ + public void setcType(String cType) { + this.cType = cType; + } + + /** + * @return the linkedAccount + */ + public String getLinkedAccount() { + return linkedAccount; + } + + /** + * @param linkedAccount the linkedAccount to set + */ + public void setLinkedAccount(String linkedAccount) { + this.linkedAccount = linkedAccount; + } + + /** + * @return the tittle + */ + public String getTitle() { + return title; + } + + /** + * @param tittle the tittle to set + */ + public void setTitle(String title) { + this.title = title; + } + + /** + * @return the fName + */ + public String getfName() { + return fName; + } + + /** + * @param fName the fName to set + */ + public void setfName(String fName) { + this.fName = fName; + } + + /** + * @return the mName + */ + public String getmName() { + return mName; + } + + /** + * @param mName the mName to set + */ + public void setmName(String mName) { + this.mName = mName; + } + + /** + * @return the lName + */ + public String getlName() { + return lName; + } + + /** + * @param lName the lName to set + */ + public void setlName(String lName) { + this.lName = lName; + } + + /** + * @return the gName + */ + public String getgName() { + return gName; + } + + /** + * @param gName the gName to set + */ + public void setgName(String gName) { + this.gName = gName; + } + + /** + * @return the add1 + */ + public String getAdd1() { + return add1; + } + + /** + * @param add1 the add1 to set + */ + public void setAdd1(String add1) { + this.add1 = add1; + } + + /** + * @return the add2 + */ + public String getAdd2() { + return add2; + } + + /** + * @param add2 the add2 to set + */ + public void setAdd2(String add2) { + this.add2 = add2; + } + + /** + * @return the add3 + */ + public String getAdd3() { + return add3; + } + + /** + * @param add3 the add3 to set + */ + public void setAdd3(String add3) { + this.add3 = add3; + } + + /** + * @return the distname + */ + public String getDistname() { + return distname; + } + + /** + * @param distname the distname to set + */ + public void setDistname(String distname) { + this.distname = distname; + } + + /** + * @return the cityname + */ + public String getCity() { + return city; + } + + /** + * @param cityname the cityname to set + */ + public void setCity(String city) { + this.city = city; + } + + /** + * @return the statename + */ + public String getStatename() { + return statename; + } + + /** + * @param statename the statename to set + */ + public void setStatename(String statename) { + this.statename = statename; + } + + /** + * @return the dob + */ + public String getDob() { + return dob; + } + + /** + * @param dob the dob to set + */ + public void setDob(String dob) { + this.dob = dob; + } + + /** + * @return the gender + */ + public String getGender() { + return gender; + } + + /** + * @param gender the gender to set + */ + public void setGender(String gender) { + this.gender = gender; + } + + /** + * @return the mNumber + */ + public String getmNumber() { + return mNumber; + } + + /** + * @param mNumber the mNumber to set + */ + public void setmNumber(String mNumber) { + this.mNumber = mNumber; + } + + public String getAdd1Amend() { + return add1Amend; + } + + public void setAdd1Amend(String add1Amend) { + this.add1Amend = add1Amend; + } + + public String getAdd2Amend() { + return add2Amend; + } + + public void setAdd2Amend(String add2Amend) { + this.add2Amend = add2Amend; + } + + public String getAdd3Amend() { + return add3Amend; + } + + public void setAdd3Amend(String add3Amend) { + this.add3Amend = add3Amend; + } + + public String getBlockAmend() { + return blockAmend; + } + + public void setBlockAmend(String blockAmend) { + this.blockAmend = blockAmend; + } + + public String getcTypeAmend() { + return cTypeAmend; + } + + public void setcTypeAmend(String cTypeAmend) { + this.cTypeAmend = cTypeAmend; + } + + public String getCifNoAmend() { + return cifNoAmend; + } + + public void setCifNoAmend(String cifNoAmend) { + this.cifNoAmend = cifNoAmend; + } + + public String getCitynameAmend() { + return citynameAmend; + } + + public void setCitynameAmend(String citynameAmend) { + this.citynameAmend = citynameAmend; + } + + public String getDistnameAmend() { + return distnameAmend; + } + + public void setDistnameAmend(String distnameAmend) { + this.distnameAmend = distnameAmend; + } + + public String getDobAmend() { + return dobAmend; + } + + public void setDobAmend(String dobAmend) { + this.dobAmend = dobAmend; + } + + public String getfNameAmend() { + return fNameAmend; + } + + public void setfNameAmend(String fNameAmend) { + this.fNameAmend = fNameAmend; + } + + public String getgNameAmend() { + return gNameAmend; + } + + public void setgNameAmend(String gNameAmend) { + this.gNameAmend = gNameAmend; + } + + public String getGenderAmend() { + return genderAmend; + } + + public void setGenderAmend(String genderAmend) { + this.genderAmend = genderAmend; + } + + public String getlNameAmend() { + return lNameAmend; + } + + public void setlNameAmend(String lNameAmend) { + this.lNameAmend = lNameAmend; + } + + public String getLinkedAccountAmend() { + return linkedAccountAmend; + } + + public void setLinkedAccountAmend(String linkedAccountAmend) { + this.linkedAccountAmend = linkedAccountAmend; + } + + public String getmNameAmend() { + return mNameAmend; + } + + public void setmNameAmend(String mNameAmend) { + this.mNameAmend = mNameAmend; + } + + public String getmNumberAmend() { + return mNumberAmend; + } + + public void setmNumberAmend(String mNumberAmend) { + this.mNumberAmend = mNumberAmend; + } + + public String getStatenameAmend() { + return statenameAmend; + } + + public void setStatenameAmend(String statenameAmend) { + this.statenameAmend = statenameAmend; + } + + public String getTittleAmend() { + return tittleAmend; + } + + public void setTittleAmend(String tittleAmend) { + this.tittleAmend = tittleAmend; + } + + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/DepositMiscellaneousBean.java b/IPKS_Updated/src/src/java/DataEntryBean/DepositMiscellaneousBean.java new file mode 100644 index 0000000..e7a5bf0 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/DepositMiscellaneousBean.java @@ -0,0 +1,249 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 986137 + */ +public class DepositMiscellaneousBean { + private String depositAccountNumber; + private String cifNo; + private String cif2No; + private String customer1Name; + private String customer2Name; + private String productDesc; + private String accStat; + private String operation_type; + private String holdAmt; + private String stopReson; + private String rem_stopReson; + private String rmvLienRsn; + + //for excel + private String accountNo; + private String productName; + private String fromDate; + private String toDate; + private String fromAmount; + private String toAmount; + private String subpacs_id; + + + private String subpacs_name; + private String enqTypeSearch; + private String nomCif; + private String accBalance; + private String mode; + private String loanAccountNumber; + + public String getMode() { + return mode; + } + + public void setMode(String mode) { + this.mode = mode; + } + + public String getNomCif() { + return nomCif; + } + + public void setNomCif(String nomCif) { + this.nomCif = nomCif; + } + + public String getCif2No() { + return cif2No; + } + + public void setCif2No(String cif2No) { + this.cif2No = cif2No; + } + + public String getCustomer1Name() { + return customer1Name; + } + + public void setCustomer1Name(String customer1Name) { + this.customer1Name = customer1Name; + } + + public String getCustomer2Name() { + return customer2Name; + } + + public void setCustomer2Name(String customer2Name) { + this.customer2Name = customer2Name; + } + + public String getRmvLienRsn() { + return rmvLienRsn; + } + + public void setRmvLienRsn(String rmvLienRsn) { + this.rmvLienRsn = rmvLienRsn; + } + + public String getEnqTypeSearch() { + return enqTypeSearch; + } + + public void setEnqTypeSearch(String enqTypeSearch) { + this.enqTypeSearch = enqTypeSearch; + } + + + + public String getAccountNo() { + return accountNo; + } + + public void setAccountNo(String accountNo) { + this.accountNo = accountNo; + } + + public String getFromAmount() { + return fromAmount; + } + + public void setFromAmount(String fromAmount) { + this.fromAmount = fromAmount; + } + + public String getFromDate() { + return fromDate; + } + + public void setFromDate(String fromDate) { + this.fromDate = fromDate; + } + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName; + } + + public String getSubpacs_id() { + return subpacs_id; + } + + public void setSubpacs_id(String subpacs_id) { + this.subpacs_id = subpacs_id; + } + + public String getSubpacs_name() { + return subpacs_name; + } + + public void setSubpacs_name(String subpacs_name) { + this.subpacs_name = subpacs_name; + } + + public String getToAmount() { + return toAmount; + } + + public void setToAmount(String toAmount) { + this.toAmount = toAmount; + } + + public String getToDate() { + return toDate; + } + + public void setToDate(String toDate) { + this.toDate = toDate; + } + + + + public String getAccBalance() { + return accBalance; + } + + public void setAccBalance(String accBalance) { + this.accBalance = accBalance; + } + + public String getHoldAmt() { + return holdAmt; + } + + public void setHoldAmt(String holdAmt) { + this.holdAmt = holdAmt; + } + + public String getOperation_type() { + return operation_type; + } + + public void setOperation_type(String operation_type) { + this.operation_type = operation_type; + } + + public String getRem_stopReson() { + return rem_stopReson; + } + + public void setRem_stopReson(String rem_stopReson) { + this.rem_stopReson = rem_stopReson; + } + + public String getStopReson() { + return stopReson; + } + + public void setStopReson(String stopReson) { + this.stopReson = stopReson; + } + + public String getAccStat() { + return accStat; + } + + public void setAccStat(String accStat) { + this.accStat = accStat; + } + + + + public String getCifNo() { + return cifNo; + } + + public void setCifNo(String cifNo) { + this.cifNo = cifNo; + } + + + + public String getDepositAccountNumber() { + return depositAccountNumber; + } + + public void setDepositAccountNumber(String depositAccountNumber) { + this.depositAccountNumber = depositAccountNumber; + } + + public String getLoanAccountNumber(){ + return loanAccountNumber; + } + public void setLoanAccountNumber(String loanAccountNumber){ + this.loanAccountNumber = loanAccountNumber; + } + + public String getProductDesc() { + return productDesc; + } + + public void setProductDesc(String productDesc) { + this.productDesc = productDesc; + } +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/DepositProductCreationBean.java b/IPKS_Updated/src/src/java/DataEntryBean/DepositProductCreationBean.java new file mode 100644 index 0000000..e8cd10c --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/DepositProductCreationBean.java @@ -0,0 +1,1126 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Helpdesk10 + */ +public class DepositProductCreationBean { + + //For Create Div + private String productname; + private String productdescription; + private String productcode; + private String inttcategory; + private String intcatdescription; + private String segmentCode; + private String status; + private String effectDate; + private String minbal; + private String maxbal; + private String intrate; + private String inttmethod; + private String inttfrequency; + private String glCode; + private String glCodeInttPAID; + private String glCodeInttPAYABLE; + private String glCodeInttPAID_Amend; + private String glCodeInttPAYABLE_Amend; + private String odindicator; + private String maxlimit; + private String drawingpower; + private String penalinttrate; + private String penalinttmethod; + private String penalinttfrequency; + private String creditComp1; + private String creditComp2; + private String debitComp1; + private String debitComp2; + private String cropIns; + + private String minwdl; + private String maxwdl; + private String inttcapfrequency; + private String inttpayoutfrequency; + private String allowdr; + private String allowcr; + private String dormancypr; + + private String minterm; + private String maxterm; + private String rdFlag; + private String overduerate; + private String dormancytrigger; + private String preClosure; + private String preClosureAmend; + private String mintermAmend; + private String maxtermAmend; + private String rdFlagAmend; + private String overduerateAmend; + private String dormancytriggerAmend; + + private String headAccType; + private String headAccTypeAmend; + + public String getHeadAccType() { + return headAccType; + } + + public void setHeadAccType(String headAccType) { + this.headAccType = headAccType; + } + + public String getHeadAccTypeAmend() { + return headAccTypeAmend; + } + + public void setHeadAccTypeAmend(String headAccTypeAmend) { + this.headAccTypeAmend = headAccTypeAmend; + } + + public String getGlCodeInttPAID() { + return glCodeInttPAID; + } + + public void setGlCodeInttPAID(String glCodeInttPAID) { + this.glCodeInttPAID = glCodeInttPAID; + } + + public String getGlCodeInttPAID_Amend() { + return glCodeInttPAID_Amend; + } + + public void setGlCodeInttPAID_Amend(String glCodeInttPAID_Amend) { + this.glCodeInttPAID_Amend = glCodeInttPAID_Amend; + } + + public String getGlCodeInttPAYABLE() { + return glCodeInttPAYABLE; + } + + public void setGlCodeInttPAYABLE(String glCodeInttPAYABLE) { + this.glCodeInttPAYABLE = glCodeInttPAYABLE; + } + + public String getGlCodeInttPAYABLE_Amend() { + return glCodeInttPAYABLE_Amend; + } + + public void setGlCodeInttPAYABLE_Amend(String glCodeInttPAYABLE_Amend) { + this.glCodeInttPAYABLE_Amend = glCodeInttPAYABLE_Amend; + } + + + + public String getInttpayoutfrequency() { + return inttpayoutfrequency; + } + + public void setInttpayoutfrequency(String inttpayoutfrequency) { + this.inttpayoutfrequency = inttpayoutfrequency; + } + + + + public String getPreClosureAmend() { + return preClosureAmend; + } + + public void setPreClosureAmend(String preClosureAmend) { + this.preClosureAmend = preClosureAmend; + } + + + + public String getPreClosure() { + return preClosure; + } + + public void setPreClosure(String preClosure) { + this.preClosure = preClosure; + } + + + + public String getRdFlagAmend() { + return rdFlagAmend; + } + + public void setRdFlagAmend(String rdFlagAmend) { + this.rdFlagAmend = rdFlagAmend; + } + + + + public String getDormancytrigger() { + return dormancytrigger; + } + + public void setDormancytrigger(String dormancytrigger) { + this.dormancytrigger = dormancytrigger; + } + + public String getDormancytriggerAmend() { + return dormancytriggerAmend; + } + + public void setDormancytriggerAmend(String dormancytriggerAmend) { + this.dormancytriggerAmend = dormancytriggerAmend; + } + + public String getMaxterm() { + return maxterm; + } + + public void setMaxterm(String maxterm) { + this.maxterm = maxterm; + } + + public String getMaxtermAmend() { + return maxtermAmend; + } + + public void setMaxtermAmend(String maxtermAmend) { + this.maxtermAmend = maxtermAmend; + } + + public String getMinterm() { + return minterm; + } + + public void setMinterm(String minterm) { + this.minterm = minterm; + } + + public String getMintermAmend() { + return mintermAmend; + } + + public void setMintermAmend(String mintermAmend) { + this.mintermAmend = mintermAmend; + } + + public String getOverduerate() { + return overduerate; + } + + public void setOverduerate(String overduerate) { + this.overduerate = overduerate; + } + + public String getOverduerateAmend() { + return overduerateAmend; + } + + public void setOverduerateAmend(String overduerateAmend) { + this.overduerateAmend = overduerateAmend; + } + + public String getRdFlag() { + return rdFlag; + } + + public void setRdFlag(String rdFlag) { + this.rdFlag = rdFlag; + } + + + public String getInttcapfrequency() { + return inttcapfrequency; + } + + public void setInttcapfrequency(String inttcapfrequency) { + this.inttcapfrequency = inttcapfrequency; + } + + public String getAllowdr() { + return allowdr; + } + + public void setAllowdr(String allowdr) { + this.allowdr = allowdr; + } + + public String getAllowcr() { + return allowcr; + } + + public void setAllowcr(String allowcr) { + this.allowcr = allowcr; + } + + public String getDormancypr() { + return dormancypr; + } + + public void setDormancypr(String dormancypr) { + this.dormancypr = dormancypr; + } + + + + //For Update Div + private String productnameAmend; + private String productdescriptionAmend; + private String productcodeAmend; + private String inttcategoryAmend; + private String intcatdescriptionAmend; + private String segmentCodeAmend; + private String statusAmend; + private String effectDateAmend; + private String minbalAmend; + private String maxbalAmend; + private String intrateAmend; + private String inttmethodAmend; + private String inttfrequencyAmend; + private String glCodeAmend; + private String odindicatorAmend; + private String maxlimitAmend; + private String drawingpowerAmend; + private String penalinttrateAmend; + private String penalinttmethodAmend; + private String penalinttfrequencyAmend; + private String intcatSearch; + private String productcodeSearch; + private String dep_product_id; + private String creditComp1Amend; + private String creditComp2Amend; + private String debitComp1Amend; + private String debitComp2Amend; + private String cropInsAmend; + private String minwdlAmend; + private String maxwdlAmend; + + private String inttcapfrequencyAmend; + private String inttpayoutfrequencyAmend; + private String allowdrAmend; + private String allowcrAmend; + private String dormancyprAmend; + + public String getInttpayoutfrequencyAmend() { + return inttpayoutfrequencyAmend; + } + + public void setInttpayoutfrequencyAmend(String inttpayoutfrequencyAmend) { + this.inttpayoutfrequencyAmend = inttpayoutfrequencyAmend; + } + + + + public String getInttcapfrequencyAmend() { + return inttcapfrequencyAmend; + } + + public void setInttcapfrequencyAmend(String inttcapfrequencyAmend) { + this.inttcapfrequencyAmend = inttcapfrequencyAmend; + } + + public String getAllowdrAmend() { + return allowdrAmend; + } + + public void setAllowdrAmend(String allowdrAmend) { + this.allowdrAmend = allowdrAmend; + } + + public String getAllowcrAmend() { + return allowcrAmend; + } + + public void setAllowcrAmend(String allowcrAmend) { + this.allowcrAmend = allowcrAmend; + } + + public String getDormancyprAmend() { + return dormancyprAmend; + } + + public void setDormancyprAmend(String dormancyprAmend) { + this.dormancyprAmend = dormancyprAmend; + } + + + + public String getMinwdl() { + return minwdl; + } + + public void setMinwdl(String minwdl) { + this.minwdl = minwdl; + } + + public String getMaxwdl() { + return maxwdl; + } + + public void setMaxwdl(String maxwdl) { + this.maxwdl = maxwdl; + } + + public String getMinwdlAmend() { + return minwdlAmend; + } + + public void setMinwdlAmend(String minwdlAmend) { + this.minwdlAmend = minwdlAmend; + } + + public String getMaxwdlAmend() { + return maxwdlAmend; + } + + public void setMaxwdlAmend(String maxwdlAmend) { + this.maxwdlAmend = maxwdlAmend; + } + + + + + /** + * @return the productname + */ + public String getProductname() { + return productname; + } + + /** + * @param productname the productname to set + */ + public void setProductname(String productname) { + this.productname = productname; + } + + /** + * @return the productdescription + */ + public String getProductdescription() { + return productdescription; + } + + /** + * @param productdescription the productdescription to set + */ + public void setProductdescription(String productdescription) { + this.productdescription = productdescription; + } + + /** + * @return the productcode + */ + public String getProductcode() { + return productcode; + } + + /** + * @param productcode the productcode to set + */ + public void setProductcode(String productcode) { + this.productcode = productcode; + } + + /** + * @return the inttcategory + */ + public String getInttcategory() { + return inttcategory; + } + + /** + * @param inttcategory the inttcategory to set + */ + public void setInttcategory(String inttcategory) { + this.inttcategory = inttcategory; + } + + /** + * @return the intcatdescription + */ + public String getIntcatdescription() { + return intcatdescription; + } + + /** + * @param intcatdescription the intcatdescription to set + */ + public void setIntcatdescription(String intcatdescription) { + this.intcatdescription = intcatdescription; + } + + /** + * @return the segmentCode + */ + public String getSegmentCode() { + return segmentCode; + } + + /** + * @param segmentCode the segmentCode to set + */ + public void setSegmentCode(String segmentCode) { + this.segmentCode = segmentCode; + } + + /** + * @return the status + */ + public String getStatus() { + return status; + } + + /** + * @param status the status to set + */ + public void setStatus(String status) { + this.status = status; + } + + /** + * @return the effectDate + */ + public String getEffectDate() { + return effectDate; + } + + /** + * @param effectDate the effectDate to set + */ + public void setEffectDate(String effectDate) { + this.effectDate = effectDate; + } + + /** + * @return the minbal + */ + public String getMinbal() { + return minbal; + } + + /** + * @param minbal the minbal to set + */ + public void setMinbal(String minbal) { + this.minbal = minbal; + } + + /** + * @return the maxbal + */ + public String getMaxbal() { + return maxbal; + } + + /** + * @param maxbal the maxbal to set + */ + public void setMaxbal(String maxbal) { + this.maxbal = maxbal; + } + + /** + * @return the intrate + */ + public String getIntrate() { + return intrate; + } + + /** + * @param intrate the intrate to set + */ + public void setIntrate(String intrate) { + this.intrate = intrate; + } + + /** + * @return the inttmethod + */ + public String getInttmethod() { + return inttmethod; + } + + /** + * @param inttmethod the inttmethod to set + */ + public void setInttmethod(String inttmethod) { + this.inttmethod = inttmethod; + } + + /** + * @return the inttfrequency + */ + public String getInttfrequency() { + return inttfrequency; + } + + /** + * @param inttfrequency the inttfrequency to set + */ + public void setInttfrequency(String inttfrequency) { + this.inttfrequency = inttfrequency; + } + + /** + * @return the glCode + */ + public String getGlCode() { + return glCode; + } + + /** + * @param glCode the glDescription to set + */ + public void setGlCode(String glCode) { + this.glCode = glCode; + } + + /** + * @return the odindicator + */ + public String getOdindicator() { + return odindicator; + } + + /** + * @param odindicator the odindicator to set + */ + public void setOdindicator(String odindicator) { + this.odindicator = odindicator; + } + + /** + * @return the maxlimit + */ + public String getMaxlimit() { + return maxlimit; + } + + /** + * @param maxlimit the maxlimit to set + */ + public void setMaxlimit(String maxlimit) { + this.maxlimit = maxlimit; + } + + /** + * @return the drawingpower + */ + public String getDrawingpower() { + return drawingpower; + } + + /** + * @param drawingpower the drawingpower to set + */ + public void setDrawingpower(String drawingpower) { + this.drawingpower = drawingpower; + } + + /** + * @return the penalinttrate + */ + public String getPenalinttrate() { + return penalinttrate; + } + + /** + * @param penalinttrate the penalinttrate to set + */ + public void setPenalinttrate(String penalinttrate) { + this.penalinttrate = penalinttrate; + } + + /** + * @return the penalinttmethod + */ + public String getPenalinttmethod() { + return penalinttmethod; + } + + /** + * @param penalinttmethod the penalinttmethod to set + */ + public void setPenalinttmethod(String penalinttmethod) { + this.penalinttmethod = penalinttmethod; + } + + /** + * @return the penalinttfrequency + */ + public String getPenalinttfrequency() { + return penalinttfrequency; + } + + /** + * @param penalinttfrequency the penalinttfrequency to set + */ + public void setPenalinttfrequency(String penalinttfrequency) { + this.penalinttfrequency = penalinttfrequency; + } + + /** + * @return the productnameAmend + */ + public String getProductnameAmend() { + return productnameAmend; + } + + /** + * @param productnameAmend the productnameAmend to set + */ + public void setProductnameAmend(String productnameAmend) { + this.productnameAmend = productnameAmend; + } + + /** + * @return the productdescriptionAmend + */ + public String getProductdescriptionAmend() { + return productdescriptionAmend; + } + + /** + * @param productdescriptionAmend the productdescriptionAmend to set + */ + public void setProductdescriptionAmend(String productdescriptionAmend) { + this.productdescriptionAmend = productdescriptionAmend; + } + + /** + * @return the productcodeAmend + */ + public String getProductcodeAmend() { + return productcodeAmend; + } + + /** + * @param productcodeAmend the productcodeAmend to set + */ + public void setProductcodeAmend(String productcodeAmend) { + this.productcodeAmend = productcodeAmend; + } + + /** + * @return the inttcategoryAmend + */ + public String getInttcategoryAmend() { + return inttcategoryAmend; + } + + /** + * @param inttcategoryAmend the inttcategoryAmend to set + */ + public void setInttcategoryAmend(String inttcategoryAmend) { + this.inttcategoryAmend = inttcategoryAmend; + } + + /** + * @return the intcatdescriptionAmend + */ + public String getIntcatdescriptionAmend() { + return intcatdescriptionAmend; + } + + /** + * @param intcatdescriptionAmend the intcatdescriptionAmend to set + */ + public void setIntcatdescriptionAmend(String intcatdescriptionAmend) { + this.intcatdescriptionAmend = intcatdescriptionAmend; + } + + /** + * @return the segmentCodeAmend + */ + public String getSegmentCodeAmend() { + return segmentCodeAmend; + } + + /** + * @param segmentCodeAmend the segmentCodeAmend to set + */ + public void setSegmentCodeAmend(String segmentCodeAmend) { + this.segmentCodeAmend = segmentCodeAmend; + } + + /** + * @return the statusAmend + */ + public String getStatusAmend() { + return statusAmend; + } + + /** + * @param statusAmend the statusAmend to set + */ + public void setStatusAmend(String statusAmend) { + this.statusAmend = statusAmend; + } + + /** + * @return the effectDateAmend + */ + public String getEffectDateAmend() { + return effectDateAmend; + } + + /** + * @param effectDateAmend the effectDateAmend to set + */ + public void setEffectDateAmend(String effectDateAmend) { + this.effectDateAmend = effectDateAmend; + } + + /** + * @return the minbalAmend + */ + public String getMinbalAmend() { + return minbalAmend; + } + + /** + * @param minbalAmend the minbalAmend to set + */ + public void setMinbalAmend(String minbalAmend) { + this.minbalAmend = minbalAmend; + } + + /** + * @return the maxbalAmend + */ + public String getMaxbalAmend() { + return maxbalAmend; + } + + /** + * @param maxbalAmend the maxbalAmend to set + */ + public void setMaxbalAmend(String maxbalAmend) { + this.maxbalAmend = maxbalAmend; + } + + /** + * @return the intrateAmend + */ + public String getIntrateAmend() { + return intrateAmend; + } + + /** + * @param intrateAmend the intrateAmend to set + */ + public void setIntrateAmend(String intrateAmend) { + this.intrateAmend = intrateAmend; + } + + /** + * @return the inttmethodAmend + */ + public String getInttmethodAmend() { + return inttmethodAmend; + } + + /** + * @param inttmethodAmend the inttmethodAmend to set + */ + public void setInttmethodAmend(String inttmethodAmend) { + this.inttmethodAmend = inttmethodAmend; + } + + /** + * @return the inttfrequencyAmend + */ + public String getInttfrequencyAmend() { + return inttfrequencyAmend; + } + + /** + * @param inttfrequencyAmend the inttfrequencyAmend to set + */ + public void setInttfrequencyAmend(String inttfrequencyAmend) { + this.inttfrequencyAmend = inttfrequencyAmend; + } + + /** + * @return the glCodeAmend + */ + public String getGlCodeAmend() { + return glCodeAmend; + } + + /** + * @param glCodeAmend the glDescriptionAmend to set + */ + public void setGlCodeAmend(String glCodeAmend) { + this.glCodeAmend = glCodeAmend; + } + + /** + * @return the odindicatorAmend + */ + public String getOdindicatorAmend() { + return odindicatorAmend; + } + + /** + * @param odindicatorAmend the odindicatorAmend to set + */ + public void setOdindicatorAmend(String odindicatorAmend) { + this.odindicatorAmend = odindicatorAmend; + } + + /** + * @return the maxlimitAmend + */ + public String getMaxlimitAmend() { + return maxlimitAmend; + } + + /** + * @param maxlimitAmend the maxlimitAmend to set + */ + public void setMaxlimitAmend(String maxlimitAmend) { + this.maxlimitAmend = maxlimitAmend; + } + + /** + * @return the drawingpowerAmend + */ + public String getDrawingpowerAmend() { + return drawingpowerAmend; + } + + /** + * @param drawingpowerAmend the drawingpowerAmend to set + */ + public void setDrawingpowerAmend(String drawingpowerAmend) { + this.drawingpowerAmend = drawingpowerAmend; + } + + /** + * @return the penalinttrateAmend + */ + public String getPenalinttrateAmend() { + return penalinttrateAmend; + } + + /** + * @param penalinttrateAmend the penalinttrateAmend to set + */ + public void setPenalinttrateAmend(String penalinttrateAmend) { + this.penalinttrateAmend = penalinttrateAmend; + } + + /** + * @return the penalinttmethodAmend + */ + public String getPenalinttmethodAmend() { + return penalinttmethodAmend; + } + + /** + * @param penalinttmethodAmend the penalinttmethodAmend to set + */ + public void setPenalinttmethodAmend(String penalinttmethodAmend) { + this.penalinttmethodAmend = penalinttmethodAmend; + } + + /** + * @return the penalinttfrequencyAmend + */ + public String getPenalinttfrequencyAmend() { + return penalinttfrequencyAmend; + } + + /** + * @param penalinttfrequencyAmend the penalinttfrequencyAmend to set + */ + public void setPenalinttfrequencyAmend(String penalinttfrequencyAmend) { + this.penalinttfrequencyAmend = penalinttfrequencyAmend; + } + + /** + * @return the intcatSearch + */ + public String getIntcatSearch() { + return intcatSearch; + } + + /** + * @param intcatSearch the intcatSearch to set + */ + public void setIntcatSearch(String intcatSearch) { + this.intcatSearch = intcatSearch; + } + + /** + * @return the productcodeSearch + */ + public String getProductcodeSearch() { + return productcodeSearch; + } + + /** + * @param productcodeSearch the productcodeSearch to set + */ + public void setProductcodeSearch(String productcodeSearch) { + this.productcodeSearch = productcodeSearch; + } + + /** + * @return the dep_product_id + */ + public String getDep_product_id() { + return dep_product_id; + } + + /** + * @param dep_product_id the dep_product_id to set + */ + public void setDep_product_id(String dep_product_id) { + this.dep_product_id = dep_product_id; + } + + /** + * @return the creditComp1 + */ + public String getCreditComp1() { + return creditComp1; + } + + /** + * @param creditComp1 the creditComp1 to set + */ + public void setCreditComp1(String creditComp1) { + this.creditComp1 = creditComp1; + } + + /** + * @return the creditComp2 + */ + public String getCreditComp2() { + return creditComp2; + } + + /** + * @param creditComp2 the creditComp2 to set + */ + public void setCreditComp2(String creditComp2) { + this.creditComp2 = creditComp2; + } + + /** + * @return the debitComp1 + */ + public String getDebitComp1() { + return debitComp1; + } + + /** + * @param debitComp1 the debitComp1 to set + */ + public void setDebitComp1(String debitComp1) { + this.debitComp1 = debitComp1; + } + + /** + * @return the debitComp2 + */ + public String getDebitComp2() { + return debitComp2; + } + + /** + * @param debitComp2 the debitComp2 to set + */ + public void setDebitComp2(String debitComp2) { + this.debitComp2 = debitComp2; + } + + /** + * @return the creditComp1Amend + */ + public String getCreditComp1Amend() { + return creditComp1Amend; + } + + /** + * @param creditComp1Amend the creditComp1Amend to set + */ + public void setCreditComp1Amend(String creditComp1Amend) { + this.creditComp1Amend = creditComp1Amend; + } + + /** + * @return the creditComp2Amend + */ + public String getCreditComp2Amend() { + return creditComp2Amend; + } + + /** + * @param creditComp2Amend the creditComp2Amend to set + */ + public void setCreditComp2Amend(String creditComp2Amend) { + this.creditComp2Amend = creditComp2Amend; + } + + /** + * @return the debitComp1Amend + */ + public String getDebitComp1Amend() { + return debitComp1Amend; + } + + /** + * @param debitComp1Amend the debitComp1Amend to set + */ + public void setDebitComp1Amend(String debitComp1Amend) { + this.debitComp1Amend = debitComp1Amend; + } + + /** + * @return the debitComp2Amend + */ + public String getDebitComp2Amend() { + return debitComp2Amend; + } + + /** + * @param debitComp2Amend the debitComp2Amend to set + */ + public void setDebitComp2Amend(String debitComp2Amend) { + this.debitComp2Amend = debitComp2Amend; + } + + /** + * @return the cropIns + */ + public String getCropIns() { + return cropIns; + } + + /** + * @param cropIns the cropIns to set + */ + public void setCropIns(String cropIns) { + this.cropIns = cropIns; + } + + /** + * @return the cropInsAmend + */ + public String getCropInsAmend() { + return cropInsAmend; + } + + /** + * @param cropInsAmend the cropInsAmend to set + */ + public void setCropInsAmend(String cropInsAmend) { + this.cropInsAmend = cropInsAmend; + } + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/DepositRateSlabBean.java b/IPKS_Updated/src/src/java/DataEntryBean/DepositRateSlabBean.java new file mode 100644 index 0000000..fdec5ee --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/DepositRateSlabBean.java @@ -0,0 +1,319 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author 986137 + */ +public class DepositRateSlabBean { + + //for create Div + private String pCode; + private String iCat; + private String procStartDate; + private String procEndDate; + private String inttRate; + private String termFrom; + private String termTo; + private String amountFrom; + private String amountTo; + + //for Search + private String pCodeSearch; + private String iCatSearch; + + //for Amend Div + private String dep_product_id; + private String slabTable_id; + private String inttRateAmend; + private String termFromAmend; + private String termToAmend; + private String amountFromAmend; + private String amountToAmend; + private String procStartDateAmend; + private String procEndDateAmend; + private String inttCapFreq; + private String prodCode; + private String prodDesc; + private String inttCat; + private String inttCatDesc; + private String thresholdBal; + private String thresholdInttRate; + private String minBal; + private String maxBal; + private String minWithdraw; + private String maxWithdraw; + private String drTxnFlag; + private String dormancy; + + + + public String getThresholdBal() { + return thresholdBal; + } + + public void setThresholdBal(String thresholdBal) { + this.thresholdBal = thresholdBal; + } + + public String getThresholdInttRate() { + return thresholdInttRate; + } + + public void setThresholdInttRate(String thresholdInttRate) { + this.thresholdInttRate = thresholdInttRate; + } + + public String getMinBal() { + return minBal; + } + + public void setMinBal(String minBal) { + this.minBal = minBal; + } + + public String getMaxBal() { + return maxBal; + } + + public void setMaxBal(String maxBal) { + this.maxBal = maxBal; + } + + public String getMinWithdraw() { + return minWithdraw; + } + + public void setMinWithdraw(String minWithdraw) { + this.minWithdraw = minWithdraw; + } + + public String getMaxWithdraw() { + return maxWithdraw; + } + + public void setMaxWithdraw(String maxWithdraw) { + this.maxWithdraw = maxWithdraw; + } + + public String getDrTxnFlag() { + return drTxnFlag; + } + + public void setDrTxnFlag(String drTxnFlag) { + this.drTxnFlag = drTxnFlag; + } + + public String getDormancy() { + return dormancy; + } + + public void setDormancy(String dormancy) { + this.dormancy = dormancy; + } + + public String getInttCapFreq() { + return inttCapFreq; + } + + public void setInttCapFreq(String inttCapFreq) { + this.inttCapFreq = inttCapFreq; + } + + public String getProdCode() { + return prodCode; + } + + public void setProdCode(String prodCode) { + this.prodCode = prodCode; + } + + public String getProdDesc() { + return prodDesc; + } + + public void setProdDesc(String prodDesc) { + this.prodDesc = prodDesc; + } + + public String getInttCat() { + return inttCat; + } + + public void setInttCat(String inttCat) { + this.inttCat = inttCat; + } + + public String getInttCatDesc() { + return inttCatDesc; + } + + public void setInttCatDesc(String inttCatDesc) { + this.inttCatDesc = inttCatDesc; + } + + public String getProcEndDateAmend() { + return procEndDateAmend; + } + + public void setProcEndDateAmend(String procEndDateAmend) { + this.procEndDateAmend = procEndDateAmend; + } + + public String getProcStartDateAmend() { + return procStartDateAmend; + } + + public void setProcStartDateAmend(String procStartDateAmend) { + this.procStartDateAmend = procStartDateAmend; + } + + + + public String getAmountFromAmend() { + return amountFromAmend; + } + + public void setAmountFromAmend(String amountFromAmend) { + this.amountFromAmend = amountFromAmend; + } + + public String getAmountToAmend() { + return amountToAmend; + } + + public void setAmountToAmend(String amountToAmend) { + this.amountToAmend = amountToAmend; + } + + public String getInttRateAmend() { + return inttRateAmend; + } + + public void setInttRateAmend(String inttRateAmend) { + this.inttRateAmend = inttRateAmend; + } + + public String getTermFromAmend() { + return termFromAmend; + } + + public void setTermFromAmend(String termFromAmend) { + this.termFromAmend = termFromAmend; + } + + public String getTermToAmend() { + return termToAmend; + } + + public void setTermToAmend(String termToAmend) { + this.termToAmend = termToAmend; + } + + public String getSlabTable_id() { + return slabTable_id; + } + + public void setSlabTable_id(String slabTable_id) { + this.slabTable_id = slabTable_id; + } + + public String getDep_product_id() { + return dep_product_id; + } + + public void setDep_product_id(String dep_product_id) { + this.dep_product_id = dep_product_id; + } + + public String getiCatSearch() { + return iCatSearch; + } + + public void setiCatSearch(String iCatSearch) { + this.iCatSearch = iCatSearch; + } + + public String getpCodeSearch() { + return pCodeSearch; + } + + public void setpCodeSearch(String pCodeSearch) { + this.pCodeSearch = pCodeSearch; + } + + public String getAmountFrom() { + return amountFrom; + } + + public void setAmountFrom(String amountFrom) { + this.amountFrom = amountFrom; + } + + public String getAmountTo() { + return amountTo; + } + + public void setAmountTo(String amountTo) { + this.amountTo = amountTo; + } + + public String getiCat() { + return iCat; + } + + public void setiCat(String iCat) { + this.iCat = iCat; + } + + public String getInttRate() { + return inttRate; + } + + public void setInttRate(String inttRate) { + this.inttRate = inttRate; + } + + public String getpCode() { + return pCode; + } + + public void setpCode(String pCode) { + this.pCode = pCode; + } + + public String getProcEndDate() { + return procEndDate; + } + + public void setProcEndDate(String procEndDate) { + this.procEndDate = procEndDate; + } + + public String getProcStartDate() { + return procStartDate; + } + + public void setProcStartDate(String procStartDate) { + this.procStartDate = procStartDate; + } + + public String getTermFrom() { + return termFrom; + } + + public void setTermFrom(String termFrom) { + this.termFrom = termFrom; + } + + public String getTermTo() { + return termTo; + } + + public void setTermTo(String termTo) { + this.termTo = termTo; + } +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/DepositTransferBean.java b/IPKS_Updated/src/src/java/DataEntryBean/DepositTransferBean.java new file mode 100644 index 0000000..05dafa4 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/DepositTransferBean.java @@ -0,0 +1,133 @@ +package DataEntryBean; + +public class DepositTransferBean +{ + private String tranType; + private String accNo; + private String trAmount; + private String narration; + private String gl_accNo; + private String accNo_dd_from; + private String accNo_dd_to; + private String accNo_gg_from; + private String accNo_gg_to; + private String checkOption; + private String accNo_cash; + private String g2ctrAmount; + private String acc_gl_to_cash; + private String accNo_gl_to; + + public String getAccNo_gl_to() { + return accNo_gl_to; + } + + public void setAccNo_gl_to(String accNo_gl_to) { + this.accNo_gl_to = accNo_gl_to; + } + + public String getAcc_gl_to_cash() { + return acc_gl_to_cash; + } + + public void setAcc_gl_to_cash(String acc_gl_to_cash) { + this.acc_gl_to_cash = acc_gl_to_cash; + } + + public String getG2ctrAmount() { + return g2ctrAmount; + } + + public void setG2ctrAmount(String g2ctrAmount) { + this.g2ctrAmount = g2ctrAmount; + } + + public String getAccNo_cash() { + return accNo_cash; + } + + public void setAccNo_cash(String accNo_cash) { + this.accNo_cash = accNo_cash; + } + + public String getCheckOption() { + return checkOption; + } + + public void setCheckOption(String checkOption) { + this.checkOption = checkOption; + } + + public String getAccNo() { + return accNo; + } + + public void setAccNo(String accNo) { + this.accNo = accNo; + } + + public String getAccNo_dd_from() { + return accNo_dd_from; + } + + public void setAccNo_dd_from(String accNo_dd_from) { + this.accNo_dd_from = accNo_dd_from; + } + + public String getAccNo_dd_to() { + return accNo_dd_to; + } + + public void setAccNo_dd_to(String accNo_dd_to) { + this.accNo_dd_to = accNo_dd_to; + } + + public String getAccNo_gg_from() { + return accNo_gg_from; + } + + public void setAccNo_gg_from(String accNo_gg_from) { + this.accNo_gg_from = accNo_gg_from; + } + + public String getAccNo_gg_to() { + return accNo_gg_to; + } + + public void setAccNo_gg_to(String accNo_gg_to) { + this.accNo_gg_to = accNo_gg_to; + } + + public String getGl_accNo() { + return gl_accNo; + } + + public void setGl_accNo(String gl_accNo) { + this.gl_accNo = gl_accNo; + } + + public String getNarration() { + return narration; + } + + public void setNarration(String narration) { + this.narration = narration; + } + + public String getTrAmount() { + return trAmount; + } + + public void setTrAmount(String trAmount) { + this.trAmount = trAmount; + } + + public String getTranType() { + return tranType; + } + + public void setTranType(String tranType) { + this.tranType = tranType; + } + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/DistScaleOfFinanceBean.java b/IPKS_Updated/src/src/java/DataEntryBean/DistScaleOfFinanceBean.java new file mode 100644 index 0000000..13f6017 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/DistScaleOfFinanceBean.java @@ -0,0 +1,123 @@ +package DataEntryBean; + + +public class DistScaleOfFinanceBean +{ + private String rowCounter; + + private String chkboxCounter; + + private String distCode; + + private String cropName; + + private String seedCost; + + private String manureCost; + private String fertilizerCost; + private String pesticidesCost; + private String irrigationCost; + private String labourCost; + private String totalCost; + private String cropCode; + + public DistScaleOfFinanceBean() {} + + public String getCropCode() + { + return cropCode; + } + + public void setCropCode(String cropCode) { + this.cropCode = cropCode; + } + + public void setCropName(String cropName) + { + this.cropName = cropName; + } + + public void setFertilizerCost(String fertilizerCost) { + this.fertilizerCost = fertilizerCost; + } + + public void setIrrigationCost(String irrigationCost) { + this.irrigationCost = irrigationCost; + } + + public void setLabourCost(String labourCost) { + this.labourCost = labourCost; + } + + public void setManureCost(String manureCost) { + this.manureCost = manureCost; + } + + public void setPesticidesCost(String pesticidesCost) { + this.pesticidesCost = pesticidesCost; + } + + public void setSeedCost(String seedCost) { + this.seedCost = seedCost; + } + + public void setTotalCost(String totalCost) { + this.totalCost = totalCost; + } + + public String getCropName() { + return cropName; + } + + public String getFertilizerCost() { + return fertilizerCost; + } + + public String getIrrigationCost() { + return irrigationCost; + } + + public String getLabourCost() { + return labourCost; + } + + public String getManureCost() { + return manureCost; + } + + public String getPesticidesCost() { + return pesticidesCost; + } + + public String getSeedCost() { + return seedCost; + } + + public String getTotalCost() { + return totalCost; + } + + public void setDistCode(String distCode) { + this.distCode = distCode; + } + + public String getDistCode() { + return distCode; + } + + public String getChkboxCounter() { + return chkboxCounter; + } + + public String getRowCounter() { + return rowCounter; + } + + public void setChkboxCounter(String chkboxCounter) { + this.chkboxCounter = chkboxCounter; + } + + public void setRowCounter(String rowCounter) { + this.rowCounter = rowCounter; + } +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/EnquiryBean.java b/IPKS_Updated/src/src/java/DataEntryBean/EnquiryBean.java new file mode 100644 index 0000000..ed24d5f --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/EnquiryBean.java @@ -0,0 +1,1192 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Shubhrangshu + */ +public class EnquiryBean { + + public String accountNo; + public String fromDate; + public String toDate; + public String productName; + public String fromAmount; + public String toAmount; + public String productId; + public String productCode; + public String srchByCIF; + + public String linkedSbAccount; + + //for display + public String accountOpenDate; + public String availBalance; + public String customerNo; + public String sanctionAmount; + public String screenName; + public String prinOutstanding; + public String inttOutstanding; + public String penalIntt; + public String customerName; + private String prinOverdue; + public String penalCnt; + + //added later + public String productNameDisplay; + public String limitExpiryDate; + public String prinPaid; + public String inttPaid; + public String penalInttOutstanding; + public String linkAccNo; + public String oldAccNo; + public String oldCifNo; + public String pacs_id; + public String cif_no2; + public String sec_cust_name; + public String link_acc; + public String nomineeName; +/*Added New Fileds by bitan For multiple CIF to same Dep Account*/ + private String jt_cifNumber1; + private String jt_cifNumber2; + private String jt_cifNumber3; + private String jt_cifNumber4; + private String jt_cifNumber5; + private String jt_cifNumber6; + private String jt_cifNumber7; + private String jt_cifNumber8; + private String jt_cifNumber9; + private String jt_cifNumber10; + + private String jt_cifName1; + private String jt_cifName2; + private String jt_cifName3; + private String jt_cifName4; + private String jt_cifName5; + private String jt_cifName6; + private String jt_cifName7; + private String jt_cifName8; + private String jt_cifName9; + private String jt_cifName10; + /*END*/ + + //added for LoanEnquiry + public String cifNumber; + public String sancDt; + public String amntDsbrd; + + //added later for Enquiry Screens + public String inttrate; + public String inttIncr; + public String inttAvail; + public String inttfroDt; + public String inttToDt; + public String holdValue; + public String inttProjected; + public String maturityValue; + public String maturityDt; + public String termValue; + public String inttCatDesc; + public String termSOPDt; + public String termEOPDt; + public String curr_Status; + public String intt_capptalized; + public String instllAmt; + public String installPaidNo; + public String instllDueDate; + public String termLen; + public String intRepayMethod; + public String term_from_date; + public String term_to_date; + public String LoanAcc; + public String intAccrued; + //for share enquiry + private String memberno; + private String shareclass; + private String sharevalue; + private String sharedue; + private String shareno; + private String shareamt; + private String modOfAcc; + private String NPAINTTOUTST; + private String NPAINTTPAID; + private String totaloutst; + + + public String getNPAINTTOUTST() { + return NPAINTTOUTST; + } + + public void setNPAINTTOUTST(String NPAINTTOUTST) { + this.NPAINTTOUTST = NPAINTTOUTST; + } + + public String getNPAINTTPAID() { + return NPAINTTPAID; + } + + public void setNPAINTTPAID(String NPAINTTPAID) { + this.NPAINTTPAID = NPAINTTPAID; + } + + public String getTotaloutst() { + return totaloutst; + } + + public void setTotaloutst(String totaloutst) { + this.totaloutst = totaloutst; + } + + public String getIntAccrued() { + return intAccrued; + } + + public void setIntAccrued(String intAccrued) { + this.intAccrued = intAccrued; + } + + public String getPenalIntRate() { + return penalIntRate; + } + + public void setPenalIntRate(String penalIntRate) { + this.penalIntRate = penalIntRate; + } + private String penalIntRate; + + public String getNomineeName() { + return nomineeName; + } + + public void setNomineeName(String nomineeName) { + this.nomineeName = nomineeName; + } + + public String getModOfAcc() { + return modOfAcc; + } + + public void setModOfAcc(String modOfAcc) { + this.modOfAcc = modOfAcc; + } + + public String getLink_acc() { + return link_acc; + } + + public void setLink_acc(String link_acc) { + this.link_acc = link_acc; + } + + public String getCif_no2() { + return cif_no2; + } + + public void setCif_no2(String cif_no2) { + this.cif_no2 = cif_no2; + } + + public String getSec_cust_name() { + return sec_cust_name; + } + + public void setSec_cust_name(String sec_cust_name) { + this.sec_cust_name = sec_cust_name; + } + + public String getPenalCnt() { + return penalCnt; + } + + public void setPenalCnt(String penalCnt) { + this.penalCnt = penalCnt; + } + + public String getLoanAcc() { + return LoanAcc; + } + + public void setLoanAcc(String LoanAcc) { + this.LoanAcc = LoanAcc; + } + + public String getintAccrued() { + return intAccrued; + } + + public void setintAccrued(String intAccrued) { + this.intAccrued = intAccrued; + } + + public String getPacs_id() { + return pacs_id; + } + + public void setPacs_id(String pacs_id) { + this.pacs_id = pacs_id; + } + + public String getOldAccNo() { + return oldAccNo; + } + + public void setOldAccNo(String oldAccNo) { + this.oldAccNo = oldAccNo; + } + + public String getOldCifNo() { + return oldCifNo; + } + + public void setOldCifNo(String oldCifNo) { + this.oldCifNo = oldCifNo; + } + + public String getMemberno() { + return memberno; + } + + public void setMemberno(String memberno) { + this.memberno = memberno; + } + + public String getShareamt() { + return shareamt; + } + + public void setShareamt(String shareamt) { + this.shareamt = shareamt; + } + + public String getShareclass() { + return shareclass; + } + + public void setShareclass(String shareclass) { + this.shareclass = shareclass; + } + + public String getSharedue() { + return sharedue; + } + + public void setSharedue(String sharedue) { + this.sharedue = sharedue; + } + + public String getShareno() { + return shareno; + } + + public void setShareno(String shareno) { + this.shareno = shareno; + } + + public String getSharevalue() { + return sharevalue; + } + + public void setSharevalue(String sharevalue) { + this.sharevalue = sharevalue; + } + + + public String subpacs_id; + public String subpacs_name; + + public String getSubpacs_name() { + return subpacs_name; + } + + public void setSubpacs_name(String subpacs_name) { + this.subpacs_name = subpacs_name; + } + + + public String getSubpacs_id() { + return subpacs_id; + } + + public void setSubpacs_id(String subpacs_id) { + this.subpacs_id = subpacs_id; + } + + + public String getTerm_from_date() { + return term_from_date; + } + + public void setTerm_from_date(String term_from_date) { + this.term_from_date = term_from_date; + } + + public String getTerm_to_date() { + return term_to_date; + } + + public void setTerm_to_date(String term_to_date) { + this.term_to_date = term_to_date; + } + + //added for Loan Enquiry + private String emi; + private String next_due_date; + private String last_repay_date; + private String intt_cat_desc; + private String loan_type; + private String product_name; + private String total_intt_outst; + private String total_intt_accr; + private String total_intt_paid; + + public String getEmi() { + return emi; + } + + public void setEmi(String emi) { + this.emi = emi; + } + + public String getIntt_cat_desc() { + return intt_cat_desc; + } + + public void setIntt_cat_desc(String intt_cat_desc) { + this.intt_cat_desc = intt_cat_desc; + } + + public String getLast_repay_date() { + return last_repay_date; + } + + public void setLast_repay_date(String last_repay_date) { + this.last_repay_date = last_repay_date; + } + + public String getLoan_type() { + return loan_type; + } + + public void setLoan_type(String loan_type) { + this.loan_type = loan_type; + } + + public String getNext_due_date() { + return next_due_date; + } + + public void setNext_due_date(String next_due_date) { + this.next_due_date = next_due_date; + } + + public String getProduct_name() { + return product_name; + } + + public void setProduct_name(String product_name) { + this.product_name = product_name; + } + + public String getTotal_intt_accr() { + return total_intt_accr; + } + + public void setTotal_intt_accr(String total_intt_accr) { + this.total_intt_accr = total_intt_accr; + } + + public String getTotal_intt_outst() { + return total_intt_outst; + } + + public void setTotal_intt_outst(String total_intt_outst) { + this.total_intt_outst = total_intt_outst; + } + + public String getTotal_intt_paid() { + return total_intt_paid; + } + + public void setTotal_intt_paid(String total_intt_paid) { + this.total_intt_paid = total_intt_paid; + } + + + + + public String getSrchByCIF() { + return srchByCIF; + } + + public void setSrchByCIF(String srchByCIF) { + this.srchByCIF = srchByCIF; + } + + + + public String getTermLen() { + return termLen; + } + + public void setTermLen(String termLen) { + this.termLen = termLen; + } + + public String getIntRepayMethod() { + return intRepayMethod; + } + + public void setIntRepayMethod(String intRepayMethod) { + this.intRepayMethod = intRepayMethod; + } + + + public String getInstallPaidNo() { + return installPaidNo; + } + + public void setInstallPaidNo(String installPaidNo) { + this.installPaidNo = installPaidNo; + } + + public String getInstllAmt() { + return instllAmt; + } + + public void setInstllAmt(String instllAmt) { + this.instllAmt = instllAmt; + } + + public String getInstllDueDate() { + return instllDueDate; + } + + public void setInstllDueDate(String instllDueDate) { + this.instllDueDate = instllDueDate; + } + + + + //added for Deposit Miscellaneous Enquiry + public String action; + public String op_Amt; + public String action_Dt; + public String action_Cmnt; + public String action_teller; + public String action_STAT; + public String teller_name; + + public String getIntt_capptalized() { + return intt_capptalized; + } + + public void setIntt_capptalized(String intt_capptalized) { + this.intt_capptalized = intt_capptalized; + } + + + public String getTeller_name() { + return teller_name; + } + + public void setTeller_name(String teller_name) { + this.teller_name = teller_name; + } + + + + public String getAction() { + return action; + } + + public void setAction(String action) { + this.action = action; + } + + public String getAction_Cmnt() { + return action_Cmnt; + } + + public void setAction_Cmnt(String action_Cmnt) { + this.action_Cmnt = action_Cmnt; + } + + public String getAction_Dt() { + return action_Dt; + } + + public void setAction_Dt(String action_Dt) { + this.action_Dt = action_Dt; + } + + public String getAction_STAT() { + return action_STAT; + } + + public void setAction_STAT(String action_STAT) { + this.action_STAT = action_STAT; + } + + public String getAction_teller() { + return action_teller; + } + + public void setAction_teller(String action_teller) { + this.action_teller = action_teller; + } + + public String getOp_Amt() { + return op_Amt; + } + + public void setOp_Amt(String op_Amt) { + this.op_Amt = op_Amt; + } + + + + public String getInttCatDesc() { + return inttCatDesc; + } + + public void setInttCatDesc(String inttCatDesc) { + this.inttCatDesc = inttCatDesc; + } + + + + public String getCurr_Status() { + return curr_Status; + } + + public void setCurr_Status(String curr_Status) { + this.curr_Status = curr_Status; + } + + + public String getHoldValue() { + return holdValue; + } + + public void setHoldValue(String holdValue) { + this.holdValue = holdValue; + } + + public String getInttAvail() { + return inttAvail; + } + + public void setInttAvail(String inttAvail) { + this.inttAvail = inttAvail; + } + + public String getInttIncr() { + return inttIncr; + } + + public void setInttIncr(String inttIncr) { + this.inttIncr = inttIncr; + } + + public String getInttProjected() { + return inttProjected; + } + + public void setInttProjected(String inttProjected) { + this.inttProjected = inttProjected; + } + + public String getInttToDt() { + return inttToDt; + } + + public void setInttToDt(String inttToDt) { + this.inttToDt = inttToDt; + } + + public String getInttfroDt() { + return inttfroDt; + } + + public void setInttfroDt(String inttfroDt) { + this.inttfroDt = inttfroDt; + } + + public String getInttrate() { + return inttrate; + } + + public void setInttrate(String inttrate) { + this.inttrate = inttrate; + } + + public String getMaturityDt() { + return maturityDt; + } + + public void setMaturityDt(String maturityDt) { + this.maturityDt = maturityDt; + } + + public String getMaturityValue() { + return maturityValue; + } + + public void setMaturityValue(String maturityValue) { + this.maturityValue = maturityValue; + } + + public String getProductCode() { + return productCode; + } + + public void setProductCode(String productCode) { + this.productCode = productCode; + } + + public String getTermEOPDt() { + return termEOPDt; + } + + public void setTermEOPDt(String termEOPDt) { + this.termEOPDt = termEOPDt; + } + + public String getTermSOPDt() { + return termSOPDt; + } + + public void setTermSOPDt(String termSOPDt) { + this.termSOPDt = termSOPDt; + } + + public String getTermValue() { + return termValue; + } + + public void setTermValue(String termValue) { + this.termValue = termValue; + } + + + + public String getAmntDsbrd() { + return amntDsbrd; + } + + public void setAmntDsbrd(String amntDsbrd) { + this.amntDsbrd = amntDsbrd; + } + + public String getSancDt() { + return sancDt; + } + + public void setSancDt(String sancDt) { + this.sancDt = sancDt; + } + + + + public String getCifNumber() { + return cifNumber; + } + + public void setCifNumber(String cifNumber) { + this.cifNumber = cifNumber; + } + + + + /** + * @return the accountNo + */ + public String getAccountNo() { + return accountNo; + } + + /** + * @param accountNo the accountNo to set + */ + public void setAccountNo(String accountNo) { + this.accountNo = accountNo; + } + + /** + * @return the fromDate + */ + public String getFromDate() { + return fromDate; + } + + /** + * @param fromDate the fromDate to set + */ + public void setFromDate(String fromDate) { + this.fromDate = fromDate; + } + + /** + * @return the toDate + */ + public String getToDate() { + return toDate; + } + + /** + * @param toDate the toDate to set + */ + public void setToDate(String toDate) { + this.toDate = toDate; + } + + /** + * @return the productName + */ + public String getProductName() { + return productName; + } + + /** + * @param productName the productName to set + */ + public void setProductName(String productName) { + this.productName = productName; + } + + /** + * @return the accountOpenDate + */ + public String getAccountOpenDate() { + return accountOpenDate; + } + + /** + * @param accountOpenDate the accountOpenDate to set + */ + public void setAccountOpenDate(String accountOpenDate) { + this.accountOpenDate = accountOpenDate; + } + + /** + * @return the availBalance + */ + public String getAvailBalance() { + return availBalance; + } + + /** + * @param availBalance the availBalance to set + */ + public void setAvailBalance(String availBalance) { + this.availBalance = availBalance; + } + + /** + * @return the fromAmount + */ + public String getFromAmount() { + return fromAmount; + } + + /** + * @param fromAmount the fromAmount to set + */ + public void setFromAmount(String fromAmount) { + this.fromAmount = fromAmount; + } + + /** + * @return the toAmount + */ + public String getToAmount() { + return toAmount; + } + + /** + * @param toAmount the toAmount to set + */ + public void setToAmount(String toAmount) { + this.toAmount = toAmount; + } + + /** + * @return the customerNo + */ + public String getCustomerNo() { + return customerNo; + } + + /** + * @param customerNo the customerNo to set + */ + public void setCustomerNo(String customerNo) { + this.customerNo = customerNo; + } + + /** + * @return the sanctionAmount + */ + public String getSanctionAmount() { + return sanctionAmount; + } + + /** + * @param sanctionAmount the sanctionAmount to set + */ + public void setSanctionAmount(String sanctionAmount) { + this.sanctionAmount = sanctionAmount; + } + + /** + * @return the screenName + */ + public String getScreenName() { + return screenName; + } + + /** + * @param screenName the screenName to set + */ + public void setScreenName(String screenName) { + this.screenName = screenName; + } + + /** + * @return the prinOutstanding + */ + public String getPrinOutstanding() { + return prinOutstanding; + } + + /** + * @param prinOutstanding the prinOutstanding to set + */ + public void setPrinOutstanding(String prinOutstanding) { + this.prinOutstanding = prinOutstanding; + } + + /** + * @return the inttOutstanding + */ + public String getInttOutstanding() { + return inttOutstanding; + } + + /** + * @param inttOutstanding the inttOutstanding to set + */ + public void setInttOutstanding(String inttOutstanding) { + this.inttOutstanding = inttOutstanding; + } + + /** + * @return the penalIntt + */ + public String getPenalIntt() { + return penalIntt; + } + + /** + * @param penalIntt the penalIntt to set + */ + public void setPenalIntt(String penalIntt) { + this.penalIntt = penalIntt; + } + + /** + * @return the customerName + */ + public String getCustomerName() { + return customerName; + } + + /** + * @param customerName the customerName to set + */ + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + /** + * @return the productId + */ + public String getProductId() { + return productId; + } + + /** + * @param productId the productId to set + */ + public void setProductId(String productId) { + this.productId = productId; + } + + /** + * @return the limitExpiryDate + */ + public String getLimitExpiryDate() { + return limitExpiryDate; + } + + /** + * @param limitExpiryDate the limitExpiryDate to set + */ + public void setLimitExpiryDate(String limitExpiryDate) { + this.limitExpiryDate = limitExpiryDate; + } + + /** + * @return the prinPaid + */ + public String getPrinPaid() { + return prinPaid; + } + + /** + * @param prinPaid the prinPaid to set + */ + public void setPrinPaid(String prinPaid) { + this.prinPaid = prinPaid; + } + + /** + * @return the inttPaid + */ + public String getInttPaid() { + return inttPaid; + } + + /** + * @param inttPaid the inttPaid to set + */ + public void setInttPaid(String inttPaid) { + this.inttPaid = inttPaid; + } + + /** + * @return the penalInttOutstanding + */ + public String getPenalInttOutstanding() { + return penalInttOutstanding; + } + + /** + * @param penalInttOutstanding the penalInttOutstanding to set + */ + public void setPenalInttOutstanding(String penalInttOutstanding) { + this.penalInttOutstanding = penalInttOutstanding; + } + + /** + * @return the linkedSbAccount + */ + public String getLinkedSbAccount() { + return linkedSbAccount; + } + + /** + * @param linkedSbAccount the linkedSbAccount to set + */ + public void setLinkedSbAccount(String linkedSbAccount) { + this.linkedSbAccount = linkedSbAccount; + } + + /** + * @return the productNameDisplay + */ + public String getProductNameDisplay() { + return productNameDisplay; + } + + /** + * @param productNameDisplay the productNameDisplay to set + */ + public void setProductNameDisplay(String productNameDisplay) { + this.productNameDisplay = productNameDisplay; + } + + public String getLinkAccNo() { + return linkAccNo; + } + + /** + * @param productNameDisplay the productNameDisplay to set + */ + public void setLinkAccNo(String linkAccNo) { + this.linkAccNo = linkAccNo; + } + + public String getPrinOverdue() { + return prinOverdue; + } + + public void setPrinOverdue(String prinOverdue) { + this.prinOverdue = prinOverdue; + } + + public String getJt_cifName1() { + return jt_cifName1; + } + + public String getJt_cifName10() { + return jt_cifName10; + } + + public String getJt_cifName2() { + return jt_cifName2; + } + + public String getJt_cifName3() { + return jt_cifName3; + } + + public String getJt_cifName4() { + return jt_cifName4; + } + + public String getJt_cifName5() { + return jt_cifName5; + } + + public String getJt_cifName6() { + return jt_cifName6; + } + + public String getJt_cifName7() { + return jt_cifName7; + } + + public String getJt_cifName8() { + return jt_cifName8; + } + + public String getJt_cifName9() { + return jt_cifName9; + } + + public String getJt_cifNumber1() { + return jt_cifNumber1; + } + + public String getJt_cifNumber10() { + return jt_cifNumber10; + } + + public String getJt_cifNumber2() { + return jt_cifNumber2; + } + + public String getJt_cifNumber3() { + return jt_cifNumber3; + } + + public String getJt_cifNumber4() { + return jt_cifNumber4; + } + + public String getJt_cifNumber5() { + return jt_cifNumber5; + } + + public String getJt_cifNumber6() { + return jt_cifNumber6; + } + + public String getJt_cifNumber7() { + return jt_cifNumber7; + } + + public String getJt_cifNumber8() { + return jt_cifNumber8; + } + + public String getJt_cifNumber9() { + return jt_cifNumber9; + } + + public void setJt_cifName1(String jt_cifName1) { + this.jt_cifName1 = jt_cifName1; + } + + public void setJt_cifName10(String jt_cifName10) { + this.jt_cifName10 = jt_cifName10; + } + + public void setJt_cifName2(String jt_cifName2) { + this.jt_cifName2 = jt_cifName2; + } + + public void setJt_cifName3(String jt_cifName3) { + this.jt_cifName3 = jt_cifName3; + } + + public void setJt_cifName4(String jt_cifName4) { + this.jt_cifName4 = jt_cifName4; + } + + public void setJt_cifName5(String jt_cifName5) { + this.jt_cifName5 = jt_cifName5; + } + + public void setJt_cifName6(String jt_cifName6) { + this.jt_cifName6 = jt_cifName6; + } + + public void setJt_cifName7(String jt_cifName7) { + this.jt_cifName7 = jt_cifName7; + } + + public void setJt_cifName8(String jt_cifName8) { + this.jt_cifName8 = jt_cifName8; + } + + public void setJt_cifName9(String jt_cifName9) { + this.jt_cifName9 = jt_cifName9; + } + + public void setJt_cifNumber1(String jt_cifNumber1) { + this.jt_cifNumber1 = jt_cifNumber1; + } + + public void setJt_cifNumber10(String jt_cifNumber10) { + this.jt_cifNumber10 = jt_cifNumber10; + } + + public void setJt_cifNumber2(String jt_cifNumber2) { + this.jt_cifNumber2 = jt_cifNumber2; + } + + public void setJt_cifNumber3(String jt_cifNumber3) { + this.jt_cifNumber3 = jt_cifNumber3; + } + + public void setJt_cifNumber4(String jt_cifNumber4) { + this.jt_cifNumber4 = jt_cifNumber4; + } + + public void setJt_cifNumber5(String jt_cifNumber5) { + this.jt_cifNumber5 = jt_cifNumber5; + } + + public void setJt_cifNumber6(String jt_cifNumber6) { + this.jt_cifNumber6 = jt_cifNumber6; + } + + public void setJt_cifNumber7(String jt_cifNumber7) { + this.jt_cifNumber7 = jt_cifNumber7; + } + + public void setJt_cifNumber8(String jt_cifNumber8) { + this.jt_cifNumber8 = jt_cifNumber8; + } + + public void setJt_cifNumber9(String jt_cifNumber9) { + this.jt_cifNumber9 = jt_cifNumber9; + } + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/ExcelReportBean.java b/IPKS_Updated/src/src/java/DataEntryBean/ExcelReportBean.java new file mode 100644 index 0000000..36de055 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/ExcelReportBean.java @@ -0,0 +1,301 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Helpdesk10 + */ +public class ExcelReportBean { + + public String accountNo; + public String productName; //Prod_id + public String fromDate; + public String toDate; + public String fromAmount; + public String toAmount; + private String linkedSbAccount; + private String loanRepYYYYMM; + private String cifNumber; + private String tranRefSearch; + private String srchByCIF; + private String subpacs_id; + private String subpacs_name; + private String enqTypeSearch; + public String oldAccNo; + public String oldCifNo; + public String productId; + public String txnNo; + public String remAccNo; + public String benAccNo; + public String ifscNoVal2; + public String txnFromDate; + public String txnToDate; + public String modOfAcc; + public String customerNo; + + + + public String getCustomerNo() { + return customerNo; + } + + public void setCustomerNo(String customerNo) { + this.customerNo = customerNo; + } + + public String getModOfAcc() { + return modOfAcc; + } + + public void setModOfAcc(String modOfAcc) { + this.modOfAcc = modOfAcc; + } + + public String getBenAccNo() { + return benAccNo; + } + + public void setBenAccNo(String benAccNo) { + this.benAccNo = benAccNo; + } + + public String getIfscNoVal2() { + return ifscNoVal2; + } + + public void setIfscNoVal2(String ifscNoVal2) { + this.ifscNoVal2 = ifscNoVal2; + } + + public String getProductId() { + return productId; + } + + public void setProductId(String productId) { + this.productId = productId; + } + + public String getRemAccNo() { + return remAccNo; + } + + public void setRemAccNo(String remAccNo) { + this.remAccNo = remAccNo; + } + + public String getTxnFromDate() { + return txnFromDate; + } + + public void setTxnFromDate(String txnFromDate) { + this.txnFromDate = txnFromDate; + } + + public String getTxnNo() { + return txnNo; + } + + public void setTxnNo(String txnNo) { + this.txnNo = txnNo; + } + + public String getTxnToDate() { + return txnToDate; + } + + public void setTxnToDate(String txnToDate) { + this.txnToDate = txnToDate; + } + + public String getProductID() { + return productId; + } + + public void setProductID(String productID) { + this.productId = productID; + } + + public String getOldAccNo() { + return oldAccNo; + } + + public void setOldAccNo(String oldAccNo) { + this.oldAccNo = oldAccNo; + } + + public String getOldCifNo() { + return oldCifNo; + } + + public void setOldCifNo(String oldCifNo) { + this.oldCifNo = oldCifNo; + } + + public String getEnqTypeSearch() { + return enqTypeSearch; + } + + public void setEnqTypeSearch(String enqTypeSearch) { + this.enqTypeSearch = enqTypeSearch; + } + + + public String getSubpacs_id() { + return subpacs_id; + } + + public void setSubpacs_id(String subpacs_id) { + this.subpacs_id = subpacs_id; + } + + public String getSubpacs_name() { + return subpacs_name; + } + + public void setSubpacs_name(String subpacs_name) { + this.subpacs_name = subpacs_name; + } + + + + public String getSrchByCIF() { + return srchByCIF; + } + + public void setSrchByCIF(String srchByCIF) { + this.srchByCIF = srchByCIF; + } + + + + public String getTranRefSearch() { + return tranRefSearch; + } + + public void setTranRefSearch(String tranRefSearch) { + this.tranRefSearch = tranRefSearch; + } + + + public String getCifNumber() { + return cifNumber; + } + + public void setCifNumber(String cifNumber) { + this.cifNumber = cifNumber; + } + + + + public String getLoanRepYYYYMM() { + return loanRepYYYYMM; + } + + public void setLoanRepYYYYMM(String loanRepYYYYMM) { + this.loanRepYYYYMM = loanRepYYYYMM; + } + + + /** + * @return the accountNo + */ + public String getAccountNo() { + return accountNo; + } + + /** + * @param accountNo the accountNo to set + */ + public void setAccountNo(String accountNo) { + this.accountNo = accountNo; + } + + /** + * @return the productName + */ + public String getProductName() { + return productName; + } + + /** + * @param productName the productName to set + */ + public void setProductName(String productName) { + this.productName = productName; + } + + /** + * @return the fromDate + */ + public String getFromDate() { + return fromDate; + } + + /** + * @param fromDate the fromDate to set + */ + public void setFromDate(String fromDate) { + this.fromDate = fromDate; + } + + /** + * @return the toDate + */ + public String getToDate() { + return toDate; + } + + /** + * @param toDate the toDate to set + */ + public void setToDate(String toDate) { + this.toDate = toDate; + } + + /** + * @return the fromAmount + */ + public String getFromAmount() { + return fromAmount; + } + + /** + * @param fromAmount the fromAmount to set + */ + public void setFromAmount(String fromAmount) { + this.fromAmount = fromAmount; + } + + /** + * @return the toAmount + */ + public String getToAmount() { + return toAmount; + } + + /** + * @param toAmount the toAmount to set + */ + public void setToAmount(String toAmount) { + this.toAmount = toAmount; + } + + /** + * @return the linkedSbAccount + */ + public String getLinkedSbAccount() { + return linkedSbAccount; + } + + /** + * @param linkedSbAccount the linkedSbAccount to set + */ + public void setLinkedSbAccount(String linkedSbAccount) { + this.linkedSbAccount = linkedSbAccount; + } + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/FarmerDetailsBean.java b/IPKS_Updated/src/src/java/DataEntryBean/FarmerDetailsBean.java new file mode 100644 index 0000000..bb8b26e --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/FarmerDetailsBean.java @@ -0,0 +1,78 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 1004242 + */ + + + +public class FarmerDetailsBean { + + + + String manja; + String DgNo; + String gP; + String village; + String khatiyan; + Double area ; + + + public String getDgNo() { + return DgNo; + } + + public void setDgNo(String DgNo) { + this.DgNo = DgNo; + } + + public Double getArea() { + return area; + } + + public void setArea(Double area) { + this.area = area; + } + + public String getgP() { + return gP; + } + + public void setgP(String gP) { + this.gP = gP; + } + + public String getKhatiyan() { + return khatiyan; + } + + public void setKhatiyan(String khatiyan) { + this.khatiyan = khatiyan; + } + + public String getManja() { + return manja; + } + + public void setManja(String manja) { + this.manja = manja; + } + + public String getVillage() { + return village; + } + + public void setVillage(String village) { + this.village = village; + } + + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/FileUploadDataBean.java b/IPKS_Updated/src/src/java/DataEntryBean/FileUploadDataBean.java new file mode 100644 index 0000000..2abfe6b --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/FileUploadDataBean.java @@ -0,0 +1,622 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 590685 + */ +public class FileUploadDataBean { + + //For CC OD Details + + private String account_type; + private String intt_category; + private String segment_code; + private String limit; + private String rate; + private String rate_type; + private String expiry_date; + private String approval_amt; + private String cust_number; + private String member_id; + private String pacs_main_acct; + private String pacs_sub_acct; + private String security_indicator; + private String activity_code; + private String scheme_code; + private String customer_type; + private String sector_indicator; + private String expiry_rate; + private String expiry_rate_type; + + //For Savings Account Opening + + private String studentRecordType; + private String studentNumber; + private String firstName; + private String middleName; + private String lastName; + private String address1; + private String address2; + private String address3; + private String cityCode; + private String stateCode; + private String postBoxNumber; + private String phoneNumber; + private String idType; + private String idNumber; + private String birthDate; + private String gender; + private String motherName; + private String residentialStatus; + private String nationalityCode; + private String customerType; + private String title; + + + /** + * @return the account_type + */ + public String getAccount_type() { + return account_type; + } + + /** + * @param account_type the account_type to set + */ + public void setAccount_type(String account_type) { + this.account_type = account_type; + } + + /** + * @return the intt_category + */ + public String getIntt_category() { + return intt_category; + } + + /** + * @param intt_category the intt_category to set + */ + public void setIntt_category(String intt_category) { + this.intt_category = intt_category; + } + + /** + * @return the segment_code + */ + public String getSegment_code() { + return segment_code; + } + + /** + * @param segment_code the segment_code to set + */ + public void setSegment_code(String segment_code) { + this.segment_code = segment_code; + } + + /** + * @return the limit + */ + public String getLimit() { + return limit; + } + + /** + * @param limit the limit to set + */ + public void setLimit(String limit) { + this.limit = limit; + } + + /** + * @return the rate + */ + public String getRate() { + return rate; + } + + /** + * @param rate the rate to set + */ + public void setRate(String rate) { + this.rate = rate; + } + + /** + * @return the rate_type + */ + public String getRate_type() { + return rate_type; + } + + /** + * @param rate_type the rate_type to set + */ + public void setRate_type(String rate_type) { + this.rate_type = rate_type; + } + + /** + * @return the expiry_date + */ + public String getExpiry_date() { + return expiry_date; + } + + /** + * @param expiry_date the expiry_date to set + */ + public void setExpiry_date(String expiry_date) { + this.expiry_date = expiry_date; + } + + /** + * @return the approval_amt + */ + public String getApproval_amt() { + return approval_amt; + } + + /** + * @param approval_amt the approval_amt to set + */ + public void setApproval_amt(String approval_amt) { + this.approval_amt = approval_amt; + } + + /** + * @return the cust_number + */ + public String getCust_number() { + return cust_number; + } + + /** + * @param cust_number the cust_number to set + */ + public void setCust_number(String cust_number) { + this.cust_number = cust_number; + } + + /** + * @return the member_id + */ + public String getMember_id() { + return member_id; + } + + /** + * @param member_id the member_id to set + */ + public void setMember_id(String member_id) { + this.member_id = member_id; + } + + /** + * @return the pacs_main_acct + */ + public String getPacs_main_acct() { + return pacs_main_acct; + } + + /** + * @param pacs_main_acct the pacs_main_acct to set + */ + public void setPacs_main_acct(String pacs_main_acct) { + this.pacs_main_acct = pacs_main_acct; + } + + /** + * @return the pacs_sub_acct + */ + public String getPacs_sub_acct() { + return pacs_sub_acct; + } + + /** + * @param pacs_sub_acct the pacs_sub_acct to set + */ + public void setPacs_sub_acct(String pacs_sub_acct) { + this.pacs_sub_acct = pacs_sub_acct; + } + + /** + * @return the security_indicator + */ + public String getSecurity_indicator() { + return security_indicator; + } + + /** + * @param security_indicator the security_indicator to set + */ + public void setSecurity_indicator(String security_indicator) { + this.security_indicator = security_indicator; + } + + /** + * @return the activity_code + */ + public String getActivity_code() { + return activity_code; + } + + /** + * @param activity_code the activity_code to set + */ + public void setActivity_code(String activity_code) { + this.activity_code = activity_code; + } + + /** + * @return the scheme_code + */ + public String getScheme_code() { + return scheme_code; + } + + /** + * @param scheme_code the scheme_code to set + */ + public void setScheme_code(String scheme_code) { + this.scheme_code = scheme_code; + } + + /** + * @return the customer_type + */ + public String getCustomer_type() { + return customer_type; + } + + /** + * @param customer_type the customer_type to set + */ + public void setCustomer_type(String customer_type) { + this.customer_type = customer_type; + } + + /** + * @return the sector_indicator + */ + public String getSector_indicator() { + return sector_indicator; + } + + /** + * @param sector_indicator the sector_indicator to set + */ + public void setSector_indicator(String sector_indicator) { + this.sector_indicator = sector_indicator; + } + + /** + * @return the expiry_rate + */ + public String getExpiry_rate() { + return expiry_rate; + } + + /** + * @param expiry_rate the expiry_rate to set + */ + public void setExpiry_rate(String expiry_rate) { + this.expiry_rate = expiry_rate; + } + + /** + * @return the expiry_rate_type + */ + public String getExpiry_rate_type() { + return expiry_rate_type; + } + + /** + * @param expiry_rate_type the expiry_rate_type to set + */ + public void setExpiry_rate_type(String expiry_rate_type) { + this.expiry_rate_type = expiry_rate_type; + } + + /** + * @return the studentRecordType + */ + public String getStudentRecordType() { + return studentRecordType; + } + + /** + * @param studentRecordType the studentRecordType to set + */ + public void setStudentRecordType(String studentRecordType) { + this.studentRecordType = studentRecordType; + } + + /** + * @return the studentNumber + */ + public String getStudentNumber() { + return studentNumber; + } + + /** + * @param studentNumber the studentNumber to set + */ + public void setStudentNumber(String studentNumber) { + this.studentNumber = studentNumber; + } + + /** + * @return the firstName + */ + public String getFirstName() { + return firstName; + } + + /** + * @param firstName the firstName to set + */ + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + /** + * @return the middleName + */ + public String getMiddleName() { + return middleName; + } + + /** + * @param middleName the middleName to set + */ + public void setMiddleName(String middleName) { + this.middleName = middleName; + } + + /** + * @return the lastName + */ + public String getLastName() { + return lastName; + } + + /** + * @param lastName the lastName to set + */ + public void setLastName(String lastName) { + this.lastName = lastName; + } + + /** + * @return the address1 + */ + public String getAddress1() { + return address1; + } + + /** + * @param address1 the address1 to set + */ + public void setAddress1(String address1) { + this.address1 = address1; + } + + /** + * @return the address2 + */ + public String getAddress2() { + return address2; + } + + /** + * @param address2 the address2 to set + */ + public void setAddress2(String address2) { + this.address2 = address2; + } + + /** + * @return the address3 + */ + public String getAddress3() { + return address3; + } + + /** + * @param address3 the address3 to set + */ + public void setAddress3(String address3) { + this.address3 = address3; + } + + /** + * @return the cityCode + */ + public String getCityCode() { + return cityCode; + } + + /** + * @param cityCode the cityCode to set + */ + public void setCityCode(String cityCode) { + this.cityCode = cityCode; + } + + /** + * @return the stateCode + */ + public String getStateCode() { + return stateCode; + } + + /** + * @param stateCode the stateCode to set + */ + public void setStateCode(String stateCode) { + this.stateCode = stateCode; + } + + /** + * @return the postBoxNumber + */ + public String getPostBoxNumber() { + return postBoxNumber; + } + + /** + * @param postBoxNumber the postBoxNumber to set + */ + public void setPostBoxNumber(String postBoxNumber) { + this.postBoxNumber = postBoxNumber; + } + + /** + * @return the phoneNumber + */ + public String getPhoneNumber() { + return phoneNumber; + } + + /** + * @param phoneNumber the phoneNumber to set + */ + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + /** + * @return the idType + */ + public String getIdType() { + return idType; + } + + /** + * @param idType the idType to set + */ + public void setIdType(String idType) { + this.idType = idType; + } + + /** + * @return the idNumber + */ + public String getIdNumber() { + return idNumber; + } + + /** + * @param idNumber the idNumber to set + */ + public void setIdNumber(String idNumber) { + this.idNumber = idNumber; + } + + /** + * @return the birthDate + */ + public String getBirthDate() { + return birthDate; + } + + /** + * @param birthDate the birthDate to set + */ + public void setBirthDate(String birthDate) { + this.birthDate = birthDate; + } + + /** + * @return the gender + */ + public String getGender() { + return gender; + } + + /** + * @param gender the gender to set + */ + public void setGender(String gender) { + this.gender = gender; + } + + /** + * @return the motherName + */ + public String getMotherName() { + return motherName; + } + + /** + * @param motherName the motherName to set + */ + public void setMotherName(String motherName) { + this.motherName = motherName; + } + + /** + * @return the residentialStatus + */ + public String getResidentialStatus() { + return residentialStatus; + } + + /** + * @param residentialStatus the residentialStatus to set + */ + public void setResidentialStatus(String residentialStatus) { + this.residentialStatus = residentialStatus; + } + + /** + * @return the nationalityCode + */ + public String getNationalityCode() { + return nationalityCode; + } + + /** + * @param nationalityCode the nationalityCode to set + */ + public void setNationalityCode(String nationalityCode) { + this.nationalityCode = nationalityCode; + } + + /** + * @return the customerType + */ + public String getCustomerType() { + return customerType; + } + + /** + * @param customerType the customerType to set + */ + public void setCustomerType(String customerType) { + this.customerType = customerType; + } + + /** + * @return the title + */ + public String getTitle() { + return title; + } + + /** + * @param title the title to set + */ + public void setTitle(String title) { + this.title = title; + } + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/GLTransactionEnquiryBean.java b/IPKS_Updated/src/src/java/DataEntryBean/GLTransactionEnquiryBean.java new file mode 100644 index 0000000..5f8655a --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/GLTransactionEnquiryBean.java @@ -0,0 +1,301 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Kaushik + */ +public class GLTransactionEnquiryBean { + + private String accountNo; + private String productName; //Prod_id + private String fromDate; + private String toDate; + private String fromAmount; + private String toAmount; + + //for display + private String cbs_Ref_No; + private String transactionDate; + private String transactionType; + private String transactionAmount; + private String journalNumber; + private String screenName; + private String productCode; + private String productId; + private String gl_code; + private String gl_txn_narration; + public String tranRefSearch; + public String subpacs_id; + public String subpacs_name; + private String end_bal; + public String dest_Account_no; + public String acc_Type; + + public String getAcc_Type() { + return acc_Type; + } + + public void setAcc_Type(String acc_Type) { + this.acc_Type = acc_Type; + } + + public String getDest_Account_no() { + return dest_Account_no; + } + + public void setDest_Account_no(String dest_Account_no) { + this.dest_Account_no = dest_Account_no; + } + + + public String getEnd_bal() { + return end_bal; + } + + public void setEnd_bal(String end_bal) { + this.end_bal = end_bal; + } + + public String getSubpacs_id() { + return subpacs_id; + } + + public void setSubpacs_id(String subpacs_id) { + this.subpacs_id = subpacs_id; + } + + public String getSubpacs_name() { + return subpacs_name; + } + + public void setSubpacs_name(String subpacs_name) { + this.subpacs_name = subpacs_name; + } + + + + public String getTranRefSearch() { + return tranRefSearch; + } + + public void setTranRefSearch(String tranRefSearch) { + this.tranRefSearch = tranRefSearch; + } + + public String getGl_code() { + return gl_code; + } + + public void setGl_code(String gl_code) { + this.gl_code = gl_code; + } + + public String getGl_txn_narration() { + return gl_txn_narration; + } + + public void setGl_txn_narration(String gl_txn_narration) { + this.gl_txn_narration = gl_txn_narration; + } + /** + * @return the accountNo + */ + public String getAccountNo() { + return accountNo; + } + + /** + * @param accountNo the accountNo to set + */ + public void setAccountNo(String accountNo) { + this.accountNo = accountNo; + } + + /** + * @return the productName + */ + public String getProductName() { + return productName; + } + + /** + * @param productName the productName to set + */ + public void setProductName(String productName) { + this.productName = productName; + } + + /** + * @return the fromDate + */ + public String getFromDate() { + return fromDate; + } + + /** + * @param fromDate the fromDate to set + */ + public void setFromDate(String fromDate) { + this.fromDate = fromDate; + } + + /** + * @return the toDate + */ + public String getToDate() { + return toDate; + } + + /** + * @param toDate the toDate to set + */ + public void setToDate(String toDate) { + this.toDate = toDate; + } + + /** + * @return the fromAmount + */ + public String getFromAmount() { + return fromAmount; + } + + /** + * @param fromAmount the fromAmount to set + */ + public void setFromAmount(String fromAmount) { + this.fromAmount = fromAmount; + } + + /** + * @return the cbs_Ref_No + */ + public String getCbs_Ref_No() { + return cbs_Ref_No; + } + + /** + * @param cbs_Ref_No the cbs_Ref_No to set + */ + public void setCbs_Ref_No(String cbs_Ref_No) { + this.cbs_Ref_No = cbs_Ref_No; + } + + /** + * @return the transactionDate + */ + public String getTransactionDate() { + return transactionDate; + } + + /** + * @param transactionDate the transactionDate to set + */ + public void setTransactionDate(String transactionDate) { + this.transactionDate = transactionDate; + } + + /** + * @return the transactionType + */ + public String getTransactionType() { + return transactionType; + } + + /** + * @param transactionType the transactionType to set + */ + public void setTransactionType(String transactionType) { + this.transactionType = transactionType; + } + + /** + * @return the transactionAmount + */ + public String getTransactionAmount() { + return transactionAmount; + } + + /** + * @param transactionAmount the transactionAmount to set + */ + public void setTransactionAmount(String transactionAmount) { + this.transactionAmount = transactionAmount; + } + + /** + * @return the journalNumber + */ + public String getJournalNumber() { + return journalNumber; + } + + /** + * @param journalNumber the journalNumber to set + */ + public void setJournalNumber(String journalNumber) { + this.journalNumber = journalNumber; + } + + /** + * @return the toAmount + */ + public String getToAmount() { + return toAmount; + } + + /** + * @param toAmount the toAmount to set + */ + public void setToAmount(String toAmount) { + this.toAmount = toAmount; + } + + /** + * @return the screenName + */ + public String getScreenName() { + return screenName; + } + + /** + * @param screenName the screenName to set + */ + public void setScreenName(String screenName) { + this.screenName = screenName; + } + + /** + * @return the productCode + */ + public String getProductCode() { + return productCode; + } + + /** + * @param productCode the productCode to set + */ + public void setProductCode(String productCode) { + this.productCode = productCode; + } + + /** + * @return the productId + */ + public String getProductId() { + return productId; + } + + /** + * @param productId the productId to set + */ + public void setProductId(String productId) { + this.productId = productId; + } + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/GPSSellProcurementBean.java b/IPKS_Updated/src/src/java/DataEntryBean/GPSSellProcurementBean.java new file mode 100644 index 0000000..0f37816 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/GPSSellProcurementBean.java @@ -0,0 +1,141 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Help desk122 + */ +public class GPSSellProcurementBean { + + private String item_desc; + private String subtype_desc; + private String procId; + private String item_unit; + private String item_rateperunit; + private String qty; + private String sell_qty; + private String total; + private String commodityId; + private String item_type; + private String item_subtype; + private String stockId; + private String sellerId; + private String expenseCharges; + + public String getExpenseCharges() { + return expenseCharges; + } + + public void setExpenseCharges(String expenseCharges) { + this.expenseCharges = expenseCharges; + } + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getSellerId() { + return sellerId; + } + + public void setSellerId(String sellerId) { + this.sellerId = sellerId; + } + + public String getItem_desc() { + return item_desc; + } + + public void setItem_desc(String item_desc) { + this.item_desc = item_desc; + } + + public String getSubtype_desc() { + return subtype_desc; + } + + public void setSubtype_desc(String subtype_desc) { + this.subtype_desc = subtype_desc; + } + + public String getProcId() { + return procId; + } + + public void setProcId(String procId) { + this.procId = procId; + } + + public String getItem_unit() { + return item_unit; + } + + public void setItem_unit(String item_unit) { + this.item_unit = item_unit; + } + + public String getItem_rateperunit() { + return item_rateperunit; + } + + public void setItem_rateperunit(String item_rateperunit) { + this.item_rateperunit = item_rateperunit; + } + + public String getQty() { + return qty; + } + + public void setQty(String qty) { + this.qty = qty; + } + + public String getSell_qty() { + return sell_qty; + } + + public void setSell_qty(String sell_qty) { + this.sell_qty = sell_qty; + } + + public String getTotal() { + return total; + } + + public void setTotal(String total) { + this.total = total; + } + + public String getCommodityId() { + return commodityId; + } + + public void setCommodityId(String commodityId) { + this.commodityId = commodityId; + } + + public String getItem_type() { + return item_type; + } + + public void setItem_type(String item_type) { + this.item_type = item_type; + } + + public String getItem_subtype() { + return item_subtype; + } + + public void setItem_subtype(String item_subtype) { + this.item_subtype = item_subtype; + } + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/GPSSellRegisterBean.java b/IPKS_Updated/src/src/java/DataEntryBean/GPSSellRegisterBean.java new file mode 100644 index 0000000..7d591b1 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/GPSSellRegisterBean.java @@ -0,0 +1,145 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Help desk122 + */ +public class GPSSellRegisterBean { + + private String sellTo; + private String deliveredTo; + private String procurementCode; + private String quantity; + private String price; + private String total; + private String expense; + private String sellDate; + private String toDate; + private String fromDate; + private String itemCode; + private String itemSubTypeCode; + private String itemtypeDesc; + private String itemsubtypeDesc; + + public String getItemtypeDesc() { + return itemtypeDesc; + } + + public void setItemtypeDesc(String itemtypeDesc) { + this.itemtypeDesc = itemtypeDesc; + } + + public String getItemsubtypeDesc() { + return itemsubtypeDesc; + } + + public void setItemsubtypeDesc(String itemsubtypeDesc) { + this.itemsubtypeDesc = itemsubtypeDesc; + } + + public String getItemCode() { + return itemCode; + } + + public void setItemCode(String itemCode) { + this.itemCode = itemCode; + } + + public String getItemSubTypeCode() { + return itemSubTypeCode; + } + + public void setItemSubTypeCode(String itemSubTypeCode) { + this.itemSubTypeCode = itemSubTypeCode; + } + + public String getToDate() { + return toDate; + } + + public void setToDate(String toDate) { + this.toDate = toDate; + } + + public String getFromDate() { + return fromDate; + } + + public void setFromDate(String fromDate) { + this.fromDate = fromDate; + } + + + public String getSellTo() { + return sellTo; + } + + public void setSellTo(String sellTo) { + this.sellTo = sellTo; + } + + public String getDeliveredTo() { + return deliveredTo; + } + + public void setDeliveredTo(String deliveredTo) { + this.deliveredTo = deliveredTo; + } + + public String getProcurementCode() { + return procurementCode; + } + + public void setProcurementCode(String procurementCode) { + this.procurementCode = procurementCode; + } + + public String getQuantity() { + return quantity; + } + + public void setQuantity(String quantity) { + this.quantity = quantity; + } + + public String getPrice() { + return price; + } + + public void setPrice(String price) { + this.price = price; + } + + public String getTotal() { + return total; + } + + public void setTotal(String total) { + this.total = total; + } + + public String getExpense() { + return expense; + } + + public void setExpense(String expense) { + this.expense = expense; + } + + public String getSellDate() { + return sellDate; + } + + public void setSellDate(String sellDate) { + this.sellDate = sellDate; + } + + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/GlAccountEnquiryBean.java b/IPKS_Updated/src/src/java/DataEntryBean/GlAccountEnquiryBean.java new file mode 100644 index 0000000..2d54fbc --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/GlAccountEnquiryBean.java @@ -0,0 +1,285 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Shubhrangshu + */ +public class GlAccountEnquiryBean { + + private String accountNo; + private String fromDate; + private String toDate; + private String productName; + private String fromAmount; + private String toAmount; + private String productId; + //for display + private String accountOpenDate; + private String cumulativeBalance; + private String screenName; + private String prinOutstanding; + private String inttOutstanding; + private String ledgerName; + private String status; + private String cglCode; + private String cglName; + private String subpacs_id; + private String subpacs_name; + private String prodName; + + + public String getProdName() { + return prodName; + } + + public void setProdName(String prodName) { + this.prodName = prodName; + } + + public String getSubpacs_id() { + return subpacs_id; + } + + public void setSubpacs_id(String subpacs_id) { + this.subpacs_id = subpacs_id; + } + + public String getSubpacs_name() { + return subpacs_name; + } + + public void setSubpacs_name(String subpacs_name) { + this.subpacs_name = subpacs_name; + } + + + + /** + * @return the accountNo + */ + public String getAccountNo() { + return accountNo; + } + + /** + * @param accountNo the accountNo to set + */ + public void setAccountNo(String accountNo) { + this.accountNo = accountNo; + } + + /** + * @return the fromDate + */ + public String getFromDate() { + return fromDate; + } + + /** + * @param fromDate the fromDate to set + */ + public void setFromDate(String fromDate) { + this.fromDate = fromDate; + } + + /** + * @return the toDate + */ + public String getToDate() { + return toDate; + } + + /** + * @param toDate the toDate to set + */ + public void setToDate(String toDate) { + this.toDate = toDate; + } + + /** + * @return the productName + */ + public String getProductName() { + return productName; + } + + /** + * @param productName the productName to set + */ + public void setProductName(String productName) { + this.productName = productName; + } + + /** + * @return the accountOpenDate + */ + public String getAccountOpenDate() { + return accountOpenDate; + } + + /** + * @param accountOpenDate the accountOpenDate to set + */ + public void setAccountOpenDate(String accountOpenDate) { + this.accountOpenDate = accountOpenDate; + } + + /** + * @return the fromAmount + */ + public String getFromAmount() { + return fromAmount; + } + + /** + * @param fromAmount the fromAmount to set + */ + public void setFromAmount(String fromAmount) { + this.fromAmount = fromAmount; + } + + /** + * @return the toAmount + */ + public String getToAmount() { + return toAmount; + } + + /** + * @param toAmount the toAmount to set + */ + public void setToAmount(String toAmount) { + this.toAmount = toAmount; + } + + /** + * @return the screenName + */ + public String getScreenName() { + return screenName; + } + + /** + * @param screenName the screenName to set + */ + public void setScreenName(String screenName) { + this.screenName = screenName; + } + + /** + * @return the prinOutstanding + */ + public String getPrinOutstanding() { + return prinOutstanding; + } + + /** + * @param prinOutstanding the prinOutstanding to set + */ + public void setPrinOutstanding(String prinOutstanding) { + this.prinOutstanding = prinOutstanding; + } + + /** + * @return the inttOutstanding + */ + public String getInttOutstanding() { + return inttOutstanding; + } + + /** + * @param inttOutstanding the inttOutstanding to set + */ + public void setInttOutstanding(String inttOutstanding) { + this.inttOutstanding = inttOutstanding; + } + + /** + * @return the ledgerName + */ + public String getLedgerName() { + return ledgerName; + } + + /** + * @param ledgerName the ledgerName to set + */ + public void setLedgerName(String ledgerName) { + this.ledgerName = ledgerName; + } + + /** + * @return the productId + */ + public String getProductId() { + return productId; + } + + /** + * @param productId the productId to set + */ + public void setProductId(String productId) { + this.productId = productId; + } + + /** + * @return the cumulativeBalance + */ + public String getCumulativeBalance() { + return cumulativeBalance; + } + + /** + * @param cumulativeBalance the cumulativeBalance to set + */ + public void setCumulativeBalance(String cumulativeBalance) { + this.cumulativeBalance = cumulativeBalance; + } + + /** + * @return the status + */ + public String getStatus() { + return status; + } + + /** + * @param status the status to set + */ + public void setStatus(String status) { + this.status = status; + } + + /** + * @return the cglCode + */ + public String getCglCode() { + return cglCode; + } + + /** + * @param cglCode the cglCode to set + */ + public void setCglCode(String cglCode) { + this.cglCode = cglCode; + } + + /** + * @return the cglName + */ + public String getCglName() { + return cglName; + } + + /** + * @param cglName the cglName to set + */ + public void setCglName(String cglName) { + this.cglName = cglName; + } +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/GlProductOperationBean.java b/IPKS_Updated/src/src/java/DataEntryBean/GlProductOperationBean.java new file mode 100644 index 0000000..c562add --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/GlProductOperationBean.java @@ -0,0 +1,444 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Helpdesk10 + */ +public class GlProductOperationBean { + + //For Create Div + private String effectDate; + private String status; + private String glName; + private String glCode; + private String glType; + private String productType; + private String inttCategory; + private String glDescription; + private String segmentCode; + private String component1; + private String component2; + private String applicableFor; + + //For Amend Div + private String effectDateAmend; + private String statusAmend; + private String glNameAmend; + private String glCodeAmend; + private String glTypeAmend; + private String productTypeAmend; + private String inttCategoryAmend; + private String glDescriptionAmend; + private String segmentCodeAmend; + private String component1Amend; + private String component2Amend; + private String applicableForAmend; + private String gl_product_id; + private String bglCodeSearch; + private String headAccType; + private String headAccTypeAmend; + + public String getHeadAccType() { + return headAccType; + } + + public void setHeadAccType(String headAccType) { + this.headAccType = headAccType; + } + + public String getHeadAccTypeAmend() { + return headAccTypeAmend; + } + + public void setHeadAccTypeAmend(String headAccTypeAmend) { + this.headAccTypeAmend = headAccTypeAmend; + } + + + //For Active Deactive Div + private String bglCodeActivation; + + /** + * @return the effectDate + */ + public String getEffectDate() { + return effectDate; + } + + /** + * @param effectDate the effectDate to set + */ + public void setEffectDate(String effectDate) { + this.effectDate = effectDate; + } + + /** + * @return the status + */ + public String getStatus() { + return status; + } + + /** + * @param status the status to set + */ + public void setStatus(String status) { + this.status = status; + } + + /** + * @return the glName + */ + public String getGlName() { + return glName; + } + + /** + * @param glName the glName to set + */ + public void setGlName(String glName) { + this.glName = glName; + } + + /** + * @return the glCode + */ + public String getGlCode() { + return glCode; + } + + /** + * @param glCode the glCode to set + */ + public void setGlCode(String glCode) { + this.glCode = glCode; + } + + /** + * @return the glType + */ + public String getGlType() { + return glType; + } + + /** + * @param glType the glType to set + */ + public void setGlType(String glType) { + this.glType = glType; + } + + /** + * @return the productType + */ + public String getProductType() { + return productType; + } + + /** + * @param productType the productType to set + */ + public void setProductType(String productType) { + this.productType = productType; + } + + /** + * @return the inttCategory + */ + public String getInttCategory() { + return inttCategory; + } + + /** + * @param inttCategory the inttCategory to set + */ + public void setInttCategory(String inttCategory) { + this.inttCategory = inttCategory; + } + + /** + * @return the glDescription + */ + public String getGlDescription() { + return glDescription; + } + + /** + * @param glDescription the glDescription to set + */ + public void setGlDescription(String glDescription) { + this.glDescription = glDescription; + } + + /** + * @return the segmentCode + */ + public String getSegmentCode() { + return segmentCode; + } + + /** + * @param segmentCode the segmentCode to set + */ + public void setSegmentCode(String segmentCode) { + this.segmentCode = segmentCode; + } + + /** + * @return the component1 + */ + public String getComponent1() { + return component1; + } + + /** + * @param component1 the component1 to set + */ + public void setComponent1(String component1) { + this.component1 = component1; + } + + /** + * @return the component2 + */ + public String getComponent2() { + return component2; + } + + /** + * @param component2 the component2 to set + */ + public void setComponent2(String component2) { + this.component2 = component2; + } + + /** + * @return the applicableFor + */ + public String getApplicableFor() { + return applicableFor; + } + + /** + * @param applicableFor the applicableFor to set + */ + public void setApplicableFor(String applicableFor) { + this.applicableFor = applicableFor; + } + + /** + * @return the gl_product_id + */ + public String getGl_product_id() { + return gl_product_id; + } + + /** + * @param gl_product_id the gl_product_id to set + */ + public void setGl_product_id(String gl_product_id) { + this.gl_product_id = gl_product_id; + } + + /** + * @return the bglCodeSearch + */ + public String getBglCodeSearch() { + return bglCodeSearch; + } + + /** + * @param bglCodeSearch the bglCodeSearch to set + */ + public void setBglCodeSearch(String bglCodeSearch) { + this.bglCodeSearch = bglCodeSearch; + } + + /** + * @return the effectDateAmend + */ + public String getEffectDateAmend() { + return effectDateAmend; + } + + /** + * @param effectDateAmend the effectDateAmend to set + */ + public void setEffectDateAmend(String effectDateAmend) { + this.effectDateAmend = effectDateAmend; + } + + /** + * @return the statusAmend + */ + public String getStatusAmend() { + return statusAmend; + } + + /** + * @param statusAmend the statusAmend to set + */ + public void setStatusAmend(String statusAmend) { + this.statusAmend = statusAmend; + } + + /** + * @return the glNameAmend + */ + public String getGlNameAmend() { + return glNameAmend; + } + + /** + * @param glNameAmend the glNameAmend to set + */ + public void setGlNameAmend(String glNameAmend) { + this.glNameAmend = glNameAmend; + } + + /** + * @return the glCodeAmend + */ + public String getGlCodeAmend() { + return glCodeAmend; + } + + /** + * @param glCodeAmend the glCodeAmend to set + */ + public void setGlCodeAmend(String glCodeAmend) { + this.glCodeAmend = glCodeAmend; + } + + /** + * @return the glTypeAmend + */ + public String getGlTypeAmend() { + return glTypeAmend; + } + + /** + * @param glTypeAmend the glTypeAmend to set + */ + public void setGlTypeAmend(String glTypeAmend) { + this.glTypeAmend = glTypeAmend; + } + + /** + * @return the productTypeAmend + */ + public String getProductTypeAmend() { + return productTypeAmend; + } + + /** + * @param productTypeAmend the productTypeAmend to set + */ + public void setProductTypeAmend(String productTypeAmend) { + this.productTypeAmend = productTypeAmend; + } + + /** + * @return the inttCategoryAmend + */ + public String getInttCategoryAmend() { + return inttCategoryAmend; + } + + /** + * @param inttCategoryAmend the inttCategoryAmend to set + */ + public void setInttCategoryAmend(String inttCategoryAmend) { + this.inttCategoryAmend = inttCategoryAmend; + } + + /** + * @return the glDescriptionAmend + */ + public String getGlDescriptionAmend() { + return glDescriptionAmend; + } + + /** + * @param glDescriptionAmend the glDescriptionAmend to set + */ + public void setGlDescriptionAmend(String glDescriptionAmend) { + this.glDescriptionAmend = glDescriptionAmend; + } + + /** + * @return the segmentCodeAmend + */ + public String getSegmentCodeAmend() { + return segmentCodeAmend; + } + + /** + * @param segmentCodeAmend the segmentCodeAmend to set + */ + public void setSegmentCodeAmend(String segmentCodeAmend) { + this.segmentCodeAmend = segmentCodeAmend; + } + + /** + * @return the component1Amend + */ + public String getComponent1Amend() { + return component1Amend; + } + + /** + * @param component1Amend the component1Amend to set + */ + public void setComponent1Amend(String component1Amend) { + this.component1Amend = component1Amend; + } + + /** + * @return the component2Amend + */ + public String getComponent2Amend() { + return component2Amend; + } + + /** + * @param component2Amend the component2Amend to set + */ + public void setComponent2Amend(String component2Amend) { + this.component2Amend = component2Amend; + } + + /** + * @return the applicableForAmend + */ + public String getApplicableForAmend() { + return applicableForAmend; + } + + /** + * @param applicableForAmend the applicableForAmend to set + */ + public void setApplicableForAmend(String applicableForAmend) { + this.applicableForAmend = applicableForAmend; + } + + /** + * @return the bglCodeActivation + */ + public String getBglCodeActivation() { + return bglCodeActivation; + } + + /** + * @param bglCodeActivation the bglCodeActivation to set + */ + public void setBglCodeActivation(String bglCodeActivation) { + this.bglCodeActivation = bglCodeActivation; + } + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/GliffDepositReportBean.java b/IPKS_Updated/src/src/java/DataEntryBean/GliffDepositReportBean.java new file mode 100644 index 0000000..915448d --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/GliffDepositReportBean.java @@ -0,0 +1,138 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Shubhrangshu + */ +public class GliffDepositReportBean { + + public String fromDate; + // public String JR_DT; + + + public String TXN_REF_NO; + public String TRAN_DATE; + public String PACS_ID; + public String POST_DATE; + public String GL_CLASS_CODE; + public String TXN_AMT; + public String TXN_IND; + public String ACCT_TYPE; + + public String PROD_NAME; + public String PROD_CODE; + public String INTT_CAT; + public String KEY_1; + + public String getACCT_TYPE() { + return ACCT_TYPE; + } + + public void setACCT_TYPE(String ACCT_TYPE) { + this.ACCT_TYPE = ACCT_TYPE; + } + + + + public String getGL_CLASS_CODE() { + return GL_CLASS_CODE; + } + + public void setGL_CLASS_CODE(String GL_CLASS_CODE) { + this.GL_CLASS_CODE = GL_CLASS_CODE; + } + + public String getINTT_CAT() { + return INTT_CAT; + } + + public void setINTT_CAT(String INTT_CAT) { + this.INTT_CAT = INTT_CAT; + } + + + public String getKEY_1() { + return KEY_1; + } + + public void setKEY_1(String KEY_1) { + this.KEY_1 = KEY_1; + } + + public String getPACS_ID() { + return PACS_ID; + } + + public void setPACS_ID(String PACS_ID) { + this.PACS_ID = PACS_ID; + } + + public String getPOST_DATE() { + return POST_DATE; + } + + public void setPOST_DATE(String POST_DATE) { + this.POST_DATE = POST_DATE; + } + + public String getPROD_CODE() { + return PROD_CODE; + } + + public void setPROD_CODE(String PROD_CODE) { + this.PROD_CODE = PROD_CODE; + } + + public String getPROD_NAME() { + return PROD_NAME; + } + + public void setPROD_NAME(String PROD_NAME) { + this.PROD_NAME = PROD_NAME; + } + + public String getTRAN_DATE() { + return TRAN_DATE; + } + + public void setTRAN_DATE(String TRAN_DATE) { + this.TRAN_DATE = TRAN_DATE; + } + + public String getTXN_AMT() { + return TXN_AMT; + } + + public void setTXN_AMT(String TXN_AMT) { + this.TXN_AMT = TXN_AMT; + } + + public String getTXN_IND() { + return TXN_IND; + } + + public void setTXN_IND(String TXN_IND) { + this.TXN_IND = TXN_IND; + } + + public String getTXN_REF_NO() { + return TXN_REF_NO; + } + + public void setTXN_REF_NO(String TXN_REF_NO) { + this.TXN_REF_NO = TXN_REF_NO; + } + + public String getFromDate() { + return fromDate; + } + + public void setFromDate(String fromDate) { + this.fromDate = fromDate; + } +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/GodownBean.java b/IPKS_Updated/src/src/java/DataEntryBean/GodownBean.java new file mode 100644 index 0000000..3e4cfa5 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/GodownBean.java @@ -0,0 +1,144 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 1319106 + */ +public class GodownBean { + //create + private String godown_id; + private String name; + private String address; + private String contactperson; + private String phone; + private String capacity; + private String avcapacity; + + //amend + private String godown_idAmend; + private String nameAmend; + private String addressAmend; + private String contactpersonAmend; + private String phoneAmend; + private String capacityAmend; + private String avcapacityAmend; + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getAddressAmend() { + return addressAmend; + } + + public void setAddressAmend(String addressAmend) { + this.addressAmend = addressAmend; + } + + public String getAvcapacity() { + return avcapacity; + } + + public void setAvcapacity(String avcapacity) { + this.avcapacity = avcapacity; + } + + public String getAvcapacityAmend() { + return avcapacityAmend; + } + + public void setAvcapacityAmend(String avcapacityAmend) { + this.avcapacityAmend = avcapacityAmend; + } + + public String getCapacity() { + return capacity; + } + + public void setCapacity(String capacity) { + this.capacity = capacity; + } + + public String getCapacityAmend() { + return capacityAmend; + } + + public void setCapacityAmend(String capacityAmend) { + this.capacityAmend = capacityAmend; + } + + public String getContactperson() { + return contactperson; + } + + public void setContactperson(String contactperson) { + this.contactperson = contactperson; + } + + public String getContactpersonAmend() { + return contactpersonAmend; + } + + public void setContactpersonAmend(String contactpersonAmend) { + this.contactpersonAmend = contactpersonAmend; + } + + public String getGodown_id() { + return godown_id; + } + + public void setGodown_id(String godown_id) { + this.godown_id = godown_id; + } + + public String getGodown_idAmend() { + return godown_idAmend; + } + + public void setGodown_idAmend(String godown_idAmend) { + this.godown_idAmend = godown_idAmend; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getNameAmend() { + return nameAmend; + } + + public void setNameAmend(String nameAmend) { + this.nameAmend = nameAmend; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getPhoneAmend() { + return phoneAmend; + } + + public void setPhoneAmend(String phoneAmend) { + this.phoneAmend = phoneAmend; + } + + +} \ No newline at end of file diff --git a/IPKS_Updated/src/src/java/DataEntryBean/GovtOrderCreationDetailBean.java b/IPKS_Updated/src/src/java/DataEntryBean/GovtOrderCreationDetailBean.java new file mode 100644 index 0000000..c8c8671 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/GovtOrderCreationDetailBean.java @@ -0,0 +1,219 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Help desk122 + */ +public class GovtOrderCreationDetailBean { + + private String item_desc; + private String subtype_desc; + private String item_unit; + private String qty; + private String item_rateperunit; + private String total; + private String commodityId; + private String item_type; + private String item_subtype; + + private String govtOrderId_Dtl; + + + private String item_descAmend; + private String subtype_descAmend; + private String item_unitAmend; + private String qtyAmend; + private String item_rateperunitAmend; + private String totalAmend; + private String commodityIdAmend; + private String item_typeAmend; + private String item_subtypeAmend; + private String detailIDAmend; + + private String detailID; + + public String getDetailID() { + return detailID; + } + + public void setDetailID(String detailID) { + this.detailID = detailID; + } + + + + + public String getDetailIDAmend() { + return detailIDAmend; + } + + public void setDetailIDAmend(String detailIDAmend) { + this.detailIDAmend = detailIDAmend; + } + + + + public String getCommodityIdAmend() { + return commodityIdAmend; + } + + public void setCommodityIdAmend(String commodityIdAmend) { + this.commodityIdAmend = commodityIdAmend; + } + + public String getItem_descAmend() { + return item_descAmend; + } + + public void setItem_descAmend(String item_descAmend) { + this.item_descAmend = item_descAmend; + } + + public String getItem_rateperunitAmend() { + return item_rateperunitAmend; + } + + public void setItem_rateperunitAmend(String item_rateperunitAmend) { + this.item_rateperunitAmend = item_rateperunitAmend; + } + + public String getItem_subtypeAmend() { + return item_subtypeAmend; + } + + public void setItem_subtypeAmend(String item_subtypeAmend) { + this.item_subtypeAmend = item_subtypeAmend; + } + + public String getItem_typeAmend() { + return item_typeAmend; + } + + public void setItem_typeAmend(String item_typeAmend) { + this.item_typeAmend = item_typeAmend; + } + + public String getItem_unitAmend() { + return item_unitAmend; + } + + public void setItem_unitAmend(String item_unitAmend) { + this.item_unitAmend = item_unitAmend; + } + + public String getQtyAmend() { + return qtyAmend; + } + + public void setQtyAmend(String qtyAmend) { + this.qtyAmend = qtyAmend; + } + + public String getSubtype_descAmend() { + return subtype_descAmend; + } + + public void setSubtype_descAmend(String subtype_descAmend) { + this.subtype_descAmend = subtype_descAmend; + } + + public String getTotalAmend() { + return totalAmend; + } + + public void setTotalAmend(String totalAmend) { + this.totalAmend = totalAmend; + } + + + + public String getGovtOrderId_Dtl() { + return govtOrderId_Dtl; + } + + public void setGovtOrderId_Dtl(String govtOrderId_Dtl) { + this.govtOrderId_Dtl = govtOrderId_Dtl; + } + + + + public String getItem_desc() { + return item_desc; + } + + public void setItem_desc(String item_desc) { + this.item_desc = item_desc; + } + + public String getSubtype_desc() { + return subtype_desc; + } + + public void setSubtype_desc(String subtype_desc) { + this.subtype_desc = subtype_desc; + } + + public String getItem_unit() { + return item_unit; + } + + public void setItem_unit(String item_unit) { + this.item_unit = item_unit; + } + + public String getQty() { + return qty; + } + + public void setQty(String qty) { + this.qty = qty; + } + + public String getItem_rateperunit() { + return item_rateperunit; + } + + public void setItem_rateperunit(String item_rateperunit) { + this.item_rateperunit = item_rateperunit; + } + + public String getTotal() { + return total; + } + + public void setTotal(String total) { + this.total = total; + } + + public String getCommodityId() { + return commodityId; + } + + public void setCommodityId(String commodityId) { + this.commodityId = commodityId; + } + + public String getItem_type() { + return item_type; + } + + public void setItem_type(String item_type) { + this.item_type = item_type; + } + + public String getItem_subtype() { + return item_subtype; + } + + public void setItem_subtype(String item_subtype) { + this.item_subtype = item_subtype; + } + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/GovtOrderCreationExpenseBean.java b/IPKS_Updated/src/src/java/DataEntryBean/GovtOrderCreationExpenseBean.java new file mode 100644 index 0000000..6316775 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/GovtOrderCreationExpenseBean.java @@ -0,0 +1,182 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Help desk122 + */ +public class GovtOrderCreationExpenseBean { + + private String expense_head; + private String expense_unit; + private String expense_rate_per_unit; + private String expense_total; + + private String sell; + private String deliver; + private String address; + private String govtOrderId; + private String govtOrderCode; + + private String expenseIDAmend; + + private String expense_headAmend; + private String expense_unitAmend; + private String expense_rate_per_unitAmend; + private String expense_totalAmend; + + private String expense_total_individual; + private String expense_total_grand; + + private String commissionRate; + + public String getCommissionRate() { + return commissionRate; + } + + public void setCommissionRate(String commissionRate) { + this.commissionRate = commissionRate; + } + + public String getExpense_total_grand() { + return expense_total_grand; + } + + public void setExpense_total_grand(String expense_total_grand) { + this.expense_total_grand = expense_total_grand; + } + + public String getExpense_total_individual() { + return expense_total_individual; + } + + public void setExpense_total_individual(String expense_total_individual) { + this.expense_total_individual = expense_total_individual; + } + + public String getExpense_totalAmend() { + return expense_totalAmend; + } + + public void setExpense_totalAmend(String expense_totalAmend) { + this.expense_totalAmend = expense_totalAmend; + } + + + + public String getExpense_headAmend() { + return expense_headAmend; + } + + public void setExpense_headAmend(String expense_headAmend) { + this.expense_headAmend = expense_headAmend; + } + + public String getExpense_rate_per_unitAmend() { + return expense_rate_per_unitAmend; + } + + public void setExpense_rate_per_unitAmend(String expense_rate_per_unitAmend) { + this.expense_rate_per_unitAmend = expense_rate_per_unitAmend; + } + + public String getExpense_unitAmend() { + return expense_unitAmend; + } + + public void setExpense_unitAmend(String expense_unitAmend) { + this.expense_unitAmend = expense_unitAmend; + } + + + + public String getExpenseIDAmend() { + return expenseIDAmend; + } + + public void setExpenseIDAmend(String expenseIDAmend) { + this.expenseIDAmend = expenseIDAmend; + } + + + + public String getSell() { + return sell; + } + + public void setSell(String sell) { + this.sell = sell; + } + + public String getDeliver() { + return deliver; + } + + public void setDeliver(String deliver) { + this.deliver = deliver; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getGovtOrderId() { + return govtOrderId; + } + + public void setGovtOrderId(String govtOrderId) { + this.govtOrderId = govtOrderId; + } + + public String getGovtOrderCode() { + return govtOrderCode; + } + + public void setGovtOrderCode(String govtOrderCode) { + this.govtOrderCode = govtOrderCode; + } + + public String getExpense_total() { + return expense_total; + } + + public void setExpense_total(String expense_total) { + this.expense_total = expense_total; + } + + public String getExpense_head() { + return expense_head; + } + + public void setExpense_head(String expense_head) { + this.expense_head = expense_head; + } + + public String getExpense_unit() { + return expense_unit; + } + + public void setExpense_unit(String expense_unit) { + this.expense_unit = expense_unit; + } + + public String getExpense_rate_per_unit() { + return expense_rate_per_unit; + } + + public void setExpense_rate_per_unit(String expense_rate_per_unit) { + this.expense_rate_per_unit = expense_rate_per_unit; + } + + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/GovtOrderCreationHeaderBean.java b/IPKS_Updated/src/src/java/DataEntryBean/GovtOrderCreationHeaderBean.java new file mode 100644 index 0000000..68130af --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/GovtOrderCreationHeaderBean.java @@ -0,0 +1,138 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Help desk122 + */ +public class GovtOrderCreationHeaderBean { + + private String govtOrderCodeCreate; + private String govtOrderDesc; + private String procStartDate; + private String procEndDate; + private String govtCommission; + + private String govtOrderCodeCreateAmend; + private String govtOrderDescAmend; + private String procStartDateAmend; + private String procEndDateAmend; + private String govtCommissionAmend; + + private String govtOrderId; + private String orderidAmend; + + + public String getOrderidAmend() { + return orderidAmend; + } + + public void setOrderidAmend(String orderidAmend) { + this.orderidAmend = orderidAmend; + } + + public String getGovtCommissionAmend() { + return govtCommissionAmend; + } + + public void setGovtCommissionAmend(String govtCommissionAmend) { + this.govtCommissionAmend = govtCommissionAmend; + } + + + + public String getGovtOrderId() { + return govtOrderId; + } + + public void setGovtOrderId(String govtOrderId) { + this.govtOrderId = govtOrderId; + } + + + + + + + + public String getGovtOrderCodeCreateAmend() { + return govtOrderCodeCreateAmend; + } + + public void setGovtOrderCodeCreateAmend(String govtOrderCodeCreateAmend) { + this.govtOrderCodeCreateAmend = govtOrderCodeCreateAmend; + } + + public String getGovtOrderDescAmend() { + return govtOrderDescAmend; + } + + public void setGovtOrderDescAmend(String govtOrderDescAmend) { + this.govtOrderDescAmend = govtOrderDescAmend; + } + + public String getProcStartDateAmend() { + return procStartDateAmend; + } + + public void setProcStartDateAmend(String procStartDateAmend) { + this.procStartDateAmend = procStartDateAmend; + } + + public String getProcEndDateAmend() { + return procEndDateAmend; + } + + public void setProcEndDateAmend(String procEndDateAmend) { + this.procEndDateAmend = procEndDateAmend; + } + + + + public String getGovtOrderCodeCreate() { + return govtOrderCodeCreate; + } + + public void setGovtOrderCodeCreate(String govtOrderCodeCreate) { + this.govtOrderCodeCreate = govtOrderCodeCreate; + } + + public String getGovtOrderDesc() { + return govtOrderDesc; + } + + public void setGovtOrderDesc(String govtOrderDesc) { + this.govtOrderDesc = govtOrderDesc; + } + + public String getProcStartDate() { + return procStartDate; + } + + public void setProcStartDate(String procStartDate) { + this.procStartDate = procStartDate; + } + + public String getProcEndDate() { + return procEndDate; + } + + public void setProcEndDate(String procEndDate) { + this.procEndDate = procEndDate; + } + + public String getGovtCommission() { + return govtCommission; + } + + public void setGovtCommission(String govtCommission) { + this.govtCommission = govtCommission; + } + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/InvestmentCreationBean.java b/IPKS_Updated/src/src/java/DataEntryBean/InvestmentCreationBean.java new file mode 100644 index 0000000..3684a6a --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/InvestmentCreationBean.java @@ -0,0 +1,98 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 981898 + */ +public class InvestmentCreationBean { + + String acno; + String bank_name; + String branch_name; + String amt; + String mat_amt; + String ac_opn_dt; + String int_rate; + String mat_dt; + String active_flag; + + public String getAcno() { + return acno; + } + + public void setAcno(String acno) { + this.acno = acno; + } + + + public String getAc_opn_dt() { + return ac_opn_dt; + } + + public void setAc_opn_dt(String ac_opn_dt) { + this.ac_opn_dt = ac_opn_dt; + } + + public String getActive_flag() { + return active_flag; + } + + public void setActive_flag(String active_flag) { + this.active_flag = active_flag; + } + + public String getAmt() { + return amt; + } + + public void setAmt(String amt) { + this.amt = amt; + } + + public String getBank_name() { + return bank_name; + } + + public void setBank_name(String bank_name) { + this.bank_name = bank_name; + } + + public String getBranch_name() { + return branch_name; + } + + public void setBranch_name(String branch_name) { + this.branch_name = branch_name; + } + + public String getMat_amt() { + return mat_amt; + } + + public void setMat_amt(String mat_amt) { + this.mat_amt = mat_amt; + } + + public String getMat_dt() { + return mat_dt; + } + + public void setMat_dt(String mat_dt) { + this.mat_dt = mat_dt; + } + + public String getInt_rate() { + return int_rate; + } + + public void setInt_rate(String int_rate) { + this.int_rate = int_rate; + } + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/ItemProcurementBean.java b/IPKS_Updated/src/src/java/DataEntryBean/ItemProcurementBean.java new file mode 100644 index 0000000..b876bc0 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/ItemProcurementBean.java @@ -0,0 +1,112 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Helpdesk10 + */ +public class ItemProcurementBean { + + + private String musterRollId; + private String name; + private String govtProcCode; + private String itemType; + private String itemSubType; + private String ratePerUnit; + private String qtyunit; + private String qty; + private String total; + private String commodityId; + + public String getCommodityId() { + return commodityId; + } + + public void setCommodityId(String commodityId) { + this.commodityId = commodityId; + } + + + + public String getMusterRollId() { + return musterRollId; + } + + public void setMusterRollId(String musterRollId) { + this.musterRollId = musterRollId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getGovtProcCode() { + return govtProcCode; + } + + public void setGovtProcCode(String govtProcCode) { + this.govtProcCode = govtProcCode; + } + + public String getItemType() { + return itemType; + } + + public void setItemType(String itemType) { + this.itemType = itemType; + } + + public String getItemSubType() { + return itemSubType; + } + + public void setItemSubType(String itemSubType) { + this.itemSubType = itemSubType; + } + + public String getRatePerUnit() { + return ratePerUnit; + } + + public void setRatePerUnit(String ratePerUnit) { + this.ratePerUnit = ratePerUnit; + } + + public String getQtyunit() { + return qtyunit; + } + + public void setQtyunit(String qtyunit) { + this.qtyunit = qtyunit; + } + + + + public String getQty() { + return qty; + } + + public void setQty(String qty) { + this.qty = qty; + } + + public String getTotal() { + return total; + } + + public void setTotal(String total) { + this.total = total; + } + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/JasperReportBean.java b/IPKS_Updated/src/src/java/DataEntryBean/JasperReportBean.java new file mode 100644 index 0000000..fa54ba0 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/JasperReportBean.java @@ -0,0 +1,329 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +import java.io.Serializable; +import java.lang.reflect.Method; +import java.util.HashMap; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + +/** + * + * @author Tcs Helpdesk10 + */ +public class ReportBean { + + + + private String downloadOption; + private String pacs_id ; + private String date; + private String dccb_code; + private String refID; + private String accno; + + private String fromDate; + private String toDate; + private String shg_id; + private String from_date; + private String to_date; + private String distCode; + private String txn_date; + public String subpacs_id; + public String cbs_ref_no; + public String auth_id; + public String prod_id; + public String productId; + public String imgPath; + public String gl_id; + public String fileId; + public String code; + public String pacs_code; + public String empId; + public String yyyymm; + + + public String getEmpId() { + return empId; + } + + public void setEmpId(String empId) { + this.empId = empId; + } + + public String getYyyymm() { + return yyyymm; + } + + public void setYyyymm(String yyyymm) { + this.yyyymm = yyyymm; + } + + public String getPacs_code() { + return pacs_code; + } + + public void setPacs_code(String pacs_code) { + this.pacs_code = pacs_code; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getFileId() { + return fileId; + } + + public void setFileId(String fileId) { + this.fileId = fileId; + } + + public String getGl_id() { + return gl_id; + } + + public void setGl_id(String gl_id) { + this.gl_id = gl_id; + } + + public String getAccno() { + return accno; + } + + public void setAccno(String accno) { + this.accno = accno; + } + + public String getImgPath() { + return imgPath; + } + + public void setImgPath(String imgPath) { + this.imgPath = imgPath; + } + + public String getAccNo() { + return accNo; + } + + public void setAccNo(String accNo) { + this.accNo = accNo; + } + public String accNo; + + + public String getProductId() { + return productId; + } + + public void setProductId(String productId) { + this.productId = productId; + } + + public String getProd_id() { + return prod_id; + } + + public void setProd_id(String prod_id) { + this.prod_id = prod_id; + } + + public String getAuth_id() { + return auth_id; + } + + public void setAuth_id(String auth_id) { + this.auth_id = auth_id; + } + + public String getCbs_ref_no() { + return cbs_ref_no; + } + + public void setCbs_ref_no(String cbs_ref_no) { + this.cbs_ref_no = cbs_ref_no; + } + + public String getSubpacs_id() { + return subpacs_id; + } + + public void setSubpacs_id(String subpacs_id) { + this.subpacs_id = subpacs_id; + } + + + public String getTxn_date() { + return txn_date; + } + + public void setTxn_date(String txn_date) { + this.txn_date = txn_date; + } + + + + public String getDate() { + return date; + } + + public void setDate(String date) { + this.date = date; + } + + + + public String getDistCode() { + return distCode; + } + + public void setDistCode(String distCode) { + this.distCode = distCode; + } + + + + public String getFrom_date() { + return from_date; + } + + public void setFrom_date(String from_date) { + this.from_date = from_date; + } + + public String getTo_date() { + return to_date; + } + + public void setTo_date(String to_date) { + this.to_date = to_date; + } + + + + public String getShg_id() { + return shg_id; + } + + public void setShg_id(String shg_id) { + this.shg_id = shg_id; + } + + + public String getFromDate() { + return fromDate; + } + + public void setFromDate(String fromDate) { + this.fromDate = fromDate; + } + + public String getToDate() { + return toDate; + } + + public void setToDate(String toDate) { + this.toDate = toDate; + } + + + + public String getRefID() { + return refID; + } + + public void setRefID(String refID) { + this.refID = refID; + } + + + + + public String getDownloadOption() { + return downloadOption; + } + + public void setDownloadOption(String newDownloadOption) { + this.downloadOption = newDownloadOption; + } + + /** + * @return the pacs_id + */ + public String getPacs_id() { + return pacs_id; + } + + /** + * @param pacs_id the pacs_id to set + */ + public void setPacs_id(String pacs_id) { + this.pacs_id = pacs_id; + } + + /** + * @return the txn_date + */ + + + /** + * @return the dccb_code + */ + public String getDccb_code() { + return dccb_code; + } + + /** + * @param dccb_code the dccb_code to set + */ + public void setDccb_code(String dccb_code) { + this.dccb_code = dccb_code; + } + + + + public Serializable getData(HttpServletRequest req) { + HashMap data = new HashMap(); + Class BeanClass = this.getClass(); + //if (logger.isInfoEnabled()) logger.info("Form Bean Class "+formBeanClass); + Method[] methods = BeanClass.getDeclaredMethods(); + Object val; + String methodName; + StringBuffer fieldName = new StringBuffer(); + for (int i = 0; i < methods.length; i++) { + methodName = methods[i].getName(); + if (!methodName.startsWith("get")) { + continue; + } + if (methods[i].getParameterTypes().length > 0) { + continue; + } + try { + val = methods[i].invoke(this, null); + if (null != val && val instanceof String && ((String) val).trim().length() == 0) { + val = null; + } + + fieldName.append(methodName.substring(3, 4).toLowerCase()); + fieldName.append(methodName.substring(4)); + + data.put(fieldName.toString(), val); + fieldName.delete(0, fieldName.length()); + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } + } + return (Serializable) data; + } + + } diff --git a/IPKS_Updated/src/src/java/DataEntryBean/LeaseCommodityBean.java b/IPKS_Updated/src/src/java/DataEntryBean/LeaseCommodityBean.java new file mode 100644 index 0000000..8576a58 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/LeaseCommodityBean.java @@ -0,0 +1,117 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 594267 + */ +public class LeaseCommodityBean { + + private String custID; + private String noOfUnits; + private String trmLen; + private String totPayDue; + private String secAmt; + private String pricePerUnit; + private String prod_Id;//prod_id + private String priceFreq; + private String tdLeaseID; + private String tranType; + private String rentAmt; + + public String getRentAmt() { + return rentAmt; + } + + public void setRentAmt(String rentAmt) { + this.rentAmt = rentAmt; + } + + public String getTranType() { + return tranType; + } + + public void setTranType(String tranType) { + this.tranType = tranType; + } + + public String getTdLeaseID() { + return tdLeaseID; + } + + public void setTdLeaseID(String tdLeaseID) { + this.tdLeaseID = tdLeaseID; + } + + public String getPriceFreq() { + return priceFreq; + } + + public void setPriceFreq(String priceFreq) { + this.priceFreq = priceFreq; + } + + public String getProd_Id() { + return prod_Id; + } + + public void setProd_Id(String prod_Id) { + this.prod_Id = prod_Id; + } + + public String getCustID() { + return custID; + } + + public void setCustID(String custID) { + this.custID = custID; + } + + public String getNoOfUnits() { + return noOfUnits; + } + + public void setNoOfUnits(String noOfUnits) { + this.noOfUnits = noOfUnits; + } + + public String getPricePerUnit() { + return pricePerUnit; + } + + public void setPricePerUnit(String pricePerUnit) { + this.pricePerUnit = pricePerUnit; + } + + public String getSecAmt() { + return secAmt; + } + + public void setSecAmt(String secAmt) { + this.secAmt = secAmt; + } + + public String getTotPayDue() { + return totPayDue; + } + + public void setTotPayDue(String totPayDue) { + this.totPayDue = totPayDue; + } + + public String getTrmLen() { + return trmLen; + } + + public void setTrmLen(String trmLen) { + this.trmLen = trmLen; + } + + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/LienMarkingBean.java b/IPKS_Updated/src/src/java/DataEntryBean/LienMarkingBean.java new file mode 100644 index 0000000..e608bef --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/LienMarkingBean.java @@ -0,0 +1,97 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author 986137 + */ +public class LienMarkingBean { + + private String lienType; + private String loanAccount; + private String dep_acc_no; + private String currentValuation; + private String safeLendingMargin; + private String description; + private String expDt; + private String openDt; + private String KVPNo; + + + + public String getLoanAccount() { + return loanAccount; + } + + public void setLoanAccount(String loanAccount) { + this.loanAccount = loanAccount; + } + + public String getKVPNo() { + return KVPNo; + } + + public void setKVPNo(String KVPNo) { + this.KVPNo = KVPNo; + } + + public String getCurrentValuation() { + return currentValuation; + } + + public void setCurrentValuation(String currentValuation) { + this.currentValuation = currentValuation; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getExpDt() { + return expDt; + } + + public void setExpDt(String expDt) { + this.expDt = expDt; + } + + public String getOpenDt() { + return openDt; + } + + public void setOpenDt(String openDt) { + this.openDt = openDt; + } + + public String getSafeLendingMargin() { + return safeLendingMargin; + } + + public void setSafeLendingMargin(String safeLendingMargin) { + this.safeLendingMargin = safeLendingMargin; + } + + public String getDep_acc_no() { + return dep_acc_no; + } + + public void setDep_acc_no(String dep_acc_no) { + this.dep_acc_no = dep_acc_no; + } + + public String getLienType() { + return lienType; + } + + public void setLienType(String lienType) { + this.lienType = lienType; + } + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/LoanAccountCreationBean.java b/IPKS_Updated/src/src/java/DataEntryBean/LoanAccountCreationBean.java new file mode 100644 index 0000000..857d770 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/LoanAccountCreationBean.java @@ -0,0 +1,292 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author 986137 + */ +public class LoanAccountCreationBean { + + private String segmentCode; + private String cifNumber; + private String loanappAmt; + private String loanTerm; + private String schemeCode; + private String purposeCode; + private String collateralType; + private String description; + private String currentValuation; + private String safeLendingMargin; + private String activityCode; + private String productCode; + private String inttCategory; + private String guarantorFlag; + private String securityFlag; + private String gurantorName; + private String guarantorAddress; + private String guarantorDOB; + private String guarantorJob; + private String gurantorIncome; + private String eligAmt; + private String id; + private String customerType; + private String guarRelation; + private String guarIdType; + private String guarIdNo; + private String dep_acc_no; + private String expDt; + private String custName; + private String intRate; + private String penIntRate; + + public String getIntRate() { + return intRate; + } + + public void setIntRate(String intRate) { + this.intRate = intRate; + } + + public String getPenIntRate() { + return penIntRate; + } + + public void setPenIntRate(String penIntRate) { + this.penIntRate = penIntRate; + } + + public String getCustName() { + return custName; + } + + public void setCustName(String custName) { + this.custName = custName; + } + + public String getExpDt() { + return expDt; + } + + public void setExpDt(String expDt) { + this.expDt = expDt; + } + + public String getDep_acc_no() { + return dep_acc_no; + } + + public void setDep_acc_no(String dep_acc_no) { + this.dep_acc_no = dep_acc_no; + } + + public String getGuarIdNo() { + return guarIdNo; + } + + public void setGuarIdNo(String guarIdNo) { + this.guarIdNo = guarIdNo; + } + + public String getGuarIdType() { + return guarIdType; + } + + public void setGuarIdType(String guarIdType) { + this.guarIdType = guarIdType; + } + + public String getGuarRelation() { + return guarRelation; + } + + public void setGuarRelation(String guarRelation) { + this.guarRelation = guarRelation; + } + + public String getCustomerType() { + return customerType; + } + + public void setCustomerType(String customerType) { + this.customerType = customerType; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getEligAmt() { + return eligAmt; + } + + public void setEligAmt(String eligAmt) { + this.eligAmt = eligAmt; + } + + public String getGuarantorAddress() { + return guarantorAddress; + } + + public void setGuarantorAddress(String guarantorAddress) { + this.guarantorAddress = guarantorAddress; + } + + public String getGuarantorDOB() { + return guarantorDOB; + } + + public void setGuarantorDOB(String guarantorDOB) { + this.guarantorDOB = guarantorDOB; + } + + public String getGuarantorFlag() { + return guarantorFlag; + } + + public void setGuarantorFlag(String guarantorFlag) { + this.guarantorFlag = guarantorFlag; + } + + public String getGuarantorJob() { + return guarantorJob; + } + + public void setGuarantorJob(String guarantorJob) { + this.guarantorJob = guarantorJob; + } + + public String getGurantorIncome() { + return gurantorIncome; + } + + public void setGurantorIncome(String gurantorIncome) { + this.gurantorIncome = gurantorIncome; + } + + public String getGurantorName() { + return gurantorName; + } + + public void setGurantorName(String gurantorName) { + this.gurantorName = gurantorName; + } + + public String getSecurityFlag() { + return securityFlag; + } + + public void setSecurityFlag(String securityFlag) { + this.securityFlag = securityFlag; + } + + public String getInttCategory() { + return inttCategory; + } + + public void setInttCategory(String inttCategory) { + this.inttCategory = inttCategory; + } + + public String getProductCode() { + return productCode; + } + + public void setProductCode(String productCode) { + this.productCode = productCode; + } + + public String getActivityCode() { + return activityCode; + } + + public void setActivityCode(String activityCode) { + this.activityCode = activityCode; + } + + public String getCifNumber() { + return cifNumber; + } + + public void setCifNumber(String cifNumber) { + this.cifNumber = cifNumber; + } + + public String getCollateralType() { + return collateralType; + } + + public void setCollateralType(String collateralType) { + this.collateralType = collateralType; + } + + public String getCurrentValuation() { + return currentValuation; + } + + public void setCurrentValuation(String currentValuation) { + this.currentValuation = currentValuation; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getLoanTerm() { + return loanTerm; + } + + public void setLoanTerm(String loanTerm) { + this.loanTerm = loanTerm; + } + + public String getLoanappAmt() { + return loanappAmt; + } + + public void setLoanappAmt(String loanappAmt) { + this.loanappAmt = loanappAmt; + } + + public String getPurposeCode() { + return purposeCode; + } + + public void setPurposeCode(String purposeCode) { + this.purposeCode = purposeCode; + } + + public String getSafeLendingMargin() { + return safeLendingMargin; + } + + public void setSafeLendingMargin(String safeLendingMargin) { + this.safeLendingMargin = safeLendingMargin; + } + + public String getSchemeCode() { + return schemeCode; + } + + public void setSchemeCode(String schemeCode) { + this.schemeCode = schemeCode; + } + + public String getSegmentCode() { + return segmentCode; + } + + public void setSegmentCode(String segmentCode) { + this.segmentCode = segmentCode; + } +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/LoanDisbursementDetailBean.java b/IPKS_Updated/src/src/java/DataEntryBean/LoanDisbursementDetailBean.java new file mode 100644 index 0000000..e4d6848 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/LoanDisbursementDetailBean.java @@ -0,0 +1,112 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author 986137 + */ +public class LoanDisbursementDetailBean { + + private String disburseMonth; + private String disburseAmt; + private String descDisburse; + private String amtRemain; + private String disbSchedule_table_id; + private String loanAcctId; + private String disburseMonthAmend; + private String disburseAmtAmend; + private String descDisburseAmend; + private String amtRemainAmend; + private String loanAcctIdAmend; + + public String getAmtRemainAmend() { + return amtRemainAmend; + } + + public void setAmtRemainAmend(String amtRemainAmend) { + this.amtRemainAmend = amtRemainAmend; + } + + public String getDescDisburseAmend() { + return descDisburseAmend; + } + + public void setDescDisburseAmend(String descDisburseAmend) { + this.descDisburseAmend = descDisburseAmend; + } + + public String getDisburseAmtAmend() { + return disburseAmtAmend; + } + + public void setDisburseAmtAmend(String disburseAmtAmend) { + this.disburseAmtAmend = disburseAmtAmend; + } + + public String getDisburseMonthAmend() { + return disburseMonthAmend; + } + + public void setDisburseMonthAmend(String disburseMonthAmend) { + this.disburseMonthAmend = disburseMonthAmend; + } + + public String getLoanAcctIdAmend() { + return loanAcctIdAmend; + } + + public void setLoanAcctIdAmend(String loanAcctIdAmend) { + this.loanAcctIdAmend = loanAcctIdAmend; + } + + public String getAmtRemain() { + return amtRemain; + } + + public void setAmtRemain(String amtRemain) { + this.amtRemain = amtRemain; + } + + public String getDescDisburse() { + return descDisburse; + } + + public void setDescDisburse(String descDisburse) { + this.descDisburse = descDisburse; + } + + public String getDisbSchedule_table_id() { + return disbSchedule_table_id; + } + + public void setDisbSchedule_table_id(String disbSchedule_table_id) { + this.disbSchedule_table_id = disbSchedule_table_id; + } + + public String getDisburseAmt() { + return disburseAmt; + } + + public void setDisburseAmt(String disburseAmt) { + this.disburseAmt = disburseAmt; + } + + public String getDisburseMonth() { + return disburseMonth; + } + + public void setDisburseMonth(String disburseMonth) { + this.disburseMonth = disburseMonth; + } + + public String getLoanAcctId() { + return loanAcctId; + } + + public void setLoanAcctId(String loanAcctId) { + this.loanAcctId = loanAcctId; + } +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/LoanDisbursementHdrBean.java b/IPKS_Updated/src/src/java/DataEntryBean/LoanDisbursementHdrBean.java new file mode 100644 index 0000000..ad3d04a --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/LoanDisbursementHdrBean.java @@ -0,0 +1,85 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author 986137 + */ +public class LoanDisbursementHdrBean { + + private String cifNo; + private String CustomerName; + private String productDesc; + private String loanOutStd; + private String apprvedAmt; + private String apprvedDate; + private String advanceAmt; + private String loanAccountNumber; + + public String getLoanAccountNumber() { + return loanAccountNumber; + } + + public void setLoanAccountNumber(String loanAccountNumber) { + this.loanAccountNumber = loanAccountNumber; + } + + public String getCustomerName() { + return CustomerName; + } + + public void setCustomerName(String CustomerName) { + this.CustomerName = CustomerName; + } + + public String getAdvanceAmt() { + return advanceAmt; + } + + public void setAdvanceAmt(String advanceAmt) { + this.advanceAmt = advanceAmt; + } + + public String getApprvedAmt() { + return apprvedAmt; + } + + public void setApprvedAmt(String apprvedAmt) { + this.apprvedAmt = apprvedAmt; + } + + public String getApprvedDate() { + return apprvedDate; + } + + public void setApprvedDate(String apprvedDate) { + this.apprvedDate = apprvedDate; + } + + public String getCifNo() { + return cifNo; + } + + public void setCifNo(String cifNo) { + this.cifNo = cifNo; + } + + public String getLoanOutStd() { + return loanOutStd; + } + + public void setLoanOutStd(String loanOutStd) { + this.loanOutStd = loanOutStd; + } + + public String getProductDesc() { + return productDesc; + } + + public void setProductDesc(String productDesc) { + this.productDesc = productDesc; + } +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/LoanProductCreationBean.java b/IPKS_Updated/src/src/java/DataEntryBean/LoanProductCreationBean.java new file mode 100644 index 0000000..3af4b05 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/LoanProductCreationBean.java @@ -0,0 +1,708 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author 986137 + */ +public class LoanProductCreationBean { + + //Create + private String productname; + private String productdescription; + private String productcode; + private String inttcategory; + private String intcatdescription; + private String segmentCode; + private String glCode; + private String debitComp1; + private String debitComp2; + private String status; + private String intrate; + private String inttmethod; + private String inttfrequency; + private String inttcapfrequency; + private String int_app_method; + private String pen_intt_rt; + private String pen_intt_method; + private String pen_inttcapfrequency; + private String Pen_cond; + private String minDisbrs; + private String maxDisbrs; + private String minRepay; + private String maxRepay; + private String minTerm; + private String maxTerm; + private String minSancAmt; + private String maxSancAmt; + private String effectDate; + private String penGracePr; + private String guarantor; + private String security; + private String repayFrequency; + private String loanType; + private String glCodeInttReceivable; + private String glCodeInttReceived; + private String headAccType; + + public String getHeadAccType() { + return headAccType; + } + + public void setHeadAccType(String headAccType) { + this.headAccType = headAccType; + } + //Amend + private String productnameAmend; + private String productdescriptionAmend; + private String productcodeAmend; + private String inttcategoryAmend; + private String intcatdescriptionAmend; + private String segmentCodeAmend; + private String glCodeAmend; + private String debitComp1Amend; + private String debitComp2Amend; + private String statusAmend; + private String intrateAmend; + private String inttmethodAmend; + private String inttfrequencyAmend; + private String inttcapfrequencyAmend; + private String int_app_methodAmend; + private String pen_intt_rtAmend; + private String pen_intt_methodAmend; + private String pen_inttcapfrequencyAmend; + private String minDisbrsAmend; + private String maxDisbrsAmend; + private String minRepayAmend; + private String maxRepayAmend; + private String minTermAmend; + private String maxTermAmend; + private String minSancAmtAmend; + private String maxSancAmtAmend; + private String effectDateAmend; + private String pen_condAmend; + private String penGracePrAmend; + private String guarantorAmend; + private String securityAmend; + private String repayFrequencyAmend; + private String loanTypeAmend; + private String glCodeInttReceivableAmend; + private String glCodeInttReceivedAmend; + private String headAccTypeAmend; + + public String getHeadAccTypeAmend() { + return headAccTypeAmend; + } + + public void setHeadAccTypeAmend(String headAccTypeAmend) { + this.headAccTypeAmend = headAccTypeAmend; + } + + + public String getGlCodeInttReceivable() { + return glCodeInttReceivable; + } + + public void setGlCodeInttReceivable(String glCodeInttReceivable) { + this.glCodeInttReceivable = glCodeInttReceivable; + } + + public String getGlCodeInttReceivableAmend() { + return glCodeInttReceivableAmend; + } + + public void setGlCodeInttReceivableAmend(String glCodeInttReceivableAmend) { + this.glCodeInttReceivableAmend = glCodeInttReceivableAmend; + } + + public String getGlCodeInttReceived() { + return glCodeInttReceived; + } + + public void setGlCodeInttReceived(String glCodeInttReceived) { + this.glCodeInttReceived = glCodeInttReceived; + } + + public String getGlCodeInttReceivedAmend() { + return glCodeInttReceivedAmend; + } + + public void setGlCodeInttReceivedAmend(String glCodeInttReceivedAmend) { + this.glCodeInttReceivedAmend = glCodeInttReceivedAmend; + } + + + + public String getLoanType() { + return loanType; + } + + public void setLoanType(String loanType) { + this.loanType = loanType; + } + + public String getLoanTypeAmend() { + return loanTypeAmend; + } + + public void setLoanTypeAmend(String loanTypeAmend) { + this.loanTypeAmend = loanTypeAmend; + } + + + + public String getGuarantor() { + return guarantor; + } + + public void setGuarantor(String guarantor) { + this.guarantor = guarantor; + } + + public String getGuarantorAmend() { + return guarantorAmend; + } + + public void setGuarantorAmend(String guarantorAmend) { + this.guarantorAmend = guarantorAmend; + } + + public String getSecurity() { + return security; + } + + public void setSecurity(String security) { + this.security = security; + } + + public String getSecurityAmend() { + return securityAmend; + } + + public void setSecurityAmend(String securityAmend) { + this.securityAmend = securityAmend; + } + + public String getPenGracePrAmend() { + return penGracePrAmend; + } + + public void setPenGracePrAmend(String penGracePrAmend) { + this.penGracePrAmend = penGracePrAmend; + } + + public String getPen_condAmend() { + return pen_condAmend; + } + + public void setPen_condAmend(String pen_condAmend) { + this.pen_condAmend = pen_condAmend; + } + private String loanPd_id; + private String intcatSearch; + private String productcodeSearch; + private String inttCategoryActivation; + + public String getInttCategoryActivation() { + return inttCategoryActivation; + } + + public void setInttCategoryActivation(String inttCategoryActivation) { + this.inttCategoryActivation = inttCategoryActivation; + } + + public String getIntcatSearch() { + return intcatSearch; + } + + public void setIntcatSearch(String intcatSearch) { + this.intcatSearch = intcatSearch; + } + + public String getProductcodeSearch() { + return productcodeSearch; + } + + public void setProductcodeSearch(String productcodeSearch) { + this.productcodeSearch = productcodeSearch; + } + + public String getLoanPd_id() { + return loanPd_id; + } + + public void setLoanPd_id(String loanPd_id) { + this.loanPd_id = loanPd_id; + } + + public String getPenGracePr() { + return penGracePr; + } + + public void setPenGracePr(String penGracePr) { + this.penGracePr = penGracePr; + } + + public String getPen_cond() { + return Pen_cond; + } + + public void setPen_cond(String Pen_cond) { + this.Pen_cond = Pen_cond; + } + + public String getDebitComp1() { + return debitComp1; + } + + public void setDebitComp1(String debitComp1) { + this.debitComp1 = debitComp1; + } + + public String getDebitComp2() { + return debitComp2; + } + + public void setDebitComp2(String debitComp2) { + this.debitComp2 = debitComp2; + } + + public String getEffectDate() { + return effectDate; + } + + public void setEffectDate(String effectDate) { + this.effectDate = effectDate; + } + + public String getGlCode() { + return glCode; + } + + public void setGlCode(String glCode) { + this.glCode = glCode; + } + + public String getInt_app_method() { + return int_app_method; + } + + public void setInt_app_method(String int_app_method) { + this.int_app_method = int_app_method; + } + + public String getIntcatdescription() { + return intcatdescription; + } + + public void setIntcatdescription(String intcatdescription) { + this.intcatdescription = intcatdescription; + } + + public String getIntrate() { + return intrate; + } + + public void setIntrate(String intrate) { + this.intrate = intrate; + } + + public String getInttcapfrequency() { + return inttcapfrequency; + } + + public void setInttcapfrequency(String inttcapfrequency) { + this.inttcapfrequency = inttcapfrequency; + } + + public String getInttcategory() { + return inttcategory; + } + + public void setInttcategory(String inttcategory) { + this.inttcategory = inttcategory; + } + + public String getInttfrequency() { + return inttfrequency; + } + + public void setInttfrequency(String inttfrequency) { + this.inttfrequency = inttfrequency; + } + + public String getInttmethod() { + return inttmethod; + } + + public void setInttmethod(String inttmethod) { + this.inttmethod = inttmethod; + } + + public String getMaxDisbrs() { + return maxDisbrs; + } + + public void setMaxDisbrs(String maxDisbrs) { + this.maxDisbrs = maxDisbrs; + } + + public String getMaxRepay() { + return maxRepay; + } + + public void setMaxRepay(String maxRepay) { + this.maxRepay = maxRepay; + } + + public String getMaxSancAmt() { + return maxSancAmt; + } + + public void setMaxSancAmt(String maxSancAmt) { + this.maxSancAmt = maxSancAmt; + } + + public String getMaxTerm() { + return maxTerm; + } + + public void setMaxTerm(String maxTerm) { + this.maxTerm = maxTerm; + } + + public String getMinDisbrs() { + return minDisbrs; + } + + public void setMinDisbrs(String minDisbrs) { + this.minDisbrs = minDisbrs; + } + + public String getMinRepay() { + return minRepay; + } + + public void setMinRepay(String minRepay) { + this.minRepay = minRepay; + } + + public String getMinSancAmt() { + return minSancAmt; + } + + public void setMinSancAmt(String minSancAmt) { + this.minSancAmt = minSancAmt; + } + + public String getMinTerm() { + return minTerm; + } + + public void setMinTerm(String minTerm) { + this.minTerm = minTerm; + } + + public String getPen_intt_method() { + return pen_intt_method; + } + + public void setPen_intt_method(String pen_intt_method) { + this.pen_intt_method = pen_intt_method; + } + + public String getPen_intt_rt() { + return pen_intt_rt; + } + + public void setPen_intt_rt(String pen_intt_rt) { + this.pen_intt_rt = pen_intt_rt; + } + + public String getPen_inttcapfrequency() { + return pen_inttcapfrequency; + } + + public void setPen_inttcapfrequency(String pen_inttcapfrequency) { + this.pen_inttcapfrequency = pen_inttcapfrequency; + } + + public String getProductcode() { + return productcode; + } + + public void setProductcode(String productcode) { + this.productcode = productcode; + } + + public String getProductdescription() { + return productdescription; + } + + public void setProductdescription(String productdescription) { + this.productdescription = productdescription; + } + + public String getProductname() { + return productname; + } + + public void setProductname(String productname) { + this.productname = productname; + } + + public String getSegmentCode() { + return segmentCode; + } + + public void setSegmentCode(String segmentCode) { + this.segmentCode = segmentCode; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getDebitComp1Amend() { + return debitComp1Amend; + } + + public void setDebitComp1Amend(String debitComp1Amend) { + this.debitComp1Amend = debitComp1Amend; + } + + public String getDebitComp2Amend() { + return debitComp2Amend; + } + + public void setDebitComp2Amend(String debitComp2Amend) { + this.debitComp2Amend = debitComp2Amend; + } + + public String getEffectDateAmend() { + return effectDateAmend; + } + + public void setEffectDateAmend(String effectDateAmend) { + this.effectDateAmend = effectDateAmend; + } + + public String getGlCodeAmend() { + return glCodeAmend; + } + + public void setGlCodeAmend(String glCodeAmend) { + this.glCodeAmend = glCodeAmend; + } + + public String getInt_app_methodAmend() { + return int_app_methodAmend; + } + + public void setInt_app_methodAmend(String int_app_methodAmend) { + this.int_app_methodAmend = int_app_methodAmend; + } + + public String getIntcatdescriptionAmend() { + return intcatdescriptionAmend; + } + + public void setIntcatdescriptionAmend(String intcatdescriptionAmend) { + this.intcatdescriptionAmend = intcatdescriptionAmend; + } + + public String getIntrateAmend() { + return intrateAmend; + } + + public void setIntrateAmend(String intrateAmend) { + this.intrateAmend = intrateAmend; + } + + public String getInttcapfrequencyAmend() { + return inttcapfrequencyAmend; + } + + public void setInttcapfrequencyAmend(String inttcapfrequencyAmend) { + this.inttcapfrequencyAmend = inttcapfrequencyAmend; + } + + public String getInttcategoryAmend() { + return inttcategoryAmend; + } + + public void setInttcategoryAmend(String inttcategoryAmend) { + this.inttcategoryAmend = inttcategoryAmend; + } + + public String getInttfrequencyAmend() { + return inttfrequencyAmend; + } + + public void setInttfrequencyAmend(String inttfrequencyAmend) { + this.inttfrequencyAmend = inttfrequencyAmend; + } + + public String getInttmethodAmend() { + return inttmethodAmend; + } + + public void setInttmethodAmend(String inttmethodAmend) { + this.inttmethodAmend = inttmethodAmend; + } + + public String getMaxDisbrsAmend() { + return maxDisbrsAmend; + } + + public void setMaxDisbrsAmend(String maxDisbrsAmend) { + this.maxDisbrsAmend = maxDisbrsAmend; + } + + public String getMaxRepayAmend() { + return maxRepayAmend; + } + + public void setMaxRepayAmend(String maxRepayAmend) { + this.maxRepayAmend = maxRepayAmend; + } + + public String getMaxSancAmtAmend() { + return maxSancAmtAmend; + } + + public void setMaxSancAmtAmend(String maxSancAmtAmend) { + this.maxSancAmtAmend = maxSancAmtAmend; + } + + public String getMaxTermAmend() { + return maxTermAmend; + } + + public void setMaxTermAmend(String maxTermAmend) { + this.maxTermAmend = maxTermAmend; + } + + public String getMinDisbrsAmend() { + return minDisbrsAmend; + } + + public void setMinDisbrsAmend(String minDisbrsAmend) { + this.minDisbrsAmend = minDisbrsAmend; + } + + public String getMinRepayAmend() { + return minRepayAmend; + } + + public void setMinRepayAmend(String minRepayAmend) { + this.minRepayAmend = minRepayAmend; + } + + public String getMinSancAmtAmend() { + return minSancAmtAmend; + } + + public void setMinSancAmtAmend(String minSancAmtAmend) { + this.minSancAmtAmend = minSancAmtAmend; + } + + public String getMinTermAmend() { + return minTermAmend; + } + + public void setMinTermAmend(String minTermAmend) { + this.minTermAmend = minTermAmend; + } + + public String getPen_intt_methodAmend() { + return pen_intt_methodAmend; + } + + public void setPen_intt_methodAmend(String pen_intt_methodAmend) { + this.pen_intt_methodAmend = pen_intt_methodAmend; + } + + public String getPen_intt_rtAmend() { + return pen_intt_rtAmend; + } + + public void setPen_intt_rtAmend(String pen_intt_rtAmend) { + this.pen_intt_rtAmend = pen_intt_rtAmend; + } + + public String getPen_inttcapfrequencyAmend() { + return pen_inttcapfrequencyAmend; + } + + public void setPen_inttcapfrequencyAmend(String pen_inttcapfrequencyAmend) { + this.pen_inttcapfrequencyAmend = pen_inttcapfrequencyAmend; + } + + public String getProductcodeAmend() { + return productcodeAmend; + } + + public void setProductcodeAmend(String productcodeAmend) { + this.productcodeAmend = productcodeAmend; + } + + public String getProductdescriptionAmend() { + return productdescriptionAmend; + } + + public void setProductdescriptionAmend(String productdescriptionAmend) { + this.productdescriptionAmend = productdescriptionAmend; + } + + public String getProductnameAmend() { + return productnameAmend; + } + + public void setProductnameAmend(String productnameAmend) { + this.productnameAmend = productnameAmend; + } + + public String getSegmentCodeAmend() { + return segmentCodeAmend; + } + + public void setSegmentCodeAmend(String segmentCodeAmend) { + this.segmentCodeAmend = segmentCodeAmend; + } + + public String getStatusAmend() { + return statusAmend; + } + + public void setStatusAmend(String statusAmend) { + this.statusAmend = statusAmend; + } + + public String getRepayFrequency() { + return repayFrequency; + } + + public void setRepayFrequency(String repayFrequency) { + this.repayFrequency = repayFrequency; + } + + public String getRepayFrequencyAmend() { + return repayFrequencyAmend; + } + + public void setRepayFrequencyAmend(String repayFrequencyAmend) { + this.repayFrequencyAmend = repayFrequencyAmend; + } + + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/LoanRepaymentScheduleBean.java b/IPKS_Updated/src/src/java/DataEntryBean/LoanRepaymentScheduleBean.java new file mode 100644 index 0000000..90654e6 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/LoanRepaymentScheduleBean.java @@ -0,0 +1,229 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author 986137 + */ +public class LoanRepaymentScheduleBean { + + private String loanTerms; + private String sanctionedAmt; + private String loanAcc; + private String loanRepYYYYMM; + private String repYYYYMM; + private String emiAmt; + private String inttAmt; + private String princAmt; + private String princOutStd; + private String inttOutStd; + private String openBal; + private String installAmt; + private String closeBal; + private String installNo; + private String cifNo; + private String CustomerName; + private String productDesc; + private String loanOutStd; + private String apprvedAmt; + private String apprvedDate; + private String loanAccountNumber; + private String inttCatDesc; + private String loanTerm; + private String dueDate; + + public String getCustomerName() { + return CustomerName; + } + + public void setCustomerName(String CustomerName) { + this.CustomerName = CustomerName; + } + + public String getApprvedAmt() { + return apprvedAmt; + } + + public void setApprvedAmt(String apprvedAmt) { + this.apprvedAmt = apprvedAmt; + } + + public String getApprvedDate() { + return apprvedDate; + } + + public void setApprvedDate(String apprvedDate) { + this.apprvedDate = apprvedDate; + } + + public String getCifNo() { + return cifNo; + } + + public void setCifNo(String cifNo) { + this.cifNo = cifNo; + } + + public String getDueDate() { + return dueDate; + } + + public void setDueDate(String dueDate) { + this.dueDate = dueDate; + } + + public String getInttCatDesc() { + return inttCatDesc; + } + + public void setInttCatDesc(String inttCatDesc) { + this.inttCatDesc = inttCatDesc; + } + + public String getLoanAccountNumber() { + return loanAccountNumber; + } + + public void setLoanAccountNumber(String loanAccountNumber) { + this.loanAccountNumber = loanAccountNumber; + } + + public String getLoanOutStd() { + return loanOutStd; + } + + public void setLoanOutStd(String loanOutStd) { + this.loanOutStd = loanOutStd; + } + + public String getLoanTerm() { + return loanTerm; + } + + public void setLoanTerm(String loanTerm) { + this.loanTerm = loanTerm; + } + + public String getProductDesc() { + return productDesc; + } + + public void setProductDesc(String productDesc) { + this.productDesc = productDesc; + } + + public String getInttAmt() { + return inttAmt; + } + + public void setInttAmt(String inttAmt) { + this.inttAmt = inttAmt; + } + + public String getInttOutStd() { + return inttOutStd; + } + + public void setInttOutStd(String inttOutStd) { + this.inttOutStd = inttOutStd; + } + + public String getPrincAmt() { + return princAmt; + } + + public void setPrincAmt(String princAmt) { + this.princAmt = princAmt; + } + + public String getPrincOutStd() { + return princOutStd; + } + + public void setPrincOutStd(String princOutStd) { + this.princOutStd = princOutStd; + } + + public String getInstallNo() { + return installNo; + } + + public void setInstallNo(String installNo) { + this.installNo = installNo; + } + + public String getEmiAmt() { + return emiAmt; + } + + public void setEmiAmt(String emiAmt) { + this.emiAmt = emiAmt; + } + + public String getCloseBal() { + return closeBal; + } + + public void setCloseBal(String closeBal) { + this.closeBal = closeBal; + } + + public String getInstallAmt() { + return installAmt; + } + + public void setInstallAmt(String installAmt) { + this.installAmt = installAmt; + } + + public String getOpenBal() { + return openBal; + } + + public void setOpenBal(String openBal) { + this.openBal = openBal; + } + + public String getRepYYYYMM() { + return repYYYYMM; + } + + public void setRepYYYYMM(String repYYYYMM) { + this.repYYYYMM = repYYYYMM; + } + + public String getLoanAcc() { + return loanAcc; + } + + public void setLoanAcc(String loanAcc) { + this.loanAcc = loanAcc; + } + + public String getLoanRepYYYYMM() { + return loanRepYYYYMM; + } + + public void setLoanRepYYYYMM(String loanRepYYYYMM) { + this.loanRepYYYYMM = loanRepYYYYMM; + } + + public String getLoanTerms() { + return loanTerms; + } + + public void setLoanTerms(String loanTerms) { + this.loanTerms = loanTerms; + } + + public String getSanctionedAmt() { + return sanctionedAmt; + } + + public void setSanctionedAmt(String sanctionedAmt) { + this.sanctionedAmt = sanctionedAmt; + } +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/MemberDetailsBean.java b/IPKS_Updated/src/src/java/DataEntryBean/MemberDetailsBean.java new file mode 100644 index 0000000..660ba0f --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/MemberDetailsBean.java @@ -0,0 +1,487 @@ +package DataEntryBean; + + + +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + + +public class MemberDetailsBean { + + String male; + String female; + String total; + String muslim; + String christian; + String buddhist; + String sikh; + String parsi; + String jain; + String others; + String other; + public String rowStatus; + public String guardianname; + public String address; + public String qualification; + public String general; + public String sc; + public String st; + public String obc; + + + public String religion; + public String membercode; + public String membernameAmend; + public String genderAmend; + public String dobAmend; + public String guardiannameAmend; + public String addressAmend; + + + public String religionAmend; + public String membercodeAmend; + String shgcode; + String shgcodeAmend; + String shg_id; + public String membername; + public String gender; + public String dob; + private String memberID; + + public String shgSearch; + public String caste; + public String entry_date; + public String amend_date; + public String cif; + public String cifAmend; + + + + public String getCifAmend() { + return cifAmend; + } + + public void setCifAmend(String cifAmend) { + this.cifAmend = cifAmend; + } + + public String getCif() { + return cif; + } + + public void setCif(String cif) { + this.cif = cif; + } + + public String getAmend_date() { + return amend_date; + } + + public void setAmend_date(String amend_date) { + this.amend_date = amend_date; + } + + public String getEntry_date() { + return entry_date; + } + + public void setEntry_date(String entry_date) { + this.entry_date = entry_date; + } + + + + public String getCaste() { + return caste; + } + + public void setCaste(String caste) { + this.caste = caste; + } + + public String getGeneral() { + return general; + } + + public void setGeneral(String general) { + this.general = general; + } + + public String getObc() { + return obc; + } + + public void setObc(String obc) { + this.obc = obc; + } + + public String getQualification() { + return qualification; + } + + public void setQualification(String qualification) { + this.qualification = qualification; + } + + public String getSc() { + return sc; + } + + public void setSc(String sc) { + this.sc = sc; + } + + public String getSt() { + return st; + } + + public void setSt(String st) { + this.st = st; + } + + + + public String getAddressAmend() { + return addressAmend; + } + + public void setAddressAmend(String addressAmend) { + this.addressAmend = addressAmend; + } + public String getRowStatus() { + return rowStatus; + } + + public void setRowStatus(String rowStatus) { + this.rowStatus = rowStatus; + } + public String getOther() { + return other; + } + + public void setOther(String other) { + this.other = other; + } + public String getDobAmend() { + return dobAmend; + } + + public void setDobAmend(String dobAmend) { + this.dobAmend = dobAmend; + } + + public String getShgSearch() { + return shgSearch; + } +public String getMemberID() { + return memberID; + } + + public void setMemberID(String memberID) { + this.memberID = memberID; + } + public void setShgSearch(String shgSearch) { + this.shgSearch = shgSearch; + } + public String getGenderAmend() { + return genderAmend; + } + + public void setGenderAmend(String genderAmend) { + this.genderAmend = genderAmend; + } + + public String getGuardianname() { + return guardianname; + } + + public void setGuardianname(String guardianname) { + this.guardianname = guardianname; + } + + public String getGuardiannameAmend() { + return guardiannameAmend; + } + + public void setGuardiannameAmend(String guardiannameAmend) { + this.guardiannameAmend = guardiannameAmend; + } + + public String getMembercode() { + return membercode; + } + + public void setMembercode(String membercode) { + this.membercode = membercode; + } + + public String getMembercodeAmend() { + return membercodeAmend; + } + + public void setMembercodeAmend(String membercodeAmend) { + this.membercodeAmend = membercodeAmend; + } + + public String getMembername() { + return membername; + } + + public void setMembername(String membername) { + this.membername = membername; + } + + public String getMembernameAmend() { + return membernameAmend; + } + + public void setMembernameAmend(String membernameAmend) { + this.membernameAmend = membernameAmend; + } + + public String getReligionAmend() { + return religionAmend; + } + + public void setReligionAmend(String religionAmend) { + this.religionAmend = religionAmend; + } + + public String getShgcode() { + return shgcode; + } + + public void setShgcode(String shgcode) { + this.shgcode = shgcode; + } + + public String getShgcodeAmend() { + return shgcodeAmend; + } + + public void setShgcodeAmend(String shgcodeAmend) { + this.shgcodeAmend = shgcodeAmend; + } + + + public String getGuardianName() { + return guardianname; + } + + public void setGuardianName(String guardianname) { + this.guardianname = guardianname; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getReligion() { + return religion; + } + + public void setReligion(String religion) { + this.religion = religion; + } + + public String getGender() { + return gender; + } + + public void setGender(String gender) { + this.gender = gender; + } + + public String getDob() { + return dob; + } + + public void setDob(String dob) { + this.dob = dob; + } + + + + public String getMemberName() { + return membername; + } + + public void setMemberName(String membername) { + this.membername = membername; + } + + /** + * @return the male + */ + public String getMale() { + return male; + } + + /** + * @param male the male to set + */ + public void setMale(String male) { + this.male = male; + } + + /** + * @return the female + */ + public String getFemale() { + return female; + } + + /** + * @param female the female to set + */ + + public void setFemale(String female) { + this.female = female; + } + /** + * @return the total + */ + + public String getTotal() { + return total; + } + + /** + * @param total the total to set + */ + public void setTotal(String total) { + this.total = total; + } + +/** + * @return the muslim + */ + + public String getMuslim() { + return muslim; + } + + /** + * @param muslim the muslim to set + */ + public void setMuslim(String muslim) { + this.muslim = muslim; + } + +/** + * @return the christian + */ + + public String getChristian() { + return christian; + } + + /** + * @param christian the christian to set + */ + public void setChristian(String christian) { + this.christian = christian; + } + +/** + * @return the buddhist + */ + + public String getBuddhist() { + return buddhist; + } + + /** + * @param buddhist the buddhist to set + */ + public void setBuddhist(String buddhist) { + this.buddhist = buddhist; + } + +/** + * @return the sikh + */ + + public String getSikh() { + return sikh; + } + + /** + * @param sikh the sikh to set + */ + public void setSikh(String sikh) { + this.sikh = sikh; + } + + + /** + * @return the parsi + */ + + public String getParsi() { + return parsi; + } + + /** + * @param parsi the parsi to set + */ + public void setParsi(String parsi) { + this.parsi = parsi; + } + + /** + * @return the jain + */ + + public String getJain() { + return jain; + } + + /** + * @param jain the jain to set + */ + public void setJain(String jain) { + this.jain = jain; + } + + + /** + * @return the others + */ + + public String getOthers() { + return others; + } + + /** + * @param others the others to set + */ + public void setOthers(String others) { + this.others = others; + } + /** + * @return the maleAmend + */ + + + /** + * @return the shg_id + */ + public String getShg_id() { + return shg_id; + } + + /** + * @param shg_id the shg_id to set + */ + public void setShg_id(String shg_id) { + this.shg_id = shg_id; + } + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/MicroFileAccountDetBean.java b/IPKS_Updated/src/src/java/DataEntryBean/MicroFileAccountDetBean.java new file mode 100644 index 0000000..ba10bb0 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/MicroFileAccountDetBean.java @@ -0,0 +1,237 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 1004242 + */ +public class MicroFileAccountDetBean { + + String accountCode; + String accountName; + String prodName; + String prodType; + String add1; + String add2; + String add3; + Double availBal; + String pacsId; + int totalRecords; + int successfulRecords; + Double drTotal; + Double crTotal; // txn amnt in case of bulk + String accntOpenDate; + String accntMatDate; + String txnRefNo; + String txnType; + String message; //narration in case of bulk + String fromAccBulk; + String toAccBulk; + String limit;//for account renew bulk + String guardianName; + + + + public String getGuardianName() { + return guardianName; + } + + public void setGuardianName(String guardianName) { + this.guardianName = guardianName; + } + + public String getLimit() { + return limit; + } + + public void setLimit(String limit) { + this.limit = limit; + } + public String getFromAccBulk() { + return fromAccBulk; + } + + public void setFromAccBulk(String fromAccBulk) { + this.fromAccBulk = fromAccBulk; + } + + public String getToAccBulk() { + return toAccBulk; + } + + public void setToAccBulk(String toAccBulk) { + this.toAccBulk = toAccBulk; + } + + + public String getSlNo() { + return slNo; + } + + public void setSlNo(String slNo) { + this.slNo = slNo; + } + String slNo; + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + public String getTxnType() { + return txnType; + } + + public void setTxnType(String txnType) { + this.txnType = txnType; + } + + public String getTxnRefNo() { + return txnRefNo; + } + + public void setTxnRefNo(String txnRefNo) { + this.txnRefNo = txnRefNo; + } + + public String getAccntMatDate() { + return accntMatDate; + } + + public void setAccntMatDate(String accntMatDate) { + this.accntMatDate = accntMatDate; + } + + public String getAccntMaturityDate() { + return accntMaturityDate; + } + + public void setAccntMaturityDate(String accntMaturityDate) { + this.accntMaturityDate = accntMaturityDate; + } + + public String getAccntOpenDate() { + return accntOpenDate; + } + + public void setAccntOpenDate(String accntOpenDate) { + this.accntOpenDate = accntOpenDate; + } + String accntMaturityDate; + + public Double getCrTotal() { + return crTotal; + } + + public void setCrTotal(Double crTotal) { + this.crTotal = crTotal; + } + + public Double getDrTotal() { + return drTotal; + } + + public void setDrTotal(Double drTotal) { + this.drTotal = drTotal; + } + + public int getSuccessfulRecords() { + return successfulRecords; + } + + public void setSuccessfulRecords(int successfulRecords) { + this.successfulRecords = successfulRecords; + } + + public int getTotalRecords() { + return totalRecords; + } + + public void setTotalRecords(int totalRecords) { + this.totalRecords = totalRecords; + } + + public String getPacsId() { + return pacsId; + } + + public void setPacsId(String pacsId) { + this.pacsId = pacsId; + } + + + public String getProdName() { + return prodName; + } + + public void setProdName(String prodName) { + this.prodName = prodName; + } + + public String getProdType() { + return prodType; + } + + public void setProdType(String prodType) { + this.prodType = prodType; + } + + + public String getAccountCode() { + return accountCode; + } + + public void setAccountCode(String accountCode) { + this.accountCode = accountCode; + } + + public String getAccountName() { + return accountName; + } + + public void setAccountName(String accountName) { + this.accountName = accountName; + } + + public String getAdd1() { + return add1; + } + + public void setAdd1(String add1) { + this.add1 = add1; + } + + public String getAdd2() { + return add2; + } + + public void setAdd2(String add2) { + this.add2 = add2; + } + + public String getAdd3() { + return add3; + } + + public void setAdd3(String add3) { + this.add3 = add3; + } + + public Double getAvailBal() { + return availBal; + } + + public void setAvailBal(Double availBal) { + this.availBal = availBal; + } + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/MyIntimationBean.java b/IPKS_Updated/src/src/java/DataEntryBean/MyIntimationBean.java new file mode 100644 index 0000000..abb3e9c --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/MyIntimationBean.java @@ -0,0 +1,206 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Helpdesk10 + */ +public class MyIntimationBean { + + private String account_no; + private String refno; + private String transactiontype; + private String fromDate; + private String toDate; + private String remarks; + private String transactiontypeSearch; + private String refnoSearch; + private String tran_date; + private String Auth_id; + private String amount; + private String status; + private String checkOption; + private String chargeToDeduct; + private String account_no2; + private String account_bal; + private String pacsID; + private String pacsName; + private String CBSAcc; + private String sale_purchase_ref; + private String trade_product; + + + + public String getSale_purchase_ref() { + return sale_purchase_ref; + } + + public void setSale_purchase_ref(String sale_purchase_ref) { + this.sale_purchase_ref = sale_purchase_ref; + } + + public String getTrade_product() { + return trade_product; + } + + public void setTrade_product(String trade_product) { + this.trade_product = trade_product; + } + + public String getChargeToDeduct() { + return chargeToDeduct; + } + + public void setChargeToDeduct(String chargeToDeduct) { + this.chargeToDeduct = chargeToDeduct; + } + + public String getCheckOption() { + return checkOption; + } + + public void setCheckOption(String checkOption) { + this.checkOption = checkOption; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks; + } + + public String getRefno() { + return refno; + } + + public void setRefno(String refno) { + this.refno = refno; + } + + public String getTransactiontype() { + return transactiontype; + } + + public void setTransactiontype(String transactiontype) { + this.transactiontype = transactiontype; + } + + public String getFromDate() { + return fromDate; + } + + public void setFromDate(String fromDate) { + this.fromDate = fromDate; + } + + public String getToDate() { + return toDate; + } + + public void setToDate(String toDate) { + this.toDate = toDate; + } + + public String getAccount_no() { + return account_no; + } + + public void setAccount_no(String account_no) { + this.account_no = account_no; + } + + public String getTransactiontypeSearch() { + return transactiontypeSearch; + } + + public void setTransactiontypeSearch(String transactiontypeSearch) { + this.transactiontypeSearch = transactiontypeSearch; + } + + public String getRefnoSearch() { + return refnoSearch; + } + + public void setRefnoSearch(String refnoSearch) { + this.refnoSearch = refnoSearch; + } + + public String getTran_date() { + return tran_date; + } + + public void setTran_date(String tran_date) { + this.tran_date = tran_date; + } + + public String getAuth_id() { + return Auth_id; + } + + public void setAuth_id(String Auth_id) { + this.Auth_id = Auth_id; + } + + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } + + public String getAccount_no2() { + return account_no2; + } + + public void setAccount_no2(String account_no2) { + this.account_no2 = account_no2; + } + + public String getAccount_bal() { + return account_bal; + } + + public void setAccount_bal(String account_bal) { + this.account_bal = account_bal; + } + + public String getPacsID() { + return pacsID; + } + + public void setPacsID(String pacsID) { + this.pacsID = pacsID; + } + + public String getPacsName() { + return pacsName; + } + + public void setPacsName(String pacsName) { + this.pacsName = pacsName; + } + + public String getCBSAcc() { + return CBSAcc; + } + + public void setCBSAcc(String CBSAcc) { + this.CBSAcc = CBSAcc; + } + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/NeftRtgsEnquiryBean.java b/IPKS_Updated/src/src/java/DataEntryBean/NeftRtgsEnquiryBean.java new file mode 100644 index 0000000..7731a98 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/NeftRtgsEnquiryBean.java @@ -0,0 +1,192 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author IPKS + */ +public class NeftRtgsEnquiryBean { + + String TxnNo; + String SrcAccNo; + String DestAccNo2; + String BankName; + String BranchName; + String IfscNoVal2; + String TransAmt; + String RefNo; + String Status; + String TxnDate; + String ben_name; + String ben_add; + String from_date; + String to_date; + String com_amt; + String com_txn_no; + String rem_ac_no; + String queueNo; + String queueNo2; + + public String getQueueNo2() { + return queueNo2; + } + + public void setQueueNo2(String queueNo2) { + this.queueNo2 = queueNo2; + } + + public String getQueueNo() { + return queueNo; + } + + public void setQueueNo(String queueNo) { + this.queueNo = queueNo; + } + + public String getRem_ac_no() { + return rem_ac_no; + } + + public void setRem_ac_no(String rem_ac_no) { + this.rem_ac_no = rem_ac_no; + } + + + + public String getCom_amt() { + return com_amt; + } + + public void setCom_amt(String com_amt) { + this.com_amt = com_amt; + } + + public String getCom_txn_no() { + return com_txn_no; + } + + public void setCom_txn_no(String com_txn_no) { + this.com_txn_no = com_txn_no; + } + + public String getFrom_date() { + return from_date; + } + + public void setFrom_date(String from_date) { + this.from_date = from_date; + } + + public String getTo_date() { + return to_date; + } + + public void setTo_date(String to_date) { + this.to_date = to_date; + } + + + public String getBen_add() { + return ben_add; + } + + public void setBen_add(String ben_add) { + this.ben_add = ben_add; + } + + public String getBen_name() { + return ben_name; + } + + public void setBen_name(String ben_name) { + this.ben_name = ben_name; + } + + + public String getBankName() { + return BankName; + } + + public void setBankName(String BankName) { + this.BankName = BankName; + } + + public String getBranchName() { + return BranchName; + } + + public void setBranchName(String BranchName) { + this.BranchName = BranchName; + } + + public String getDestAccNo2() { + return DestAccNo2; + } + + public void setDestAccNo2(String DestAccNo2) { + this.DestAccNo2 = DestAccNo2; + } + + public String getIfscNoVal2() { + return IfscNoVal2; + } + + public void setIfscNoVal2(String IfscNoVal2) { + this.IfscNoVal2 = IfscNoVal2; + } + + public String getRefNo() { + return RefNo; + } + + public void setRefNo(String RefNo) { + this.RefNo = RefNo; + } + + public String getSrcAccNo() { + return SrcAccNo; + } + + public void setSrcAccNo(String SrcAccNo) { + this.SrcAccNo = SrcAccNo; + } + + public String getStatus() { + return Status; + } + + public void setStatus(String Status) { + this.Status = Status; + } + + public String getTransAmt() { + return TransAmt; + } + + public void setTransAmt(String TransAmt) { + this.TransAmt = TransAmt; + } + + public String getTxnDate() { + return TxnDate; + } + + public void setTxnDate(String TxnDate) { + this.TxnDate = TxnDate; + } + + public String getTxnNo() { + return TxnNo; + } + + public void setTxnNo(String TxnNo) { + this.TxnNo = TxnNo; + } + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/NscDetailsBean.java b/IPKS_Updated/src/src/java/DataEntryBean/NscDetailsBean.java new file mode 100644 index 0000000..192529c --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/NscDetailsBean.java @@ -0,0 +1,80 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 1004242 + */ +public class NscDetailsBean { + private String refno; + private String amt; + private String openDt; + private String expDt; + private String bond; + private String grossW; + private String netW; + + + + public String getBond() { + return bond; + } + + public void setBond(String bond) { + this.bond = bond; + } + + public String getGrossW() { + return grossW; + } + + public void setGrossW(String grossW) { + this.grossW = grossW; + } + + public String getNetW() { + return netW; + } + + public void setNetW(String netW) { + this.netW = netW; + } + + public String getAmt() { + return amt; + } + + public void setAmt(String amt) { + this.amt = amt; + } + + public String getExpDt() { + return expDt; + } + + public void setExpDt(String expDt) { + this.expDt = expDt; + } + + public String getOpenDt() { + return openDt; + } + + public void setOpenDt(String openDt) { + this.openDt = openDt; + } + + public String getRefno() { + return refno; + } + + public void setRefno(String refno) { + this.refno = refno; + } + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/PacsManagementBean.java b/IPKS_Updated/src/src/java/DataEntryBean/PacsManagementBean.java new file mode 100644 index 0000000..e349f76 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/PacsManagementBean.java @@ -0,0 +1,408 @@ +package DataEntryBean; + +/** + * + * @author Tcs Helpdesk10 + */ +public class PacsManagementBean { + + //For Create Div + private String effectDate; + private String pacsName; + private String pacsCode; + private String dccb; + private String cbsBranchCode; + private String addressLine1; + private String addressLine2; + private String addressLine3; + private String districtCode; + private String liveFlag; + + private String cmnPrkBglNo; + private String pacsConsAccNo; + private String hdPacsCode; + + //For Amend Div + private String effectDateAmend; + private String pacsNameAmend; + private String pacsCodeAmend; + private String dccbAmend; + private String cbsBranchCodeAmend; + private String addressLine1Amend; + private String addressLine2Amend; + private String addressLine3Amend; + private String districtCodeAmend; + private String liveFlagAmend; + + private String cmnPrkBglNoAmend; + private String pacsConsAccNoAmend; + + private String pacsCodeSearch; + private String hdPacsCodeAmend; + + public String getHdPacsCode() { + return hdPacsCode; + } + + public void setHdPacsCode(String hdPacsCode) { + this.hdPacsCode = hdPacsCode; + } + + public String getHdPacsCodeAmend() { + return hdPacsCodeAmend; + } + + public void setHdPacsCodeAmend(String hdPacsCodeAmend) { + this.hdPacsCodeAmend = hdPacsCodeAmend; + } + /** + * @return the pacsName + */ + + public String getPacsName() { + return pacsName; + } + + /** + * @param pacsName the pacsName to set + */ + public void setPacsName(String pacsName) { + this.pacsName = pacsName; + } + + /** + * @return the pacsCode + */ + public String getPacsCode() { + return pacsCode; + } + + /** + * @param pacsCode the pacsCode to set + */ + public void setPacsCode(String pacsCode) { + this.pacsCode = pacsCode; + } + + /** + * @return the dccb + */ + public String getDccb() { + return dccb; + } + + /** + * @param dccb the dccb to set + */ + public void setDccb(String dccb) { + this.dccb = dccb; + } + + /** + * @return the cbsBranchCode + */ + public String getCbsBranchCode() { + return cbsBranchCode; + } + + /** + * @param cbsBranchCode the cbsBranchCode to set + */ + public void setCbsBranchCode(String cbsBranchCode) { + this.cbsBranchCode = cbsBranchCode; + } + + /** + * @return the addressLine1 + */ + public String getAddressLine1() { + return addressLine1; + } + + /** + * @param addressLine1 the addressLine1 to set + */ + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + /** + * @return the addressLine2 + */ + public String getAddressLine2() { + return addressLine2; + } + + /** + * @param addressLine2 the addressLine2 to set + */ + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + /** + * @return the addressLine3 + */ + public String getAddressLine3() { + return addressLine3; + } + + /** + * @param addressLine3 the addressLine3 to set + */ + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + /** + * @return the districtCode + */ + public String getDistrictCode() { + return districtCode; + } + + /** + * @param districtCode the districtCode to set + */ + public void setDistrictCode(String districtCode) { + this.districtCode = districtCode; + } + + /** + * @return the liveFlag + */ + public String getLiveFlag() { + return liveFlag; + } + + /** + * @param liveFlag the liveFlag to set + */ + public void setLiveFlag(String liveFlag) { + this.liveFlag = liveFlag; + } + + /** + * @return the pacsNameAmend + */ + public String getPacsNameAmend() { + return pacsNameAmend; + } + + /** + * @param pacsNameAmend the pacsNameAmend to set + */ + public void setPacsNameAmend(String pacsNameAmend) { + this.pacsNameAmend = pacsNameAmend; + } + + /** + * @return the pacsCodeAmend + */ + public String getPacsCodeAmend() { + return pacsCodeAmend; + } + + /** + * @param pacsCodeAmend the pacsCodeAmend to set + */ + public void setPacsCodeAmend(String pacsCodeAmend) { + this.pacsCodeAmend = pacsCodeAmend; + } + + /** + * @return the dccbAmend + */ + public String getDccbAmend() { + return dccbAmend; + } + + /** + * @param dccbAmend the dccbAmend to set + */ + public void setDccbAmend(String dccbAmend) { + this.dccbAmend = dccbAmend; + } + + /** + * @return the cbsBranchCodeAmend + */ + public String getCbsBranchCodeAmend() { + return cbsBranchCodeAmend; + } + + /** + * @param cbsBranchCodeAmend the cbsBranchCodeAmend to set + */ + public void setCbsBranchCodeAmend(String cbsBranchCodeAmend) { + this.cbsBranchCodeAmend = cbsBranchCodeAmend; + } + + /** + * @return the addressLine1Amend + */ + public String getAddressLine1Amend() { + return addressLine1Amend; + } + + /** + * @param addressLine1Amend the addressLine1Amend to set + */ + public void setAddressLine1Amend(String addressLine1Amend) { + this.addressLine1Amend = addressLine1Amend; + } + + /** + * @return the addressLine2Amend + */ + public String getAddressLine2Amend() { + return addressLine2Amend; + } + + /** + * @param addressLine2Amend the addressLine2Amend to set + */ + public void setAddressLine2Amend(String addressLine2Amend) { + this.addressLine2Amend = addressLine2Amend; + } + + /** + * @return the addressLine3Amend + */ + public String getAddressLine3Amend() { + return addressLine3Amend; + } + + /** + * @param addressLine3Amend the addressLine3Amend to set + */ + public void setAddressLine3Amend(String addressLine3Amend) { + this.addressLine3Amend = addressLine3Amend; + } + + /** + * @return the districtCodeAmend + */ + public String getDistrictCodeAmend() { + return districtCodeAmend; + } + + /** + * @param districtCodeAmend the districtCodeAmend to set + */ + public void setDistrictCodeAmend(String districtCodeAmend) { + this.districtCodeAmend = districtCodeAmend; + } + + /** + * @return the liveFlagAmend + */ + public String getLiveFlagAmend() { + return liveFlagAmend; + } + + /** + * @param liveFlagAmend the liveFlagAmend to set + */ + public void setLiveFlagAmend(String liveFlagAmend) { + this.liveFlagAmend = liveFlagAmend; + } + + /** + * @return the pacsCodeSearch + */ + public String getPacsCodeSearch() { + return pacsCodeSearch; + } + + /** + * @param pacsCodeSearch the pacsCodeSearch to set + */ + public void setPacsCodeSearch(String pacsCodeSearch) { + this.pacsCodeSearch = pacsCodeSearch; + } + + /** + * @return the effectDate + */ + public String getEffectDate() { + return effectDate; + } + + /** + * @param effectDate the effectDate to set + */ + public void setEffectDate(String effectDate) { + this.effectDate = effectDate; + } + + /** + * @return the effectDateAmend + */ + public String getEffectDateAmend() { + return effectDateAmend; + } + + /** + * @param effectDateAmend the effectDateAmend to set + */ + public void setEffectDateAmend(String effectDateAmend) { + this.effectDateAmend = effectDateAmend; + } + + /** + * @return the cmnPrkBglNo + */ + public String getCmnPrkBglNo() { + return cmnPrkBglNo; + } + + /** + * @param cmnPrkBglNo the cmnPrkBglNo to set + */ + public void setCmnPrkBglNo(String cmnPrkBglNo) { + this.cmnPrkBglNo = cmnPrkBglNo; + } + + /** + * @return the pacsConsAccNo + */ + public String getPacsConsAccNo() { + return pacsConsAccNo; + } + + /** + * @param pacsConsAccNo the pacsConsAccNo to set + */ + public void setPacsConsAccNo(String pacsConsAccNo) { + this.pacsConsAccNo = pacsConsAccNo; + } + + /** + * @return the cmnPrkBglNoAmend + */ + public String getCmnPrkBglNoAmend() { + return cmnPrkBglNoAmend; + } + + /** + * @param cmnPrkBglNoAmend the cmnPrkBglNoAmend to set + */ + public void setCmnPrkBglNoAmend(String cmnPrkBglNoAmend) { + this.cmnPrkBglNoAmend = cmnPrkBglNoAmend; + } + + /** + * @return the pacsConsAccNoAmend + */ + public String getPacsConsAccNoAmend() { + return pacsConsAccNoAmend; + } + + /** + * @param pacsConsAccNoAmend the pacsConsAccNoAmend to set + */ + public void setPacsConsAccNoAmend(String pacsConsAccNoAmend) { + this.pacsConsAccNoAmend = pacsConsAccNoAmend; + } +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/PassbookBean.java b/IPKS_Updated/src/src/java/DataEntryBean/PassbookBean.java new file mode 100644 index 0000000..14b62a6 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/PassbookBean.java @@ -0,0 +1,278 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author IPKS + */ +public class PassbookBean { + + private String accNo; + private String printType; + private String accType; + private String txn_date; + private String narration; + private String dr_amt; + private String cr_amt; + private String end_bal; + private String CBS_REF_NO; + private String from_date; + private String to_date; + private int startRow; + private int endrow; + private String custName; + private String cifNo; + private String dccbName; + private String cbsBrName; + private String prodName; + private String linkAcc; + private String accOpenDt; + private String guardian; + private String address; + private String contact; + private String modeOfOps; + private String managerLine; + private String secHolder; + private String nomineeName; + private String rdDetails; + private String accSubType; + + + public String getAccSubType() { + return accSubType; + } + + public void setAccSubType(String accSubType) { + this.accSubType = accSubType; + } + + public String getRdDetails() { + return rdDetails; + } + + public void setRdDetails(String rdDetails) { + this.rdDetails = rdDetails; + } + + public String getNomineeName() { + return nomineeName; + } + + public void setNomineeName(String nomineeName) { + this.nomineeName = nomineeName; + } + + public String getManagerLine() { + return managerLine; + } + + public String getSecHolder() { + return secHolder; + } + + public void setSecHolder(String secHolder) { + this.secHolder = secHolder; + } + + public void setManagerLine(String managerLine) { + this.managerLine = managerLine; + } + + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + public String getModeOfOps() { + return modeOfOps; + } + + public void setModeOfOps(String modeOfOps) { + this.modeOfOps = modeOfOps; + } + + public String getAccOpenDt() { + return accOpenDt; + } + + public void setAccOpenDt(String accOpenDt) { + this.accOpenDt = accOpenDt; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getGuardian() { + return guardian; + } + + public void setGuardian(String guardian) { + this.guardian = guardian; + } + + public String getLinkAcc() { + return linkAcc; + } + + public void setLinkAcc(String linkAcc) { + this.linkAcc = linkAcc; + } + + public String getCbsBrName() { + return cbsBrName; + } + + public void setCbsBrName(String cbsBrName) { + this.cbsBrName = cbsBrName; + } + + public String getCifNo() { + return cifNo; + } + + public void setCifNo(String cifNo) { + this.cifNo = cifNo; + } + + public String getCustName() { + return custName; + } + + public void setCustName(String custName) { + this.custName = custName; + } + + public String getDccbName() { + return dccbName; + } + + public void setDccbName(String dccbName) { + this.dccbName = dccbName; + } + + public String getProdName() { + return prodName; + } + + public void setProdName(String prodName) { + this.prodName = prodName; + } + + public int getEndrow() { + return endrow; + } + + public void setEndrow(int endrow) { + this.endrow = endrow; + } + + public int getStartRow() { + return startRow; + } + + public void setStartRow(int startRow) { + this.startRow = startRow; + } + + public String getFrom_date() { + return from_date; + } + + public void setFrom_date(String from_date) { + this.from_date = from_date; + } + + public String getTo_date() { + return to_date; + } + + public void setTo_date(String to_date) { + this.to_date = to_date; + } + + public String getCBS_REF_NO() { + return CBS_REF_NO; + } + + public void setCBS_REF_NO(String CBS_REF_NO) { + this.CBS_REF_NO = CBS_REF_NO; + } + + public String getAccType() { + return accType; + } + + public void setAccType(String accType) { + this.accType = accType; + } + + public String getPrintType() { + return printType; + } + + public void setPrintType(String printType) { + this.printType = printType; + } + + public String getAccNo() { + return accNo; + } + + public void setAccNo(String accNo) { + this.accNo = accNo; + } + + public String getCr_amt() { + return cr_amt; + } + + public void setCr_amt(String cr_amt) { + this.cr_amt = cr_amt; + } + + public String getDr_amt() { + return dr_amt; + } + + public void setDr_amt(String dr_amt) { + this.dr_amt = dr_amt; + } + + public String getEnd_bal() { + return end_bal; + } + + public void setEnd_bal(String end_bal) { + this.end_bal = end_bal; + } + + public String getNarration() { + return narration; + } + + public void setNarration(String narration) { + this.narration = narration; + } + + public String getTxn_date() { + return txn_date; + } + + public void setTxn_date(String txn_date) { + this.txn_date = txn_date; + } + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/PaymentAcknowledgementBean.java b/IPKS_Updated/src/src/java/DataEntryBean/PaymentAcknowledgementBean.java new file mode 100644 index 0000000..17eb9f3 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/PaymentAcknowledgementBean.java @@ -0,0 +1,250 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author 1319106 + */ +public class PaymentAcknowledgementBean { + + private String orderno; + private String vduedate; + private String vtotal; + private String amountpaid; + private String amountdue; + private String vtobepaid; + private String salesrefno; + private String name; + private String customerid; + private String total; + private String due; + private String cduedate; + private String ctobepaid; + private String cpaid; + private String vsgst; + private String vcgst; + private String csgst; + private String ccgst; + private String disAmt; + private String vtrfAcc; + private String ctrfAcc; + private String prod_id; + private String vnetAmt; + private String cnetAmt; + private String vpayMode; + private String cpayMode; + + public String getCpayMode() { + return cpayMode; + } + + public void setCpayMode(String cpayMode) { + this.cpayMode = cpayMode; + } + + public String getVpayMode() { + return vpayMode; + } + + public void setVpayMode(String vpayMode) { + this.vpayMode = vpayMode; + } + + public String getCnetAmt() { + return cnetAmt; + } + + public void setCnetAmt(String cnetAmt) { + this.cnetAmt = cnetAmt; + } + + public String getVnetAmt() { + return vnetAmt; + } + + public void setVnetAmt(String vnetAmt) { + this.vnetAmt = vnetAmt; + } + + public String getProd_id() { + return prod_id; + } + + public void setProd_id(String prod_id) { + this.prod_id = prod_id; + } + + public String getCcgst() { + return ccgst; + } + + public void setCcgst(String ccgst) { + this.ccgst = ccgst; + } + + public String getCsgst() { + return csgst; + } + + public void setCsgst(String csgst) { + this.csgst = csgst; + } + + public String getCtrfAcc() { + return ctrfAcc; + } + + public void setCtrfAcc(String ctrfAcc) { + this.ctrfAcc = ctrfAcc; + } + + public String getDisAmt() { + return disAmt; + } + + public void setDisAmt(String disAmt) { + this.disAmt = disAmt; + } + + public String getVcgst() { + return vcgst; + } + + public void setVcgst(String vcgst) { + this.vcgst = vcgst; + } + + public String getVsgst() { + return vsgst; + } + + public void setVsgst(String vsgst) { + this.vsgst = vsgst; + } + + public String getVtrfAcc() { + return vtrfAcc; + } + + public void setVtrfAcc(String vtrfAcc) { + this.vtrfAcc = vtrfAcc; + } + + public String getAmountdue() { + return amountdue; + } + + public void setAmountdue(String amountdue) { + this.amountdue = amountdue; + } + + public String getAmountpaid() { + return amountpaid; + } + + public void setAmountpaid(String amountpaid) { + this.amountpaid = amountpaid; + } + + public String getCduedate() { + return cduedate; + } + + public void setCduedate(String cduedate) { + this.cduedate = cduedate; + } + + public String getCpaid() { + return cpaid; + } + + public void setCpaid(String cpaid) { + this.cpaid = cpaid; + } + + public String getCtobepaid() { + return ctobepaid; + } + + public void setCtobepaid(String ctobepaid) { + this.ctobepaid = ctobepaid; + } + + public String getCustomerid() { + return customerid; + } + + public void setCustomerid(String customerid) { + this.customerid = customerid; + } + + public String getDue() { + return due; + } + + public void setDue(String due) { + this.due = due; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getOrderno() { + return orderno; + } + + public void setOrderno(String orderno) { + this.orderno = orderno; + } + + public String getSalesrefno() { + return salesrefno; + } + + public void setSalesrefno(String salesrefno) { + this.salesrefno = salesrefno; + } + + public String getTotal() { + return total; + } + + public void setTotal(String total) { + this.total = total; + } + + public String getVduedate() { + return vduedate; + } + + public void setVduedate(String vduedate) { + this.vduedate = vduedate; + } + + public String getVtobepaid() { + return vtobepaid; + } + + public void setVtobepaid(String vtobepaid) { + this.vtobepaid = vtobepaid; + } + + public String getVtotal() { + return vtotal; + } + + public void setVtotal(String vtotal) { + this.vtotal = vtotal; + } + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/PayrollBean.java b/IPKS_Updated/src/src/java/DataEntryBean/PayrollBean.java new file mode 100644 index 0000000..96473e1 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/PayrollBean.java @@ -0,0 +1,556 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Help desk122 + */ +public class PayrollBean { + + public String grade_id; + public String grade; + public String status; + public String checkOption; + public String designation; + public String designation_id; + public String employee; + public String employee_id; + public String cif; + public String joinDate; + public String confirmDate; + public String retireDate; + public String designationCode; + public String salaryAcc; + public String gradeCode; + public String basicAmt; + public String daRate; + public String daAmt; + public String msaAmt; + public String epfStaffRate; + public String epfStaffAmt; + public String epfSocRate; + public String epfSocAmt; + public String taxAmt; + public String otherAmt; + public String dependent; + public String dob; + public String relation; + public String nominee; + public String ename; + public String id; + public String leave; + public String leaveType; + public String yearlyCredit; + public String encashFlag; + public String carryfFlag; + public String encashLimit; + public String minReserve; + public String maxReserve; + public String minAllow; + public String maxAllow; + public String leaveBal; + public String remarks; + public String leaveId; + public String fromDate; + public String toDate; + public String salaryGL; + public String pTax; + public String otherDeduct; + public String epfStaffCr; + public String epfSocDr; + public String epfSocCr; + public String glid; + public String taxid; + public String otherid; + public String staffcrid; + public String socdrid; + public String soccrid; + public String monthyear; + public String procDate; + + + public String getMonthyear() { + return monthyear; + } + + public void setMonthyear(String monthyear) { + this.monthyear = monthyear; + } + + public String getProcDate() { + return procDate; + } + + public void setProcDate(String procDate) { + this.procDate = procDate; + } + + public String getTaxid() { + return taxid; + } + + public void setTaxid(String taxid) { + this.taxid = taxid; + } + + public String getOtherid() { + return otherid; + } + + public void setOtherid(String otherid) { + this.otherid = otherid; + } + + public String getStaffcrid() { + return staffcrid; + } + + public void setStaffcrid(String staffcrid) { + this.staffcrid = staffcrid; + } + + public String getSocdrid() { + return socdrid; + } + + public void setSocdrid(String socdrid) { + this.socdrid = socdrid; + } + + public String getSoccrid() { + return soccrid; + } + + public void setSoccrid(String soccrid) { + this.soccrid = soccrid; + } + + public String getGlid() { + return glid; + } + + public void setGlid(String glid) { + this.glid = glid; + } + + public String getSalaryGL() { + return salaryGL; + } + + public void setSalaryGL(String salaryGL) { + this.salaryGL = salaryGL; + } + + public String getpTax() { + return pTax; + } + + public void setpTax(String pTax) { + this.pTax = pTax; + } + + public String getOtherDeduct() { + return otherDeduct; + } + + public void setOtherDeduct(String otherDeduct) { + this.otherDeduct = otherDeduct; + } + + public String getEpfStaffCr() { + return epfStaffCr; + } + + public void setEpfStaffCr(String epfStaffCr) { + this.epfStaffCr = epfStaffCr; + } + + public String getEpfSocDr() { + return epfSocDr; + } + + public void setEpfSocDr(String epfSocDr) { + this.epfSocDr = epfSocDr; + } + + public String getEpfSocCr() { + return epfSocCr; + } + + public void setEpfSocCr(String epfSocCr) { + this.epfSocCr = epfSocCr; + } + + public String getFromDate() { + return fromDate; + } + + public void setFromDate(String fromDate) { + this.fromDate = fromDate; + } + + public String getToDate() { + return toDate; + } + + public void setToDate(String toDate) { + this.toDate = toDate; + } + + public String getLeaveId() { + return leaveId; + } + + public void setLeaveId(String leaveId) { + this.leaveId = leaveId; + } + + public String getLeaveBal() { + return leaveBal; + } + + public void setLeaveBal(String leaveBal) { + this.leaveBal = leaveBal; + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks; + } + + public String getLeaveType() { + return leaveType; + } + + public void setLeaveType(String leaveType) { + this.leaveType = leaveType; + } + + public String getYearlyCredit() { + return yearlyCredit; + } + + public void setYearlyCredit(String yearlyCredit) { + this.yearlyCredit = yearlyCredit; + } + + public String getEncashFlag() { + return encashFlag; + } + + public void setEncashFlag(String encashFlag) { + this.encashFlag = encashFlag; + } + + public String getCarryfFlag() { + return carryfFlag; + } + + public void setCarryfFlag(String carryfFlag) { + this.carryfFlag = carryfFlag; + } + + public String getEncashLimit() { + return encashLimit; + } + + public void setEncashLimit(String encashLimit) { + this.encashLimit = encashLimit; + } + + public String getMinReserve() { + return minReserve; + } + + public void setMinReserve(String minReserve) { + this.minReserve = minReserve; + } + + public String getMaxReserve() { + return maxReserve; + } + + public void setMaxReserve(String maxReserve) { + this.maxReserve = maxReserve; + } + + public String getMinAllow() { + return minAllow; + } + + public void setMinAllow(String minAllow) { + this.minAllow = minAllow; + } + + public String getMaxAllow() { + return maxAllow; + } + + public void setMaxAllow(String maxAllow) { + this.maxAllow = maxAllow; + } + + public String getLeave() { + return leave; + } + + public void setLeave(String leave) { + this.leave = leave; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getEname() { + return ename; + } + + public void setEname(String ename) { + this.ename = ename; + } + + public String getDependent() { + return dependent; + } + + public void setDependent(String dependent) { + this.dependent = dependent; + } + + public String getDob() { + return dob; + } + + public void setDob(String dob) { + this.dob = dob; + } + + public String getRelation() { + return relation; + } + + public void setRelation(String relation) { + this.relation = relation; + } + + public String getNominee() { + return nominee; + } + + public void setNominee(String nominee) { + this.nominee = nominee; + } + + public String getCif() { + return cif; + } + + public void setCif(String cif) { + this.cif = cif; + } + + public String getJoinDate() { + return joinDate; + } + + public void setJoinDate(String joinDate) { + this.joinDate = joinDate; + } + + public String getConfirmDate() { + return confirmDate; + } + + public void setConfirmDate(String confirmDate) { + this.confirmDate = confirmDate; + } + + public String getRetireDate() { + return retireDate; + } + + public void setRetireDate(String retireDate) { + this.retireDate = retireDate; + } + + public String getDesignationCode() { + return designationCode; + } + + public void setDesignationCode(String designationCode) { + this.designationCode = designationCode; + } + + public String getSalaryAcc() { + return salaryAcc; + } + + public void setSalaryAcc(String salaryAcc) { + this.salaryAcc = salaryAcc; + } + + public String getGradeCode() { + return gradeCode; + } + + public void setGradeCode(String gradeCode) { + this.gradeCode = gradeCode; + } + + public String getBasicAmt() { + return basicAmt; + } + + public void setBasicAmt(String basicAmt) { + this.basicAmt = basicAmt; + } + + public String getDaRate() { + return daRate; + } + + public void setDaRate(String daRate) { + this.daRate = daRate; + } + + public String getDaAmt() { + return daAmt; + } + + public void setDaAmt(String daAmt) { + this.daAmt = daAmt; + } + + public String getMsaAmt() { + return msaAmt; + } + + public void setMsaAmt(String msaAmt) { + this.msaAmt = msaAmt; + } + + public String getEpfStaffRate() { + return epfStaffRate; + } + + public void setEpfStaffRate(String epfStaffRate) { + this.epfStaffRate = epfStaffRate; + } + + public String getEpfStaffAmt() { + return epfStaffAmt; + } + + public void setEpfStaffAmt(String epfStaffAmt) { + this.epfStaffAmt = epfStaffAmt; + } + + public String getEpfSocRate() { + return epfSocRate; + } + + public void setEpfSocRate(String epfSocRate) { + this.epfSocRate = epfSocRate; + } + + public String getEpfSocAmt() { + return epfSocAmt; + } + + public void setEpfSocAmt(String epfSocAmt) { + this.epfSocAmt = epfSocAmt; + } + + public String getTaxAmt() { + return taxAmt; + } + + public void setTaxAmt(String taxAmt) { + this.taxAmt = taxAmt; + } + + public String getOtherAmt() { + return otherAmt; + } + + public void setOtherAmt(String otherAmt) { + this.otherAmt = otherAmt; + } + + public String getEmployee() { + return employee; + } + + public void setEmployee(String employee) { + this.employee = employee; + } + + public String getEmployee_id() { + return employee_id; + } + + public void setEmployee_id(String employee_id) { + this.employee_id = employee_id; + } + + public String getDesignation() { + return designation; + } + + public void setDesignation(String designation) { + this.designation = designation; + } + + public String getDesignation_id() { + return designation_id; + } + + public void setDesignation_id(String designation_id) { + this.designation_id = designation_id; + } + + public String getCheckOption() { + return checkOption; + } + + public void setCheckOption(String checkOption) { + this.checkOption = checkOption; + } + + public String getGrade_id() { + return grade_id; + } + + public void setGrade_id(String grade_id) { + this.grade_id = grade_id; + } + + public String getGrade() { + return grade; + } + + public void setGrade(String grade) { + this.grade = grade; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/PdsSellItemEntryBean.java b/IPKS_Updated/src/src/java/DataEntryBean/PdsSellItemEntryBean.java new file mode 100644 index 0000000..2054194 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/PdsSellItemEntryBean.java @@ -0,0 +1,119 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 986137 + */ +public class PdsSellItemEntryBean { + + private String memberId; + private String memberName; + private String cardTypeId; + private String cardNo; + private String stockId; + private String price; + private String quantity; + private String total; + private String p_order_id; + private String grandTotal; + private String product_id; + + public String getCardNo() { + return cardNo; + } + + public void setCardNo(String cardNo) { + this.cardNo = cardNo; + } + + public String getCardTypeId() { + return cardTypeId; + } + + public void setCardTypeId(String cardTypeId) { + this.cardTypeId = cardTypeId; + } + + public String getGrandTotal() { + return grandTotal; + } + + public void setGrandTotal(String grandTotal) { + this.grandTotal = grandTotal; + } + + public String getMemberId() { + return memberId; + } + + public void setMemberId(String memberId) { + this.memberId = memberId; + } + + public String getMemberName() { + return memberName; + } + + public void setMemberName(String memberName) { + this.memberName = memberName; + } + + public String getP_order_id() { + return p_order_id; + } + + public void setP_order_id(String p_order_id) { + this.p_order_id = p_order_id; + } + + public String getPrice() { + return price; + } + + public void setPrice(String price) { + this.price = price; + } + + public String getProduct_id() { + return product_id; + } + + public void setProduct_id(String product_id) { + this.product_id = product_id; + } + + public String getQuantity() { + return quantity; + } + + public void setQuantity(String quantity) { + this.quantity = quantity; + } + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getTotal() { + return total; + } + + public void setTotal(String total) { + this.total = total; + } + + + + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/ProcurementRegisterBean.java b/IPKS_Updated/src/src/java/DataEntryBean/ProcurementRegisterBean.java new file mode 100644 index 0000000..dbb6d20 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/ProcurementRegisterBean.java @@ -0,0 +1,141 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Helpdesk10 + */ +public class ProcurementRegisterBean { + + private String procurementId; + private String procurementCode; + private String procurementDate; + private String unit; + private String ratePerUnit; + private String baseQty; + private String qtyAvailable; + private String toDate; + private String fromDate; + private String itemCode; + private String itemSubTypeCode; + private String itemCodeAmmend; + private String itemSubTypeCodeAmmend; + private String qty; + + public String getQty() { + return qty; + } + + public void setQty(String qty) { + this.qty = qty; + } + + public String getItemCodeAmmend() { + return itemCodeAmmend; + } + + public void setItemCodeAmmend(String itemCodeAmmend) { + this.itemCodeAmmend = itemCodeAmmend; + } + + public String getItemSubTypeCodeAmmend() { + return itemSubTypeCodeAmmend; + } + + public void setItemSubTypeCodeAmmend(String itemSubTypeCodeAmmend) { + this.itemSubTypeCodeAmmend = itemSubTypeCodeAmmend; + } + + public String getProcurementId() { + return procurementId; + } + + public void setProcurementId(String procurementId) { + this.procurementId = procurementId; + } + + public String getProcurementCode() { + return procurementCode; + } + + public void setProcurementCode(String procurementCode) { + this.procurementCode = procurementCode; + } + + public String getProcurementDate() { + return procurementDate; + } + + public void setProcurementDate(String procurementDate) { + this.procurementDate = procurementDate; + } + + public String getUnit() { + return unit; + } + + public void setUnit(String unit) { + this.unit = unit; + } + + public String getRatePerUnit() { + return ratePerUnit; + } + + public void setRatePerUnit(String ratePerUnit) { + this.ratePerUnit = ratePerUnit; + } + + public String getBaseQty() { + return baseQty; + } + + public void setBaseQty(String baseQty) { + this.baseQty = baseQty; + } + + public String getQtyAvailable() { + return qtyAvailable; + } + + public void setQtyAvailable(String qtyAvailable) { + this.qtyAvailable = qtyAvailable; + } + + public String getToDate() { + return toDate; + } + + public void setToDate(String toDate) { + this.toDate = toDate; + } + + public String getFromDate() { + return fromDate; + } + + public void setFromDate(String fromDate) { + this.fromDate = fromDate; + } + + public String getItemCode() { + return itemCode; + } + + public void setItemCode(String itemCode) { + this.itemCode = itemCode; + } + + public String getItemSubTypeCode() { + return itemSubTypeCode; + } + + public void setItemSubTypeCode(String itemSubTypeCode) { + this.itemSubTypeCode = itemSubTypeCode; + } + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/ProfitFactBean.java b/IPKS_Updated/src/src/java/DataEntryBean/ProfitFactBean.java new file mode 100644 index 0000000..c6cb394 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/ProfitFactBean.java @@ -0,0 +1,91 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +public class ProfitFactBean { + + + //for create + private String iID; + private String productname; + private String rationtype; + private String profitfactor; + + //for amend + private String iIDAmend; + private String productnameAmend; + private String rationtypeAmend; + private String profitfactorAmend; + +/* @author 1319106 + */ + public String getiID() { + return iID; + } + + public void setiID(String iID) { + this.iID = iID; + } + + public String getiIDAmend() { + return iIDAmend; + } + + public void setiIDAmend(String iIDAmend) { + this.iIDAmend = iIDAmend; + } + + + public String getproductname() { + return productname; + } + + public void setproductname(String productname) { + this.productname = productname; + } + + public String getproductnameAmend() { + return productnameAmend; + } + + public void setproductnameAmend(String productnameAmend) { + this.productnameAmend = productnameAmend; + } + + public String getrationtype() { + return rationtype; + } + + public void setrationtype(String rationtype) { + this.rationtype = rationtype; + } + + public String getrationtypeAmend() { + return rationtypeAmend; + } + + public void setrationtypeAmend(String rationtypeAmend) { + this.rationtypeAmend = rationtypeAmend; + } + + public String getprofitfactor() { + return profitfactor; + } + + public void setprofitfactor(String profitfactor) { + this.profitfactor = profitfactor; + } + + + public String getprofitfactorAmend() { + return profitfactorAmend; + } + + public void setprofitfactorAmend(String profitfactorAmend) { + this.profitfactorAmend = profitfactorAmend; + } + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/PurchaseDetailBean.java b/IPKS_Updated/src/src/java/DataEntryBean/PurchaseDetailBean.java new file mode 100644 index 0000000..f69c67f --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/PurchaseDetailBean.java @@ -0,0 +1,89 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Help desk122 + */ +public class PurchaseDetailBean { + + private String memberId; + private String memberName; + private String productName; + private String productCode; + private String quantity; + private String price; + private String total; + private String purchaseDate; + + public String getMemberId() { + return memberId; + } + + public void setMemberId(String memberId) { + this.memberId = memberId; + } + + public String getMemberName() { + return memberName; + } + + public void setMemberName(String memberName) { + this.memberName = memberName; + } + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName; + } + + public String getProductCode() { + return productCode; + } + + public void setProductCode(String productCode) { + this.productCode = productCode; + } + + public String getQuantity() { + return quantity; + } + + public void setQuantity(String quantity) { + this.quantity = quantity; + } + + public String getPrice() { + return price; + } + + public void setPrice(String price) { + this.price = price; + } + + public String getTotal() { + return total; + } + + public void setTotal(String total) { + this.total = total; + } + + public String getPurchaseDate() { + return purchaseDate; + } + + public void setPurchaseDate(String purchaseDate) { + this.purchaseDate = purchaseDate; + } + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/RDOperationBean.java b/IPKS_Updated/src/src/java/DataEntryBean/RDOperationBean.java new file mode 100644 index 0000000..8e99b0b --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/RDOperationBean.java @@ -0,0 +1,88 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 594267 + */ +public class RDOperationBean { + private String tranType; + private String accNo; + private String instAmt; + private String matVal; + private String narration; + private String txnamt; + private String netAmt; + private String intAdjAmt; + + public String getIntAdjAmt() { + return intAdjAmt; + } + + public void setIntAdjAmt(String intAdjAmt) { + this.intAdjAmt = intAdjAmt; + } + + public String getNetAmt() { + return netAmt; + } + + public void setNetAmt(String netAmt) { + this.netAmt = netAmt; + } + + public String getTxnamt() { + return txnamt; + } + + public void setTxnamt(String txnamt) { + this.txnamt = txnamt; + } + + public String getTranType() { + return tranType; + } + + public void setTranType(String tranType) { + this.tranType = tranType; + } + + + public String getInstAmt() { + return instAmt; + } + + public void setInstAmt(String instAmt) { + this.instAmt = instAmt; + } + + public String getAccNo() { + return accNo; + } + + public void setAccNo(String accNo) { + this.accNo = accNo; + } + + public String getMatVal() { + return matVal; + } + + public void setMatVal(String matVal) { + this.matVal = matVal; + } + + public String getNarration() { + return narration; + } + + public void setNarration(String narration) { + this.narration = narration; + } + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/RationCardTypeDetailsBean.java b/IPKS_Updated/src/src/java/DataEntryBean/RationCardTypeDetailsBean.java new file mode 100644 index 0000000..bf19da0 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/RationCardTypeDetailsBean.java @@ -0,0 +1,206 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 1320035 + */ +public class RationCardTypeDetailsBean { + + + private String productType; + private String productSubType; + private String quantityUnit; + private String quantity; + private String eligibility; + private String frequency; + private String saleRatePerUnit; + private String expiryDate; + private String productTypeAmend; + private String productSubTypeAmend; + private String quantityUnitAmend; + private String quantityAmend; + private String eligibilityAmend; + private String frequencyAmend; + private String saleRatePerUnitAmend; + private String expiryDateAmend; + private String product_id; + private String detailId; + private String product_id_Amend; + private String ledgerQty_remaining; + + public String getLedgerQty_remaining() { + return ledgerQty_remaining; + } + + public void setLedgerQty_remaining(String ledgerQty_remaining) { + this.ledgerQty_remaining = ledgerQty_remaining; + } + + + public String getProduct_id_Amend() { + return product_id_Amend; + } + + public void setProduct_id_Amend(String product_id_Amend) { + this.product_id_Amend = product_id_Amend; + } + + + + public String getDetailId() { + return detailId; + } + + public void setDetailId(String detailId) { + this.detailId = detailId; + } + + + + public String getProduct_id() { + return product_id; + } + + public void setProduct_id(String product_id) { + this.product_id = product_id; + } + + + + public String getEligibility() { + return eligibility; + } + + public void setEligibility(String eligibility) { + this.eligibility = eligibility; + } + + public String getEligibilityAmend() { + return eligibilityAmend; + } + + public void setEligibilityAmend(String eligibilityAmend) { + this.eligibilityAmend = eligibilityAmend; + } + + public String getExpiryDate() { + return expiryDate; + } + + public void setExpiryDate(String expiryDate) { + this.expiryDate = expiryDate; + } + + public String getExpiryDateAmend() { + return expiryDateAmend; + } + + public void setExpiryDateAmend(String expiryDateAmend) { + this.expiryDateAmend = expiryDateAmend; + } + + public String getFrequency() { + return frequency; + } + + public void setFrequency(String frequency) { + this.frequency = frequency; + } + + public String getFrequencyAmend() { + return frequencyAmend; + } + + public void setFrequencyAmend(String frequencyAmend) { + this.frequencyAmend = frequencyAmend; + } + + public String getProductSubType() { + return productSubType; + } + + public void setProductSubType(String productSubType) { + this.productSubType = productSubType; + } + + public String getProductSubTypeAmend() { + return productSubTypeAmend; + } + + public void setProductSubTypeAmend(String productSubTypeAmend) { + this.productSubTypeAmend = productSubTypeAmend; + } + + public String getProductType() { + return productType; + } + + public void setProductType(String productType) { + this.productType = productType; + } + + public String getProductTypeAmend() { + return productTypeAmend; + } + + public void setProductTypeAmend(String productTypeAmend) { + this.productTypeAmend = productTypeAmend; + } + + public String getQuantity() { + return quantity; + } + + public void setQuantity(String quantity) { + this.quantity = quantity; + } + + public String getQuantityAmend() { + return quantityAmend; + } + + public void setQuantityAmend(String quantityAmend) { + this.quantityAmend = quantityAmend; + } + + public String getQuantityUnit() { + return quantityUnit; + } + + public void setQuantityUnit(String quantityUnit) { + this.quantityUnit = quantityUnit; + } + + public String getQuantityUnitAmend() { + return quantityUnitAmend; + } + + public void setQuantityUnitAmend(String quantityUnitAmend) { + this.quantityUnitAmend = quantityUnitAmend; + } + + public String getSaleRatePerUnit() { + return saleRatePerUnit; + } + + public void setSaleRatePerUnit(String saleRatePerUnit) { + this.saleRatePerUnit = saleRatePerUnit; + } + + public String getSaleRatePerUnitAmend() { + return saleRatePerUnitAmend; + } + + public void setSaleRatePerUnitAmend(String saleRatePerUnitAmend) { + this.saleRatePerUnitAmend = saleRatePerUnitAmend; + } + + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/RationCardTypeHeaderBean.java b/IPKS_Updated/src/src/java/DataEntryBean/RationCardTypeHeaderBean.java new file mode 100644 index 0000000..5c03cd8 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/RationCardTypeHeaderBean.java @@ -0,0 +1,93 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 1320035 + */ +public class RationCardTypeHeaderBean { + + + + private String cardType; + private String cardDescription; + private String status; + private String cardTypeAmend; + private String cardDescriptionAmend; + private String statusAmend; + private String cardMstIdAmend; + private String card_type_mst_id; + + public String getCardMstIdAmend() { + return cardMstIdAmend; + } + + public void setCardMstIdAmend(String cardMstIdAmend) { + this.cardMstIdAmend = cardMstIdAmend; + } + + public String getCard_type_mst_id() { + return card_type_mst_id; + } + + public void setCard_type_mst_id(String card_type_mst_id) { + this.card_type_mst_id = card_type_mst_id; + } + + public String getCardDescription() { + return cardDescription; + } + + public void setCardDescription(String cardDescription) { + this.cardDescription = cardDescription; + } + + public String getCardDescriptionAmend() { + return cardDescriptionAmend; + } + + public void setCardDescriptionAmend(String cardDescriptionAmend) { + this.cardDescriptionAmend = cardDescriptionAmend; + } + + public String getCardType() { + return cardType; + } + + public void setCardType(String cardType) { + this.cardType = cardType; + } + + public String getCardTypeAmend() { + return cardTypeAmend; + } + + public void setCardTypeAmend(String cardTypeAmend) { + this.cardTypeAmend = cardTypeAmend; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getStatusAmend() { + return statusAmend; + } + + public void setStatusAmend(String statusAmend) { + this.statusAmend = statusAmend; + } + + +} + + + diff --git a/IPKS_Updated/src/src/java/DataEntryBean/RationShopBean.java b/IPKS_Updated/src/src/java/DataEntryBean/RationShopBean.java new file mode 100644 index 0000000..ba02697 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/RationShopBean.java @@ -0,0 +1,172 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author 590685 + */ +public class RationShopBean { +//for createeffectDat + + private String rsName; + private String status; + private String sId; + private String pName; + private String phoneNum; + private String addr; + private String landMark; + private String noc; + //For Amend Div + private String shopNameAmend; + private String statusAmend; + private String IdAmend; + private String pNameAmend; + private String phnNumAmend; + private String nocAmend; + private String addrAmend; + private String lndAmend; + //for activate/deactivate + private String actvDactv; + + public String getIdAmend() { + return IdAmend; + } + + public void setIdAmend(String IdAmend) { + this.IdAmend = IdAmend; + } + + public String getActvDactv() { + return actvDactv; + } + + public void setActvDactv(String actvDactv) { + this.actvDactv = actvDactv; + } + + public String getAddr() { + return addr; + } + + public void setAddr(String addr) { + this.addr = addr; + } + + public String getAddrAmend() { + return addrAmend; + } + + public void setAddrAmend(String addrAmend) { + this.addrAmend = addrAmend; + } + + public String getLandMark() { + return landMark; + } + + public void setLandMark(String landMark) { + this.landMark = landMark; + } + + public String getLndAmend() { + return lndAmend; + } + + public void setLndAmend(String lndAmend) { + this.lndAmend = lndAmend; + } + + public String getNoc() { + return noc; + } + + public void setNoc(String noc) { + this.noc = noc; + } + + public String getNocAmend() { + return nocAmend; + } + + public void setNocAmend(String nocAmend) { + this.nocAmend = nocAmend; + } + + public String getpName() { + return pName; + } + + public void setpName(String pName) { + this.pName = pName; + } + + public String getpNameAmend() { + return pNameAmend; + } + + public void setpNameAmend(String pNameAmend) { + this.pNameAmend = pNameAmend; + } + + public String getPhnNumAmend() { + return phnNumAmend; + } + + public void setPhnNumAmend(String phnNumAmend) { + this.phnNumAmend = phnNumAmend; + } + + public String getPhoneNum() { + return phoneNum; + } + + public void setPhoneNum(String phoneNum) { + this.phoneNum = phoneNum; + } + + public String getRsName() { + return rsName; + } + + public void setRsName(String rsName) { + this.rsName = rsName; + } + + public String getsId() { + return sId; + } + + public void setsId(String sId) { + this.sId = sId; + } + + public String getShopNameAmend() { + return shopNameAmend; + } + + public void setShopNameAmend(String shopNameAmend) { + this.shopNameAmend = shopNameAmend; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getStatusAmend() { + return statusAmend; + } + + public void setStatusAmend(String statusAmend) { + this.statusAmend = statusAmend; + } + + +} + diff --git a/IPKS_Updated/src/src/java/DataEntryBean/RationingLedgerDetailsBean.java b/IPKS_Updated/src/src/java/DataEntryBean/RationingLedgerDetailsBean.java new file mode 100644 index 0000000..3c2173b --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/RationingLedgerDetailsBean.java @@ -0,0 +1,100 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 1320035 + */ +public class RationingLedgerDetailsBean { + private String eligibilityBeginDate; + private String productTypeDetails; + private String productSubTypeDetails; + private String baseQuantity; + private String expiryDate; + private String pricePerUnit; + private String availedQuantity; + private String quantityAvailable; + private String eligibilityEndDate; + + + public String getExpiryDate() { + return expiryDate; + } + + public void setExpiryDate(String expiryDate) { + this.expiryDate = expiryDate; + } + + + + + public String getAvailedQuantity() { + return availedQuantity; + } + + public void setAvailedQuantity(String availedQuantity) { + this.availedQuantity = availedQuantity; + } + + public String getBaseQuantity() { + return baseQuantity; + } + + public void setBaseQuantity(String baseQuantity) { + this.baseQuantity = baseQuantity; + } + + public String getEligibilityBeginDate() { + return eligibilityBeginDate; + } + + public void setEligibilityBeginDate(String eligibilityBeginDate) { + this.eligibilityBeginDate = eligibilityBeginDate; + } + + public String getEligibilityEndDate() { + return eligibilityEndDate; + } + + public void setEligibilityEndDate(String eligibilityEndDate) { + this.eligibilityEndDate = eligibilityEndDate; + } + + public String getPricePerUnit() { + return pricePerUnit; + } + + public void setPricePerUnit(String pricePerUnit) { + this.pricePerUnit = pricePerUnit; + } + + public String getProductSubTypeDetails() { + return productSubTypeDetails; + } + + public void setProductSubTypeDetails(String productSubTypeDetails) { + this.productSubTypeDetails = productSubTypeDetails; + } + + public String getProductTypeDetails() { + return productTypeDetails; + } + + public void setProductTypeDetails(String productTypeDetails) { + this.productTypeDetails = productTypeDetails; + } + + public String getQuantityAvailable() { + return quantityAvailable; + } + + public void setQuantityAvailable(String quantityAvailable) { + this.quantityAvailable = quantityAvailable; + } + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/RationingLedgerHeaderBean.java b/IPKS_Updated/src/src/java/DataEntryBean/RationingLedgerHeaderBean.java new file mode 100644 index 0000000..17df3dd --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/RationingLedgerHeaderBean.java @@ -0,0 +1,42 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 1320035 + */ +public class RationingLedgerHeaderBean { +private String cardHolderName; +private String cardNo; +private String cardType; + + public String getCardHolderName() { + return cardHolderName; + } + + public void setCardHolderName(String cardHolderName) { + this.cardHolderName = cardHolderName; + } + + public String getCardNo() { + return cardNo; + } + + public void setCardNo(String cardNo) { + this.cardNo = cardNo; + } + + public String getCardType() { + return cardType; + } + + public void setCardType(String cardType) { + this.cardType = cardType; + } + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/RepayLoanBean.java b/IPKS_Updated/src/src/java/DataEntryBean/RepayLoanBean.java new file mode 100644 index 0000000..0355938 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/RepayLoanBean.java @@ -0,0 +1,180 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 986137 + */ +public class RepayLoanBean { + + + private String loanAcc; + private String custName; + private String sancAmt; + private String sancDt; + private String lstRepayDt; + private String oustPrin; + private String oustInt; + private String oustBal; + private String emi; + private String repayAmt; + private String payMode; + private String transAcc; + private String narration; + private String repayType; + private String glAcc; + private String intAdjAmt; + private String netAmt; + private String prodCode; + + public String getNetAmt() { + return netAmt; + } + + public void setNetAmt(String netAmt) { + this.netAmt = netAmt; + } + + public String getIntAdjAmt() { + return intAdjAmt; + } + + public void setIntAdjAmt(String intAdjAmt) { + this.intAdjAmt = intAdjAmt; + } + + public String getGlAcc() { + return glAcc; + } + + public void setGlAcc(String glAcc) { + this.glAcc = glAcc; + } + + public String getRepayType() { + return repayType; + } + + public void setRepayType(String repayType) { + this.repayType = repayType; + } + + public String getNarration() { + return narration; + } + + public void setNarration(String narration) { + this.narration = narration; + } + + + + public String getCustName() { + return custName; + } + + public void setCustName(String custName) { + this.custName = custName; + } + + public String getEmi() { + return emi; + } + + public void setEmi(String emi) { + this.emi = emi; + } + + public String getLoanAcc() { + return loanAcc; + } + + public void setLoanAcc(String loanAcc) { + this.loanAcc = loanAcc; + } + + public String getLstRepayDt() { + return lstRepayDt; + } + + public void setLstRepayDt(String lstRepayDt) { + this.lstRepayDt = lstRepayDt; + } + + public String getOustBal() { + return oustBal; + } + + public void setOustBal(String oustBal) { + this.oustBal = oustBal; + } + + public String getOustInt() { + return oustInt; + } + + public void setOustInt(String oustInt) { + this.oustInt = oustInt; + } + + public String getOustPrin() { + return oustPrin; + } + + public void setOustPrin(String oustPrin) { + this.oustPrin = oustPrin; + } + + public String getPayMode() { + return payMode; + } + + public void setPayMode(String payMode) { + this.payMode = payMode; + } + + public String getRepayAmt() { + return repayAmt; + } + + public void setRepayAmt(String repayAmt) { + this.repayAmt = repayAmt; + } + + public String getSancAmt() { + return sancAmt; + } + + public void setSancAmt(String sancAmt) { + this.sancAmt = sancAmt; + } + + public String getSancDt() { + return sancDt; + } + + public void setSancDt(String sancDt) { + this.sancDt = sancDt; + } + + public String getTransAcc() { + return transAcc; + } + + public void setTransAcc(String transAcc) { + this.transAcc = transAcc; + } +// Added here for Loan Acc Reset + public String getProdCode(){ + return prodCode; + } + + public void setProdCode(String prodCode){ + this.prodCode = prodCode; + } + +} \ No newline at end of file diff --git a/IPKS_Updated/src/src/java/DataEntryBean/SellProcureItemBean.java b/IPKS_Updated/src/src/java/DataEntryBean/SellProcureItemBean.java new file mode 100644 index 0000000..c22424a --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/SellProcureItemBean.java @@ -0,0 +1,201 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Helpdesk10 + */ +public class SellProcureItemBean { + + + + private String sellTo; + private String DelieveredTo; + private String addr; + private String govtProcCode; + private String itemType; + private String itemDesc; + private String subType; + private String subTypeDesc; + private String procId; + private String itemUnit; + private String itemRatePerUnit; + private String qty; + private String sellQty; + private String itemTotal; + private String expense_Details; + private String charges; + private String expenseTotal; + private String commodityId; + private String stockId; + private String sellerId; + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getSellerId() { + return sellerId; + } + + public void setSellerId(String sellerId) { + this.sellerId = sellerId; + } + + public String getCommodityId() { + return commodityId; + } + + public void setCommodityId(String commodityId) { + this.commodityId = commodityId; + } + + + + public String getSellTo() { + return sellTo; + } + + public void setSellTo(String sellTo) { + this.sellTo = sellTo; + } + + public String getDelieveredTo() { + return DelieveredTo; + } + + public void setDelieveredTo(String DelieveredTo) { + this.DelieveredTo = DelieveredTo; + } + + public String getAddr() { + return addr; + } + + public void setAddr(String addr) { + this.addr = addr; + } + + public String getGovtProcCode() { + return govtProcCode; + } + + public void setGovtProcCode(String govtProcCode) { + this.govtProcCode = govtProcCode; + } + + public String getItemType() { + return itemType; + } + + public void setItemType(String itemType) { + this.itemType = itemType; + } + + public String getItemDesc() { + return itemDesc; + } + + public void setItemDesc(String itemDesc) { + this.itemDesc = itemDesc; + } + + public String getSubType() { + return subType; + } + + public void setSubType(String subType) { + this.subType = subType; + } + + public String getSubTypeDesc() { + return subTypeDesc; + } + + public void setSubTypeDesc(String subTypeDesc) { + this.subTypeDesc = subTypeDesc; + } + + public String getProcId() { + return procId; + } + + public void setProcId(String procId) { + this.procId = procId; + } + + public String getItemUnit() { + return itemUnit; + } + + public void setItemUnit(String itemUnit) { + this.itemUnit = itemUnit; + } + + public String getItemRatePerUnit() { + return itemRatePerUnit; + } + + public void setItemRatePerUnit(String itemRatePerUnit) { + this.itemRatePerUnit = itemRatePerUnit; + } + + public String getQty() { + return qty; + } + + public void setQty(String qty) { + this.qty = qty; + } + + public String getSellQty() { + return sellQty; + } + + public void setSellQty(String sellQty) { + this.sellQty = sellQty; + } + + public String getItemTotal() { + return itemTotal; + } + + public void setItemTotal(String itemTotal) { + this.itemTotal = itemTotal; + } + + public String getExpense_Details() { + return expense_Details; + } + + public void setExpense_Details(String expense_Details) { + this.expense_Details = expense_Details; + } + + public String getCharges() { + return charges; + } + + public void setCharges(String charges) { + this.charges = charges; + } + + public String getExpenseTotal() { + return expenseTotal; + } + + public void setExpenseTotal(String expenseTotal) { + this.expenseTotal = expenseTotal; + } + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/ShareAccountCreationBean.java b/IPKS_Updated/src/src/java/DataEntryBean/ShareAccountCreationBean.java new file mode 100644 index 0000000..604e6c5 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/ShareAccountCreationBean.java @@ -0,0 +1,175 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author 986517 + */ +public class ShareAccountCreationBean { + + private String memberno; + private String cifno; + private String custName; + private String shareclass; + private String sharevalue; + private String sharedue; + private String shareno; + private String shareamt; + private String share_acc_no; + private String memNo; + private String shareNo; + private String shareval; + private String productCodeDetails; + private String sharepercent; + private String divpercent; + private String accNo; + private String divamt; + private String narration; + + public String getNarration() { + return narration; + } + + public void setNarration(String narration) { + this.narration = narration; + } + + public String getDivamt() { + return divamt; + } + + public void setDivamt(String divamt) { + this.divamt = divamt; + } + + public String getAccNo() { + return accNo; + } + + public void setAccNo(String accNo) { + this.accNo = accNo; + } + + public String getDivpercent() { + return divpercent; + } + + public void setDivpercent(String divpercent) { + this.divpercent = divpercent; + } + + public String getSharepercent() { + return sharepercent; + } + + public void setSharepercent(String sharepercent) { + this.sharepercent = sharepercent; + } + + public String getProductCodeDetails() { + return productCodeDetails; + } + + public void setProductCodeDetails(String productCodeDetails) { + this.productCodeDetails = productCodeDetails; + } + + public String getShareval() { + return shareval; + } + + public void setShareval(String shareval) { + this.shareval = shareval; + } + + public String getMemNo() { + return memNo; + } + + public void setMemNo(String memNo) { + this.memNo = memNo; + } + + public String getShareNo() { + return shareNo; + } + + public void setShareNo(String shareNo) { + this.shareNo = shareNo; + } + + public String getShare_acc_no() { + return share_acc_no; + } + + public void setShare_acc_no(String share_acc_no) { + this.share_acc_no = share_acc_no; + } + + public String getCifno() { + return cifno; + } + + public void setCifno(String cifno) { + this.cifno = cifno; + } + + public String getCustName() { + return custName; + } + + public void setCustName(String custName) { + this.custName = custName; + } + + public String getMemberno() { + return memberno; + } + + public void setMemberno(String memberno) { + this.memberno = memberno; + } + + public String getShareamt() { + return shareamt; + } + + public void setShareamt(String shareamt) { + this.shareamt = shareamt; + } + + public String getShareclass() { + return shareclass; + } + + public void setShareclass(String shareclass) { + this.shareclass = shareclass; + } + + public String getSharedue() { + return sharedue; + } + + public void setSharedue(String sharedue) { + this.sharedue = sharedue; + } + + public String getShareno() { + return shareno; + } + + public void setShareno(String shareno) { + this.shareno = shareno; + } + + public String getSharevalue() { + return sharevalue; + } + + public void setSharevalue(String sharevalue) { + this.sharevalue = sharevalue; + } +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/ShgActivitiesBean.java b/IPKS_Updated/src/src/java/DataEntryBean/ShgActivitiesBean.java new file mode 100644 index 0000000..97f3879 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/ShgActivitiesBean.java @@ -0,0 +1,329 @@ +package DataEntryBean; + + + +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +/** + * + * @author 1320029 + */ +public class ShgActivitiesBean { + + + String secretaryname; + String secretaryoccupation; + String secretarymobile; + String treasurername; + String treasureroccupation; + String treasurermobile; + String grpmeeting; + String resolution; + String register; + String cash; + String savings; + String other; + String presidentnameAmend; + String presidentoccupationAmend; + String presidentmobileAmend; + String secretarynameAmend; + String secretaryoccupationAmend; + String secretarymobileAmend; + String treasurernameAmend; + String treasureroccupationAmend; + String treasurermobileAmend; + String grpmeetingAmend; + String resolutionAmend; + String registerAmend; + String cashAmend; + String savingsAmend; + String otherAmend; + String shgcode; + + + String shgcodeAmend; + String shg_id; + String presidentname; + String presidentoccupation; + String presidentmobile; + String shgSearch; + + public String getShgSearch() { + return shgSearch; + } + + public void setShgSearch(String shgSearch) { + this.shgSearch = shgSearch; + } + public String getCash() { + return cash; + } + + public void setCash(String cash) { + this.cash = cash; + } + + public String getCashAmend() { + return cashAmend; + } + + public void setCashAmend(String cashAmend) { + this.cashAmend = cashAmend; + } + + public String getGrpmeeting() { + return grpmeeting; + } + + public void setGrpmeeting(String grpmeeting) { + this.grpmeeting = grpmeeting; + } + + public String getGrpmeetingAmend() { + return grpmeetingAmend; + } + + public void setGrpmeetingAmend(String grpmeetingAmend) { + this.grpmeetingAmend = grpmeetingAmend; + } + + public String getOther() { + return other; + } + + public void setOther(String other) { + this.other = other; + } + + public String getOtherAmend() { + return otherAmend; + } + + public void setOtherAmend(String otherAmend) { + this.otherAmend = otherAmend; + } + + public String getPresidentmobile() { + return presidentmobile; + } + + public void setPresidentmobile(String presidentmobile) { + this.presidentmobile = presidentmobile; + } + + public String getPresidentmobileAmend() { + return presidentmobileAmend; + } + + public void setPresidentmobileAmend(String presidentmobileAmend) { + this.presidentmobileAmend = presidentmobileAmend; + } + + public String getPresidentname() { + return presidentname; + } + + public void setPresidentname(String presidentname) { + this.presidentname = presidentname; + } + + public String getPresidentnameAmend() { + return presidentnameAmend; + } + + public void setPresidentnameAmend(String presidentnameAmend) { + this.presidentnameAmend = presidentnameAmend; + } + + public String getPresidentoccupation() { + return presidentoccupation; + } + + public void setPresidentoccupation(String presidentoccupation) { + this.presidentoccupation = presidentoccupation; + } + + public String getPresidentoccupationAmend() { + return presidentoccupationAmend; + } + + public void setPresidentoccupationAmend(String presidentoccupationAmend) { + this.presidentoccupationAmend = presidentoccupationAmend; + } + + public String getRegister() { + return register; + } + + public void setRegister(String register) { + this.register = register; + } + + public String getRegisterAmend() { + return registerAmend; + } + + public void setRegisterAmend(String registerAmend) { + this.registerAmend = registerAmend; + } + + public String getResolution() { + return resolution; + } + + public void setResolution(String resolution) { + this.resolution = resolution; + } + + public String getResolutionAmend() { + return resolutionAmend; + } + + public void setResolutionAmend(String resolutionAmend) { + this.resolutionAmend = resolutionAmend; + } + + public String getSavings() { + return savings; + } + + public void setSavings(String savings) { + this.savings = savings; + } + + public String getSavingsAmend() { + return savingsAmend; + } + + public void setSavingsAmend(String savingsAmend) { + this.savingsAmend = savingsAmend; + } + + public String getSecretarymobile() { + return secretarymobile; + } + + public void setSecretarymobile(String secretarymobile) { + this.secretarymobile = secretarymobile; + } + + public String getSecretarymobileAmend() { + return secretarymobileAmend; + } + + public void setSecretarymobileAmend(String secretarymobileAmend) { + this.secretarymobileAmend = secretarymobileAmend; + } + + public String getSecretaryname() { + return secretaryname; + } + + public void setSecretaryname(String secretaryname) { + this.secretaryname = secretaryname; + } + + public String getSecretarynameAmend() { + return secretarynameAmend; + } + + public void setSecretarynameAmend(String secretarynameAmend) { + this.secretarynameAmend = secretarynameAmend; + } + + public String getSecretaryoccupation() { + return secretaryoccupation; + } + + public void setSecretaryoccupation(String secretaryoccupation) { + this.secretaryoccupation = secretaryoccupation; + } + + public String getSecretaryoccupationAmend() { + return secretaryoccupationAmend; + } + + public void setSecretaryoccupationAmend(String secretaryoccupationAmend) { + this.secretaryoccupationAmend = secretaryoccupationAmend; + } + + public String getShg_id() { + return shg_id; + } + + public void setShg_id(String shg_id) { + this.shg_id = shg_id; + } + + public String getShgcode() { + return shgcode; + } + + public void setShgcode(String shgcode) { + this.shgcode = shgcode; + } + + public String getShgcodeAmend() { + return shgcodeAmend; + } + + public void setShgcodeAmend(String shgcodeAmend) { + this.shgcodeAmend = shgcodeAmend; + } + + public String getTreasurermobile() { + return treasurermobile; + } + + public void setTreasurermobile(String treasurermobile) { + this.treasurermobile = treasurermobile; + } + + public String getTreasurermobileAmend() { + return treasurermobileAmend; + } + + public void setTreasurermobileAmend(String treasurermobileAmend) { + this.treasurermobileAmend = treasurermobileAmend; + } + + public String getTreasurername() { + return treasurername; + } + + public void setTreasurername(String treasurername) { + this.treasurername = treasurername; + } + + public String getTreasurernameAmend() { + return treasurernameAmend; + } + + public void setTreasurernameAmend(String treasurernameAmend) { + this.treasurernameAmend = treasurernameAmend; + } + + public String getTreasureroccupation() { + return treasureroccupation; + } + + public void setTreasureroccupation(String treasureroccupation) { + this.treasureroccupation = treasureroccupation; + } + + public String getTreasureroccupationAmend() { + return treasureroccupationAmend; + } + + public void setTreasureroccupationAmend(String treasureroccupationAmend) { + this.treasureroccupationAmend = treasureroccupationAmend; + } + + + + + } + diff --git a/IPKS_Updated/src/src/java/DataEntryBean/StandingInstructionBean.java b/IPKS_Updated/src/src/java/DataEntryBean/StandingInstructionBean.java new file mode 100644 index 0000000..303a104 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/StandingInstructionBean.java @@ -0,0 +1,210 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 986137 + */ +public class StandingInstructionBean { + + private String ID; + private String fromAcc; + private String toAcc; + private String opsType; + private String freqOption; + private String fromDate; + private String toDate; + private String siAmount; + private String chaseDay; + private String flag; + + private String opsTypeSearch; + private String fromAccSearch; + private String toAccSearch; + + private String opsTypeAmend; + private String fromAccAmend; + private String toAccAmend; + private String freqOptionAmend; + private String fromDateAmend; + private String toDateAmend; + private String siAmountAmend; + private String chaseDayAmend; + + public String getID() { + return ID; + } + + public void setID(String ID) { + this.ID = ID; + } + + public String getFromAccAmend() { + return fromAccAmend; + } + + public void setFromAccAmend(String fromAccAmend) { + this.fromAccAmend = fromAccAmend; + } + + public String getOpsTypeAmend() { + return opsTypeAmend; + } + + public void setOpsTypeAmend(String opsTypeAmend) { + this.opsTypeAmend = opsTypeAmend; + } + + public String getToAccAmend() { + return toAccAmend; + } + + public void setToAccAmend(String toAccAmend) { + this.toAccAmend = toAccAmend; + } + + + public String getChaseDayAmend() { + return chaseDayAmend; + } + + public void setChaseDayAmend(String chaseDayAmend) { + this.chaseDayAmend = chaseDayAmend; + } + + public String getFlag() { + return flag; + } + + public void setFlag(String flag) { + this.flag = flag; + } + + public String getFreqOptionAmend() { + return freqOptionAmend; + } + + public void setFreqOptionAmend(String freqOptionAmend) { + this.freqOptionAmend = freqOptionAmend; + } + + public String getFromDateAmend() { + return fromDateAmend; + } + + public void setFromDateAmend(String fromDateAmend) { + this.fromDateAmend = fromDateAmend; + } + + public String getSiAmountAmend() { + return siAmountAmend; + } + + public void setSiAmountAmend(String siAmountAmend) { + this.siAmountAmend = siAmountAmend; + } + + public String getToDateAmend() { + return toDateAmend; + } + + public void setToDateAmend(String toDateAmend) { + this.toDateAmend = toDateAmend; + } + + + + public String getChaseDay() { + return chaseDay; + } + + public void setChaseDay(String chaseDay) { + this.chaseDay = chaseDay; + } + + public String getFreqOption() { + return freqOption; + } + + public void setFreqOption(String freqOption) { + this.freqOption = freqOption; + } + + public String getFromAcc() { + return fromAcc; + } + + public void setFromAcc(String fromAcc) { + this.fromAcc = fromAcc; + } + + public String getFromAccSearch() { + return fromAccSearch; + } + + public void setFromAccSearch(String fromAccSearch) { + this.fromAccSearch = fromAccSearch; + } + + public String getFromDate() { + return fromDate; + } + + public void setFromDate(String fromDate) { + this.fromDate = fromDate; + } + + public String getOpsType() { + return opsType; + } + + public void setOpsType(String opsType) { + this.opsType = opsType; + } + + public String getOpsTypeSearch() { + return opsTypeSearch; + } + + public void setOpsTypeSearch(String opsTypeSearch) { + this.opsTypeSearch = opsTypeSearch; + } + + public String getSiAmount() { + return siAmount; + } + + public void setSiAmount(String siAmount) { + this.siAmount = siAmount; + } + + public String getToAcc() { + return toAcc; + } + + public void setToAcc(String toAcc) { + this.toAcc = toAcc; + } + + public String getToAccSearch() { + return toAccSearch; + } + + public void setToAccSearch(String toAccSearch) { + this.toAccSearch = toAccSearch; + } + + public String getToDate() { + return toDate; + } + + public void setToDate(String toDate) { + this.toDate = toDate; + } + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/TDOperationBean.java b/IPKS_Updated/src/src/java/DataEntryBean/TDOperationBean.java new file mode 100644 index 0000000..aaa007c --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/TDOperationBean.java @@ -0,0 +1,114 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author 986137 + */ +public class TDOperationBean { + + private String tranType; + private String accNo; + private String trAmount; + private String Penalty; + private String matVal; + private String narration; + private String netAmt; + private String intAdjAmt; + private String trmYr; + private String trmMon; + private String trmDay; + + public String getTrmDay() { + return trmDay; + } + + public void setTrmDay(String trmDay) { + this.trmDay = trmDay; + } + + public String getTrmMon() { + return trmMon; + } + + public void setTrmMon(String trmMon) { + this.trmMon = trmMon; + } + + public String getTrmYr() { + return trmYr; + } + + public void setTrmYr(String trmYr) { + this.trmYr = trmYr; + } + + public String getIntAdjAmt() { + return intAdjAmt; + } + + public void setIntAdjAmt(String intAdjAmt) { + this.intAdjAmt = intAdjAmt; + } + + public String getNetAmt() { + return netAmt; + } + + public void setNetAmt(String netAmt) { + this.netAmt = netAmt; + } + + public String getPenalty() { + return Penalty; + } + + public void setPenalty(String Penalty) { + this.Penalty = Penalty; + } + + public String getAccNo() { + return accNo; + } + + public void setAccNo(String accNo) { + this.accNo = accNo; + } + + public String getMatVal() { + return matVal; + } + + public void setMatVal(String matVal) { + this.matVal = matVal; + } + + public String getNarration() { + return narration; + } + + public void setNarration(String narration) { + this.narration = narration; + } + + public String getTrAmount() { + return trAmount; + } + + public void setTrAmount(String trAmount) { + this.trAmount = trAmount; + } + + public String getTranType() { + return tranType; + } + + public void setTranType(String tranType) { + this.tranType = tranType; + } + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/TradingSaleItemEntryBean.java b/IPKS_Updated/src/src/java/DataEntryBean/TradingSaleItemEntryBean.java new file mode 100644 index 0000000..39a6458 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/TradingSaleItemEntryBean.java @@ -0,0 +1,172 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Help desk122 + */ +public class TradingSaleItemEntryBean { + + private String memberId; + private String memberName; + private String stockId; + private String price; + private String quantity; + private String total; + private String memberContact; + private String memberAddress; + private String memberDOB; + private String saleId; + private String p_order_id; + private String memberStatus; + private String grandTotal; + private String checkOption; + private String dueDate; + private String product_id; + + public String getProduct_id() { + return product_id; + } + + public void setProduct_id(String product_id) { + this.product_id = product_id; + } + + + + public String getDueDate() { + return dueDate; + } + + public void setDueDate(String dueDate) { + this.dueDate = dueDate; + } + + + + public String getCheckOption() { + return checkOption; + } + + public void setCheckOption(String checkOption) { + this.checkOption = checkOption; + } + + + + + + public String getGrandTotal() { + return grandTotal; + } + + public void setGrandTotal(String grandTotal) { + this.grandTotal = grandTotal; + } + + + + public String getMemberStatus() { + return memberStatus; + } + + public void setMemberStatus(String memberStatus) { + this.memberStatus = memberStatus; + } + + + public String getP_order_id() { + return p_order_id; + } + + public void setP_order_id(String p_order_id) { + this.p_order_id = p_order_id; + } + + public String getSaleId() { + return saleId; + } + + public void setSaleId(String saleId) { + this.saleId = saleId; + } + + public String getMemberId() { + return memberId; + } + + public void setMemberId(String memberId) { + this.memberId = memberId; + } + + public String getMemberName() { + return memberName; + } + + public void setMemberName(String memberName) { + this.memberName = memberName; + } + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + + + public String getPrice() { + return price; + } + + public void setPrice(String price) { + this.price = price; + } + + public String getQuantity() { + return quantity; + } + + public void setQuantity(String quantity) { + this.quantity = quantity; + } + + public String getTotal() { + return total; + } + + public void setTotal(String total) { + this.total = total; + } + + public String getMemberContact() { + return memberContact; + } + + public void setMemberContact(String memberContact) { + this.memberContact = memberContact; + } + + public String getMemberAddress() { + return memberAddress; + } + + public void setMemberAddress(String memberAddress) { + this.memberAddress = memberAddress; + } + + public String getMemberDOB() { + return memberDOB; + } + + public void setMemberDOB(String memberDOB) { + this.memberDOB = memberDOB; + } + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/TradingSaleRegisterBean.java b/IPKS_Updated/src/src/java/DataEntryBean/TradingSaleRegisterBean.java new file mode 100644 index 0000000..e841435 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/TradingSaleRegisterBean.java @@ -0,0 +1,183 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Help desk122 + */ +public class TradingSaleRegisterBean { + + private String stock_id; + private String fromdate; + private String todate; + private String product_id; + private String salesref_id; + private String quantity; + private String price; + private String total; + private String saleDate; + private String member_id; + private String customer_id; + private String memberName; + private String modeofpayment; + private String duedate; +private String commoditytype; +private String commoditysubtype; + + public String getCommoditysubtype() { + return commoditysubtype; + } + + public void setCommoditysubtype(String commoditysubtype) { + this.commoditysubtype = commoditysubtype; + } + + public String getCommoditytype() { + return commoditytype; + } + + public void setCommoditytype(String commoditytype) { + this.commoditytype = commoditytype; + } + public String getSalesref_id() { + return salesref_id; + } + + public void setSalesref_id(String salesref_id) { + this.salesref_id = salesref_id; + } + + public String getFromdate() { + return fromdate; + } + + public void setFromdate(String fromdate) { + this.fromdate = fromdate; + } + + public String getTodate() { + return todate; + } + + public void setTodate(String todate) { + this.todate = todate; + } + + + public String getDuedate() { + return duedate; + } + + public void setDuedate(String duedate) { + this.duedate = duedate; + } + + public String getMember_id() { + return member_id; + } + + public String getCustomer_id() { + return customer_id; + } + + public void setCustomer_id(String customer_id) { + this.customer_id = customer_id; + } + + public void setMember_id(String member_id) { + this.member_id = member_id; + } + + public String getModeofpayment() { + return modeofpayment; + } + + public void setModeofpayment(String modeofpayment) { + this.modeofpayment = modeofpayment; + } + + public String getProduct_id() { + return product_id; + } + + public void setProduct_id(String product_id) { + this.product_id = product_id; + } + + public String getStock_id() { + return stock_id; + } + + public void setStock_id(String stock_id) { + this.stock_id = stock_id; + } + + + + + + public String getMemberName() { + return memberName; + } + + public void setMemberName(String memberName) { + this.memberName = memberName; + } + + + + + + public String getQuantity() { + return quantity; + } + + public void setQuantity(String quantity) { + this.quantity = quantity; + } + + public String getPrice() { + return price; + } + + public void setPrice(String price) { + this.price = price; + } + + public String getTotal() { + return total; + } + + public void setTotal(String total) { + this.total = total; + } + + public String getSaleDate() { + return saleDate; + } + + public void setSaleDate(String saleDate) { + this.saleDate = saleDate; + } + public String getmodeofpayment() { + return modeofpayment; + } + + public void setmodeofpayment(String modeofpayment) { + this.modeofpayment = modeofpayment; + } + public String getduedate() { + return duedate; + } + + public void setduedate(String duedate) { + this.duedate = duedate; + } + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/TrandinStockRegisterBean.java b/IPKS_Updated/src/src/java/DataEntryBean/TrandinStockRegisterBean.java new file mode 100644 index 0000000..a27ee62 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/TrandinStockRegisterBean.java @@ -0,0 +1,225 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Help desk122 + */ +public class TrandinStockRegisterBean { + + public String purchase_id; + public String name; + public String quantity; + public String quantity_availed; + public String quantity_available; + public String stock_id; + public String product_id; + public String vendor_id; + public String price_unit; + public String entDate; + public String pfm; + public String pfnm; + public String selectperish; + public String stkexpiryDate; + public String stockdesc; + public String godown_id; + public String commoditytype; + public String commoditysubtype; + public String commoditytypeSearch; + public String commoditySubtypeSearch; + public String checkOption; + public String sellPriceNm; + public String sellPriceM; + + + public String getSellPriceNm() { + return sellPriceNm; + } + + public void setSellPriceNm(String sellPriceNm) { + this.sellPriceNm = sellPriceNm; + } + + public String getSellPriceM() { + return sellPriceM; + } + + public void setSellPriceM(String sellPriceM) { + this.sellPriceM = sellPriceM; + } + + + public String getCheckOption() { + return checkOption; + } + + public void setCheckOption(String checkOption) { + this.checkOption = checkOption; + } + + public String getCommoditySubtypeSearch() { + return commoditySubtypeSearch; + } + + public void setCommoditySubtypeSearch(String commoditySubtypeSearch) { + this.commoditySubtypeSearch = commoditySubtypeSearch; + } + + public String getCommoditytypeSearch() { + return commoditytypeSearch; + } + + public void setCommoditytypeSearch(String commoditytypeSearch) { + this.commoditytypeSearch = commoditytypeSearch; + } + + + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getVendor_id() { + return vendor_id; + } + + public void setVendor_id(String vendor_id) { + this.vendor_id = vendor_id; + } + + public String getCommoditysubtype() { + return commoditysubtype; + } + + public void setCommoditysubtype(String commoditysubtype) { + this.commoditysubtype = commoditysubtype; + } + + public String getCommoditytype() { + return commoditytype; + } + + public String getQuantity_available() { + return quantity_available; + } + + public void setQuantity_available(String quantity_available) { + this.quantity_available = quantity_available; + } + + public String getQuantity_availed() { + return quantity_availed; + } + + public void setQuantity_availed(String quantity_availed) { + this.quantity_availed = quantity_availed; + } + + public void setCommoditytype(String commoditytype) { + this.commoditytype = commoditytype; + } + + public String getQuantity() { + return quantity; + } + + public void setQuantity(String quantity) { + this.quantity = quantity; + } + + public String getEntDate() { + return entDate; + } + + public void setEntDate(String entDate) { + this.entDate = entDate; + } + + public String getGodown_id() { + return godown_id; + } + + public void setGodown_id(String godown_id) { + this.godown_id = godown_id; + } + + public String getPfm() { + return pfm; + } + + public void setPfm(String pfm) { + this.pfm = pfm; + } + + public String getPfnm() { + return pfnm; + } + + public void setPfnm(String pfnm) { + this.pfnm = pfnm; + } + + public String getPrice_unit() { + return price_unit; + } + + public void setPrice_unit(String price_unit) { + this.price_unit = price_unit; + } + + public String getProduct_id() { + return product_id; + } + + public void setProduct_id(String product_id) { + this.product_id = product_id; + } + + public String getPurchase_id() { + return purchase_id; + } + + public void setPurchase_id(String purchase_id) { + this.purchase_id = purchase_id; + } + + public String getSelectperish() { + return selectperish; + } + + public void setSelectperish(String selectperish) { + this.selectperish = selectperish; + } + + public String getStkexpiryDate() { + return stkexpiryDate; + } + + public void setStkexpiryDate(String stkexpiryDate) { + this.stkexpiryDate = stkexpiryDate; + } + + public String getStock_id() { + return stock_id; + } + + public void setStock_id(String stock_id) { + this.stock_id = stock_id; + } + + public String getStockdesc() { + return stockdesc; + } + + public void setStockdesc(String stockdesc) { + this.stockdesc = stockdesc; + } +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/TransactioDetailsBean.java b/IPKS_Updated/src/src/java/DataEntryBean/TransactioDetailsBean.java new file mode 100644 index 0000000..0fd6874 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/TransactioDetailsBean.java @@ -0,0 +1,126 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 1004242 + */ +public class TransactioDetailsBean { + + + String authorisedQ; + String pendingQ; + String rejectedQ; + String guardianName; + String cashIn; + String cashOut; + String tellerId; + String pacsId; + String bankCif; + String idTypeTwo; + String idNumberTwo; + + + + public String getIdNumberTwo() { + return idNumberTwo; + } + + public void setIdNumberTwo(String idNumberTwo) { + this.idNumberTwo = idNumberTwo; + } + + public String getIdTypeTwo() { + return idTypeTwo; + } + + public void setIdTypeTwo(String idTypeTwo) { + this.idTypeTwo = idTypeTwo; + } + + public String getBankCif() { + return bankCif; + } + + public void setBankCif(String bankCif) { + this.bankCif = bankCif; + } + + public String getGuardianName() { + return guardianName; + } + + public void setGuardianName(String guardianName) { + this.guardianName = guardianName; + } + + public String getPacsId() { + return pacsId; + } + + public void setPacsId(String pacsId) { + this.pacsId = pacsId; + } + + public String getTellerId() { + return tellerId; + } + + public void setTellerId(String tellerId) { + this.tellerId = tellerId; + } + + + public String getAuthorisedQ() { + return authorisedQ; + } + + public void setAuthorisedQ(String authorisedQ) { + this.authorisedQ = authorisedQ; + } + + public String getCashDiff() { + return cashDiff; + } + + public void setCashDiff(String cashDiff) { + this.cashDiff = cashDiff; + } + + public String getCashIn() { + return cashIn; + } + + public void setCashIn(String cashIn) { + this.cashIn = cashIn; + } + + public String getCashOut() { + return cashOut; + } + + public void setCashOut(String cashOut) { + this.cashOut = cashOut; + } + + public String getPendingQ() { + return pendingQ; + } + + public void setPendingQ(String pendingQ) { + this.pendingQ = pendingQ; + } + + public String getRejectedQ() { + return rejectedQ; + } + + public void setRejectedQ(String rejectedQ) { + this.rejectedQ = rejectedQ; + } + String cashDiff; +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/TransactionEnquiryBean.java b/IPKS_Updated/src/src/java/DataEntryBean/TransactionEnquiryBean.java new file mode 100644 index 0000000..ca8ef8b --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/TransactionEnquiryBean.java @@ -0,0 +1,375 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Kaushik + */ +public class TransactionEnquiryBean { + + private String accountNo; + private String productName; //Prod_id + private String fromDate; + private String toDate; + private String fromAmount; + private String toAmount; + + private String linkedSbAccount; + + //for display + private String cbs_Ref_No; + private String transactionDate; + private String transactionType; + private String transactionAmount; + private String journalNumber; + private String screenName; + private String productCode; + private String productId; + + //added later + private String productNameDisplay; + private String limitExpiryDate; + private String availableBalance; + public String linkAccNo; + public String narration; + public String inttCatDesc; + public String tranRefSearch; + public String makerID; + public String authID; + + public String subpacs_id; + public String subpacs_name; + + public String getSubpacs_id() { + return subpacs_id; + } + + public void setSubpacs_id(String subpacs_id) { + this.subpacs_id = subpacs_id; + } + + public String getSubpacs_name() { + return subpacs_name; + } + + public void setSubpacs_name(String subpacs_name) { + this.subpacs_name = subpacs_name; + } + + + + public String getAuthID() { + return authID; + } + + public void setAuthID(String authID) { + this.authID = authID; + } + + public String getMakerID() { + return makerID; + } + + public void setMakerID(String makerID) { + this.makerID = makerID; + } + + + public String getTranRefSearch() { + return tranRefSearch; + } + + public void setTranRefSearch(String tranRefSearch) { + this.tranRefSearch = tranRefSearch; + } + + + + public String getInttCatDesc() { + return inttCatDesc; + } + + public void setInttCatDesc(String inttCatDesc) { + this.inttCatDesc = inttCatDesc; + } + + + + public String getNarration() { + return narration; + } + + public void setNarration(String narration) { + this.narration = narration; + } + + + /** + * @return the accountNo + */ + public String getAccountNo() { + return accountNo; + } + + /** + * @param accountNo the accountNo to set + */ + public void setAccountNo(String accountNo) { + this.accountNo = accountNo; + } + + /** + * @return the productName + */ + public String getProductName() { + return productName; + } + + /** + * @param productName the productName to set + */ + public void setProductName(String productName) { + this.productName = productName; + } + + /** + * @return the fromDate + */ + public String getFromDate() { + return fromDate; + } + + /** + * @param fromDate the fromDate to set + */ + public void setFromDate(String fromDate) { + this.fromDate = fromDate; + } + + /** + * @return the toDate + */ + public String getToDate() { + return toDate; + } + + /** + * @param toDate the toDate to set + */ + public void setToDate(String toDate) { + this.toDate = toDate; + } + + /** + * @return the fromAmount + */ + public String getFromAmount() { + return fromAmount; + } + + /** + * @param fromAmount the fromAmount to set + */ + public void setFromAmount(String fromAmount) { + this.fromAmount = fromAmount; + } + + /** + * @return the cbs_Ref_No + */ + public String getCbs_Ref_No() { + return cbs_Ref_No; + } + + /** + * @param cbs_Ref_No the cbs_Ref_No to set + */ + public void setCbs_Ref_No(String cbs_Ref_No) { + this.cbs_Ref_No = cbs_Ref_No; + } + + /** + * @return the transactionDate + */ + public String getTransactionDate() { + return transactionDate; + } + + /** + * @param transactionDate the transactionDate to set + */ + public void setTransactionDate(String transactionDate) { + this.transactionDate = transactionDate; + } + + /** + * @return the transactionType + */ + public String getTransactionType() { + return transactionType; + } + + /** + * @param transactionType the transactionType to set + */ + public void setTransactionType(String transactionType) { + this.transactionType = transactionType; + } + + /** + * @return the transactionAmount + */ + public String getTransactionAmount() { + return transactionAmount; + } + + /** + * @param transactionAmount the transactionAmount to set + */ + public void setTransactionAmount(String transactionAmount) { + this.transactionAmount = transactionAmount; + } + + /** + * @return the journalNumber + */ + public String getJournalNumber() { + return journalNumber; + } + + /** + * @param journalNumber the journalNumber to set + */ + public void setJournalNumber(String journalNumber) { + this.journalNumber = journalNumber; + } + + /** + * @return the toAmount + */ + public String getToAmount() { + return toAmount; + } + + /** + * @param toAmount the toAmount to set + */ + public void setToAmount(String toAmount) { + this.toAmount = toAmount; + } + + /** + * @return the screenName + */ + public String getScreenName() { + return screenName; + } + + /** + * @param screenName the screenName to set + */ + public void setScreenName(String screenName) { + this.screenName = screenName; + } + + /** + * @return the productCode + */ + public String getProductCode() { + return productCode; + } + + /** + * @param productCode the productCode to set + */ + public void setProductCode(String productCode) { + this.productCode = productCode; + } + + /** + * @return the productId + */ + public String getProductId() { + return productId; + } + + /** + * @param productId the productId to set + */ + public void setProductId(String productId) { + this.productId = productId; + } + + /** + * @return the linkedSbAccount + */ + public String getLinkedSbAccount() { + return linkedSbAccount; + } + + /** + * @param linkedSbAccount the linkedSbAccount to set + */ + public void setLinkedSbAccount(String linkedSbAccount) { + this.linkedSbAccount = linkedSbAccount; + } + + /** + * @return the productNameDisplay + */ + public String getProductNameDisplay() { + return productNameDisplay; + } + + /** + * @param productNameDisplay the productNameDisplay to set + */ + public void setProductNameDisplay(String productNameDisplay) { + this.productNameDisplay = productNameDisplay; + } + + /** + * @return the limitExpiryDate + */ + public String getLimitExpiryDate() { + return limitExpiryDate; + } + + /** + * @param limitExpiryDate the limitExpiryDate to set + */ + public void setLimitExpiryDate(String limitExpiryDate) { + this.limitExpiryDate = limitExpiryDate; + } + + /** + * @return the availableBalance + */ + public String getAvailableBalance() { + return availableBalance; + } + + /** + * @param availableBalance the availableBalance to set + */ + public void setAvailableBalance(String availableBalance) { + this.availableBalance = availableBalance; + } + + public String getLinkAccNo() { + return linkAccNo; + } + + /** + * @param productNameDisplay the productNameDisplay to set + */ + public void setLinkAccNo(String linkAccNo) { + this.linkAccNo = linkAccNo; + } + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/UserMaintainanceBean.java b/IPKS_Updated/src/src/java/DataEntryBean/UserMaintainanceBean.java new file mode 100644 index 0000000..38039d0 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/UserMaintainanceBean.java @@ -0,0 +1,326 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Kaushik + */ +public class UserMaintainanceBean { + //create div + + private String dccbCode; + private String pacsId; + private String tellerId; + private String tellerName; + private String mobileNumber; + private String userStatus; + private String PacsDetails; + private String checkOption; + private String userType; + + //amend div + private String dccbCodeAmend; + private String pacsIdAmend; + private String tellerIdAmend; + private String tellerNameAmend; + private String mobileNumberAmend; + private String userStatusAmend; + private String checkOptionAmend; + private String PacsDetailsAmend; + private String userTypeAmend; + + //For others + private String tellerIdSearch; + private String tellerIdReset; + + /** + * @return the user + */ + /** + * @return the dccbCode + */ + public String getDccbCode() { + return dccbCode; + } + + /** + * @param dccbCode the dccbCode to set + */ + public void setDccbCode(String dccbCode) { + this.dccbCode = dccbCode; + } + + /** + * @return the pacsId + */ + public String getPacsId() { + return pacsId; + } + + /** + * @param pacsId the pacsId to set + */ + public void setPacsId(String pacsId) { + this.pacsId = pacsId; + } + + /** + * @return the tellerId + */ + public String getTellerId() { + return tellerId; + } + + /** + * @param tellerId the tellerId to set + */ + public void setTellerId(String tellerId) { + this.tellerId = tellerId; + } + + /** + * @return the tellerName + */ + public String getTellerName() { + return tellerName; + } + + /** + * @param tellerName the tellerName to set + */ + public void setTellerName(String tellerName) { + this.tellerName = tellerName; + } + + /** + * @return the mobileNumber + */ + public String getMobileNumber() { + return mobileNumber; + } + + /** + * @param mobileNumber the mobileNumber to set + */ + public void setMobileNumber(String mobileNumber) { + this.mobileNumber = mobileNumber; + } + + /** + * @return the userStatus + */ + public String getUserStatus() { + return userStatus; + } + + /** + * @param userStatus the userStatus to set + */ + public void setUserStatus(String userStatus) { + this.userStatus = userStatus; + } + + /** + * @return the userAmend + */ + /** + * @return the dccbCodeAmend + */ + public String getDccbCodeAmend() { + return dccbCodeAmend; + } + + /** + * @param dccbCodeAmend the dccbCodeAmend to set + */ + public void setDccbCodeAmend(String dccbCodeAmend) { + this.dccbCodeAmend = dccbCodeAmend; + } + + /** + * @return the pacsIdAmend + */ + public String getPacsIdAmend() { + return pacsIdAmend; + } + + /** + * @param pacsIdAmend the pacsIdAmend to set + */ + public void setPacsIdAmend(String pacsIdAmend) { + this.pacsIdAmend = pacsIdAmend; + } + + /** + * @return the tellerIdAmend + */ + public String getTellerIdAmend() { + return tellerIdAmend; + } + + /** + * @param tellerIdAmend the tellerIdAmend to set + */ + public void setTellerIdAmend(String tellerIdAmend) { + this.tellerIdAmend = tellerIdAmend; + } + + /** + * @return the tellerNameAmend + */ + public String getTellerNameAmend() { + return tellerNameAmend; + } + + /** + * @param tellerNameAmend the tellerNameAmend to set + */ + public void setTellerNameAmend(String tellerNameAmend) { + this.tellerNameAmend = tellerNameAmend; + } + + /** + * @return the mobileNumberAmend + */ + public String getMobileNumberAmend() { + return mobileNumberAmend; + } + + /** + * @param mobileNumberAmend the mobileNumberAmend to set + */ + public void setMobileNumberAmend(String mobileNumberAmend) { + this.mobileNumberAmend = mobileNumberAmend; + } + + /** + * @return the userStatusAmend + */ + public String getUserStatusAmend() { + return userStatusAmend; + } + + /** + * @param userStatusAmend the userStatusAmend to set + */ + public void setUserStatusAmend(String userStatusAmend) { + this.userStatusAmend = userStatusAmend; + } + + /** + * @return the PacsDetails + */ + public String getPacsDetails() { + return PacsDetails; + } + + /** + * @param PacsDetails the PacsDetails to set + */ + public void setPacsDetails(String PacsDetails) { + this.PacsDetails = PacsDetails; + } + + /** + * @return the checkOption + */ + public String getCheckOption() { + return checkOption; + } + + /** + * @param checkOption the checkOption to set + */ + public void setCheckOption(String checkOption) { + this.checkOption = checkOption; + } + + /** + * @return the checkOptionAmend + */ + public String getCheckOptionAmend() { + return checkOptionAmend; + } + + /** + * @param checkOptionAmend the checkOptionAmend to set + */ + public void setCheckOptionAmend(String checkOptionAmend) { + this.checkOptionAmend = checkOptionAmend; + } + + /** + * @return the PacsDetailsAmend + */ + public String getPacsDetailsAmend() { + return PacsDetailsAmend; + } + + /** + * @param PacsDetailsAmend the PacsDetailsAmend to set + */ + public void setPacsDetailsAmend(String PacsDetailsAmend) { + this.PacsDetailsAmend = PacsDetailsAmend; + } + + /** + * @return the userType + */ + public String getUserType() { + return userType; + } + + /** + * @param userType the userType to set + */ + public void setUserType(String userType) { + this.userType = userType; + } + + /** + * @return the userTypeAmend + */ + public String getUserTypeAmend() { + return userTypeAmend; + } + + /** + * @param userTypeAmend the userTypeAmend to set + */ + public void setUserTypeAmend(String userTypeAmend) { + this.userTypeAmend = userTypeAmend; + } + + /** + * @return the tellerIdSearch + */ + public String getTellerIdSearch() { + return tellerIdSearch; + } + + /** + * @param tellerIdSearch the tellerIdSearch to set + */ + public void setTellerIdSearch(String tellerIdSearch) { + this.tellerIdSearch = tellerIdSearch; + } + + /** + * @return the tellerIdReset + */ + public String getTellerIdReset() { + return tellerIdReset; + } + + /** + * @param tellerIdReset the tellerIdReset to set + */ + public void setTellerIdReset(String tellerIdReset) { + this.tellerIdReset = tellerIdReset; + } + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/VendorMasterDtlBean.java b/IPKS_Updated/src/src/java/DataEntryBean/VendorMasterDtlBean.java new file mode 100644 index 0000000..c95cb83 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/VendorMasterDtlBean.java @@ -0,0 +1,126 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author 986137 + */ +public class VendorMasterDtlBean { + + //Create + private String commoditytype; + private String typeDesc; + private String commoditysubtype; + private String subtypeDesc; + private String product_id; + //Amend + private String commoditytypeAmend; + private String typeDescAmend; + private String commoditysubtypeAmend; + private String subtypeDescAmend; + private String product_idAmend; + private String rowStatus; + private String detailID; + + public String getCommoditysubtypeAmend() { + return commoditysubtypeAmend; + } + + public void setCommoditysubtypeAmend(String commoditysubtypeAmend) { + this.commoditysubtypeAmend = commoditysubtypeAmend; + } + + public String getCommoditytypeAmend() { + return commoditytypeAmend; + } + + public void setCommoditytypeAmend(String commoditytypeAmend) { + this.commoditytypeAmend = commoditytypeAmend; + } + + public String getProduct_idAmend() { + return product_idAmend; + } + + public void setProduct_idAmend(String product_idAmend) { + this.product_idAmend = product_idAmend; + } + + public String getSubtypeDescAmend() { + return subtypeDescAmend; + } + + public void setSubtypeDescAmend(String subtypeDescAmend) { + this.subtypeDescAmend = subtypeDescAmend; + } + + public String getTypeDescAmend() { + return typeDescAmend; + } + + public void setTypeDescAmend(String typeDescAmend) { + this.typeDescAmend = typeDescAmend; + } + + public String getDetailID() { + return detailID; + } + + public void setDetailID(String detailID) { + this.detailID = detailID; + } + + public String getCommoditysubtype() { + return commoditysubtype; + } + + public void setCommoditysubtype(String commoditysubtype) { + this.commoditysubtype = commoditysubtype; + } + + public String getCommoditytype() { + return commoditytype; + } + + public void setCommoditytype(String commoditytype) { + this.commoditytype = commoditytype; + } + + public String getProduct_id() { + return product_id; + } + + public void setProduct_id(String product_id) { + this.product_id = product_id; + } + + public String getRowStatus() { + return rowStatus; + } + + public void setRowStatus(String rowStatus) { + this.rowStatus = rowStatus; + } + + public String getSubtypeDesc() { + return subtypeDesc; + } + + public void setSubtypeDesc(String subtypeDesc) { + this.subtypeDesc = subtypeDesc; + } + + public String getTypeDesc() { + return typeDesc; + } + + public void setTypeDesc(String typeDesc) { + this.typeDesc = typeDesc; + } + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/VendorMasterHeaderBean.java b/IPKS_Updated/src/src/java/DataEntryBean/VendorMasterHeaderBean.java new file mode 100644 index 0000000..8ae0281 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/VendorMasterHeaderBean.java @@ -0,0 +1,119 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author 1319106 + */ +public class VendorMasterHeaderBean { + //create + + private String vendorname; + private String address; + private String phone; + private String contactperson; + private String gstin; + //amend + + private String vendornameAmend; + private String addressAmend; + private String phoneAmend; + private String contactpersonAmend; + private String gstinAmend; + private String vendorID; + + + + public String getGstin() { + return gstin; + } + + public void setGstin(String gstin) { + this.gstin = gstin; + } + + public String getGstinAmend() { + return gstinAmend; + } + + public void setGstinAmend(String gstinAmend) { + this.gstinAmend = gstinAmend; + } + + public String getVendorID() { + return vendorID; + } + + public void setVendorID(String vendorID) { + this.vendorID = vendorID; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getAddressAmend() { + return addressAmend; + } + + public void setAddressAmend(String addressAmend) { + this.addressAmend = addressAmend; + } + + public String getContactperson() { + return contactperson; + } + + public void setContactperson(String contactperson) { + this.contactperson = contactperson; + } + + public String getContactpersonAmend() { + return contactpersonAmend; + } + + public void setContactpersonAmend(String contactpersonAmend) { + this.contactpersonAmend = contactpersonAmend; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getPhoneAmend() { + return phoneAmend; + } + + public void setPhoneAmend(String phoneAmend) { + this.phoneAmend = phoneAmend; + } + + public String getVendorname() { + return vendorname; + } + + public void setVendorname(String vendorname) { + this.vendorname = vendorname; + } + + public String getVendornameAmend() { + return vendornameAmend; + } + + public void setVendornameAmend(String vendornameAmend) { + this.vendornameAmend = vendornameAmend; + } + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/adhocReportBean.java b/IPKS_Updated/src/src/java/DataEntryBean/adhocReportBean.java new file mode 100644 index 0000000..d0a8823 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/adhocReportBean.java @@ -0,0 +1,374 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Helpdesk10 + */ +public class adhocReportBean { + + private String parameter1; + private String value1; + private String parameter2; + private String value2; + private String parameter3; + private String value3; + private String parameter4; + private String value4; + private String parameter5; + private String value5; + private String parameter6; + private String value6; + private String parameter7; + private String value7; + private String parameter8; + private String value8; + private String parameter9; + private String value9; + private String parameter10; + private String value10; + + private String reportID; + private String reportName; + private String reportQuery; + private String jspPage; + + /** + * @return the parameter1 + */ + public String getJspPage() { + return jspPage; + } + + public void setJspPage(String jspPage) { + this.jspPage = jspPage; + } + + public String getParameter1() { + return parameter1; + } + + /** + * @param parameter1 the parameter1 to set + */ + public void setParameter1(String parameter1) { + this.parameter1 = parameter1; + } + + /** + * @return the value1 + */ + public String getValue1() { + return value1; + } + + /** + * @param value1 the value1 to set + */ + public void setValue1(String value1) { + this.value1 = value1; + } + + /** + * @return the parameter2 + */ + public String getParameter2() { + return parameter2; + } + + /** + * @param parameter2 the parameter2 to set + */ + public void setParameter2(String parameter2) { + this.parameter2 = parameter2; + } + + /** + * @return the value2 + */ + public String getValue2() { + return value2; + } + + /** + * @param value2 the value2 to set + */ + public void setValue2(String value2) { + this.value2 = value2; + } + + /** + * @return the parameter3 + */ + public String getParameter3() { + return parameter3; + } + + /** + * @param parameter3 the parameter3 to set + */ + public void setParameter3(String parameter3) { + this.parameter3 = parameter3; + } + + /** + * @return the value3 + */ + public String getValue3() { + return value3; + } + + /** + * @param value3 the value3 to set + */ + public void setValue3(String value3) { + this.value3 = value3; + } + + /** + * @return the parameter4 + */ + public String getParameter4() { + return parameter4; + } + + /** + * @param parameter4 the parameter4 to set + */ + public void setParameter4(String parameter4) { + this.parameter4 = parameter4; + } + + /** + * @return the value4 + */ + public String getValue4() { + return value4; + } + + /** + * @param value4 the value4 to set + */ + public void setValue4(String value4) { + this.value4 = value4; + } + + /** + * @return the parameter5 + */ + public String getParameter5() { + return parameter5; + } + + /** + * @param parameter5 the parameter5 to set + */ + public void setParameter5(String parameter5) { + this.parameter5 = parameter5; + } + + /** + * @return the value5 + */ + public String getValue5() { + return value5; + } + + /** + * @param value5 the value5 to set + */ + public void setValue5(String value5) { + this.value5 = value5; + } + + /** + * @return the parameter6 + */ + public String getParameter6() { + return parameter6; + } + + /** + * @param parameter6 the parameter6 to set + */ + public void setParameter6(String parameter6) { + this.parameter6 = parameter6; + } + + /** + * @return the value6 + */ + public String getValue6() { + return value6; + } + + /** + * @param value6 the value6 to set + */ + public void setValue6(String value6) { + this.value6 = value6; + } + + /** + * @return the parameter7 + */ + public String getParameter7() { + return parameter7; + } + + /** + * @param parameter7 the parameter7 to set + */ + public void setParameter7(String parameter7) { + this.parameter7 = parameter7; + } + + /** + * @return the value7 + */ + public String getValue7() { + return value7; + } + + /** + * @param value7 the value7 to set + */ + public void setValue7(String value7) { + this.value7 = value7; + } + + /** + * @return the parameter8 + */ + public String getParameter8() { + return parameter8; + } + + /** + * @param parameter8 the parameter8 to set + */ + public void setParameter8(String parameter8) { + this.parameter8 = parameter8; + } + + /** + * @return the value8 + */ + public String getValue8() { + return value8; + } + + /** + * @param value8 the value8 to set + */ + public void setValue8(String value8) { + this.value8 = value8; + } + + /** + * @return the parameter9 + */ + public String getParameter9() { + return parameter9; + } + + /** + * @param parameter9 the parameter9 to set + */ + public void setParameter9(String parameter9) { + this.parameter9 = parameter9; + } + + /** + * @return the value9 + */ + public String getValue9() { + return value9; + } + + /** + * @param value9 the value9 to set + */ + public void setValue9(String value9) { + this.value9 = value9; + } + + /** + * @return the parameter10 + */ + public String getParameter10() { + return parameter10; + } + + /** + * @param parameter10 the parameter10 to set + */ + public void setParameter10(String parameter10) { + this.parameter10 = parameter10; + } + + /** + * @return the value10 + */ + public String getValue10() { + return value10; + } + + /** + * @param value10 the value10 to set + */ + public void setValue10(String value10) { + this.value10 = value10; + } + + /** + * @return the reportID + */ + public String getReportID() { + return reportID; + } + + /** + * @param reportID the reportID to set + */ + public void setReportID(String reportID) { + this.reportID = reportID; + } + + /** + * @return the reportName + */ + public String getReportName() { + return reportName; + } + + /** + * @param reportName the reportName to set + */ + public void setReportName(String reportName) { + this.reportName = reportName; + } + + /** + * @return the reportQuery + */ + public String getReportQuery() { + return reportQuery; + } + + /** + * @param reportQuery the reportQuery to set + */ + public void setReportQuery(String reportQuery) { + this.reportQuery = reportQuery; + } + + + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/customerEnquiryBean.java b/IPKS_Updated/src/src/java/DataEntryBean/customerEnquiryBean.java new file mode 100644 index 0000000..2fdded6 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/customerEnquiryBean.java @@ -0,0 +1,551 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Kaushik + */ +public class customerEnquiryBean { + + private String cif; + private String cType; + private String linkedAccount; + private String tittle; + private String fName; + private String mName; + private String lName; + private String gName; + private String add1; + private String add2; + private String add3; + private String distname; + private String cityname; + private String statename; + private String dob; + private String gender; + private String mNumber; + private String idType; + private String idNumber; + private String file; + private String sigUpld; + private String religion; + private String caste; + private String insNo; + private String insIssDate; + private String insCom; + private String emailId; + + public String getEmailId() { + return emailId; + } + + public void setEmailId(String emailId) { + this.emailId = emailId; + } + + + public String getInsCom() { + return insCom; + } + + public void setInsCom(String insCom) { + this.insCom = insCom; + } + + public String getInsIssDate() { + return insIssDate; + } + + public void setInsIssDate(String insIssDate) { + this.insIssDate = insIssDate; + } + + public String getInsNo() { + return insNo; + } + + public void setInsNo(String insNo) { + this.insNo = insNo; + } + + public String getInsStatus() { + return insStatus; + } + + public void setInsStatus(String insStatus) { + this.insStatus = insStatus; + } + private String insStatus; + + + public String getCaste() { + return caste; + } + + public void setCaste(String caste) { + if(caste.equalsIgnoreCase("1")) + { + this.caste = "General"; + } + else if(caste.equalsIgnoreCase("2")) + { + this.caste = "SC"; + } + else if(caste.equalsIgnoreCase("3")) + { + this.caste = "ST"; + } + else if(caste.equalsIgnoreCase("4")) + { + this.caste = "Others"; + } + else + { + this.caste =" "; + } + } + + public String getReligion() { + return religion; + } + + public void setReligion(String religion) { + + if(religion.equalsIgnoreCase("1")) + { + this.religion ="Hindu"; + } + else if(religion.equalsIgnoreCase("2")) + { + this.religion ="Muslim"; + } + else if(religion.equalsIgnoreCase("3")) + { + this.religion ="Christian"; + } + else if(religion.equalsIgnoreCase("4")) + { + this.religion ="Sikh"; + } + else if(religion.equalsIgnoreCase("5")) + { + this.religion ="Jain"; + } + else if(religion.equalsIgnoreCase("6")) + { + this.religion ="Buddhist"; + } + else if(religion.equalsIgnoreCase("7")) + { + this.religion ="Parsi"; + } + else if(religion.equalsIgnoreCase("8")) + { + this.religion ="Others"; + } + else + { + this.religion = " "; + } + } + + public String getSigUpld() { + return sigUpld; + } + + public void setSigUpld(String sigUpld) { + this.sigUpld = sigUpld; + } + + public String getFile() { + return file; + } + + public void setFile(String file) { + this.file = file; + } + + + public String getUploadPath() { + return uploadPath; + } + + public void setUploadPath(String uploadPath) { + this.uploadPath = uploadPath; + } + private String idIssueDate; + private String idIssueAt; + private String shareAmountDue; + private String shareAmountPaid; + private String block; + private String uploadPath; + private String uploadFlag; + + public String getUploadFlag() { + return uploadFlag; + } + + public void setUploadFlag(String uploadFlag) { + this.uploadFlag = uploadFlag; + } + + + + + + + + + /** + * @return the cif + */ + public String getCif() { + return cif; + } + + /** + * @param cif the cif to set + */ + public void setCif(String cif) { + this.cif = cif; + } + + /** + * @return the cType + */ + public String getcType() { + return cType; + } + + /** + * @param cType the cType to set + */ + public void setcType(String cType) { + this.cType = cType; + } + + /** + * @return the linkedAccount + */ + public String getLinkedAccount() { + return linkedAccount; + } + + /** + * @param linkedAccount the linkedAccount to set + */ + public void setLinkedAccount(String linkedAccount) { + this.linkedAccount = linkedAccount; + } + + /** + * @return the tittle + */ + public String getTittle() { + return tittle; + } + + /** + * @param tittle the tittle to set + */ + public void setTittle(String tittle) { + this.tittle = tittle; + } + + /** + * @return the fName + */ + public String getfName() { + return fName; + } + + /** + * @param fName the fName to set + */ + public void setfName(String fName) { + this.fName = fName; + } + + /** + * @return the mName + */ + public String getmName() { + return mName; + } + + /** + * @param mName the mName to set + */ + public void setmName(String mName) { + this.mName = mName; + } + + /** + * @return the lName + */ + public String getlName() { + return lName; + } + + /** + * @param lName the lName to set + */ + public void setlName(String lName) { + this.lName = lName; + } + + /** + * @return the gName + */ + public String getgName() { + return gName; + } + + /** + * @param gName the gName to set + */ + public void setgName(String gName) { + this.gName = gName; + } + + /** + * @return the add1 + */ + public String getAdd1() { + return add1; + } + + /** + * @param add1 the add1 to set + */ + public void setAdd1(String add1) { + this.add1 = add1; + } + + /** + * @return the add2 + */ + public String getAdd2() { + return add2; + } + + /** + * @param add2 the add2 to set + */ + public void setAdd2(String add2) { + this.add2 = add2; + } + + /** + * @return the add3 + */ + public String getAdd3() { + return add3; + } + + /** + * @param add3 the add3 to set + */ + public void setAdd3(String add3) { + this.add3 = add3; + } + + /** + * @return the distname + */ + public String getDistname() { + return distname; + } + + /** + * @param distname the distname to set + */ + public void setDistname(String distname) { + this.distname = distname; + } + + /** + * @return the cityname + */ + public String getCityname() { + return cityname; + } + + /** + * @param cityname the cityname to set + */ + public void setCityname(String cityname) { + this.cityname = cityname; + } + + /** + * @return the statename + */ + public String getStatename() { + return statename; + } + + /** + * @param statename the statename to set + */ + public void setStatename(String statename) { + this.statename = statename; + } + + /** + * @return the dob + */ + public String getDob() { + return dob; + } + + /** + * @param dob the dob to set + */ + public void setDob(String dob) { + this.dob = dob; + } + + /** + * @return the gender + */ + public String getGender() { + return gender; + } + + /** + * @param gender the gender to set + */ + public void setGender(String gender) { + if((gender.equalsIgnoreCase("M")) ||((gender.equalsIgnoreCase("Male")))) + { + this.gender = "Male"; + } + else if((gender.equalsIgnoreCase("F"))||((gender.equalsIgnoreCase("Female")))) + { + this.gender = "Female"; + } + else if(gender.equalsIgnoreCase("O")) + { + this.gender = "Other"; + } + else + { + this.gender = " "; + } + + } + + /** + * @return the mNumber + */ + public String getmNumber() { + return mNumber; + } + + /** + * @param mNumber the mNumber to set + */ + public void setmNumber(String mNumber) { + this.mNumber = mNumber; + } + + /** + * @return the idType + */ + public String getIdType() { + return idType; + } + + /** + * @param idType the idType to set + */ + public void setIdType(String idType) { + this.idType = idType; + } + + /** + * @return the idNumber + */ + public String getIdNumber() { + return idNumber; + } + + /** + * @param idNumber the idNumber to set + */ + public void setIdNumber(String idNumber) { + this.idNumber = idNumber; + } + + /** + * @return the idIssueDate + */ + public String getIdIssueDate() { + return idIssueDate; + } + + /** + * @param idIssueDate the idIssueDate to set + */ + public void setIdIssueDate(String idIssueDate) { + this.idIssueDate = idIssueDate; + } + + /** + * @return the idIssueAt + */ + public String getIdIssueAt() { + return idIssueAt; + } + + /** + * @param idIssueAt the idIssueAt to set + */ + public void setIdIssueAt(String idIssueAt) { + this.idIssueAt = idIssueAt; + } + + /** + * @return the shareAmountDue + */ + public String getShareAmountDue() { + return shareAmountDue; + } + + /** + * @param shareAmountDue the shareAmountDue to set + */ + public void setShareAmountDue(String shareAmountDue) { + this.shareAmountDue = shareAmountDue; + } + + /** + * @return the shareAmountPaid + */ + public String getShareAmountPaid() { + return shareAmountPaid; + } + + /** + * @param shareAmountPaid the shareAmountPaid to set + */ + public void setShareAmountPaid(String shareAmountPaid) { + this.shareAmountPaid = shareAmountPaid; + } + + public String getBlock() { + return block; + } + + public void setBlock(String block) { + this.block = block; + } + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/kycCreationBean.java b/IPKS_Updated/src/src/java/DataEntryBean/kycCreationBean.java new file mode 100644 index 0000000..5682c1f --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/kycCreationBean.java @@ -0,0 +1,388 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author TCS + */ +public class kycCreationBean { + + private String cif; + private String cType; + private String linkedAccount; + private String tittle; + private String fName; + private String mName; + private String lName; + private String gName; + private String add1; + private String add2; + private String add3; + private String distname; + private String cityname; + private String statename; + private String dob; + private String gender; + private String mNumber; + private String idType; + private String idNumber; + private String idIssueDate; + private String idIssueAt; + private String block; + private String file; + private String sigUpld; + private String religion; + private String caste; + private String emailId; + + public String getEmailId() { + return emailId; + } + + public void setEmailId(String emailId) { + this.emailId = emailId; + } + + public String getCaste() { + return caste; + } + + public void setCaste(String caste) { + this.caste = caste; + } + + public String getReligion() { + return religion; + } + + public void setReligion(String religion) { + this.religion = religion; + } + + public String getSigUpld() { + return sigUpld; + } + + public void setSigUpld(String sigUpld) { + this.sigUpld = sigUpld; + } + + public String getFile() { + return file; + } + + public void setFile(String file) { + this.file = file; + } + + + + /** + * @return the cif + */ + public String getCif() { + return cif; + } + + /** + * @param cif the cif to set + */ + public void setCif(String cif) { + this.cif = cif; + } + + /** + * @return the cType + */ + public String getcType() { + return cType; + } + + /** + * @param cType the cType to set + */ + public void setcType(String cType) { + this.cType = cType; + } + + /** + * @return the linkedAccount + */ + public String getLinkedAccount() { + return linkedAccount; + } + + /** + * @param linkedAccount the linkedAccount to set + */ + public void setLinkedAccount(String linkedAccount) { + this.linkedAccount = linkedAccount; + } + + /** + * @return the tittle + */ + public String getTittle() { + return tittle; + } + + /** + * @param tittle the tittle to set + */ + public void setTittle(String tittle) { + this.tittle = tittle; + } + + /** + * @return the fName + */ + public String getfName() { + return fName; + } + + /** + * @param fName the fName to set + */ + public void setfName(String fName) { + this.fName = fName; + } + + /** + * @return the mName + */ + public String getmName() { + return mName; + } + + /** + * @param mName the mName to set + */ + public void setmName(String mName) { + this.mName = mName; + } + + /** + * @return the lName + */ + public String getlName() { + return lName; + } + + /** + * @param lName the lName to set + */ + public void setlName(String lName) { + this.lName = lName; + } + + /** + * @return the gName + */ + public String getgName() { + return gName; + } + + /** + * @param gName the gName to set + */ + public void setgName(String gName) { + this.gName = gName; + } + + /** + * @return the add1 + */ + public String getAdd1() { + return add1; + } + + /** + * @param add1 the add1 to set + */ + public void setAdd1(String add1) { + this.add1 = add1; + } + + /** + * @return the add2 + */ + public String getAdd2() { + return add2; + } + + /** + * @param add2 the add2 to set + */ + public void setAdd2(String add2) { + this.add2 = add2; + } + + /** + * @return the add3 + */ + public String getAdd3() { + return add3; + } + + /** + * @param add3 the add3 to set + */ + public void setAdd3(String add3) { + this.add3 = add3; + } + + /** + * @return the distname + */ + public String getDistname() { + return distname; + } + + /** + * @param distname the distname to set + */ + public void setDistname(String distname) { + this.distname = distname; + } + + /** + * @return the cityname + */ + public String getCityname() { + return cityname; + } + + /** + * @param cityname the cityname to set + */ + public void setCityname(String cityname) { + this.cityname = cityname; + } + + /** + * @return the statename + */ + public String getStatename() { + return statename; + } + + /** + * @param statename the statename to set + */ + public void setStatename(String statename) { + this.statename = statename; + } + + /** + * @return the dob + */ + public String getDob() { + return dob; + } + + /** + * @param dob the dob to set + */ + public void setDob(String dob) { + this.dob = dob; + } + + /** + * @return the gender + */ + public String getGender() { + return gender; + } + + /** + * @param gender the gender to set + */ + public void setGender(String gender) { + this.gender = gender; + } + + /** + * @return the mNumber + */ + public String getmNumber() { + return mNumber; + } + + /** + * @param mNumber the mNumber to set + */ + public void setmNumber(String mNumber) { + this.mNumber = mNumber; + } + + /** + * @return the idType + */ + public String getIdType() { + return idType; + } + + /** + * @param idType the idType to set + */ + public void setIdType(String idType) { + this.idType = idType; + } + + /** + * @return the idNumber + */ + public String getIdNumber() { + return idNumber; + } + + /** + * @param idNumber the idNumber to set + */ + public void setIdNumber(String idNumber) { + this.idNumber = idNumber; + } + + /** + * @return the idIssueDate + */ + public String getIdIssueDate() { + return idIssueDate; + } + + /** + * @param idIssueDate the idIssueDate to set + */ + public void setIdIssueDate(String idIssueDate) { + this.idIssueDate = idIssueDate; + } + + /** + * @return the idIssueAt + */ + public String getIdIssueAt() { + return idIssueAt; + } + + /** + * @param idIssueAt the idIssueAt to set + */ + public void setIdIssueAt(String idIssueAt) { + this.idIssueAt = idIssueAt; + } + + public String getBlock() { + return block; + } + + public void setBlock(String block) { + this.block = block; + } + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/masterRollEnrollmentBean.java b/IPKS_Updated/src/src/java/DataEntryBean/masterRollEnrollmentBean.java new file mode 100644 index 0000000..87717f7 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/masterRollEnrollmentBean.java @@ -0,0 +1,157 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Help desk122 + */ +public class masterRollEnrollmentBean { + + private String name; + private String address; + private String contactNo; + private String voter; + private String adhaar; + private String produce; + private String memberId; + + private String IdAmend; + private String nameAmend; + private String name_Amend; + private String addrAmend; + private String contactnoAmend; + private String voterAmend; + private String adhaarAmend; + private String produceAmend; + + public String getName_Amend() { + return name_Amend; + } + + public void setName_Amend(String name_Amend) { + this.name_Amend = name_Amend; + } + + public String getNameAmend() { + return nameAmend; + } + + public void setNameAmend(String nameAmend) { + this.nameAmend = nameAmend; + } + + public String getAddrAmend() { + return addrAmend; + } + + public void setAddrAmend(String addrAmend) { + this.addrAmend = addrAmend; + } + + public String getContactnoAmend() { + return contactnoAmend; + } + + public void setContactnoAmend(String contactnoAmend) { + this.contactnoAmend = contactnoAmend; + } + + public String getVoterAmend() { + return voterAmend; + } + + public void setVoterAmend(String voterAmend) { + this.voterAmend = voterAmend; + } + + public String getAdhaarAmend() { + return adhaarAmend; + } + + public void setAdhaarAmend(String adhaarAmend) { + this.adhaarAmend = adhaarAmend; + } + + public String getProduceAmend() { + return produceAmend; + } + + public void setProduceAmend(String produceAmend) { + this.produceAmend = produceAmend; + } + + + + public String getIdAmend() { + return IdAmend; + } + + public void setIdAmend(String IdAmend) { + this.IdAmend = IdAmend; + } + + + public String getMemberId() { + return memberId; + } + + public void setMemberId(String memberId) { + this.memberId = memberId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getContactNo() { + return contactNo; + } + + public void setContactNo(String contactNo) { + this.contactNo = contactNo; + } + + public String getVoter() { + return voter; + } + + public void setVoter(String voter) { + this.voter = voter; + } + + public String getAdhaar() { + return adhaar; + } + + public void setAdhaar(String adhaar) { + this.adhaar = adhaar; + } + + public String getProduce() { + return produce; + } + + public void setProduce(String produce) { + this.produce = produce; + } + + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/memberEnrollmentBean.java b/IPKS_Updated/src/src/java/DataEntryBean/memberEnrollmentBean.java new file mode 100644 index 0000000..0fe50d9 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/memberEnrollmentBean.java @@ -0,0 +1,166 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author 590685 + */ +public class memberEnrollmentBean { + + //for create + private String custName; + private String memberId; + private String folioNumber; + private String guardianName; + private String dateOfBirth; + private String addr; + private String district; + private String rationCardType; + +//for amend + private String custNameAmend; + private String memberIdAmend; + private String folioNumberAmend; + private String guardianNameAmend; + private String dateOfBirthAmend; + private String addrAmend; + private String districtAmend; + private String rationCardTypeAmmend; + + public String getAddr() { + return addr; + } + + public void setAddr(String addr) { + this.addr = addr; + } + + public String getAddrAmend() { + return addrAmend; + } + + public void setAddrAmend(String addrAmend) { + this.addrAmend = addrAmend; + } + + public String getCustName() { + return custName; + } + + + + public void setCustName(String custName) { + this.custName = custName; + } + + + + public String getCustNameAmend() { + return custNameAmend; + } + + public void setCustNameAmend(String custNameAmend) { + this.custNameAmend = custNameAmend; + } + + public String getDateOfBirth() { + return dateOfBirth; + } + + public void setDateOfBirth(String dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + public String getDateOfBirthAmend() { + return dateOfBirthAmend; + } + + public void setDateOfBirthAmend(String dateOfBirthAmend) { + this.dateOfBirthAmend = dateOfBirthAmend; + } + + public String getDistrict() { + return district; + } + + public void setDistrict(String district) { + this.district = district; + } + + public String getDistrictAmend() { + return districtAmend; + } + + public void setDistrictAmend(String districtAmend) { + this.districtAmend = districtAmend; + } + + public String getFolioNumber() { + return folioNumber; + } + + public void setFolioNumber(String folioNumber) { + this.folioNumber = folioNumber; + } + + public String getFolioNumberAmend() { + return folioNumberAmend; + } + + public void setFolioNumberAmend(String folioNumberAmend) { + this.folioNumberAmend = folioNumberAmend; + } + + public String getGuardianName() { + return guardianName; + } + + public void setGuardianName(String guardianName) { + this.guardianName = guardianName; + } + + public String getGuardianNameAmend() { + return guardianNameAmend; + } + + public void setGuardianNameAmend(String guardianNameAmend) { + this.guardianNameAmend = guardianNameAmend; + } + + public String getMemberId() { + return memberId; + } + + public void setMemberId(String memberId) { + this.memberId = memberId; + } + + public String getMemberIdAmend() { + return memberIdAmend; + } + + public void setMemberIdAmend(String memberIdAmend) { + this.memberIdAmend = memberIdAmend; + } + + public String getRationCardType() { + return rationCardType; + } + + public void setRationCardType(String rationCardType) { + this.rationCardType = rationCardType; + } + + public String getRationCardTypeAmmend() { + return rationCardTypeAmmend; + } + + public void setRationCardTypeAmmend(String rationCardTypeAmmend) { + this.rationCardTypeAmmend = rationCardTypeAmmend; + } + + +} \ No newline at end of file diff --git a/IPKS_Updated/src/src/java/DataEntryBean/memberEnrollmentDetailsBean.java b/IPKS_Updated/src/src/java/DataEntryBean/memberEnrollmentDetailsBean.java new file mode 100644 index 0000000..89fc9e8 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/memberEnrollmentDetailsBean.java @@ -0,0 +1,140 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author 1320035 + */ +public class memberEnrollmentDetailsBean { + + private String familyId; + private String cardNoFamily; + private String cardHolderNameFamily; + private String DOBFamily; + private String rowStatus; + private String detailIdAmend; + private String familyIdAmend; + private String cardNoFamilyAmend; + private String cardHolderNameFamilyAmend; + private String DOBFamilyAmend; + private String familyIdAmend3; + private String cardNoFamilyAmend3; + private String cardHolderNameFamilyAmend3; + private String DOBFamilyAmend3; + + public String getDOBFamilyAmend3() { + return DOBFamilyAmend3; + } + + public void setDOBFamilyAmend3(String DOBFamilyAmend3) { + this.DOBFamilyAmend3 = DOBFamilyAmend3; + } + + public String getCardHolderNameFamilyAmend3() { + return cardHolderNameFamilyAmend3; + } + + public void setCardHolderNameFamilyAmend3(String cardHolderNameFamilyAmend3) { + this.cardHolderNameFamilyAmend3 = cardHolderNameFamilyAmend3; + } + + public String getCardNoFamilyAmend3() { + return cardNoFamilyAmend3; + } + + public void setCardNoFamilyAmend3(String cardNoFamilyAmend3) { + this.cardNoFamilyAmend3 = cardNoFamilyAmend3; + } + + public String getFamilyIdAmend3() { + return familyIdAmend3; + } + + public void setFamilyIdAmend3(String familyIdAmend3) { + this.familyIdAmend3 = familyIdAmend3; + } + + public String getDetailIdAmend() { + return detailIdAmend; + } + + public void setDetailIdAmend(String detailIdAmend) { + this.detailIdAmend = detailIdAmend; + } + + public String getRowStatus() { + return rowStatus; + } + + public void setRowStatus(String rowStatus) { + this.rowStatus = rowStatus; + } + + public String getDOBFamilyAmend() { + return DOBFamilyAmend; + } + + public void setDOBFamilyAmend(String DOBFamilyAmend) { + this.DOBFamilyAmend = DOBFamilyAmend; + } + + public String getCardHolderNameFamilyAmend() { + return cardHolderNameFamilyAmend; + } + + public void setCardHolderNameFamilyAmend(String cardHolderNameFamilyAmend) { + this.cardHolderNameFamilyAmend = cardHolderNameFamilyAmend; + } + + public String getCardNoFamilyAmend() { + return cardNoFamilyAmend; + } + + public void setCardNoFamilyAmend(String cardNoFamilyAmend) { + this.cardNoFamilyAmend = cardNoFamilyAmend; + } + + public String getFamilyIdAmend() { + return familyIdAmend; + } + + public void setFamilyIdAmend(String familyIdAmend) { + this.familyIdAmend = familyIdAmend; + } + + public String getFamilyId() { + return familyId; + } + + public void setFamilyId(String familyId) { + this.familyId = familyId; + } + + public String getDOBFamily() { + return DOBFamily; + } + + public void setDOBFamily(String DOBFamily) { + this.DOBFamily = DOBFamily; + } + + public String getCardHolderNameFamily() { + return cardHolderNameFamily; + } + + public void setCardHolderNameFamily(String cardHolderNameFamily) { + this.cardHolderNameFamily = cardHolderNameFamily; + } + + public String getCardNoFamily() { + return cardNoFamily; + } + + public void setCardNoFamily(String cardNoFamily) { + this.cardNoFamily = cardNoFamily; + } +} + diff --git a/IPKS_Updated/src/src/java/DataEntryBean/memberEnrollmentHeaderBean.java b/IPKS_Updated/src/src/java/DataEntryBean/memberEnrollmentHeaderBean.java new file mode 100644 index 0000000..74a7ac5 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/memberEnrollmentHeaderBean.java @@ -0,0 +1,344 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 1320035 + */ +public class memberEnrollmentHeaderBean { + private String custName; + private String cardNo; +private String holderId; + private String SDWOf; + //private String memberId; + //private String folioNumber; + // private String guardianName; + private String dateOfBirth; + //private String addr; + private String district; + private String houseNo; + private String street; + private String gramPanchayat; + private String revenueBlock; + private String subdivision; + private String state; + private String issuedOn; + private String validUpto; + private String cardCategory; + private String cardTypeId; + +//for amend + private String custNameAmendSearch; + + private String cardNoAmendSearch; + private String holderIdAmend; + private String custNameAmend; + // private String memberIdAmend; + private String cardNoAmend; + private String SDWOfAmend; + private String houseNoAmend; + private String streetAmend; + private String gramPanchayatAmend; + private String revenueBlockAmend; + private String subdivisionAmend; + private String stateAmend; + private String issuedOnAmend; + private String validUptoAmend; + private String cardCategoryAmend; + //private String folioNumberAmend; + //private String guardianNameAmend; + private String dateOfBirthAmend; + //private String addrAmend; + private String districtAmend; + private String cardTypeIdAmend; + + public String getCardNoAmendSearch() { + return cardNoAmendSearch; + } + + public void setCardNoAmendSearch(String cardNoAmendSearch) { + this.cardNoAmendSearch = cardNoAmendSearch; + } + + public String getCustNameAmendSearch() { + return custNameAmendSearch; + } + + public void setCustNameAmendSearch(String custNameAmendSearch) { + this.custNameAmendSearch = custNameAmendSearch; + } + + + public String getCardTypeId() { + return cardTypeId; + } + + public void setCardTypeId(String cardTypeId) { + this.cardTypeId = cardTypeId; + } + + public String getCardTypeIdAmend() { + return cardTypeIdAmend; + } + + public void setCardTypeIdAmend(String cardTypeIdAmend) { + this.cardTypeIdAmend = cardTypeIdAmend; + } + + + public String getHolderId() { + return holderId; + } + + public void setHolderId(String holderId) { + this.holderId = holderId; + } + + public String getHolderIdAmend() { + return holderIdAmend; + } + + public void setHolderIdAmend(String holderIdAmend) { + this.holderIdAmend = holderIdAmend; + } + + + + public String getSDWOfAmend() { + return SDWOfAmend; + } + + public void setSDWOfAmend(String SDWOfAmend) { + this.SDWOfAmend = SDWOfAmend; + } + + public String getCardCategoryAmend() { + return cardCategoryAmend; + } + + public void setCardCategoryAmend(String cardCategoryAmend) { + this.cardCategoryAmend = cardCategoryAmend; + } + + public String getCardNoAmend() { + return cardNoAmend; + } + + public void setCardNoAmend(String cardNoAmend) { + this.cardNoAmend = cardNoAmend; + } + + public String getGramPanchayatAmend() { + return gramPanchayatAmend; + } + + public void setGramPanchayatAmend(String gramPanchayatAmend) { + this.gramPanchayatAmend = gramPanchayatAmend; + } + + public String getHouseNoAmend() { + return houseNoAmend; + } + + public void setHouseNoAmend(String houseNoAmend) { + this.houseNoAmend = houseNoAmend; + } + + public String getIssuedOnAmend() { + return issuedOnAmend; + } + + public void setIssuedOnAmend(String issuedOnAmend) { + this.issuedOnAmend = issuedOnAmend; + } + + public String getRevenueBlockAmend() { + return revenueBlockAmend; + } + + public void setRevenueBlockAmend(String revenueBlockAmend) { + this.revenueBlockAmend = revenueBlockAmend; + } + + public String getStateAmend() { + return stateAmend; + } + + public void setStateAmend(String stateAmend) { + this.stateAmend = stateAmend; + } + + public String getStreetAmend() { + return streetAmend; + } + + public void setStreetAmend(String streetAmend) { + this.streetAmend = streetAmend; + } + + public String getSubdivisionAmend() { + return subdivisionAmend; + } + + public void setSubdivisionAmend(String subdivisionAmend) { + this.subdivisionAmend = subdivisionAmend; + } + + public String getValidUptoAmend() { + return validUptoAmend; + } + + public void setValidUptoAmend(String validUptoAmend) { + this.validUptoAmend = validUptoAmend; + } + + + public String getSDWOf() { + return SDWOf; + } + + public void setSDWOf(String SDWOf) { + this.SDWOf = SDWOf; + } + + public String getCardCategory() { + return cardCategory; + } + + public void setCardCategory(String cardCategory) { + this.cardCategory = cardCategory; + } + + public String getCardNo() { + return cardNo; + } + + public void setCardNo(String cardNo) { + this.cardNo = cardNo; + } + + public String getGramPanchayat() { + return gramPanchayat; + } + + public void setGramPanchayat(String gramPanchayat) { + this.gramPanchayat = gramPanchayat; + } + + public String getHouseNo() { + return houseNo; + } + + public void setHouseNo(String houseNo) { + this.houseNo = houseNo; + } + + public String getIssuedOn() { + return issuedOn; + } + + public void setIssuedOn(String issuedOn) { + this.issuedOn = issuedOn; + } + + public String getRevenueBlock() { + return revenueBlock; + } + + public void setRevenueBlock(String revenueBlock) { + this.revenueBlock = revenueBlock; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public String getStreet() { + return street; + } + + public void setStreet(String street) { + this.street = street; + } + + public String getSubdivision() { + return subdivision; + } + + public void setSubdivision(String subdivision) { + this.subdivision = subdivision; + } + + public String getValidUpto() { + return validUpto; + } + + public void setValidUpto(String validUpto) { + this.validUpto = validUpto; + } + + + + + public String getCustName() { + return custName; + } + + + + public void setCustName(String custName) { + this.custName = custName; + } + + + + public String getCustNameAmend() { + return custNameAmend; + } + + public void setCustNameAmend(String custNameAmend) { + this.custNameAmend = custNameAmend; + } + + public String getDateOfBirth() { + return dateOfBirth; + } + + public void setDateOfBirth(String dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + public String getDateOfBirthAmend() { + return dateOfBirthAmend; + } + + public void setDateOfBirthAmend(String dateOfBirthAmend) { + this.dateOfBirthAmend = dateOfBirthAmend; + } + + public String getDistrict() { + return district; + } + + public void setDistrict(String district) { + this.district = district; + } + + public String getDistrictAmend() { + return districtAmend; + } + + public void setDistrictAmend(String districtAmend) { + this.districtAmend = districtAmend; + } + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/mocProcessingBean.java b/IPKS_Updated/src/src/java/DataEntryBean/mocProcessingBean.java new file mode 100644 index 0000000..0786a8c --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/mocProcessingBean.java @@ -0,0 +1,104 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 981898 + */ +public class mocProcessingBean { + private String accType; + private String accNo; + private String txnAmt; + private String txnInd; + private String txnStatus; + private String txnRefNo; + private String narration; + private String loan_ac_no; + private String sec_acc_no; + private String txn_date; + + public String getSec_acc_no() { + return sec_acc_no; + } + + public void setSec_acc_no(String sec_acc_no) { + this.sec_acc_no = sec_acc_no; + } + + public String getTxn_date() { + return txn_date; + } + + public void setTxn_date(String txn_date) { + this.txn_date = txn_date; + } + + public String getLoan_ac_no() { + return loan_ac_no; + } + + public void setLoan_ac_no(String loan_ac_no) { + this.loan_ac_no = loan_ac_no; + } + + public String getNarration() { + return narration; + } + + public void setNarration(String narration) { + this.narration = narration; + } + + public String getTxnRefNo() { + return txnRefNo; + } + + public void setTxnRefNo(String txnRefNo) { + this.txnRefNo = txnRefNo; + } + + public String getTxnStatus() { + return txnStatus; + } + + public void setTxnStatus(String txnStatus) { + this.txnStatus = txnStatus; + } + + public String getAccNo() { + return accNo; + } + + public void setAccNo(String accNo) { + this.accNo = accNo; + } + + public String getAccType() { + return accType; + } + + public void setAccType(String accType) { + this.accType = accType; + } + + public String getTxnAmt() { + return txnAmt; + } + + public void setTxnAmt(String txnAmt) { + this.txnAmt = txnAmt; + } + + public String getTxnInd() { + return txnInd; + } + + public void setTxnInd(String txnInd) { + this.txnInd = txnInd; + } + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/myWorlistBean.java b/IPKS_Updated/src/src/java/DataEntryBean/myWorlistBean.java new file mode 100644 index 0000000..9021a78 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/myWorlistBean.java @@ -0,0 +1,281 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Helpdesk10 + */ +public class myWorlistBean { + + private String refno; + private String transactiontype; + private String fromDate; + private String toDate; + private String intitiator; + private String account_no; + private String account_no2; + private String account_bal; + private String txn_amount; + private String txn_date; + private String transactiontypeSearch; + private String refnoSearch; + private String checkOption; + private String chargeToDeduct; + private String cust_name; + private String cust_no; + private String tran_ind; + private String prinrepayamt; + private String inttrepayamt; + private String pacsID; + private String pacsName; + private String CBSAcc; + private String sgst_amount; + private String cgst_amount; + private String dis_amount; + private String net_amount; + private String sale_purchase_ref; + private String trade_product; + + public String getSale_purchase_ref() { + return sale_purchase_ref; + } + + public void setSale_purchase_ref(String sale_purchase_ref) { + this.sale_purchase_ref = sale_purchase_ref; + } + + public String getTrade_product() { + return trade_product; + } + + public void setTrade_product(String trade_product) { + this.trade_product = trade_product; + } + + + + public String getSgst_amount() { + return sgst_amount; + } + + public void setSgst_amount(String sgst_amount) { + this.sgst_amount = sgst_amount; + } + + public String getCgst_amount() { + return cgst_amount; + } + + public void setCgst_amount(String cgst_amount) { + this.cgst_amount = cgst_amount; + } + + public String getDis_amount() { + return dis_amount; + } + + public void setDis_amount(String dis_amount) { + this.dis_amount = dis_amount; + } + + public String getNet_amount() { + return net_amount; + } + + public void setNet_amount(String net_amount) { + this.net_amount = net_amount; + } + + + public String getInttrepayamt() { + return inttrepayamt; + } + + public void setInttrepayamt(String inttrepayamt) { + this.inttrepayamt = inttrepayamt; + } + + public String getPrinrepayamt() { + return prinrepayamt; + } + + public void setPrinrepayamt(String prinrepayamt) { + this.prinrepayamt = prinrepayamt; + } + + + + public String getTran_ind() { + return tran_ind; + } + + public void setTran_ind(String tran_ind) { + this.tran_ind = tran_ind; + } + + public String getCust_no() { + return cust_no; + } + + public void setCust_no(String cust_no) { + this.cust_no = cust_no; + } + + public String getCust_name() { + return cust_name; + } + + public void setCust_name(String cust_name) { + this.cust_name = cust_name; + } + + public String getAccount_no2() { + return account_no2; + } + + public void setAccount_no2(String account_no2) { + this.account_no2 = account_no2; + } + + + + public String getAccount_bal() { + return account_bal; + } + + public void setAccount_bal(String account_bal) { + this.account_bal = account_bal; + } + + + public String getChargeToDeduct() { + return chargeToDeduct; + } + + public void setChargeToDeduct(String chargeToDeduct) { + this.chargeToDeduct = chargeToDeduct; + } + + public String getCheckOption() { + return checkOption; + } + + public void setCheckOption(String checkOption) { + this.checkOption = checkOption; + } + + + + public String getTransactiontypeSearch() { + return transactiontypeSearch; + } + + public void setTransactiontypeSearch(String transactiontypeSearch) { + this.transactiontypeSearch = transactiontypeSearch; + } + + public String getRefnoSearch() { + return refnoSearch; + } + + public void setRefnoSearch(String refnoSearch) { + this.refnoSearch = refnoSearch; + } + + + public String getRefno() { + return refno; + } + + public void setRefno(String refno) { + this.refno = refno; + } + + public String getTransactiontype() { + return transactiontype; + } + + public void setTransactiontype(String transactiontype) { + this.transactiontype = transactiontype; + } + + public String getFromDate() { + return fromDate; + } + + public void setFromDate(String fromDate) { + this.fromDate = fromDate; + } + + public String getToDate() { + return toDate; + } + + public void setToDate(String toDate) { + this.toDate = toDate; + } + + public String getIntitiator() { + return intitiator; + } + + public void setIntitiator(String intitiator) { + this.intitiator = intitiator; + } + + public String getAccount_no() { + return account_no; + } + + public void setAccount_no(String account_no) { + this.account_no = account_no; + } + + public String getTxn_amount() { + return txn_amount; + } + + public void setTxn_amount(String txn_amount) { + this.txn_amount = txn_amount; + } + + public String getTxn_date() { + return txn_date; + } + + public void setTxn_date(String txn_date) { + this.txn_date = txn_date; + } + + public String getPacsID() { + return pacsID; + } + + public void setPacsID(String pacsID) { + this.pacsID = pacsID; + } + + public String getPacsName() { + return pacsName; + } + + public void setPacsName(String pacsName) { + this.pacsName = pacsName; + } + + public String getCBSAcc() { + return CBSAcc; + } + + public void setCBSAcc(String CBSAcc) { + this.CBSAcc = CBSAcc; + } + + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/pacsProductOperationBean.java b/IPKS_Updated/src/src/java/DataEntryBean/pacsProductOperationBean.java new file mode 100644 index 0000000..16d9e28 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/pacsProductOperationBean.java @@ -0,0 +1,872 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Kaushik + */ +public class pacsProductOperationBean { + + //For Create Div + private String productname; + private String productdescription; + private String productcode; + private String inttcategory; + private String intcatdescription; + private String segmentCode; + private String status; + private String effectDate; + private String minbal; + private String maxbal; + private String intrate; + private String inttmethod; + private String inttfrequency; + private String glCode; + private String odindicator; + private String maxlimit; + private String drawingpower; + private String penalinttrate; + private String penalinttmethod; + private String penalinttfrequency; + private String creditComp1; + private String creditComp2; + private String debitComp1; + private String debitComp2; + private String cropIns; + private String inttcapfrequency; + private String glCodeInttPAID; + private String glCodeInttPAYABLE; + private String glCodeInttPAID_Amend; + private String glCodeInttPAYABLE_Amend; + + //For Update Div + private String productnameAmend; + private String productdescriptionAmend; + private String productcodeAmend; + private String inttcategoryAmend; + private String intcatdescriptionAmend; + private String segmentCodeAmend; + private String statusAmend; + private String effectDateAmend; + private String minbalAmend; + private String maxbalAmend; + private String intrateAmend; + private String inttmethodAmend; + private String inttfrequencyAmend; + private String glCodeAmend; + private String odindicatorAmend; + private String maxlimitAmend; + private String drawingpowerAmend; + private String penalinttrateAmend; + private String penalinttmethodAmend; + private String penalinttfrequencyAmend; + private String intcatSearch; + private String productcodeSearch; + private String dep_product_id; + private String creditComp1Amend; + private String creditComp2Amend; + private String debitComp1Amend; + private String debitComp2Amend; + private String cropInsAmend; + private String inttcapfrequencyAmend; + + public String getGlCodeInttPAID() { + return glCodeInttPAID; + } + + public void setGlCodeInttPAID(String glCodeInttPAID) { + this.glCodeInttPAID = glCodeInttPAID; + } + + public String getGlCodeInttPAID_Amend() { + return glCodeInttPAID_Amend; + } + + public void setGlCodeInttPAID_Amend(String glCodeInttPAID_Amend) { + this.glCodeInttPAID_Amend = glCodeInttPAID_Amend; + } + + public String getGlCodeInttPAYABLE() { + return glCodeInttPAYABLE; + } + + public void setGlCodeInttPAYABLE(String glCodeInttPAYABLE) { + this.glCodeInttPAYABLE = glCodeInttPAYABLE; + } + + public String getGlCodeInttPAYABLE_Amend() { + return glCodeInttPAYABLE_Amend; + } + + public void setGlCodeInttPAYABLE_Amend(String glCodeInttPAYABLE_Amend) { + this.glCodeInttPAYABLE_Amend = glCodeInttPAYABLE_Amend; + } + + + + public String getInttcapfrequency() { + return inttcapfrequency; + } + + public void setInttcapfrequency(String inttcapfrequency) { + this.inttcapfrequency = inttcapfrequency; + } + + public String getInttcapfrequencyAmend() { + return inttcapfrequencyAmend; + } + + public void setInttcapfrequencyAmend(String inttcapfrequencyAmend) { + this.inttcapfrequencyAmend = inttcapfrequencyAmend; + } + + + /** + * @return the productname + */ + public String getProductname() { + return productname; + } + + /** + * @param productname the productname to set + */ + public void setProductname(String productname) { + this.productname = productname; + } + + /** + * @return the productdescription + */ + public String getProductdescription() { + return productdescription; + } + + /** + * @param productdescription the productdescription to set + */ + public void setProductdescription(String productdescription) { + this.productdescription = productdescription; + } + + /** + * @return the productcode + */ + public String getProductcode() { + return productcode; + } + + /** + * @param productcode the productcode to set + */ + public void setProductcode(String productcode) { + this.productcode = productcode; + } + + /** + * @return the inttcategory + */ + public String getInttcategory() { + return inttcategory; + } + + /** + * @param inttcategory the inttcategory to set + */ + public void setInttcategory(String inttcategory) { + this.inttcategory = inttcategory; + } + + /** + * @return the intcatdescription + */ + public String getIntcatdescription() { + return intcatdescription; + } + + /** + * @param intcatdescription the intcatdescription to set + */ + public void setIntcatdescription(String intcatdescription) { + this.intcatdescription = intcatdescription; + } + + /** + * @return the segmentCode + */ + public String getSegmentCode() { + return segmentCode; + } + + /** + * @param segmentCode the segmentCode to set + */ + public void setSegmentCode(String segmentCode) { + this.segmentCode = segmentCode; + } + + /** + * @return the status + */ + public String getStatus() { + return status; + } + + /** + * @param status the status to set + */ + public void setStatus(String status) { + this.status = status; + } + + /** + * @return the effectDate + */ + public String getEffectDate() { + return effectDate; + } + + /** + * @param effectDate the effectDate to set + */ + public void setEffectDate(String effectDate) { + this.effectDate = effectDate; + } + + /** + * @return the minbal + */ + public String getMinbal() { + return minbal; + } + + /** + * @param minbal the minbal to set + */ + public void setMinbal(String minbal) { + this.minbal = minbal; + } + + /** + * @return the maxbal + */ + public String getMaxbal() { + return maxbal; + } + + /** + * @param maxbal the maxbal to set + */ + public void setMaxbal(String maxbal) { + this.maxbal = maxbal; + } + + /** + * @return the intrate + */ + public String getIntrate() { + return intrate; + } + + /** + * @param intrate the intrate to set + */ + public void setIntrate(String intrate) { + this.intrate = intrate; + } + + /** + * @return the inttmethod + */ + public String getInttmethod() { + return inttmethod; + } + + /** + * @param inttmethod the inttmethod to set + */ + public void setInttmethod(String inttmethod) { + this.inttmethod = inttmethod; + } + + /** + * @return the inttfrequency + */ + public String getInttfrequency() { + return inttfrequency; + } + + /** + * @param inttfrequency the inttfrequency to set + */ + public void setInttfrequency(String inttfrequency) { + this.inttfrequency = inttfrequency; + } + + /** + * @return the glCode + */ + public String getGlCode() { + return glCode; + } + + /** + * @param glCode the glDescription to set + */ + public void setGlCode(String glCode) { + this.glCode = glCode; + } + + /** + * @return the odindicator + */ + public String getOdindicator() { + return odindicator; + } + + /** + * @param odindicator the odindicator to set + */ + public void setOdindicator(String odindicator) { + this.odindicator = odindicator; + } + + /** + * @return the maxlimit + */ + public String getMaxlimit() { + return maxlimit; + } + + /** + * @param maxlimit the maxlimit to set + */ + public void setMaxlimit(String maxlimit) { + this.maxlimit = maxlimit; + } + + /** + * @return the drawingpower + */ + public String getDrawingpower() { + return drawingpower; + } + + /** + * @param drawingpower the drawingpower to set + */ + public void setDrawingpower(String drawingpower) { + this.drawingpower = drawingpower; + } + + /** + * @return the penalinttrate + */ + public String getPenalinttrate() { + return penalinttrate; + } + + /** + * @param penalinttrate the penalinttrate to set + */ + public void setPenalinttrate(String penalinttrate) { + this.penalinttrate = penalinttrate; + } + + /** + * @return the penalinttmethod + */ + public String getPenalinttmethod() { + return penalinttmethod; + } + + /** + * @param penalinttmethod the penalinttmethod to set + */ + public void setPenalinttmethod(String penalinttmethod) { + this.penalinttmethod = penalinttmethod; + } + + /** + * @return the penalinttfrequency + */ + public String getPenalinttfrequency() { + return penalinttfrequency; + } + + /** + * @param penalinttfrequency the penalinttfrequency to set + */ + public void setPenalinttfrequency(String penalinttfrequency) { + this.penalinttfrequency = penalinttfrequency; + } + + /** + * @return the productnameAmend + */ + public String getProductnameAmend() { + return productnameAmend; + } + + /** + * @param productnameAmend the productnameAmend to set + */ + public void setProductnameAmend(String productnameAmend) { + this.productnameAmend = productnameAmend; + } + + /** + * @return the productdescriptionAmend + */ + public String getProductdescriptionAmend() { + return productdescriptionAmend; + } + + /** + * @param productdescriptionAmend the productdescriptionAmend to set + */ + public void setProductdescriptionAmend(String productdescriptionAmend) { + this.productdescriptionAmend = productdescriptionAmend; + } + + /** + * @return the productcodeAmend + */ + public String getProductcodeAmend() { + return productcodeAmend; + } + + /** + * @param productcodeAmend the productcodeAmend to set + */ + public void setProductcodeAmend(String productcodeAmend) { + this.productcodeAmend = productcodeAmend; + } + + /** + * @return the inttcategoryAmend + */ + public String getInttcategoryAmend() { + return inttcategoryAmend; + } + + /** + * @param inttcategoryAmend the inttcategoryAmend to set + */ + public void setInttcategoryAmend(String inttcategoryAmend) { + this.inttcategoryAmend = inttcategoryAmend; + } + + /** + * @return the intcatdescriptionAmend + */ + public String getIntcatdescriptionAmend() { + return intcatdescriptionAmend; + } + + /** + * @param intcatdescriptionAmend the intcatdescriptionAmend to set + */ + public void setIntcatdescriptionAmend(String intcatdescriptionAmend) { + this.intcatdescriptionAmend = intcatdescriptionAmend; + } + + /** + * @return the segmentCodeAmend + */ + public String getSegmentCodeAmend() { + return segmentCodeAmend; + } + + /** + * @param segmentCodeAmend the segmentCodeAmend to set + */ + public void setSegmentCodeAmend(String segmentCodeAmend) { + this.segmentCodeAmend = segmentCodeAmend; + } + + /** + * @return the statusAmend + */ + public String getStatusAmend() { + return statusAmend; + } + + /** + * @param statusAmend the statusAmend to set + */ + public void setStatusAmend(String statusAmend) { + this.statusAmend = statusAmend; + } + + /** + * @return the effectDateAmend + */ + public String getEffectDateAmend() { + return effectDateAmend; + } + + /** + * @param effectDateAmend the effectDateAmend to set + */ + public void setEffectDateAmend(String effectDateAmend) { + this.effectDateAmend = effectDateAmend; + } + + /** + * @return the minbalAmend + */ + public String getMinbalAmend() { + return minbalAmend; + } + + /** + * @param minbalAmend the minbalAmend to set + */ + public void setMinbalAmend(String minbalAmend) { + this.minbalAmend = minbalAmend; + } + + /** + * @return the maxbalAmend + */ + public String getMaxbalAmend() { + return maxbalAmend; + } + + /** + * @param maxbalAmend the maxbalAmend to set + */ + public void setMaxbalAmend(String maxbalAmend) { + this.maxbalAmend = maxbalAmend; + } + + /** + * @return the intrateAmend + */ + public String getIntrateAmend() { + return intrateAmend; + } + + /** + * @param intrateAmend the intrateAmend to set + */ + public void setIntrateAmend(String intrateAmend) { + this.intrateAmend = intrateAmend; + } + + /** + * @return the inttmethodAmend + */ + public String getInttmethodAmend() { + return inttmethodAmend; + } + + /** + * @param inttmethodAmend the inttmethodAmend to set + */ + public void setInttmethodAmend(String inttmethodAmend) { + this.inttmethodAmend = inttmethodAmend; + } + + /** + * @return the inttfrequencyAmend + */ + public String getInttfrequencyAmend() { + return inttfrequencyAmend; + } + + /** + * @param inttfrequencyAmend the inttfrequencyAmend to set + */ + public void setInttfrequencyAmend(String inttfrequencyAmend) { + this.inttfrequencyAmend = inttfrequencyAmend; + } + + /** + * @return the glCodeAmend + */ + public String getGlCodeAmend() { + return glCodeAmend; + } + + /** + * @param glCodeAmend the glDescriptionAmend to set + */ + public void setGlCodeAmend(String glCodeAmend) { + this.glCodeAmend = glCodeAmend; + } + + /** + * @return the odindicatorAmend + */ + public String getOdindicatorAmend() { + return odindicatorAmend; + } + + /** + * @param odindicatorAmend the odindicatorAmend to set + */ + public void setOdindicatorAmend(String odindicatorAmend) { + this.odindicatorAmend = odindicatorAmend; + } + + /** + * @return the maxlimitAmend + */ + public String getMaxlimitAmend() { + return maxlimitAmend; + } + + /** + * @param maxlimitAmend the maxlimitAmend to set + */ + public void setMaxlimitAmend(String maxlimitAmend) { + this.maxlimitAmend = maxlimitAmend; + } + + /** + * @return the drawingpowerAmend + */ + public String getDrawingpowerAmend() { + return drawingpowerAmend; + } + + /** + * @param drawingpowerAmend the drawingpowerAmend to set + */ + public void setDrawingpowerAmend(String drawingpowerAmend) { + this.drawingpowerAmend = drawingpowerAmend; + } + + /** + * @return the penalinttrateAmend + */ + public String getPenalinttrateAmend() { + return penalinttrateAmend; + } + + /** + * @param penalinttrateAmend the penalinttrateAmend to set + */ + public void setPenalinttrateAmend(String penalinttrateAmend) { + this.penalinttrateAmend = penalinttrateAmend; + } + + /** + * @return the penalinttmethodAmend + */ + public String getPenalinttmethodAmend() { + return penalinttmethodAmend; + } + + /** + * @param penalinttmethodAmend the penalinttmethodAmend to set + */ + public void setPenalinttmethodAmend(String penalinttmethodAmend) { + this.penalinttmethodAmend = penalinttmethodAmend; + } + + /** + * @return the penalinttfrequencyAmend + */ + public String getPenalinttfrequencyAmend() { + return penalinttfrequencyAmend; + } + + /** + * @param penalinttfrequencyAmend the penalinttfrequencyAmend to set + */ + public void setPenalinttfrequencyAmend(String penalinttfrequencyAmend) { + this.penalinttfrequencyAmend = penalinttfrequencyAmend; + } + + /** + * @return the intcatSearch + */ + public String getIntcatSearch() { + return intcatSearch; + } + + /** + * @param intcatSearch the intcatSearch to set + */ + public void setIntcatSearch(String intcatSearch) { + this.intcatSearch = intcatSearch; + } + + /** + * @return the productcodeSearch + */ + public String getProductcodeSearch() { + return productcodeSearch; + } + + /** + * @param productcodeSearch the productcodeSearch to set + */ + public void setProductcodeSearch(String productcodeSearch) { + this.productcodeSearch = productcodeSearch; + } + + /** + * @return the dep_product_id + */ + public String getDep_product_id() { + return dep_product_id; + } + + /** + * @param dep_product_id the dep_product_id to set + */ + public void setDep_product_id(String dep_product_id) { + this.dep_product_id = dep_product_id; + } + + /** + * @return the creditComp1 + */ + public String getCreditComp1() { + return creditComp1; + } + + /** + * @param creditComp1 the creditComp1 to set + */ + public void setCreditComp1(String creditComp1) { + this.creditComp1 = creditComp1; + } + + /** + * @return the creditComp2 + */ + public String getCreditComp2() { + return creditComp2; + } + + /** + * @param creditComp2 the creditComp2 to set + */ + public void setCreditComp2(String creditComp2) { + this.creditComp2 = creditComp2; + } + + /** + * @return the debitComp1 + */ + public String getDebitComp1() { + return debitComp1; + } + + /** + * @param debitComp1 the debitComp1 to set + */ + public void setDebitComp1(String debitComp1) { + this.debitComp1 = debitComp1; + } + + /** + * @return the debitComp2 + */ + public String getDebitComp2() { + return debitComp2; + } + + /** + * @param debitComp2 the debitComp2 to set + */ + public void setDebitComp2(String debitComp2) { + this.debitComp2 = debitComp2; + } + + /** + * @return the creditComp1Amend + */ + public String getCreditComp1Amend() { + return creditComp1Amend; + } + + /** + * @param creditComp1Amend the creditComp1Amend to set + */ + public void setCreditComp1Amend(String creditComp1Amend) { + this.creditComp1Amend = creditComp1Amend; + } + + /** + * @return the creditComp2Amend + */ + public String getCreditComp2Amend() { + return creditComp2Amend; + } + + /** + * @param creditComp2Amend the creditComp2Amend to set + */ + public void setCreditComp2Amend(String creditComp2Amend) { + this.creditComp2Amend = creditComp2Amend; + } + + /** + * @return the debitComp1Amend + */ + public String getDebitComp1Amend() { + return debitComp1Amend; + } + + /** + * @param debitComp1Amend the debitComp1Amend to set + */ + public void setDebitComp1Amend(String debitComp1Amend) { + this.debitComp1Amend = debitComp1Amend; + } + + /** + * @return the debitComp2Amend + */ + public String getDebitComp2Amend() { + return debitComp2Amend; + } + + /** + * @param debitComp2Amend the debitComp2Amend to set + */ + public void setDebitComp2Amend(String debitComp2Amend) { + this.debitComp2Amend = debitComp2Amend; + } + + /** + * @return the cropIns + */ + public String getCropIns() { + return cropIns; + } + + /** + * @param cropIns the cropIns to set + */ + public void setCropIns(String cropIns) { + this.cropIns = cropIns; + } + + /** + * @return the cropInsAmend + */ + public String getCropInsAmend() { + return cropInsAmend; + } + + /** + * @param cropInsAmend the cropInsAmend to set + */ + public void setCropInsAmend(String cropInsAmend) { + this.cropInsAmend = cropInsAmend; + } + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/pdsProductCreationBean.java b/IPKS_Updated/src/src/java/DataEntryBean/pdsProductCreationBean.java new file mode 100644 index 0000000..4a082be --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/pdsProductCreationBean.java @@ -0,0 +1,274 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author 590685 + */ +public class pdsProductCreationBean { + + + private String status; + private String productName; + private String productType; + private String productDescription; + private String productSubType; + private String productSubTypeDescription; + private String productCode; + private String unit; + private String inventorySearch; + private String inventorySearchByType; + private String inventorySearchByDescription; + private String inventorySearchBySubType; + private String inventorySearchBySubTypeDescription; + private String statusAmend; + private String productNameAmend; + private String productTypeAmend; + private String productDescriptionAmend; + private String productSubTypeAmend; + private String productSubTypeDescriptionAmend; + private String unitAmend; + private String product_id; + private String product_id_search; + private String productCodeActivation; + private String productDescriptionActivation; + private String productSubTypeDescriptionActivation; + private String profitFactorAmend; + private String profitFactor; + + public String getProduct_id_search() { + return product_id_search; + } + + public void setProduct_id_search(String product_id_search) { + this.product_id_search = product_id_search; + } + + + public String getInventorySearchByDescription() { + return inventorySearchByDescription; + } + + public String getProductDescriptionActivation() { + return productDescriptionActivation; + } + + public void setProductDescriptionActivation(String productDescriptionActivation) { + this.productDescriptionActivation = productDescriptionActivation; + } + + public String getProductSubTypeDescriptionActivation() { + return productSubTypeDescriptionActivation; + } + + public void setProductSubTypeDescriptionActivation(String productSubTypeDescriptionActivation) { + this.productSubTypeDescriptionActivation = productSubTypeDescriptionActivation; + } + + public String getProductDescriptionAmend() { + return productDescriptionAmend; + } + + public void setProductDescriptionAmend(String productDescriptionAmend) { + this.productDescriptionAmend = productDescriptionAmend; + } + + public String getProductSubTypeAmend() { + return productSubTypeAmend; + } + + public void setProductSubTypeAmend(String productSubTypeAmend) { + this.productSubTypeAmend = productSubTypeAmend; + } + + public String getProductSubTypeDescriptionAmend() { + return productSubTypeDescriptionAmend; + } + + public void setProductSubTypeDescriptionAmend(String productSubTypeDescriptionAmend) { + this.productSubTypeDescriptionAmend = productSubTypeDescriptionAmend; + } + + public String getProductTypeAmend() { + return productTypeAmend; + } + + public void setProductTypeAmend(String productTypeAmend) { + this.productTypeAmend = productTypeAmend; + } + + public void setInventorySearchByDescription(String inventorySearchByDescription) { + this.inventorySearchByDescription = inventorySearchByDescription; + } + + public String getInventorySearchBySubType() { + return inventorySearchBySubType; + } + + public void setInventorySearchBySubType(String inventorySearchBySubType) { + this.inventorySearchBySubType = inventorySearchBySubType; + } + + public String getInventorySearchBySubTypeDescription() { + return inventorySearchBySubTypeDescription; + } + + public void setInventorySearchBySubTypeDescription(String inventorySearchBySubTypeDescription) { + this.inventorySearchBySubTypeDescription = inventorySearchBySubTypeDescription; + } + + public String getInventorySearchByType() { + return inventorySearchByType; + } + + public void setInventorySearchByType(String inventorySearchByType) { + this.inventorySearchByType = inventorySearchByType; + } + + public String getProductSubType() { + return productSubType; + } + + public void setProductSubType(String productSubType) { + this.productSubType = productSubType; + } + public String getProductDescription() { + return productDescription; + } + + public void setProductDescription(String productDescription) { + this.productDescription = productDescription; + } + + public String getProductSubTypeDescription() { + return productSubTypeDescription; + } + + public void setProductSubTypeDescription(String productSubTypeDescription) { + this.productSubTypeDescription = productSubTypeDescription; + } + + public String getProductType() { + return productType; + } + + public void setProductType(String productType) { + this.productType = productType; + } + public String getInventorySearch() { + return inventorySearch; + } + + public void setInventorySearch(String inventorySearch) { + this.inventorySearch = inventorySearch; + } + + public String getProductCode() { + return productCode; + } + + public void setProductCode(String productCode) { + this.productCode = productCode; + } + + public String getProductCodeActivation() { + return productCodeActivation; + } + + public void setProductCodeActivation(String productCodeActivation) { + this.productCodeActivation = productCodeActivation; + } + + /*public String getProductCodeAmend() { + return productCodeAmend; + } + + public void setProductCodeAmend(String productCodeAmend) { + this.productCodeAmend = productCodeAmend; + } +*/ + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName; + } + + public String getProductNameAmend() { + return productNameAmend; + } + + public void setProductNameAmend(String productNameAmend) { + this.productNameAmend = productNameAmend; + } + + public String getProduct_id() { + return product_id; + } + + public void setProduct_id(String product_id) { + this.product_id = product_id; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getStatusAmend() { + return statusAmend; + } + + public void setStatusAmend(String statusAmend) { + this.statusAmend = statusAmend; + } + + public String getUnit() { + return unit; + } + + public void setUnit(String unit) { + this.unit = unit; + } + + public String getUnitAmend() { + return unitAmend; + } + + public void setUnitAmend(String unitAmend) { + this.unitAmend = unitAmend; + } + + /** + * @return the profitFactorAmend + */ + public String getProfitFactorAmend() { + return profitFactorAmend; + } + + /** + * @param profitFactorAmend the profitFactorAmend to set + */ + public void setProfitFactorAmend(String profitFactorAmend) { + this.profitFactorAmend = profitFactorAmend; + } + + public String getProfitFactor() { + return profitFactor; + } + + public void setProfitFactor(String profitFactor) { + this.profitFactor = profitFactor; + } + + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/pdsSalesRegisterDetailsBean.java b/IPKS_Updated/src/src/java/DataEntryBean/pdsSalesRegisterDetailsBean.java new file mode 100644 index 0000000..431553c --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/pdsSalesRegisterDetailsBean.java @@ -0,0 +1,106 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 1320035 + */ +public class pdsSalesRegisterDetailsBean { + private String saleRefNo; + private String name; + private String cardNo; + private String productType; + private String productSubType; + private String quantity; + private String unitSalePrice; + private String stockId; + private String saleDate; + private String total; + + public String getSaleRefNo() { + return saleRefNo; + } + + public void setSaleRefNo(String saleRefNo) { + this.saleRefNo = saleRefNo; + } + + + public String getCardNo() { + return cardNo; + } + + public void setCardNo(String cardNo) { + this.cardNo = cardNo; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getProductSubType() { + return productSubType; + } + + public void setProductSubType(String productSubType) { + this.productSubType = productSubType; + } + + public String getProductType() { + return productType; + } + + public void setProductType(String productType) { + this.productType = productType; + } + + public String getQuantity() { + return quantity; + } + + public void setQuantity(String quantity) { + this.quantity = quantity; + } + + public String getSaleDate() { + return saleDate; + } + + public void setSaleDate(String saleDate) { + this.saleDate = saleDate; + } + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getTotal() { + return total; + } + + public void setTotal(String total) { + this.total = total; + } + + public String getUnitSalePrice() { + return unitSalePrice; + } + + public void setUnitSalePrice(String unitSalePrice) { + this.unitSalePrice = unitSalePrice; + } + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/pdsSalesRegisterHeaderBean.java b/IPKS_Updated/src/src/java/DataEntryBean/pdsSalesRegisterHeaderBean.java new file mode 100644 index 0000000..6a327ee --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/pdsSalesRegisterHeaderBean.java @@ -0,0 +1,87 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 1320035 + */ +public class pdsSalesRegisterHeaderBean { + private String toDate; + private String fromDate; + private String productTypeSearch; + private String productSubTypeSearch; +private String productIdSearch; +private String custNameSearch; +private String cardNoSearch; +private String cardNoPk; + + public String getCardNoPk() { + return cardNoPk; + } + + public void setCardNoPk(String cardNoPk) { + this.cardNoPk = cardNoPk; + } + + public String getCardNoSearch() { + return cardNoSearch; + } + + public void setCardNoSearch(String cardNoSearch) { + this.cardNoSearch = cardNoSearch; + } + + public String getCustNameSearch() { + return custNameSearch; + } + + public void setCustNameSearch(String custNameSearch) { + this.custNameSearch = custNameSearch; + } + + public String getFromDate() { + return fromDate; + } + + public void setFromDate(String fromDate) { + this.fromDate = fromDate; + } + + public String getProductIdSearch() { + return productIdSearch; + } + + public void setProductIdSearch(String productIdSearch) { + this.productIdSearch = productIdSearch; + } + + public String getProductSubTypeSearch() { + return productSubTypeSearch; + } + + public void setProductSubTypeSearch(String productSubTypeSearch) { + this.productSubTypeSearch = productSubTypeSearch; + } + + public String getProductTypeSearch() { + return productTypeSearch; + } + + public void setProductTypeSearch(String productTypeSearch) { + this.productTypeSearch = productTypeSearch; + } + + public String getToDate() { + return toDate; + } + + public void setToDate(String toDate) { + this.toDate = toDate; + } + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/pdsStockRegisterBean.java b/IPKS_Updated/src/src/java/DataEntryBean/pdsStockRegisterBean.java new file mode 100644 index 0000000..aa00746 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/pdsStockRegisterBean.java @@ -0,0 +1,205 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author 590685 + */ +public class pdsStockRegisterBean { + + private String productName; + private String productDetails; + private String productType; + private String productSubType; + private String productDescription; + private String productSubTypeDescription; + private String productId; + private String productIdSearch; + private String price; + private String unit; + private String quantity; + private String total; + private String purchaseDate; + private String perishableFlag; + private String stockExpiryDate; + private String stockEntryDate; + private String toDate; + private String fromDate; + private String quantityAvailable; + private String quantityAbled; + private String stockId; + + public String getProductIdSearch() { + return productIdSearch; + } + + public void setProductIdSearch(String productIdSearch) { + this.productIdSearch = productIdSearch; + } + + + public String getProductDescription() { + return productDescription; + } + + public void setProductDescription(String productDescription) { + this.productDescription = productDescription; + } + + public String getProductSubTypeDescription() { + return productSubTypeDescription; + } + + public void setProductSubTypeDescription(String productSubTypeDescription) { + this.productSubTypeDescription = productSubTypeDescription; + } + + + public String getStockEntryDate() { + return stockEntryDate; + } + + public void setStockEntryDate(String stockEntryDate) { + this.stockEntryDate = stockEntryDate; + } + + + public String getProductSubType() { + return productSubType; + } + + public void setProductSubType(String productSubType) { + this.productSubType = productSubType; + } + + public String getProductType() { + return productType; + } + + public void setProductType(String productType) { + this.productType = productType; + } + + public String getPerishableFlag() { + return perishableFlag; + } + + public void setPerishableFlag(String perishableFlag) { + this.perishableFlag = perishableFlag; + } + + public String getProductDetails() { + return productDetails; + } + + public void setProductDetails(String productDetails) { + this.productDetails = productDetails; + } + + public String getStockExpiryDate() { + return stockExpiryDate; + } + + public void setStockExpiryDate(String stockExpiryDate) { + this.stockExpiryDate = stockExpiryDate; + } + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getQuantityAvailable() { + return quantityAvailable; + } + + public void setQuantityAvailable(String quantityAvailable) { + this.quantityAvailable = quantityAvailable; + } + + public String getQuantityAbled() { + return quantityAbled; + } + + public void setQuantityAbled(String quantityAbled) { + this.quantityAbled = quantityAbled; + } + + public String getFromDate() { + return fromDate; + } + + public void setFromDate(String fromDate) { + this.fromDate = fromDate; + } + + public String getToDate() { + return toDate; + } + + public void setToDate(String toDate) { + this.toDate = toDate; + } + + public String getPrice() { + return price; + } + + public void setPrice(String price) { + this.price = price; + } + + public String getProductId() { + return productId; + } + + public void setProductId(String productId) { + this.productId = productId; + } + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName; + } + + public String getPurchaseDate() { + return purchaseDate; + } + + public void setPurchaseDate(String purchaseDate) { + this.purchaseDate = purchaseDate; + } + + public String getQuantity() { + return quantity; + } + + public void setQuantity(String quantity) { + this.quantity = quantity; + } + + public String getTotal() { + return total; + } + + public void setTotal(String total) { + this.total = total; + } + + public String getUnit() { + return unit; + } + + public void setUnit(String unit) { + this.unit = unit; + } +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/raiseRequisitionBean.java b/IPKS_Updated/src/src/java/DataEntryBean/raiseRequisitionBean.java new file mode 100644 index 0000000..7873e38 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/raiseRequisitionBean.java @@ -0,0 +1,96 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 590685 + */ +public class raiseRequisitionBean { + + private String product; + private String quantity; + private String price; + private String linetotal; + private String product_id; + private String stock_quantity; + private String stock_id; + private String requisitionId; + + public String getRequisitionId() { + return requisitionId; + } + + public void setRequisitionId(String requisitionId) { + this.requisitionId = requisitionId; + } + + public String getStock_quantity() { + return stock_quantity; + } + + public void setStock_quantity(String stock_quantity) { + this.stock_quantity = stock_quantity; + } + + public String getStock_id() { + return stock_id; + } + + public void setStock_id(String stock_id) { + this.stock_id = stock_id; + } + + + public String getLinetotal() { + return linetotal; + } + + public void setLinetotal(String linetotal) { + this.linetotal = linetotal; + } + + public String getPrice() { + return price; + } + + public void setPrice(String price) { + this.price = price; + } + + public String getProduct() { + return product; + } + + public void setProduct(String product) { + this.product = product; + } + + public String getQuantity() { + return quantity; + } + + public void setQuantity(String quantity) { + this.quantity = quantity; + } + + /** + * @return the product_id + */ + public String getProduct_id() { + return product_id; + } + + /** + * @param product_id the product_id to set + */ + public void setProduct_id(String product_id) { + this.product_id = product_id; + } + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/tradingFinancialYearAdjustmentBean.java b/IPKS_Updated/src/src/java/DataEntryBean/tradingFinancialYearAdjustmentBean.java new file mode 100644 index 0000000..241c81c --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/tradingFinancialYearAdjustmentBean.java @@ -0,0 +1,104 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package DataEntryBean; + +/** + * + * @author 981898 + */ +public class tradingFinancialYearAdjustmentBean { + private String accType; + private String accNo; + private String txnAmt; + private String txnInd; + private String txnStatus; + private String txnRefNo; + private String narration; + private String loan_ac_no; + private String sec_acc_no; + private String txn_date; + + public String getSec_acc_no() { + return sec_acc_no; + } + + public void setSec_acc_no(String sec_acc_no) { + this.sec_acc_no = sec_acc_no; + } + + public String getTxn_date() { + return txn_date; + } + + public void setTxn_date(String txn_date) { + this.txn_date = txn_date; + } + + public String getLoan_ac_no() { + return loan_ac_no; + } + + public void setLoan_ac_no(String loan_ac_no) { + this.loan_ac_no = loan_ac_no; + } + + public String getNarration() { + return narration; + } + + public void setNarration(String narration) { + this.narration = narration; + } + + public String getTxnRefNo() { + return txnRefNo; + } + + public void setTxnRefNo(String txnRefNo) { + this.txnRefNo = txnRefNo; + } + + public String getTxnStatus() { + return txnStatus; + } + + public void setTxnStatus(String txnStatus) { + this.txnStatus = txnStatus; + } + + public String getAccNo() { + return accNo; + } + + public void setAccNo(String accNo) { + this.accNo = accNo; + } + + public String getAccType() { + return accType; + } + + public void setAccType(String accType) { + this.accType = accType; + } + + public String getTxnAmt() { + return txnAmt; + } + + public void setTxnAmt(String txnAmt) { + this.txnAmt = txnAmt; + } + + public String getTxnInd() { + return txnInd; + } + + public void setTxnInd(String txnInd) { + this.txnInd = txnInd; + } + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/tradingProductCreationBean.java b/IPKS_Updated/src/src/java/DataEntryBean/tradingProductCreationBean.java new file mode 100644 index 0000000..0b8a859 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/tradingProductCreationBean.java @@ -0,0 +1,419 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author 590685 + */ +public class tradingProductCreationBean { + + //Create + private String commoditytype; + private String typeDesc; + private String commoditysubtype; + private String subtypeDesc; + private String unit; + private String product_id; + private String status; + private String lease; + private String pricePerUnit; + private String priceFreq; + private String minDays; + private String maxDays; + private String landArea; + private String cgst; + private String sgst; + private String pacsId; + private String purchaseGL; + private String saleGL; + private String closeGL; + private String tradeGL; + private String purchaseID; + private String saleID; + private String closeID; + private String tradeID; + private String purchaseIDAmend; + private String saleIDAmend; + private String closeIDAmend; + private String tradeIDAmend; + + + public String getPurchaseIDAmend() { + return purchaseIDAmend; + } + + public void setPurchaseIDAmend(String purchaseIDAmend) { + this.purchaseIDAmend = purchaseIDAmend; + } + + public String getSaleIDAmend() { + return saleIDAmend; + } + + public void setSaleIDAmend(String saleIDAmend) { + this.saleIDAmend = saleIDAmend; + } + + public String getCloseIDAmend() { + return closeIDAmend; + } + + public void setCloseIDAmend(String closeIDAmend) { + this.closeIDAmend = closeIDAmend; + } + + public String getTradeIDAmend() { + return tradeIDAmend; + } + + public void setTradeIDAmend(String tradeIDAmend) { + this.tradeIDAmend = tradeIDAmend; + } + + public String getPurchaseID() { + return purchaseID; + } + + public void setPurchaseID(String purchaseID) { + this.purchaseID = purchaseID; + } + + public String getSaleID() { + return saleID; + } + + public void setSaleID(String saleID) { + this.saleID = saleID; + } + + public String getCloseID() { + return closeID; + } + + public void setCloseID(String closeID) { + this.closeID = closeID; + } + + public String getTradeID() { + return tradeID; + } + + public void setTradeID(String tradeID) { + this.tradeID = tradeID; + } + + public String getPacsId() { + return pacsId; + } + + public void setPacsId(String pacsId) { + this.pacsId = pacsId; + } + + //Update + private String commoditytypeAmend; + private String typeDescAmend; + private String commoditysubtypeAmend; + private String subtypeDescAmend; + private String unitAmend; + private String statusAmend; + private String leaseAmend; + private String pricePerUnitAmend; + private String priceFreqAmend; + private String minDaysAmend; + private String maxDaysAmend; + private String landAreaAmend; + private String cgstAmend; + private String sgstAmend; + + //Search + + private String commoditytypeSearch; + private String commoditySubtypeSearch; + + public String getPurchaseGL() { + return purchaseGL; + } + + public void setPurchaseGL(String purchaseGL) { + this.purchaseGL = purchaseGL; + } + + public String getSaleGL() { + return saleGL; + } + + public void setSaleGL(String saleGL) { + this.saleGL = saleGL; + } + + public String getCloseGL() { + return closeGL; + } + + public void setCloseGL(String closeGL) { + this.closeGL = closeGL; + } + + public String getTradeGL() { + return tradeGL; + } + + public void setTradeGL(String tradeGL) { + this.tradeGL = tradeGL; + } + + public String getCgst() { + return cgst; + } + + public void setCgst(String cgst) { + this.cgst = cgst; + } + + public String getCgstAmend() { + return cgstAmend; + } + + public void setCgstAmend(String cgstAmend) { + this.cgstAmend = cgstAmend; + } + + public String getSgst() { + return sgst; + } + + public void setSgst(String sgst) { + this.sgst = sgst; + } + + public String getSgstAmend() { + return sgstAmend; + } + + public void setSgstAmend(String sgstAmend) { + this.sgstAmend = sgstAmend; + } + + public String getLandAreaAmend() { + return landAreaAmend; + } + + public void setLandAreaAmend(String landAreaAmend) { + this.landAreaAmend = landAreaAmend; + } + + public String getLandArea() { + return landArea; + } + + public void setLandArea(String landArea) { + this.landArea = landArea; + } + + public String getLeaseAmend() { + return leaseAmend; + } + + public void setLeaseAmend(String leaseAmend) { + this.leaseAmend = leaseAmend; + } + + public String getMaxDaysAmend() { + return maxDaysAmend; + } + + public void setMaxDaysAmend(String maxDaysAmend) { + this.maxDaysAmend = maxDaysAmend; + } + + public String getMinDaysAmend() { + return minDaysAmend; + } + + public void setMinDaysAmend(String minDaysAmend) { + this.minDaysAmend = minDaysAmend; + } + + public String getPriceFreqAmend() { + return priceFreqAmend; + } + + public void setPriceFreqAmend(String priceFreqAmend) { + this.priceFreqAmend = priceFreqAmend; + } + + public String getPricePerUnitAmend() { + return pricePerUnitAmend; + } + + public void setPricePerUnitAmend(String pricePerUnitAmend) { + this.pricePerUnitAmend = pricePerUnitAmend; + } + + public String getMaxDays() { + return maxDays; + } + + public void setMaxDays(String maxDays) { + this.maxDays = maxDays; + } + + public String getMinDays() { + return minDays; + } + + public void setMinDays(String minDays) { + this.minDays = minDays; + } + + public String getPriceFreq() { + return priceFreq; + } + + public void setPriceFreq(String priceFreq) { + this.priceFreq = priceFreq; + } + + public String getPricePerUnit() { + return pricePerUnit; + } + + public void setPricePerUnit(String pricePerUnit) { + this.pricePerUnit = pricePerUnit; + } + + public String getLease() { + return lease; + } + + public void setLease(String lease) { + this.lease = lease; + } + + public String getCommoditySubtypeSearch() { + return commoditySubtypeSearch; + } + + public void setCommoditySubtypeSearch(String commoditySubtypeSearch) { + this.commoditySubtypeSearch = commoditySubtypeSearch; + } + + public String getCommoditysubtype() { + return commoditysubtype; + } + + public void setCommoditysubtype(String commoditysubtype) { + this.commoditysubtype = commoditysubtype; + } + + public String getCommoditysubtypeAmend() { + return commoditysubtypeAmend; + } + + public void setCommoditysubtypeAmend(String commoditysubtypeAmend) { + this.commoditysubtypeAmend = commoditysubtypeAmend; + } + + public String getCommoditytype() { + return commoditytype; + } + + public void setCommoditytype(String commoditytype) { + this.commoditytype = commoditytype; + } + + public String getCommoditytypeAmend() { + return commoditytypeAmend; + } + + public void setCommoditytypeAmend(String commoditytypeAmend) { + this.commoditytypeAmend = commoditytypeAmend; + } + + public String getCommoditytypeSearch() { + return commoditytypeSearch; + } + + public void setCommoditytypeSearch(String commoditytypeSearch) { + this.commoditytypeSearch = commoditytypeSearch; + } + + public String getProduct_id() { + return product_id; + } + + public void setProduct_id(String product_id) { + this.product_id = product_id; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getStatusAmend() { + return statusAmend; + } + + public void setStatusAmend(String statusAmend) { + this.statusAmend = statusAmend; + } + + public String getSubtypeDesc() { + return subtypeDesc; + } + + public void setSubtypeDesc(String subtypeDesc) { + this.subtypeDesc = subtypeDesc; + } + + public String getSubtypeDescAmend() { + return subtypeDescAmend; + } + + public void setSubtypeDescAmend(String subtypeDescAmend) { + this.subtypeDescAmend = subtypeDescAmend; + } + + public String getTypeDesc() { + return typeDesc; + } + + public void setTypeDesc(String typeDesc) { + this.typeDesc = typeDesc; + } + + public String getTypeDescAmend() { + return typeDescAmend; + } + + public void setTypeDescAmend(String typeDescAmend) { + this.typeDescAmend = typeDescAmend; + } + + public String getUnit() { + return unit; + } + + public void setUnit(String unit) { + this.unit = unit; + } + + public String getUnitAmend() { + return unitAmend; + } + + public void setUnitAmend(String unitAmend) { + this.unitAmend = unitAmend; + } + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/tradingPurchaseOrderBean.java b/IPKS_Updated/src/src/java/DataEntryBean/tradingPurchaseOrderBean.java new file mode 100644 index 0000000..e958a60 --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/tradingPurchaseOrderBean.java @@ -0,0 +1,152 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Help desk122 + */ +public class tradingPurchaseOrderBean { + + private String purchaseref; + private String purchasedesc; + + private String purchase_id; + private String product_id; + private String vendor_id; + private String unit; + + + public String getCommoditysubtype() { + return commoditysubtype; + } + + public void setCommoditysubtype(String commoditysubtype) { + this.commoditysubtype = commoditysubtype; + } + public String getCommoditytype() { + return commoditytype; + } + + public void setCommoditytype(String commoditytype) { + this.commoditytype = commoditytype; + } + + public String getSubtypedesc() { + return subtypedesc; + } + + public void setSubtypedesc(String subtypedesc) { + this.subtypedesc = subtypedesc; + } + + public String getTypedesc() { + return typedesc; + } + + public void setTypedesc(String typedesc) { + this.typedesc = typedesc; + } + private String unit_price; + private String total; + private String checkOption; + private String credisp; + private String commoditytype; + private String typedesc; + private String commoditysubtype; + private String subtypedesc; + + + public String getPurchasedesc() { + return purchasedesc; + } + + public void setPurchasedesc(String purchasedesc) { + this.purchasedesc = purchasedesc; + } + + public String getCredisp() { + return credisp; + } + + public void setCredisp(String credisp) { + this.credisp = credisp; + } + + + + public String getCheckOption() { + return checkOption; + } + + public void setCheckOption(String checkOption) { + this.checkOption = checkOption; + } + + + + public String getProduct_id() { + return product_id; + } + + public void setProduct_id(String product_id) { + this.product_id = product_id; + } + + public String getPurchase_id() { + return purchase_id; + } + + public void setPurchase_id(String purchase_id) { + this.purchase_id = purchase_id; + } + + public String getPurchaseref() { + return purchaseref; + } + + public void setPurchaseref(String purchaseref) { + this.purchaseref = purchaseref; + } + + public String getTotal() { + return total; + } + + public void setTotal(String total) { + this.total = total; + } + + public String getUnit() { + return unit; + } + + public void setUnit(String unit) { + this.unit = unit; + } + + public String getUnit_price() { + return unit_price; + } + + public void setUnit_price(String unit_price) { + this.unit_price = unit_price; + } + + public String getVendor_id() { + return vendor_id; + } + + public void setVendor_id(String vendor_id) { + this.vendor_id = vendor_id; + } + + + + + + +} diff --git a/IPKS_Updated/src/src/java/DataEntryBean/transactionOperationBean.java b/IPKS_Updated/src/src/java/DataEntryBean/transactionOperationBean.java new file mode 100644 index 0000000..61bcf9f --- /dev/null +++ b/IPKS_Updated/src/src/java/DataEntryBean/transactionOperationBean.java @@ -0,0 +1,139 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package DataEntryBean; + +/** + * + * @author Tcs Helpdesk10 + */ +public class transactionOperationBean { + + //For transaction Div + private String tranType; + private String accNo; + private String trAmount; + private String narration; + private String chargeToDeduct; + private String transferAcc; + private String intAdjAmt; + private String tranMode; + private String payMode; + private String member_id; + private String member_name; + + public String getMember_id() { + return member_id; + } + + public void setMember_id(String member_id) { + this.member_id = member_id; + } + + public String getMember_name() { + return member_name; + } + + public void setMember_name(String member_name) { + this.member_name = member_name; + } + + + + public String getPayMode() { + return payMode; + } + + public void setPayMode(String payMode) { + this.payMode = payMode; + } + + public String getTranMode() { + return tranMode; + } + + public void setTranMode(String tranMode) { + this.tranMode = tranMode; + } + + public String getIntAdjAmt() { + return intAdjAmt; + } + + public void setIntAdjAmt(String intAdjAmt) { + this.intAdjAmt = intAdjAmt; + } + + public String getTransferAcc() { + return transferAcc; + } + + public void setTransferAcc(String transferAcc) { + this.transferAcc = transferAcc; + } + + + + public String getChargeToDeduct() { + return chargeToDeduct; + } + + public void setChargeToDeduct(String chargeToDeduct) { + this.chargeToDeduct = chargeToDeduct; + } + + + public String getNarration() { + return narration; + } + + public void setNarration(String narration) { + this.narration = narration; + } + + + + /** + * @return the tranType + */ + public String getTranType() { + return tranType; + } + + /** + * @param tranType the tranType to set + */ + public void setTranType(String tranType) { + this.tranType = tranType; + } + + /** + * @return the accNo + */ + public String getAccNo() { + return accNo; + } + + /** + * @param accNo the accNo to set + */ + public void setAccNo(String accNo) { + this.accNo = accNo; + } + + /** + * @return the trAmount + */ + public String getTrAmount() { + return trAmount; + } + + /** + * @param trAmount the trAmount to set + */ + public void setTrAmount(String trAmount) { + this.trAmount = trAmount; + } +} diff --git a/IPKS_Updated/src/src/java/ExcelReportController/ExcelReport.java b/IPKS_Updated/src/src/java/ExcelReportController/ExcelReport.java new file mode 100644 index 0000000..975ae99 --- /dev/null +++ b/IPKS_Updated/src/src/java/ExcelReportController/ExcelReport.java @@ -0,0 +1,147 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package ExcelReportController; + +/** + * + * @author Tcs Helpdesk10 + */ +import LoginDb.DbHandler; +import java.io.*; +import java.math.BigDecimal; +import jxl.WorkbookSettings; +import java.util.*; +import jxl.Workbook; +import jxl.write.DateFormat; +import jxl.write.Number; +import java.sql.*; +import java.util.zip.*; +import jxl.write.*; +import java.text.DecimalFormat; +import java.text.SimpleDateFormat; +import jxl.CellView; +import jxl.format.Colour; +import jxl.format.Border; +import jxl.format.CellFormat; + +class ExcelReport { + + WorkbookSettings ws = null; + WritableSheet s = null; + + //String query=null; + public ExcelReport() { + this.ws = new WorkbookSettings(); + ws.setLocale(new Locale("en", "EN")); + } + + public WorkbookSettings getWorkBookSetting() { + return ws; + } + + public void writeDataSheet(WritableSheet s, ArrayList heading, String query) { + + Statement stmt = null; + Connection conn = null; + ResultSet results = null; + + DecimalFormat Currency = new DecimalFormat("0.00"); + try { + + conn = DbHandler.getDBConnection(); + stmt = conn.createStatement(); + + // This is for testing purpose to check the query + //System.out.println(query); + results = stmt.executeQuery(query); + + int rowPos = 0; + int colPos; + WritableFont wf; + WritableCellFormat cf; + + // This is for Heading + wf = new WritableFont(WritableFont.ARIAL, 12, WritableFont.BOLD); + cf = new WritableCellFormat(wf); + cf.setWrap(false); + cf.setBackground(jxl.format.Colour.LIGHT_GREEN); + cf.setBorder(Border.ALL, jxl.format.BorderLineStyle.THIN); + CellView cv = new CellView(); + cv.setAutosize(true); + + colPos = -1; + Iterator itrHeading = heading.iterator(); + while (itrHeading.hasNext()) { + colPos++; + Heading oHeading = (Heading) itrHeading.next(); + String sHeading = oHeading.getName(); + + s.addCell(new Label(colPos, rowPos, sHeading, cf)); + s.setColumnView(colPos, cv); + + + } + + // This is for Results + //Reset Fonts for results section + wf = new WritableFont(WritableFont.ARIAL, 11, WritableFont.NO_BOLD); + + //Looping For results + while (results.next()) { + rowPos++; + colPos = -1; + Iterator itrHeading1 = heading.iterator(); + while (itrHeading1.hasNext()) { + colPos++; + Heading oHeading1 = (Heading) itrHeading1.next(); + String sHeading1 = oHeading1.getName(); + int sType = oHeading1.getType(); + if (sType == 1) { + cf = new WritableCellFormat(wf); + cf.setWrap(false); + cf.setBorder(Border.ALL, jxl.format.BorderLineStyle.THIN); + cv.setAutosize(true); + + s.addCell(new Label(colPos, rowPos, results.getString(sHeading1), cf)); + + s.setColumnView(colPos, cv); + + } else if (sType == 2) { + cf = new WritableCellFormat(wf, NumberFormats.FLOAT); + cf.setWrap(false); + cf.setBorder(Border.ALL, jxl.format.BorderLineStyle.THIN); + cv.setAutosize(true); + s.addCell(new Number(colPos, rowPos, results.getBigDecimal(sHeading1).floatValue(), cf)); + + s.setColumnView(colPos, cv); + + } + } + } + + } catch (Exception ex) { + // ex.printStackTrace(); + System.out.println("Error Occurred during processing."); + } finally { + try { + + if (stmt != null) { + stmt.close(); + } + if (results != null) { + results.close(); + } + if (conn != null) { + conn.close(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + } + +} diff --git a/IPKS_Updated/src/src/java/ExcelReportController/ExcelReportInformation.java b/IPKS_Updated/src/src/java/ExcelReportController/ExcelReportInformation.java new file mode 100644 index 0000000..497087f --- /dev/null +++ b/IPKS_Updated/src/src/java/ExcelReportController/ExcelReportInformation.java @@ -0,0 +1,814 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package ExcelReportController; + +import DataEntryBean.ExcelReportBean; +import java.util.ArrayList; + +/** + * + * @author Tcs Helpdesk10 + */ +public class ExcelReportInformation { + + private String reportName; + private String reportQuery; + private ArrayList reportHeader; + public int TYPE_STRING = 1; + public int TYPE_BIG_DECIMAL = 2; + + public ExcelReportInformation(String sReportName) { + + this.reportName = sReportName; + } + +// Here provide the required query for the Report + public String getReportQuery() { + + StringBuffer queryBuffer = new StringBuffer(); + if (reportName.equalsIgnoreCase("BULK_TRANSACTION_REPORT")) { + + queryBuffer.append(" select rownum as SL_NO, d.dccb_name as DCCB_NAME, d.sb_acc_no as SAVINGS_ACCOUNT_NO,d.cif_no as CIF_NO,d.prod_code as PRODUCT_CODE,d.intt_cat as INTEREST_CATEGORY, \n"); + // queryBuffer.append(" (p.first_name||nvl2(p.middle_name,' '||p.middle_name,'')||nvl2(p.last_name,' '||p.last_name,'')) as CUSTOMER_NAME,\n"); + queryBuffer.append(" to_char(d.txn_post_date, 'DD-MON-YYYY') as TRANSACTION_POSTING_DATE,\n"); + queryBuffer.append(" d.jrnl_no as JOURNAL_NO,\n"); + queryBuffer.append(" (case d.txn_ind\n" + + " when 'DR' then\n" + + " 'KCC-Disbursement'\n" + + " when 'CR' then\n" + + " 'KCC-Repayment'\n" + + " end) as TRANSACTION_TYPE,\n"); + queryBuffer.append(" d.txn_amt as TRANSACTION_AMOUNT,d.comments as COMMENTS \n"); + queryBuffer.append(" from bulk_txn_post d \n"); + + //queryBuffer.append(" where p.linked_sb_accno=d.sb_acc_no \n"); + //queryBuffer.append(" and a.customer_no=p.cif_no \n"); + // queryBuffer.append(" and a.link_accno=d.sb_acc_no \n"); + queryBuffer.append(" where d.post_flag='Y' \n"); + + reportQuery = queryBuffer.toString(); + + } else if (reportName.equalsIgnoreCase("EOD_INTT_COMPUTATION_REPORT")) { + + queryBuffer.append(" select rownum as SL_NO ,e.activity as ACTIVITY,a.pacs_id as PACS_ID, e.account_no as ACCOUNT_NO,e.errordesc as REMARKS,e.sys_date as TRANSACTION_DATE \n"); + queryBuffer.append(" from eod_log e, dep_account a \n"); + queryBuffer.append(" where a.key_1=e.account_no \n"); + + reportQuery = queryBuffer.toString(); + + } else if (reportName.equalsIgnoreCase("BULK_KYC_REPORT")) { + + queryBuffer.append(" select rownum as SL_NO, t.bank_name as BANK_NAME,t.cbs_br_code as CBS_BR_CODE, t.cif_no as CIF_NO, \n"); + queryBuffer.append(" t.customer_type as CUSTOMER_TYPE,t.linked_sb_accno as LINKED_SB_ACCNO,t.title as TITLE, \n"); + queryBuffer.append(" t.first_name as FIRST_NAME,t.middle_name as MIDDLE_NAME,t.last_name as LAST_NAME, t.guardian_name as GUARDIAN_NAME, \n"); + queryBuffer.append(" t.address_1 as ADDRESS_1,t.address_2 as ADDRESS_2,t.address_3 as ADDRESS_3, \n"); + queryBuffer.append(" t.district as DISTRICT,t.city as CITY,t.state as STATE,t.birth_date as BIRTH_DATE, \n"); + queryBuffer.append(" t.gender as GENDER,t.mobile_no as MOBILE_NO,t.id_type as ID_TYPE, \n"); + queryBuffer.append(" t.id_no as ID_NO,t.id_issue_date as ID_ISSUE_DATE,t.id_issued_at as ID_ISSUED_AT,t.post_date as POST_DATE,t.comments as COMMENTS \n"); + queryBuffer.append(" from bulk_kyc t \n"); + + reportQuery = queryBuffer.toString(); + + } + + return reportQuery; + } + + public String getReportQuery(ExcelReportBean Bean, String pacsId, String subPacsFlag) { + + StringBuffer queryBuffer = new StringBuffer(); + String accountNo = ""; + String product = ""; + String fromDate = ""; + String toDate = ""; + String fromAmount = ""; + String toAmount = ""; + String linkedSbAccount = ""; + String loanRepYYYYMM = ""; + String cifNumber = ""; + String tranRefSearch = ""; + String srchByCIF = ""; + String subpacs_id = ""; + String enqTypeSearch = ""; + String oldAccNo = ""; + String oldCifNo = ""; + String modOfAcc = ""; + String productID; + + accountNo = (Bean.getAccountNo() == null) ? "" : Bean.getAccountNo(); + product = (Bean.getProductName() == null) ? "" : Bean.getProductName(); + fromDate = (Bean.getFromDate() == null) ? "" : Bean.getFromDate(); + toDate = (Bean.getToDate() == null) ? "" : Bean.getToDate(); + fromAmount = (Bean.getFromAmount() == null) ? "" : Bean.getFromAmount(); + toAmount = (Bean.getToAmount() == null) ? "" : Bean.getToAmount(); + linkedSbAccount = (Bean.getLinkedSbAccount() == null) ? "" : Bean.getLinkedSbAccount(); + loanRepYYYYMM = (Bean.getLoanRepYYYYMM() == null) ? "" : Bean.getLoanRepYYYYMM(); + cifNumber = (Bean.getCifNumber() == null) ? "" : Bean.getCifNumber(); + tranRefSearch = (Bean.getTranRefSearch() == null) ? "" : Bean.getTranRefSearch(); + srchByCIF = (Bean.getSrchByCIF() == null) ? "" : Bean.getSrchByCIF(); + subpacs_id = (Bean.getSubpacs_id() == null) ? "" : Bean.getSubpacs_id(); + enqTypeSearch = (Bean.getEnqTypeSearch() == null) ? "" : Bean.getEnqTypeSearch(); + oldAccNo = (Bean.getOldAccNo() == null) ? "" : Bean.getOldAccNo(); + oldCifNo = (Bean.getOldCifNo() == null) ? "" : Bean.getOldCifNo(); + productID = (Bean.getProductID() == null) ? "" : Bean.getProductID(); + modOfAcc = (Bean.getModOfAcc() == null ) ? "" : Bean.getModOfAcc(); + + if (reportName.equalsIgnoreCase("ACCOUNT_ENQUIRY_REPORT")) { + + queryBuffer.append(" select rownum as SL_NO, KEY_1 as ACCOUNT_NO, to_char(ACCT_OPEN_DT,'DD-MON-YYYY') as ACCT_OPEN_DT,a.link_accno as LINKED_CBS_ACCOUNT_NO, AVAIL_BAL, \n"); + queryBuffer.append(" a.CUSTOMER_NO as CUSTOMER_NO,a.SANCTION_AMT as SANCTION_AMT ,decode(a.CURR_STATUS,'C','Closed','D','Dormant','S','Stopped','I','Initiated','M','Matured','Open/Active') as CURR_STATUS ,a.PRIN_OUTST as PRIN_OUTST ,a.INTT_OUTST as INTT_OUTST,a.PENAL_INTT_PAID as PENAL_INTT_PAID, \n"); + queryBuffer.append(" (t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) as CUST_NAME, \n"); + queryBuffer.append(" p.prod_name as PRODUCT_NAME,to_char(a.limit_exp_date,'DD-MON-YYYY') as LIMIT_EXPIRY_DATE,a.PRIN_PAID as PRINCIPAL_PAID,a.INTT_PAID as INTEREST_PAID,a.PENAL_INTT_OUTST as PENAL_INTT_OUTSTANDING,a.OLD_ACCNO as OLD_ACCOUNT_NUMBER,a.OLD_CIF as OLD_CIF_NUMBER \n"); + queryBuffer.append(" from dep_product p,dep_account a, kyc_details t \n"); + queryBuffer.append(" where a.dep_prod_id=p.id and t.cif_no =a.customer_no and to_number(substr(p.prod_code, 1, 1)) > 5 and a.pacs_id='" + pacsId + "' \n"); + + if (!accountNo.equalsIgnoreCase("")) { + queryBuffer.append(" and a.key_1='" + Bean.getAccountNo() + "' \n"); + } + + if ((!fromDate.equalsIgnoreCase("")) && (!toDate.equalsIgnoreCase(""))) { + + queryBuffer.append(" and a.ACCT_OPEN_DT between to_date ('" + Bean.getFromDate() + "','dd/mm/yyyy') \n"); + queryBuffer.append(" and to_date ('" + Bean.getToDate() + "','dd/mm/yyyy') \n"); + } + + if (!product.equalsIgnoreCase("")) { + queryBuffer.append(" and dep_prod_id='" + Bean.getProductName() + "' \n"); + } + + if ((!fromAmount.equalsIgnoreCase("")) && (!toAmount.equalsIgnoreCase(""))) { + queryBuffer.append(" and a.AVAIL_BAL between='" + Bean.getFromAmount() + "' \n"); + queryBuffer.append(" and '" + Bean.getToAmount() + "' \n"); + } + + if (!linkedSbAccount.equalsIgnoreCase("")) { + queryBuffer.append(" and link_accno='" + Bean.getLinkedSbAccount() + "' \n"); + } + + reportQuery = queryBuffer.toString(); + + } else if (reportName.equalsIgnoreCase("TRANSACTION_ENQUIRY_REPORT")) { + + queryBuffer.append(" select rownum as SL_NO, a.key_1 as ACCOUNT_NO,a.link_accno as LINKED_CBS_ACCOUNT_NO,d.cbs_ref_no as CBS_REF_NO,to_char(d.tran_date,'DD-MON-YYYY') AS TRAN_DATE, \n"); + queryBuffer.append(" (case d.tran_ind\n" + + " when 'DR' then 'KCC-Disbursement'\n" + + " when 'CR' then 'KCC-Repayment'\n" + + " end) as TXN_TYPE,d.txn_amt as TXN_AMT,to_char(a.LIMIT_EXP_DATE,'dd-MON-yyyy') as LIMIT_EXPIRY_DATE,p.PROD_NAME as PRODUCT_NAME,d.END_BAL as END_BALANCE \n"); + + queryBuffer.append(" from dep_txn d,dep_account a, dep_product p \n"); + queryBuffer.append(" where d.acct_no=a.key_1\n" + + " and a.dep_prod_id=p.id and a.pacs_id='" + pacsId + "' \n"); + + if (!accountNo.equalsIgnoreCase("")) { + queryBuffer.append(" and a.key_1='" + Bean.getAccountNo() + "' \n"); + } + + if ((!fromDate.equalsIgnoreCase("")) && (!toDate.equalsIgnoreCase(""))) { + + queryBuffer.append(" and d.tran_date between to_date ('" + Bean.getFromDate() + "','dd/mm/yyyy') \n"); + queryBuffer.append(" and to_date ('" + Bean.getToDate() + "','dd/mm/yyyy') \n"); + } + + if (!product.equalsIgnoreCase("")) { + queryBuffer.append(" and a.dep_prod_id='" + Bean.getProductName() + "' \n"); + } + + if ((!fromAmount.equalsIgnoreCase("")) && (!toAmount.equalsIgnoreCase(""))) { + queryBuffer.append(" and d.txn_amt between='" + Bean.getFromAmount() + "' \n"); + queryBuffer.append(" and '" + Bean.getToAmount() + "' \n"); + } + + if (!linkedSbAccount.equalsIgnoreCase("")) { + queryBuffer.append(" and link_accno='" + Bean.getLinkedSbAccount() + "' \n"); + } + + reportQuery = queryBuffer.toString(); + + } else if (reportName.equalsIgnoreCase("GL_ACCOUNT_ENQUIRY_REPORT")) { + + queryBuffer.append(" select rownum as SL_NO, KEY_1 as GL_ACCOUNT_NO, LEDGER_NAME as LEDGER_NAME, to_char(acct_open_date,'DD-MON-YYYY') as GL_ACCT_OPEN_DT, cum_curr_val as CURRENT_BALANCE, \n"); + queryBuffer.append(" decode(a.status,'A','ACTIVE','INACTIVE') as STATUS, gl_code as GL_CODE, \n"); + queryBuffer.append(" gl_name as GL_NAME from GL_product p,GL_account a where a.GL_prod_id=p.id \n"); + + + if (subPacsFlag.equalsIgnoreCase("N")) { + + if (!subpacs_id.equalsIgnoreCase("")) { + + queryBuffer.append("and a.pacs_id= '" + subpacs_id + "' \n"); + + } else if (subpacs_id.equalsIgnoreCase("")) { + + queryBuffer.append("and a.pacs_id in (select pacs.pacs_id from pacs_master pacs where pacs.head_pacs_id='" + pacsId + "') \n"); + + } + + } else if (subPacsFlag.equalsIgnoreCase("Y")) { + + queryBuffer.append("and a.pacs_id= '" + pacsId + "' \n"); + + } + + + if (!accountNo.equalsIgnoreCase("")) { + queryBuffer.append(" and a.key_1='" + Bean.getAccountNo() + "' \n"); + } + + if ((!fromDate.equalsIgnoreCase("")) && (!toDate.equalsIgnoreCase(""))) { + + queryBuffer.append(" and a.ACCT_OPEN_DT between to_date ('" + Bean.getFromDate() + "','dd/mm/yyyy') \n"); + queryBuffer.append(" and to_date ('" + Bean.getToDate() + "','dd/mm/yyyy') \n"); + } + + if (!product.equalsIgnoreCase("")) { + queryBuffer.append(" and a.gl_prod_id='" + Bean.getProductName() + "' \n"); + } + + if ((!fromAmount.equalsIgnoreCase("")) && (!toAmount.equalsIgnoreCase(""))) { + queryBuffer.append(" and a.cum_curr_val between='" + Bean.getFromAmount() + "' \n"); + queryBuffer.append(" and '" + Bean.getToAmount() + "' \n"); + } + reportQuery = queryBuffer.toString(); + System.out.println(queryBuffer.toString()); + + } else if (reportName.equalsIgnoreCase("GL_TRANSACTION_ENQUIRY_REPORT")) { + + queryBuffer.append(" select rownum as SL_NO, a.key_1 as GL_ACCOUNT_NO,p.gl_name as GL_CODE,g.cbs_ref_no as CBS_REF_NO,to_char(g.tran_date,'DD-MON-YYYY') as TRAN_DATE,g.jrnl_no as JRNL_NO, \n"); + queryBuffer.append(" (case g.tran_ind \n" + + " when 'DR' then 'GL-DEBIT'\n" + + " when 'CR' then 'GL-CREDIT'\n" + + " end) as TXN_TYPE,g.txn_amt as TXN_AMT,g.narration as TRANSACTION_NARRATION \n"); + + queryBuffer.append(" from gl_txn g,gl_account a, gl_product p \n"); + queryBuffer.append(" where g.acct_no=a.key_1 \n" + + " and a.gl_prod_id=p.id \n"); + + + if (subPacsFlag.equalsIgnoreCase("N")) { + if (!subpacs_id.equalsIgnoreCase("")) { + + queryBuffer.append("and a.pacs_id= '" + subpacs_id + "' \n"); + + } else if (subpacs_id.equalsIgnoreCase("")) { + + queryBuffer.append("and a.pacs_id in (select pacsm.pacs_id from pacs_master pacsm where pacsm.head_pacs_id =(select pacs.head_pacs_id from pacs_master pacs where pacs.pacs_id = '" + pacsId + "'))"); + } + } else if (subPacsFlag.equalsIgnoreCase("Y")) { + queryBuffer.append("and a.pacs_id= '" + pacsId + "' \n"); + } + + + if (!accountNo.equalsIgnoreCase("")) { + queryBuffer.append(" and a.key_1='" + Bean.getAccountNo() + "' \n"); + } + + if ((!fromDate.equalsIgnoreCase("")) && (!toDate.equalsIgnoreCase(""))) { + + queryBuffer.append(" and g.tran_date between to_date ('" + Bean.getFromDate() + "','dd/mm/yyyy') \n"); + queryBuffer.append(" and to_date ('" + Bean.getToDate() + "','dd/mm/yyyy') \n"); + } + + if (!product.equalsIgnoreCase("")) { + queryBuffer.append(" and a.gl_prod_id='" + Bean.getProductName() + "' \n"); + } + + if ((!fromAmount.equalsIgnoreCase("")) && (!toAmount.equalsIgnoreCase(""))) { + queryBuffer.append(" and g.txn_amt between='" + Bean.getFromAmount() + "' \n"); + queryBuffer.append(" and '" + Bean.getToAmount() + "' \n"); + } + + + + if (!tranRefSearch.equalsIgnoreCase("")) { + queryBuffer.append(" and g.cbs_ref_no='" + Bean.getTranRefSearch() + "' \n"); + } + + reportQuery = queryBuffer.toString(); + System.out.println(queryBuffer.toString()); + + } else if (reportName.equalsIgnoreCase("DEP_TXN_ENQ_REPORT")) { + + queryBuffer.append(" select rownum as SL_NO, a.key_1 as ACCOUNT_NO,d.cbs_ref_no as CBS_REF_NO,to_char(d.tran_date,'DD-MON-YYYY') AS TRAN_DATE, \n"); + queryBuffer.append(" (case d.tran_ind\n" + + " when 'DR' then 'DEPOSIT-Debit'\n" + + " when 'CR' then 'DEPOSIT-Credit'\n" + + " end) as TXN_TYPE,d.txn_amt as TXN_AMT,p.PROD_NAME as PRODUCT_NAME,p.INTT_CAT_DESC as INTT_DESCRIPTION,d.END_BAL as END_BALANCE, d.NARRATION \n"); + + queryBuffer.append(" from dep_txn d,dep_account a, dep_product p \n"); + queryBuffer.append(" where d.acct_no=a.key_1\n" + + " and a.dep_prod_id=p.id and func_getAccountType(a.KEY_1) in ('1','2','5','3') \n"); + + + if (subPacsFlag.equalsIgnoreCase("N")) { + if (!subpacs_id.equalsIgnoreCase("")) { + + queryBuffer.append("and a.pacs_id= '" + subpacs_id + "' \n"); + + } else if (subpacs_id.equalsIgnoreCase("")) { + + queryBuffer.append("and a.pacs_id in (select pacsm.pacs_id from pacs_master pacsm where pacsm.head_pacs_id =(select pacs.head_pacs_id from pacs_master pacs where pacs.pacs_id = '" + pacsId + "'))"); + } + } else if (subPacsFlag.equalsIgnoreCase("Y")) { + queryBuffer.append("and a.pacs_id= '" + pacsId + "' \n"); + } + + + if (!accountNo.equalsIgnoreCase("")) { + queryBuffer.append(" and a.key_1='" + Bean.getAccountNo() + "' \n"); + } + + if ((!fromDate.equalsIgnoreCase("")) && (!toDate.equalsIgnoreCase(""))) { + + queryBuffer.append(" and d.tran_date between to_date ('" + Bean.getFromDate() + "','dd/mm/yyyy') \n"); + queryBuffer.append(" and to_date ('" + Bean.getToDate() + "','dd/mm/yyyy') \n"); + } + + if (!product.equalsIgnoreCase("")) { + queryBuffer.append(" and a.dep_prod_id='" + Bean.getProductName() + "' \n"); + } + + if ((!fromAmount.equalsIgnoreCase("")) && (!toAmount.equalsIgnoreCase(""))) { + queryBuffer.append(" and d.txn_amt between '" + Bean.getFromAmount() + "' \n"); + queryBuffer.append(" and '" + Bean.getToAmount() + "' \n"); + } + if (!tranRefSearch.equalsIgnoreCase("")) { + queryBuffer.append(" and d.cbs_ref_no='" + Bean.getTranRefSearch() + "' \n"); + } + + System.out.println(queryBuffer.toString()); + reportQuery = queryBuffer.toString(); + + + } else if (reportName.equalsIgnoreCase("LOAN_REPAYMENT_SCHEDULE_REPORT")) { + + queryBuffer.append("select s.install_no as INSTALL_NO, a.key_1 as LOAN_ACCOUNT_NO,s.repay_yyyymm as REPAY_YYYYMM,s.emi_amt as EMI_AMOUNT,s.prin_amt as PRINCIPAL_AMOUNT,s.intt_amt as INTEREST_AMOUNT,s.prin_outst as PRINCIPAL_OUTSTANDING, \n"); + queryBuffer.append(" (case when s.install_no=1 then a.sanction_amt else (s.prin_outst+s.PRIN_AMT) end) as OPENING_BALANCE,\n" + + " s.prin_outst as CLOSING_BALANCE \n"); + + queryBuffer.append(" from loan_repay_schedule s,loan_account a \n"); + queryBuffer.append(" where a.pacs_id='" + pacsId + "' and a.key_1=s.accno \n"); + + if (!accountNo.equalsIgnoreCase("")) { + queryBuffer.append(" and s.accno ='" + Bean.getAccountNo() + "' \n"); + } + + + + if (!loanRepYYYYMM.equalsIgnoreCase("")) { + queryBuffer.append(" and s.repay_yyyymm >='" + Bean.getLoanRepYYYYMM() + "' \n"); + } + + queryBuffer.append(" order by 3 \n"); + + + reportQuery = queryBuffer.toString(); + + } else if (reportName.equalsIgnoreCase("LOAN_ACCOUNT_ENQUIRY_REPORT")) { + + queryBuffer.append(" select * from (select l.key_1 LOAN_ACCOUNT_NO,(t.first_name||' '||nvl2(t.middle_name,''||t.middle_name,'')||nvl2(t.last_name,''||t.last_name,'')) CUSTOMER_NAME,l.customer_no as CUSTOMER_NO,l.sanction_amt as SANCTIONED_AMOUNT,to_char(l.sanc_dt,'DD-MON-YYYY') as SANCTIONED_DATE,decode(l.CURR_STATUS, '04', 'Closed', '03', 'Fully Disbursed', '02', 'Partially Disbursed', '01', 'Initiated', 'Fully Disbursed') as CURR_STATUS,l.disb_amt as AMOUNT_DISBURSED,l.intt_outst as INTT_OUTSTD,l.prin_outst as PRIN_OUTSTD,l.intt_paid as INTT_PAID,l.prin_paid as PRIN_PAID,(case when l.emi =0 then 'NA' else to_char(l.emi) end) as EMI_AMOUNT, to_char(l.due_dt,'DD-MON-YYYY') as NEXT_DUE_DATE,l.lst_txn_dt as LAST_REPAYMENT_DATE, p.intt_cat_desc as INTEREST_CATEGORY, p.PROD_NAME as PRODUCT_NAME,(l.intt_outst+l.npa_intt_outst+l.penal_intt_outst) as TOTAL_INTT_OUTST, (l.intt_accr+l.penal_intt_accr+l.npa_intt_accr) as TOTAL_INTT_ACCR, (l.intt_paid+l.penal_intt_paid+l.npa_intt_paid) as TOTAL_INTT_PAID, decode(p.LOAN_TYPE,'E','EMI','N','Negotiable','C','Cash Credit') as LOAN_TYPE, l.old_accno as OLD_ACCOUNT_NUMBER,M.intt_rate as INTEREST_RATE,rownum SL_NO \n"); + + queryBuffer.append(" from loan_account l,loan_product p,kyc_hdr t, loan_interest_map M \n"); + queryBuffer.append(" where l.customer_no = t.cif_no and l.loan_prod_id=p.id and M.key_1 = l.key_1 \n"); + + + if (subPacsFlag.equalsIgnoreCase("N")) { + if (!subpacs_id.equalsIgnoreCase("")) { + + queryBuffer.append("and l.pacs_id= '" + subpacs_id + "' \n"); + + } else if (subpacs_id.equalsIgnoreCase("")) { + + queryBuffer.append("and l.pacs_id in (select pacsm.pacs_id from pacs_master pacsm where pacsm.head_pacs_id =(select pacs.head_pacs_id from pacs_master pacs where pacs.pacs_id = '" + pacsId + "'))"); + } + } else if (subPacsFlag.equalsIgnoreCase("Y")) { + queryBuffer.append("and l.pacs_id= '" + pacsId + "' \n"); + } + + if (!accountNo.equalsIgnoreCase("")) { + queryBuffer.append(" and l.key_1 = '" + Bean.getAccountNo() + "' \n"); + } + + if (!oldAccNo.equalsIgnoreCase("")) { + queryBuffer.append(" and l.old_accno = '" + Bean.getOldAccNo() + "' \n"); + } + + if (!oldCifNo.equalsIgnoreCase("")) { + queryBuffer.append(" and l.old_cif = '" + Bean.getOldCifNo() + "' \n"); + } + + if (!productID.equalsIgnoreCase("")) { + queryBuffer.append(" and p.id = '" + Bean.getProductID() + "' \n"); + } + + if ((!fromDate.equalsIgnoreCase("")) && (!toDate.equalsIgnoreCase(""))) { + + queryBuffer.append(" and l.sanc_dt between to_date ('" + Bean.getFromDate() + "','dd/mm/yyyy') \n"); + queryBuffer.append(" and to_date ('" + Bean.getToDate() + "','dd/mm/yyyy') \n"); + } + + if (!cifNumber.equalsIgnoreCase("")) { + queryBuffer.append(" and l.customer_no='" + Bean.getCifNumber() + "' \n"); + } + + + + queryBuffer.append(")"); + + reportQuery = queryBuffer.toString(); + + System.out.println(queryBuffer.toString()); + + } else if (reportName.equalsIgnoreCase("DEPOSIT_ACCOUNT_ENQUIRY_REPORT")) { + + + queryBuffer.append(" select * from (select KEY_1 as ACCOUNT_NO, to_char(ACCT_OPEN_DT,'DD-MON-YYYY') ACCT_OPEN_DT, AVAIL_BAL as AVAILABLE_BALANCE, AVAIL_BAL_KIND,a.CUSTOMER_NO as CUSTOMER_NO,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) CUST_NAME, \n"); + queryBuffer.append("p.prod_name as PROD_NAME,(select nvl(sum(m.operation_value),0) from dep_miscl_operation m where m.account_no=a.key_1 and m.status = 'Y' and m.ACTION_CODE = 'HOLD') as HOLD_VALUE,(case when substr(p.prod_code,1,1) in ('2','3') then a.TD_INTT_RATE else (select (case when a.avail_bal >= s.threshold_bal then s.intt_rate when a.avail_bal GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + private static final String CONTENT_TYPE_EXCEL = "application/vnd.ms-excel"; + + public void init(ServletConfig config) throws ServletException { + super.init(config); + } + + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + HttpSession session = request.getSession(false); + String pacsId = (String) session.getAttribute("pacsId"); + String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + String JSP_Name = ""; + JSP_Name = null == (request.getParameter("screenName")) ? "" : (request.getParameter("screenName")); + + response.setContentType(CONTENT_TYPE_EXCEL); + + // String reportName = (String) request.getParameter("reportname"); + + //To Populate Bean + ExcelReportBean ExcelReportBeanObj = new ExcelReportBean(); + ExcelReportBeanObj = null; + + if (JSP_Name.equalsIgnoreCase("accountEnquiry")) { + + EnquiryBean oEnquiryBean = new EnquiryBean(); + oEnquiryBean = (EnquiryBean) session.getAttribute("oEnquiryBeanSearchObj"); + + ExcelReportBeanObj = new ExcelReportBean(); + + ExcelReportBeanObj.setAccountNo(oEnquiryBean.getAccountNo()); + ExcelReportBeanObj.setFromAmount(oEnquiryBean.getFromAmount()); + ExcelReportBeanObj.setToAmount(oEnquiryBean.getToAmount()); + ExcelReportBeanObj.setProductName(oEnquiryBean.getProductId()); + ExcelReportBeanObj.setToDate(oEnquiryBean.getToDate()); + ExcelReportBeanObj.setFromDate(oEnquiryBean.getFromDate()); + ExcelReportBeanObj.setFromDate(oEnquiryBean.getLinkedSbAccount()); + ExcelReportBeanObj.setSubpacs_id(oEnquiryBean.getSubpacs_id()); + + // session.removeAttribute("oEnquiryBeanSearchObj"); + + } else if (JSP_Name.equalsIgnoreCase("transactionEnquiry")) { + + TransactionEnquiryBean oTransactionEnquiryBean = new TransactionEnquiryBean(); + oTransactionEnquiryBean = (TransactionEnquiryBean) session.getAttribute("oTransactionEnquiryBeanSearchObj"); + + ExcelReportBeanObj = new ExcelReportBean(); + + ExcelReportBeanObj.setAccountNo(oTransactionEnquiryBean.getAccountNo()); + ExcelReportBeanObj.setFromAmount(oTransactionEnquiryBean.getFromAmount()); + ExcelReportBeanObj.setToAmount(oTransactionEnquiryBean.getToAmount()); + ExcelReportBeanObj.setProductName(oTransactionEnquiryBean.getProductId()); + ExcelReportBeanObj.setToDate(oTransactionEnquiryBean.getToDate()); + ExcelReportBeanObj.setFromDate(oTransactionEnquiryBean.getFromDate()); + ExcelReportBeanObj.setFromDate(oTransactionEnquiryBean.getLinkedSbAccount()); + ExcelReportBeanObj.setSubpacs_id(oTransactionEnquiryBean.getSubpacs_id()); + + // session.removeAttribute("oTransactionEnquiryBeanSearchObj"); + + } else if (JSP_Name.equalsIgnoreCase("glAccountEnquiry")) { + + GlAccountEnquiryBean oGlAccountEnquiryBean = new GlAccountEnquiryBean(); + oGlAccountEnquiryBean = (GlAccountEnquiryBean) session.getAttribute("oGlAccountEnquiryBeanSearchObj"); + + ExcelReportBeanObj = new ExcelReportBean(); + + ExcelReportBeanObj.setAccountNo(oGlAccountEnquiryBean.getAccountNo()); + ExcelReportBeanObj.setFromAmount(oGlAccountEnquiryBean.getFromAmount()); + ExcelReportBeanObj.setToAmount(oGlAccountEnquiryBean.getToAmount()); + ExcelReportBeanObj.setProductName(oGlAccountEnquiryBean.getProductId()); + ExcelReportBeanObj.setToDate(oGlAccountEnquiryBean.getToDate()); + ExcelReportBeanObj.setFromDate(oGlAccountEnquiryBean.getFromDate()); + ExcelReportBeanObj.setSubpacs_id(oGlAccountEnquiryBean.getSubpacs_id()); + + // session.removeAttribute("oGlAccountEnquiryBeanSearchObj"); + + } else if (JSP_Name.equalsIgnoreCase("glTransactionEnquiry")) { + + GLTransactionEnquiryBean oGLTransactionEnquiryBean = new GLTransactionEnquiryBean(); + oGLTransactionEnquiryBean = (GLTransactionEnquiryBean) session.getAttribute("oGlTransactionEnquiryBeanobj"); + + ExcelReportBeanObj = new ExcelReportBean(); + + ExcelReportBeanObj.setAccountNo(oGLTransactionEnquiryBean.getAccountNo()); + ExcelReportBeanObj.setFromAmount(oGLTransactionEnquiryBean.getFromAmount()); + ExcelReportBeanObj.setToAmount(oGLTransactionEnquiryBean.getToAmount()); + ExcelReportBeanObj.setProductName(oGLTransactionEnquiryBean.getProductId()); + ExcelReportBeanObj.setToDate(oGLTransactionEnquiryBean.getToDate()); + ExcelReportBeanObj.setFromDate(oGLTransactionEnquiryBean.getFromDate()); + ExcelReportBeanObj.setTranRefSearch(oGLTransactionEnquiryBean.getTranRefSearch()); + ExcelReportBeanObj.setSubpacs_id(oGLTransactionEnquiryBean.getSubpacs_id()); + + // session.removeAttribute("oGlTransactionEnquiryBeanobj"); + + } else if (JSP_Name.equalsIgnoreCase("DepositAccountEnquiry")) { + + EnquiryBean oEnquiryBean = new EnquiryBean(); + oEnquiryBean = (EnquiryBean) session.getAttribute("oEnquiryBeanSearchObj"); + + ExcelReportBeanObj = new ExcelReportBean(); + + ExcelReportBeanObj.setAccountNo(oEnquiryBean.getAccountNo()); + ExcelReportBeanObj.setFromAmount(oEnquiryBean.getFromAmount()); + ExcelReportBeanObj.setToAmount(oEnquiryBean.getToAmount()); + ExcelReportBeanObj.setProductName(oEnquiryBean.getProductId()); + ExcelReportBeanObj.setToDate(oEnquiryBean.getToDate()); + ExcelReportBeanObj.setFromDate(oEnquiryBean.getFromDate()); + ExcelReportBeanObj.setSrchByCIF(oEnquiryBean.getSrchByCIF()); + ExcelReportBeanObj.setSubpacs_id(oEnquiryBean.getSubpacs_id()); + ExcelReportBeanObj.setOldAccNo(oEnquiryBean.getOldAccNo()); + ExcelReportBeanObj.setOldCifNo(oEnquiryBean.getOldCifNo()); + ExcelReportBeanObj.setModOfAcc(oEnquiryBean.getModOfAcc()); + + + // session.removeAttribute("oEnquiryBeanSearchObj"); + + } else if (JSP_Name.equalsIgnoreCase("DepositTransactionEnquiry")) { + + TransactionEnquiryBean oTransactionEnquiryBean = new TransactionEnquiryBean(); + oTransactionEnquiryBean = (TransactionEnquiryBean) session.getAttribute("oTransactionEnquiryBeanSearchObj"); + + ExcelReportBeanObj = new ExcelReportBean(); + + ExcelReportBeanObj.setAccountNo(oTransactionEnquiryBean.getAccountNo()); + ExcelReportBeanObj.setFromAmount(oTransactionEnquiryBean.getFromAmount()); + ExcelReportBeanObj.setToAmount(oTransactionEnquiryBean.getToAmount()); + ExcelReportBeanObj.setProductName(oTransactionEnquiryBean.getProductId()); + ExcelReportBeanObj.setToDate(oTransactionEnquiryBean.getToDate()); + ExcelReportBeanObj.setFromDate(oTransactionEnquiryBean.getFromDate()); + ExcelReportBeanObj.setTranRefSearch(oTransactionEnquiryBean.getTranRefSearch()); + ExcelReportBeanObj.setSubpacs_id(oTransactionEnquiryBean.getSubpacs_id()); + + } else if (JSP_Name.equalsIgnoreCase("LoanRepayment")) { + + LoanRepaymentScheduleBean oLoanRepaymentScheduleBean = new LoanRepaymentScheduleBean(); + oLoanRepaymentScheduleBean = (LoanRepaymentScheduleBean) session.getAttribute("oLoanRepaymentScheduleBean"); + + ExcelReportBeanObj = new ExcelReportBean(); + + ExcelReportBeanObj.setAccountNo(oLoanRepaymentScheduleBean.getLoanAcc()); + ExcelReportBeanObj.setLoanRepYYYYMM(oLoanRepaymentScheduleBean.getLoanRepYYYYMM()); + + + + } else if (JSP_Name.equalsIgnoreCase("LoanInquiry")) { + + EnquiryBean oEnquiryBean = new EnquiryBean(); + oEnquiryBean = (EnquiryBean) session.getAttribute("oEnquiryBeanSearchObj"); + + ExcelReportBeanObj = new ExcelReportBean(); + + ExcelReportBeanObj.setAccountNo(oEnquiryBean.getAccountNo()); + ExcelReportBeanObj.setCustomerNo(oEnquiryBean.getCustomerNo()); + ExcelReportBeanObj.setToDate(oEnquiryBean.getToDate()); + ExcelReportBeanObj.setFromDate(oEnquiryBean.getFromDate()); + ExcelReportBeanObj.setCifNumber(oEnquiryBean.getCifNumber()); + ExcelReportBeanObj.setSubpacs_id(oEnquiryBean.getSubpacs_id()); + ExcelReportBeanObj.setOldAccNo(oEnquiryBean.getOldAccNo()); + ExcelReportBeanObj.setOldCifNo(oEnquiryBean.getOldCifNo()); + ExcelReportBeanObj.setProductName(oEnquiryBean.getProductName()); + ExcelReportBeanObj.setProductID(oEnquiryBean.getProductId()); + + + // session.removeAttribute("oEnquiryBeanSearchObj"); + + } + else if (JSP_Name.equalsIgnoreCase("GliffDepositReport")) { + + ExcelReportBeanObj = new ExcelReportBean(); + + // ExcelReportBeanObj.setFromDate(request.getParameter("fromDate")); + + + }else if (JSP_Name.equalsIgnoreCase("LoanTransactionEnquiry")) { + + TransactionEnquiryBean oTransactionEnquiryBean = new TransactionEnquiryBean(); + oTransactionEnquiryBean = (TransactionEnquiryBean) session.getAttribute("oTransactionEnquiryBeanSearchObj"); + + ExcelReportBeanObj = new ExcelReportBean(); + + ExcelReportBeanObj.setAccountNo(oTransactionEnquiryBean.getAccountNo()); + ExcelReportBeanObj.setFromAmount(oTransactionEnquiryBean.getFromAmount()); + ExcelReportBeanObj.setToAmount(oTransactionEnquiryBean.getToAmount()); + ExcelReportBeanObj.setProductName(oTransactionEnquiryBean.getProductId()); + ExcelReportBeanObj.setToDate(oTransactionEnquiryBean.getToDate()); + ExcelReportBeanObj.setFromDate(oTransactionEnquiryBean.getFromDate()); + ExcelReportBeanObj.setTranRefSearch(oTransactionEnquiryBean.getTranRefSearch()); + ExcelReportBeanObj.setSubpacs_id(oTransactionEnquiryBean.getSubpacs_id()); + + }else if (JSP_Name.equalsIgnoreCase("DepositMiscellaneousEnquiry")) { + + DepositMiscellaneousBean oDepositMiscellaneousBean = new DepositMiscellaneousBean(); + oDepositMiscellaneousBean = (DepositMiscellaneousBean) session.getAttribute("oEnquiryBeanSearchObj"); + + ExcelReportBeanObj = new ExcelReportBean(); + + ExcelReportBeanObj.setAccountNo(oDepositMiscellaneousBean.getAccountNo()); + ExcelReportBeanObj.setFromAmount(oDepositMiscellaneousBean.getFromAmount()); + ExcelReportBeanObj.setToAmount(oDepositMiscellaneousBean.getToAmount()); + ExcelReportBeanObj.setToDate(oDepositMiscellaneousBean.getToDate()); + ExcelReportBeanObj.setFromDate(oDepositMiscellaneousBean.getFromDate()); + ExcelReportBeanObj.setEnqTypeSearch(oDepositMiscellaneousBean.getEnqTypeSearch()); + ExcelReportBeanObj.setSubpacs_id(oDepositMiscellaneousBean.getSubpacs_id()); + + } else if (JSP_Name.equalsIgnoreCase("NeftRtgsInitiation")) { + + NeftRtgsEnquiryBean oNeftRtgsEnquiryBean = new NeftRtgsEnquiryBean(); + oNeftRtgsEnquiryBean = (NeftRtgsEnquiryBean) session.getAttribute("alEnquiryBeanobj"); + + ExcelReportBeanObj = new ExcelReportBean(); + + ExcelReportBeanObj.setTxnNo(oNeftRtgsEnquiryBean.getTxnNo()); + ExcelReportBeanObj.setRemAccNo(oNeftRtgsEnquiryBean.getSrcAccNo()); + ExcelReportBeanObj.setBenAccNo(oNeftRtgsEnquiryBean.getDestAccNo2()); + ExcelReportBeanObj.setIfscNoVal2(oNeftRtgsEnquiryBean.getIfscNoVal2()); + ExcelReportBeanObj.setTxnFromDate(oNeftRtgsEnquiryBean.getFrom_date()); + ExcelReportBeanObj.setTxnToDate(oNeftRtgsEnquiryBean.getTo_date()); + //ExcelReportBeanObj.setSubpacs_id(oNeftRtgsEnquiryBean.getSubpacs_id()); + + } + +//To Populate Bean Ends Here + //To generate Excel download log + generateExcelDownloadLog(request); + + response.addHeader("content-disposition", + "attachment; filename=" + reportName + ".xls"); + + OutputStream out = response.getOutputStream(); + + ExcelReport excelReport = new ExcelReport(); + WorkbookSettings ws = excelReport.getWorkBookSetting(); + String query = null; + + try { + WritableWorkbook workbook = Workbook.createWorkbook(out, ws); + WritableSheet s = workbook.createSheet(reportName, 0); + ExcelReportInformation ex = new ExcelReportInformation(reportName); + + if (null == ExcelReportBeanObj) { + query = ex.getReportQuery(); + + } else { + + query = ex.getReportQuery(ExcelReportBeanObj, pacsId,subPacsFlag); + } + + ArrayList aHeader = ex.getReportHeader(); + excelReport.writeDataSheet(s, aHeader, query); + + workbook.write(); + workbook.close(); + out.flush(); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error Occurred during processing."); + + } finally { + System.out.println("Processing done."); + } + } + + private void generateExcelDownloadLog(HttpServletRequest request) { + HttpSession session = request.getSession(false); + + String pacsId = (String) session.getAttribute("pacsId"); + String tellerID = (String) session.getAttribute("user"); + // String reportName = (String) request.getParameter("reportname"); + Connection connection = null; + Statement statement = null; + + ExcelReportBean ExcelReportBeanObj = new ExcelReportBean(); + + try { + // BeanUtils.populate(ExcelReportBeanObj, request.getParameterMap()); + } catch (IllegalAccessException ex) { + // Logger.getLogger(ExcelReportServlet.class.getName()).log(Level.SEVERE, null, ex); + } catch (InvocationTargetException ex) { + // Logger.getLogger(ExcelReportServlet.class.getName()).log(Level.SEVERE, null, ex); + } + + try { + connection = DbHandler.getDBConnection(); + statement = connection.createStatement(); + ResultSet rs = statement.executeQuery(" insert into excel_report_log\n" + +"(pacs_id,\n" + +"teller_id,\n" + +"report_name,\n" + +"proc_dt,\n" + +"proc_time,\n" + +"accountno,\n" + +"productname,\n" + +"from_date,\n" + +"to_date,\n" + +"fromamount,\n" + +"toamount,\n" + +"linkedsbaccount,\n" + +"loanrepyyyymm,\n" + +"cifnumber,\n" + +"tranrefsearch,\n" + +"srchbycif,\n" + +"subpacs_id,\n" + +"subpacs_name,\n" + +"enqtypesearch,\n" + +"oldaccno,\n" + +"oldcifno,\n" + +"productid,\n" + +"txnno,\n" + +"remaccno,\n" + +"benaccno,\n" + +"ifscnoval2,\n" + +"txnfromdate,\n" + +"txntodate,\n" + +"modofacc)\n" + +"values\n" + +"('"+ pacsId +"',\n" + +"'"+ tellerID +"',\n" + +"'"+ reportName +"',\n" + +"(select system_date from system_date),\n" + +"to_date(to_char(SYSTIMESTAMP, 'DD-MON-RRHH24:MI:SS'),'DD-MON-RRHH24:MI:SS'),\n" + +"'"+ ExcelReportBeanObj.getAccountNo() +"',\n" + +"'"+ ExcelReportBeanObj.getProductName() +"',\n" + +"'"+ ExcelReportBeanObj.getFromDate() +"',\n" + +"'"+ ExcelReportBeanObj.getToDate() +"',\n" + +"'"+ ExcelReportBeanObj.getFromAmount() +"',\n" + +"'"+ ExcelReportBeanObj.getToAmount() +"',\n" + +"'"+ ExcelReportBeanObj.getLinkedSbAccount() +"',\n" + +"'"+ ExcelReportBeanObj.getLoanRepYYYYMM() +"',\n" + +"'"+ ExcelReportBeanObj.getCifNumber() +"',\n" + +"'"+ ExcelReportBeanObj.getTranRefSearch() +"',\n" + +"'"+ ExcelReportBeanObj.getSrchByCIF() +"',\n" + +"'"+ ExcelReportBeanObj.getSubpacs_id() +"',\n" + +"'"+ ExcelReportBeanObj.getSubpacs_name() +"',\n" + +"'"+ ExcelReportBeanObj.getEnqTypeSearch() +"',\n" + +"'"+ ExcelReportBeanObj.getOldAccNo() +"',\n" + +"'"+ ExcelReportBeanObj.getOldCifNo() +"',\n" + +"'"+ ExcelReportBeanObj.getProductID() +"',\n" + +"'"+ ExcelReportBeanObj.getTxnNo() +"',\n" + +"'"+ ExcelReportBeanObj.getRemAccNo() +"',\n" + +"'"+ ExcelReportBeanObj.getBenAccNo() +"',\n" + +"'"+ ExcelReportBeanObj.getIfscNoVal2() +"',\n" + +"'"+ ExcelReportBeanObj.getTxnFromDate() +"',\n" + +"'"+ ExcelReportBeanObj.getTxnToDate() +"',\n" + +"'"+ ExcelReportBeanObj.getModOfAcc() +"') "); + + + } catch (SQLException ex) { + System.out.println("Error Occurred during processing."); + + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + } + +// + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/ExcelReportController/Heading.java b/IPKS_Updated/src/src/java/ExcelReportController/Heading.java new file mode 100644 index 0000000..4dd848b --- /dev/null +++ b/IPKS_Updated/src/src/java/ExcelReportController/Heading.java @@ -0,0 +1,30 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package ExcelReportController; + +/** + * + * @author Tcs Helpdesk10 + */ +public class Heading { + + private String sName; + private int sType; + + public Heading(String Name, int Type) { + this.sName = Name; + this.sType = Type; + } + + public String getName() { + return sName; + } + + public int getType() { + return sType; + } + +} diff --git a/IPKS_Updated/src/src/java/JsonGraphs/Bean/BucketWiseLoanOutstandingBean.java b/IPKS_Updated/src/src/java/JsonGraphs/Bean/BucketWiseLoanOutstandingBean.java new file mode 100644 index 0000000..7bc9bba --- /dev/null +++ b/IPKS_Updated/src/src/java/JsonGraphs/Bean/BucketWiseLoanOutstandingBean.java @@ -0,0 +1,52 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package JsonGraphs.Bean; + +/** + * + * @author 1320035 + */ +public class BucketWiseLoanOutstandingBean { + private String toDate; + private String fromDate; + private String distCode; + private String reportSelection; + + public String getDistCode() { + return distCode; + } + + public void setDistCode(String distCode) { + this.distCode = distCode; + } + + public String getReportSelection() { + return reportSelection; + } + + public void setReportSelection(String reportSelection) { + this.reportSelection = reportSelection; + } + + + public String getFromDate() { + return fromDate; + } + + public void setFromDate(String fromDate) { + this.fromDate = fromDate; + } + + + + public String getToDate() { + return toDate; + } + + public void setToDate(String toDate) { + this.toDate = toDate; + } +} diff --git a/IPKS_Updated/src/src/java/JsonGraphs/Controller/JsonDashboardServlet.java b/IPKS_Updated/src/src/java/JsonGraphs/Controller/JsonDashboardServlet.java new file mode 100644 index 0000000..bfac218 --- /dev/null +++ b/IPKS_Updated/src/src/java/JsonGraphs/Controller/JsonDashboardServlet.java @@ -0,0 +1,127 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package JsonGraphs.Controller; + +import JsonGraphs.Bean.BucketWiseLoanOutstandingBean; +import JsonGraphs.Util.JsonDbHandler; +//import LoginDb.JsonDbHandler; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.http.HttpSession; +import oracle.jdbc.OracleTypes; +import org.codehaus.jackson.map.ObjectMapper; + +/** + * + * @author 1320035 + */ +public class JsonDashboardServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + barChartData barChartDataObjOut = null; + barChartData barChartDataOb = null; + ArrayList labels = null; + ArrayList datasets = null; + datasets datasetsObj = null; + ArrayList data = null; + ArrayList randColors = null; + String color = null; + //List beneficiaryList = null; + // 1. get received JSON data from request + BufferedReader br = new BufferedReader(new InputStreamReader(request.getInputStream())); + String json = ""; + if (br != null) { + json = br.readLine(); + } + + // 2. initiate jackson mapper + ObjectMapper mapper = new ObjectMapper(); + + // 3. Convert received JSON to SubgroupBean + BucketWiseLoanOutstandingBean BucketWiseLoanOutstandingBeanaObj = mapper.readValue(json, BucketWiseLoanOutstandingBean.class); + // 4. Set response type to JSON + response.setContentType("application/json"); + + + + // 5. Add article to List + try { + barChartDataOb = new barChartData(); + String toDate = BucketWiseLoanOutstandingBeanaObj.getToDate(); + String fromDate = BucketWiseLoanOutstandingBeanaObj.getFromDate(); + String distCode = BucketWiseLoanOutstandingBeanaObj.getDistCode(); + String reportSelection = BucketWiseLoanOutstandingBeanaObj.getReportSelection(); + + + barChartDataOb = new JsonDbHandler().selectionGraph(toDate, fromDate, distCode, reportSelection); + + } catch (Exception ex) { + // System.out.println(ex.toString()); + System.out.println("Error Occurred during processing."); + + } finally { + mapper.writeValue(response.getOutputStream(), barChartDataOb); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// +} diff --git a/IPKS_Updated/src/src/java/JsonGraphs/Controller/barChartData.java b/IPKS_Updated/src/src/java/JsonGraphs/Controller/barChartData.java new file mode 100644 index 0000000..f97057f --- /dev/null +++ b/IPKS_Updated/src/src/java/JsonGraphs/Controller/barChartData.java @@ -0,0 +1,44 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package JsonGraphs.Controller; + +/** + * + * @author 1320035 + */ +import java.util.ArrayList; +public class barChartData { + + private ArrayList labels; + private ArrayList datasets; + private String header; + + public String getHeader() { + return header; + } + + public void setHeader(String header) { + this.header = header; + } + + + public ArrayList getDatasets() { + return datasets; + } + + public void setDatasets(ArrayList datasets) { + this.datasets = datasets; + } + + public ArrayList getLabels() { + return labels; + } + + public void setLabels(ArrayList labels) { + this.labels = labels; + } + +} diff --git a/IPKS_Updated/src/src/java/JsonGraphs/Controller/datasets.java b/IPKS_Updated/src/src/java/JsonGraphs/Controller/datasets.java new file mode 100644 index 0000000..93a113a --- /dev/null +++ b/IPKS_Updated/src/src/java/JsonGraphs/Controller/datasets.java @@ -0,0 +1,66 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package JsonGraphs.Controller; + +/** + * + * @author 1320035 + */ +import java.util.ArrayList; +public class datasets { + + + private String label; + private String backgroundColor; + private ArrayList data; + private String fill; + private ArrayList labels; + + public ArrayList getLabels() { + return labels; + } + + public void setLabels(ArrayList labels) { + this.labels = labels; + } + + + + public String getFill() { + return fill; + } + + public void setFill(String fill) { + this.fill = fill; + } + + public String getBackgroundColor() { + return backgroundColor; + } + + public void setBackgroundColor(String backgroundColor) { + this.backgroundColor = backgroundColor; + } + + public ArrayList getData() { + return data; + } + + public void setData(ArrayList data) { + this.data = data; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + + + +} diff --git a/IPKS_Updated/src/src/java/JsonGraphs/Util/JsonDbHandler.java b/IPKS_Updated/src/src/java/JsonGraphs/Util/JsonDbHandler.java new file mode 100644 index 0000000..d6cbbdb --- /dev/null +++ b/IPKS_Updated/src/src/java/JsonGraphs/Util/JsonDbHandler.java @@ -0,0 +1,900 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package JsonGraphs.Util; + +import JsonGraphs.Controller.barChartData; +import Controller.Generate_100_Random_Colors; +import JsonGraphs.Bean.BucketWiseLoanOutstandingBean; +import JsonGraphs.Util.JsonDbHandler; +import JsonGraphs.Controller.datasets; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.http.HttpSession; +import oracle.jdbc.OracleTypes; +import org.codehaus.jackson.map.ObjectMapper; + +public class JsonDbHandler { + + ResultSet rs = null; + ResultSet resultset = null; + CallableStatement proc = null; + Connection connection = null; + Statement statement = null; + + public barChartData getGraphData(String toDate, String fromDate, String distCode, String reportSelection) { + + barChartData barChartDataObjOut = null; + ArrayList labels = null; + ArrayList datasets = null; + datasets datasetsObj = null; + ArrayList data = null; + ArrayList randColors = null; + String color = null; + + +// if (distCode == "") { +// distCode = "null"; +// } + + int i = 0; + randColors = new Generate_100_Random_Colors().genRandColors(); + barChartDataObjOut = new barChartData(); + barChartDataObjOut.setHeader("LOAN OUTSTANDING BUCKETWISE"); + labels = new ArrayList(); + labels.add("0-3 Months"); + labels.add("3-6 Months"); + labels.add("Greater than 6 Months"); + barChartDataObjOut.setLabels(labels); + + + try { + connection = LoginDb.DbHandler.getDBConnection(); + proc = connection.prepareCall("{ ?=call Dashboard_Query(?,?,?,?) }"); + + datasets = new ArrayList(); + + proc.registerOutParameter(1, OracleTypes.CURSOR); + proc.setString(2, fromDate); + proc.setString(3, toDate); + proc.setString(4, distCode); + proc.setString(5, reportSelection); + + proc.executeUpdate(); + + rs = (ResultSet) proc.getObject(1); + + int k = 0; + while (rs.next()) { + if (i % 3 == 0) { + datasetsObj = new datasets(); + color = randColors.get(k++); + datasetsObj.setLabel(rs.getString(1)); + datasetsObj.setBackgroundColor(color); + data = new ArrayList(); + data.add(rs.getInt(2)); + } else if (i % 3 == 2) { + data.add(rs.getInt(2)); + datasetsObj.setData(data); + datasets.add(datasetsObj); + } else { + data.add(rs.getInt(2)); + } + i++; + } + barChartDataObjOut.setDatasets(datasets); + + + } catch (Exception ex) { + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + connection.close(); + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + try { + rs.close(); + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + // return barChartDataObjOut; + } + return barChartDataObjOut; + + } + + // For CROP-WISE SNAPSHOT OF LOANS + public barChartData getGraphData1(String toDate, String fromDate, String distCode, String reportSelection) { + + barChartData barChartDataObjOut = null; + ArrayList labels = null; + ArrayList datasets = null; + datasets datasetsObj = null; + ArrayList data = null; + ArrayList randColors = null; + String color = null; + String query; + + int i = 0; + randColors = new Generate_100_Random_Colors().genRandColors(); + barChartDataObjOut = new barChartData(); + barChartDataObjOut.setHeader("CROP-WISE SNAPSHOT OF LOANS"); + + try { + connection = LoginDb.DbHandler.getDBConnection(); + statement = connection.createStatement(); + + + if (!(distCode.equalsIgnoreCase(""))) { + resultset = statement.executeQuery("select distinct q.loan_date from (select p.intt_cat_desc as Crop_Name,to_char(da.acct_open_dt,'YYYY') as Loan_Date,count(*) as No_Of_Loans from dep_account da,dep_product p,kyc_details kd,pacs_master pm, (select distinct dccb_code,dccb_name from dccb_br_map) m where da.dep_prod_id=p.id and da.curr_status IN ('O','C') and da.pacs_id=pm.pacs_id and kd.cif_no=da.customer_no and pm.dccb_code=m.dccb_code and da.acct_open_dt between to_date('" + fromDate + "','dd/mm/yyyy') and to_date('" + toDate + "','dd/mm/yyyy') and m.dccb_code='" + distCode + "' group by to_char(da.acct_open_dt,'YYYY'),p.intt_cat_desc order by p.intt_cat_desc, to_char(da.acct_open_dt,'YYYY')) q order by 1"); + } else { + resultset = statement.executeQuery("select distinct q.loan_date from (select p.intt_cat_desc as Crop_Name,to_char(da.acct_open_dt,'YYYY') as Loan_Date,count(*) as No_Of_Loans from dep_account da,dep_product p,kyc_details kd,pacs_master pm, (select distinct dccb_code,dccb_name from dccb_br_map) m where da.dep_prod_id=p.id and da.curr_status IN ('O','C') and da.pacs_id=pm.pacs_id and kd.cif_no=da.customer_no and pm.dccb_code=m.dccb_code and da.acct_open_dt between to_date('" + fromDate + "','dd/mm/yyyy') and to_date('" + toDate + "','dd/mm/yyyy') group by to_char(da.acct_open_dt,'YYYY'),p.intt_cat_desc order by p.intt_cat_desc, to_char(da.acct_open_dt,'YYYY')) q order by 1"); + } + labels = new ArrayList(); + while (resultset.next()) { + labels.add(resultset.getString(1)); + } + + + barChartDataObjOut.setLabels(labels); + + } catch (SQLException ex) { + System.out.println("Error Occurred during processing."); + } finally { + try { + statement.close(); + connection.close(); + resultset.close(); + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + + } + + try { + connection = LoginDb.DbHandler.getDBConnection(); + proc = connection.prepareCall("{ ?=call Dashboard_Query(?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + datasets = new ArrayList(); + + proc.registerOutParameter(1, OracleTypes.CURSOR); + proc.setString(2, fromDate); + proc.setString(3, toDate); + proc.setString(4, distCode); + proc.setString(5, reportSelection); + + proc.executeUpdate(); + + rs = (ResultSet) proc.getObject(1); + + + int k = 0; + String x = ""; + rs.next(); + while (true) { + + if (i % labels.size() == 0) { + datasetsObj = new datasets(); + color = randColors.get(k++); + x = rs.getString(1); + datasetsObj.setLabel(x); + datasetsObj.setBackgroundColor(color); + data = new ArrayList(); + + if ((rs.getString(2).equalsIgnoreCase(labels.get(i))) && (x.equalsIgnoreCase(rs.getString(1)))) { + data.add(rs.getInt(3)); + rs.next(); + } else { + + data.add(0); + } + } else if (i % labels.size() == labels.size() - 1) { + if ((rs.getString(2).equalsIgnoreCase(labels.get(i))) && (x.equalsIgnoreCase(rs.getString(1)))) { + data.add(rs.getInt(3)); + if (rs.next() == false) { + datasetsObj.setData(data); + datasets.add(datasetsObj); + i = -1; + break; + } + } else { + data.add(0); + } + datasetsObj.setData(data); + datasets.add(datasetsObj); + i = -1; + + + + } else { + if ((rs.getString(2).equalsIgnoreCase(labels.get(i))) && (x.equalsIgnoreCase(rs.getString(1)))) { + data.add(rs.getInt(3)); + rs.next(); + } else { + data.add(0); + } + } + i++; + String y = rs.getString(2); + String z = rs.getString(1); + } + barChartDataObjOut.setDatasets(datasets); + + } catch (Exception ex) { + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + try { + rs.close(); + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + // return barChartDataObjOut; + } + try { + connection.close(); + } catch (SQLException ex) { + System.out.println("Error Occurred during connection close."); + } + } + return barChartDataObjOut; + } + + //For CROP-WISE LOAN DEMAND + public barChartData getGraphData3(String toDate, String fromDate, String distCode, String reportSelection) { + + barChartData barChartDataObjOut = null; + ArrayList labels = null; + ArrayList datasets = null; + datasets datasetsObj = null; + ArrayList data = null; + ArrayList randColors = null; + String color = null; + + String query; + + int i = 0; + randColors = new Generate_100_Random_Colors().genRandColors(); + barChartDataObjOut = new barChartData(); + barChartDataObjOut.setHeader("CROP-WISE LOAN DEMAND"); + + try { + connection = LoginDb.DbHandler.getDBConnection(); + statement = connection.createStatement(); + + if (!(distCode.equalsIgnoreCase(""))) { + resultset = statement.executeQuery("select distinct q.loan_date from (select p.intt_cat_desc as Crop_Name,to_char(da.acct_open_dt,'YYYY') as Loan_Date,count(*) as No_Of_Loans from dep_account da,dep_product p,kyc_details kd,pacs_master pm, (select distinct dccb_code,dccb_name from dccb_br_map) m where da.dep_prod_id=p.id and da.curr_status='O' and da.pacs_id=pm.pacs_id and kd.cif_no=da.customer_no and pm.dccb_code=m.dccb_code and da.acct_open_dt between to_date('" + fromDate + "','dd/mm/yyyy') and to_date('" + toDate + "','dd/mm/yyyy') and m.dccb_code='" + distCode + "' group by to_char(da.acct_open_dt,'YYYY'),p.intt_cat_desc order by p.intt_cat_desc,to_char(da.acct_open_dt,'YYYY')) q order by 1"); + } else { + resultset = statement.executeQuery("select distinct q.loan_date from (select p.intt_cat_desc as Crop_Name,to_char(da.acct_open_dt,'YYYY') as Loan_Date,count(*) as No_Of_Loans from dep_account da,dep_product p,kyc_details kd,pacs_master pm, (select distinct dccb_code,dccb_name from dccb_br_map) m where da.dep_prod_id=p.id and da.curr_status='O' and da.pacs_id=pm.pacs_id and kd.cif_no=da.customer_no and pm.dccb_code=m.dccb_code and da.acct_open_dt between to_date('" + fromDate + "','dd/mm/yyyy') and to_date('" + toDate + "','dd/mm/yyyy') group by to_char(da.acct_open_dt,'YYYY'),p.intt_cat_desc order by p.intt_cat_desc,to_char(da.acct_open_dt,'YYYY')) q order by 1"); + } + labels = new ArrayList(); + while (resultset.next()) { + labels.add(resultset.getString(1)); + } + + barChartDataObjOut.setLabels(labels); + } catch (SQLException ex) { + System.out.println("Error Occurred during processing."); + } finally { + try { + statement.close(); + connection.close(); + resultset.close(); + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + } + + try { + connection = LoginDb.DbHandler.getDBConnection(); + proc = connection.prepareCall("{ ?=call Dashboard_Query(?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + datasets = new ArrayList(); + + proc.registerOutParameter(1, OracleTypes.CURSOR); + proc.setString(2, fromDate); + proc.setString(3, toDate); + proc.setString(4, distCode); + proc.setString(5, reportSelection); + + proc.executeUpdate(); + + rs = (ResultSet) proc.getObject(1); + + int k = 0; + String x = ""; + rs.next(); + while (true) { + + if (i % labels.size() == 0) { + datasetsObj = new datasets(); + color = randColors.get(k++); + x = rs.getString(1); + datasetsObj.setLabel(x); + datasetsObj.setBackgroundColor(color); + data = new ArrayList(); + + if ((rs.getString(2).equalsIgnoreCase(labels.get(i))) && (x.equalsIgnoreCase(rs.getString(1)))) { + data.add(rs.getInt(3)); + rs.next(); + } else { + + data.add(0); + } + } else if (i % labels.size() == labels.size() - 1) { + if ((rs.getString(2).equalsIgnoreCase(labels.get(i))) && (x.equalsIgnoreCase(rs.getString(1)))) { + data.add(rs.getInt(3)); + if (rs.next() == false) { + datasetsObj.setData(data); + datasets.add(datasetsObj); + i = -1; + break; + } + } else { + data.add(0); + } + datasetsObj.setData(data); + datasets.add(datasetsObj); + i = -1; + + + + } else { + if ((rs.getString(2).equalsIgnoreCase(labels.get(i))) && (x.equalsIgnoreCase(rs.getString(1)))) { + data.add(rs.getInt(3)); + rs.next(); + } else { + data.add(0); + } + } + i++; + String y = rs.getString(2); + String z = rs.getString(1); + } + barChartDataObjOut.setDatasets(datasets); + + } catch (Exception ex) { + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + try { + rs.close(); + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + // return barChartDataObjOut; + } + try { + connection.close(); + } catch (SQLException ex) { + System.out.println("Error Occurred during connection close."); + } + } + return barChartDataObjOut; + } + + public barChartData getGraphData4(String toDate, String fromDate, String distCode, String reportSelection) { + + barChartData barChartDataObjOut = null; + ArrayList labels = null; + ArrayList datasets = null; + datasets datasetsObj = null; + ArrayList data = null; + ArrayList randColors = null; + String color = null; + + int i = 0; + randColors = new Generate_100_Random_Colors().genRandColors(); + barChartDataObjOut = new barChartData(); + barChartDataObjOut.setHeader("CROP-WISE LOAN RECOVERY"); + + try { + connection = LoginDb.DbHandler.getDBConnection(); + statement = connection.createStatement(); + + if (!(distCode.equalsIgnoreCase(""))) { + resultset = statement.executeQuery("select distinct q.loan_date from (select p.intt_cat_desc Crop_Name,to_char(da.acct_open_dt,'YYYY') Loan_Date,count(*) No_Of_Loans from dep_account da,dep_product p,kyc_details kd,pacs_master pm, (select distinct dccb_code,dccb_name from dccb_br_map) m where da.dep_prod_id=p.id and da.curr_status='C' and da.pacs_id=pm.pacs_id and kd.cif_no=da.customer_no and pm.dccb_code=m.dccb_code and da.acct_open_dt between to_date('" + fromDate + "','dd/mm/yyyy') and to_date('" + toDate + "','dd/mm/yyyy') and m.dccb_code='" + distCode + "' group by to_char(da.acct_open_dt,'YYYY'),p.intt_cat_desc order by p.intt_cat_desc,to_char(da.acct_open_dt,'YYYY')) q order by 1"); + } else { + resultset = statement.executeQuery("select distinct q.loan_date from (select p.intt_cat_desc Crop_Name,to_char(da.acct_open_dt,'YYYY') Loan_Date,count(*) No_Of_Loans from dep_account da,dep_product p,kyc_details kd,pacs_master pm, (select distinct dccb_code,dccb_name from dccb_br_map) m where da.dep_prod_id=p.id and da.curr_status='C' and da.pacs_id=pm.pacs_id and kd.cif_no=da.customer_no and pm.dccb_code=m.dccb_code and da.acct_open_dt between to_date('" + fromDate + "','dd/mm/yyyy') and to_date('" + toDate + "','dd/mm/yyyy') group by to_char(da.acct_open_dt,'YYYY'),p.intt_cat_desc order by p.intt_cat_desc,to_char(da.acct_open_dt,'YYYY')) q order by 1"); + } + labels = new ArrayList(); + while (resultset.next()) { + labels.add(resultset.getString(1)); + } + + + barChartDataObjOut.setLabels(labels); + } catch (SQLException ex) { + System.out.println("Error Occurred during processing."); + + } finally { + try { + statement.close(); + connection.close(); + resultset.close(); + + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + + } + + try { + connection = LoginDb.DbHandler.getDBConnection(); + proc = connection.prepareCall("{ ?=call Dashboard_Query(?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + datasets = new ArrayList(); + + proc.registerOutParameter(1, OracleTypes.CURSOR); + proc.setString(2, fromDate); + proc.setString(3, toDate); + proc.setString(4, distCode); + proc.setString(5, reportSelection); + + proc.executeUpdate(); + + rs = (ResultSet) proc.getObject(1); + int k = 0; + String x = ""; + rs.next(); + + while (true) { + + if (i % labels.size() == 0) { + datasetsObj = new datasets(); + color = randColors.get(k++); + x = rs.getString(1); + datasetsObj.setLabel(x); + datasetsObj.setBackgroundColor(color); + data = new ArrayList(); + + if ((rs.getString(2).equalsIgnoreCase(labels.get(i))) && (x.equalsIgnoreCase(rs.getString(1)))) { + data.add(rs.getInt(3)); + rs.next(); + } else { + + data.add(0); + } + } else if (i % labels.size() == labels.size() - 1) { + if ((rs.getString(2).equalsIgnoreCase(labels.get(i))) && (x.equalsIgnoreCase(rs.getString(1)))) { + data.add(rs.getInt(3)); + if (rs.next() == false) { + datasetsObj.setData(data); + datasets.add(datasetsObj); + i = -1; + break; + } + } else { + data.add(0); + } + datasetsObj.setData(data); + datasets.add(datasetsObj); + i = -1; + + + + } else { + if ((rs.getString(2).equalsIgnoreCase(labels.get(i))) && (x.equalsIgnoreCase(rs.getString(1)))) { + data.add(rs.getInt(3)); + rs.next(); + } else { + data.add(0); + } + } + i++; + String y = rs.getString(2); + String z = rs.getString(1); + } + barChartDataObjOut.setDatasets(datasets); + + } catch (Exception ex) { + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during proc close."); + } + try { + rs.close(); + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + // return barChartDataObjOut; + } + try { + connection.close(); + } catch (SQLException ex) { + System.out.println("Error Occurred during connection close."); + } + } + return barChartDataObjOut; + } + + public barChartData getGraphData2(String toDate, String fromDate, String distCode, String reportSelection) { + + barChartData barChartDataObjOut = null; + ArrayList labels = null; + ArrayList datasets = null; + datasets datasetsObj = null; + ArrayList data = null; + ArrayList randColors = null; + String color = null; + + + int i = 0; + randColors = new Generate_100_Random_Colors().genRandColors(); + barChartDataObjOut = new barChartData(); + barChartDataObjOut.setHeader("LOAN OUTSTANDING vs LOAN RECOVERED"); + + try { + connection = LoginDb.DbHandler.getDBConnection(); + statement = connection.createStatement(); + + if (!(distCode.equalsIgnoreCase(""))) { + resultset = statement.executeQuery("select distinct intt_cat_desc from (select dp.intt_cat_desc, sum(case da.curr_status when 'O' then 1 else 0 end) loan_outst, sum(case da.curr_status when 'C' then 1 else 0 end) loan_rec, decode(da.curr_status,'O','Loan Outstanding','Loan Recovered') as status, 0 as total_loan, count(*) as loan_count from dep_account da, dep_product dp,pacs_master pm where dp.id=da.dep_prod_id and pm.pacs_id=da.pacs_id and da.acct_open_dt between to_date('" + fromDate + "','dd/mm/yyyy') and to_date('" + toDate + "','dd/mm/yyyy') and case when " + distCode + " is not null then case when pm.dccb_code=" + distCode + " then 1 else 0 end else 1 end=1 group by dp.intt_cat_desc,da.curr_status union all select dp.intt_cat_desc, 0,0,'Loan Disbursed',count(*),count(*) as loan_count from dep_account da, dep_product dp,pacs_master pm where dp.id=da.dep_prod_id and pm.pacs_id=da.pacs_id and da.acct_open_dt between to_date('" + fromDate + "','dd/mm/yyyy') and to_date('" + toDate + "','dd/mm/yyyy') and case when " + distCode + " is not null then case when pm.dccb_code=" + distCode + " then 1 else 0 end else 1 end=1 group by dp.intt_cat_desc) order by 1"); + } else { + resultset = statement.executeQuery("select distinct intt_cat_desc from (select dp.intt_cat_desc, sum(case da.curr_status when 'O' then 1 else 0 end) loan_outst, sum(case da.curr_status when 'C' then 1 else 0 end) loan_rec, decode(da.curr_status,'O','Loan Outstanding','Loan Recovered') as status, 0 as total_loan, count(*) as loan_count from dep_account da, dep_product dp,pacs_master pm where dp.id=da.dep_prod_id and pm.pacs_id=da.pacs_id and da.acct_open_dt between to_date('" + fromDate + "','dd/mm/yyyy') and to_date('" + toDate + "','dd/mm/yyyy') group by dp.intt_cat_desc,da.curr_status union all select dp.intt_cat_desc, 0,0,'Loan Disbursed',count(*),count(*) as loan_count from dep_account da, dep_product dp,pacs_master pm where dp.id=da.dep_prod_id and pm.pacs_id=da.pacs_id and da.acct_open_dt between to_date('" + fromDate + "','dd/mm/yyyy') and to_date('" + toDate + "','dd/mm/yyyy') group by dp.intt_cat_desc) order by 1"); + } + labels = new ArrayList(); + while (resultset.next()) { + labels.add(resultset.getString(1)); + } + + + barChartDataObjOut.setLabels(labels); + } catch (SQLException ex) { + System.out.println("Error Occurred during processing."); + } finally { + try { + statement.close(); + connection.close(); + resultset.close(); + + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + + } + + try { + connection = LoginDb.DbHandler.getDBConnection(); + proc = connection.prepareCall("{ ?=call Dashboard_Query(?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + datasets = new ArrayList(); + + proc.registerOutParameter(1, OracleTypes.CURSOR); + proc.setString(2, fromDate); + proc.setString(3, toDate); + proc.setString(4, distCode); + proc.setString(5, reportSelection); + + proc.executeUpdate(); + + rs = (ResultSet) proc.getObject(1); + + int k = 0; + String x = ""; + rs.next(); + for (i = 0; i < labels.size() * 3; i++) { + + if (i % labels.size() == 0) { + datasetsObj = new datasets(); + color = randColors.get(k++); + x = rs.getString(4); + datasetsObj.setLabel(x); + datasetsObj.setBackgroundColor(color); + data = new ArrayList(); + + if ((rs.getString(1).equalsIgnoreCase(labels.get(i % labels.size()))) && (x.equalsIgnoreCase("Loan Disbursed"))) { + data.add(rs.getInt(5)); + rs.next(); + } else if ((rs.getString(1).equalsIgnoreCase(labels.get(i % labels.size()))) && (x.equalsIgnoreCase("Loan Outstanding"))) { + data.add(rs.getInt(2)); + rs.next(); + } else { + if ((rs.getString(1).equalsIgnoreCase(labels.get(i % labels.size()))) && (x.equalsIgnoreCase("Loan Recovered"))) { + + data.add(rs.getInt(3)); + rs.next(); + } else { + data.add(0); + } + } + } else if (i % labels.size() == labels.size() - 1) { + if ((rs.getString(1).equalsIgnoreCase(labels.get(i % labels.size()))) && (x.equalsIgnoreCase("Loan Disbursed"))) { + data.add(rs.getInt(5)); + rs.next(); + } else if ((rs.getString(1).equalsIgnoreCase(labels.get(i % labels.size()))) && (x.equalsIgnoreCase("Loan Outstanding"))) { + data.add(rs.getInt(2)); + rs.next(); + } else { + if ((rs.getString(1).equalsIgnoreCase(labels.get(i % labels.size()))) && (x.equalsIgnoreCase("Loan Recovered"))) { + + data.add(rs.getInt(3)); + rs.next(); + } else { + data.add(0); + } + } + datasetsObj.setData(data); + datasets.add(datasetsObj); + + + + + } else { + if ((rs.getString(1).equalsIgnoreCase(labels.get(i % labels.size()))) && (x.equalsIgnoreCase("Loan Disbursed"))) { + data.add(rs.getInt(5)); + rs.next(); + } else if ((rs.getString(1).equalsIgnoreCase(labels.get(i % labels.size()))) && (x.equalsIgnoreCase("Loan Outstanding"))) { + data.add(rs.getInt(2)); + rs.next(); + } else { + if ((rs.getString(1).equalsIgnoreCase(labels.get(i % labels.size()))) && (x.equalsIgnoreCase("Loan Recovered"))) { + + data.add(rs.getInt(3)); + rs.next(); + } else { + data.add(0); + } + } + } + + + } + barChartDataObjOut.setDatasets(datasets); + + } catch (Exception ex) { + System.out.println("Error Occurred during processing."); + } finally { + try { + proc.close(); + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + rs.close(); + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + // return barChartDataObjOut; + } + try { + connection.close(); + } catch (SQLException ex) { + System.out.println("Error Occurred during connection close."); + } + } + return barChartDataObjOut; + } + + public barChartData getGraphData5(String toDate, String fromDate, String distCode, String reportSelection) { + + barChartData barChartDataObjOut = null; + ArrayList labels = null; + ArrayList datasets = null; + datasets datasetsObj1 = null; + datasets datasetsObj2 = null; + ArrayList data1 = null; + ArrayList data2 = null; + ArrayList randColors = null; + String color = null; + + + int i = 0; + randColors = new Generate_100_Random_Colors().genRandColors(); + barChartDataObjOut = new barChartData(); + barChartDataObjOut.setHeader("DCCB LOAN OUTSTANDING vs LOAN RECOVERED"); + + + try { + connection = LoginDb.DbHandler.getDBConnection(); + statement = connection.createStatement(); + + if (!(distCode.equalsIgnoreCase(""))) { + resultset = statement.executeQuery("select dccb_name from (select distinct m.dccb_name, SUM(CASE WHEN d.curr_status='C' and d.prin_outst=0 THEN 1 ELSE 0 END) LOAN_Recovered, SUM(CASE WHEN d.curr_status='O' and d.prin_outst<>0 THEN 1 ELSE 0 END) LOAN_Outstanding from dep_account d,dep_product dd,kyc_details kd,pacs_master pm, (select distinct dccb_code,dccb_name from dccb_br_map) m where d.dep_prod_id=dd.id and kd.cif_no=d.customer_no and d.pacs_id=pm.pacs_id and pm.dccb_code=m.dccb_code and d.acct_open_dt between to_date('" + fromDate + "','dd/mm/yyyy') and to_date('" + toDate + "','dd/mm/yyyy') and case when " + distCode + " is not null then case when m.dccb_code=" + distCode + " then 1 else 0 end else 1 end=1 GROUP BY m.dccb_name order by m.dccb_name) n"); + } else { + resultset = statement.executeQuery("select dccb_name from (select distinct m.dccb_name, SUM(CASE WHEN d.curr_status='C' and d.prin_outst=0 THEN 1 ELSE 0 END) LOAN_Recovered, SUM(CASE WHEN d.curr_status='O' and d.prin_outst<>0 THEN 1 ELSE 0 END) LOAN_Outstanding from dep_account d,dep_product dd,kyc_details kd,pacs_master pm, (select distinct dccb_code,dccb_name from dccb_br_map) m where d.dep_prod_id=dd.id and kd.cif_no=d.customer_no and d.pacs_id=pm.pacs_id and pm.dccb_code=m.dccb_code and d.acct_open_dt between to_date('" + fromDate + "','dd/mm/yyyy') and to_date('" + toDate + "','dd/mm/yyyy') GROUP BY m.dccb_name order by m.dccb_name) n"); + } + labels = new ArrayList(); + while (resultset.next()) { + labels.add(resultset.getString(1)); + } + + + barChartDataObjOut.setLabels(labels); + } catch (SQLException ex) { + System.out.println("Error Occurred during processing."); + } finally { + try { + statement.close(); + connection.close(); + resultset.close(); + + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during connection close."); + } + + } + + + try { + connection = LoginDb.DbHandler.getDBConnection(); + proc = connection.prepareCall("{ ?=call Dashboard_Query(?,?,?,?) }"); + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } finally { + try { + datasets = new ArrayList(); + + + proc.registerOutParameter(1, OracleTypes.CURSOR); + proc.setString(2, fromDate); + proc.setString(3, toDate); + proc.setString(4, distCode); + proc.setString(5, reportSelection); + + proc.executeUpdate(); + + rs = (ResultSet) proc.getObject(1); + int k = 0; + String x = ""; + rs.next(); + for (i = 0; i < labels.size(); i++) { + + if (i % labels.size() == 0) { + datasetsObj1 = new datasets(); + datasetsObj2 = new datasets(); + color = randColors.get(k++); + x = rs.getString(2); + datasetsObj1.setLabel(x); + datasetsObj2.setLabel(x); + datasetsObj1.setBackgroundColor(color); + datasetsObj2.setBackgroundColor(color); + data1 = new ArrayList(); + data2 = new ArrayList(); + + data1.add(rs.getInt(2)); + data2.add(rs.getInt(3)); + rs.next(); + + } else if (i % labels.size() == labels.size() - 1) { + + data1.add(rs.getInt(2)); + data2.add(rs.getInt(3)); + rs.next(); + + datasetsObj1.setData(data1); + datasets.add(datasetsObj1); + datasetsObj2.setData(data2); + datasets.add(datasetsObj2); + + + + + } else { + + data1.add(rs.getInt(2)); + data2.add(rs.getInt(3)); + rs.next(); + + } + + + } + barChartDataObjOut.setDatasets(datasets); + + } catch (Exception ex) { + System.out.println("Error Occurred during processing."); + } finally { + + try { + proc.close(); + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + try { + rs.close(); + } catch (SQLException ex) { + // Logger.getLogger(JsonDbHandler.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Error Occurred during processing."); + } + + // return barChartDataObjOut; + } + try { + connection.close(); + } catch (SQLException ex) { + System.out.println("Error Occurred during connection close."); + } + } + return barChartDataObjOut; + } + + public barChartData selectionGraph(String toDate, String fromDate, String distCode, String reportSelection) { + barChartData barChartDataObjOut = null; + barChartDataObjOut = new barChartData(); + if (reportSelection.equalsIgnoreCase("1")) { + barChartDataObjOut = getGraphData(toDate, fromDate, distCode, reportSelection); + } else if (reportSelection.equalsIgnoreCase("2")) { + barChartDataObjOut = getGraphData1(toDate, fromDate, distCode, reportSelection); + } else if (reportSelection.equalsIgnoreCase("4")) { + barChartDataObjOut = getGraphData3(toDate, fromDate, distCode, reportSelection); + } else if (reportSelection.equalsIgnoreCase("5")) { + barChartDataObjOut = getGraphData4(toDate, fromDate, distCode, reportSelection); + } else if (reportSelection.equalsIgnoreCase("3")) { + barChartDataObjOut = getGraphData2(toDate, fromDate, distCode, reportSelection); + } else if (reportSelection.equals("6")) { + barChartDataObjOut = getGraphData5(toDate, fromDate, distCode, reportSelection); + } + + return barChartDataObjOut; + } +} diff --git a/IPKS_Updated/src/src/java/LoginDb/DbConnection.java b/IPKS_Updated/src/src/java/LoginDb/DbConnection.java new file mode 100644 index 0000000..3c0f76d --- /dev/null +++ b/IPKS_Updated/src/src/java/LoginDb/DbConnection.java @@ -0,0 +1,81 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package LoginDb; + +import java.text.ParseException; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; + +/** + * + * @author 590685 + */ +public class DbConnection { + + public String[] validateUserLogin (String userId, String password, String PacsId) throws SQLException{ + Connection connection = null; + ResultSet resultset = null; + Statement statement = null; + String[] ans = new String[4]; + + String ExistPassword = null; // initializatoin changed to null for SAST + String ipAddress = ""; + String Flag = ""; + String pacs = ""; + + + try { + + + connection =DbHandler.getDBConnection(); + + statement = connection.createStatement(); + + //look at " for table name + ResultSet rs = statement.executeQuery("SELECT password, ip_flag, static_ip, pacs_Id FROM login_details where login_id= '" + userId + "' and pacs_id='" + PacsId + "'"); + + //print the result set + while (rs.next()) + { + + ExistPassword = rs.getString("password"); + ipAddress = rs.getString("static_ip"); + Flag = rs.getString("ip_flag"); + pacs = rs.getString("pacs_Id"); + } + + ans[0] = ExistPassword; + ans[1] = ipAddress; + ans[2] = Flag; + ans[3] = pacs; + +// statement.close(); +// connection.close(); + + } catch (SQLException ex) + { + // ex.printStackTrace(); + System.out.println("Error Occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + return ans; + } + +} \ No newline at end of file diff --git a/IPKS_Updated/src/src/java/LoginDb/DbHandler.java b/IPKS_Updated/src/src/java/LoginDb/DbHandler.java new file mode 100644 index 0000000..cef5a49 --- /dev/null +++ b/IPKS_Updated/src/src/java/LoginDb/DbHandler.java @@ -0,0 +1,110 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package LoginDb; + +/** + * + * @author 590685 + */ +import java.sql.*; +import java.sql.Connection; +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.naming.NamingException; +import javax.sql.DataSource; + +public class DbHandler { +// private static final String DB_DRIVER = "oracle.jdbc.driver.OracleDriver"; +// private static final String DB_CONNECTION = "jdbc:oracle:thin:@172.18.15.109:1521:INSP"; +// private static final String DB_USER = "pacsdata"; +// private static final String DB_PASSWORD = "pacsdata"; + + public static Connection getDBConnection() { +// String dbUrl = ""; +// String dbUsr = ""; +// String dbPass = ""; +// String dbSchema = ""; + + Connection dbConnection = null; + +// try { +// Class.forName(DB_DRIVER); +// }catch (ClassNotFoundException e) { +// System.out.println(e.getMessage()); +// } +// try { +// dbConnection = DriverManager.getConnection(DB_CONNECTION, DB_USER,DB_PASSWORD); +// return dbConnection; +// }catch (SQLException e) { +// System.out.println(e.getMessage()); +// } + String DATASOURCE_CONTEXT = "java:comp/env/jdbc/conDS"; + try { + Context initialContext = new InitialContext(); + if (initialContext == null) { + System.out.println("JNDI problem. Cannot get InitialContext."); + } + DataSource datasource = (DataSource) initialContext.lookup(DATASOURCE_CONTEXT); + if (datasource != null) { + dbConnection = datasource.getConnection(); + } else { + System.out.println("Failed to lookup datasource."); + } + } catch (NamingException ex) { + // System.out.println("Cannot get connection: " + ex); + } catch (SQLException ex) { + // System.out.println("Cannot get connection: " + ex); + } finally { + System.out.println("Processing done."); + } + +// try { +// // InputStream input = DbHandler.class.getClassLoader().getResourceAsStream("config.properties"); +// Properties prop = new Properties(); +// +// InputStream input = LoginDb.DbHandler.class.getResourceAsStream("config.properties"); +// prop.load(input); +// // Properties prop = new Properties(); +// if (prop == null) { +// System.out.println("Sorry, unable to find config.properties"); +// +// } +// +// dbUrl = prop.getProperty("DB_URL"); +// dbUsr = prop.getProperty("DB_USER"); +// dbPass = prop.getProperty("DB_PASS"); +// dbSchema = prop.getProperty("DB_SCHEMA"); +// +// } catch (Exception e) { +// System.out.println(e.getMessage()); +// } +// +// try { +// try{ +// LoginDb.DbHandler.class.forName(DB_DRIVER); +// }catch (ClassNotFoundException e) { +// System.out.println(e.getMessage()); +// } +// +// dbConnection = DriverManager.getConnection(dbUrl, dbUsr, dbPass); +// if (dbConnection == null) { +// System.out.println("Cannot get connection."); +// } +// } catch(SQLException ex){ +// System.out.println("Cannot get connection: " + ex); +// } + return dbConnection; + } + + public static void closeDbConnection(Connection conn) throws SQLException { + try { + conn.close(); + } catch (SQLException ex) { + // ex.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + + } +} diff --git a/IPKS_Updated/src/src/java/LoginDb/OtpUtility.java b/IPKS_Updated/src/src/java/LoginDb/OtpUtility.java new file mode 100644 index 0000000..a3b5b97 --- /dev/null +++ b/IPKS_Updated/src/src/java/LoginDb/OtpUtility.java @@ -0,0 +1,203 @@ +package LoginDb; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import javax.servlet.ServletException; +import org.json.JSONException; +import org.json.JSONObject; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class OtpUtility { + + static String endpoint1 = "https://api.digilexa.in/v1/verify"; + static String endpoint2 = "https://api.digilexa.in/v1/verify/validate"; + + public String sendOtp(String user, String pacsId, HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + //connects to dB and fetch apiKey, configId, phone number + + StringBuffer response = null; + String verifyId = ""; + String phoneNumber = ""; + String apiKey = ""; + String configId = ""; + + Connection connection = null; + Statement statement = null; + ResultSet rs = null; + try { + connection = DbHandler.getDBConnection(); + statement = connection.createStatement(); + // rs = statement.executeQuery("select ld.MOBILE_NO, md.CONFIG_ID, md.API_KEY from LOGIN_DETAILS ld JOIN USER_MFA_DETAILS md ON ld.PACS_ID = md.pacs_id where ld.PACS_ID='" + pacsId + "' and ld.LOGIN_ID='" + user + "'"); + //System.out.println("query executed successfully to fetch mob nom, api key etc."); + while (rs.next()) { + phoneNumber = rs.getString("MOBILE_NO"); + configId = rs.getString("CONFIG_ID"); + apiKey = rs.getString("API_KEY"); + //System.out.println("phone numnber is: " + phoneNumber + "configId is: " + configId + "apiKkey is: " + apiKey); + } + + } catch (SQLException ee) { + //ee.printStackTrace(); + } finally { + try { + statement.close(); + connection.close(); + rs.close(); + } catch (SQLException ee) { + //System.out.println("Error Occurred during connection close."); + } catch (NullPointerException npe) { + // + } + } + + try { + URL url = new URL(endpoint1); + HttpURLConnection urlconnection = (HttpURLConnection) url.openConnection(); + urlconnection.setRequestMethod("POST"); + urlconnection.setRequestProperty("Content-Type", "application/json"); + urlconnection.setRequestProperty("apikey", apiKey); + urlconnection.setDoOutput(true); + + String requestBody = "{\"configId\": \"" + configId + "\", \"to\": \"" + phoneNumber + "\"}"; + //System.out.println("-------------------------check------------------------------"); + OutputStream os = urlconnection.getOutputStream(); + os.write(requestBody.getBytes()); + os.flush(); + //System.out.println("-------------------------check------------------------------"); + int responseCode = urlconnection.getResponseCode(); + //System.out.println("Response Code: " + responseCode); + + BufferedReader br = null; + if (responseCode == 200) { + // br = new BufferedReader(new InputStreamReader(urlconnection.getInputStream())); + }else{ + br = new BufferedReader(new InputStreamReader(urlconnection.getErrorStream())); + } + String inputLine; + response = new StringBuffer(); + + // while ((inputLine = br.readLine()) != null) { + response.append(inputLine); + } + br.close(); + + //System.out.println("Response Body: " + response.toString()); + } catch (MalformedURLException mu) { + mu.printStackTrace(); + req.setAttribute("error", "Error in otp genertion."); + req.getRequestDispatcher("/Login.jsp").forward(req, res); + req.getSession().invalidate(); + } catch (IOException ie) { + ie.printStackTrace(); + req.setAttribute("error", "Error in otp genertion."); + req.getRequestDispatcher("/Login.jsp").forward(req, res); + req.getSession().invalidate(); + } + + try { + String responseString = response.toString(); + JSONObject jsonResponse = new JSONObject(responseString); // Parse the response string into a JSON object + verifyId = jsonResponse.getString("verifyId");// Extract the verifyId field + //System.out.println("Verify ID: " + verifyId); + + } catch (JSONException je) { + //je.printStackTrace(); + } + return verifyId; + //return "this is demo verify id"; + } + + public String verifyValidateOtp(String verifyId, String otp, String user, String pacsId) { + StringBuffer response = null; + String message = null; + String apiKey = ""; + Connection connection = null; + Statement statement = null; + ResultSet rs = null; + try { + connection = DbHandler.getDBConnection(); + statement = connection.createStatement(); + // rs = statement.executeQuery("select API_KEY from USER_MFA_DETAILS where PACS_ID='" + pacsId + "'"); + //System.out.println("query executed successfully fetch otp"); + while (rs.next()) { + apiKey = rs.getString("API_KEY"); + //System.out.println("while verifying the api key is---------- " + apiKey); + } + + } catch (SQLException ee) { + //ee.printStackTrace(); + } finally { + try { + statement.close(); + connection.close(); + rs.close(); + } catch (SQLException ee) { + //System.out.println("Error Occurred during connection close."); + } + } + + try { + URL url = new URL(endpoint2); + HttpURLConnection urlconnection = (HttpURLConnection) url.openConnection(); + urlconnection.setRequestMethod("POST"); + urlconnection.setRequestProperty("Content-Type", "application/json"); + urlconnection.setRequestProperty("apikey", apiKey); + urlconnection.setDoOutput(true); + //System.out.println("otp entered from the screen isn :--------- " + otp); + String requestBody = "{\"verifyId\": \"" + verifyId + "\", \"otp\": \"" + otp + "\"}"; + + OutputStream os = urlconnection.getOutputStream(); + os.write(requestBody.getBytes()); + os.flush(); + + int responseCode = urlconnection.getResponseCode(); + //System.out.println("Response Code duing verification is-------- : " + responseCode); + BufferedReader br = null; + + if (responseCode == 200) { + // br = new BufferedReader(new InputStreamReader(urlconnection.getInputStream())); + } else//example 401 or 500 + { + br = new BufferedReader(new InputStreamReader(urlconnection.getErrorStream())); + } + + String inputLine; + response = new StringBuffer(); + + // while ((inputLine = br.readLine()) != null) { + response.append(inputLine); + } + br.close(); + + //System.out.println("Response Body: " + response.toString()); + } catch (MalformedURLException mu) { + //mu.printStackTrace(); + } catch (IOException ie) { + //ie.printStackTrace(); + } + try { + String responseString = response.toString(); + JSONObject jsonResponse = new JSONObject(responseString); // Parse the response string into a JSON object + message = jsonResponse.getString("message");// Extract the verifyId field + //System.out.println("message: " + message); + + } catch (JSONException je) { + //je.printStackTrace(); + } + //System.out.println("message after verfication is:------" + message); + return message; + + //return "OTP Verified Successfully!"; + } + +} diff --git a/IPKS_Updated/src/src/java/LoginDb/SimpleCrypt.java b/IPKS_Updated/src/src/java/LoginDb/SimpleCrypt.java new file mode 100644 index 0000000..c83e17e --- /dev/null +++ b/IPKS_Updated/src/src/java/LoginDb/SimpleCrypt.java @@ -0,0 +1,42 @@ +package LoginDb; + +import javax.swing.*; +import sun.misc.BASE64Encoder; +//import java.util.Base64; + +public class SimpleCrypt { + + public static String doEnrcypt(String sArgument) { + String encoded = null; + + try { + String secret = new String(encrypt(sArgument)); + sun.misc.BASE64Encoder encoder = new sun.misc.BASE64Encoder(); + // encoded = encoder.encode(secret.getBytes()); + + //encoded = Base64.getEncoder().encodeToString(secret.getBytes()); //strictly from jdk 9 or later + System.out.println("the encrypted result : " + encoded); + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Exception occurred during password encryption."); + } finally { + System.out.println("Processing done."); + } + return encoded; + } + + public static byte[] encrypt(String x) { + java.security.MessageDigest d = null; + + try { + d = java.security.MessageDigest.getInstance("SHA-256");//SHA-1 + d.reset(); + d.update(x.getBytes()); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + System.out.println("Processing done."); + } + return d.digest(); + } +} diff --git a/IPKS_Updated/src/src/java/LoginDb/config.properties b/IPKS_Updated/src/src/java/LoginDb/config.properties new file mode 100644 index 0000000..6040b1f --- /dev/null +++ b/IPKS_Updated/src/src/java/LoginDb/config.properties @@ -0,0 +1,6 @@ +# To change this template, choose Tools | Templates +# and open the template in the editor. +DB_URL=jdbc:oracle:thin:@testforipks.c7q7defafeea.ap-south-1.rds.amazonaws.com:1521:IPKS +DB_USER=ipks_test +DB_PASS=ipks_test +DB_SCHEMA=ipks_test diff --git a/IPKS_Updated/src/src/java/LoginDb/passwordEncryption.java b/IPKS_Updated/src/src/java/LoginDb/passwordEncryption.java new file mode 100644 index 0000000..0d6462c --- /dev/null +++ b/IPKS_Updated/src/src/java/LoginDb/passwordEncryption.java @@ -0,0 +1,28 @@ +package LoginDb; + +/** + * + * @author 590685 + */ + + +public class passwordEncryption { + + public static String Encr_pass(String plainText,String secretKey) + { + { + StringBuffer encryptedString = new StringBuffer(); + int encryptedInt; + secretKey+=plainText; + for (int i = 0; i < plainText.length(); i++) { + int plainTextInt = (int) (plainText.charAt(i) - 'A'); + int secretKeyInt = (int) (secretKey.charAt(i) - 'A'); + encryptedInt = (plainTextInt + secretKeyInt) % 26; + encryptedString.append((char) ((encryptedInt) + (int) 'A')); + } + return encryptedString.toString(); + } + } + +} + diff --git a/IPKS_Updated/src/src/java/Passbook/PassbookPrinter.java b/IPKS_Updated/src/src/java/Passbook/PassbookPrinter.java new file mode 100644 index 0000000..656463d --- /dev/null +++ b/IPKS_Updated/src/src/java/Passbook/PassbookPrinter.java @@ -0,0 +1,275 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package Passbook; + +/** + * + * @author IPKS + */ +import DataEntryBean.PassbookBean; +import java.awt.Font; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.print.Book; +import java.awt.print.PageFormat; +import java.awt.print.Paper; +import java.awt.print.Printable; +import java.awt.print.PrinterException; +import java.awt.print.PrinterJob; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.InputStream; +import java.text.DecimalFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Properties; + +public class PassbookPrinter implements Printable { + + private String accNo; + private static ArrayList arr = new ArrayList(); + private static double width = 7.5d * 72d; + private static double height = 7.3d * 72d; + private static double margin = 5d; + private static double header = 10; + private static double date_width = 30; + private static double nara_width = 250; + private static double cheque_width = 60; + private static double withdraw_width = 50; + private static double deposit_width = 50; + private static double no_of_lines = 17; + private static double gap = 3; + public boolean successFlag = false; + + public PassbookPrinter(ArrayList alPassbookBean) { + // TODO Auto-generated constructor stub + //accNo = arg0; + + //InputStream inputStream = null; + + try { + Properties prop = new Properties(); + String propFileName = "config.properties"; + String absolute = getClass().getProtectionDomain().getCodeSource().getLocation().toExternalForm(); + absolute = absolute.substring(absolute.indexOf("/") + 1, absolute.lastIndexOf("/") + 1); + System.out.println(absolute); + absolute = absolute.replace('\\', '/'); + absolute = absolute.concat(propFileName); + + + prop.load(new FileInputStream(absolute)); + + System.out.println(absolute); + //throw new FileNotFoundException("property file '" + propFileName + "' not found in the classpath"); + System.out.println("width: " + width); + + + width = Double.parseDouble(prop.getProperty("WIDTH")); + height = Double.parseDouble(prop.getProperty("HEIGHT")); + margin = Double.parseDouble(prop.getProperty("MARGIN")); + header = Double.parseDouble(prop.getProperty("HEADER")); + date_width = Double.parseDouble(prop.getProperty("DATE_WIDTH")); + nara_width = Double.parseDouble(prop.getProperty("NARA_WIDTH")); + cheque_width = Double.parseDouble(prop.getProperty("CHEQUE_WIDTH")); + withdraw_width = Double.parseDouble(prop.getProperty("WITHDRAW_WIDTH")); + deposit_width = Double.parseDouble(prop.getProperty("DEPOSIT_WIDTH")); + no_of_lines = Double.parseDouble(prop.getProperty("NO_OF_LINES")); + gap = Double.parseDouble(prop.getProperty("GAP")); + + System.out.println("width: " + width); + //inputStream.close(); + + } catch (Exception e) { + // System.out.println("Exception: " + e); + System.out.println("width: " + width); + + } finally { + System.out.println("Processing done."); + } + + + double bal = 17563.89; + DecimalFormat df2 = new DecimalFormat(".##"); + int i; + + PassbookBean oPassbookBean = null; + + for (i = 0; i < alPassbookBean.size(); i++) { + + oPassbookBean = alPassbookBean.get(i); + /*String seq = "" + Calendar.getInstance().getTimeInMillis(); + int l = seq.length(); + int a = Integer.parseInt(seq.substring(l - 3, l)); + double e = 3.4; + double d = a * i * e; + + bal = bal + d; + arr.add("05-07-17,NARRATION TEXT " + i + ",,," + df2.format(d) + "," + df2.format(bal));*/ + String addToPrinter; + addToPrinter = blankNull(oPassbookBean.getTxn_date()); + addToPrinter = addToPrinter + "," + blankNull(oPassbookBean.getNarration()); + + if (!(oPassbookBean.getDr_amt() == null || oPassbookBean.getCr_amt() == null)) { + if (!oPassbookBean.getDr_amt().equalsIgnoreCase("0")) { + addToPrinter = addToPrinter + "," + blankNull(oPassbookBean.getDr_amt()); + } else { + addToPrinter = addToPrinter + ",,"; + } + + if (!oPassbookBean.getCr_amt().equalsIgnoreCase("0")) { + addToPrinter = addToPrinter + "," + blankNull(oPassbookBean.getCr_amt()); + } else { + addToPrinter = addToPrinter + ",,"; + } + } else { + addToPrinter = addToPrinter + ",,"; + } + addToPrinter = addToPrinter + "," + blankNull(oPassbookBean.getEnd_bal()); + this.arr.add(addToPrinter); + System.out.println(this.getClass()); + //System.out.println(this.); + + } + + System.out.println("ArrayList size: " + this.arr.size()); + + PrinterJob job = PrinterJob.getPrinterJob(); + + PageFormat pf = job.defaultPage(); + Paper paper = pf.getPaper(); + + paper.setSize(width, height); + + paper.setImageableArea( + margin, + margin + header, + width - (margin * 2), + height - (margin * 2)); + + + System.out.println("Before- " + dump(paper)); + pf.setOrientation(PageFormat.PORTRAIT); + pf.setPaper(paper); + System.out.println("After- " + dump(paper)); + System.out.println("After- " + dump(pf)); + //dump(pf); + PageFormat validatePage = job.validatePage(pf); + System.out.println("Valid- " + dump(validatePage)); + + Book pBook = new Book(); + pBook.append(new PassbookPrinter(), pf); + + job.setPageable(pBook); + + //job.setPrintable(this); + boolean ok = job.printDialog(); + if (ok) { + try { + job.print(); + successFlag = true; + arr.clear(); + } catch (PrinterException e) { + // TODO Auto-generated catch block + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } + } + } + + public PassbookPrinter() { + // TODO Auto-generated constructor stub + } + + public String blankNull(String s) { + return (s == null) ? "" : s; + } + + protected static String dump(Paper paper) { + StringBuilder sb = new StringBuilder(64); + sb.append(paper.getWidth()).append("x").append(paper.getHeight()).append("/").append(paper.getImageableX()).append("x"). + append(paper.getImageableY()).append(" - ").append(paper.getImageableWidth()).append("x").append(paper.getImageableHeight()); + return sb.toString(); + } + + protected static String dump(PageFormat pf) { + Paper paper = pf.getPaper(); + return dump(paper); + } + + @Override + public int print(Graphics g, PageFormat pf, int page) + throws PrinterException { + // TODO Auto-generated method stub + System.out.println("print"); + + Graphics2D g2d = (Graphics2D) g; + g2d.translate(pf.getImageableX(), pf.getImageableY()); + + + g2d.setFont(new Font("TIMES NEW ROMAN", Font.PLAIN, 7)); + + System.out.println("ArrayList size: " + this.arr.size()); + + //int buff= 10; + double y = pf.getImageableY(); + for (int i = 1; i <= arr.size(); i++) { + //System.out.println(arr.get(i-1)); + //g2d.drawString(arr.get(i-1), 2, buff*i); + + double x = pf.getImageableX(); + + + if (i != 1) { + if (i == no_of_lines) { + y = (gap * 10) + (y + 10); + } else { + y = y + 10; + } + } + + + String[] tokens = arr.get(i - 1).split(","); + + for (int j = 0; j < tokens.length; j++) { + + switch (j) { + + case 1: + //Narration + x = x + date_width; + break; + case 2: + //Cheque + x = x + nara_width; + break; + case 3: + //Withdraw + x = x + cheque_width; + break; + case 4: + //Deposit + x = x + withdraw_width; + break; + + case 5: + //Bal + x = x + deposit_width; + break; + } + + g2d.drawString(tokens[j], (int) x, (int) y); + + } + + + System.out.println(i); + } + + //tell the caller that this page is part of the printed document + return PAGE_EXISTS; + + } +} + diff --git a/IPKS_Updated/src/src/java/Passbook/config.properties b/IPKS_Updated/src/src/java/Passbook/config.properties new file mode 100644 index 0000000..b565e8c --- /dev/null +++ b/IPKS_Updated/src/src/java/Passbook/config.properties @@ -0,0 +1,11 @@ +WIDTH=540 +HEIGHT=525 +MARGIN=5 +HEADER=38 +DATE_WIDTH=55 +NARA_WIDTH=220 +CHEQUE_WIDTH=60 +WITHDRAW_WIDTH=80 +DEPOSIT_WIDTH=60 +NO_OF_LINES=17 +GAP=3 \ No newline at end of file diff --git a/IPKS_Updated/src/src/java/ServiceLayer/CashWithdrawlDDSService.java b/IPKS_Updated/src/src/java/ServiceLayer/CashWithdrawlDDSService.java new file mode 100644 index 0000000..8ce72ec --- /dev/null +++ b/IPKS_Updated/src/src/java/ServiceLayer/CashWithdrawlDDSService.java @@ -0,0 +1,538 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package ServiceLayer; + +import DataEntryBean.MicroFileAccountDetBean; +//import com.lowagie.text.*; +// import com.lowagie.text.pdf.PdfPCell; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.InputStream; +import java.text.DecimalFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.Properties; + + +/** + * + * @author 1004242 + */ +public class CashWithdrawlDDSService { + + private static final String FILE_NAME = "transactionReciept"; + private static final String FILE_NAME_ALL_TRAN = "AllTransactionReciept"; + private static final String FILE_NAME_DETAIL_TRAN = "DetailTransactionReciept"; + private static DecimalFormat df2 = new DecimalFormat(".##"); + +// public PdfPCell getCell(String text, int alignment , Font f) { +// PdfPCell cell = new PdfPCell(new Phrase(text,f)); +// cell.setPadding(0); +// cell.setHorizontalAlignment(alignment); +// cell.setBorder(PdfPCell.NO_BORDER); +// return cell; +//} + +// public File createReceipt(MicroFileAccountDetBean accountDet , String agntCode , String agntName) { +// +// Document document = new Document();//new Rectangle(216,432) +// SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); +// SimpleDateFormat sdfTime = new SimpleDateFormat("HH:mm:ss"); +// double avlBl=0; +// File pdfReceipt =null; +// +// try { +// +// pdfReceipt = new File(FILE_NAME+System.currentTimeMillis()+".pdf"); +// PdfWriter.getInstance(document, new FileOutputStream(pdfReceipt)); +// Rectangle one = new Rectangle(155,180); +// document.setPageSize(one); +// document.setMargins(4, 4, 4, 2); +// +// Font f = new Font(); +// f.setStyle(Font.BOLD); +// f.setSize(15); +// +// Font f1 = new Font(); +// f1.setStyle(Font.BOLD); +// f.setSize(9); +// +// Font f2 = new Font(); +// f2.setSize(6); +// +// document.open(); +// +// String dateLine = "Date: "+ sdf.format(new Date()).toString(); +// String timeLine = "Time: "+ sdfTime.format(new Date()).toString(); +// PdfPTable table = new PdfPTable(2); +// table.setWidthPercentage(100); +// table.addCell(getCell(dateLine, PdfPCell.ALIGN_LEFT,f2)); +// table.addCell(getCell(timeLine, PdfPCell.ALIGN_RIGHT,f2)); +// document.add(table); +// +// +// String header = "CASH " + (accountDet.getTxnType().equalsIgnoreCase("CR") ? "DEPOSIT" : "WITHDRAWL"); +// Paragraph p2 = new Paragraph(header, f); +// p2.setAlignment(Element.ALIGN_CENTER); +// +// document.add(p2); +// document.add( new Chunk("------------------------------------") ); +// +// +// PdfPTable tableDetails = new PdfPTable(2); +// tableDetails .setWidthPercentage(100); +// +// tableDetails.addCell(getCell("Agent Code/Id", PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell(agntCode == null ? ": N/A":": "+agntCode, PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell("Agent Name", PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell(agntName == null ? ": N/A":": "+agntName, PdfPCell.ALIGN_LEFT,f2)); +// +// tableDetails.addCell(getCell("Transaction No", PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell(accountDet.getTxnRefNo()== null ? ": N/A":": "+accountDet.getTxnRefNo(), PdfPCell.ALIGN_LEFT,f2)); +// +// +// tableDetails.addCell(getCell("Account No", PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell(accountDet.getAccountCode()== null ? ": N/A":": "+accountDet.getAccountCode(), PdfPCell.ALIGN_LEFT,f2)); +// +// tableDetails.addCell(getCell("Account Holder Name", PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell(accountDet.getAccountName()== null ? ": N/A":": "+accountDet.getAccountName(), PdfPCell.ALIGN_LEFT,f2)); +// +// tableDetails.addCell(getCell("Product Type", PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell(accountDet.getProdType()== null ? ": N/A":": "+accountDet.getProdType(), PdfPCell.ALIGN_LEFT,f2)); +// +// tableDetails.addCell(getCell("Address1", PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell(accountDet.getAdd1()== null ? ": N/A":": "+accountDet.getAdd1(), PdfPCell.ALIGN_LEFT,f2)); +// +// tableDetails.addCell(getCell("Address2", PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell(accountDet.getAdd2()== null ? ": N/A" :": "+accountDet.getAdd2(), PdfPCell.ALIGN_LEFT,f2)); +// +// tableDetails.addCell(getCell("Address3", PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell(accountDet.getAdd3()== null ? ": N/A":": "+accountDet.getAdd3(), PdfPCell.ALIGN_LEFT,f2)); +// +// tableDetails.addCell(getCell("Pincode", PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell(": "+"N/A", PdfPCell.ALIGN_LEFT,f2)); +// +// tableDetails.addCell(getCell("ACC Open Date", PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell(accountDet.getAccntOpenDate()== null ? ": N/A":": "+accountDet.getAccntOpenDate(), PdfPCell.ALIGN_LEFT,f2)); +// +// tableDetails.addCell(getCell("Maturity/Due Date", PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell(accountDet.getAccntMatDate()== null ? ": N/A":": "+accountDet.getAccntMatDate(), PdfPCell.ALIGN_LEFT,f2)); +// +// tableDetails.addCell(getCell("Previous Balance", PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell(": "+String.valueOf(accountDet.getAvailBal()== 0 ? ": N/A":accountDet.getAvailBal()), PdfPCell.ALIGN_LEFT,f2)); +// +// tableDetails.addCell(getCell("Amount", PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell(": "+String.valueOf(accountDet.getCrTotal()== null ? ": N/A":accountDet.getCrTotal()), PdfPCell.ALIGN_LEFT,f2)); +// +// tableDetails.addCell(getCell("Available Balance", PdfPCell.ALIGN_LEFT,f2)); +// if(accountDet.getTxnType().equalsIgnoreCase("CR")) +// { +// avlBl = accountDet.getCrTotal()+accountDet.getAvailBal(); +// } +// else if(accountDet.getTxnType().equalsIgnoreCase("DR")) +// { +// avlBl =accountDet.getAvailBal()-accountDet.getCrTotal(); +// } +// tableDetails.addCell(getCell(": "+String.valueOf(avlBl== 0 ? ": N/A": avlBl), PdfPCell.ALIGN_LEFT,f2)); +// +// document.add(tableDetails); +// document.add( Chunk.NEWLINE ); +// String footer = "Thank you for banking with us"; +// Paragraph p3 = new Paragraph(footer, f2); +// p3.setAlignment(Element.ALIGN_CENTER); +// document.add(p3); +// +// document.close(); +// +// //Desktop.getDesktop().open( pdfReceipt); +// System.out.println("Done"); +// +// } catch (Exception e) { +// +// e.printStackTrace(); +// pdfReceipt = null; +// +// } +// return pdfReceipt; +// +// } + + public File createReceipt(MicroFileAccountDetBean accountDet , String agntCode , String agntName) { + + // Document document = new Document();//new Rectangle(216,432) + SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); + SimpleDateFormat sdfTime = new SimpleDateFormat("HH:mm:ss"); + double avlBl=0; + File pdfReceipt =null; + File file = null; + BufferedWriter writer = null; + + try { + ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); + InputStream input = classLoader.getResourceAsStream("Dao/BulkMarkSTB.properties"); + Properties properties = new Properties(); + properties.load(input); + + String APPLICATION_FOLDER_PATH = properties.getProperty("APPLICATION_FOLDER_PATH"); + + file = new File (APPLICATION_FOLDER_PATH+FILE_NAME+System.currentTimeMillis()+".txt"); + writer = new BufferedWriter(new FileWriter(file)); + writer.write("Date: "+ sdf.format(new Date()).toString()+" "); + writer.write( "Time: "+ sdfTime.format(new Date()).toString()); + writer.newLine(); + String header = " CASH " + (accountDet.getTxnType().equalsIgnoreCase("CR") ? "DEPOSIT" : "WITHDRAWL"); + writer.write(header); + writer.newLine(); + writer.write("------------------------------------"); + writer.newLine(); + writer.write("Agent Code/Id"+(agntCode == null ? ": N/A":": "+agntCode)); + writer.newLine(); + writer.write("Agent Name"+(agntName == null ? ": N/A":": "+agntName)); + writer.newLine(); + writer.write("Transaction No"+(accountDet.getTxnRefNo()== null ? ": N/A":": "+accountDet.getTxnRefNo())); + writer.newLine(); + writer.write("Account No"+(accountDet.getAccountCode()== null ? ": N/A":": "+accountDet.getAccountCode())); + writer.newLine(); + writer.write("Account Holder Name"+(accountDet.getAccountName()== null ? ": N/A":": "+accountDet.getAccountName())); + writer.newLine(); + writer.write("Product Type"+(accountDet.getProdType()== null ? ": N/A":": "+accountDet.getProdType())); + writer.newLine(); + writer.write("Txn Amount"+String.valueOf(accountDet.getCrTotal()== null ? ": N/A":": "+accountDet.getCrTotal())); + writer.newLine(); +// writer.write("Address1"+(accountDet.getAdd1()== null ? ": N/A":": "+accountDet.getAdd1())); +// writer.newLine(); +// writer.write("Address2"+(accountDet.getAdd2()== null ? ": N/A" :": "+accountDet.getAdd2())); +// writer.newLine(); +// writer.write("Address3"+(accountDet.getAdd3()== null ? ": N/A":": "+accountDet.getAdd3())); +// writer.newLine(); +// writer.write("Pincode"+": "+"N/A"); +// writer.newLine(); +// writer.write("ACC Open Date"+(accountDet.getAccntOpenDate()== null ? ": N/A":": "+accountDet.getAccntOpenDate())); +// writer.newLine(); +// writer.write("Maturity/Due Date"+(accountDet.getAccntMatDate()== null ? ": N/A":": "+accountDet.getAccntMatDate())); +// writer.newLine(); + writer.write("Previous Balance"+": "+String.valueOf(accountDet.getAvailBal()== 0 ? ": N/A":accountDet.getAvailBal())); + writer.newLine(); + if(accountDet.getTxnType().equalsIgnoreCase("CR")) + { + avlBl = accountDet.getCrTotal()+accountDet.getAvailBal(); + } + else if(accountDet.getTxnType().equalsIgnoreCase("DR")) + { + avlBl =accountDet.getAvailBal()-accountDet.getCrTotal(); + } + writer.write("Available Balance"+": "+String.valueOf(avlBl== 0 ? ": N/A": avlBl)); + writer.newLine(); + writer.write("Thank you for banking with us"); + writer.newLine(); + writer.newLine(); + writer.newLine(); + writer.newLine(); + writer.flush(); + writer.close(); + + + //Desktop.getDesktop().open( file); + System.out.println("Done"); + + } catch (Exception e) { + + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + file = null; + + } finally { + System.out.println("Processing done."); + } + return file; + + } + + +// public File createAllTransactionReceipt(MicroFileAccountDetBean accountDet , String agntCode , String agntName , String pacsId) { +// +// Document document = new Document();//new Rectangle(216,432) +// SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); +// File pdfReceipt =null; +// +// try { +// +// pdfReceipt = new File(FILE_NAME_ALL_TRAN+System.currentTimeMillis()+".pdf"); +// PdfWriter.getInstance(document, new FileOutputStream(pdfReceipt)); +// Rectangle one = new Rectangle(155,110); +// document.setPageSize(one); +// document.setMargins(4, 4, 4, 2); +// +// Font f = new Font(); +// f.setStyle(Font.BOLD); +// f.setSize(15); +// +// Font f1 = new Font(); +// f1.setStyle(Font.BOLD); +// f.setSize(9); +// +// Font f2 = new Font(); +// f2.setSize(6); +// +// document.open(); +// +// String header = "TOTAL TRANSACTION"; +// Paragraph p2 = new Paragraph(header, f); +// p2.setAlignment(Element.ALIGN_CENTER); +// +// document.add(p2); +// document.add( new Chunk("------------------------------------") ); +// +// String dateLine = accountDet.getAccntMaturityDate(); +// +// PdfPTable tableDetails = new PdfPTable(2); +// tableDetails.setWidthPercentage(100); +// +// +// tableDetails.addCell(getCell("Transaction Date", PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell(dateLine == null ? ": N/A":": "+dateLine, PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell("Id", PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell(agntCode == null ? ": N/A":": "+agntCode, PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell("Name", PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell(agntName == null ? ": N/A":": "+agntName, PdfPCell.ALIGN_LEFT,f2)); +// +// tableDetails.addCell(getCell("Total Deposit", PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell(": "+String.valueOf(accountDet.getDrTotal()== 0 ? ": N/A":accountDet.getDrTotal()), PdfPCell.ALIGN_LEFT,f2)); +// +// tableDetails.addCell(getCell("Total Withdrawl", PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell(": "+String.valueOf(accountDet.getCrTotal()== 0 ? ": N/A":accountDet.getCrTotal()), PdfPCell.ALIGN_LEFT,f2)); +// +// tableDetails.addCell(getCell("Total Transaction", PdfPCell.ALIGN_LEFT,f2)); +// tableDetails.addCell(getCell(": "+String.valueOf(accountDet.getCrTotal()+ accountDet.getDrTotal()== 0 ? ": N/A":accountDet.getCrTotal()+accountDet.getDrTotal()), PdfPCell.ALIGN_LEFT,f2)); +// +// document.add(tableDetails); +// document.add( Chunk.NEWLINE ); +// +// document.close(); +// //Desktop.getDesktop().open( pdfReceipt); +// +// +// } catch (Exception e) { +// +// e.printStackTrace(); +// pdfReceipt = null; +// +// } +// return pdfReceipt; +// +// } + + public File createAllTransactionReceipt(MicroFileAccountDetBean accountDet , String agntCode , String agntName , String pacsId) { + + // Document document = new Document();//new Rectangle(216,432) + SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); + File file = null; + BufferedWriter writer = null; + + try { + ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); + InputStream input = classLoader.getResourceAsStream("Dao/BulkMarkSTB.properties"); + Properties properties = new Properties(); + properties.load(input); + + String APPLICATION_FOLDER_PATH = properties.getProperty("APPLICATION_FOLDER_PATH"); + + file = new File (APPLICATION_FOLDER_PATH+FILE_NAME_ALL_TRAN+System.currentTimeMillis()+".txt"); + writer = new BufferedWriter(new FileWriter(file)); + + String header = " TOTAL TRANSACTION"; + writer.write(header); + writer.newLine(); + writer.write("------------------------------------"); + writer.newLine(); + String dateLine = accountDet.getAccntMaturityDate(); + writer.write("Transaction Date"+(dateLine == null ? ": N/A":": "+dateLine)); + writer.newLine(); + writer.write("Id"+(agntCode == null ? ": N/A":": "+agntCode)); + writer.newLine(); + writer.write("Name"+(agntName== null ? ": N/A":": "+agntName)); + writer.newLine(); + writer.write("Total Deposit"+String.valueOf(accountDet.getCrTotal()== 0 ? ": N/A":": "+accountDet.getCrTotal())); + writer.newLine(); + writer.write("Total Withdrawl"+String.valueOf(accountDet.getDrTotal()== 0 ? ": N/A":": "+accountDet.getDrTotal())); + writer.newLine(); + writer.write("Total Transaction"+String.valueOf(accountDet.getCrTotal()+ accountDet.getDrTotal()== 0 ? ": N/A":": "+ accountDet.getCrTotal()+accountDet.getDrTotal())); + writer.newLine(); + writer.newLine(); + writer.newLine(); + writer.newLine(); + writer.flush(); + writer.close(); + System.out.println("Done"); + + } catch (Exception e) { + + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + file = null; + + } finally { + System.out.println("Processing done."); + } + return file; + + + } + +// public File createTransactionReceiptDetailed( ArrayList accountDetlist){ +// +// Document document = new Document();//new Rectangle(216,432) +// File pdfReceipt =null; +// +// try { +// +// String file = FILE_NAME_DETAIL_TRAN+System.currentTimeMillis()+".pdf"; +// pdfReceipt = new File(file); +// PdfWriter.getInstance(document, new FileOutputStream(pdfReceipt)); +// Rectangle one = new Rectangle(155,accountDetlist.size() *13 + 60 ); +// document.setPageSize(one); +// document.setMargins(4, 4, 4, 2); +// +// Font f = new Font(); +// f.setStyle(Font.BOLD); +// f.setSize(15); +// +// Font f1 = new Font(); +// f1.setStyle(Font.BOLD); +// f.setSize(9); +// +// Font f2 = new Font(); +// f2.setSize(6); +// +// document.open(); +// +// String header = "TRANSACTION REPORT"; +// Paragraph p2 = new Paragraph(header, f); +// p2.setAlignment(Element.ALIGN_CENTER); +// +// document.add(p2); +// document.add( new Chunk("------------------------------------") ); +// +// +// +// PdfPTable tableDetails1 = new PdfPTable(4); +// tableDetails1.setWidthPercentage(100); +// +// tableDetails1.addCell(getCell("SL NO", PdfPCell.ALIGN_LEFT,f2)); +// tableDetails1.addCell(getCell("ACC NO", PdfPCell.ALIGN_LEFT,f2)); +// tableDetails1.addCell(getCell("AMOUNT", PdfPCell.ALIGN_RIGHT,f2)); +// tableDetails1.addCell(getCell("TXN TYPE", PdfPCell.ALIGN_RIGHT,f2)); +// document.add(tableDetails1); +// +// +// +// PdfPTable tableDetails = new PdfPTable(4); +// tableDetails.setWidthPercentage(100); +// tableDetails.setTotalWidth(new float[]{ 20, 70 ,35,30 }); +// +// for (MicroFileAccountDetBean accDt : accountDetlist) { +// +// tableDetails.addCell(getCell(String.valueOf(accDt.getSlNo() == null ? ": " : accDt.getSlNo()+"."), PdfPCell.ALIGN_LEFT, f2)); +// tableDetails.addCell(getCell(String.valueOf(accDt.getAccountCode() == null ? ": N/A" : accDt.getAccountCode()), PdfPCell.ALIGN_LEFT, f2)); +// tableDetails.addCell(getCell(String.valueOf(accDt.getAvailBal() == 0 ? ": N/A" : accDt.getAvailBal()), PdfPCell.ALIGN_LEFT, f2)); +// tableDetails.addCell(getCell(String.valueOf(accDt.getProdType() == null ? ": N/A" : accDt.getProdType()), PdfPCell.ALIGN_LEFT, f2)); +// +// } +// tableDetails.deleteLastRow(); +// document.add(tableDetails); +// document.add( new Chunk("------------------------------------") ); +// +// +// PdfPTable tableDetails3 = new PdfPTable(4); +// tableDetails.setWidthPercentage(100); +// MicroFileAccountDetBean accDt = accountDetlist.get(accountDetlist.size()-1); +// tableDetails3.addCell(getCell(String.valueOf(accDt.getSlNo() == null ? ": N/A" : accDt.getSlNo()), PdfPCell.ALIGN_CENTER, f2)); +// tableDetails3.addCell(getCell(String.valueOf(accDt.getAccountCode() == null ? "Total:" : accDt.getAccountCode()+":"), PdfPCell.ALIGN_LEFT, f2)); +// tableDetails3.addCell(getCell(String.valueOf(accDt.getAvailBal() == 0 ? ": N/A" : accDt.getAvailBal()), PdfPCell.ALIGN_CENTER, f2)); +// tableDetails3.addCell(getCell(String.valueOf(accDt.getProdType() == null ? ": N/A" : accDt.getProdType()), PdfPCell.ALIGN_CENTER, f2)); +// document.add(tableDetails3); +// +// +// document.add( Chunk.NEWLINE ); +// +// document.close(); +// +// //Desktop.getDesktop().open( pdfReceipt); +// +// +// } catch (Exception e) { +// +// e.printStackTrace(); +// pdfReceipt = null; +// +// } +// return pdfReceipt; +// +// } + + + public File createTransactionReceiptDetailed(ArrayList accountDetlist) { + + File file = null; + int counter =1; + BufferedWriter writer = null; + double totalAmnt = 0; + + try { + ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); + InputStream input = classLoader.getResourceAsStream("Dao/BulkMarkSTB.properties"); + Properties properties = new Properties(); + properties.load(input); + + String APPLICATION_FOLDER_PATH = properties.getProperty("APPLICATION_FOLDER_PATH"); + + file = new File(APPLICATION_FOLDER_PATH+FILE_NAME_DETAIL_TRAN + System.currentTimeMillis() + ".txt"); + writer = new BufferedWriter(new FileWriter(file)); + + String header = " TRANSACTION REPORT"; + writer.write(header); + writer.newLine(); + writer.write("------------------------------------"); + writer.newLine(); + writer.write("SL NO" + " ACC NO" + " AMOUNT" + " TXN TYP"); + writer.newLine(); + for (MicroFileAccountDetBean accDt : accountDetlist) { + + writer.write(String.valueOf(accDt.getSlNo() == null ? " " : accDt.getSlNo() + ".") + (counter>9?(counter>99?"":" "):" ") + + String.valueOf(accDt.getAccountCode() == null ? " N/A" : accDt.getAccountCode())+ " " + + String.valueOf(accDt.getAvailBal() == 0 ? " N/A" : (accDt.getAvailBal())) +(accDt.getAvailBal()>99? " ":" ") + + String.valueOf(accDt.getProdType() == null ? " N/A" : accDt.getProdType())); + writer.newLine(); + counter++; + totalAmnt = totalAmnt+accDt.getAvailBal(); + } + + writer.write("------------------------------------"); + writer.newLine(); + writer.write(" TOTAL : "+totalAmnt); + writer.newLine(); + writer.newLine(); + writer.newLine(); + writer.flush(); + writer.close(); + System.out.println("Done"); + + } catch (Exception e) { + + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + file = null; + + } finally { + System.out.println("Processing done."); + } + return file; + + + } +} diff --git a/IPKS_Updated/src/src/java/ServiceLayer/MicrofileProcessingService.java b/IPKS_Updated/src/src/java/ServiceLayer/MicrofileProcessingService.java new file mode 100644 index 0000000..f29ccd0 --- /dev/null +++ b/IPKS_Updated/src/src/java/ServiceLayer/MicrofileProcessingService.java @@ -0,0 +1,575 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package ServiceLayer; + +import Dao.MicroFileProcessingDao; +import DataEntryBean.MicroFileAccountDetBean; +import java.io.BufferedReader; +import java.io.DataInputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; +import java.util.Properties; +import javax.servlet.http.HttpServletRequest; +import com.jcraft.jsch.*; + +/** + * + * @author 1004242 + */ +public class MicrofileProcessingService { + + private static final char DEFAULT_SEPARATOR = '|'; + private static final char COMMA_SEPARATOR = ','; + + public StringBuilder downloadCsvFile(String pacsId, String agentId) { + ArrayList accountList = null; + ArrayList accountListParam = null; + MicroFileProcessingDao microDao = new MicroFileProcessingDao(); + accountList = microDao.getAccountDetails(pacsId, agentId); + StringBuilder csvOutput = null; + + try { + if (accountList != null && accountList.size() != 0) { + + accountListParam = new ArrayList(); + + //Header removed from gl14.test +// accountListParam.add("ACC_NO"); +// accountListParam.add("ACCT_NAME"); +// accountListParam.add("PROD_NAME"); +// //accountListParam.add("PROD_TYPE");column removed from csv as same is omitted for time being -- 29/05/2018 Rajdip +// accountListParam.add("ADDRESS_1"); +// accountListParam.add("ADDRESS_2"); +// //accountListParam.add("ADDRESS_3");column removed from csv as same is omitted for time being -- 29/05/2018 Rajdip +// accountListParam.add("PIN_CODE");//pincode blank +// accountListParam.add("AVAIL_BAL"); + csvOutput = new StringBuilder(); + // writeLine(csvOutput, accountListParam, DEFAULT_SEPARATOR); // for header write + for (MicroFileAccountDetBean accountdetail : accountList) { + //writer = new FileWriter(csvFile); + accountListParam = new ArrayList(); + accountListParam.add(accountdetail.getAccountCode()); + accountListParam.add(accountdetail.getAccountName()); + accountListParam.add(accountdetail.getProdName()); + accountListParam.add(accountdetail.getProdType());//Hardcoded as deposit + accountListParam.add(accountdetail.getAdd1()); + accountListParam.add(accountdetail.getAdd2()); + accountListParam.add(accountdetail.getAdd3());//column removed from csv as sae is omitted for time being -- 29/05/2018 Rajdip + accountListParam.add("NA");//pincode field not presnet in db . Added NA 09072018 + //account open date 29062018 + accountListParam.add(accountdetail.getAccntOpenDate()); + accountListParam.add(String.valueOf(accountdetail.getAvailBal())); + //maturity date + accountListParam.add(accountdetail.getAccntMaturityDate()); + accountListParam.add(accountdetail.getGuardianName()); + writeLine(csvOutput, accountListParam, DEFAULT_SEPARATOR); + accountListParam = null; + } + } else { + return csvOutput; + } + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Exception occured making csv balance file for pacs :" + pacsId); + } finally { + System.out.println("Processing done."); + } + return csvOutput; + } + + private static void writeLine(StringBuilder w, List values, char separators) throws IOException { + + boolean first = true; + if (separators == ' ') { + separators = DEFAULT_SEPARATOR; + } + + StringBuilder sb = new StringBuilder(); + for (String value : values) { + if (!first) { + sb.append(separators); + } + sb.append(value); + + first = false; + } + sb.append("\n"); + w.append(sb.toString()); + + } + + public MicroFileAccountDetBean readAndInsertFromCSV(String pacsId, String csvFile, String tellerId) { + //String csvFile = "/Users/mkyong/csv/country.csv"; + BufferedReader br = null; + String line = ""; + String cvsSplitBy = String.valueOf(DEFAULT_SEPARATOR); + MicroFileAccountDetBean accountDetail = null; + ArrayList accountDetailsList = new ArrayList(); + MicroFileProcessingDao dao = new MicroFileProcessingDao(); + int result = 0; + int firstTimeCount = 0; + MicroFileAccountDetBean fileResultObject = new MicroFileAccountDetBean(); + try { + // br = new BufferedReader(new FileReader(csvFile)); + //while ((line = br.readLine()) != null) { + + try {// use | as separator + if (firstTimeCount != 0) { + String[] accountDetails = line.split("\\" + cvsSplitBy); + accountDetail = new MicroFileAccountDetBean(); + accountDetail.setAccountCode(accountDetails[0]); + accountDetail.setDrTotal(Double.parseDouble(accountDetails[4])); + accountDetail.setAccountName(accountDetails[2]);// 3rd column of the csv as total credit is omitted for time being -- 29/06/2018 Rajdip + accountDetail.setAvailBal(Double.parseDouble(accountDetails[3])); //4th column of the csv as to tal credit is omitted for time being -- 29/06/2018 Rajdip + accountDetail.setCrTotal(Double.parseDouble(accountDetails[1])); + accountDetailsList.add(accountDetail); + accountDetail = null; + } + firstTimeCount++; + } catch (Exception ex) { + // ex.printStackTrace(); + System.out.println("Exception occured reading EOD balance file one row for pacs :" + pacsId); + } + } + result = dao.insertIntoHandbillTemp(accountDetailsList, pacsId, tellerId); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Exception occured reading EOD balance file for pacs :" + pacsId); + } finally { + if (br != null) { + try { + br.close(); + } catch (IOException e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } + } + } + fileResultObject.setSuccessfulRecords(result); + fileResultObject.setTotalRecords(accountDetailsList.size()); + return fileResultObject; + } + + public String uploadCSVToServer(HttpServletRequest request, String pacsId) { + String contentType = request.getContentType(); + String filePath = null; + try { + ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); + InputStream input = classLoader.getResourceAsStream("Dao/BulkMarkSTB.properties"); + Properties properties = new Properties(); + properties.load(input); + + String APPLICATION_FOLDER_PATH = properties.getProperty("APPLICATION_FOLDER_PATH"); + //here we are checking the content type is not equal to Null and as well as the passed data from mulitpart/form-data is greater than or equal to 0 + if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0)) { + // DataInputStream in = new DataInputStream(request.getInputStream()); + //we are taking the length of Content type data + //int formDataLength = request.getContentLength(); + byte dataBytes[] = new byte[formDataLength]; + int byteRead = 0; + int totalBytesRead = 0; + //this loop converting the uploaded file into byte code + while (totalBytesRead < formDataLength) { + // byteRead = in.read(dataBytes, totalBytesRead, formDataLength); + totalBytesRead += byteRead; + } + String file = new String(dataBytes); + //for saving the file name + String saveFile = file.substring(file.indexOf("filename=\"") + 10); + saveFile = saveFile.substring(0, saveFile.indexOf("\n")); + saveFile = saveFile.substring(saveFile.lastIndexOf("\\") + 1, saveFile.indexOf("\"")); + + int lastIndex = contentType.lastIndexOf("="); + String boundary = contentType.substring(lastIndex + 1, contentType.length()); + int pos; + //extracting the index of file + pos = file.indexOf("filename=\""); + pos = file.indexOf("\n", pos) + 1; + pos = file.indexOf("\n", pos) + 1; + pos = file.indexOf("\n", pos) + 1; + int boundaryLocation = file.indexOf(boundary, pos) - 4; + int startPos = ((file.substring(0, pos)).getBytes()).length; + int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length; + + // File fileNew = new File("C:/D/" + saveFile + String.valueOf(System.currentTimeMillis())); + // File fileNew = new File("/" + saveFile + String.valueOf(System.currentTimeMillis())); + File fileNew = new File(APPLICATION_FOLDER_PATH + saveFile + String.valueOf(System.currentTimeMillis())); + // creating a new file with the same name and writing the content in new file + FileOutputStream fileOut = new FileOutputStream(fileNew); + fileOut.write(dataBytes, startPos, (endPos - startPos)); + fileOut.flush(); + fileOut.close(); + filePath = fileNew.getAbsolutePath(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Exception occured reading csv from client for pacs :" + pacsId); + } finally { + System.out.println("Processing done."); + } + return filePath; + } + + public String uploadTxtToServer(HttpServletRequest request) { + String contentType = request.getContentType(); + String filePath = null; + try { + ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); + InputStream input = classLoader.getResourceAsStream("Dao/CL_Disbursement_Vidyasagar.properties"); + Properties properties = new Properties(); + properties.load(input); + + String TEMP_FOLDER_PATH = properties.getProperty("TEMP_FOLDER_PATH"); + //here we are checking the content type is not equal to Null and as well as the passed data from mulitpart/form-data is greater than or equal to 0 + if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0)) { + // DataInputStream in = new DataInputStream(request.getInputStream()); + //we are taking the length of Content type data + // int formDataLength = request.getContentLength(); + byte dataBytes[] = new byte[formDataLength]; + int byteRead = 0; + int totalBytesRead = 0; + //this loop converting the uploaded file into byte code + while (totalBytesRead < formDataLength) { + // byteRead = in.read(dataBytes, totalBytesRead, formDataLength); + totalBytesRead += byteRead; + } + String file = new String(dataBytes); + //for saving the file name + String saveFile = file.substring(file.indexOf("filename=\"") + 10); + saveFile = saveFile.substring(0, saveFile.indexOf("\n")); + saveFile = saveFile.substring(saveFile.lastIndexOf("\\") + 1, saveFile.indexOf("\"")); + + int lastIndex = contentType.lastIndexOf("="); + String boundary = contentType.substring(lastIndex + 1, contentType.length()); + int pos; + //extracting the index of file + pos = file.indexOf("filename=\""); + pos = file.indexOf("\n", pos) + 1; + pos = file.indexOf("\n", pos) + 1; + pos = file.indexOf("\n", pos) + 1; + int boundaryLocation = file.indexOf(boundary, pos) - 4; + int startPos = ((file.substring(0, pos)).getBytes()).length; + int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length; + + File fileNew = new File(TEMP_FOLDER_PATH + saveFile); + // creating a new file with the same name and writing the content in new file + FileOutputStream fileOut = new FileOutputStream(fileNew); + fileOut.write(dataBytes, startPos, (endPos - startPos)); + fileOut.flush(); + fileOut.close(); + filePath = fileNew.getAbsolutePath(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Exception occured reading txt from client for pacs :"); + } finally { + System.out.println("Processing done."); + } + return filePath; + } + + public String uploadPrtToServer(HttpServletRequest request, String pacsId) { + String contentType = request.getContentType(); + String filePath = null; + try { + //here we are checking the content type is not equal to Null and as well as the passed data from mulitpart/form-data is greater than or equal to 0 + if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0)) { + // DataInputStream in = new DataInputStream(request.getInputStream()); + //we are taking the length of Content type data + // int formDataLength = request.getContentLength(); + byte dataBytes[] = new byte[formDataLength]; + int byteRead = 0; + int totalBytesRead = 0; + //this loop converting the uploaded file into byte code + while (totalBytesRead < formDataLength) { + // byteRead = in.read(dataBytes, totalBytesRead, formDataLength); + totalBytesRead += byteRead; + } + String file = new String(dataBytes); + //for saving the file name + String saveFile = file.substring(file.indexOf("filename=\"") + 10); + saveFile = saveFile.substring(0, saveFile.indexOf("\n")); + saveFile = saveFile.substring(saveFile.lastIndexOf("\\") + 1, saveFile.indexOf("\"")); + + int lastIndex = contentType.lastIndexOf("="); + String boundary = contentType.substring(lastIndex + 1, contentType.length()); + int pos; + //extracting the index of file + pos = file.indexOf("filename=\""); + pos = file.indexOf("\n", pos) + 1; + pos = file.indexOf("\n", pos) + 1; + pos = file.indexOf("\n", pos) + 1; + int boundaryLocation = file.indexOf(boundary, pos) - 4; + int startPos = ((file.substring(0, pos)).getBytes()).length; + int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length; + + File fileNew = new File("/" + saveFile + String.valueOf(System.currentTimeMillis())); + // creating a new file with the same name and writing the content in new file + FileOutputStream fileOut = new FileOutputStream(fileNew); + fileOut.write(dataBytes, startPos, (endPos - startPos)); + fileOut.flush(); + fileOut.close(); + filePath = fileNew.getAbsolutePath(); + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Exception occured reading csv from client for pacs :" + pacsId); + } finally { + System.out.println("Processing done."); + } + return filePath; + } + + public String readAndInsertFromPRT(String pacsId, String prtFile, String tellerId) { + BufferedReader br = null; + String line = ""; + String accNo = ""; + String cbsAccNo = ""; + String outMsg = ""; + List accntdetailsList = new ArrayList(); + MicroFileProcessingDao dao = new MicroFileProcessingDao(); + + try { + // br = new BufferedReader(new FileReader(prtFile)); + try { + // while ((line = br.readLine()) != null) { + + if (!line.isEmpty() && line.length() == 146) { + accNo = line.substring(129); + cbsAccNo = line.substring(75, 89); + //cbsAccNo = cbsAccNo.substring(0, 11).concat(String.valueOf(cbsAccNo.charAt(12))); + cbsAccNo = cbsAccNo.replace("-", ""); + cbsAccNo = cbsAccNo.replace(" ", ""); + accntdetailsList.add(accNo + ":" + cbsAccNo); + System.out.println(accNo + ":" + cbsAccNo); + } + if (!line.isEmpty() && line.length() == 129) { + accNo = line.substring(112); + cbsAccNo = line.substring(74, 89); + //cbsAccNo = cbsAccNo.substring(0, 11).concat(String.valueOf(cbsAccNo.charAt(12))); + cbsAccNo = cbsAccNo.replace("-", ""); + cbsAccNo = cbsAccNo.replace(" ", ""); + accntdetailsList.add(accNo + ":" + cbsAccNo); + System.out.println(accNo + ":" + cbsAccNo); + } + + } + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + if (accntdetailsList.size() > 0) { + outMsg = dao.insertBulkAccMap(accntdetailsList, pacsId, tellerId); + } + + if (outMsg.isEmpty()) { + outMsg = "Error during bulk account mapping"; + } + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } finally { + System.out.println("Processing done."); + } + + return outMsg; + } + +// public String checkActionTag(HttpServletRequest request, Object obj) +// { +// String action = null; +// try { +// boolean isMultipart = ServletFileUpload.isMultipartContent(request); +// DiskFileItemFactory factory = new DiskFileItemFactory(); +// +// // Configure a repository (to ensure a secure temp location is used) +// ServletContext servletContext = obj.getServletConfig().getServletContext(); +// File repository = (File) servletContext.getAttribute("javax.servlet.context.tempdir"); +// factory.setRepository(repository); +// +// // Create a new file upload handler +// ServletFileUpload upload = new ServletFileUpload(factory); +// +// // Parse the request +// List items = upload.parseRequest(request); +// Iterator iter = items.iterator(); +// while (iter.hasNext()) { +// FileItem item = iter.next(); +// +// if (item.isFormField() && item.getFieldName().equalsIgnoreCase("actionTag")) { +// action = item.getString(); +// break; +// } +// +// } +// } catch (Exception e) { +// e.printStackTrace(); +// } +// return action; +// } + public String readAndInsertFromCSVForBulk(String pacsId, String csvFile, String tellerId) { + //String csvFile = "/Users/mkyong/csv/country.csv"; + BufferedReader br = null; + String line = ""; + String cvsSplitBy = String.valueOf(COMMA_SEPARATOR); + MicroFileAccountDetBean accountDetail = null; + ArrayList accountDetailsList = new ArrayList(); + MicroFileProcessingDao dao = new MicroFileProcessingDao(); + String result = null; + int firstTimeCount = 0; + MicroFileAccountDetBean fileResultObject = new MicroFileAccountDetBean(); + try { + // br = new BufferedReader(new FileReader(csvFile)); + // while ((line = br.readLine()) != null) { + + try {// use | as separator + if (firstTimeCount != 0) { + String[] accountDetails = line.split("\\" + cvsSplitBy); + accountDetail = new MicroFileAccountDetBean(); + accountDetail.setTxnType(accountDetails[0]); + accountDetail.setCrTotal(Double.parseDouble(accountDetails[3])); + accountDetail.setFromAccBulk((accountDetails[1])); + accountDetail.setToAccBulk((accountDetails[2])); + accountDetail.setMessage(accountDetails[4]);// narration in bulk file + accountDetailsList.add(accountDetail); + accountDetail = null; + } + firstTimeCount++; + } catch (Exception ex) { + // ex.printStackTrace(); + System.out.println("Exception occured reading Bulk file one row for pacs :" + pacsId); + } + } + result = dao.insertIntoBulkFileDetails(accountDetailsList, pacsId, tellerId, csvFile); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Exception occured reading Bulk file for pacs :" + pacsId); + } finally { + if (br != null) { + try { + br.close(); + } catch (IOException e) { + // e.printStackTrace(); + System.out.println("Error occurred during connection close."); + } + } + } + + return result; + } + + public String readAndInsertFromCSVForAccountRenewBulk(String pacsId, String csvFile, String tellerId) { + //String csvFile = "/Users/mkyong/csv/country.csv"; + BufferedReader br = null; + String line = ""; + String cvsSplitBy = String.valueOf(COMMA_SEPARATOR); + MicroFileAccountDetBean accountDetail = null; + ArrayList accountDetailsList = new ArrayList(); + MicroFileProcessingDao dao = new MicroFileProcessingDao(); + String result = null; + int firstTimeCount = 0; + MicroFileAccountDetBean fileResultObject = new MicroFileAccountDetBean(); + try { + // br = new BufferedReader(new FileReader(csvFile)); + //while ((line = br.readLine()) != null) { + try {// use | as separator + if (firstTimeCount != 0) { + String[] accountDetails = line.split("\\" + cvsSplitBy); + accountDetail = new MicroFileAccountDetBean(); + + accountDetail.setToAccBulk((accountDetails[0]));//kcc account + accountDetail.setLimit(accountDetails[1]);//limit + accountDetail.setAccntMaturityDate(accountDetails[2]); // limit expiry date + accountDetailsList.add(accountDetail); + accountDetail = null; + } + firstTimeCount++; + } catch (Exception ex) { + // ex.printStackTrace(); + System.out.println("Exception occured reading Account Renew Bulk file one row for pacs :" + pacsId); + } + } + result = dao.insertIntoBulkFileDetailsAccountRenewal(accountDetailsList, pacsId, tellerId, csvFile); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Exception occured reading Account Renew Bulk file for pacs :" + pacsId); + } finally { + if (br != null) { + try { + br.close(); + } catch (IOException e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } + } + } + + return result; + } + + public String readAndInsertFromCSVForBankKCC(String pacsId, String csvFile, String tellerId) { + //String csvFile = "/Users/mkyong/csv/country.csv"; + BufferedReader br = null; + String line = ""; + String cvsSplitBy = String.valueOf(COMMA_SEPARATOR); + MicroFileAccountDetBean accountDetail = null; + ArrayList accountDetailsList = new ArrayList(); + MicroFileProcessingDao dao = new MicroFileProcessingDao(); + String result = null; + int firstTimeCount = 0; + MicroFileAccountDetBean fileResultObject = new MicroFileAccountDetBean(); + try { + // br = new BufferedReader(new FileReader(csvFile)); + // while ((line = br.readLine()) != null) { + try {// use | as separator + if (firstTimeCount != 0) { + String[] accountDetails = line.split("\\" + cvsSplitBy); + accountDetail = new MicroFileAccountDetBean(); + + accountDetail.setToAccBulk((accountDetails[0]));//kcc account + accountDetail.setLimit(accountDetails[1]);//limit + accountDetail.setAccntMaturityDate(accountDetails[2]); // limit expiry date + accountDetailsList.add(accountDetail); + accountDetail = null; + } + firstTimeCount++; + } catch (Exception ex) { + // ex.printStackTrace(); + System.out.println("Exception occured reading Account Renew Bulk file one row for pacs :" + pacsId); + } + } + result = dao.insertIntoBankPostKCCRenewal(accountDetailsList, pacsId, tellerId, csvFile); + + } catch (Exception e) { + // e.printStackTrace(); + System.out.println("Exception occured reading Account Renew Bulk file for pacs :" + pacsId); + } finally { + if (br != null) { + try { + br.close(); + } catch (IOException e) { + // e.printStackTrace(); + System.out.println("Error occurred during processing."); + } + } + } + + return result; + } +} diff --git a/IPKS_Updated/src/src/java/org/common/filter/LoginFilter.java b/IPKS_Updated/src/src/java/org/common/filter/LoginFilter.java new file mode 100644 index 0000000..d2b916e --- /dev/null +++ b/IPKS_Updated/src/src/java/org/common/filter/LoginFilter.java @@ -0,0 +1,59 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package org.common.filter; + +import Dao.LoginDao; +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + + + +/** + * + * @author 1004242 + */ +public class LoginFilter implements Filter { + + public void init(FilterConfig fc) throws ServletException { + + } + + public void doFilter(ServletRequest sr, ServletResponse sr1, FilterChain fc) throws IOException, ServletException { + + HttpServletRequest httpReq = (HttpServletRequest) sr; + HttpServletResponse httpResp = (HttpServletResponse) sr1; + HttpSession session = httpReq.getSession(false); + String sessionId = session.getId(); + // String pacsId = httpReq.getParameter("PACSID"); + PrintWriter out=sr1.getWriter(); + LoginDao ldao = new LoginDao(); + if(ldao.checkIfUserLoggedIn(sessionId, pacsId, 0)) + { + out.print("Please close the browser and open a new one to proceed"); + + } + else + { + fc.doFilter(sr, sr1); + } + + + } + + public void destroy() { + + } + +} diff --git a/IPKS_Updated/src/src/java/org/common/filter/ServerDownEventListener.java b/IPKS_Updated/src/src/java/org/common/filter/ServerDownEventListener.java new file mode 100644 index 0000000..d051252 --- /dev/null +++ b/IPKS_Updated/src/src/java/org/common/filter/ServerDownEventListener.java @@ -0,0 +1,34 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package org.common.filter; + +import Controller.LoginServlet; +import Dao.LogOutDao; +import javax.servlet.ServletContextEvent; +import javax.servlet.ServletContextListener; +import javax.servlet.annotation.WebListener; + + +/** + * + * @author 1004242 + */ +@WebListener +public class ServerDownEventListener implements ServletContextListener { + + public void contextInitialized(ServletContextEvent event) { + //TODO ON START + } + public void contextDestroyed(ServletContextEvent event) { + LogOutDao lDao = new LogOutDao(); + int result = 0; + result = lDao.removeFromLoggedInUsers(null, null, 0); + LoginServlet.sesssionMap.clear(); + System.out.println("User session closed from logged_in_users for session Id :" + result); + + } +} + diff --git a/IPKS_Updated/src/src/java/org/common/filter/SessionFilter.java b/IPKS_Updated/src/src/java/org/common/filter/SessionFilter.java new file mode 100644 index 0000000..5280191 --- /dev/null +++ b/IPKS_Updated/src/src/java/org/common/filter/SessionFilter.java @@ -0,0 +1,91 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package org.common.filter; + +/** + * + * @author 590685 + */ +import java.io.IOException; +import java.io.PrintStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import org.apache.commons.lang3.StringUtils; + +/** + * + * @author 986137 + */ +public class SessionFilter implements Filter { + + private String timeoutPage = "Login.jsp"; + + public void init(FilterConfig filterConfig) throws ServletException { + } + + public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, + ServletException { + + if ((request instanceof HttpServletRequest) && (response instanceof HttpServletResponse)) { + HttpServletRequest httpServletRequest = (HttpServletRequest) request; + HttpServletResponse httpServletResponse = (HttpServletResponse) response; + + // is session expire control required for this request? + if (isSessionControlRequiredForThisResource(httpServletRequest)) { + + // is session invalid? + if (isSessionInvalid(httpServletRequest)) { + String timeoutUrl = httpServletRequest.getContextPath() + "/" + getTimeoutPage(); + + httpServletResponse.sendRedirect(timeoutUrl); + return; + } + } + } + filterChain.doFilter(request, response); + } + + /** + * + * session shouldn't be checked for some pages. For example: for timeout page.. + * Since we're redirecting to timeout page from this filter, + * if we don't disable session control for it, filter will again redirect to it + * and this will be result with an infinite loop... + */ + private boolean isSessionControlRequiredForThisResource(HttpServletRequest httpServletRequest) { + String requestPath = httpServletRequest.getRequestURI(); + + boolean controlRequired = !StringUtils.contains(requestPath, getTimeoutPage()); + + return controlRequired; + } + + private boolean isSessionInvalid(HttpServletRequest httpServletRequest) { + boolean sessionInValid = (httpServletRequest.getRequestedSessionId() != null) + && !httpServletRequest.isRequestedSessionIdValid(); + return sessionInValid; + } + + public void destroy() { + } + + public String getTimeoutPage() { + return timeoutPage; + } + + public void setTimeoutPage(String timeoutPage) { + this.timeoutPage = timeoutPage; + } +} diff --git a/IPKS_Updated/src/src/java/org/common/filter/SessionListener.java b/IPKS_Updated/src/src/java/org/common/filter/SessionListener.java new file mode 100644 index 0000000..124fdd2 --- /dev/null +++ b/IPKS_Updated/src/src/java/org/common/filter/SessionListener.java @@ -0,0 +1,33 @@ +package org.common.filter; + +/** + * + * @author 1004242 + */ +import Controller.LoginServlet; +import Dao.LogOutDao; +import javax.servlet.http.HttpSession; +import javax.servlet.http.HttpSessionEvent; +import javax.servlet.http.HttpSessionListener; + +public class SessionListener implements HttpSessionListener { + + @Override + public void sessionCreated(HttpSessionEvent arg0) { + } + + @Override + public void sessionDestroyed(HttpSessionEvent sessionEvent) { + synchronized (this) { + HttpSession session = sessionEvent.getSession(); + LogOutDao lDao = new LogOutDao(); + if (session != null) { + // lDao.removeFromLoggedInUsers(session.getId(), null, 2); + //clearing from sesssion map on any case of session inavlidation + if (LoginServlet.sesssionMap.containsKey(session.getId())) { + LoginServlet.sesssionMap.remove(session.getId()); + } + } + } + } +} diff --git a/IPKS_Updated/src/src/java/org/common/filter/XFrameHeaderFilter.java b/IPKS_Updated/src/src/java/org/common/filter/XFrameHeaderFilter.java new file mode 100644 index 0000000..62a9372 --- /dev/null +++ b/IPKS_Updated/src/src/java/org/common/filter/XFrameHeaderFilter.java @@ -0,0 +1,27 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.common.filter; + +import java.io.IOException; +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletResponse; + +/** + * + * @author 1242938 + */ +public class XFrameHeaderFilter implements Filter { + + public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws ServletException, IOException { + ((HttpServletResponse) resp).setHeader("x-frame-options", "sameorigin"); + chain.doFilter(req, resp); + } + +} diff --git a/IPKS_Updated/src/src/java/org/common/filter/XSSPreventionFilter.java b/IPKS_Updated/src/src/java/org/common/filter/XSSPreventionFilter.java new file mode 100644 index 0000000..eaf9c8c --- /dev/null +++ b/IPKS_Updated/src/src/java/org/common/filter/XSSPreventionFilter.java @@ -0,0 +1,163 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package org.common.filter; + +/** + * + * @author 454222 + */ +import java.io.IOException; +import java.text.Normalizer; +import java.util.Collections; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Map; +import java.util.Set; +import java.util.regex.Pattern; + +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletRequestWrapper; + +/** + * Filters Http requests and removes malicious characters/strings + * (i.e. XSS) from the Query String + */ +public class XSSPreventionFilter implements Filter { + class XSSRequestWrapper extends HttpServletRequestWrapper { + + private Map sanitizedQueryString; + + public XSSRequestWrapper(HttpServletRequest request) { + super(request); + } + + //QueryString overrides + + @Override + public String getParameter(String name) { + String parameter = null; + // String[] vals = getParameterMap().get(name); + + if (vals != null && vals.length > 0) { + parameter = vals[0]; + } + + return parameter; + } + + @Override + public String[] getParameterValues(String name) { + return getParameterMap().get(name); + } + + @Override + public Enumeration getParameterNames() { + return Collections.enumeration(getParameterMap().keySet()); + } + + @SuppressWarnings("unchecked") + @Override + public Map getParameterMap() { + if(sanitizedQueryString == null) { + Map res = new HashMap(); + //Map originalQueryString = super.getParameterMap(); + if(originalQueryString!=null) { + for (String key : (Set) originalQueryString.keySet()) { + String[] rawVals = originalQueryString.get(key); + String[] snzVals = new String[rawVals.length]; + for (int i=0; i < rawVals.length; i++) { + snzVals[i] = stripXSS(rawVals[i]); + System.out.println("Sanitized: " + rawVals[i] + " to " + snzVals[i]); + } + res.put(stripXSS(key), snzVals); + } + } + sanitizedQueryString = res; + } + return sanitizedQueryString; + } + + //TODO: Implement support for headers and cookies (override getHeaders and getCookies) + + /** + * Removes all the potentially malicious characters from a string + * @param value the raw string + * @return the sanitized string + */ + private String stripXSS(String value) { + String cleanValue = null; + if (value != null) { + cleanValue = Normalizer.normalize(value, Normalizer.Form.NFD); + + // Avoid null characters + cleanValue = cleanValue.replaceAll("\0", ""); + + // Avoid anything between script tags + Pattern scriptPattern = Pattern.compile("", Pattern.CASE_INSENSITIVE); + cleanValue = scriptPattern.matcher(cleanValue).replaceAll(""); + + // Avoid anything in a src='...' type of expression + scriptPattern = Pattern.compile("src[\r\n]*=[\r\n]*\\\'(.*?)\\\'", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL); + cleanValue = scriptPattern.matcher(cleanValue).replaceAll(""); + + scriptPattern = Pattern.compile("src[\r\n]*=[\r\n]*\\\"(.*?)\\\"", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL); + cleanValue = scriptPattern.matcher(cleanValue).replaceAll(""); + + // Remove any lonesome tag + scriptPattern = Pattern.compile("", Pattern.CASE_INSENSITIVE); + cleanValue = scriptPattern.matcher(cleanValue).replaceAll(""); + + // Remove any lonesome + + + + + + + + + + + + + +
+ <% String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + +
+ +
+ Account Amendment +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+
+ + + +

+ + + + +

+ + +
+ + + +
+
+
+
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/AccountRenewalBulk.jsp b/IPKS_Updated/web/web/web/AccountRenewalBulk.jsp new file mode 100644 index 0000000..9cc6e6b --- /dev/null +++ b/IPKS_Updated/web/web/web/AccountRenewalBulk.jsp @@ -0,0 +1,178 @@ +<%-- + Document : AccountRnewalBulkFileUpload + Created on : Sep 29, 2018, 4:48:59 PM + Author : 1004242 +--%> + + + + + + Account Renewal Bulk File Upload + + + + + + + + + + + + + + + +
+
+ Account Renewal Bulk File Upload +
+
+ + + + + +
Select Operation + +
+
+
+ + +
${errorMessageAccBulk}
+
+ + diff --git a/IPKS_Updated/web/web/web/AccountRenewalBulkSTB.jsp b/IPKS_Updated/web/web/web/AccountRenewalBulkSTB.jsp new file mode 100644 index 0000000..995a30b --- /dev/null +++ b/IPKS_Updated/web/web/web/AccountRenewalBulkSTB.jsp @@ -0,0 +1,161 @@ +<%-- + Document : AccountRenewalBulkSTB + Created on : Sep 17, 2019, 4:48:59 PM + Author : 1242938 +--%> + + + + + + Account Renewal Bulk File Processing + + + + + + + + + + + + + + + +
+
+ Account Renewal Bulk File Upload +
+
+ + + + + +
Select Operation + +
+
+
+ + +
${errorMessageAccBulk}
+
+ + diff --git a/IPKS_Updated/web/web/web/AdhocReport.jsp b/IPKS_Updated/web/web/web/AdhocReport.jsp new file mode 100644 index 0000000..f65e432 --- /dev/null +++ b/IPKS_Updated/web/web/web/AdhocReport.jsp @@ -0,0 +1,198 @@ +<%-- + Document : PACS_REPORT + Created on : Sep 17, 2015, 12:59:59 PM + Author : 590685 +--%> + +<%@page import="DataEntryBean.adhocReportBean"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.ArrayList" %> +<% try { +%> + + + Adhoc Report + + + + + + + + + + + + + + + + + + + + + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + + <% + Object oadhocReportBeanObj = request.getAttribute("oadhocReportBeanObj"); + adhocReportBean oadhocReportBean = new adhocReportBean(); + + if (oadhocReportBeanObj != null) { + oadhocReportBean = (adhocReportBean) request.getAttribute("oadhocReportBeanObj"); + + } + %> + + +
+
+ Adhoc Report + +
+
+ <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ +       + +

+ +
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Parameter 1 :      + Param Value 1 :      +
Parameter 2 :      + Param Value 2 :      +
Parameter 3 :      + Param Value 3 :      +
Parameter 4 :      + Param Value 4 :      +
Parameter 5 :      + Param Value 5 :      +
Parameter 6 :      + Param Value 6 :      +
Parameter 7 :      + Param Value 7 :      +
Parameter 8 :      + Param Value 8 :      +
Parameter 9 :      + Param Value 9 :      +
Parameter 10 :      + Param Value 10 :      +
+

+ + +
+ +
+
+
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Asset_JSP/Asset_Enquiry.jsp b/IPKS_Updated/web/web/web/Asset_JSP/Asset_Enquiry.jsp new file mode 100644 index 0000000..e70b694 --- /dev/null +++ b/IPKS_Updated/web/web/web/Asset_JSP/Asset_Enquiry.jsp @@ -0,0 +1,213 @@ +<%-- + Document : pds_stock_register + Created on : May 5, 2016, 12:31:09 PM + Author : 590685 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.Asset_EnquiryBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> + +<% try { +%> + + + + Asset Enquiry + + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object alpdsStockAsset_EnquiryBeanApendObj = request.getAttribute("alAsset_EnquiryBean"); + Object oAsset_EnquiryBeanObj = request.getAttribute("oAsset_EnquiryBean"); + + Asset_EnquiryBean oAsset_EnquiryBeanApend = new Asset_EnquiryBean(); + if (oAsset_EnquiryBeanObj != null) { + oAsset_EnquiryBeanApend = (Asset_EnquiryBean) request.getAttribute("oAsset_EnquiryBean"); + } + + ArrayList alAsset_EnquiryApend = new ArrayList(); + if (alpdsStockAsset_EnquiryBeanApendObj != null) { + alAsset_EnquiryApend = (ArrayList) request.getAttribute("alAsset_EnquiryBean"); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + +
+
+ + Asset Enquiry + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +
+ + + + + + + +
Asset ID*:     +
+

+ + + +
+

+ + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+ + + + + + + + + + + + + + + + <% + oAsset_EnquiryBeanApend = null; + + int i; + for (i = 0; i < alAsset_EnquiryApend.size(); i++) { + oAsset_EnquiryBeanApend = alAsset_EnquiryApend.get(i); + %> + + + + + + + + + + + + + + + <%}%> + +
Asset ID DescriptionPurchase ValueMode of AcquirementPurchase DateEntry DateGL CodeDepreciation RateAsset Status
+
+
+
+ <%}%> + +
+ +
+ + +<% } catch (Exception e) { + + } +%> + diff --git a/IPKS_Updated/web/web/web/Asset_JSP/Asset_Report.jsp b/IPKS_Updated/web/web/web/Asset_JSP/Asset_Report.jsp new file mode 100644 index 0000000..d915cbe --- /dev/null +++ b/IPKS_Updated/web/web/web/Asset_JSP/Asset_Report.jsp @@ -0,0 +1,299 @@ +<%-- + Document : PACS_REPORT + Created on : Sep 17, 2015, 12:59:59 PM + Author : 454222 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.ArrayList" %> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<% try { +%> + + + Asset Report + + + + + + + + + + + + + + + PACS Report + + + + + +
+
+
+ Asset Report + +
+
+ + + <%if (request.getAttribute("error") != null) {%> + + <%}%> + + + + + + + + + + + + + + + + + + + + + + + +
<%=request.getAttribute("error").toString()%>
Report Name *:
From Date *:  
To Date *:  
Sub-PACS Name:
+



+
+ + + + + + + + + +
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Asset_JSP/MenuHead_ASSET.jsp b/IPKS_Updated/web/web/web/Asset_JSP/MenuHead_ASSET.jsp new file mode 100644 index 0000000..f0467b8 --- /dev/null +++ b/IPKS_Updated/web/web/web/Asset_JSP/MenuHead_ASSET.jsp @@ -0,0 +1,153 @@ +<%-- + Document : MenuHead_ASSET + Created on : Apr 20, 2016, 3:19:56 PM + Author : 590685 +--%> + + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.*"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + +<% + String userName = new String(); + String pacsName = new String(); + String userRole = new String(); + String RoleName = new String(); + String sysDt = new String(); + + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select to_char(SYSTEM_DATE,'Month DD, YYYY') from system_date"); + while (rs.next()) { + sysDt = rs.getString(1); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + } + + + userName = (String) session.getAttribute("UserName"); + userName = userName.toUpperCase(); + pacsName = (String) session.getAttribute("pacsName"); + userRole = (String) session.getAttribute("userRole"); + RoleName = (String) session.getAttribute("RoleName"); +String moduleName = new String(); + moduleName = (String) session.getAttribute("moduleName"); + + +%> + +
+ +
+ Image - PACS +
+ + +
+
User Name:
<%=userName%>
+
Date:
<%=sysDt%>
+
PACS Name:
<%=pacsName%>
+ +
User Type:
<%=RoleName%>
+
Module Name:
<%=moduleName.toUpperCase()%>
+ +
+ +
+ + + +
+ + diff --git a/IPKS_Updated/web/web/web/Asset_JSP/assetDepreciation.jsp b/IPKS_Updated/web/web/web/Asset_JSP/assetDepreciation.jsp new file mode 100644 index 0000000..14a6eeb --- /dev/null +++ b/IPKS_Updated/web/web/web/Asset_JSP/assetDepreciation.jsp @@ -0,0 +1,150 @@ +<%-- + Document : pds_stock_register + Created on : May 5, 2016, 12:31:09 PM + Author : 590685 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.AssetRegisterBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + + + Asset Depreciation + + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object alpdsStockRegisterBeanApendObj = request.getAttribute("alAssetRegisterBean"); + Object oAssetRegisterBeanObj = request.getAttribute("oAssetRegisterBean"); + + AssetRegisterBean oAssetRegisterBeanApend = new AssetRegisterBean(); + if (oAssetRegisterBeanObj != null) { + oAssetRegisterBeanApend = (AssetRegisterBean) request.getAttribute("oAssetRegisterBean"); + } + + ArrayList alAssetRegisterBeanApend = new ArrayList(); + if (alpdsStockRegisterBeanApendObj != null) { + alAssetRegisterBeanApend = (ArrayList) request.getAttribute("alAssetRegisterBean"); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + +
+
+ + Asset Depreciation + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + + + +
+ +
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Asset_JSP/assetDisposal.jsp b/IPKS_Updated/web/web/web/Asset_JSP/assetDisposal.jsp new file mode 100644 index 0000000..d06b49b --- /dev/null +++ b/IPKS_Updated/web/web/web/Asset_JSP/assetDisposal.jsp @@ -0,0 +1,138 @@ +<%-- + Document : assetrelocation + Created on : Jun 24, 2016, 3:21:04 PM + Author : Tcs Helpdesk10 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<% try { +%> + + + Asset Disposal + + + + + + + + + + + + + + + +
+ + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + +
+ Asset Disposal +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +
+ + + + + + + + + + + + + + + + + + + + + +
Asset ID*:     +
Dispose Asset:
+

+
+
+ + +
+ +
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Asset_JSP/assetEntry.jsp b/IPKS_Updated/web/web/web/Asset_JSP/assetEntry.jsp new file mode 100644 index 0000000..ea21ee0 --- /dev/null +++ b/IPKS_Updated/web/web/web/Asset_JSP/assetEntry.jsp @@ -0,0 +1,519 @@ +<%-- + Document : assetentry + Created on : Jun 24, 2016, 2:34:00 PM + Author : Tcs Helpdesk10 +--%> + +<%@page import="DataEntryBean.AssetEntryBean"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.pdsStockRegisterBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + + + Asset Entry + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object alpdsStockRegisterBeanApendObj = request.getAttribute("alpdsStockRegisterBeanApend"); + ArrayList alpdsStockRegisterBeanApend = new ArrayList(); + if (alpdsStockRegisterBeanApendObj != null) { + alpdsStockRegisterBeanApend = (ArrayList) request.getAttribute("alpdsStockRegisterBeanApend"); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + <% + Object oAssetEntryBeanObj = request.getAttribute("oAssetEntryBean"); + Object alAssetEntryBeanObj = request.getAttribute("arrAssetEntryBean"); + + AssetEntryBean oAssetEntryBean = new AssetEntryBean(); + if (oAssetEntryBeanObj != null) { + oAssetEntryBean = (AssetEntryBean) request.getAttribute("oAssetEntryBean"); + } + + ArrayList alAssetEntryBean = new ArrayList(); + if (alAssetEntryBeanObj != null) { + alAssetEntryBean = (ArrayList) request.getAttribute("arrAssetEntryBean"); + } + %> + + +
+
+ + Asset Entry + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ +
+
+ +
+
+ +
+
+ <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+
+ + + + + + + + + + + + + + + + + <% + oAssetEntryBean = null; + oAssetEntryBean = new AssetEntryBean(); + int count2= 1; + + for (int i = 0; i < alAssetEntryBean.size(); i++) { + oAssetEntryBean = alAssetEntryBean.get(i); + count2++; + %> + + + + + + + + + + + + + + + + + + + <%}%> +
Asset TypeAsset SubTypeAsset IDDescriptionCurrent ValuationMode of AcquirementPurchase DateGL CodeDepreciation RateStatus
+
+
+
+ + +
+ + + +
+ <%}%> + + + + +
+ +
+ + + + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Asset_JSP/assetMaster.jsp b/IPKS_Updated/web/web/web/Asset_JSP/assetMaster.jsp new file mode 100644 index 0000000..7c25a26 --- /dev/null +++ b/IPKS_Updated/web/web/web/Asset_JSP/assetMaster.jsp @@ -0,0 +1,450 @@ +<%-- + Document : IdentificationDetails + Created on : Aug 3, 2015, 2:25:40 PM + Author : Administrator +--%> +<%@page import="DataEntryBean.AssetMasterBean" %> +<%@page import="java.sql.SQLException"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<% try { +%> + + + Identification Details + + + + + + + + + + + + + + + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object AssetMasterBeanBeanobj = request.getAttribute("oAssetMasterBeanObj"); + AssetMasterBean oAssetMasterBean = new AssetMasterBean(); + if (AssetMasterBeanBeanobj != null) { + oAssetMasterBean = (AssetMasterBean) request.getAttribute("oAssetMasterBeanObj"); + + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + +
+ ASSET MASTER + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ +
Operation Selection + +
+
+ + + + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Asset Type:
Asset Type Description:
Asset SubType +
Asset SubType Description: +
Description:
Depriciation Rate: (%)


+

+ +
+ + +
+ +
+ <%}%> + + + + +
+ +
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Asset_JSP/assetRegister.jsp b/IPKS_Updated/web/web/web/Asset_JSP/assetRegister.jsp new file mode 100644 index 0000000..068ba5a --- /dev/null +++ b/IPKS_Updated/web/web/web/Asset_JSP/assetRegister.jsp @@ -0,0 +1,223 @@ +<%-- + Document : pds_stock_register + Created on : May 5, 2016, 12:31:09 PM + Author : 590685 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.AssetRegisterBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + + + Asset Register + + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object alpdsStockRegisterBeanApendObj = request.getAttribute("alAssetRegisterBean"); + Object oAssetRegisterBeanObj = request.getAttribute("oAssetRegisterBean"); + + AssetRegisterBean oAssetRegisterBeanApend = new AssetRegisterBean(); + if (oAssetRegisterBeanObj != null) { + oAssetRegisterBeanApend = (AssetRegisterBean) request.getAttribute("oAssetRegisterBean"); + } + + ArrayList alAssetRegisterBeanApend = new ArrayList(); + if (alpdsStockRegisterBeanApendObj != null) { + alAssetRegisterBeanApend = (ArrayList) request.getAttribute("alAssetRegisterBean"); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + +
+
+ + Asset Register + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +
+ + + + + + + + + + + + +
Asset Type*:
Asset Sub-Type*:
+

+ + + +
+
+ +
+ + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+ + + + + + + + + + + + + + + + <% + oAssetRegisterBeanApend = null; + + int i; + for (i = 0; i < alAssetRegisterBeanApend.size(); i++) { + oAssetRegisterBeanApend = alAssetRegisterBeanApend.get(i); + %> + + + + + + + + + + + + + + <%}%> + +
Asset ID DescriptionPurchase ValueMode of AcquirementPurchase DateEntry DateGL CodeDepreciation RateAsset Status
+
+ +
+
+ <%}%> + + +
+ +
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Asset_JSP/assetRelocation.jsp b/IPKS_Updated/web/web/web/Asset_JSP/assetRelocation.jsp new file mode 100644 index 0000000..e5533e1 --- /dev/null +++ b/IPKS_Updated/web/web/web/Asset_JSP/assetRelocation.jsp @@ -0,0 +1,149 @@ +<%-- + Document : assetrelocation + Created on : Jun 24, 2016, 3:21:04 PM + Author : Tcs Helpdesk10 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<% try { +%> + + + Asset Relocation + + + + + + + + + + + + + + + +
+ + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> +
+ Asset Relocation +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> + +
<%= error_msg%>
+ <% }%> + +
+ + + + + + + + + + + + + + + +
Asset ID:    
Transfer To:    
+
+

+
+ + +
+ +
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Asset_JSP/crarRiskMaster.jsp b/IPKS_Updated/web/web/web/Asset_JSP/crarRiskMaster.jsp new file mode 100644 index 0000000..b6836b3 --- /dev/null +++ b/IPKS_Updated/web/web/web/Asset_JSP/crarRiskMaster.jsp @@ -0,0 +1,421 @@ +<%-- + Document : CRAR Risk Master + Created on : July 11, 2022, 12:31:10 PM + Author : 1242938 +--%> + +<%@page import="DataEntryBean.AssetEntryBean"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.AssetRegisterBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + + + CRAR Risk Master + + + + + + + + + + + + + + + + <% + int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + <% + Object oAssetEntryBeanObj = request.getAttribute("oAssetEntryBean"); + Object alAssetEntryBeanObj = request.getAttribute("arrAssetEntryBean"); + + AssetEntryBean oAssetEntryBean = new AssetEntryBean(); + if (oAssetEntryBeanObj != null) { + oAssetEntryBean = (AssetEntryBean) request.getAttribute("oAssetEntryBean"); + } + + ArrayList alAssetEntryBean = new ArrayList(); + if (alAssetEntryBeanObj != null) { + alAssetEntryBean = (ArrayList) request.getAttribute("arrAssetEntryBean"); + } + %> + + + +
+
+ + CRAR Risk Master + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ +
+
+ +
+ +
+ <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+
+ + + + + + + + + + + <% + oAssetEntryBean = null; + oAssetEntryBean = new AssetEntryBean(); + int count2= 1; + + for (int i = 0; i < alAssetEntryBean.size(); i++) { + oAssetEntryBean = alAssetEntryBean.get(i); + count2++; + %> + + + + + + + + + + + + + <%}%> +
GL NameRisk PercentageRemarksStatus
+
+
+

+
+ + +
+ + + +
+ <%}%> + + + + +
+ +
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Asset_JSP/crarWorthMaster.jsp b/IPKS_Updated/web/web/web/Asset_JSP/crarWorthMaster.jsp new file mode 100644 index 0000000..0b49f9b --- /dev/null +++ b/IPKS_Updated/web/web/web/Asset_JSP/crarWorthMaster.jsp @@ -0,0 +1,381 @@ +<%-- + Document : CRAR Worth Master + Created on : July 18, 2022, 12:31:10 PM + Author : 1242938 +--%> + +<%@page import="DataEntryBean.AssetEntryBean"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.AssetRegisterBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + + + CRAR Worth Master + + + + + + + + + + + + + + + + <% + int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + <% + Object oAssetEntryBeanObj = request.getAttribute("oAssetEntryBean"); + Object alAssetEntryBeanObj = request.getAttribute("arrAssetEntryBean"); + + AssetEntryBean oAssetEntryBean = new AssetEntryBean(); + if (oAssetEntryBeanObj != null) { + oAssetEntryBean = (AssetEntryBean) request.getAttribute("oAssetEntryBean"); + } + + ArrayList alAssetEntryBean = new ArrayList(); + if (alAssetEntryBeanObj != null) { + alAssetEntryBean = (ArrayList) request.getAttribute("arrAssetEntryBean"); + } + %> + + + +
+
+ + CRAR Worth Master + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ +
+
+ + +
+ +
+ <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+
+ + + + + + + + + + <% + oAssetEntryBean = null; + oAssetEntryBean = new AssetEntryBean(); + int count2= 1; + + for (int i = 0; i < alAssetEntryBean.size(); i++) { + oAssetEntryBean = alAssetEntryBean.get(i); + count2++; + %> + + + + + + + + + + + + <%}%> +
GL NameRemarksStatus
+
+
+

+
+ + +
+ + + +
+ <%}%> + + + + +
+ +
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/CBSDataPosting.jsp b/IPKS_Updated/web/web/web/CBSDataPosting.jsp new file mode 100644 index 0000000..d015ed7 --- /dev/null +++ b/IPKS_Updated/web/web/web/CBSDataPosting.jsp @@ -0,0 +1,190 @@ +<%-- + Document : CBS Data Posting + Created on : Aug 3, 2015, 2:23:35 PM + Author : Administrator +--%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.CBSDataPostingBean"%> +<% try { +%> + + + + + CBS Data Posting + + + + + + + + + + + + + + + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + Object alCBSDataPostingBeanObj = request.getAttribute("alCBSDataPostingBean"); + ArrayList alCBSDataPostingBean = new ArrayList(); + if (alCBSDataPostingBeanObj != null) { + alCBSDataPostingBean = (ArrayList) request.getAttribute("alCBSDataPostingBean"); + } + %> + <% + Object oCBSDataPostingBeanSearchObj = request.getAttribute("oCBSDataPostingBeanSearchObj"); + CBSDataPostingBean oCBSDataPostingBean = new CBSDataPostingBean(); + CBSDataPostingBean oCBSDataPostingBeanSearch = new CBSDataPostingBean(); + if (oCBSDataPostingBeanSearchObj != null) { + oCBSDataPostingBean = (CBSDataPostingBean) request.getAttribute("oCBSDataPostingBeanSearchObj"); + } + %> + +
+ CBS DATA POSTING +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+

+ + + + + + + + + + + + +
   
+
+ + + + + + +
+ + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +

+
+
+ + + + + + + + + + + + + <% + oCBSDataPostingBean = null; + + for (int i = 0; i < alCBSDataPostingBean.size(); i++) { + oCBSDataPostingBean = alCBSDataPostingBean.get(i); + %> + + + + + + + + + + <%}%> + +
Serial NumberFile NameDCCB NameUpload Status
<%=(i + 1)%><%=blankNull(oCBSDataPostingBean.getFileName())%><%=blankNull(oCBSDataPostingBean.getDccbName())%>style="color: red"<%}%>><%=blankNull(oCBSDataPostingBean.getUploadStatus())%>
+
+
+ <%}%> +
+ + +<% } catch (Exception e) { + + } +%> + + + + diff --git a/IPKS_Updated/web/web/web/CBSKycPosting.jsp b/IPKS_Updated/web/web/web/CBSKycPosting.jsp new file mode 100644 index 0000000..0d93e9e --- /dev/null +++ b/IPKS_Updated/web/web/web/CBSKycPosting.jsp @@ -0,0 +1,185 @@ +<%-- + Document : CBS Data Posting + Created on : Aug 3, 2015, 2:23:35 PM + Author : Administrator +--%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.CBSDataPostingBean"%> + + + + + + + + + + + + + + + BULK Data Posting + + + + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + Object alCBSDataPostingBeanObj = request.getAttribute("alCBSDataPostingBean"); + ArrayList alCBSDataPostingBean = new ArrayList(); + if (alCBSDataPostingBeanObj != null) { + alCBSDataPostingBean = (ArrayList) request.getAttribute("alCBSDataPostingBean"); + } + %> + <% + Object oCBSDataPostingBeanSearchObj = request.getAttribute("oCBSDataPostingBeanSearchObj"); + CBSDataPostingBean oCBSDataPostingBean = new CBSDataPostingBean(); + CBSDataPostingBean oCBSDataPostingBeanSearch = new CBSDataPostingBean(); + if (oCBSDataPostingBeanSearchObj != null) { + oCBSDataPostingBean = (CBSDataPostingBean) request.getAttribute("oCBSDataPostingBeanSearchObj"); + } + %> + +
+ CUSTOMER (KYC) DATA POSTING +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+

+ + + + + + + + + + + + +
   
+
+ + + + + + +
+ + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +

+
+
+ + + + + + + + + + + + + <% + oCBSDataPostingBean = null; + + for (int i = 0; i < alCBSDataPostingBean.size(); i++) { + oCBSDataPostingBean = alCBSDataPostingBean.get(i); + %> + + + + + + + + + + <%}%> + +
Serial NumberFile NameDCCB NameUpload Status
<%=(i + 1)%><%=blankNull(oCBSDataPostingBean.getFileName())%><%=blankNull(oCBSDataPostingBean.getDccbName())%>style="color: red"<%}%>><%=blankNull(oCBSDataPostingBean.getUploadStatus())%>
+
+
+ <%}%> +
+ + + + + + + diff --git a/IPKS_Updated/web/web/web/CC_OD.jsp b/IPKS_Updated/web/web/web/CC_OD.jsp new file mode 100644 index 0000000..f265d5e --- /dev/null +++ b/IPKS_Updated/web/web/web/CC_OD.jsp @@ -0,0 +1,120 @@ +<%-- + Document : CC_OD + Created on : Aug 5, 2015, 12:51:24 PM + Author : Administrator +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + CC OD Account Deatils + + + + + + + + + + + + + + + +

+ <%! + String blankNull(String s){ + return(s==null)?"":s; + } + %> + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Account NumberCustomer Name
Account TypeSub Cat
Product DescriptionOutstanding
Current StatusIntt Accrued
Per Day InterestLimit Amount
Account Opening DateNPA Date
Limit Expiry DateAmt Of Irregularity
Effective DPIntt Rate
Expiry RateNew IRAC Status
Land Register(Land In Acre)
 
 
+ + +
+
+ + + diff --git a/IPKS_Updated/web/web/web/CifDetails.jsp b/IPKS_Updated/web/web/web/CifDetails.jsp new file mode 100644 index 0000000..d1088de --- /dev/null +++ b/IPKS_Updated/web/web/web/CifDetails.jsp @@ -0,0 +1,176 @@ +<%-- + Document : CifDetails + Created on : Aug 3, 2015, 2:23:35 PM + Author : Administrator +--%> + + + + CIF Details + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Customer Name and Address
CIF Details:*
Customer Type:*
Title:*
First Name:*
Middle Name:
Last Name:*
Father/Spouse Name:
User Mother's Maiden Name:
Door/Flat No;Building/Society:*
Block:
Gram Panchayet:*
District:
City/Town:* State:*
Country Post Code:*
Language Phone(Home)
Date Of Birth:* Phone(Business)
Gender Code:* Mobile No:
Marital Status: Fax No:
Nationality: Domicile:
Occupancy: Resident Status:


+
+ + +
+
+

"*" fields are mandatory

+ + + + diff --git a/IPKS_Updated/web/web/web/CommonSearchInfoLOVNew.jsp b/IPKS_Updated/web/web/web/CommonSearchInfoLOVNew.jsp new file mode 100644 index 0000000..b941a2e --- /dev/null +++ b/IPKS_Updated/web/web/web/CommonSearchInfoLOVNew.jsp @@ -0,0 +1,2608 @@ +<%-- + Document : CommonSearchInfoLOVNew + Created on : Mar 10, 2016, 2:30:36 AM + +--%> + +<%@page import="java.sql.PreparedStatement"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> + + + + + + Common Information Search + + + + + + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankNA(String s) { + return (s == null) ? "NA" : s; + } + %> + <% + String searchString1 = ""; + String searchString2= null; + String searchString3= null; + String screenName = ""; + String productCode = ""; + String loanAccount =""; + String lovKey = ""; + String Counter = ""; + String Option=""; + String lienType=""; + String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + String headPacsId = (String) session.getAttribute("headPacsId").toString(); + screenName = request.getParameter("screenName"); + lovKey = request.getParameter("lovKey"); + String pacsId = session.getAttribute("pacsId").toString(); + + String user = session.getAttribute("user").toString(); + + String headerQry = null; + + if ((screenName.equalsIgnoreCase("AgentMapping.jsp"))&& (lovKey.equalsIgnoreCase("agntAccount"))) { + + + searchString1 = pacsId; + searchString2= user; + // searchString3=request.getParameter("customerName"); + + headerQry = "select d.key_1,(select r.first_name || nvl(r.middle_name, ' ') || nvl(r.last_name, ' ') from kyc_hdr r" + + " where r.cif_no = d.customer_no),d.avail_bal ,'DEPOSIT' accType from dep_account d where " + + " d.dep_prod_id in (select p.id from dds_prod_map p where p.status='ACTIVE' and p.prod_typ='DEP' and p.pacs_id='"+ searchString1+"')" + + " and d.pacs_id = '" + searchString1 + "' and d.key_1 like '%" + searchString3 + "%' " + + " union all select l.key_1, (select r.first_name || nvl(r.middle_name, ' ') || nvl(r.last_name, ' ')" + + " from kyc_hdr r where r.cif_no = l.customer_no), l.outst_bal,'LOAN' accType from loan_account l " + + " where l.loan_prod_id in (select p.id from dds_prod_map p where p.status='ACTIVE' and p.prod_typ='LOAN' and p.pacs_id='"+ searchString1+"') and substr(l.gl_class_code,9,2)='23' " + + " and l.pacs_id = '" + searchString1 + "' and l.key_1 like '%" + searchString3 + "%' order by 1 "; + + }else if (((screenName.equalsIgnoreCase("AgentMapping.jsp")) || (screenName.equalsIgnoreCase("TotalCashDepositDDS.jsp")) ) && (lovKey.equalsIgnoreCase("agntMap"))) { + + + searchString1 = pacsId; + searchString2= user; + // searchString3=request.getParameter("agentName"); + + headerQry = " select d.login_id,d.login_name , t.limit_amt,(t.limit_amt-t.tot_rem_amt) diff_amt from login_details d,dds_agent_limit t " + +" where d.user_role_id ='201603000004020' and d.pacs_id=t.pacs_id and d.pacs_id='"+searchString1+"'" + +" and t.agent_id=d.login_id and to_char(d.login_id) like '%"+searchString3+"%'"; + }else if ((screenName.equalsIgnoreCase("AgentMapping.jsp")) && (lovKey.equalsIgnoreCase("limitSetting"))) { + + + searchString1 = pacsId; + searchString2= user; + // searchString3=request.getParameter("agentName"); + + headerQry = + " select d.login_id,d.login_name, t.limit_amt,(t.limit_amt-t.tot_rem_amt) diff_amt " + +" from login_details d,dds_agent_limit t where d.user_role_id ='201603000004020' and d.pacs_id=t.pacs_id and d.pacs_id='"+searchString1+"'" + +" and t.agent_id=d.login_id and to_char(d.login_id) like '%"+searchString3+"%'"; + + } + else if ((screenName.equalsIgnoreCase("BatchTransaction.jsp")|| (screenName.equalsIgnoreCase("BatchAuthorisation.jsp"))) && (lovKey.equalsIgnoreCase("BatchSearch"))) { + + + searchString1 = pacsId; + searchString2= user; + /*searchString3=request.getParameter("batchId");*/ + + headerQry = " select s.batch_id batchid, (sum(s.txn_amt) / 2) amt, s.status stat,nvl(to_char(s.txn_dt,'dd-Mon-yyyy'),'NA') " + +" from batch_txn_details s where "; + if ((screenName.equalsIgnoreCase("BatchTransaction.jsp"))) { + headerQry = headerQry + " s.status in ('ACTIVE','INACTIVE') "; + } else if ((screenName.equalsIgnoreCase("BatchAuthorisation.jsp"))) { + headerQry = headerQry + " s.status='ACTIVE' "; + } + headerQry = headerQry + " and s.pacs_id='" + searchString1 + "' and s.batch_id like '%" + searchString3 + "%'" + + " group by s.batch_id,s.status,s.txn_dt order by s.txn_dt,s.status desc "; + }else if (screenName.equalsIgnoreCase("ChequePosting.jsp") && (lovKey.equalsIgnoreCase("chqEnq"))) { + + //searchString1 = request.getParameter("accNo"); + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + headerQry = " select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,t.avail_bal,k.photo_path,k.sig_photo " + + " ,nvl((select nvl(kl.id_no,'NA') from kyc_dtl kl where kl.kyc_document_mst_id = '909201600008' and kl.cif_no = t.customer_no),'NA') PAN_ID_NO " + + " from dep_account t,kyc_hdr k,dep_product p, INWARD_CHQ_DETAILS ct where k.cif_no=t.customer_no and ct.key_1=t.key_1 " + + " and ct.status='PENDING' and t.dep_prod_id = p.id and p.prod_code in ('1101','1102') and substr(p.INT_CAT,1,1) ='1' and substr(t.gl_class_code,9,2)='14' and t.curr_status <>'C' and " + + " (ct.key_1 like '%" + searchString1 + "%' ) and " + + " t.key_1 in (select ci.key_1 from INWARD_CHQ_DETAILS ci where ci.status='PENDING' and ci.key_1 like '%" + searchString1 + "%' ) and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "')"; + + //,INWARD_CHQ_DETAILS ci + + + } else if ((screenName.equalsIgnoreCase("DepositTransferClosure.jsp")) && (lovKey.equalsIgnoreCase("glAccount"))) { + + // searchString1 = request.getParameter("accNo_gl_to"); + + headerQry = "select ga.key_1, ga.ledger_name,gp.gl_code,gp.id,gp.gl_name from gl_account ga, gl_product gp where ga.gl_prod_id=gp.id and gp.id <> '201611000001184' and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') "; + + } + else if ((screenName.equalsIgnoreCase("InsuranceAddition.jsp")) && (lovKey.equalsIgnoreCase("CifIns"))) { + + // searchString1 = request.getParameter("cifNumber"); + + headerQry = "select r.cif_no,(r.first_name||' '||r.middle_name||' '||r.last_name) as custName,r.guardian_name,r.photo_path,r.sig_photo," + +"NVL((select trim(s.insurance_details) from kyc_ins s where s.cif_no=r.cif_no),'NA') as ins_no," + +"NVL((select trim(to_char((s.insurance_issu_date),'DD-MON-YYYY')) from kyc_ins s where s.cif_no=r.cif_no),'NA') as ins_issu_dt," + +"NVL((select trim(s.insurance_company) from kyc_ins s where s.cif_no=r.cif_no),'NA') as ins_cmpny," + +"NVL((select trim(s.status) from kyc_ins s where s.cif_no=r.cif_no),'NA') as status" + +" from kyc_hdr r where r.pacs_id='"+pacsId+"' " + +" and r.cif_no = '"+searchString1+"' "; + + }else if ((screenName.equalsIgnoreCase("PrintPassbook.jsp")) && (lovKey.equalsIgnoreCase("accSrch"))) { + + //searchString1 = request.getParameter("acc"); + searchString2 = request.getParameter("accType"); + searchString3 = request.getParameter("accSubType"); + + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + + if (searchString2.equalsIgnoreCase("D") && searchString3.equalsIgnoreCase("SB")) { + headerQry = "select da.key_1, (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) name, nvl(k.guardian_name,' '), dp.prod_name,k.cif_no from dep_account da, kyc_hdr k, dep_product dp where da.customer_no = k.cif_no and da.dep_prod_id = dp.id and dp.prod_code in ('1101','1017') and substr(dp.int_cat,1,1) = '1' and substr(da.GL_CLASS_CODE,9,2) in ('14','11') and upper(dp.prod_name) not like '%CURRENT%' and (upper(k.first_name) like upper('" + searchString1.replace(' ', '%') + "%') or da.key_1 like '%" + searchString1.replace(' ', '%') + "%' or da.link_accno like '%" + searchString1.replace(' ', '%') + "%' ) and da.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') "; + } else if (searchString2.equalsIgnoreCase("D") && searchString3.equalsIgnoreCase("RD")) { + headerQry = "select da.key_1, (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) name, nvl(k.guardian_name,' '), dp.prod_name,k.cif_no from dep_account da, kyc_hdr k, dep_product dp where da.customer_no = k.cif_no and da.dep_prod_id = dp.id and dp.prod_code ='3001' and substr(dp.int_cat,1,1) = '1' and substr(da.GL_CLASS_CODE,9,2)='14' and (upper(k.first_name) like upper('" + searchString1.replace(' ', '%') + "%') or da.key_1 like '%" + searchString1.replace(' ', '%') + "%') and da.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') "; + } else if (searchString2.equalsIgnoreCase("D") && searchString3.equalsIgnoreCase("CR")) { + headerQry = "select da.key_1, (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) name, nvl(k.guardian_name,' '), dp.prod_name,k.cif_no from dep_account da, kyc_hdr k, dep_product dp where da.customer_no = k.cif_no and da.dep_prod_id = dp.id and dp.prod_code = '1101' and substr(dp.int_cat,1,1) = '1' and substr(da.GL_CLASS_CODE,9,2)='14' and upper(dp.prod_name) like '%CURRENT%' and (upper(k.first_name) like upper('" + searchString1.replace(' ', '%') + "%') or da.key_1 like '%" + searchString1.replace(' ', '%') + "%' or da.link_accno like '%" + searchString1.replace(' ', '%') + "%' ) and da.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') "; + } else if (searchString2.equalsIgnoreCase("D") && searchString3.equalsIgnoreCase("SHG")) { + headerQry = "select da.key_1, (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) name, nvl(k.guardian_name,' '), dp.prod_name,k.cif_no from dep_account da, kyc_hdr k, dep_product dp where da.customer_no = k.cif_no and da.dep_prod_id = dp.id and dp.prod_code = '1102' and substr(dp.int_cat,1,1) = '1' and substr(da.GL_CLASS_CODE,9,2)='14' and (upper(k.first_name) like upper('" + searchString1.replace(' ', '%') + "%') or da.key_1 like '%" + searchString1.replace(' ', '%') + "%' or da.link_accno like '%" + searchString1.replace(' ', '%') + "%' ) and da.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') "; + } else if (searchString2.equalsIgnoreCase("L")) { + headerQry = "select la.key_1, (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) name, nvl(k.guardian_name,' '), lp.prod_name,k.cif_no from loan_account la, kyc_hdr k, loan_product lp where la.customer_no = k.cif_no and substr(la.GL_CLASS_CODE,9,2)='23' and la.loan_prod_id = lp.id and (upper(k.first_name) like upper('" + searchString1.replace(' ', '%') + "%') or la.key_1 like '%" + searchString1.replace(' ', '%') + "%') and la.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "')"; + } else if (searchString2.equalsIgnoreCase("K")) { + headerQry = "select da.key_1, (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) name, nvl(k.guardian_name,' '), dp.prod_name,k.cif_no from dep_account da, kyc_hdr k, dep_product dp where da.customer_no = k.cif_no and da.dep_prod_id = dp.id and dp.prod_code ='6001' and substr(da.GL_CLASS_CODE,9,2) ='23' and (upper(k.first_name) like upper('" + searchString1.replace(' ', '%') + "%') or da.key_1 like '%" + searchString1.replace(' ', '%') + "%' or da.link_accno like '%" + searchString1.replace(' ', '%') + "%' ) and da.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "')"; + } else { + headerQry = "select * from dep_account where key_1='1' "; + } + + } else if ((screenName.equalsIgnoreCase("CashWidrawlDeposit.jsp")) && (lovKey.equalsIgnoreCase("ddsCash"))) { + + + searchString1 = pacsId; + searchString3= user; + // searchString2=request.getParameter("accountNo"); + String trnType = request.getParameter("trnType"); + String searchFlag = request.getParameter("sflag"); + if(searchFlag.equalsIgnoreCase("true")){ + if(trnType.equalsIgnoreCase("CR")){ + headerQry = "select d.key_1,(select r.first_name || nvl(r.middle_name, ' ') || nvl(r.last_name, ' ')" + +" from kyc_hdr r where r.cif_no = d.customer_no), d.avail_bal, 'DEPOSIT' accType from dep_account d, " + +" dds_agent_acct a where d.pacs_id = '" + searchString1 + "' and d.key_1=a.dds_acct and substr(d.GL_CLASS_CODE,9,2)='14' and d.curr_status='O' and d.customer_no in " + +" (select r.cif_no from kyc_hdr r where upper(r.first_name) like upper( '" + searchString2 + "%' ) and r.pacs_id in (select pacs_id from pacs_master where head_pacs_id= (select head_pacs_id from pacs_master where pacs_id='" + searchString1 + "')))" + +" and d.dep_prod_id in (select p.id from dds_prod_map p where p.pacs_id='" + searchString1 + "' and p.prod_typ ='DEP' and p.status='ACTIVE' ) " + +" and a.agent_id='" + searchString3 + "' union all " + +" select d.key_1,(select r.first_name || nvl(r.middle_name, ' ') || nvl(r.last_name, ' ') from kyc_hdr r " + +" where r.cif_no = d.customer_no), d.outst_bal, 'LOAN' accType from loan_account d,dds_agent_acct a " + +" where a.dds_acct=d.key_1 and substr(d.GL_CLASS_CODE,9,2)='23' and d.curr_status in ('02','03') and d.loan_prod_id in (select p.id from dds_prod_map p where p.pacs_id='" + searchString1 + "' and p.prod_typ ='LOAN' and p.status='ACTIVE' ) and d.pacs_id= '" + searchString1 + "' and d.customer_no in (select r.cif_no from kyc_hdr r where " + +" upper(r.first_name) like upper( '" + searchString2 + "%' ) and r.pacs_id in (select pacs_id from pacs_master where head_pacs_id= (select head_pacs_id from pacs_master where pacs_id='" + searchString1 + "'))) " + +" and a.agent_id='" + searchString3 + "' " ; + + }else if (trnType.equalsIgnoreCase("DR")){ + headerQry = "select d.key_1,(select r.first_name || nvl(r.middle_name, ' ') || nvl(r.last_name, ' ')" + +" from kyc_hdr r where r.cif_no = d.customer_no), d.avail_bal, 'DEPOSIT' accType from dep_account d, " + +" dds_agent_acct a where d.pacs_id = '" + searchString1 + "' and d.key_1=a.dds_acct and d.curr_status='O' and substr(d.GL_CLASS_CODE,9,2)='14' and d.customer_no in " + +" (select r.cif_no from kyc_hdr r where upper(r.first_name) like upper( '" + searchString2 + "%' ) and r.pacs_id in (select pacs_id from pacs_master where head_pacs_id=(select head_pacs_id from pacs_master where pacs_id='" + searchString1 + "')))" + +" and d.dep_prod_id in (select p.id from dds_prod_map p where p.pacs_id='" + searchString1 + "' and p.prod_typ ='DEP' and p.status='ACTIVE' ) " + +" and a.agent_id='" + searchString3 + "' "; + } + } + else + { + if(trnType.equalsIgnoreCase("CR")){ + headerQry = "select d.key_1,(select r.first_name || nvl(r.middle_name, ' ') || nvl(r.last_name, ' ') from kyc_hdr r" + + " where r.cif_no = d.customer_no),d.avail_bal ,'DEPOSIT' accType from dep_account d, DDS_AGENT_ACCT a where d.key_1 = a.dds_acct and substr(d.GL_CLASS_CODE,9,2)='14' and d.curr_status='O' " + + " and d.dep_prod_id in (select p.id from dds_prod_map p where p.pacs_id='" + searchString1 + "' and p.prod_typ ='DEP' and p.status='ACTIVE' )" + + " and d.pacs_id = '" + searchString1 + "' and d.customer_no in (select r.cif_no from kyc_hdr r where r.pacs_id in (select pacs_id from pacs_master where head_pacs_id = (select head_pacs_id from pacs_master where pacs_id = '" + searchString1 + "'))) and ( d.key_1 like '%" + searchString2 + "%' or d.old_accno like '%" + searchString2 + "%')" + + " and a.agent_id = '" + searchString3 + "'" + + " union all select l.key_1, (select r.first_name || nvl(r.middle_name, ' ') || nvl(r.last_name, ' ')" + + " from kyc_hdr r where r.cif_no = l.customer_no), l.outst_bal,'LOAN' accType from loan_account l, DDS_AGENT_ACCT a " + + " where l.pacs_id = '" + searchString1 + "' and substr(l.GL_CLASS_CODE,9,2)='23' and l.curr_status in ('02','03') and l.customer_no in (select r.cif_no from kyc_hdr r where r.pacs_id in (select pacs_id from pacs_master where head_pacs_id = (select head_pacs_id from pacs_master where pacs_id = '" + searchString1 + "'))) and (l.key_1 like '%" + searchString2 + "%' or l.old_accno like '%" + searchString2 + "%')" + + " and a.agent_id = '" + searchString3 + "'" + + " and l.key_1 = a.dds_acct and l.loan_prod_id in (select p.id from dds_prod_map p where p.pacs_id='" + searchString1 + "' and p.prod_typ ='LOAN' and p.status='ACTIVE' )" + + " and l.pacs_id ='" + searchString1 + "' and a.agent_id = '" + searchString3 + "' order by 1 "; + }else if (trnType.equalsIgnoreCase("DR")){ + headerQry = "select d.key_1,(select r.first_name || nvl(r.middle_name, ' ') || nvl(r.last_name, ' ') from kyc_hdr r" + + " where r.cif_no = d.customer_no),d.avail_bal ,'DEPOSIT' accType from dep_account d, DDS_AGENT_ACCT a where d.key_1 = a.dds_acct and substr(d.GL_CLASS_CODE,9,2)='14' and d.curr_status='O' " + + " and d.dep_prod_id in (select p.id from dds_prod_map p where p.pacs_id='" + searchString1 + "' and p.prod_typ ='DEP' and p.status='ACTIVE' )" + + " and d.pacs_id = '" + searchString1 + "' and d.customer_no in (select r.cif_no from kyc_hdr r where r.pacs_id in (select pacs_id from pacs_master where head_pacs_id = (select head_pacs_id from pacs_master where pacs_id = '" + searchString1 + "'))) and (d.key_1 like '%" + searchString2 + "%' or d.old_accno like '%" + searchString2 + "%')" + + " and a.agent_id = '" + searchString3 + "'order by 1 "; + + } + } + }else if (( screenName.equalsIgnoreCase("BulkFileUpload.jsp") || screenName.equalsIgnoreCase("AccountRenewalBulk.jsp") ) && (lovKey.equalsIgnoreCase("bulkReport")) ) { + + // searchString1 = request.getParameter("fileId"); + if(screenName.equalsIgnoreCase("BulkFileUpload.jsp")){ + headerQry = "select file_id,file_name,trunc(POST_DATE),status from bulk_files_details where pacs_id='"+pacsId+"' and file_Id like '%" + searchString1.replace(' ', '%') + "%' and status is not NULL "; + }else if(screenName.equalsIgnoreCase("AccountRenewalBulk.jsp")) + { + headerQry = "select file_id,file_name,trunc(POST_DATE),status from bulk_kcc_renewal_files where pacs_id='"+pacsId+"' and file_Id like '%" + searchString1.replace(' ', '%') + "%' "; + } + + }else if ((screenName.equalsIgnoreCase("AccountRenewalBulkSTB.jsp")) && (lovKey.equalsIgnoreCase("bulkReport"))) { + + //searchString1 = request.getParameter("fileId"); + headerQry = "select file_id, nvl((select pacs_name from pacs_master ki where ki.pacs_id = l.pacs_id),'NA') pacs_name, nvl((select file_name from bulk_kcc_renewal_files ki where ki.file_id = l.file_id and ki.pacs_id = l.pacs_id),'NA') file_name, " + + " trunc(TXN_DATE) , nvl((select ki.STATUS from bulk_kcc_renewal_files ki where ki.file_id = l.file_id and ki.pacs_id = l.pacs_id),'NA')STATUS from bank_pacs_kcc_renew l where bank_id = '"+pacsId+"' and file_Id like '%" + searchString1.replace(' ', '%') + "%' order by TXN_DATE "; + + }else if ((screenName.equalsIgnoreCase("DepositMiscellaneousOperation.jsp")) && (lovKey.equalsIgnoreCase("TransactionNoSearch"))) { + + + //searchString1 = request.getParameter("depositAccNo"); + // searchString2=request.getParameter("TxnNo"); + + headerQry = " select d.key_1, k.cif_no, (k.first_name || nvl2(k.middle_name, ' ' || k.middle_name, '') || nvl2(k.last_name, ' ' || k.last_name, '')), dt.cbs_ref_no, dt.txn_amt, dt.tran_ind, " + + " to_char(dt.tran_date, 'DD-MON-YYYY') tran_date, to_char(dt.post_time, 'DD-MON-RR HH24:MI:SS ') || substr(dt.post_time, -2) post_time, (case when dt.pb_print_status is null then 'NOT PRINTED' " + + " else 'PRINTED' end) PRINTED_ON_PASSBOOK_OR_NOT from kyc_hdr k, dep_account d, dep_txn dt where d.key_1 = dt.acct_no and d.customer_no = k.cif_no and substr(d.GL_CLASS_CODE,9,2)='14' and d.dep_prod_id in (select id from dep_product dp where substr(dp.int_cat,1,1) = '1' and substr(dp.prod_code,1,1) in ( '1','3')) and d.key_1 like '%" + searchString1.replace(' ', '%') + "%' " + + " and dt.cbs_ref_no like '%" + searchString2.replace(' ', '%') + "%' and d.pacs_id = '" + pacsId + "' order by dt.acct_no,dt.tran_date, dt.post_time "; + + } + + else if ((screenName.equalsIgnoreCase("DepositMiscellaneousOperation.jsp")) && (lovKey.equalsIgnoreCase("TransactionLoanNoSearch"))) { + + // searchString1 = request.getParameter("loanAccNo"); + //searchString2=request.getParameter("TxnNo"); + + headerQry = "SELECT D.KEY_1,K.CIF_NO,(K.FIRST_NAME|| NVL2(K.MIDDLE_NAME, ' '|| K.MIDDLE_NAME, '')|| NVL2(K.LAST_NAME, ' '|| K.LAST_NAME, '')), " + + " DT.TXN_REF_NO,DT.TXN_AMT,DT.TRAN_IND,TO_CHAR(DT.TRAN_DATE, 'DD-MON-YYYY') TRAN_DATE,TO_CHAR(DT.POST_TIME, 'DD-MON-RR HH24:MI:SS ')|| SUBSTR(DT.POST_TIME, -2) POST_TIME, " + + " (CASE WHEN DT.PB_PRINT_STATUS IS NULL THEN 'NOT PRINTED' ELSE 'PRINTED' END) PRINTED_ON_PASSBOOK_OR_NOT FROM KYC_HDR K,LOAN_ACCOUNT D,LOAN_TXN DT " + + " WHERE D.KEY_1 = DT.ACCT_NO AND D.CUSTOMER_NO = K.CIF_NO AND SUBSTR(D.GL_CLASS_CODE, 9, 2)='23' " + + " AND D.LOAN_PROD_ID IN (SELECT ID FROM LOAN_PRODUCT LP WHERE SUBSTR(LP.INT_CAT, 1, 1) = '1' AND SUBSTR(LP.PROD_CODE, 1, 1) IN ( '7'))" + + " AND DT.TXN_REF_NO LIKE '%" + searchString2.replace(' ', '%') + "%' AND d.key_1 like '%" + searchString1.replace(' ', '%') + "%' AND D.PACS_ID = '" + pacsId + "' ORDER BY DT.ACCT_NO,DT.TRAN_DATE,DT.POST_TIME "; + } + else if ((screenName.equalsIgnoreCase("farmerDetailsUpdation.jsp")) && (lovKey.equalsIgnoreCase("cifSearch"))) { + + // searchString1 = request.getParameter("cifNumber"); + headerQry = "select a.customer_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,a.key_1,nvl(a.link_accno,'NA') " + + " from dep_account a,kyc_details t where a.customer_no=t.cif_no and a.pacs_id= '" + pacsId + "' and " + + " a.dep_prod_id in (select p.id from dep_product p where p.prod_code = '6001') and substr(a.GL_CLASS_CODE,9,2)='23' and a.customer_no = '" + searchString1.replace(' ', '%') + "' "; + + } + else if ((screenName.equalsIgnoreCase("TDOperation.jsp")) && (lovKey.equalsIgnoreCase("CalcFDMaturity"))) { + + // searchString1 = request.getParameter("termValue"); + //int termYears = Integer.parseInt(request.getParameter("termYears")); + //int termMonth = Integer.parseInt(request.getParameter("termMonth")); + //int termDays = Integer.parseInt(request.getParameter("termDays")); + //String accNo = request.getParameter("accNo"); + + termMonth = termMonth + (termYears * 12); + + headerQry = "select t.rate, (case when d.prod_code='2001' then (calcMISAmt_TD((case d.int_method when 'S' then d.intt_payout_freq else d.int_cap_freq end), t.rate, " + searchString1 + ")) else ( calcMatAmt_TD(d.int_method, (case d.int_method when 'S' then d.intt_payout_freq else d.int_cap_freq end), t.rate, " + searchString1 + ", " + termMonth + ", " + termDays + ")) end), d.prod_code,d.int_cat,d.prod_desc from td_rate_slab t, dep_product d where t.product_id=d.id and t.pacs_id='"+pacsId+"' and d.prod_code=(select p.prod_code from dep_product p where p.id=(select a.dep_prod_id from dep_account a where a.key_1="+accNo+")) and d.int_cat=(select p.int_cat from dep_product p where p.id=(select a.dep_prod_id from dep_account a where a.key_1="+accNo+")) and to_number((add_months((select system_date from system_date)," + termMonth + ") + " + termDays + ") - (select system_date from system_date)) between t.term_from and t.term_to and " + searchString1 + " between t.from_amt and t.to_amt and (select system_date from system_date) between t.eff_from_date and t.eff_to_date"; + } else if ((screenName.equalsIgnoreCase("TDOperation.jsp") || (screenName.equalsIgnoreCase("RDOperation.jsp"))) && (lovKey.equalsIgnoreCase("GLAccSearchTransfer"))) { + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + searchString1 = request.getParameter("accNo"); + + headerQry = "select key_1,ledger_name,gl_prod_id,ledger_desc,cum_curr_val from gl_account where pacs_id='"+ pacsId +"' and gl_prod_id = '02145002286'"; + + } // Added TGL code 28.02.2024 + else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CifDetails"))) { + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + // searchString1 = request.getParameter("cifNumber"); + productCode = request.getParameter("productCode"); + if (productCode.equalsIgnoreCase("1017")) { + + headerQry = "select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,nvl(customer_type,' '),t.address_1,nvl(t.address_1,' '),nvl(t.address_2,' '), nvl(t.address_3,''),t.guardian_name from kyc_hdr t " + + " where t.cif_no = '" + searchString1.replace(' ', '%') + "' and t.pacs_id in (select m.pacs_id from pacs_master m where m.head_pacs_id=(select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))"; + + } else { + headerQry = "select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,nvl(customer_type,' '),t.address_1,nvl(t.address_1,' '),nvl(t.address_2,' '), nvl(t.address_3,''),t.guardian_name from kyc_hdr t " + + " where t.cif_no = '" + searchString1.replace(' ', '%') + "' and t.pacs_id in (select m.pacs_id from pacs_master m where m.head_pacs_id= (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "') )"; + } + + } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CifDetails2"))) { + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + // searchString1 = request.getParameter("cifNumber"); + productCode = request.getParameter("productCode"); + Counter = request.getParameter("Counter"); + + if (productCode.equalsIgnoreCase("1017")) { + + headerQry = " select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,nvl(customer_type,' '),t.address_1,nvl(t.address_1,' '),nvl(t.address_2,' '), nvl(t.address_3,'') from kyc_hdr t " + + " where t.cif_no = '" + searchString1.replace(' ', '%') + "' and t.pacs_id in (select m.pacs_id from pacs_master m where m.head_pacs_id=(select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))"; + + } else { + headerQry = "select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,nvl(customer_type,' '),t.address_1,nvl(t.address_1,' '),nvl(t.address_2,' '), nvl(t.address_3,''),t.guardian_name from kyc_hdr t " + + " where t.cif_no = '" + searchString1.replace(' ', '%') + "' and t.pacs_id in (select m.pacs_id from pacs_master m where m.head_pacs_id= (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "' ))"; + } + + } else if ((screenName.equalsIgnoreCase("accountAmend.jsp")) && (lovKey.equalsIgnoreCase("AccSrch"))) { + if (subPacsFlag.equalsIgnoreCase("Y")) { + // pacsId = headPacsId; + } + // searchString1 = request.getParameter("Acc"); + + headerQry = "select da.key_1,da.customer_no, upper(k.first_name || ' ' || k.middle_name || ' ' || k.last_name) custName, dp.prod_name, nvl(da.limit,'0'), da.avail_bal, nvl(da.prin_outst,'0'), nvl(da.intt_outst,'0'), nvl(da.penal_intt_outst,'0'), to_char(da.limit_exp_date, 'DD-MON-YYYY') exp_date, dp.int_cat from dep_account da, kyc_hdr k, dep_product dp " + + " where da.customer_no = k.cif_no and da.dep_prod_id = dp.id and dp.prod_code ='6001' and substr(da.GL_CLASS_CODE,9,2)='23' and da.curr_status='O' and da.pacs_id='" + pacsId + "' and (upper(k.first_name) like upper('" + searchString1 + "%') or da.key_1 like '%" + searchString1 + "%' or da.customer_no like '%" + searchString1 + "%')"; + + + }else if ((screenName.equalsIgnoreCase("accountAmendSTB.jsp")) && (lovKey.equalsIgnoreCase("AccSrch"))) { + // searchString1 = request.getParameter("Acc"); + + headerQry = "select upper(pm.pacs_name) pacs_name, da.pacs_id, da.key_1, da.customer_no, upper(k.first_name || ' ' || k.middle_name || ' ' || k.last_name) custName, dp.prod_name, (case da.curr_status when 'C' then 'Closed' else 'Open/Active' end) curr_status, nvl(da.sanction_amt, '0'), nvl(da.avail_bal, '0') avail_bal, nvl(da.prin_outst, '0'), nvl(da.intt_outst, '0'), " + + " nvl(da.penal_intt_outst, '0'), to_char(da.limit_exp_date, 'DD-MON-YYYY') exp_date, dp.int_cat from dep_account da, kyc_hdr k, dep_product dp, pacs_master pm where da.customer_no = k.cif_no and da.pacs_id = pm.pacs_id and da.dep_prod_id = dp.id and dp.prod_code = '6001' and substr(da.GL_CLASS_CODE,9,2)='23' and substr(dp.int_cat,1,1) ='1' and to_number(pm.dccb_code) = (select to_number(pa.dccb_code) " + + " from pacs_master pa where pacs_id = '" + pacsId + "') and to_number(pm.cbs_br_code) = (select to_number(pa.cbs_br_code) from pacs_master pa where pacs_id = '" + pacsId + "') and da.key_1 = '" + searchString1 + "' order by pacs_name, da.pacs_id, custName "; + + } else if ((screenName.equalsIgnoreCase("CBSAccountMapping.jsp")) && (lovKey.equalsIgnoreCase("AccSrch"))) { + // searchString1=request.getParameter("Acc"); + Option=request.getParameter("Option"); + + if (Option.equalsIgnoreCase("nremark")) { + headerQry = " select key_1 as acct, 'NA' as CBS_Acct, nvl(trim(kd.first_name), '') || ' ' || nvl(trim(kd.middle_name), '') || ' ' || nvl(trim(kd.last_name), '') as cutomer_name, nvl(trim(kd.guardian_name), 'NA') guardian_name " + +" from dep_account da, kyc_hdr kd where da.key_1 in (select key_1 from bulk_acct_mark s where s.status in ('M', 'S', 'RBA', 'RBB') and s.pacs_id = '" + pacsId + "') and da.link_accno is null " + +" and da.dep_prod_id in (select id from dep_product dp where dp.prod_code in ('1101', '1102') and substr(dp.int_cat,1,1) = '1') and substr(da.GL_CLASS_CODE,9,2)='14' and kd.bank_cif is null and da.customer_no = kd.cif_no and da.key_1 like '%" +searchString1+ "%' and da.pacs_id = '" + pacsId + "' "; + } + else if (Option.equalsIgnoreCase("eremark")) { + headerQry = " select key_1 as acct, 'NA' as CBS_Acct, nvl(trim(kd.first_name), '') || ' ' || nvl(trim(kd.middle_name), '') || ' ' || nvl(trim(kd.last_name), '') as cutomer_name, nvl(trim(kd.guardian_name), 'NA') guardian_name " + +" from dep_account da, kyc_hdr kd where da.key_1 in (select key_1 from bulk_acct_mark s where s.status in ('M', 'S', 'RBA', 'RBB') and s.pacs_id = '" + pacsId + "') and da.link_accno is null " + +" and da.dep_prod_id in (select id from dep_product dp where dp.prod_code in ('1101', '1102') and substr(dp.int_cat,1,1) = '1') and substr(da.GL_CLASS_CODE,9,2)='14'and kd.bank_cif is not null and da.customer_no = kd.cif_no and da.key_1 like '%" +searchString1+ "%' and da.pacs_id = '" + pacsId + "' "; + } + else { + headerQry = " select d.key_1, nvl(trim(d.link_accno),'NA') CBS, nvl((select trim(r.first_name) || ' ' || " + +" trim(r.middle_name) || ' ' || trim(r.last_name) from kyc_hdr r " + +" where r.cif_no = d.customer_no),'NA') cust_name, " + +" nvl((select trim(r.guardian_name) from kyc_hdr r where r.cif_no=d.customer_no and r.pacs_id=d.pacs_id),'NA') guardian_name " + +" from dep_account d where d.pacs_id = '" + pacsId + "' " + +" and ( d.key_1 like '%" +searchString1+ "%' or d.link_accno like '%" +searchString1+ "%') and d.dep_prod_id in " + +" (select p.id from dep_product p where p.prod_code in ('1101','1102') and substr(p.int_cat,1,1) = '1') and substr(d.GL_CLASS_CODE,9,2)='14' "; + } + } else if ((screenName.equalsIgnoreCase("ForceAccountClosure.jsp")) && (lovKey.equalsIgnoreCase("AccSrch"))) { + //searchString1=request.getParameter("Acc"); + + headerQry = " select key_1 as acctno, (select trim(dp.prod_name) from dep_product dp where dp.id = da.dep_prod_id) prod_name, nvl(trim(kd.first_name), '') || ' ' || nvl(trim(kd.middle_name), '') || ' ' || nvl(trim(kd.last_name), '') as cutomer_name, " + +" nvl(trim(kd.guardian_name), 'NA') guardian_name, 'DEPOSIT ACCT' acct_type from dep_account da, kyc_hdr kd where da.dep_prod_id in (select id from dep_product dp where dp.prod_code <> '6001') and substr(da.GL_CLASS_CODE,9,2) in ('14','11') and da.customer_no = kd.cif_no " + +" and da.key_1 like '%" +searchString1+ "%' and da.avail_bal = 0 and da.curr_status in ('O', 'A', 'I') and da.pacs_id = '" + pacsId + "' " + +" union all " + +" select key_1 as acctno, (select trim(dp.prod_name) from dep_product dp where dp.id = da.dep_prod_id) prod_name, nvl(trim(kd.first_name), '') || ' ' || nvl(trim(kd.middle_name), '') || ' ' || " + +" nvl(trim(kd.last_name), '') as cutomer_name, nvl(trim(kd.guardian_name), 'NA') guardian_name, 'KCC/CC ACCT' acct_type from dep_account da, kyc_hdr kd where da.dep_prod_id in " + +" (select id from dep_product dp where dp.prod_code = '6001') and substr(da.GL_CLASS_CODE,9,2)='23' and da.customer_no = kd.cif_no and da.key_1 like '%" +searchString1+ "%' and da.prin_outst = 0 and da.curr_status in ('O', 'A', 'I') and da.pacs_id = '" + pacsId + "' " + +"union all " + +" select key_1 as acctno, (select trim(dp.prod_name) from loan_product dp where dp.id = da.loan_prod_id) prod_name, nvl(trim(kd.first_name), '') || ' ' || nvl(trim(kd.middle_name), '') || ' ' || nvl(trim(kd.last_name), '') as cutomer_name, " + +" nvl(trim(kd.guardian_name), 'NA') guardian_name, 'LOAN ACCT' acct_type from loan_account da, kyc_hdr kd where da.loan_prod_id in (select id from loan_product dp) and substr(da.GL_CLASS_CODE,9,2)='23' and da.customer_no = kd.cif_no " + +" and da.key_1 like '%" +searchString1+ "%' and da.curr_status = '01' and da.pacs_id = '" + pacsId + "' order by 5,2,3 "; + + } else if ((screenName.equalsIgnoreCase("BGLAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("BGLSrch"))) { + // searchString1=request.getParameter("Bgl"); + + headerQry = " select gp.gl_code, gp.gl_name, gp.id from gl_product gp where gp.gl_code like '%" +searchString1+ "%' " + +" and substr(gp.gl_code, 1, 1) in ('1', '2') and substr(gp.gl_code, 1, 2) not in ('16', '25') and gp.gl_code <>'28101' "; + + } else if ((screenName.equalsIgnoreCase("LienMarking.jsp")) && (lovKey.equalsIgnoreCase("accSearch"))) { + // searchString1=request.getParameter("acc"); + lienType=request.getParameter("type"); + + if (lienType.equalsIgnoreCase("K")) { + headerQry = " select la.key_1 as loan_acct, (select lp.prod_name from loan_product lp where lp.id = la.loan_prod_id) prod_name, (select trim(kd.first_name) || ' ' || nvl(trim(kd.middle_name), '') || ' ' || trim(kd.last_name) " + +" from kyc_hdr kd where kd.cif_no = la.customer_no) customer_name, (select nvl(trim(kd.guardian_name), 'NA') from kyc_hdr kd where kd.cif_no = la.customer_no) guardian_name, la.sanction_amt, nvl(la.old_accno, 'NA') as old_acct, la.customer_no as Cust_no " + +" from loan_account la where la.pacs_id = '" +pacsId+ "' and substr(la.GL_CLASS_CODE,9,2)='23' and (la.teller_id is null or la.teller_id = 'MIG') and la.loan_prod_id in (select id from loan_product lp where lp.prod_code ='7001') and la.curr_status <>'04' and (la.key_1 like '%" + searchString1 + "%' or la.old_accno like '%" + searchString1 + "%') "; + } + if (lienType.equalsIgnoreCase("G")) { + headerQry = " select la.key_1 as loan_acct, (select lp.prod_name from loan_product lp where lp.id = la.loan_prod_id) prod_name, (select trim(kd.first_name) || ' ' || nvl(trim(kd.middle_name), '') || ' ' || trim(kd.last_name) " + +" from kyc_hdr kd where kd.cif_no = la.customer_no) customer_name, (select nvl(trim(kd.guardian_name), 'NA') from kyc_hdr kd where kd.cif_no = la.customer_no) guardian_name, la.sanction_amt, nvl(la.old_accno, 'NA') as old_acct, la.customer_no as Cust_no " + +" from loan_account la where la.pacs_id = '" +pacsId+ "' and substr(la.GL_CLASS_CODE,9,2)='23' and la.loan_prod_id in (select id from loan_product lp where lp.prod_code ='7010') and la.curr_status <>'04' and (la.key_1 like '%" + searchString1 + "%' or la.old_accno like '%" + searchString1 + "%') "; + } + if (lienType.equalsIgnoreCase("D")) { + headerQry = " select la.key_1 as loan_acct, (select lp.prod_name from loan_product lp where lp.id = la.loan_prod_id) prod_name, (select trim(kd.first_name) || ' ' || nvl(trim(kd.middle_name), '') || ' ' || trim(kd.last_name) from kyc_hdr kd where kd.cif_no = la.customer_no) customer_name, " + +" (select nvl(trim(kd.guardian_name), 'NA') from kyc_hdr kd where kd.cif_no = la.customer_no) guardian_name, la.sanction_amt, nvl(la.old_accno, 'NA') as old_acct, la.customer_no as Cust_No from loan_account la " + +" where la.pacs_id = '" +pacsId+ "' and substr(la.GL_CLASS_CODE,9,2)='23' and (la.teller_id is null or la.teller_id = 'MIG') and la.loan_prod_id in (select id from loan_product lp where lp.prod_code in ('7003', '7000')) and la.curr_status <>'04' and (la.key_1 like '%" +searchString1+ "%' or la.old_accno like '%" +searchString1+ "%') "; + } + if (lienType.equalsIgnoreCase("C")) { + headerQry = " select la.key_1 as loan_acct, (select lp.prod_name from dep_product lp where lp.id = la.dep_prod_id) prod_name, (select trim(kd.first_name) || ' ' || nvl(trim(kd.middle_name), '') || ' ' || trim(kd.last_name) from kyc_hdr kd where kd.cif_no = la.customer_no) " + +" customer_name, (select nvl(trim(kd.guardian_name), 'NA') from kyc_hdr kd where kd.cif_no = la.customer_no) guardian_name, la.sanction_amt, nvl(la.old_accno, 'NA') as old_acct, la.customer_no as Cust_No " + +" from dep_account la where la.pacs_id = '" +pacsId+ "' and substr(la.GL_CLASS_CODE,9,2)='23' and la.dep_prod_id in (select id from dep_product lp where lp.prod_code ='6001' and substr(lp.int_cat,1,1) <>'1' ) and la.curr_status <> 'C'and (la.key_1 like '%" +searchString1+ "%' or la.old_accno like '%" +searchString1+ "%') "; + } + if (lienType.equalsIgnoreCase("O")) { + headerQry = " select la.key_1 as loan_acct, (select lp.prod_name from loan_product lp where lp.id = la.loan_prod_id) prod_name, (select trim(kd.first_name) || ' ' || nvl(trim(kd.middle_name), '') || ' ' || trim(kd.last_name) from kyc_hdr kd where kd.cif_no = la.customer_no) customer_name, " + +" (select nvl(trim(kd.guardian_name), 'NA') from kyc_hdr kd where kd.cif_no = la.customer_no) guardian_name, la.sanction_amt, nvl(la.old_accno, 'NA') as old_acct, la.customer_no as Cust_No from loan_account la " + +" where la.pacs_id = '" +pacsId+ "' and la.loan_prod_id in (select id from loan_product lp where lp.prod_code not in ('7003', '7000', '7001', '7010')) and substr(la.GL_CLASS_CODE,9,2)='23' and la.curr_status <>'04' and (la.key_1 like '%" +searchString1+ "%' or la.old_accno like '%" +searchString1+ "%') order by 2,3 "; + } + + } else if ((screenName.equalsIgnoreCase("RemoveLien.jsp")) && (lovKey.equalsIgnoreCase("accSearch"))) { + // searchString1=request.getParameter("acc"); + + headerQry = " select la.key_1 as loan_acct, (select lp.prod_name from loan_product lp where lp.id = la.loan_prod_id) prod_name, (select trim(kd.first_name) || ' ' || nvl(trim(kd.middle_name), '') || ' ' || trim(kd.last_name) " + +" from kyc_hdr kd where kd.cif_no = la.customer_no) customer_name, (select nvl(trim(kd.guardian_name), 'NA') from kyc_hdr kd where kd.cif_no = la.customer_no) guardian_name, la.sanction_amt, nvl(la.old_accno, 'NA') as old_acct, la.customer_no as Cust_no, " + +" NVL((select trim(lak.remarks) from loan_account_auth lak where lak.new_account_no=la.key_1 and lak.status='A' and lak.pacs_id=la.pacs_id), 'NA') remarks from loan_account la where la.pacs_id = '" +pacsId+ "' and substr(la.GL_CLASS_CODE,9,2)='23' and la.loan_prod_id in (select id from loan_product lp where lp.prod_code ='7010') and la.curr_status ='04' and (la.key_1 like '%" + searchString1 + "%' or la.old_accno like '%" + searchString1 + "%') "; + + } else if ((screenName.equalsIgnoreCase("UserCreation.jsp")) && (lovKey.equalsIgnoreCase("UserSrch"))) { + + headerQry = " select s.role_name, s.id from sys_roles s where s.id not in ('201603000004021', '201603000004023', '201606000004042', '201603000004024', '201603000008020') "; + + } else if ((screenName.equalsIgnoreCase("LienMarking.jsp")) && (lovKey.equalsIgnoreCase("Account"))) { + + // searchString2 = request.getParameter("cifNumber"); + + headerQry = " select t.key_1, (k.first_name || nvl2(k.middle_name, ' ' || k.middle_name, '') ||nvl2(k.last_name, ' ' || k.last_name, '')) as Customer_Name, t.customer_no, p.prod_code, p.prod_desc, p.int_cat, p.intt_cat_desc, t.avail_bal, to_char(t.mat_dt,'DD-MON-YYYY') from dep_account t, kyc_hdr k, dep_product p where k.cif_no = t.customer_no and t.dep_prod_id = p.id and (substr(p.prod_code,1,1) = '2' or substr(p.prod_code,1,1) = '3') and t.curr_status <> 'C' and t.customer_no = '" + searchString2 + "' and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') order by t.mat_dt "; + + } else if (screenName.equalsIgnoreCase("accountCreationReadOnly.jsp") && (lovKey.equalsIgnoreCase("PickUPCustomer"))) { + + // searchString1 = request.getParameter("cifNumber"); + + headerQry = "select cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,customer_type,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,''),t.guardian_name from kyc_hdr t where cif_no = '" + searchString1.replace(' ', '%') + "' and t.pacs_id in (select pacs_id from pacs_master where head_pacs_id=(select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))"; + + } else if ((screenName.equalsIgnoreCase("tradingFinancialYearAdjustment.jsp")) && (lovKey.equalsIgnoreCase("AccountSearch"))) { + + searchString1 = request.getParameter("textIndex"); + // searchString2 = request.getParameter("accNo"); + + headerQry = " select g.key_1,p.gl_code,g.ledger_name,g.cum_curr_val from gl_account g, gl_product p where g.pacs_id='" + pacsId + "' and g.status='A' and p.gl_code<>'28101' and g.gl_prod_id=p.id and substr(p.gl_code, 1, 2) in ('31', '32', '33', '26', '45', '46', '47') and (g.key_1 like '%" + searchString2 + "%' or p.gl_code like upper('%" + searchString2 + "%') or p.gl_name like upper('%" + searchString2 + "%')) "; + + } else if ((screenName.equalsIgnoreCase("tradingFinancialYearAdjustment.jsp")) && (lovKey.equalsIgnoreCase("SecondAccountSearch"))) { + + searchString1 = request.getParameter("textIndex"); + // searchString2 = request.getParameter("accNo"); + + headerQry = " select g.key_1,p.gl_code,g.ledger_name,g.cum_curr_val from gl_account g, gl_product p where g.pacs_id='" + pacsId + "' and g.status='A' and p.gl_code<>'28101' and g.gl_prod_id=p.id and substr(p.gl_code, 1, 2) in ('31', '32', '33', '26', '45', '46', '47') and (g.key_1 like '%" + searchString2 + "%' or p.gl_code like upper('%" + searchString2 + "%') or p.gl_name like upper('%" + searchString2 + "%')) "; + + } else if ((screenName.equalsIgnoreCase("AccountModeOfOperation.jsp")) && (lovKey.equalsIgnoreCase("DepositAccLOV"))) { + + // searchString1 = request.getParameter("depositAccSearch"); + + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,k.photo_path,k.sig_photo" + + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and p.prod_code<>'6001' and t.curr_status <>'C' and substr(t.GL_CLASS_CODE,9,2) in ('14','11') and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name) like upper ('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id= '" + pacsId + "' "; + + + } else if ((screenName.equalsIgnoreCase("DepositTransactionOperation.jsp")) && (lovKey.equalsIgnoreCase("viewSpeci"))) { + + //searchString1 = request.getParameter("accNo"); + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + + headerQry = " select '1st Holder' Holder,t.customer_no as cif1, (k.first_name || ' ' || nvl2(k.middle_name, ' ' || k.middle_name, '') || nvl2(k.last_name, ' ' || k.last_name, '')) customer_name, nvl(k.guardian_name, 'NA') guardian_name, " ++ " k.sig_photo, k.photo_path, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600002'), 'NA') Aadhar_no, nvl((select trim(kl.id_no) " ++ " from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600008'), 'NA') Pan_no, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no " ++ " and kl.kyc_document_mst_id = '909201600001'), 'NA') Voter_no, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600007'), 'NA') Introduced_by_mem " ++ " from dep_account t, kyc_hdr k, dep_product p where k.cif_no = t.customer_no and t.dep_prod_id = p.id and t.curr_status not in ('C', 'S') and substr(t.GL_CLASS_CODE,9,2)='14' " ++ " and (t.key_1 like '%" + searchString1 + "%' or t.link_accno like '%" + searchString1 + "%' or upper(k.first_name) like upper('" + searchString1 + "%') or " ++ " t.old_accno = '" + searchString1 + "') and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id in (select pm.head_pacs_id from pacs_master pm where pm.pacs_id = '" + pacsId + "')) " ++ " union all " ++ " select '2nd Holder' Holder,nvl(t.cif_no2, 'NA') as cif1, nvl((k.first_name || ' ' || nvl2(k.middle_name, ' ' || k.middle_name, '') || nvl2(k.last_name, ' ' || k.last_name, '')), 'NA') customer_name, " ++ " nvl(k.guardian_name, 'NA') guardian_name, k.sig_photo, k.photo_path, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600002'), " ++ " 'NA') Aadhar_no, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600008'), 'NA') Pan_no, nvl((select trim(kl.id_no) " ++ " from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600001'), 'NA') Voter_no, nvl((select trim(kl.id_no) from kyc_dtl kl " ++ " where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600007'), 'NA') Introduced_by_mem from dep_account t, kyc_hdr k, dep_product p " ++ " where k.cif_no = t.cif_no2 and t.dep_prod_id = p.id and t.curr_status not in ('C', 'S') and substr(t.GL_CLASS_CODE,9,2)='14' and (t.key_1 like '%" + searchString1 + "%' or t.link_accno " ++ " like '%" + searchString1 + "%' or upper(k.first_name) like upper('" + searchString1 + "%') or t.old_accno = '" + searchString1 + "') and t.pacs_id in (select p.pacs_id " ++ " from pacs_master p where p.head_pacs_id in (select pm.head_pacs_id from pacs_master pm where pm.pacs_id = '" + pacsId + "')) " ++ " union all " ++ " select '3rd Holder' Holder,nvl(t.cif_no3, 'NA') as cif1, nvl((k.first_name || ' ' || nvl2(k.middle_name, ' ' || k.middle_name, '') || nvl2(k.last_name, ' ' || k.last_name, '')), 'NA') customer_name, " ++ " nvl(k.guardian_name, 'NA') guardian_name, k.sig_photo, k.photo_path, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600002'), " ++ " 'NA') Aadhar_no, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600008'), 'NA') Pan_no, nvl((select trim(kl.id_no) " ++ " from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600001'), 'NA') Voter_no, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no " ++ " and kl.kyc_document_mst_id = '909201600007'), 'NA') Introduced_by_mem from dep_account t, kyc_hdr k, dep_product p where k.cif_no = t.cif_no3 and t.dep_prod_id = p.id " ++ " and t.curr_status not in ('C', 'S') and substr(t.GL_CLASS_CODE,9,2)='14' and (t.key_1 like '%" + searchString1 + "%' or t.link_accno like '%" + searchString1 + "%' or " ++ " upper(k.first_name) like upper('" + searchString1 + "%') or t.old_accno = '" + searchString1 + "') and t.pacs_id in (select p.pacs_id " ++ " from pacs_master p where p.head_pacs_id in (select pm.head_pacs_id from pacs_master pm where pm.pacs_id = '" + pacsId + "')) " ++ " union all " ++ " select '4th Holder' Holder,nvl(t.cif_no4, 'NA') as cif1, nvl((k.first_name || ' ' || nvl2(k.middle_name, ' ' || k.middle_name, '') || nvl2(k.last_name, ' ' || k.last_name, '')), 'NA') customer_name, " ++ " nvl(k.guardian_name, 'NA') guardian_name, k.sig_photo, k.photo_path, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600002'), " ++ " 'NA') Aadhar_no, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600008'), 'NA') Pan_no, nvl((select trim(kl.id_no) " ++ " from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600001'), 'NA') Voter_no, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no " ++ " and kl.kyc_document_mst_id = '909201600007'), 'NA') Introduced_by_mem from dep_account t, kyc_hdr k, dep_product p where k.cif_no = t.cif_no4 and t.dep_prod_id = p.id " ++ " and t.curr_status not in ('C', 'S') and substr(t.GL_CLASS_CODE,9,2)='14' and (t.key_1 like '%" + searchString1 + "%' or t.link_accno like '%" + searchString1 + "%' or " ++ " upper(k.first_name) like upper('" + searchString1 + "%') or t.old_accno = '" + searchString1 + "') and t.pacs_id in (select p.pacs_id " ++ " from pacs_master p where p.head_pacs_id in (select pm.head_pacs_id from pacs_master pm where pm.pacs_id = '" + pacsId + "')) " + + " union all " + + " select '5th Holder' Holder,nvl(t.cif_no5, 'NA') as cif1, nvl((k.first_name || ' ' || nvl2(k.middle_name, ' ' || k.middle_name, '') || nvl2(k.last_name, ' ' || k.last_name, '')), 'NA') customer_name, nvl(k.guardian_name, 'NA') guardian_name, " + + " k.sig_photo, k.photo_path, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600002'), 'NA') Aadhar_no, nvl((select trim(kl.id_no) from kyc_dtl kl " + + " where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600008'), 'NA') Pan_no, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600001'), 'NA') Voter_no, " + + " nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600007'), 'NA') Introduced_by_mem from dep_account t, kyc_hdr k, dep_product p where k.cif_no = t.cif_no5 " + + " and t.dep_prod_id = p.id and t.curr_status not in ('C', 'S') and substr(t.GL_CLASS_CODE,9,2)='14' and (t.key_1 like '%" + searchString1 + "%' or t.link_accno like '%" + searchString1 + "%' or upper(k.first_name " + + " ) like upper('" + searchString1 + "%') or t.old_accno = '" + searchString1 + "') and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id in (select pm.head_pacs_id " + + " from pacs_master pm where pm.pacs_id = '" + pacsId + "')) " + + " union all " + + " select '6th Holder' Holder,nvl(t.cif_no6, 'NA') as cif1, nvl((k.first_name || ' ' || nvl2(k.middle_name, ' ' || k.middle_name, '') || nvl2(k.last_name, ' ' || k.last_name, '')), 'NA') customer_name, nvl(k.guardian_name, 'NA') guardian_name, " + + " k.sig_photo, k.photo_path, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600002'), 'NA') Aadhar_no, nvl((select trim(kl.id_no) from kyc_dtl kl " + + " where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600008'), 'NA') Pan_no, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600001'), 'NA') Voter_no, " + + " nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600007'), 'NA') Introduced_by_mem from dep_account t, kyc_hdr k, dep_product p where k.cif_no = t.cif_no6 " + + " and t.dep_prod_id = p.id and t.curr_status not in ('C', 'S') and substr(t.GL_CLASS_CODE,9,2)='14' and (t.key_1 like '%" + searchString1 + "%' or t.link_accno like '%" + searchString1 + "%' or " + + " upper(k.first_name) like upper('" + searchString1 + "%') or t.old_accno = '" + searchString1 + "') and t.pacs_id in (select p.pacs_id from pacs_master p " + + " where p.head_pacs_id in (select pm.head_pacs_id from pacs_master pm where pm.pacs_id = '" + pacsId + "')) " + + " union all " + + " select '7th Holder' Holder,nvl(t.cif_no7, 'NA') as cif1, nvl((k.first_name || ' ' || nvl2(k.middle_name, ' ' || k.middle_name, '') || nvl2(k.last_name, ' ' || k.last_name, '')), 'NA') customer_name, nvl(k.guardian_name, 'NA') guardian_name, " + + " k.sig_photo, k.photo_path, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600002'), 'NA') Aadhar_no, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no " + + " and kl.kyc_document_mst_id = '909201600008'), 'NA') Pan_no, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600001'), 'NA') Voter_no, nvl((select trim(kl.id_no) " + + " from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600007'), 'NA') Introduced_by_mem from dep_account t, kyc_hdr k, dep_product p where k.cif_no = t.cif_no7 and t.dep_prod_id = p.id " + + " and t.curr_status not in ('C', 'S') and substr(t.GL_CLASS_CODE,9,2)='14' and (t.key_1 like '%" + searchString1 + "%' or t.link_accno like '%" + searchString1 + "%' or upper(k.first_name) like " + + " upper('" + searchString1 + "%') or t.old_accno = '" + searchString1 + "') and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id in (select pm.head_pacs_id from pacs_master pm where pm.pacs_id = '" + pacsId + "')) " + + " union all " + + " select '8th Holder' Holder,nvl(t.cif_no8, 'NA') as cif1, nvl((k.first_name || ' ' || nvl2(k.middle_name, ' ' || k.middle_name, '') || nvl2(k.last_name, ' ' || k.last_name, '')), 'NA') customer_name, nvl(k.guardian_name, 'NA') guardian_name, k.sig_photo, " + + " k.photo_path, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600002'), 'NA') Aadhar_no, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no " + + " and kl.kyc_document_mst_id = '909201600008'), 'NA') Pan_no, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600001'), 'NA') Voter_no, nvl((select trim(kl.id_no) " + + " from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600007'), 'NA') Introduced_by_mem from dep_account t, kyc_hdr k, dep_product p where k.cif_no = t.cif_no8 and t.dep_prod_id = p.id " + + " and t.curr_status not in ('C', 'S') and substr(t.GL_CLASS_CODE,9,2)='14' and (t.key_1 like '%" + searchString1 + "%' or t.link_accno like '%" + searchString1 + "%' or upper(k.first_name) like " + + " upper('" + searchString1 + "%') or t.old_accno = '" + searchString1 + "') and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id in (select pm.head_pacs_id from pacs_master pm where pm.pacs_id = '" + pacsId + "')) " + + " union all " + + " select '9th Holder' Holder,nvl(t.cif_no9, 'NA') as cif1, nvl((k.first_name || ' ' || nvl2(k.middle_name, ' ' || k.middle_name, '') || nvl2(k.last_name, ' ' || k.last_name, '')), 'NA') customer_name, nvl(k.guardian_name, 'NA') guardian_name, " + + " k.sig_photo, k.photo_path, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600002'), 'NA') Aadhar_no, nvl((select trim(kl.id_no) from kyc_dtl kl " + + " where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600008'), 'NA') Pan_no, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600001'), 'NA') Voter_no, " + + " nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600007'), 'NA') Introduced_by_mem from dep_account t, kyc_hdr k, dep_product p where k.cif_no = t.cif_no9 " + + " and t.dep_prod_id = p.id and t.curr_status not in ('C', 'S') and substr(t.GL_CLASS_CODE,9,2)='14' and (t.key_1 like '%" + searchString1 + "%' or t.link_accno like '%" + searchString1 + "%' or upper(k.first_name " + + " ) like upper('" + searchString1 + "%') or t.old_accno = '" + searchString1 + "') and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id in (select pm.head_pacs_id from pacs_master pm where pm.pacs_id = '" + pacsId + "')) " + + " union all " + + " select '10th Holder' Holder,nvl(t.cif_no10, 'NA') as cif1, nvl((k.first_name || ' ' || nvl2(k.middle_name, ' ' || k.middle_name, '') || nvl2(k.last_name, ' ' || k.last_name, '')), 'NA') customer_name, nvl(k.guardian_name, 'NA') guardian_name, k.sig_photo, " + + " k.photo_path, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600002'), 'NA') Aadhar_no, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no " + + " and kl.kyc_document_mst_id = '909201600008'), 'NA') Pan_no, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600001'), 'NA') Voter_no, nvl((select trim(kl.id_no) " + + " from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600007'), 'NA') Introduced_by_mem from dep_account t, kyc_hdr k, dep_product p where k.cif_no = t.cif_no10 and t.dep_prod_id = p.id and " + + " t.curr_status not in ('C', 'S') and substr(t.GL_CLASS_CODE,9,2)='14' and (t.key_1 like '%" + searchString1 + "%' or t.link_accno like '%" + searchString1 + "%' or upper(k.first_name) like " + + " upper('" + searchString1 + "%') or t.old_accno = '" + searchString1 + "') and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id in (select pm.head_pacs_id from pacs_master pm where pm.pacs_id = '" + pacsId + "')) " + + " union all " + + " select '11th Holder' Holder,nvl(t.cif_no11, 'NA') as cif1, nvl((k.first_name || ' ' || nvl2(k.middle_name, ' ' || k.middle_name, '') || nvl2(k.last_name, ' ' || k.last_name, '')), 'NA') customer_name, nvl(k.guardian_name, 'NA') guardian_name, " + + " k.sig_photo, k.photo_path, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600002'), 'NA') Aadhar_no, nvl((select trim(kl.id_no) from kyc_dtl kl " + + " where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600008'), 'NA') Pan_no, nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600001'), 'NA') Voter_no, " + + " nvl((select trim(kl.id_no) from kyc_dtl kl where kl.cif_no = k.cif_no and kl.kyc_document_mst_id = '909201600007'), 'NA') Introduced_by_mem from dep_account t, kyc_hdr k, dep_product p where k.cif_no = t.cif_no11 " + + " and t.dep_prod_id = p.id and t.curr_status not in ('C', 'S') and substr(t.GL_CLASS_CODE,9,2)='14' and (t.key_1 like '%" + searchString1 + "%' or t.link_accno like '%" + searchString1 + "%' or upper(k.first_name " + + " ) like upper('" + searchString1 + "%') or t.old_accno = '" + searchString1 + "') and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id in " + + " (select pm.head_pacs_id from pacs_master pm where pm.pacs_id = '" + pacsId + "')) "; + + + } else if ((screenName.equalsIgnoreCase("TDRepayMethod.jsp")) && (lovKey.equalsIgnoreCase("TDAccLOV"))) { + + // searchString1 = request.getParameter("depAccount"); + + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,k.photo_path,k.sig_photo" + + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and p.prod_code in ('2001','2002','3001') and t.curr_status <>'C' and substr(t.GL_CLASS_CODE,9,2)='14' and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name) like upper ('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id= '" + pacsId + "' "; + + + } else if ((screenName.equalsIgnoreCase("TDRepayMethod.jsp")) && (lovKey.equalsIgnoreCase("TransferAccLOV"))) { + + // searchString2 = request.getParameter("trfAccount"); + //searchString3 = request.getParameter("customer"); + + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,k.photo_path,k.sig_photo" + + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and p.prod_code in ('1101','1102') and substr(p.int_cat,1,1) = '1' and substr(t.GL_CLASS_CODE,9,2)='14' and t.customer_no = '" +searchString3+ "' and t.curr_status <> 'C' and (t.key_1 like '%" + searchString2.replace(' ', '%') + "%' or upper(k.first_name) like upper ('" + searchString1.replace(' ', '%') + "%')) and " + + " t.pacs_id in (select pacs_id from pacs_master pa where pa.head_pacs_id = (select head_pacs_id from pacs_master where pacs_id= '" + pacsId + "')) "; + + + } else if ((screenName.equalsIgnoreCase("LoanPrincipalAdjustment.jsp")) && (lovKey.equalsIgnoreCase("AccSrch"))) { + // searchString1 = request.getParameter("Acc"); + + headerQry = " select d.key_1,(select p.prod_name from dep_product p where p.id=d.dep_prod_id) prod_name, " + +" (select trim(r.first_name) || ' ' || trim(r.middle_name) || ' ' || trim(r.last_name) " + +" from kyc_hdr r where r.cif_no = d.customer_no) cust_name, d.limit, d.avail_bal, d.prin_outst, " + +" d.intt_outst cur_int, d.penal_intt_outst penal_int , d.npa_intt_outst npa_int,(d.intt_outst + d.penal_intt_outst + d.npa_intt_outst) tot_int from dep_account d " + +" where d.pacs_id = '" + pacsId + "' and d.dep_prod_id in (select p.id from dep_product p " + +" where p.prod_code ='6001' and p.int_method in ('S','C')) and substr(d.GL_CLASS_CODE,9,2)='23' and d.curr_status = 'O' and d.key_1 like '%" + searchString1 + "%'" + +" union all " + +" select l.key_1, (select p.prod_name from loan_product p where p.id=l.loan_prod_id) prod_name, " + +" (select trim(r.first_name) || ' ' || trim(r.middle_name) || ' ' || trim(r.last_name) " + +" from kyc_hdr r where r.cif_no = l.customer_no) cust_name, l.sanction_amt, l.outst_bal, l.prin_outst, " + +" l.intt_outst cur_int , l.penal_intt_outst penal_int , l.npa_intt_outst npa_int, (l.intt_outst + l.penal_intt_outst + l.npa_intt_outst) tot_int from loan_account l " + +" where l.pacs_id = '" + pacsId + "' and l.loan_prod_id in " + +" (select p.id from loan_product p where p.int_method in ('S','C')) and substr(l.GL_CLASS_CODE,9,2)='23' and l.curr_status != '04' and l.key_1 like '%" + searchString1 + "%'"; + + } else if ((screenName.equalsIgnoreCase("LoanPrincipalAdjustment.jsp")) && (lovKey.equalsIgnoreCase("bglAcc"))) { + // searchString1 = request.getParameter("Acc"); + + headerQry = " select ga.key_1, ga.ledger_name,gp.gl_code,gp.id,gp.gl_name from gl_account ga, gl_product gp where ga.gl_prod_id<>'201611000001184' and ga.gl_prod_id=gp.id " + +" and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') "; + + } else if ((screenName.equalsIgnoreCase("UserAmendment.jsp")) && (lovKey.equalsIgnoreCase("UserSrch"))) { + //searchString1 = request.getParameter("userId"); + headerQry = " select s.login_id, s.login_name,(select si.role_name from sys_roles si where si.id = s.user_role_id) as role_name, " + +" s.user_role_id as id, s.ip_flag, NVL(s.static_ip,'NA')static_ip from login_details s where s.pacs_id = '" + pacsId + "' and s.login_id like '%" + searchString1 + "%' "; + + } else if ((screenName.equalsIgnoreCase("MiscChargeDeduction.jsp")) && (lovKey.equalsIgnoreCase("prodLOV"))) { + searchString1 = request.getParameter("userId"); + headerQry = " select prod_code, int_cat, prod_name, prod_desc, INTT_CAT_DESC from dep_product dp where dp.id in " + +" (select distinct dep_prod_id from dep_account da where da.pacs_id = '" + pacsId + "') and dp.prod_code in ('1101','1102','6001') order by prod_code,int_cat "; + + } else if ((screenName.equalsIgnoreCase("UpdatePacsDetails.jsp")) && (lovKey.equalsIgnoreCase("pacsD"))) { + + headerQry = " select pm.pacs_name, pm.addr1, pm.addr2, pm.addr3, NVL(pm.gst_no,'NA')gst_no from pacs_master pm where pm.pacs_id = '" + pacsId + "' "; + + } else if ((screenName.equalsIgnoreCase("ChequePosting.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) { + + // searchString1 = request.getParameter("accNo"); + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,t.avail_bal,k.photo_path,k.sig_photo,nvl((select nvl(kl.id_no,'NA') from kyc_dtl kl where kl.kyc_document_mst_id = '909201600008' and kl.cif_no = t.customer_no),'NA') PAN_ID_NO " + + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and p.prod_code in ('1101','1102') and substr(p.int_cat,1,1) ='1' and substr(t.GL_CLASS_CODE,9,2)='14' and t.curr_status <>'C' and (t.key_1 like '%" + searchString1 + "%' or t.link_accno like '%" + searchString1 + "%' or upper(k.first_name) like upper('" + searchString1 + "%')) and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') "; + + } else if (screenName.equalsIgnoreCase("DepositKYCInquiry.jsp") && (lovKey.equalsIgnoreCase("PickUPKYC"))) { + + // searchString1 = request.getParameter("kycID"); + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + headerQry = "select t.cif_no, (t.first_name || nvl2(t.middle_name, ' ' || t.middle_name, '') || nvl2(t.last_name, ' ' || t.last_name, '')) name, customer_type, nvl(address_1, ' '), nvl(address_2, ' '), nvl(address_3, ' '), t.guardian_name" + +" from kyc_hdr t where t.cif_no in (select cif_no from kyc_dtl kl where kl.id_no = '" +searchString1+ "' and kl.cif_no = t.cif_no and kl.pacs_id in (select pacs_id from pacs_master where head_pacs_id = '" + pacsId + "')) and t.pacs_id in (select pacs_id from pacs_master where head_pacs_id = '" + pacsId + "') "; + + } else if ((screenName.equalsIgnoreCase("PLAppropriationOperations.jsp")) && (lovKey.equalsIgnoreCase("AccountSearch"))) { + + searchString1 = request.getParameter("textIndex"); + // searchString2 = request.getParameter("accNo"); + + headerQry = "select g.key_1,p.gl_code,g.ledger_name,g.cum_curr_val from gl_account g, gl_product p where g.pacs_id='" + pacsId + "' and g.status='A' and g.gl_prod_id=p.id and substr(p.gl_code, 1, 2) in ('10', '11', '12') and (g.key_1 like '%" + searchString2 + "%' or p.gl_code like upper('%" + searchString2 + "%') or p.gl_name like upper('%" + searchString2 + "%'))"; + + } else if ((screenName.equalsIgnoreCase("PLAppropriationOperations.jsp")) && (lovKey.equalsIgnoreCase("SecondAccountSearch"))) { + + searchString1 = request.getParameter("textIndex"); + //searchString2 = request.getParameter("accNo"); + + headerQry = "select g.key_1,p.gl_code,g.ledger_name,g.cum_curr_val from gl_account g, gl_product p where g.pacs_id='" + pacsId + "' and g.status='A' and p.gl_code='65110' and g.gl_prod_id=p.id and (g.key_1 like '%" + searchString2 + "%' or p.gl_code like upper('%" + searchString2 + "%') or p.gl_name like upper('%" + searchString2 + "%'))"; + + } else if (screenName.equalsIgnoreCase("MemberDetails.jsp") && (lovKey.equalsIgnoreCase("PickUPCustomer"))) { + + // searchString1 = request.getParameter("accNo"); + searchString2 = request.getParameter("textIndex"); + + headerQry = " select cif_no, " ++" (t.first_name || nvl2(t.middle_name, ' ' || t.middle_name, '') || " ++" nvl2(t.last_name, ' ' || t.last_name, '')) name, " ++" (case t.gender " ++" when 'M' then " ++" 'Male' " ++" when 'F' then " ++" 'Female' " ++" else " ++" 'Other' " ++" end) gender, " ++" t.birth_date, " ++" t.guardian_name, " ++" nvl(address_1, ' ') || ' ' || nvl(address_2, ' ') || ' ' || " ++" nvl(address_3, ' ') address, " ++" (case t.religion " ++" when '1' then " ++" 'Hindu' " ++" when '2' then " ++" 'Muslim' " ++" when '3' then " ++" 'Christian' " ++" when '4' then " ++" 'Sikh' " ++" when '5' then " ++" 'Jain' " ++" when '6' then " ++" 'Buddhist' " ++" when '7' then " ++" 'Parsi' " ++" else " ++" 'Others' " ++" end) religion, " ++" t.caste " ++" from kyc_hdr t where (cif_no like '%" + searchString1.replace(' ', '%') + "%' or upper(trim(first_name)) like upper('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id in (select pacs_id from pacs_master where head_pacs_id=(select head_pacs_id from pacs_master where pacs_id='" + pacsId + "')) "; + + } else if (screenName.equalsIgnoreCase("MemberDetails.jsp") && (lovKey.equalsIgnoreCase("PickUPCustomerAmend"))) { + + // searchString1 = request.getParameter("accNo"); + searchString2 = request.getParameter("textIndex"); + + headerQry = " select cif_no, (t.first_name || nvl2(t.middle_name, ' ' || t.middle_name, '') || nvl2(t.last_name, ' ' || t.last_name, '')) name, (case t.gender when 'M' then 'Male' when 'F' then 'Female' else 'Other' end) gender, t.birth_date, t.guardian_name, nvl(address_1, ' ') || ' ' || nvl(address_2, ' ') || ' ' || nvl(address_3, ' ') address, (case t.religion when '1' then 'Hindu' when '2' then 'Muslim' when '3' then 'Christian' when '4' then 'Sikh' when '5' then 'Jain' when '6' then 'Buddhist' when '7' then 'Parsi' else 'Others' end) religion, t.caste from kyc_hdr t where (cif_no like '%" + searchString1.replace(' ', '%') + "%' or upper(trim(first_name)) like upper('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id in (select pacs_id from pacs_master where head_pacs_id=(select head_pacs_id from pacs_master where pacs_id='" + pacsId + "')) "; + + } else if (screenName.equalsIgnoreCase("EmployeeMaster.jsp") && (lovKey.equalsIgnoreCase("PickUPCustomer"))) { + + // searchString1 = request.getParameter("accNo"); + searchString2 = request.getParameter("textIndex"); + + headerQry = " select cif_no, (t.first_name || nvl2(t.middle_name, ' ' || t.middle_name, '') || nvl2(t.last_name, ' ' || t.last_name, '')) name, (case t.gender when 'M' then 'Male' when 'F' then 'Female' else 'Other' end) gender, t.birth_date, t.guardian_name, nvl(address_1, ' ') || ' ' || nvl(address_2, ' ') || ' ' || nvl(address_3, ' ') address, (case t.religion when '1' then 'Hindu' when '2' then 'Muslim' when '3' then 'Christian' when '4' then 'Sikh' when '5' then 'Jain' when '6' then 'Buddhist' when '7' then 'Parsi' else 'Others' end) religion, t.caste from kyc_hdr t where cif_no = '" + searchString1 + "' and t.pacs_id in (select pacs_id from pacs_master where head_pacs_id=(select head_pacs_id from pacs_master where pacs_id='" + pacsId + "')) "; + + } + + + Connection conn = DbHandler.getDBConnection(); + PreparedStatement pstmt = null; + ResultSet resultSet = null; + String bgColor = null; + int flag = 1; + + + + try { + pstmt = conn.prepareStatement(headerQry); + System.out.println(headerQry); + resultSet = pstmt.executeQuery(); + System.out.println(headerQry); + + %> + + + + +
+ + <% if ((screenName.equalsIgnoreCase("AgentMapping.jsp")) && (lovKey.equalsIgnoreCase("agntAccount"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No account found! Close this window & Please Try Again.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
Account NoCustomer NameAvailable BalanceAccount Type
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString("acctype")%>
+ + <%} + } else if ((screenName.equalsIgnoreCase("ChequePosting.jsp")) && (lovKey.equalsIgnoreCase("chqEnq"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Deposit A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + <%}%> +
Account No.Customer NameCustomer No.Product DetailsInterest CategoryAvailable BalancePhotographSignaturePAN_ID
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%><%=resultSet.getString(8)%><% if ((resultSet.getString(9) == null) || resultSet.getString(9).isEmpty()) {%><%} else {%> <%}%><% if ((resultSet.getString(10) == null) || resultSet.getString(10).isEmpty()) {%>No Siganture Found<%} else {%> <%}%><%=resultSet.getString(11)%>
+ + <%} + }else if ((screenName.equalsIgnoreCase("AgentMapping.jsp")) && (lovKey.equalsIgnoreCase("agntMap"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Agent found! Close this window & Please Try Again.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + <%}%> +
Agent IdAgent Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <% }%> + <% }else if ((screenName.equalsIgnoreCase("TotalCashDepositDDS.jsp")) && (lovKey.equalsIgnoreCase("agntMap"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Agent found! Close this window & Please Try Again.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
Agent IdAgent NameTotal LimitHold Amount
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ <% } + } else if ((screenName.equalsIgnoreCase("DepositTransferClosure.jsp")) && (lovKey.equalsIgnoreCase("glAccount"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No GL A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account No.Ledger NameGl Code
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} + }else if ((screenName.equalsIgnoreCase("AgentMapping.jsp")) && (lovKey.equalsIgnoreCase("limitSetting"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Agent found! Close this window & Please Try Again.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
Agent IdAgent NameTotal LimitHold Amount
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ <% }%> + <% }else if (((screenName.equalsIgnoreCase("BatchTransaction.jsp")) || (screenName.equalsIgnoreCase("BatchAuthorisation.jsp"))) && (lovKey.equalsIgnoreCase("BatchSearch"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Batch found! Close this window & Please Try Again.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
Batch IdTotal AmountStatusTransaction Date
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ <% }%> + <% }else if ((screenName.equalsIgnoreCase("InsuranceAddition.jsp")) && (lovKey.equalsIgnoreCase("CifIns"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer details found! Close this window & Please Try Again.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + <%}%> +
CIF No.Customer NameGuardian NamePhotoSignature
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%if (resultSet.getString(4) == null || resultSet.getString(4).isEmpty()) {%><%} else {%> <%}%><%if (resultSet.getString(5) == null || resultSet.getString(5).isEmpty()) {%>No Siganture Found<%} else {%> <%}%>
+ <% }%> + <% }else if ((screenName.equalsIgnoreCase("CashWidrawlDeposit.jsp")) && (lovKey.equalsIgnoreCase("ddsCash"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Account found! Close this window & Please Try Again.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
Account NoCustomer NameAvailable BalanceAccount Type
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString("acctype")%>
+ + <%} + }else if ((screenName.equalsIgnoreCase("BulkFileUpload.jsp") || screenName.equalsIgnoreCase("AccountRenewalBulk.jsp") ) && (lovKey.equalsIgnoreCase("bulkReport"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No File Details found! Close this window & Please Try Again.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
File IdFile NamePost DateStatus
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ + <%} + }else if ((screenName.equalsIgnoreCase("AccountRenewalBulkSTB.jsp")) && (lovKey.equalsIgnoreCase("bulkReport"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No File Details found! Close this window & Please Try Again.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
File IdPacs NameFile NamePost DateStatus
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + <%} + }else if ((screenName.equalsIgnoreCase("PrintPassbook.jsp")) && (lovKey.equalsIgnoreCase("accSrch"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No account found! Close this window & Please recheck the account number

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Account NumberNameGuardian NameProduct NameCustomer Number
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("DepositMiscellaneousOperation.jsp")) && (lovKey.equalsIgnoreCase("TransactionNoSearch"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Transaction found! Close this window & Please Try Again.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + <%}%> +
Account NoCIF NoCustomer NameTransaction NoTransaction AmountTransaction IndicatorTransaction DatePost TimePrinting Status
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%><%=resultSet.getString(9)%>
+ + <%} + } +else if ((screenName.equalsIgnoreCase("DepositMiscellaneousOperation.jsp")) && (lovKey.equalsIgnoreCase("TransactionLoanNoSearch"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Transaction found! Close this window & Please Try Again.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + <%}%> +
Account NoCIF NoCustomer NameTransaction NoTransaction AmountTransaction IndicatorTransaction DatePost TimePrinting Status
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%><%=resultSet.getString(9)%>
+ + <%} + } +else if ((screenName.equalsIgnoreCase("farmerDetailsUpdation.jsp")) && (lovKey.equalsIgnoreCase("cifSearch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
CIF NumberNameCC Account NoLinked CBS Account No.
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ + <%} + else if ((screenName.equalsIgnoreCase("TDOperation.jsp")) && (lovKey.equalsIgnoreCase("CalcFDMaturity"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No rate slab defined for this term value and term length

+           +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
Interest RateMaturity Amount
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} } + else if ((screenName.equalsIgnoreCase("TDOperation.jsp") || (screenName.equalsIgnoreCase("RDOperation.jsp"))) && (lovKey.equalsIgnoreCase("GLAccSearchTransfer"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Savings A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
KEY_1LEDGER_NAMEGL_PROD_IDLEDGER_DESCCUM_CURR_VAL
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} + } //Added TGL code 28.02.2024 + else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CifDetails"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
CIF NumberNameGuardian NameCustomer TypeAddress1Address2Address3
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(8)%><%=resultSet.getString(3)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%>
+ + <%} + } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CifDetails2"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + <%--Changed 'document.accCreatForm.cifNumber2.value' to 'document.accCreatForm.cifNumber2.value' by Bitan for Multiple CIF --%> + <%--Changed 'document.accCreatForm.name2.value' to 'opener.document.accCreatForm.jt_name'+Counter+'.value' by Bitan for Multiple CIF --%> + + + + + + + + + <%}%> +
CIF NumberNameGuardian NameCustomer TypeAddress1Address2Address3
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(8)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%>
+ + <%} + } else if ((screenName.equalsIgnoreCase("accountAmend.jsp")) && (lovKey.equalsIgnoreCase("AccSrch"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + + + <%}%> +
Account NumberCustomer NameProduct NameLimitAvailable BalancePriciple OutstandingExpiry Date
<%=resultSet.getString(1)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(10)%>
+ + <%} + } else if ((screenName.equalsIgnoreCase("accountAmendSTB.jsp")) && (lovKey.equalsIgnoreCase("AccSrch"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + + + + + + <%}%> +
Pacs NamePacs IDAccount NumberCustomer NameProduct NameCurrent StatusLimitAvailable BalancePriciple OutstandingExpiry Date
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%><%=resultSet.getString(9)%><%=resultSet.getString(10)%><%=resultSet.getString(13)%>
+ + <%} + } else if ((screenName.equalsIgnoreCase("CBSAccountMapping.jsp")) && (lovKey.equalsIgnoreCase("AccSrch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + <%}%> +
Account NoCBS Acc NoCustomer Name Guardian Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ <%} else if ((screenName.equalsIgnoreCase("ForceAccountClosure.jsp")) && (lovKey.equalsIgnoreCase("AccSrch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + <%}%> +
Account NoProduct NameCustomer Name Guardian NameAccount TypeS
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} else if ((screenName.equalsIgnoreCase("BGLAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("BGLSrch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
GL CodeGL Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} else if ((screenName.equalsIgnoreCase("LienMarking.jsp")) && (lovKey.equalsIgnoreCase("accSearch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + <% if (lienType.equalsIgnoreCase("K")) {%> + + + + + + + + + <%} else if (lienType.equalsIgnoreCase("G")) {%> + + + + + + + + + <%} else if(lienType.equalsIgnoreCase("D") || lienType.equalsIgnoreCase("C") || lienType.equalsIgnoreCase("O")) {%> + + + + + + + + + <%}%> + <%}%> +
Account NoProduct NameCustomer NameGuardian NameSanction AmtOld AcctCustomer No
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%>
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%>
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%>
+ <%} else if ((screenName.equalsIgnoreCase("RemoveLien.jsp")) && (lovKey.equalsIgnoreCase("accSearch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
Account NoProduct NameCustomer NameGuardian NameSanction AmtOld AcctCustomer No
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%>
+ <%} else if ((screenName.equalsIgnoreCase("UserCreation.jsp")) && (lovKey.equalsIgnoreCase("UserSrch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
Role Name Code
<%=resultSet.getString(1)%>
+ <%} else if ((screenName.equalsIgnoreCase("UserAmendment.jsp")) && (lovKey.equalsIgnoreCase("UserSrch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
User IdUser NameRole Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} else if ((screenName.equalsIgnoreCase("MiscChargeDeduction.jsp")) && (lovKey.equalsIgnoreCase("prodLOV"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + <%}%> +
Product CodeInterest CategoryProduct NameProduct DescriptionInterest Category Desc
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} else if (screenName.equalsIgnoreCase("accountCreationReadOnly.jsp") && (lovKey.equalsIgnoreCase("PickUPCustomer"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
CIF NumberNameCustomer TypeAddress1Address2Address3Guardian Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%>
+ <%}%> + <%} else if ((screenName.equalsIgnoreCase("LienMarking.jsp")) && (lovKey.equalsIgnoreCase("Account"))) {%> + <%if (!resultSet.isBeforeFirst()) {%> +

No Deposit a/c found for this customer

+
<%} else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + <%}%> + +
Account No.Customer NameCustomer No.Product CodeProduct DescInterest CatInterest Cat DescAvail BalMaturity Date
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%><%=resultSet.getString(9)%>
+ + <%} + } else if ((screenName.equalsIgnoreCase("tradingFinancialYearAdjustment.jsp")) && (lovKey.equalsIgnoreCase("AccountSearch"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No A/C found! Close this window & Please retry!.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
GL Account No.GL CodeGL Ledger NameBalance
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("tradingFinancialYearAdjustment.jsp")) && (lovKey.equalsIgnoreCase("SecondAccountSearch"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No A/C found! Close this window & Please retry!.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
GL Account No.GL CodeGL Ledger NameBalance
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("DepositTransactionOperation.jsp")) && (lovKey.equalsIgnoreCase("viewSpeci"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No A/C found! Close this window & Please retry!.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + <%}%> +
HolderCustomer No.Customer NameGuardian NamePhotoSignatureAadhar NoPAN NoVoter NoIntroduced By Member
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%if (resultSet.getString(6) == null || resultSet.getString(6).isEmpty()) {%><%} else {%> <%}%><%if (resultSet.getString(5) == null || resultSet.getString(5).isEmpty()) {%><%} else {%> <%}%><%=resultSet.getString(7)%><%=resultSet.getString(8)%><%=resultSet.getString(9)%><%=resultSet.getString(10)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("AccountModeOfOperation.jsp")) && (lovKey.equalsIgnoreCase("DepositAccLOV"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No A/C found! Close this window & Please recheck the input provided.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Account No.Customer NameCustomer No.ProductPhotoSignature
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%><% if ((resultSet.getString(6) == null) || resultSet.getString(6).isEmpty()) {%><%} else {%> <%}%><% if ((resultSet.getString(7) == null) || resultSet.getString(7).isEmpty()) {%>No Siganture Found<%} else {%> <%}%>
+ <%} + } else if ((screenName.equalsIgnoreCase("TDRepayMethod.jsp")) && (lovKey.equalsIgnoreCase("TDAccLOV"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No A/C found! Close this window & Please recheck the input provided.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Account No.Customer NameCustomer No.ProductPhotoSignature
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%><% if ((resultSet.getString(6) == null) || resultSet.getString(6).isEmpty()) {%><%} else {%> <%}%><% if ((resultSet.getString(7) == null) || resultSet.getString(7).isEmpty()) {%>No Siganture Found<%} else {%> <%}%>
+ + <%} + } else if ((screenName.equalsIgnoreCase("TDRepayMethod.jsp")) && (lovKey.equalsIgnoreCase("TransferAccLOV"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No A/C found! Close this window & Please recheck the input provided.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Account No.Customer NameCustomer No.ProductPhotoSignature
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%><% if ((resultSet.getString(6) == null) || resultSet.getString(6).isEmpty()) {%><%} else {%> <%}%><% if ((resultSet.getString(7) == null) || resultSet.getString(7).isEmpty()) {%>No Siganture Found<%} else {%> <%}%>
+ + <%} + } else if ((screenName.equalsIgnoreCase("LoanPrincipalAdjustment.jsp")) && (lovKey.equalsIgnoreCase("AccSrch"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + + <%}%> +
Account NoProduct NameCustomer NameLimitAvailable BalancePrinciple OutstandingCurrent InterestPenal InterestNPA InterestTotal Interest
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%><%=resultSet.getString(9)%><%=resultSet.getString(10)%>
+ <%} else if ((screenName.equalsIgnoreCase("LoanPrincipalAdjustment.jsp")) && (lovKey.equalsIgnoreCase("bglAcc"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No GL A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
Account No.Ledger NameGl Code
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("ChequePosting.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Deposit A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + <%}%> +
Account No.Customer NameCustomer No.Product DetailsInterest CategoryAvailable BalancePhotographSignaturePAN_ID
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%><%=resultSet.getString(8)%><% if ((resultSet.getString(9) == null) || resultSet.getString(9).isEmpty()) {%><%} else {%> <%}%><% if ((resultSet.getString(10) == null) || resultSet.getString(10).isEmpty()) {%>No Siganture Found<%} else {%> <%}%><%=resultSet.getString(11)%>
+ + <%} + } else if (screenName.equalsIgnoreCase("DepositKYCInquiry.jsp") && (lovKey.equalsIgnoreCase("PickUPKYC"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
CIF NumberNameCustomer TypeAddress1Address2Address3Guardian Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%>
+ + <%} + } else if ((screenName.equalsIgnoreCase("UpdatePacsDetails.jsp")) && (lovKey.equalsIgnoreCase("pacsD"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No GL A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + <%}%> +
PACS NameAddress1Address2Address3
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("PLAppropriationOperations.jsp")) && (lovKey.equalsIgnoreCase("AccountSearch"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No A/C found! Close this window & Please retry!.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
GL Account No.GL CodeGL Ledger NameBalance
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("PLAppropriationOperations.jsp")) && (lovKey.equalsIgnoreCase("SecondAccountSearch"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No A/C found! Close this window & Please retry!.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
GL Account No.GL CodeGL Ledger NameBalance
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ + <%}%> + <%} else if (screenName.equalsIgnoreCase("MemberDetails.jsp") && (lovKey.equalsIgnoreCase("PickUPCustomer"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + <%}%> +
CIF NumberNameGuardian Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(5)%>
+ + <%}%> + <%} else if (screenName.equalsIgnoreCase("MemberDetails.jsp") && (lovKey.equalsIgnoreCase("PickUPCustomerAmend"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + <%}%> +
CIF NumberNameGuardian Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(5)%>
+ + <%}%> + <%} else if (screenName.equalsIgnoreCase("EmployeeMaster.jsp") && (lovKey.equalsIgnoreCase("PickUPCustomer"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + <%}%> +
CIF NumberEmployee NameGuardian Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(5)%>
+ + <%}%> + <%}%> + +
+ + <% + } catch (Exception ex) { + + } finally { + if (resultSet != null) { + resultSet.close(); + } + if (pstmt != null) { + pstmt.close(); + } + if (conn != null) { + conn.close(); + } + } + %> + + diff --git a/IPKS_Updated/web/web/web/CommonSearchInformationDepositLOV.jsp b/IPKS_Updated/web/web/web/CommonSearchInformationDepositLOV.jsp new file mode 100644 index 0000000..20c8f79 --- /dev/null +++ b/IPKS_Updated/web/web/web/CommonSearchInformationDepositLOV.jsp @@ -0,0 +1,3276 @@ +<%-- + Document : CommonSearchInformationDepositLOV + Created on : Mar 10, 2016, 2:30:36 PM + Author : 986137 +--%> + +<%@page import="java.sql.PreparedStatement"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> + + + + + + Search + + + + + + + + + + <% + String searchString1 = ""; + String screenName = ""; + String searchString2 = ""; + String lovKey = ""; + String textIndex = ""; + String tranType = ""; + String productCode = ""; + String searchString3 = ""; + String Counter="";/*Added by Bitan for multiple Joint CIF */ + String Option=""; + + screenName = request.getParameter("screenName"); + lovKey = request.getParameter("lovKey"); + String pacsId = session.getAttribute("pacsId").toString(); + textIndex = request.getParameter("textIndex"); + String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + String headPacsId = (String) session.getAttribute("headPacsId").toString(); + String user = session.getAttribute("user").toString(); + + String headerQry = null; + + if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CifDetails"))) { + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + // searchString1 = request.getParameter("cifNumber"); + productCode = request.getParameter("productCode"); + if (productCode.equalsIgnoreCase("1017")) { + + headerQry = "select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,nvl(customer_type,' '),t.address_1,nvl(t.address_1,' '),nvl(t.address_2,' '), nvl(t.address_3,'') from kyc_hdr t " + + " where t.cif_no = '" + searchString1.replace(' ', '%') + "' and t.pacs_id in (select m.pacs_id from pacs_master m where m.head_pacs_id=(select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))"; + + } else { + headerQry = "select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,nvl(customer_type,' '),t.address_1,nvl(t.address_1,' '),nvl(t.address_2,' '), nvl(t.address_3,'') from kyc_hdr t " + + " where t.cif_no = '" + searchString1.replace(' ', '%') + "' and t.pacs_id in (select m.pacs_id from pacs_master m where m.head_pacs_id= (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "' ))"; + } + + } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CifDetails2"))) { + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + // searchString1 = request.getParameter("cifNumber"); + productCode = request.getParameter("productCode"); + Counter = request.getParameter("Counter"); + + if (productCode.equalsIgnoreCase("1017")) { + + headerQry = "select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,nvl(customer_type,' '),t.address_1,nvl(t.address_1,' '),nvl(t.address_2,' '), nvl(t.address_3,'') from kyc_hdr t " + + " where t.cif_no = '" + searchString1.replace(' ', '%') + "' and t.pacs_id in (select m.pacs_id from pacs_master m where m.head_pacs_id=(select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))"; + + } else { + headerQry = "select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,nvl(customer_type,' '),t.address_1,nvl(t.address_1,' '),nvl(t.address_2,' '), nvl(t.address_3,'') from kyc_hdr t " + + " where t.cif_no = '" + searchString1.replace(' ', '%') + "' and t.pacs_id in (select m.pacs_id from pacs_master m where m.head_pacs_id=(select head_pacs_id from pacs_master where pacs_id= '" + pacsId + "') )"; + } + + } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("nominee"))) { + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + // searchString1 = request.getParameter("cifNumber"); + headerQry = "select cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,nvl(customer_type,' '),address_1,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,'') from kyc_hdr t " + + " where cif_no = '" + searchString1.replace(' ', '%') + "' and t.pacs_id in (select m.pacs_id from pacs_master m where m.head_pacs_id=(select head_pacs_id from pacs_master where pacs_id= '" + pacsId + "' ))"; + + } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("productCodeSearch"))) { + + searchString1 = request.getParameter("productCodeDetails"); + + headerQry = "select prod_code, prod_desc, int_cat, intt_cat_desc, nvl((select gp.gl_code from gl_product gp where gp.id = GL_ID_INTT_PAYABLE), 'NA') PAYABLE_BGL, nvl((select gp.gl_code from gl_product gp where gp.id = GL_ID_INTT_PAID), 'NA') PAID_GL from dep_product where prod_code<>'6001' and pacs_id like '%" + pacsId + "#%'"; + + } else if ((screenName.equalsIgnoreCase("DepositTransactionOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) { + + // searchString1 = request.getParameter("accNo"); + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + + // headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,t.avail_bal,k.sig_photo,k.photo_path,k.guardian_name,p.prod_code,(select count(m.member_id) from basic_info b, member_information m where b.shg_id = m.shg_id and b.cif = t.customer_no) memberCount,(case when t.cif_no2 is null then 'Single' else 'Joint' end)" + // + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and (p.prod_code in ('1051','1101','1102')) and t.curr_status not in ('C','S') and substr(t.GL_CLASS_CODE,9,2)='14' and (t.key_1 like '%" + searchString1 + "%' or upper(k.first_name) like upper('" + searchString1 + "%')) and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id in(select pm.head_pacs_id from pacs_master pm where pm.pacs_id='" + pacsId + "')) "; + headerQry = " select t.key_1, (k.first_name || ' ' || nvl2(k.middle_name, ' ' || k.middle_name, '') || nvl2(k.last_name, ' ' || k.last_name, '')), " + +" t.customer_no as cif1,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc," + +" t.avail_bal, k.sig_photo,k.photo_path," + +" k.guardian_name,p.prod_code,(select count(m.member_id) from basic_info b, member_information m" + +" where b.shg_id = m.shg_id and b.cif = t.customer_no) memberCount," + +" nvl((select k.mop_name from acc_mop_map k where k.mop_code= t.mop),'NA')," + // +" nvl((select nvl2(r.first_name,r.first_name, 'NA' )|| nvl2(r.middle_name, ' ' || r.middle_name, 'NA') || nvl2(r.last_name, ' ' || r.last_name, 'NA')" + +" nvl((select nvl(r.first_name, ' ') ||' '|| nvl(r.middle_name, ' ') ||' '||nvl(r.last_name, ' ' ) " + +" from kyc_hdr r where r.cif_no=t.cif_no2),'NA') as cust_name2 ,nvl(t.cif_no2,'NA') as cif2," + +" (select r.photo_path from kyc_hdr r where r.cif_no=t.cif_no2) as pic2," + +" (select r.sig_photo from kyc_hdr r where r.cif_no=t.cif_no2) as sig2" + +" from dep_account t, kyc_hdr k, dep_product p" + +" where k.cif_no = t.customer_no and t.dep_prod_id = p.id and (p.prod_code in ('1051', '1101', '1102')) and substr(t.GL_CLASS_CODE,9,2)='14' and t.curr_status not in ('C', 'S')" + +" and (t.key_1 like '%" + searchString1 + "%' or t.link_accno like '%" + searchString1 + "%' or upper(k.first_name) like upper('" + searchString1 + "%') or t.old_accno = '" + searchString1 + "')" + +" and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id in (select pm.head_pacs_id from pacs_master pm where pm.pacs_id ='" + pacsId + "'))"; + + } else if ((screenName.equalsIgnoreCase("ShareTransactionOperation.jsp")) && (lovKey.equalsIgnoreCase("shareAccount"))) { + + // searchString1 = request.getParameter("accNo"); + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + + headerQry = "select da.key_1, (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) custName, (dp.prod_code || ':' || dp.int_cat || '-' || dp.prod_name) product, s.share_value, round(da.avail_bal/s.share_value) number_of_share, (case when da.share_amount_due is null then 0 else da.share_amount_due end) shareAmtDue, da.customer_no from dep_account da, kyc_hdr k, dep_product dp, share_value_mst s where da.customer_no = k.cif_no and da.dep_prod_id = dp.id and dp.id = s.product_id and dp.prod_code = '1017' and substr(da.GL_CLASS_CODE,9,2)='11' and da.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') and (da.key_1 like '%" + searchString1 + "%' or upper(k.first_name) like upper('" + searchString1 + "%')) "; + + + } else if ((screenName.equalsIgnoreCase("BatchTransaction.jsp")) && (lovKey.equalsIgnoreCase("AccountSearch"))) { + + searchString1 = request.getParameter("accType"); + searchString2 = request.getParameter("textIndex"); + // searchString3 = request.getParameter("accNo"); + + if (searchString1.equalsIgnoreCase("G")) { + headerQry = "select g.key_1,p.gl_code,g.ledger_name from gl_account g, gl_product p where g.pacs_id='" + pacsId + "' and g.status='A' and p.gl_code<>'28101' and g.gl_prod_id=p.id and (g.key_1 like '%" + searchString3 + "%' or p.gl_code like upper('%" + searchString3 + "%') or p.gl_name like upper('%" + searchString3 + "%'))"; + } else if (searchString1.equalsIgnoreCase("S")) { + headerQry = "select d.key_1,d.customer_no,d.avail_bal, kh.first_name || ' ' || kh.middle_name || ' ' || kh.last_name C_name from dep_account d, dep_product dp,kyc_hdr kh where d.dep_prod_id = dp.id and d.customer_no=kh.cif_no and d.pacs_id = '" + pacsId + "' and d.curr_status='O' and substr(dp.prod_code,1,1) ='1' and substr(d.GL_CLASS_CODE,9,2) in ('14','11') and (d.key_1 like '%" + searchString3 + "%' or d.link_accno like '%" + searchString3 + "%' or upper(kh.first_name) like upper('" + searchString3 + "%'))"; + } else if (searchString1.equalsIgnoreCase("R")) { + headerQry = "select d.key_1,d.customer_no,d.avail_bal, d.no_inst_paid, d.install_amt, kh.first_name || ' ' || kh.middle_name || ' ' || kh.last_name C_name from dep_account d, dep_product dp,kyc_hdr kh where d.dep_prod_id = dp.id and d.customer_no=kh.cif_no and d.pacs_id = '" + pacsId + "' and d.curr_status='O' and dp.prod_code ='3001' and substr(d.GL_CLASS_CODE,9,2) ='14' and (d.key_1 like '%" + searchString3 + "%' or upper(kh.first_name) like upper('" + searchString3 + "%'))"; + }else if (searchString1.equalsIgnoreCase("L")) { + headerQry = "select l.key_1,l.customer_no,l.disb_amt,l.outst_bal,l.prin_outst,l.intt_outst,l.penal_intt_outst,l.npa_intt_outst,kh.first_name || ' ' || kh.middle_name || ' ' || kh.last_name C_name from loan_account l, loan_product lp, kyc_hdr kh where l.loan_prod_id = lp.id and substr(l.GL_CLASS_CODE,9,2) ='23' and l.customer_no = kh.cif_no and lp.int_method<>'C' and l.pacs_id = '" + pacsId + "' and l.curr_status in ('01','02','03') and (l.key_1 like '%" + searchString3 + "%' or upper(kh.first_name) like upper('" + searchString3 + "%'))"; + } + + + } else if ((screenName.equalsIgnoreCase("DepositKYCCreation.jsp")) && (lovKey.equalsIgnoreCase("IDTypeScoreSearch"))) { + + headerQry = "select ID,DOCUMENT_DTL,SCORE from Kyc_Document_Mst "; + + } else if (screenName.equalsIgnoreCase("DepositKYCInquiry.jsp") && (lovKey.equalsIgnoreCase("PickUPCustomer"))) { + + // searchString1 = request.getParameter("cifNumber"); + // searchString2 = request.getParameter("cifName"); + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + + if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,customer_type,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,' '),t.guardian_name from kyc_hdr t where t.cif_no='1' and t.pacs_id in (select pacs_id from pacs_master where head_pacs_id='" + pacsId + "')"; + } else if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,customer_type,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,' '),t.guardian_name from kyc_hdr t where first_name like ('" + searchString2.replace(' ', '%') + "%') and t.pacs_id in (select pacs_id from pacs_master where head_pacs_id='" + pacsId + "')"; + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,customer_type,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,''),t.guardian_name from kyc_hdr t where cif_no like '%" + searchString1.replace(' ', '%') + "%' and t.pacs_id in (select pacs_id from pacs_master where head_pacs_id='" + pacsId + "')"; + } else { + headerQry = "select cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,customer_type,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,' '),t.guardian_name from kyc_hdr t where (cif_no like '%" + searchString1.replace(' ', '%') + "%' or first_name like ('" + searchString2.replace(' ', '%') + "%')) and t.pacs_id in (select pacs_id from pacs_master where head_pacs_id='" + pacsId + "')"; + } + + } else if ((screenName.equalsIgnoreCase("DepositKYCInquiry.jsp")) && (lovKey.equalsIgnoreCase("IDTypeScoreSearch"))) { + + headerQry = "select ID,DOCUMENT_DTL,SCORE from Kyc_Document_Mst "; + + } else if ((screenName.equalsIgnoreCase("DepositMiscellaneousOperation.jsp")) && (lovKey.equalsIgnoreCase("DepositAccLOB"))) { + + // searchString1 = request.getParameter("depositAccSearch"); + + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,k.photo_path,k.sig_photo" + + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and t.curr_status <>'C' and substr(t.GL_CLASS_CODE,9,2) in ('14','11','23')and p.prod_code in ('1101','1017','3001','2002','2001')and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name) like upper ('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id= '" + pacsId + "' "; + + + } else if (screenName.equalsIgnoreCase("DepositKYCDocumentUpload.jsp") && (lovKey.equalsIgnoreCase("PickUPCustomer"))) { + + // searchString1 = request.getParameter("cifNumber"); + // searchString2 = request.getParameter("cifName"); + + if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,customer_type,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,' ') from kyc_hdr t where t.cif_no='1' and t.pacs_id in (select pacs_id from pacs_master where head_pacs_id='" + pacsId + "')"; + } else if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,customer_type,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,' ') from kyc_hdr t where (trim(first_name)) like '" + searchString2.replace(' ', '%') + "%' and t.pacs_id in (select pacs_id from pacs_master where head_pacs_id='" + pacsId + "') "; + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,customer_type,address_1,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,'') from kyc_hdr t where cif_no like '%" + searchString1.replace(' ', '%') + "%' and t.pacs_id in (select pacs_id from pacs_master where head_pacs_id='" + pacsId + "') "; + } else { + headerQry = "select cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,customer_type,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,' ') from kyc_hdr t where (cif_no like '%" + searchString1.replace(' ', '%') + "%' or (trim(first_name)) like '" + searchString2.replace(' ', '%') + "%') and t.pacs_id in (select pacs_id from pacs_master where head_pacs_id='" + pacsId + "') "; + } + + } else if (screenName.equalsIgnoreCase("DepositRateSlab.jsp")) { + + headerQry = " select p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,p.id from dep_product p where substr(p.prod_code,1,1) in ('2','3') and p.pacs_id like '%"+ pacsId +"%'"; + + } else if ((screenName.equalsIgnoreCase("TDOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) { + + // searchString1 = request.getParameter("accNo"); + tranType = request.getParameter("tranType"); + + if (tranType.equalsIgnoreCase("P")) { + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,round(operations.calcPreClosTranAmt(t.key_1),2),t.intt_cap_amt as INTEREST,decode(t.CURR_STATUS,'I','Initiated','M','Matured','C','Closed','O','Open/Active'), nvl(t.nominee_cif,'')"; + headerQry = headerQry + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) ='2' and substr(t.GL_CLASS_CODE,9,2)='14' and t.curr_status = 'O' and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name ) like upper('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id= '" + pacsId + "' "; + } else if (tranType.equalsIgnoreCase("D")) { + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,t.term_value as PRINCIPAL,round(t.intt_cap_amt,2) as INTEREST,decode(t.CURR_STATUS,'I','Initiated','M','Matured','C','Closed','O','Open/Active'), nvl(t.nominee_cif,'')"; + headerQry = headerQry + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) ='2' and substr(t.GL_CLASS_CODE,9,2)='14' and t.curr_status ='I' and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name ) like upper('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id= '" + pacsId + "' "; + } else if (tranType.equalsIgnoreCase("W")) { + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,round(t.avail_bal) as PRINCIPAL,round(t.intt_cap_amt,2) as INTEREST,decode(t.CURR_STATUS,'I','Initiated','M','Matured','C','Closed','O','Open/Active'), nvl(t.nominee_cif,'')"; + headerQry = headerQry + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) ='2' and substr(t.GL_CLASS_CODE,9,2)='14' and t.curr_status ='M' and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name ) like upper('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id= '" + pacsId + "' "; + } else if (tranType.equalsIgnoreCase("R")) { + headerQry = "select da.td_intt_rate,da.key_1,da.avail_bal,da.mat_dt,(k.first_name || ' ' || k.middle_name || ' ' || k.last_name) CustName,k.guardian_name,(calcMatAmt_TD(d.int_method,(case d.int_method when 'S' then d.intt_payout_freq else d.int_cap_freq end),da.td_intt_rate,da.avail_bal,0,(select system_date from system_date) - da.mat_dt) - da.avail_bal) IntOust,da.customer_no, nvl(da.nominee_cif,'') from dep_account da, dep_product d, kyc_hdr k where da.dep_prod_id = d.id and da.customer_no = k.cif_no and da.curr_status = 'M' and substr(d.prod_code,1,1) = '2' and substr(da.GL_CLASS_CODE,9,2)='14' and to_number((select system_date from system_date) - da.mat_dt) <=14"; + headerQry = headerQry + " and (da.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name ) like upper('" + searchString1.replace(' ', '%') + "%')) and da.pacs_id= '" + pacsId + "' "; + } else if (tranType.equalsIgnoreCase("TDCert")) { + headerQry = "select da.key_1 as account_no,dp.prod_desc,(CASE WHEN da.cif_no2 = '' or da.cif_no2 is null THEN kh.first_name || ' ' || kh.middle_name || ' ' || kh.last_name ELSE (select kh.first_name || ' ' || kh.middle_name || ' ' || kh.last_name || ' && ' || khh.first_name || ' ' || khh.middle_name || ' ' || khh.last_name from kyc_hdr khh where khh.cif_no = da.cif_no2) END) as cust_name,kh.cif_no, case when da.cif_no2 is null then 'Single' else 'Joint' end as mode_acc, nvl(da.nominee_cif,'') from dep_account da, kyc_hdr kh, pacs_master pm, dep_product dp where da.customer_no = kh.cif_no and da.pacs_id = pm.pacs_id and da.dep_prod_id = dp.id and substr(dp.prod_code,1,1) = '2' and substr(da.GL_CLASS_CODE,9,2)='14' "; + headerQry = headerQry + " and (da.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(kh.first_name) like upper('" + searchString1.replace(' ', '%') + "%')) and da.pacs_id= '" + pacsId + "' "; + } + + } else if ((screenName.equalsIgnoreCase("AssignToCashDrawer.jsp")) && (lovKey.equalsIgnoreCase("PopupTellers"))) { + + // searchString1 = request.getParameter("teller_id"); + headerQry = "select login_id,login_name from login_details where user_role_id in ( '201603000004022','201603000006020', '201603000007020' ) and pacs_id ='" + pacsId + "' and login_id like '%" + searchString1.replace(' ', '%') + "%' "; + + } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("SavingsAccSearch"))) { + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + // searchString1 = request.getParameter("cifNumber"); + headerQry = "select key_1,p.prod_desc,(h.first_name||nvl2(h.middle_name,' '||h.middle_name,'')||nvl2(h.last_name,' '||h.last_name,'')) name from dep_account t,dep_product p,kyc_hdr h " + + " where t.dep_prod_id = p.id and t.customer_no = h.cif_no and p.prod_code in ('1101','1102') and substr(p.int_cat,1,1)='1' and substr(t.GL_CLASS_CODE,9,2)='14' and t.curr_status ='O' and (t.customer_no like '%" + searchString1.replace(' ', '%') + "%' or t.cif_no2 like '%" + searchString1.replace(' ', '%') + "%' ) and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') "; + + } else if ((screenName.equalsIgnoreCase("CashDrawerEnquiry.jsp")) && (lovKey.equalsIgnoreCase("PopupTellers"))) { + + //searchString1 = request.getParameter("tellerid"); + headerQry = "select login_id,login_name from login_details where user_role_id = '201603000004022' and pacs_id ='" + pacsId + "' and login_id like '%" + searchString1.replace(' ', '%') + "%' "; + + } else if ((screenName.equalsIgnoreCase("TDOperation.jsp")) && (lovKey.equalsIgnoreCase("SavingsAccSearchTransfer"))) { + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + // searchString1 = request.getParameter("accNo"); + headerQry = "select d.customer_no,d.key_1,(h.first_name||nvl2(h.middle_name,' '||h.middle_name,'')||nvl2(h.last_name,' '||h.last_name,'')) Customer_Name,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,d.avail_bal from dep_account d,dep_product p,kyc_hdr h where d.dep_prod_id =p.id and d.curr_status <>'C' and d.customer_no = h.cif_no and p.prod_code in ('1051','1101','1102') and substr(p.int_cat,1,1)='1' and substr(d.GL_CLASS_CODE,9,2)='14' and d.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') and (d.customer_no in (select a.customer_no from dep_account a where a.key_1 = '" + searchString1 + "' union select da.cif_no2 from dep_account da where da.key_1 = '" + searchString1 + "' ) or d.cif_no2 in (select a.customer_no from dep_account a where a.key_1 = '" + searchString1 + "' union select da.cif_no2 from dep_account da where da.key_1 = '" + searchString1 + "' ) )"; + + } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) { + + //searchString1 = request.getParameter("accNo"); + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,t.avail_bal" + + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) = '1' and substr(t.GL_CLASS_CODE,9,2) in ('14','11') and t.curr_status <>'C' and (t.key_1 like '%" + searchString1 + "%' or t.link_accno like '%" + searchString1 + "%' or upper(k.first_name) like upper('" + searchString1 + "%')) and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') "; + + + } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("glAccount"))) { + + // searchString1 = request.getParameter("gl_accNo"); + + headerQry = "select ga.key_1, ga.ledger_name,gp.gl_code,gp.id,gp.gl_name from gl_account ga, gl_product gp where ga.gl_prod_id<>'201611000001184' and ga.gl_prod_id=gp.id and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') "; + + } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount1"))) { + + // searchString1 = request.getParameter("accNo_dd_from"); + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,t.avail_bal" + + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) = '1' and substr(t.GL_CLASS_CODE,9,2) in ('14','11') and t.curr_status <>'C' and (t.key_1 like '%" + searchString1 + "%' or upper(k.first_name) like upper('" + searchString1 + "%')) and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') "; + + + } else if ((screenName.equalsIgnoreCase("LoanAccountCreation1.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) { + + // searchString1 = request.getParameter("depositAccount"); + + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,t.avail_bal from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and (p.prod_code in ('1051','1101')) and substr(t.GL_CLASS_CODE,9,2)='14' and t.curr_status <>'C' and t.key_1 like '%" + searchString1.replace(' ', '%') + "%' and t.pacs_id= '" + pacsId + "' "; + + + } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount2"))) { + + // searchString1 = request.getParameter("accNo_dd_to"); + + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,t.avail_bal" + + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) = '1' and substr(t.GL_CLASS_CODE,9,2)='14' and t.curr_status <>'C' and (t.key_1 like '%" + searchString1 + "%' or t.link_accno like '%" + searchString1 + "%' or upper(k.first_name) like upper('" + searchString1 + "%')) and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') "; + + } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("glAccount1"))) { + + // searchString1 = request.getParameter("accNo_gg_from"); + headerQry = "select ga.key_1, ga.ledger_name,gp.gl_code,gp.id,gp.gl_name from gl_account ga, gl_product gp where ga.gl_prod_id<>'201611000001184' and ga.gl_prod_id=gp.id and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') "; + + + } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("glAccount2"))) { + + // searchString1 = request.getParameter("accNo_gg_to"); + + headerQry = "select ga.key_1, ga.ledger_name,gp.gl_code,gp.id,gp.gl_name from gl_account ga, gl_product gp where ga.gl_prod_id=gp.id and gp.id <>'201611000001184' and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') "; + + } else if ((screenName.equalsIgnoreCase("DepositTransferClosure.jsp")) && (lovKey.equalsIgnoreCase("depositAccount2"))) { + + // searchString1 = request.getParameter("accNo_dd_to"); + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,avail_bal" + + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) = '1' and substr(p.int_cat,1,1) = '1' and t.curr_status <>'C' and substr(t.GL_CLASS_CODE,9,2) in ('14','11') and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or t.link_accno like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name ) like upper ('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') "; + + } else if ((screenName.equalsIgnoreCase("DepositTransferClosure.jsp")) && (lovKey.equalsIgnoreCase("depositAccount1"))) { + + // searchString1 = request.getParameter("accNo_dd_from"); + + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,round(t.avail_bal),round(t.intt_outst)" + + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) = '1' and t.curr_status <>'C' and substr(t.GL_CLASS_CODE,9,2) in ('14','11') and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or t.link_accno like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name) like upper ('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id= '" + pacsId + "' "; + + } else if ((screenName.equalsIgnoreCase("DepositTransferClosure.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) { + + // searchString1 = request.getParameter("accNo"); + + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,round(t.avail_bal),round(t.intt_outst)" + + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) = '1' and t.curr_status <> 'C' and substr(t.GL_CLASS_CODE,9,2) in ('14','11') and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name) like upper ('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id= '" + pacsId + "' "; + + + } else if ((screenName.equalsIgnoreCase("RDOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) { + + // searchString1 = request.getParameter("accNo"); + tranType = request.getParameter("tranType"); + + if (subPacsFlag.equalsIgnoreCase("Y") && tranType.equalsIgnoreCase("D")) { + pacsId = headPacsId; + } + + if (tranType.equalsIgnoreCase("W")) { + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,nvl(t.install_amt,0)install_amt,operations.getRDMatAmt(t.avail_bal,nvl(t.intt_cap_amt,0)+nvl(t.Intt_Outst,0), (case substr(p.int_cat, 1, 1) " + + " when '2' then 0 else nvl(t.pen_count, 0) end)),(p.pre_closure_charge*t.term_value)/100" + + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) = '3' and substr(t.GL_CLASS_CODE,9,2) ='14' and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name ) like upper('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id = '" + pacsId + "' and t.curr_status = 'M'"; + } else if (tranType.equalsIgnoreCase("P")) { + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,nvl(t.install_amt,0)install_amt, (case substr(p.int_cat, 1, 1) " + +" when '2' then round(t.avail_bal + nvl(t.intt_outst, 0) + nvl(t.intt_cap_amt, 0)) else " + +" operations.getRDMatAmt_jh(t.avail_bal, nvl(t.intt_cap_amt, 0) + nvl(t.Intt_Outst, 0), " + +" nvl(t.pen_count, 0), nvl(t.install_amt,0)) end),(p.pre_closure_charge*t.term_value)/100 " + + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) = '3' and substr(t.GL_CLASS_CODE,9,2) ='14' and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name) like upper('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id = '" + pacsId + "' and t.curr_status = 'O'"; + } else { + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,nvl(t.install_amt,0)install_amt,operations.getRDMatAmt(t.avail_bal,t.intt_cap_amt+t.Intt_Outst,t.pen_count),(p.pre_closure_charge*t.term_value)/100, t.no_inst_paid, t.theo_inst_no, NVL(to_char(t.nxt_due_date, 'DD-MON-YY'), 'NA') nxt_due_date " + + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) = '3' and substr(t.GL_CLASS_CODE,9,2) ='14' and t.CURR_STATUS = 'O' and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name) like upper('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') "; + } + + + } else if ((screenName.equalsIgnoreCase("RDOperation.jsp")) && (lovKey.equalsIgnoreCase("SavingsAccSearchTransfer"))) { + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + // searchString1 = request.getParameter("accNo"); + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,t.avail_bal" + + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and p.prod_code in ('1051','1101','1102') and substr(t.GL_CLASS_CODE,9,2) ='14' and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') and (t.customer_no in (select customer_no from dep_account where key_1 = '" + searchString1 + "' and t.curr_status <>'C' union select da.cif_no2 from dep_account da where da.key_1 = '" + searchString1 + "') or t.cif_no2 in (select customer_no from dep_account where key_1 = '" + searchString1 + "' and t.curr_status <>'C' union select da.cif_no2 from dep_account da where da.key_1 = '" + searchString1 + "')) "; + + } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CalcMaturity"))) { + + // searchString1 = request.getParameter("instAmt"); + // searchString2 = request.getParameter("termMonth"); + //searchString3 = request.getParameter("inttCatDetails").substring(0, 4); + String prodCode=request.getParameter("prodCodeDetails").substring(0, 4); + String intCat=request.getParameter("inttCatDetails").substring(0, 1); + + System.out.println(prodCode + " " + intCat); + if((prodCode.equalsIgnoreCase("3001")) && (intCat.equalsIgnoreCase("2"))) + { + headerQry = "select t.rate,getDDSMatAmt(t.rate," + searchString1 + "," + searchString2 + "),d.prod_code from td_rate_slab t, dep_product d where t.product_id=d.id and t.pacs_id='"+pacsId+"' and substr(d.prod_code,1,1) = '3' and d.int_cat ='" + searchString3 + "' and " + searchString2 + " between t.term_from and t.term_to and " + searchString1 + " between t.from_amt and t.to_amt " + + " and (select system_date from system_date) between t.eff_from_date and t.eff_to_date"; + + } + + else + { + headerQry = "select t.rate,getRDMatAmt('Q',t.rate," + searchString1 + "," + searchString2 + "),d.prod_code from td_rate_slab t, dep_product d where t.product_id=d.id and t.pacs_id='"+pacsId+"' and substr(d.prod_code,1,1) = '3' and d.int_cat ='" + searchString3 + "' and " + searchString2 + " between t.term_from and t.term_to and " + searchString1 + " between t.from_amt and t.to_amt " + + " and (select system_date from system_date) between t.eff_from_date and t.eff_to_date"; + } + + } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CalcFDMaturity"))) { + + // searchString1 = request.getParameter("termValue"); + //searchString2 = request.getParameter("productCodeDetails").substring(0, 4); + // searchString3 = request.getParameter("inttCatDetails").substring(0, 4); + //int termYears = Integer.parseInt(request.getParameter("termYears")); + //int termMonth = Integer.parseInt(request.getParameter("termMonth")); + //int termDays = Integer.parseInt(request.getParameter("termDays")); + + termMonth = termMonth + (termYears * 12); + /*if(searchString2.equalsIgnoreCase("2002")){ + termDays = termDays - 1; + }*/ + if(searchString2.equalsIgnoreCase("2001")){ + headerQry = "select t.rate,calcMISAmt_TD((case d.int_method when 'S' then d.intt_payout_freq else d.int_cap_freq end),t.rate," + searchString1 + "),d.prod_code,d.int_cat,d.prod_desc from td_rate_slab t, dep_product d where t.product_id=d.id and t.pacs_id='"+pacsId+"' and d.prod_code ='" + searchString2 + "' and d.int_cat ='" + searchString3 + "' and to_number((add_months((select system_date from system_date)," + termMonth + ") + " + termDays + ") - (select system_date from system_date)) between t.term_from and t.term_to and " + searchString1 + " between t.from_amt and t.to_amt and (select system_date from system_date) between t.eff_from_date and t.eff_to_date"; + }else{ + headerQry = "select t.rate,calcMatAmt_TD(d.int_method,(case d.int_method when 'S' then d.intt_payout_freq else d.int_cap_freq end),t.rate," + searchString1 + "," + termMonth + "," + termDays + "),d.prod_code,d.int_cat,d.prod_desc from td_rate_slab t, dep_product d where t.product_id=d.id and t.pacs_id='"+pacsId+"' and d.prod_code ='" + searchString2 + "' and d.int_cat ='" + searchString3 + "' and to_number((add_months((select system_date from system_date)," + termMonth + ") + " + termDays + ") - (select system_date from system_date)) between t.term_from and t.term_to and " + searchString1 + " between t.from_amt and t.to_amt and (select system_date from system_date) between t.eff_from_date and t.eff_to_date"; + } + + } else if ((screenName.equalsIgnoreCase("dividendpayout.jsp")) && (lovKey.equalsIgnoreCase("shareAccount"))) { + + // searchString1 = request.getParameter("shareAcc"); + headerQry = "select t.key_1, (k.first_name || nvl2(k.middle_name, ' ' || k.middle_name, '') || nvl2(k.last_name, ' ' || k.last_name, '')) as name, t.customer_no, t.membership_no, d.prod_code, d.prod_desc, m.share_value, t.avail_bal, m.dividend_percentage divident_percentage, ((t.avail_bal * m.dividend_percentage) / 100) Divident_amt from dep_account t, dep_product d, kyc_hdr k, share_value_mst m where t.dep_prod_id = d.id and d.prod_code='1017' and substr(t.GL_CLASS_CODE,9,2)='11' and t.customer_no = k.cif_no and d.id = m.product_id and d.prod_code = m.prod_code and t.avail_bal <> 0 and t.pacs_id = '" + pacsId + "' and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name) like upper('" + searchString1.replace(' ', '%') + "%')) "; + + } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("FDRateSlab"))) { + + //searchString1 = request.getParameter("productCodeDetails").substring(0, 4); + + headerQry = "select t.rate,t.term_from,t.term_to,t.from_amt,t.to_amt,d.prod_code,d.int_cat,d.prod_desc from td_rate_slab t, dep_product d where t.product_id=d.id and substr(d.prod_code,1,1) ='2' order by d.prod_code,t.rate "; + + } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("RDRateSlab"))) { + + headerQry = "select t.rate,t.term_from,t.term_to,t.from_amt,t.to_amt,d.prod_code,d.int_cat,d.prod_desc from td_rate_slab t, dep_product d where t.product_id=d.id and substr(d.prod_code,1,1) ='3' and (select system_date from system_date) between t.eff_from_date and t.eff_to_date order by t.term_from"; + + } else if (screenName.equalsIgnoreCase("ProductCreation.jsp") && (lovKey.equalsIgnoreCase("ParameterPdAmend"))) { + + // searchString1 = request.getParameter("productcodeSearch"); + // searchString2 = request.getParameter("intcatSearch"); + + if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select dp.prod_code,dp.prod_desc,dp.int_cat,dp.intt_cat_desc from dep_product dp where to_number(substr(dp.prod_code,1,1)) < 5"; + } else if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select dp.prod_code,dp.prod_desc,dp.int_cat,dp.intt_cat_desc from dep_product dp where to_number(substr(dp.prod_code,1,1)) < 5 and dp.int_cat like '%" + searchString2.replace(' ', '%') + "%'"; + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select dp.prod_code,dp.prod_desc,dp.int_cat,dp.intt_cat_desc from dep_product dp where to_number(substr(dp.prod_code,1,1)) < 5 and dp.prod_code like '%" + searchString1.replace(' ', '%') + "%'"; + } else { + headerQry = "select dp.prod_code,dp.prod_desc,dp.int_cat,dp.intt_cat_desc from dep_product dp where to_number(substr(dp.prod_code,1,1)) < 5 and dp.prod_code like '%" + searchString1.replace(' ', '%') + "%' and dp.int_cat like '%" + searchString2.replace(' ', '%') + "%'"; + } + + + } else if ((screenName.equalsIgnoreCase("shareOperations.jsp")) && (lovKey.equalsIgnoreCase("shareAccount"))) { + + headerQry = "select t.key_1, (k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')) as name,t.customer_no,t.membership_no,d.prod_code,d.prod_desc,m.share_value from dep_account t, dep_product d,kyc_hdr k,share_value_mst m where t.dep_prod_id = d.id and k.cif_no=t.customer_no and d.prod_desc=m.prod_desc and d.prod_code='1017' and substr(t.GL_CLASS_CODE,9,2)='11' and t.pacs_id='" + pacsId + "' "; + + } else if ((screenName.equalsIgnoreCase("shareOperations.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) { + + // searchString1 = request.getParameter("shareNo"); + + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,t.avail_bal" + + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and (p.prod_code in ('1051','1101')) and t.curr_status not in ('C','S') and substr(t.GL_CLASS_CODE,9,2)='14' and t.customer_no in (select a.customer_no from dep_account a where a.key_1 = '" + searchString1.replace(' ', '%') + "') and t.pacs_id= '" + pacsId + "' "; + + + } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("productCodeShare"))) { + + searchString1 = request.getParameter("productCodeDetails"); + + headerQry = "select prod_code,prod_desc,int_cat,intt_cat_desc from dep_product where prod_code ='1017' "; + + } else if (screenName.equalsIgnoreCase("DepositTransferOperation.jsp") && (lovKey.equalsIgnoreCase("glAccountCashInHand"))) { + + // searchString1 = request.getParameter("acc_gl_to_cash"); + + headerQry = "select ga.key_1, ga.ledger_name,ga.gl_prod_id,gp.id,gp.gl_name from gl_account ga, gl_product gp where ga.gl_prod_id=gp.id and ga.gl_prod_id = '201611000001184' and ga.pacs_id= '" + pacsId + "' and (gp.id like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') "; + } else if (screenName.equalsIgnoreCase("ProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAYABLESearchLOVKey"))) { + + //searchString1 = request.getParameter("acc_gl_to_cash"); + + headerQry = "select gl_code,gl_name,id from gl_product"; + } else if (screenName.equalsIgnoreCase("ProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAIDSearchLOVKey"))) { + + //searchString1 = request.getParameter("acc_gl_to_cash"); + + headerQry = "select gl_code,gl_name,id from gl_product"; + } else if (screenName.equalsIgnoreCase("ProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAYABLESearchLOVKeyAmend"))) { + + //searchString1 = request.getParameter("acc_gl_to_cash"); + + headerQry = "select gl_code,gl_name,id from gl_product"; + } else if (screenName.equalsIgnoreCase("ProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAIDSearchLOVKeyAmend"))) { + + //searchString1 = request.getParameter("acc_gl_to_cash"); + + headerQry = "select gl_code,gl_name,id from gl_product"; + } else if ((screenName.equalsIgnoreCase("transactionOperation.jsp")) && (lovKey.equalsIgnoreCase("SavingsAccSearchTransfer"))) { + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + //searchString1 = request.getParameter("accNo"); + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,t.avail_bal" + + " from dep_account t,kyc_details k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and p.prod_code in ('1102','1101') and substr(t.GL_CLASS_CODE,9,2)='14' and (t.customer_no in (select a.customer_no from dep_account a where a.key_1 = '" + searchString1 + "' union select b.cif_no2 from dep_account b where b.key_1 = '" + searchString1 + "' ) or t.cif_no2 in (select a.customer_no from dep_account a where a.key_1 = '" + searchString1 + "' union select b.cif_no2 from dep_account b where b.key_1 = '" + searchString1 + "' ) ) and t.curr_status not in ('C') and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') "; + + } else if ((screenName.equalsIgnoreCase("shareaccounttransaction.jsp")) && (lovKey.equalsIgnoreCase("SavingsAccSearchTransfer"))) { + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + // searchString1 = request.getParameter("accNo"); + headerQry = "select d.customer_no,d.key_1,(h.first_name||nvl2(h.middle_name,' '||h.middle_name,'')||nvl2(h.last_name,' '||h.last_name,'')) Customer_Name,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,d.avail_bal from dep_account d,dep_product p,kyc_hdr h where d.dep_prod_id =p.id and d.curr_status <>'C' and substr(d.GL_CLASS_CODE,9,2)='14' and d.customer_no = h.cif_no and p.prod_code in ('1051','1101') and d.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') and (d.customer_no in (select a.customer_no from dep_account a where a.key_1 = '" + searchString1 + "' union select da.cif_no2 from dep_account da where da.key_1 = '" + searchString1 + "' ) or d.cif_no2 in (select a.customer_no from dep_account a where a.key_1 = '" + searchString1 + "' union select da.cif_no2 from dep_account da where da.key_1 = '" + searchString1 + "' ) )"; + + } else if ((screenName.equalsIgnoreCase("DepositTransactionOperation.jsp")) && (lovKey.equalsIgnoreCase("depositShgMember"))) { + + //searchString1 = request.getParameter("accNo"); + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + + headerQry = "select m.member_id,m.member_name from member_information m,basic_info b,kyc_hdr k where b.shg_code=m.shg_code and k.cif_no=b.cif and k.cif_no like '%" + searchString1 + "%' and k.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id in (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "')) "; + + } else if ((screenName.equalsIgnoreCase("DepositMiscellaneousOperation.jsp")) && (lovKey.equalsIgnoreCase("SecondCifLOB")|| lovKey.equalsIgnoreCase("nomineeLov"))) { + + // searchString1 = request.getParameter("depositAccSearch"); + + headerQry = "select k.cif_no,(k.first_name || nvl2(k.middle_name, ' ' || k.middle_name, '') || nvl2(k.last_name, ' ' || k.last_name, '')),k.guardian_name from kyc_hdr k" + + " where (k.cif_no like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name) like upper ('" + searchString1.replace(' ', '%') + "%')) and k.pacs_id in (select pacs_id from pacs_master where head_pacs_id in(select pm.head_pacs_id from pacs_master pm where pm.pacs_id='" + pacsId + "') )"; + + } else if ((screenName.equalsIgnoreCase("mocOperations.jsp")) && (lovKey.equalsIgnoreCase("AccountSearch"))) { + + searchString1 = request.getParameter("textIndex"); + // searchString2 = request.getParameter("accNo"); + + headerQry = "select g.key_1,p.gl_code,g.ledger_name,g.cum_curr_val from gl_account g, gl_product p where g.pacs_id='" + pacsId + "' and g.status='A' and p.gl_code<>'28101' and g.gl_prod_id=p.id and (g.key_1 like '%" + searchString2 + "%' or p.gl_code like upper('%" + searchString2 + "%') or p.gl_name like upper('%" + searchString2 + "%'))"; + + } else if ((screenName.equalsIgnoreCase("mocOperations.jsp")) && (lovKey.equalsIgnoreCase("SecondAccountSearch"))) { + + searchString1 = request.getParameter("textIndex"); + // searchString2 = request.getParameter("accNo"); + + headerQry = "select g.key_1,p.gl_code,g.ledger_name,g.cum_curr_val from gl_account g, gl_product p where g.pacs_id='" + pacsId + "' and g.status='A' and p.gl_code<>'28101' and g.gl_prod_id=p.id and (g.key_1 like '%" + searchString2 + "%' or p.gl_code like upper('%" + searchString2 + "%') or p.gl_name like upper('%" + searchString2 + "%'))"; + + } else if ((screenName.equalsIgnoreCase("CashWidrawlDeposit.jsp")) && (lovKey.equalsIgnoreCase("ddsCash"))) { + + searchString1 = pacsId; + searchString3= user; + // searchString2=request.getParameter("accountNo"); + String trnType = request.getParameter("trnType"); + String searchFlag = request.getParameter("sflag"); + if(searchFlag.equalsIgnoreCase("true")){ + if(trnType.equalsIgnoreCase("CR")){ + headerQry = "select d.key_1,(select r.first_name || nvl(r.middle_name, ' ') || nvl(r.last_name, ' ')" + +" from kyc_hdr r where r.cif_no = d.customer_no), d.avail_bal, 'DEPOSIT' accType from dep_account d, " + +" dds_agent_acct a where d.pacs_id = '" + searchString1 + "' and d.key_1=a.dds_acct and d.customer_no in " + +" (select r.cif_no from kyc_hdr r where upper(r.first_name) like upper( '" + searchString2 + "%' ) and r.pacs_id in (select pacs_id from pacs_master where head_pacs_id= (select head_pacs_id from pacs_master where pacs_id='" + searchString1 + "')))" + +" and substr(d.GL_CLASS_CODE,9,2)='14' and d.dep_prod_id in (select id from dep_product dp where dp.prod_code in ('3001', '1101') and substr(dp.int_cat,1,1) ='2') " + +" and a.agent_id='" + searchString3 + "' union all " + +" select d.key_1,(select r.first_name || nvl(r.middle_name, ' ') || nvl(r.last_name, ' ') from kyc_hdr r " + +" where r.cif_no = d.customer_no), d.outst_bal, 'LOAN' accType from loan_account d,dds_agent_acct a " + +" where a.dds_acct=d.key_1 and d.pacs_id= '" + searchString1 + "' and d.customer_no in (select r.cif_no from kyc_hdr r where " + +" upper(r.first_name) like upper( '" + searchString2 + "%' ) and r.pacs_id in (select pacs_id from pacs_master where head_pacs_id= (select head_pacs_id from pacs_master where pacs_id='" + searchString1 + "')) ) and substr(d.GL_CLASS_CODE,9,2)='23' and d.loan_prod_id in (select id from loan_product dp " + +" where dp.prod_code in ('8000','7002') and dp.int_method='S' ) and a.agent_id='" + searchString3 + "' " ; + + }else if (trnType.equalsIgnoreCase("DR")){ + headerQry = "select d.key_1,(select r.first_name || nvl(r.middle_name, ' ') || nvl(r.last_name, ' ')" + +" from kyc_hdr r where r.cif_no = d.customer_no), d.avail_bal, 'DEPOSIT' accType from dep_account d, " + +" dds_agent_acct a where d.pacs_id = '" + searchString1 + "' and d.key_1=a.dds_acct and d.customer_no in " + +" (select r.cif_no from kyc_hdr r where upper(r.first_name) like upper( '" + searchString2 + "%' ) and r.pacs_id in (select pacs_id from pacs_master where head_pacs_id= (select head_pacs_id from pacs_master where pacs_id='" + searchString1 + "')) )" + +" and substr(d.GL_CLASS_CODE,9,2)='14' and d.dep_prod_id in (select id from dep_product dp where dp.prod_code in ('3001', '1101') and substr(dp.int_cat,1,1) ='2') " + +" and a.agent_id='" + searchString3 + "' "; + } + } + else + { + if(trnType.equalsIgnoreCase("CR")){ + headerQry = "select d.key_1,(select r.first_name || nvl(r.middle_name, ' ') || nvl(r.last_name, ' ') from kyc_hdr r" + + " where r.cif_no = d.customer_no),d.avail_bal ,'DEPOSIT' accType from dep_account d, DDS_AGENT_ACCT a where d.key_1 = a.dds_acct " + + " and substr(d.GL_CLASS_CODE,9,2)='14'and d.dep_prod_id in (select p.id from dep_product p where p.prod_code in ('3001', '1101') and substr(p.int_cat, 1, 1) = '2')" + + " and d.pacs_id = '" + searchString1 + "' and d.customer_no in (select r.cif_no from kyc_hdr r where r.pacs_id = '" + searchString1 + "') and d.key_1 like '%" + searchString2 + "%'" + + " and a.agent_id = '" + searchString3 + "'" + + " union all select l.key_1, (select r.first_name || nvl(r.middle_name, ' ') || nvl(r.last_name, ' ')" + + " from kyc_hdr r where r.cif_no = l.customer_no), l.outst_bal,'LOAN' accType from loan_account l, DDS_AGENT_ACCT a " + + " where l.pacs_id = '" + searchString1 + "' and l.customer_no in (select r.cif_no from kyc_hdr r where r.pacs_id = '" + searchString1 + "') and l.key_1 like '%" + searchString2 + "%'" + + " and a.agent_id = '" + searchString3 + "'" + + " and l.key_1 = a.dds_acct and substr(l.GL_CLASS_CODE,9,2)='23' and l.loan_prod_id in (select p.id from loan_product p where p.prod_code in ('8000','7002') and p.int_method='S')" + + " and l.pacs_id ='" + searchString1 + "' and a.agent_id = '" + searchString3 + "' order by 1 "; + }else if (trnType.equalsIgnoreCase("DR")){ + headerQry = "select d.key_1,(select r.first_name || nvl(r.middle_name, ' ') || nvl(r.last_name, ' ') from kyc_hdr r" + + " where r.cif_no = d.customer_no),d.avail_bal ,'DEPOSIT' accType from dep_account d, DDS_AGENT_ACCT a where d.key_1 = a.dds_acct " + + " and substr(d.GL_CLASS_CODE,9,2)='14' and d.dep_prod_id in (select p.id from dep_product p where p.prod_code in ('3001', '1101') and substr(p.int_cat, 1, 1) = '2')" + + " and d.pacs_id = '" + searchString1 + "' and d.customer_no in (select r.cif_no from kyc_hdr r where r.pacs_id = '" + searchString1 + "') and d.key_1 like '%" + searchString2 + "%'" + + " and a.agent_id = '" + searchString3 + "'order by 1 "; + + } + } + } + else if ((screenName.equalsIgnoreCase("AgentMapping.jsp")) && (lovKey.equalsIgnoreCase("agntMap"))) { + + + searchString1 = pacsId; + searchString2= user; + // searchString3=request.getParameter("agentName"); + + headerQry = " select d.login_id,d.login_name " + +" from login_details d where d.user_role_id ='201603000004020' and d.pacs_id='"+searchString1+"'" + +" and to_char(d.login_id) like '%"+searchString3+"%'"; + } + + + Connection conn = DbHandler.getDBConnection(); + + PreparedStatement pstmt = null; + + ResultSet resultSet = null; + String bgColor = null; + int flag = 1; + + + + try { + pstmt = conn.prepareStatement(headerQry); + System.out.println(headerQry); + resultSet = pstmt.executeQuery(); + System.out.println(headerQry); + + + + %> + + +
+ + <% if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CifDetails"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
CIF NumberNameCustomer TypeAddress1Address2Address3
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%>
+ + <%} + } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CifDetails2"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + <%--Changed 'document.accCreatForm.cifNumber2.value' to 'document.accCreatForm.cifNumber2.value' by Bitan for Multiple CIF --%> + <%--Changed 'document.accCreatForm.name2.value' to 'opener.document.accCreatForm.jt_name'+Counter+'.value' by Bitan for Multiple CIF --%> + + + + + + + + <%}%> +
CIF NumberNameCustomer TypeAddress1Address2Address3
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%>
+ + <%} + } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("nominee"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + <%}%> +
CIF NumberNameCustomer TypeAddress1Address2Address3
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%>
+ + + <%} + } else if ((screenName.equalsIgnoreCase("mocOperations.jsp")) && (lovKey.equalsIgnoreCase("AccountSearch"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No A/C found! Close this window & Please retry!.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
GL Account No.GL CodeGL Ledger NameBalance
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("mocOperations.jsp")) && (lovKey.equalsIgnoreCase("SecondAccountSearch"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No A/C found! Close this window & Please retry!.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
GL Account No.GL CodeGL Ledger NameBalance
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ + <%} + } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("productCodeSearch"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Product found! Close this window & Please recheck the Product Code selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
Product CodeDescriptionInterest CategoryDescriptionPAYABLE_BGLPAID_GL
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("productCodeShare"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Product found! Close this window & Please recheck the Product Code selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Product CodeDescriptionInterest CategoryDescription
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ + + <%} + } else if ((screenName.equalsIgnoreCase("DepositTransactionOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No A/C found! Close this window & Please retry!.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + + + + + + + + <%}%> +
Account No.Mode Of OperationCustomer NameGuardian NameCustomer No.Product CodeProduct DetailsInterest DetailsAvailable BalancePhotoSignatureSecendary CifSecendary Holder NameSecendary Holder PhotoSecendary Holder Sign
<%=resultSet.getString(1)%><%=resultSet.getString(14)%><%=resultSet.getString(2)%><%=resultSet.getString(11)%><%=resultSet.getString(3)%><%=resultSet.getString(12)%><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%><%=resultSet.getString(8)%><%if (resultSet.getString(10) == null || resultSet.getString(10).isEmpty()) {%><%} else {%> <%}%><%if (resultSet.getString(9) == null || resultSet.getString(9).isEmpty()) {%>No Signature Found<%} else {%> <%}%><%=resultSet.getString(16)%><%=resultSet.getString(15)%><%if (resultSet.getString(17) == null || resultSet.getString(17).isEmpty()) {%><%} else {%> <%}%><%if (resultSet.getString(18) == null || resultSet.getString(18).isEmpty()) {%>No Siganture Found<%} else {%> <%}%>
+ <%} + } else if ((screenName.equalsIgnoreCase("ShareTransactionOperation.jsp")) && (lovKey.equalsIgnoreCase("shareAccount"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No A/C found! Close this window & Please retry!.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + <%}%> +
Account No.Customer NameProductShare ValueNumber of Share already BroughtShare Amount Due
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("BatchTransaction.jsp")) && (lovKey.equalsIgnoreCase("AccountSearch"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No A/C found! Close this window & Please recheck the input provided. Note: Only Simple Loan A/C can be re-payed from Batch.

+ +
+ <% } else {%> + <% if (searchString1.equalsIgnoreCase("G")) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
GL Account No.GL CodeGL Ledger Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <% } else if (searchString1.equalsIgnoreCase("S")) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
Account No.Customer NoAvailable BalanceCustomer Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ <% } else if (searchString1.equalsIgnoreCase("L")) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + <%}%> +
Account No.Customer NoCustomer NameDisb AmountOutstanding BalancePrin. OutstandingInterest OutstandingPenal Interest OutstandingNPA Interest Outstanding
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(9)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%>
+ <%} else if (searchString1.equalsIgnoreCase("R")) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Account No.Customer NoAvailable BalanceNumber of Installments PaidInstallment AmountCustomer Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%>
+ <%} + } + } else if (screenName.equalsIgnoreCase("DepositTransferOperation.jsp") && (lovKey.equalsIgnoreCase("glAccountCashInHand"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No GL A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account No.Ledger NameGL CodeGL Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(5)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("DepositKYCCreation.jsp")) && (lovKey.equalsIgnoreCase("IDTypeScoreSearch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
ID No.Proof of Identity.Score
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} else if (screenName.equalsIgnoreCase("DepositKYCInquiry.jsp") && (lovKey.equalsIgnoreCase("PickUPCustomer"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
CIF NumberNameCustomer TypeAddress1Address2Address3Guardian Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%>
+ + <%} + } else if ((screenName.equalsIgnoreCase("DepositKYCInquiry.jsp")) && (lovKey.equalsIgnoreCase("IDTypeScoreSearch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
ID No.Proof of Identity.Score
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ + <%} else if ((screenName.equalsIgnoreCase("DepositMiscellaneousOperation.jsp")) && (lovKey.equalsIgnoreCase("DepositAccLOB"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No A/C found! Close this window & Please recheck the input provided.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
Account No.Customer NameCustomer No.ProductPhotoSignature
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%><% if ((resultSet.getString(6) == null) || resultSet.getString(6).isEmpty()) {%><%} else {%> <%}%><% if ((resultSet.getString(7) == null) || resultSet.getString(7).isEmpty()) {%>No Siganture Found<%} else {%> <%}%>
+ + <%} + } else if (screenName.equalsIgnoreCase("DepositKYCDocumentUpload.jsp") && (lovKey.equalsIgnoreCase("PickUPCustomer"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
CIF NumberNameCustomer TypeAddress1Address2Address3
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%>
+ + <%} else if (screenName.equalsIgnoreCase("DepositRateSlab.jsp") && (lovKey.equalsIgnoreCase("PickUPProduct"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Product found! Close this window & Please recheck the input provided.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Product CodeProduct Code DescriptionInterest CategoryInterest Category Description
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ + <%} + } else if (screenName.equalsIgnoreCase("DepositRateSlab.jsp") && (lovKey.equalsIgnoreCase("PickUPProductAmend"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Product found! Close this window & Please recheck the input provided.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Product CodeProduct Code DescriptionInterest CategoryInterest Category Description
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ + <%} + } else if (screenName.equalsIgnoreCase("DepositRateSlab.jsp") && (lovKey.equalsIgnoreCase("PickUPProductAmend2"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Product found! Close this window & Please recheck the input provided.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Product CodeProduct Code DescriptionInterest CategoryInterest Category Description
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ + <%} + } else if ((screenName.equalsIgnoreCase("TDOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Deposit A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + <%if (tranType.equalsIgnoreCase("R")) {%> + + <%} else if (tranType.equalsIgnoreCase("D")) {%> + + <%} else if (tranType.equalsIgnoreCase("TDCert")) {%> + + <%} else {%> + + <%}%> + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + <%if (tranType.equalsIgnoreCase("R")) {%> + + + + + + + + + + + <%} else if (tranType.equalsIgnoreCase("TDCert")) {%> + + + + + + + + + + + + <%} else {%> + + + + + + + + + + + <%}%> + <%}%> +
Account No.Customer NumberCustomer NameGuardian NameAvailable BalanceInterest RateInterest Outstanding
Account No.Customer NameCustomer NumberProduct NameInterest CategoryTerm ValueInterestStatus
Account No.ProductCustomer NameCustomer No.Account Type
Account No.Customer NameCustomer No.ProductInterest Category<%if (tranType.equalsIgnoreCase("P")) {%>Transaction Amount<%} else {%>Available Balance<%}%>Capitalized InterestStatus
<%=resultSet.getString(2)%><%=resultSet.getString(8)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(3)%><%=resultSet.getString(1)%><%=resultSet.getString(7)%>
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ opener.document.transactionForm.prinAmt.value = document.getElementById('c<%=i%>').innerHTML; + opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML; + opener.document.transactionForm.inttAmount.value = document.getElementById('d<%=i%>').innerHTML; + opener.document.transactionForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + opener.document.transactionForm.intAdjAmt.value ='0'; + <%} else if (tranType.equalsIgnoreCase("P")) {%> + opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + opener.document.transactionForm.intAdjAmt.value ='0'; + opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML; + <%} else if (tranType.equalsIgnoreCase("D")) {%> + opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + <%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%> + opener.document.transactionForm.prinAmt.value = document.getElementById('c<%=i%>').innerHTML; + opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML; + opener.document.transactionForm.inttAmount.value = document.getElementById('d<%=i%>').innerHTML; + opener.document.transactionForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + opener.document.transactionForm.intAdjAmt.value ='0'; + <%} else if (tranType.equalsIgnoreCase("P")) {%> + opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + opener.document.transactionForm.intAdjAmt.value ='0'; + opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML; + <%} else if (tranType.equalsIgnoreCase("D")) {%> + opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + <%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%> + opener.document.transactionForm.prinAmt.value = document.getElementById('c<%=i%>').innerHTML; + opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML; + opener.document.transactionForm.inttAmount.value = document.getElementById('d<%=i%>').innerHTML; + opener.document.transactionForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + opener.document.transactionForm.intAdjAmt.value ='0'; + <%} else if (tranType.equalsIgnoreCase("P")) {%> + opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + opener.document.transactionForm.intAdjAmt.value ='0'; + opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML; + <%} else if (tranType.equalsIgnoreCase("D")) {%> + opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + <%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%> + opener.document.transactionForm.prinAmt.value = document.getElementById('c<%=i%>').innerHTML; + opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML; + opener.document.transactionForm.inttAmount.value = document.getElementById('d<%=i%>').innerHTML; + opener.document.transactionForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + opener.document.transactionForm.intAdjAmt.value ='0'; + <%} else if (tranType.equalsIgnoreCase("P")) {%> + opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + opener.document.transactionForm.intAdjAmt.value ='0'; + opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML; + <%} else if (tranType.equalsIgnoreCase("D")) {%> + opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + <%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%> + opener.document.transactionForm.prinAmt.value = document.getElementById('c<%=i%>').innerHTML; + opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML; + opener.document.transactionForm.inttAmount.value = document.getElementById('d<%=i%>').innerHTML; + opener.document.transactionForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + opener.document.transactionForm.intAdjAmt.value ='0'; + <%} else if (tranType.equalsIgnoreCase("P")) {%> + opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + opener.document.transactionForm.intAdjAmt.value ='0'; + opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML; + <%} else if (tranType.equalsIgnoreCase("D")) {%> + opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + <%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%> + opener.document.transactionForm.prinAmt.value = document.getElementById('c<%=i%>').innerHTML; + opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML; + opener.document.transactionForm.inttAmount.value = document.getElementById('d<%=i%>').innerHTML; + opener.document.transactionForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + opener.document.transactionForm.intAdjAmt.value ='0'; + <%} else if (tranType.equalsIgnoreCase("P")) {%> + opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + opener.document.transactionForm.intAdjAmt.value ='0'; + opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML; + <%} else if (tranType.equalsIgnoreCase("D")) {%> + opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + <%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(7)%> + opener.document.transactionForm.prinAmt.value = document.getElementById('c<%=i%>').innerHTML; + opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML; + opener.document.transactionForm.inttAmount.value = document.getElementById('d<%=i%>').innerHTML; + opener.document.transactionForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + opener.document.transactionForm.intAdjAmt.value ='0'; + <%} else if (tranType.equalsIgnoreCase("P")) {%> + opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + opener.document.transactionForm.intAdjAmt.value ='0'; + opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML; + <%} else if (tranType.equalsIgnoreCase("D")) {%> + opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + <%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(8)%> + opener.document.transactionForm.prinAmt.value = document.getElementById('c<%=i%>').innerHTML; + opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML; + opener.document.transactionForm.inttAmount.value = document.getElementById('d<%=i%>').innerHTML; + opener.document.transactionForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + opener.document.transactionForm.intAdjAmt.value ='0'; + <%} else if (tranType.equalsIgnoreCase("P")) {%> + opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + opener.document.transactionForm.intAdjAmt.value ='0'; + opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML; + <%} else if (tranType.equalsIgnoreCase("D")) {%> + opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML); + opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML; + <%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(9)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("AssignToCashDrawer.jsp")) && (lovKey.equalsIgnoreCase("PopupTellers"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Teller found! Close this window & Please recheck the input provided.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
Teller IDTeller Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("SavingsAccSearch"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No A/C found! Close this window and Please recheck the input provided.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
Account No.Customer NameProduct Description
<%=resultSet.getString(1)%><%=resultSet.getString(3)%><%=resultSet.getString(2)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("CashDrawerEnquiry.jsp")) && (lovKey.equalsIgnoreCase("PopupTellers"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Teller found! Close this window and Please recheck the input provided.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
Teller IDTeller Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("TDOperation.jsp")) && (lovKey.equalsIgnoreCase("SavingsAccSearchTransfer"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Savings A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
A/C NO.CIF No.Customer NameProductInt Cat DescAvailable Balance
<%=resultSet.getString(2)%><%=resultSet.getString(1)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%> : <%=resultSet.getString(5)%><%=resultSet.getString(6)%> : <%=resultSet.getString(7)%><%=resultSet.getString(8)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Deposit A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
Account No.Customer NameCustomer No.Product DetailsInterest CategoryAvailable Balance
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%><%=resultSet.getString(8)%>
+ + <%} + } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("glAccount"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No GL A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account No.Ledger NameGl Code
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount1"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Deposit A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
Account No.Customer NameCustomer No.Product DetailsInterest CategoryAvailable Balance
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%><%=resultSet.getString(8)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("LoanAccountCreation1.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Deposit A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
Account No.Customer NameCustomer No.Product DetailsInterest CategoryAvailable Balance
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%><%=resultSet.getString(8)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("glAccount1"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No GL A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account No.Ledger NameGl Code
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount2"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Deposit A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
Account No.Customer NameCustomer No.Product DetailsInterest DetailsAvailable Balance
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%><%=resultSet.getString(8)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("shareOperations.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Savings A/C found tagged to this Share account! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
Account No.Customer NameCustomer No.Product DetailsInterest Details
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%>
+ + <%} + } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("glAccount2"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No GL A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account No.Ledger NameGl Code
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("DepositTransferClosure.jsp")) && (lovKey.equalsIgnoreCase("depositAccount2"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Savings A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
Account No.Customer NameCustomer No.Product DetailsInterest DetailsAvailable Balance
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%><%=resultSet.getString(8)%>
+ + <%} + } else if ((screenName.equalsIgnoreCase("DepositTransactionOperation.jsp")) && (lovKey.equalsIgnoreCase("depositShgMember"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No A/C found! Close this window & Please retry!.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + <%}%> +
Member IDMember Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ + <%} + } else if ((screenName.equalsIgnoreCase("shareOperations.jsp")) && (lovKey.equalsIgnoreCase("shareAccount"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Savings A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + <%}%> +
Account No.Customer NameCustomer No.Membership No.Product Code.Share Class.Share Value
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("dividendpayout.jsp")) && (lovKey.equalsIgnoreCase("shareAccount"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Share A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + + + <%}%> +
Account No.Customer NameCustomer No.Membership No.Product CodeProduct DescriptionShare ValueAvailable BalanceDivident PercentageDivident Amount
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%><%=resultSet.getString(9)%><%=resultSet.getString(10)%>
+ + <%} + } else if ((screenName.equalsIgnoreCase("DepositTransferClosure.jsp")) && (lovKey.equalsIgnoreCase("depositAccount1"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Savings A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
Account No.Customer NameCustomer No.ProductInterest CategoryAvailable BalanceInterest Outstanding
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%><%=resultSet.getString(8)%><%=resultSet.getString(9)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("DepositTransferClosure.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Savings A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
Account No.Customer NameCustomer No.ProductInterest CategoryAvailable BalanceInterest Outstanding
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%><%=resultSet.getString(8)%><%=resultSet.getString(9)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("RDOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + <% if(tranType.equalsIgnoreCase("D")) {%> + + <%} else {%> <%if (tranType.equalsIgnoreCase("P")) {%><%}%> <%}%> + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <% if (tranType.equalsIgnoreCase("D")) {%> + + + + <%}%> + + <%}%> +
Account No.Customer NameCustomer No.ProductInterest CategoryInstallment AmountNo of Installment PaidNextDueDateTheoretical Installment No
Account No.Customer NameCustomer No.ProductInterest CategoryInstallment AmountPre-Close Amount
opener.document.transactionForm.txnamt.value = document.getElementById('matvalue<%=i%>').innerHTML;opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%} else {%> + opener.document.transactionForm.matVal.value = document.getElementById('matvalue<%=i%>').innerHTML; + opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%>opener.document.transactionForm.txnamt.value = document.getElementById('matvalue<%=i%>').innerHTML;opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%} else {%> + opener.document.transactionForm.matVal.value = document.getElementById('matvalue<%=i%>').innerHTML; + opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%>opener.document.transactionForm.txnamt.value = document.getElementById('matvalue<%=i%>').innerHTML;opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%} else {%> + opener.document.transactionForm.matVal.value = document.getElementById('matvalue<%=i%>').innerHTML; + opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%>opener.document.transactionForm.txnamt.value = document.getElementById('matvalue<%=i%>').innerHTML;opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%} else {%> + opener.document.transactionForm.matVal.value = document.getElementById('matvalue<%=i%>').innerHTML; + opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%>opener.document.transactionForm.txnamt.value = document.getElementById('matvalue<%=i%>').innerHTML;opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%} else {%> + opener.document.transactionForm.matVal.value = document.getElementById('matvalue<%=i%>').innerHTML; + opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%>opener.document.transactionForm.txnamt.value = document.getElementById('matvalue<%=i%>').innerHTML;opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%} else {%> + opener.document.transactionForm.matVal.value = document.getElementById('matvalue<%=i%>').innerHTML; + opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(7)%>opener.document.transactionForm.txnamt.value = document.getElementById('matvalue<%=i%>').innerHTML;opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%} else {%> + opener.document.transactionForm.matVal.value = document.getElementById('matvalue<%=i%>').innerHTML; + opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%}%> + self.close();" <%if (!tranType.equalsIgnoreCase("P")) {%>style="cursor:pointer; display: none"<%}%>><%=resultSet.getString(8)%><%=resultSet.getString(10)%><%=resultSet.getString(12)%><%=resultSet.getString(11)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("RDOperation.jsp")) && (lovKey.equalsIgnoreCase("SavingsAccSearchTransfer"))) {%> + + <%if (!resultSet.isBeforeFirst()) {%> +

No savings a/c found for this customer

+
<%} else {%> + + + <%int i = 0; + + while (resultSet.next()) { + + i++; + + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Account No.Customer NameCustomer No.ProductInterest CategoryAvailable Balance
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CalcMaturity"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No rate slab defined for this installment amount and term length

+           +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
Interest RateMaturity Amount
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CalcFDMaturity"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No rate slab defined for this term value and term length

+           +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
Interest RateMaturity Amount
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("RDRateSlab"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No rate slab defined for RD

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Interest RateFrom Term MonthTo Term MonthFrom Installment AmountTo Installment AmountProduct Desc
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%>:<%=resultSet.getString(8)%>
+
+
+ <%} + } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("FDRateSlab"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No rate slab defined for FD

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Interest RateFrom Term DaysTo Term DaysFrom AmountTo AmountProduct Desc
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%>:<%=resultSet.getString(8)%>
+
+
+ <%} + } else if (screenName.equalsIgnoreCase("ProductCreation.jsp") && (lovKey.equalsIgnoreCase("ParameterPdAmend"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Product CodeProduct DescriptionInterest CategoryInterest Description
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ <%} + } else if (screenName.equalsIgnoreCase("ProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAYABLESearchLOVKey"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
GL CodeGL DescriptionID
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} + } else if (screenName.equalsIgnoreCase("ProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAIDSearchLOVKey"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
GL CodeGL DescriptionID
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} + } else if (screenName.equalsIgnoreCase("ProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAYABLESearchLOVKeyAmend"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
GL CodeGL DescriptionID
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} + } else if (screenName.equalsIgnoreCase("ProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAIDSearchLOVKeyAmend"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
GL CodeGL DescriptionID
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("transactionOperation.jsp")) && (lovKey.equalsIgnoreCase("SavingsAccSearchTransfer"))) {%> + + <%if (!resultSet.isBeforeFirst()) {%> +

No savings a/c found for this customer

+
<%} else {%> + + + <%int i = 0; + + while (resultSet.next()) { + + i++; + + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Account No.Customer NameCustomer No.ProductInterest CategoryAvailable Balance
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("shareaccounttransaction.jsp")) && (lovKey.equalsIgnoreCase("SavingsAccSearchTransfer"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Savings A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
A/C NO.CIF No.Customer NameProductInt Cat DescAvailable Balance
<%=resultSet.getString(2)%><%=resultSet.getString(1)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%> : <%=resultSet.getString(5)%><%=resultSet.getString(6)%> : <%=resultSet.getString(7)%><%=resultSet.getString(8)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("DepositMiscellaneousOperation.jsp")) && (lovKey.equalsIgnoreCase("SecondCifLOB") ||lovKey.equalsIgnoreCase("nomineeLov"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No CIF found! Close this window & Please Try Again.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + } + + if(lovKey.equalsIgnoreCase("SecondCifLOB")){%> + + + + + + <%}else if(lovKey.equalsIgnoreCase("nomineeLov")){%> + + + + + + <%} + }%> +
CIF NOCustomer NameGurdian Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ + + <%} + }else if ((screenName.equalsIgnoreCase("CashWidrawlDeposit.jsp")) && (lovKey.equalsIgnoreCase("ddsCash"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Account found! Close this window & Please Try Again.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
Account NoCustomer NameAvailable BalanceAccount Type
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString("acctype")%>
+ + <%}%> + <%}%> + + + + +
+ + <% + } catch (Exception ex) { + // System.out.println(ex); + } finally { + if (resultSet != null) { + resultSet.close(); + } + if (pstmt != null) { + pstmt.close(); + } + if (conn != null) { + conn.close(); + } + } + %> + + \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/CommonSearchInformationLOV.jsp b/IPKS_Updated/web/web/web/CommonSearchInformationLOV.jsp new file mode 100644 index 0000000..06543d2 --- /dev/null +++ b/IPKS_Updated/web/web/web/CommonSearchInformationLOV.jsp @@ -0,0 +1,2243 @@ +<%-- + Document : CommonSearchInformationLOV + Created on : Mar 10, 2016, 2:30:36 AM + Modified on : Jan 9,2024,12:20:45 PM + +--%> + +<%@page import="java.sql.PreparedStatement"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> + + + + + + Common Information Search + + + + + + + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankNA(String s) { + return (s == null) ? "NA" : s; + } + %> + <% + String searchString1 = ""; + String screenName = ""; + String searchString2 = ""; + String lovKey = ""; + String choice=""; + String tranType=""; + + choice= request.getParameter("choice"); + screenName = request.getParameter("screenName"); + lovKey = request.getParameter("lovKey"); + String pacsId = session.getAttribute("pacsId").toString(); + String index = null; + + String headerQry = null; + + if ((screenName.equalsIgnoreCase("accountCreation.jsp")) && (lovKey.equalsIgnoreCase("CifDetails"))) { + + // searchString1 = request.getParameter("cifNumber"); + + headerQry = "select cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,nvl(linked_sb_accno,'NA'),nvl(customer_type,' '),address_1,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,''),nvl(t.GUARDIAN_NAME,'NA') from kyc_details t" + + " where t.cif_no = (select cif_no from kyc_hdr kd where kd.cif_no = '" + searchString1.replace(' ', '%') + "' and kd.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = (select m.head_pacs_id " + +" from pacs_master m where m.pacs_id = '" + pacsId + "')))"; + + } else if (screenName.equalsIgnoreCase("customerEnquiry.jsp")) { + + // searchString1 = request.getParameter("cifNumber"); + //searchString2 = request.getParameter("cifName"); + + if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,(select nvl(s.linked_sb_accno,'NA') from kyc_details s where s.cif_no=t.cif_no) linked_sb_accno,customer_type,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,' ') , GUARDIAN_NAME from kyc_hdr t where t.cif_no='1' and t.pacs_id='" + pacsId + "'||'%'"; + + + } else if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select cif_no, (t.first_name || nvl2(t.middle_name, ' ' || t.middle_name, '') || nvl2(t.last_name, ' ' || t.last_name, '')) name, (select nvl(s.linked_sb_accno,'NA') from kyc_details s where s.cif_no=t.cif_no) linked_sb_accno,customer_type,nvl(address_1, ' '),nvl(address_2, ' '),nvl(address_3, ' ') ,GUARDIAN_NAME from kyc_hdr t where t.pacs_id='" + pacsId + "' and upper(trim(first_name)) like upper('" + searchString2.replace(' ', '%') + "%') "; + + + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select cif_no, (t.first_name || nvl2(t.middle_name, ' ' || t.middle_name, '') || nvl2(t.last_name, ' ' || t.last_name, '')) name, (select nvl(s.linked_sb_accno,'NA') from kyc_details s where s.cif_no=t.cif_no) linked_sb_accno, customer_type,nvl(address_1, ' '),nvl(address_2, ' '),nvl(address_3, ' '), GUARDIAN_NAME from kyc_hdr t where t.pacs_id='" + pacsId + "' and t.cif_no like '%" + searchString1.replace(' ', '%') + "%' "; + + + } else { + headerQry = "select cif_no, (t.first_name || nvl2(t.middle_name, ' ' || t.middle_name, '') || nvl2(t.last_name, ' ' || t.last_name, '')) name,(select nvl(s.linked_sb_accno,'NA') from kyc_details s where s.cif_no=t.cif_no) linked_sb_accno, customer_type, nvl(address_1, ' '), nvl(address_2, ' '), nvl(address_3, ' '), GUARDIAN_NAME from kyc_hdr t where t.pacs_id='" + pacsId + "' and ( t.cif_no like '%" + searchString1.replace(' ', '%') + "%' or upper(trim(first_name)) like upper( '" + searchString2.replace(' ', '%') + "%' ))"; + } + + } else if ((screenName.equalsIgnoreCase("accountCreation.jsp")) && (lovKey.equalsIgnoreCase("productCodeSearch"))) { + + searchString1 = request.getParameter("productCodeDetails"); + + headerQry = "select prod_code, prod_desc, int_cat, intt_cat_desc, nvl((select gp.gl_code from gl_product gp where gp.id = GL_ID_INTT_PAYABLE), 'NA') RCVBL_GL, nvl((select gp.gl_code from gl_product gp where gp.id = GL_ID_INTT_PAID), 'NA') RCVBD_GL from dep_product where prod_code='6001' and pacs_id like '%" + pacsId + "#%'"; + + } + else if ((screenName.equalsIgnoreCase("EditServices.jsp")) && (lovKey.equalsIgnoreCase("FetchAccountList"))) { + + // searchString1 = request.getParameter("accNo"); + + headerQry = "select d.key_1,UPPER(k.first_name || ' ' || k.middle_name || ' ' || k.last_name) CUST_NAME,UPPER(k.guardian_name) GURDIAN_NAME,'DEP' ACCOUNT_TYPE from dep_account d, kyc_hdr k where d.customer_no = k.cif_no " + + "and (UPPER(k.first_name) like upper('" + searchString1 + "%') or d.key_1 like '%" + searchString1 + "%') and d.pacs_id = '" + pacsId + "' and substr(d.GL_CLASS_CODE,9,2) in ('14','11','23') and d.curr_status = 'O' Union All " + + "select l.key_1,UPPER(k.first_name || ' ' || k.middle_name || ' ' || k.last_name) CUST_NAME,UPPER(k.guardian_name) GURDIAN_NAME,'LOAN' ACCOUNT_TYPE from loan_account l, kyc_hdr k where l.customer_no = k.cif_no " + + "and (UPPER(k.first_name) like upper('" + searchString1 + "%') or l.key_1 like '%" + searchString1 + "%') and l.pacs_id = '" + pacsId + "' and substr(l.GL_CLASS_CODE,9,2)='23' and l.curr_status in ('02', '03')"; + } + else if ((screenName.equalsIgnoreCase("AdhocReport.jsp")) && (lovKey.equalsIgnoreCase("reportSearch"))) { + + //searchString1 = request.getParameter("reportId"); + + headerQry = "select report_id,report_name from pacs_adhoc_report where report_id like '%" + searchString1.replace(' ', '%') + "%' "; + + } else if ((screenName.equalsIgnoreCase("transactionOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) { + + // searchString1 = request.getParameter("accNo"); + + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,k.guardian_name,t.link_accno,nvl(t.avail_bal,0),nvl(t.prin_outst,0), (case p.int_method " + +" when 'S' then nvl(t.intt_outst, 0) else 0 end), (case p.int_method when 'S' then nvl(t.penal_intt_outst, 0) " + +" else 0 end), (case p.int_method when 'S' then nvl(t.npa_intt_outst, 0) else 0 " + +" end),nvl(t.sanction_amt,0),nvl(to_char(t.acct_open_dt,'YYYY-MM-DD'),'NA'),nvl(t.old_accno,0),nvl(t.limit,0),((case p.int_method " + +" when 'S' then nvl(t.intt_outst, 0) else 0 end)+ (case p.int_method when 'S' then nvl(t.penal_intt_outst, 0) else 0 end)+(case p.int_method when 'S' then " + +" (nvl(t.npa_intt_outst, 0)) else 0 end)) int_oust,(select max(d.key_1) from dep_account d,dep_product dp where d.dep_prod_id=dp.id and dp.prod_code='1017' and d.pacs_id= '" + pacsId + "' and d.customer_no =t.customer_no and substr(d.GL_CLASS_CODE,9,2)='11' ) share_ac_no, 1 prod_count, round(t.prin_outst+round((intt_outst+penal_intt_outst+npa_intt_outst),2)) total_outst " + +" from dep_account t,kyc_details k,dep_product p where p.ID = t.DEP_PROD_ID and k.cif_no=t.customer_no and /*t.link_accno=k.linked_sb_accno and*/ p.prod_code='6001' and substr(t.GL_CLASS_CODE,9,2)='23' and t.curr_status <>'C' and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name) like upper ('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id= '" + pacsId + "' "; + + //System.out.println(headerQry); + } else if ((screenName.equalsIgnoreCase("accountRenewal.jsp")) && (lovKey.equalsIgnoreCase("renewalAccNumberSearch"))) { + + // searchString1 = request.getParameter("cifNumber"); + //searchString2 = request.getParameter("ccAccountNo"); + + if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select a.customer_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,a.key_1, nvl(a.link_accno,'NA') " + + " from dep_account a,kyc_details t where a.customer_no=t.cif_no and a.curr_status!='O' and substr(a.GL_CLASS_CODE,9,2)='23' and a.pacs_id= '" + pacsId + "' " + + " and a.key_1 in (select d.key_1 from dep_account d where d.pacs_id='" + pacsId + "' and d.dep_prod_id in (select p.id from dep_product p where p.prod_code = '6001') and substr(d.GL_CLASS_CODE,9,2)='23')"; + } else if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select a.customer_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,a.key_1, nvl(a.link_accno,'NA') " + + " from dep_account a,kyc_details t where a.customer_no=t.cif_no and a.curr_status!='O' and substr(a.GL_CLASS_CODE,9,2)='23' and a.pacs_id= '" + pacsId + "' and a.key_1 in (select d.key_1 from dep_account d" + + " where d.pacs_id='" + pacsId + "' and d.dep_prod_id in (select p.id from dep_product p where p.prod_code = '6001') and substr(d.GL_CLASS_CODE,9,2)='23' ) and a.key_1 like '%" + searchString2.replace(' ', '%') + "%' "; + + + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select a.customer_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,a.key_1,nvl(a.link_accno,'NA') " + + " from dep_account a,kyc_details t where a.customer_no=t.cif_no and a.curr_status!='O' and a.pacs_id= '" + pacsId + "' and substr(a.GL_CLASS_CODE,9,2)='23' and a.key_1 in (select d.key_1 from dep_account d" + + " where d.pacs_id='" + pacsId + "' and d.dep_prod_id in (select p.id from dep_product p where p.prod_code = '6001') and substr(d.GL_CLASS_CODE,9,2)='23' ) and a.customer_no like '%" + searchString1.replace(' ', '%') + "%' "; + } else { + headerQry = "select a.customer_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,a.key_1, nvl(a.link_accno,'NA') " + + " from dep_account a,kyc_details t where a.customer_no=t.cif_no and a.curr_status!='O' and a.pacs_id= '" + pacsId + "' and substr(a.GL_CLASS_CODE,9,2)='23' and a.key_1 in(select d.key_1 from dep_account d" + + " where d.pacs_id='" + pacsId + "' and d.dep_prod_id in (select p.id from dep_product p where p.prod_code = '6001') and substr(d.GL_CLASS_CODE,9,2)='23' ) and a.key_1 like '%" + searchString2.replace(' ', '%') + "%' and a.customer_no like '%" + searchString1.replace(' ', '%') + "%' "; + } + + } else if ((screenName.equalsIgnoreCase("mark_unmark_NPA_Operations.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) { + + // searchString1 = request.getParameter("accNo"); + + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,nvl(t.link_accno,'NA') link_accno " + + " from dep_account t,kyc_details k where k.cif_no=t.customer_no and t.curr_status='O' and substr(t.GL_CLASS_CODE,9,2)='23' and t.dep_prod_id in (select p.id from dep_product p where p.prod_code = '6001') and t.key_1 like '%" + searchString1.replace(' ', '%') + "%' and t.pacs_id= '" + pacsId + "' "; + + } else if (screenName.equalsIgnoreCase("pacsProductOperation.jsp") && (lovKey.equalsIgnoreCase("ParameterPdAmend"))) { + + //searchString1 = request.getParameter("productcodeSearch"); + // searchString2 = request.getParameter("intcatSearch"); + + if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select dp.prod_code,dp.prod_desc,dp.int_cat,dp.intt_cat_desc from dep_product dp where dp.prod_code='6001' "; + } else if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select dp.prod_code,dp.prod_desc,dp.int_cat,dp.intt_cat_desc from dep_product dp where dp.prod_code='6001' and dp.int_cat like '%" + searchString2.replace(' ', '%') + "%'"; + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select dp.prod_code,dp.prod_desc,dp.int_cat,dp.intt_cat_desc from dep_product dp where dp.prod_code='6001' and dp.prod_code like '%" + searchString1.replace(' ', '%') + "%'"; + } else { + headerQry = "select dp.prod_code,dp.prod_desc,dp.int_cat,dp.intt_cat_desc from dep_product dp where dp.prod_code='6001' and dp.prod_code like '%" + searchString1.replace(' ', '%') + "%' and dp.int_cat like '%" + searchString2.replace(' ', '%') + "%'"; + } + + } else if ((screenName.equalsIgnoreCase("StandingInstructionCreation.jsp")) && (lovKey.equalsIgnoreCase("SIAccFroms"))) { + + //searchString1 = request.getParameter("fromAcc"); + //searchString2 = request.getParameter("moduleName"); + + if (searchString1.equalsIgnoreCase("")) { + headerQry = "select a.key_1,k.cif_no,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),p.prod_code,p.prod_desc from dep_account a,dep_product p,kyc_hdr k where a.dep_prod_id = p.id and a.customer_no = k.cif_no and p.prod_code in ('1102','1101') and substr(a.GL_CLASS_CODE,9,2)='14' and a.curr_status = 'O' and a.pacs_id in (select pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master where pacs_id = '" + pacsId + "')) "; + } else if (!searchString1.equalsIgnoreCase("")) { + headerQry = "select a.key_1,k.cif_no,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),p.prod_code,p.prod_desc from dep_account a,dep_product p,kyc_hdr k where a.dep_prod_id = p.id and a.customer_no = k.cif_no and p.prod_code in ('1102','1101') and substr(a.GL_CLASS_CODE,9,2)='14' and a.curr_status = 'O' and a.key_1 like '%" + searchString1.replace(' ', '%') + "%' and a.pacs_id in (select pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master where pacs_id = '" + pacsId + "')) "; + } else { + } + + } else if ((screenName.equalsIgnoreCase("StandingInstructionCreation.jsp")) && (lovKey.equalsIgnoreCase("SIAccTos"))) { + + // searchString1 = request.getParameter("toAcc"); + searchString2 = request.getParameter("opsType"); + + if (searchString2.equalsIgnoreCase("s2s")) { + headerQry = "select a.key_1,k.cif_no,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),p.prod_code,p.prod_desc from dep_account a,dep_product p,kyc_hdr k where a.dep_prod_id = p.id and a.customer_no = k.cif_no and a.curr_status='O' and p.prod_code in ('1101','1102') and substr(a.GL_CLASS_CODE,9,2)='14' and a.key_1 like '%" + searchString1.replace(' ', '%') + "%' and a.pacs_id in (select pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master where pacs_id = '" + pacsId + "')) "; + } else if (searchString2.equalsIgnoreCase("s2r")) { + headerQry = "select a.key_1,k.cif_no,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),p.prod_code,p.prod_desc,a.INSTALL_AMT from dep_account a,dep_product p,kyc_hdr k where a.dep_prod_id = p.id and a.customer_no = k.cif_no and a.curr_status='O' and p.prod_code ='3001' and substr(p.int_cat,1,1) = '1' and substr(a.GL_CLASS_CODE,9,2)='14' and a.key_1 like '%" + searchString1.replace(' ', '%') + "%' and a.pacs_id in (select pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master where pacs_id = '" + pacsId + "')) "; + } else if (searchString2.equalsIgnoreCase("s2l")) { + headerQry = "select a.key_1,k.cif_no,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),p.prod_code,p.prod_desc from loan_account a,loan_product p,kyc_hdr k where a.loan_prod_id = p.id and a.customer_no = k.cif_no and a.curr_status not in ('01','04') and substr(a.GL_CLASS_CODE,9,2)='23' and a.key_1 like '%" + searchString1.replace(' ', '%') + "%' and a.pacs_id in (select pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master where pacs_id = '" + pacsId + "')) "; + } + + } else if ((screenName.equalsIgnoreCase("StandingInstructionCreation.jsp")) && (lovKey.equalsIgnoreCase("SIAccFromsSearch"))) { + + // searchString1 = request.getParameter("fromAccSearch"); + searchString2 = request.getParameter("opsTypeSearch"); + + if (searchString2.equalsIgnoreCase("s2s")) { + headerQry = "select distinct s.from_acct, (select d.customer_no from dep_account d where d.key_1=s.from_acct) CIF_NO,(select nvl(trim(e.first_name),' ')||' '|| nvl(trim(e.middle_name),' ')||' '|| nvl(trim(e.last_name),' ') from kyc_hdr e where e.cif_no= (select d.customer_no from dep_account d where d.key_1=s.from_acct)) cust_name, (select p.prod_code from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.from_acct)) prod_code, (select p.prod_name from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.from_acct)) prod_desc from si_details s where s.pacs_id='"+ pacsId +"' and s.operation_type='s2s' and s.from_acct like '%" + searchString1.replace(' ', '%') + "%'"; + } else if (searchString2.equalsIgnoreCase("s2r")) { + headerQry = "select distinct s.from_acct, (select d.customer_no from dep_account d where d.key_1=s.from_acct) CIF_NO, (select nvl(trim(e.first_name),' ')||' '|| nvl(trim(e.middle_name),' ')||' '|| nvl(trim(e.last_name),' ') from kyc_hdr e where e.cif_no= (select d.customer_no from dep_account d where d.key_1=s.from_acct)) cust_name, (select p.prod_code from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.from_acct)) prod_code, (select p.prod_name from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.from_acct)) prod_desc from si_details s where s.pacs_id='"+ pacsId +"' and s.operation_type='s2r' and s.from_acct like '%" + searchString1.replace(' ', '%') + "%'"; + } else if (searchString2.equalsIgnoreCase("s2l")) { + headerQry = "select distinct s.from_acct, (select d.customer_no from dep_account d where d.key_1=s.from_acct) CIF_NO, (select nvl(trim(e.first_name),' ')||' '|| nvl(trim(e.middle_name),' ')||' '|| nvl(trim(e.last_name),' ') from kyc_hdr e where e.cif_no= (select d.customer_no from dep_account d where d.key_1=s.from_acct)) cust_name, (select p.prod_code from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.from_acct)) prod_code, (select p.prod_name from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.from_acct)) prod_desc from si_details s where s.pacs_id='"+ pacsId +"' and s.operation_type='s2l' and s.from_acct like '%" + searchString1.replace(' ', '%') + "%'"; + } + //if (searchString1.equalsIgnoreCase("")) { + // headerQry = "select a.key_1,k.cif_no,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),p.prod_code,p.prod_desc from dep_account a,dep_product p,kyc_hdr k where a.dep_prod_id = p.id and a.customer_no = k.cif_no and p.prod_code in ('1102','1101') and substr(p.int_cat,1,1) = '1' and substr(a.GL_CLASS_CODE,9,2)='14' and a.pacs_id= '" + pacsId + "'"; + // } else if (!searchString1.equalsIgnoreCase("")) { + // headerQry = "select a.key_1,k.cif_no,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),p.prod_code,p.prod_desc from dep_account a,dep_product p,kyc_hdr k where a.dep_prod_id = p.id and a.customer_no = k.cif_no and p.prod_code in ('1102','1101') and substr(p.int_cat,1,1) = '1' and substr(a.GL_CLASS_CODE,9,2)='14' and a.key_1 like '%" + searchString1.replace(' ', '%') + "%' and a.pacs_id= '" + pacsId + "'"; + // } else { + // } + + } else if ((screenName.equalsIgnoreCase("StandingInstructionCreation.jsp")) && (lovKey.equalsIgnoreCase("SIAccTosSearch"))) { + + // searchString1 = request.getParameter("toAccSearch"); + searchString2 = request.getParameter("opsTypeSearch"); + + if (searchString2.equalsIgnoreCase("s2s")) { + headerQry = "select distinct s.to_acct, (select d.customer_no from dep_account d where d.key_1=s.to_acct) CIF_NO, (select nvl(trim(e.first_name),' ')||' '|| nvl(trim(e.middle_name),' ')||' '|| nvl(trim(e.last_name),' ') from kyc_hdr e where e.cif_no= (select d.customer_no from dep_account d where d.key_1=s.to_acct)) cust_name, (select p.prod_code from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.to_acct)) prod_code, (select p.prod_name from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.to_acct)) prod_desc from si_details s where s.pacs_id='" + pacsId + "' and s.operation_type='s2s' and s.to_acct like '%" + searchString1.replace(' ', '%') + "%'"; + } else if (searchString2.equalsIgnoreCase("s2r")) { + headerQry = "select distinct s.to_acct, (select d.customer_no from dep_account d where d.key_1=s.to_acct) CIF_NO, (select nvl(trim(e.first_name),' ')||' '|| nvl(trim(e.middle_name),' ')||' '|| nvl(trim(e.last_name),' ') from kyc_hdr e where e.cif_no= (select d.customer_no from dep_account d where d.key_1=s.to_acct)) cust_name, (select p.prod_code from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.to_acct)) prod_code, (select p.prod_name from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.to_acct)) prod_desc from si_details s where s.pacs_id='" + pacsId + "' and s.operation_type='s2r' and s.to_acct like '%" + searchString1.replace(' ', '%') + "%'"; + } else if (searchString2.equalsIgnoreCase("s2l")) { + headerQry = "select distinct s.to_acct, (select d.customer_no from loan_account d where d.key_1=s.to_acct) CIF_NO, (select nvl(trim(e.first_name),' ')||' '|| nvl(trim(e.middle_name),' ')||' '|| nvl(trim(e.last_name),' ') from kyc_hdr e where e.cif_no= (select d.customer_no from loan_account d where d.key_1=s.to_acct)) cust_name, (select p.prod_code from loan_product p where p.id= (select d.loan_prod_id from loan_account d where d.key_1=s.to_acct)) prod_code, (select p.prod_name from loan_product p where p.id= (select d.loan_prod_id from loan_account d where d.key_1=s.to_acct)) prod_desc from si_details s where s.pacs_id='" + pacsId + "' and s.operation_type='s2l' and s.to_acct like '%" + searchString1.replace(' ', '%') + "%'"; + } + + } else if ((screenName.equalsIgnoreCase("StandingInstructionCreation.jsp")) && (lovKey.equalsIgnoreCase("SIAccSearchDiv"))) { + //searchString1 = request.getParameter("accSearch"); + + if (searchString1.equalsIgnoreCase("")) { + headerQry = "select distinct s.from_acct, (select d.customer_no from dep_account d where d.key_1=s.from_acct) CIF_NO, (select nvl(trim(e.first_name),' ')||' '|| nvl(trim(e.middle_name),' ')||' '|| nvl(trim(e.last_name),' ') from kyc_hdr e where e.cif_no= (select d.customer_no from dep_account d where d.key_1=s.from_acct)) cust_name, (select p.prod_code from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.from_acct)) prod_code, (select p.prod_name from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.from_acct)) prod_desc from si_details s where s.pacs_id='" + pacsId + "' and s.operation_type='s2r'"; + } else if (!searchString1.equalsIgnoreCase("")) { + headerQry = "select distinct s.from_acct, (select d.customer_no from dep_account d where d.key_1=s.from_acct) CIF_NO, (select nvl(trim(e.first_name),' ')||' '|| nvl(trim(e.middle_name),' ')||' '|| nvl(trim(e.last_name),' ') from kyc_hdr e where e.cif_no= (select d.customer_no from dep_account d where d.key_1=s.from_acct)) cust_name, (select p.prod_code from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.from_acct)) prod_code, (select p.prod_name from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.from_acct)) prod_desc from si_details s where s.pacs_id='" + pacsId + "' and s.operation_type='s2r' and s.from_acct like '%" + searchString1.replace(' ', '%') + "%'"; + } else { + } + + } + else if (screenName.equalsIgnoreCase("pacsProductOperation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAYABLESearchLOVKey"))) { + + //searchString1 = request.getParameter("acc_gl_to_cash"); + + headerQry = "select gl_code,gl_name,id from gl_product"; + } else if (screenName.equalsIgnoreCase("pacsProductOperation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAYABLESearchLOVKeyAmend"))) { + + //searchString1 = request.getParameter("acc_gl_to_cash"); + + headerQry = "select gl_code,gl_name,id from gl_product"; + } else if (screenName.equalsIgnoreCase("pacsProductOperation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAIDSearchLOVKey"))) { + + //searchString1 = request.getParameter("acc_gl_to_cash"); + + headerQry = "select gl_code,gl_name,id from gl_product"; + } else if (screenName.equalsIgnoreCase("pacsProductOperation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAIDSearchLOVKeyAmend"))) { + + //searchString1 = request.getParameter("acc_gl_to_cash"); + + headerQry = "select gl_code,gl_name,id from gl_product"; + } else if ((screenName.equalsIgnoreCase("glAccountEnquiry.jsp")) && (lovKey.equalsIgnoreCase("PopupGlAcc"))) { + + // searchString1 = request.getParameter("prodName"); + + headerQry = "select gp.gl_code,gp.gl_desc, gp.gl_name,gp.id from gl_product gp where (upper(gp.gl_name) like upper('%" + searchString1 + "%') or upper(gp.gl_desc) like upper('%" + searchString1 + "%') or gp.gl_code like '%" + searchString1 + "%')"; + + } else if ((screenName.equalsIgnoreCase("glTransactionEnquiry.jsp")) && (lovKey.equalsIgnoreCase("PopupGlAcc"))) { + + // searchString1 = request.getParameter("prodName"); + + headerQry = "select gp.gl_code,gp.gl_desc, gp.gl_name,gp.id from gl_product gp where (upper(gp.gl_name) like upper('%" + searchString1 + "%') or upper(gp.gl_desc) like upper('%" + searchString1 + "%') or gp.gl_code like '%" + searchString1 + "%')"; + + } else if ((screenName.equalsIgnoreCase("AccountAmendment.jsp")) && (lovKey.equalsIgnoreCase("accNoSrch"))) { + + // searchString1 = request.getParameter("accNo"); + + headerQry = "select da.key_1 as account_no,da.customer_no as cif,kh.first_name||' '||kh.middle_name||' '||kh.last_name as customer_name,dp.prod_name as product_type,NVL(da.int_trf_accno,'NA') as transfer_acc_no from dep_account da join kyc_hdr kh on da.customer_no=kh.cif_no join dep_product dp on da.dep_prod_id =dp.id" + + " where da.pacs_id= '" + pacsId + "' and da.key_1 = '" + searchString1.replace(' ', '%') + "' "; + + } else if ((screenName.equalsIgnoreCase("AccountAmendment.jsp")) && (lovKey.equalsIgnoreCase("newCifNoSrch"))) { + + // searchString1 = request.getParameter("newCifNo"); + + headerQry = "select kh.cif_no,kh.first_name||' '||kh.middle_name||' '||kh.last_name as customer_name from kyc_hdr kh" + + " where kh.pacs_id= '" + pacsId + "' and kh.cif_no = '" + searchString1.replace(' ', '%') + "' "; + + } else if ((screenName.equalsIgnoreCase("AccountAmendment.jsp")) && (lovKey.equalsIgnoreCase("custName1Srch"))) { + + // searchString1 = request.getParameter("custName1"); + + headerQry = "select kh.cif_no as cif,kh.first_name||' '||kh.middle_name||' '||kh.last_name as customer_name,kh.guardian_name as guardian,kh.address_1 || ',' || kh.address_2 || ',' || kh.address_3 || ',' || kh.district || ',' || kh.city || ',' || kh.state as address from kyc_hdr kh " + + " where kh.pacs_id= '" + pacsId + "' and kh.first_name like '" + searchString1.replace(' ', '%') + "%'"; + + } else if ((screenName.equalsIgnoreCase("AccountAmendment.jsp")) && (lovKey.equalsIgnoreCase("newTransferAccNoSrch"))) { + + // searchString1 = request.getParameter("newTransferAccNo"); + + headerQry = "select da.key_1 as account_no,dp.prod_name as account_type,kh.first_name||' '||kh.middle_name||' '||kh.last_name as customer_name from dep_account da join kyc_hdr kh on da.customer_no=kh.cif_no join dep_product dp on da.dep_prod_id=dp.id" + + " where da.pacs_id= '" + pacsId + "' and da.key_1 = '" + searchString1.replace(' ', '%') + "' "; + + } else if ((screenName.equalsIgnoreCase("TransactionAuthorization.jsp")) && (lovKey.equalsIgnoreCase("custDetails"))) { + + //searchString1 = request.getParameter("cust_no"); + + headerQry = "select 'CUST', k.cif_no,(k.first_name||' '||k.middle_name||' '||k.last_name) cust_name,k.guardian_name,k.photo_path,k.sig_photo from kyc_hdr k where k.cif_no = '" + + searchString1.replace(' ', '%') + "' union select 'GL',ga.key_1,ga.ledger_name,ga.ledger_desc,null,null from gl_account ga where ga.pacs_id= '" + pacsId + "' and ga.key_1 = '" + searchString1.replace(' ', '%') + "' "; + + } else if ((screenName.equalsIgnoreCase("TransactionAuthorization.jsp")) && (lovKey.equalsIgnoreCase("accDetails1"))) { + + // searchString1 = request.getParameter("account_no"); + // searchString2 = request.getParameter("tranInd"); + headerQry = "select 'DEPOSIT' acct_type, da.key_1 accNo, (dp.prod_code || ':' || dp.int_cat || ' ' || dp.prod_name) product, (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) custName, trim(da.acct_open_dt) accOpenDt, da.avail_bal availBal, nvl(da.intt_outst, 0) intOust, nvl(da.intt_cap_amt, 0) intCapAmt, (case when '" + searchString2 + "' = 'CR' then 'To be CREDITED' when '" + searchString2 + "' = 'DR' then 'To be DEBITED' end) Remark, k.sig_photo custSign, k.photo_path custPhoto, nvl((select ki.first_name || ' ' || nvl2(ki.middle_name, ' ' || ki.middle_name, '') || nvl2(ki.last_name, ' ' || ki.last_name, '') from kyc_hdr ki where ki.cif_no = da.cif_no2), 'NA') custName2, (select ki.sig_photo from kyc_hdr ki where ki.cif_no = da.cif_no2) custSign2, (select ki.photo_path from kyc_hdr ki where ki.cif_no = da.cif_no2) custPhoto2, nvl((select ki.first_name || ' ' || nvl2(ki.middle_name, ' ' || ki.middle_name, '') || nvl2(ki.last_name, ' ' || ki.last_name, '') from kyc_hdr ki where ki.cif_no = da.cif_no3), 'NA') custName3, (select ki.sig_photo from kyc_hdr ki where ki.cif_no = da.cif_no3) custSign3, (select ki.photo_path from kyc_hdr ki where ki.cif_no = da.cif_no3) custPhoto3, nvl((select ki.first_name || ' ' || nvl2(ki.middle_name, ' ' || ki.middle_name, '') || nvl2(ki.last_name, ' ' || ki.last_name, '') from kyc_hdr ki where ki.cif_no = da.cif_no4), 'NA') custName4, (select ki.sig_photo from kyc_hdr ki where ki.cif_no = da.cif_no4) custSign4, (select ki.photo_path from kyc_hdr ki where ki.cif_no = da.cif_no4) custPhoto4, nvl((select u.mop_name from acc_mop_map u where u.mop_code = da.mop), 'NA') mop from dep_account da, dep_product dp, kyc_hdr k where da.dep_prod_id = dp.id and da.customer_no = k.cif_no and da.key_1 = '" + searchString1.replace(' ', '%') + "' and dp.prod_code <>'6001' union select 'KCC' acct_type, da.key_1 accNo, (dp.prod_code || ':' || dp.int_cat || ' ' || dp.prod_name) product, (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) custName, trim(da.acct_open_dt) accOpenDt, da.prin_outst prinOust, nvl(da.intt_outst, 0) intOust, nvl(da.penal_intt_outst, 0) penalOust, (case when '" + searchString2 + "' = 'CR' then 'To be CREDITED' when '" + searchString2 + "' = 'DR' then 'To be DEBITED' end) Remark, k.sig_photo custSign, k.photo_path custPhoto, " + +" nvl((select ki.first_name || ' ' || nvl2(ki.middle_name, ' ' || ki.middle_name, '') || nvl2(ki.last_name, ' ' || ki.last_name, '') from kyc_hdr ki where ki.cif_no = da.cif_no2), 'NA') custName2, (select ki.sig_photo from kyc_hdr ki where ki.cif_no = da.cif_no2) custSign2, (select ki.photo_path from kyc_hdr ki where ki.cif_no = da.cif_no2) custPhoto2, nvl((select ki.first_name || ' ' || nvl2(ki.middle_name, ' ' || ki.middle_name, '') || nvl2(ki.last_name, ' ' || ki.last_name, '') from kyc_hdr ki where ki.cif_no = da.cif_no3), 'NA') custName3, (select ki.sig_photo from kyc_hdr ki where ki.cif_no = da.cif_no3) custSign3, (select ki.photo_path from kyc_hdr ki where ki.cif_no = da.cif_no3) custPhoto3, nvl((select ki.first_name || ' ' || nvl2(ki.middle_name, ' ' || ki.middle_name, '') || nvl2(ki.last_name, ' ' || ki.last_name, '') from kyc_hdr ki where ki.cif_no = da.cif_no4), 'NA') custName4, (select ki.sig_photo from kyc_hdr ki where ki.cif_no = da.cif_no4) custSign4, (select ki.photo_path from kyc_hdr ki where ki.cif_no = da.cif_no4) custPhoto4, 'NA' from dep_account da, dep_product dp, kyc_hdr k where " + +" da.dep_prod_id = dp.id and da.customer_no = k.cif_no and da.key_1 = '" + searchString1.replace(' ', '%') + "' and dp.prod_code ='6001' union select 'LOAN' acct_type, la.key_1 accNo, (lp.prod_code || ':' || lp.int_cat || ' ' || lp.prod_name) product, (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) custName, trim(la.acct_open_dt) accOpenDt, la.prin_outst prinOust, la.intt_outst intOust, la.penal_intt_outst, (case when '" + searchString2 + "' = 'CR' then 'To be CREDITED' when '" + searchString2 + "' = 'DR' then 'To be DEBITED' end) Remark, k.sig_photo custSign, k.photo_path custPhoto, nvl((select ki.first_name || ' ' || nvl2(ki.middle_name, ' ' || ki.middle_name, '') || nvl2(ki.last_name, ' ' || ki.last_name, '') from kyc_hdr ki where ki.cif_no = la.customer_no), 'NA') custName2, (select ki.sig_photo from kyc_hdr ki where ki.cif_no = la.customer_no) custSign2, (select ki.photo_path from kyc_hdr ki where ki.cif_no = la.customer_no) custPhoto2, nvl((select ki.first_name || ' ' || nvl2(ki.middle_name, ' ' || ki.middle_name, '') || nvl2(ki.last_name, ' ' || ki.last_name, '') from kyc_hdr ki where ki.cif_no = la.customer_no), 'NA') custName3, (select ki.sig_photo from kyc_hdr ki where ki.cif_no = la.customer_no) custSign3, (select ki.photo_path from kyc_hdr ki where ki.cif_no = la.customer_no) custPhoto3, nvl((select ki.first_name || ' ' || nvl2(ki.middle_name, ' ' || ki.middle_name, '') || nvl2(ki.last_name, ' ' || ki.last_name, '') from kyc_hdr ki where ki.cif_no = la.customer_no), 'NA') custName4, (select ki.sig_photo from kyc_hdr ki where ki.cif_no = la.customer_no) custSign4, (select ki.photo_path from kyc_hdr ki where ki.cif_no = la.customer_no) custPhoto4, 'NA' from loan_account la, loan_product lp, kyc_hdr k where la.loan_prod_id = lp.id and la.customer_no = k.cif_no and la.key_1 = '" + searchString1.replace(' ', '%') + "' union select 'GL' acct_type, ga.key_1, (gp.gl_code || ':' || gp.interest_cat || ' ' || gp.gl_name) product, ga.ledger_name, trim(ga.acct_open_date), ga.cum_curr_val, 0,ga.cum_curr_val, (case when '" + searchString2 + "' = 'CR' then 'To be CREDITED' when '" + searchString2 + "' = 'DR' then 'To be DEBITED' end) Remark, 'NA', 'NA', 'NA', 'NA', 'NA', 'NA', 'NA', 'NA', 'NA', 'NA', 'NA', 'NA' from gl_account ga, gl_product gp where ga.gl_prod_id = gp.id and ga.key_1 = '" + searchString1.replace(' ', '%') + "' "; + + } else if ((screenName.equalsIgnoreCase("TransactionAuthorization.jsp")) && (lovKey.equalsIgnoreCase("accDetails2"))) { + + // searchString1 = request.getParameter("account_no2"); + //searchString2 = request.getParameter("tranInd"); + headerQry = "select 'DEPOSIT' acct_type, da.key_1 accNo, (dp.prod_code || ':' || dp.int_cat || ' ' || dp.prod_name) product, (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) custName, trim(da.acct_open_dt) accOpenDt, da.avail_bal availBal, nvl(da.intt_outst, 0) intOust, nvl(da.intt_cap_amt, 0) intCapAmt, (case when '" + searchString2 + "' = 'DR' then 'To be CREDITED' when '" + searchString2 + "' = 'CR' then 'To be DEBITED' end) Remark from dep_account da, dep_product dp, kyc_hdr k where da.dep_prod_id = dp.id and da.customer_no = k.cif_no and da.key_1 = '" + searchString1.replace(' ', '%') + "' and dp.prod_code <>'6001' union select 'KCC' acct_type, da.key_1 accNo, (dp.prod_code || ':' || dp.int_cat || ' ' || dp.prod_name) product, (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) custName, trim(da.acct_open_dt) accOpenDt, da.prin_outst prinOust, nvl(da.intt_outst, 0) intOust, nvl(da.penal_intt_outst, 0) penalOust, (case when '" + searchString2 + "' = 'DR' then 'To be CREDITED' when '" + searchString2 + "' = 'CR' then 'To be DEBITED' end) Remark from dep_account da, dep_product dp, kyc_details k where da.dep_prod_id = dp.id and da.customer_no = k.cif_no and da.key_1 = '" + searchString1.replace(' ', '%') + "' and dp.prod_code ='6001' union select 'LOAN' acct_type, la.key_1 accNo, (lp.prod_code || ':' || lp.int_cat || ' ' || lp.prod_name) product, (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) custName, trim(la.acct_open_dt) accOpenDt, la.prin_outst prinOust, la.intt_outst intOust, la.penal_intt_outst, (case when '" + searchString2 + "' = 'DR' then 'To be CREDITED' when '" + searchString2 + "' = 'CR' then 'To be DEBITED' end) Remark from loan_account la, loan_product lp, kyc_hdr k where la.loan_prod_id = lp.id and la.customer_no = k.cif_no and la.key_1 = '" + searchString1.replace(' ', '%') + "' union select 'GL' acct_type, ga.key_1, (gp.gl_code || ':' || gp.interest_cat || ' ' || gp.gl_name) product, ga.ledger_name, trim(ga.acct_open_date), ga.cum_curr_val, 0,ga.cum_curr_val, (case when '" + searchString2 + "' = 'DR' then 'To be CREDITED' when '" + searchString2 + "' = 'CR' then 'To be DEBITED' end) Remark from gl_account ga, gl_product gp where ga.gl_prod_id = gp.id and ga.key_1 = '" + searchString1.replace(' ', '%') + "' "; + + } else if ((screenName.equalsIgnoreCase("NeftRtgsInitiation.jsp")) && (lovKey.equalsIgnoreCase("accNoSrch"))) { + //searchString1 = request.getParameter("accNo"); + headerQry = "select d.key_1,(kd.title || ' ' || kd.first_name || ' ' || kd.middle_name || ' ' ||kd.last_name) as full_name,NVL(d.link_accno,' '),pm.pacs_name,d.avail_bal,kd.photo_path,kd.sig_photo from dep_account d,dep_product dp, kyc_hdr kd,pacs_master pm where d.customer_no = kd.cif_no and d.pacs_id=pm.pacs_id and dp.id=d.dep_prod_id and dp.prod_code='1101' and substr(dp.int_cat,1,1)='1' and substr(d.GL_CLASS_CODE,9,2)='14' and d.curr_status='O' and trim(d.link_accno) is not null and " + + "(d.key_1 like '%" + searchString1.replace(' ', '%') + "%' or d.link_accno like '%" + searchString1.replace(' ', '%') + "%' ) and d.pacs_id = '" + pacsId.replace(' ', '%') + "' "; + } else if ((screenName.equalsIgnoreCase("NeftRtgsInitiation.jsp")) && (lovKey.equalsIgnoreCase("ifscNoSrch"))) { + // searchString1 = request.getParameter("ifscNo"); + headerQry = "select i.idi_ifsc_code,i.idi_bank_name,i.idi_branch_name,i.idi_addrs from idi_ifsc_dir_info i where i.idi_ifsc_code like '%" + searchString1.replace(' ', '%') + "%' "; + } else if ((screenName.equalsIgnoreCase("NeftRtgsInitiation.jsp")) && (lovKey.equalsIgnoreCase("SrcAccNoSrch2"))) { + // searchString1 = request.getParameter("accNo2"); + headerQry = "select d.key_1,(kd.title || ' ' || kd.first_name || ' ' || kd.middle_name || ' ' ||kd.last_name) as full_name,NVL(d.link_accno,' '),pm.pacs_name,d.avail_bal,kd.photo_path,kd.sig_photo from dep_account d,dep_product dp, kyc_hdr kd,pacs_master pm where d.customer_no = kd.cif_no and d.pacs_id=pm.pacs_id and kd.pacs_id=d.pacs_id and dp.id=d.dep_prod_id and dp.prod_code='1101' and substr(dp.int_cat,1,1)='1' and substr(d.GL_CLASS_CODE,9,2)='14' and d.curr_status='O' and dp.intt_rate<>0 and trim(d.link_accno) is not null and d.key_1 like '%" + searchString1.replace(' ', '%') + "%' and d.pacs_id = '" + pacsId.replace(' ', '%') + "' "; + } else if ((screenName.equalsIgnoreCase("NeftRtgsInitiation.jsp")) && (lovKey.equalsIgnoreCase("ifscNoSrch2"))) { + // searchString1 = request.getParameter("ifscNo2"); + headerQry = "select i.idi_ifsc_code,i.idi_bank_name,i.idi_branch_name,i.idi_addrs from idi_ifsc_dir_info i where i.idi_ifsc_code like '%" + searchString1.replace(' ', '%') + "%' "; + } else if ((screenName.equalsIgnoreCase("Investment_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchGl"))) { + // searchString1 = request.getParameter("acNo"); + headerQry = "select g.key_1,g.ledger_name,g.cum_curr_val,trim(g.acct_open_date),g.gl_class_code from gl_account g, gl_product gp where g.gl_prod_id=gp.id and g.gl_prod_id <> '201611000001184' and g.key_1 not in(select i.GL_ID from investment_dtl i where pacs_id='" + pacsId + "') and g.pacs_id='" + pacsId + "' and substr(g.gl_class_code,9,2) in ('22','20','21','28') and (g.key_1 like '%" + searchString1.replace(' ', '%') + "%' or g.ledger_name like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_code like '%" + searchString1.replace(' ', '%') + "%')"; + } else if ((screenName.equalsIgnoreCase("Investment_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchGlAmend"))) { + //searchString1 = request.getParameter("acNo"); + headerQry = "select g.key_1,g.ledger_name,g.cum_curr_val,trim(g.acct_open_date),g.gl_class_code from gl_account g, gl_product gp where g.gl_prod_id=gp.id and g.gl_prod_id <> '201611000001184' and g.key_1 in (select i.GL_ID from investment_dtl i where pacs_id='" + pacsId + "') and g.pacs_id='" + pacsId + "'and (g.key_1 like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_code like '%" + searchString1.replace(' ', '%') + "%')"; + } else if ((screenName.equalsIgnoreCase("Investment_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchBank"))) { + + index = request.getParameter("index"); + // searchString1 = request.getParameter("bank_name"); + headerQry = "select i.idi_ifsc_code,i.idi_bank_name,i.idi_branch_name from IDI_IFSC_DIR_INFO i where i.idi_bank_name like '%" + searchString1.replace(' ', '%') + "%' or i.idi_ifsc_code like '%" + searchString1.replace(' ', '%') + "%' order by i.idi_bank_name,i.idi_branch_name "; + } else if ((screenName.equalsIgnoreCase("Investment_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchBankAmend"))) { + index = request.getParameter("index"); + // searchString1 = request.getParameter("bank_name"); + headerQry = "select i.idi_ifsc_code,i.idi_bank_name,i.idi_branch_name from IDI_IFSC_DIR_INFO i where i.idi_bank_name like '%" + searchString1.replace(' ', '%') + "%' or i.idi_ifsc_code like '%" + searchString1.replace(' ', '%') + "%' order by i.idi_bank_name,i.idi_branch_name"; + } else if ((screenName.equalsIgnoreCase("Borrowing_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchGl"))) { + // searchString1 = request.getParameter("acNo"); + if (searchString1.matches("[a-zA-Z]+")) { + headerQry = "select g.key_1,g.ledger_name,abs(g.cum_curr_val),trim(g.acct_open_date),gp.gl_code from gl_account g,gl_product gp where g.gl_prod_id <> '201611000001184' and g.pacs_id='" + pacsId + "' and substr(g.gl_class_code,9,2) ='13' and upper(g.ledger_name) like upper('%" + searchString1.replace(' ', '%') + "%') and g.key_1 not in (select b.gl_id from borrowing_dtl b where pacs_id='" + pacsId + "') and g.gl_prod_id = gp.id"; + } else { + headerQry = "select g.key_1,g.ledger_name,abs(g.cum_curr_val),trim(g.acct_open_date),gp.gl_code from gl_account g,gl_product gp where g.gl_prod_id <> '201611000001184' and g.pacs_id='" + pacsId + "' and substr(g.gl_class_code,9,2) ='13' and (g.key_1 like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_code like '%" + searchString1.replace(' ', '%') + "%') and g.key_1 not in (select b.gl_id from borrowing_dtl b where pacs_id='" + pacsId + "') and g.gl_prod_id = gp.id"; + } + } else if ((screenName.equalsIgnoreCase("Borrowing_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchGlAmend"))) { + // searchString1 = request.getParameter("acNo"); + if (searchString1.matches("[a-zA-Z]+")) { + headerQry = "select g.key_1,g.ledger_name,abs(g.cum_curr_val),trim(g.acct_open_date),gp.gl_code from gl_account g,gl_product gp where g.gl_prod_id <> '201611000001184' and g.pacs_id='" + pacsId + "' and upper(g.ledger_name) like upper('%" + searchString1.replace(' ', '%') + "%') and g.key_1 in (select b.gl_id from borrowing_dtl b where pacs_id='" + pacsId + "') and g.gl_prod_id = gp.id"; + } else { + headerQry = "select g.key_1,g.ledger_name,abs(g.cum_curr_val),trim(g.acct_open_date),gp.gl_code from gl_account g,gl_product gp where g.gl_prod_id <> '201611000001184' and g.pacs_id='" + pacsId + "' and (g.key_1 like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_code like '%" + searchString1.replace(' ', '%') + "%') and g.key_1 in (select b.gl_id from borrowing_dtl b where pacs_id='" + pacsId + "') and g.gl_prod_id = gp.id"; + } + } else if ((screenName.equalsIgnoreCase("Borrowing_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchBank"))) { + index = request.getParameter("index"); + //searchString1 = request.getParameter("bank"); + headerQry = "select i.idi_ifsc_code,i.idi_bank_name,i.idi_branch_name from IDI_IFSC_DIR_INFO i where i.idi_bank_name like upper('%" + searchString1.replace(' ', '%') + "%') union all select i.idi_ifsc_code,i.idi_bank_name,i.idi_branch_name from IDI_IFSC_DIR_INFO i where i.idi_ifsc_code like upper('%" + searchString1.replace(' ', '%') + "%') order by 2,3"; + } else if ((screenName.equalsIgnoreCase("Borrowing_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchBankAmend"))) { + index = request.getParameter("index"); + // searchString1 = request.getParameter("bank"); + headerQry = "select i.idi_ifsc_code,i.idi_bank_name,i.idi_branch_name from IDI_IFSC_DIR_INFO i where i.idi_bank_name like upper('%" + searchString1.replace(' ', '%') + "%') union all select i.idi_ifsc_code,i.idi_bank_name,i.idi_branch_name from IDI_IFSC_DIR_INFO i where i.idi_ifsc_code like upper('%" + searchString1.replace(' ', '%') + "%') order by 2,3"; + } else if ((screenName.equalsIgnoreCase("inv_borr_rep.jsp")) && (lovKey.equalsIgnoreCase("searchGl"))) { + //searchString1 = request.getParameter("acNo"); + searchString2 = request.getParameter("searchKey"); + if (searchString2.endsWith("i")) { + if (searchString1.matches("[a-zA-Z]+")) { + headerQry = "select g.key_1,g.ledger_name,abs(g.cum_curr_val),trim(g.acct_open_date),g.gl_class_code from gl_account g where g.gl_prod_id <> '201611000001184' and g.pacs_id='" + pacsId + "' and upper(g.ledger_name) like upper('%" + searchString1.replace(' ', '%') + "%') and g.key_1 in (select b.gl_id from investment_dtl b where pacs_id='" + pacsId + "')"; + } else { + headerQry = "select g.key_1,g.ledger_name,abs(g.cum_curr_val),trim(g.acct_open_date),g.gl_class_code from gl_account g where g.gl_prod_id <> '201611000001184' and g.pacs_id='" + pacsId + "' and g.key_1 like '%" + searchString1.replace(' ', '%') + "%' and g.key_1 in (select b.gl_id from investment_dtl b where pacs_id='" + pacsId + "') "; + } + } else if (searchString2.endsWith("b")) { + if (searchString1.matches("[a-zA-Z]+")) { + headerQry = "select g.key_1,g.ledger_name,abs(g.cum_curr_val),trim(g.acct_open_date),g.gl_class_code from gl_account g where g.gl_prod_id <> '201611000001184' and g.pacs_id='" + pacsId + "' and upper(g.ledger_name) like upper('%" + searchString1.replace(' ', '%') + "%') and g.key_1 in (select b.gl_id from borrowing_dtl b where pacs_id='" + pacsId + "')"; + } else { + headerQry = "select g.key_1,g.ledger_name,abs(g.cum_curr_val),trim(g.acct_open_date),g.gl_class_code from gl_account g where g.gl_prod_id <> '201611000001184' and g.pacs_id='" + pacsId + "' and g.key_1 like '%" + searchString1.replace(' ', '%') + "%' and g.key_1 in (select b.gl_id from borrowing_dtl b where pacs_id='" + pacsId + "') "; + } + } + } else if ((screenName.equalsIgnoreCase("share_reports.jsp")) && (lovKey.equalsIgnoreCase("shareAccount"))) { + + //searchString1 = request.getParameter("accNo"); + + headerQry = " select da.key_1 as account_no,dp.prod_desc,(CASE WHEN da.cif_no2 = '' or da.cif_no2 is null THEN kh.first_name || ' ' || kh.middle_name || ' ' || kh.last_name ELSE (select kh.first_name || ' ' || kh.middle_name || ' ' || kh.last_name || ' && ' || khh.first_name || ' ' || khh.middle_name || ' ' || khh.last_name from kyc_hdr khh where khh.cif_no = da.cif_no2) END) as cust_name,kh.cif_no, case when da.cif_no2 is null then 'Single' else 'Joint' end as mode_acc, nvl(da.nominee_cif,'') from dep_account da, kyc_hdr kh, pacs_master pm, dep_product dp where da.customer_no = kh.cif_no and da.pacs_id = pm.pacs_id and da.dep_prod_id = dp.id and dp.prod_code = '1017' and substr(da.GL_CLASS_CODE,9,2)='11' "; + headerQry = headerQry + " and (da.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(kh.first_name) like upper('" + searchString1.replace(' ', '%') + "%')) and da.pacs_id= '" + pacsId + "' "; + + } + + + Connection conn = DbHandler.getDBConnection(); + PreparedStatement pstmt = null; + System.out.println(headerQry); + + ResultSet resultSet = null; + String bgColor = null; + int flag = 1; + + try { + pstmt = conn.prepareStatement(headerQry); + resultSet = pstmt.executeQuery(); + + %> + + + + +
+ + <% if ((screenName.equalsIgnoreCase("accountCreation.jsp")) && (lovKey.equalsIgnoreCase("CifDetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
CIF NumberNameGuardian NameLinked CBS Account No.Customer TypeAddress1Address2Address3
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(9)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%>
+ <%} else if (screenName.equalsIgnoreCase("customerEnquiry.jsp")) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
CIF NumberNameLinked CBS Account No.Customer TypeAddress1Address2Address3Guradian Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%>
+ + <%} else if ((screenName.equalsIgnoreCase("accountCreation.jsp")) && (lovKey.equalsIgnoreCase("productCodeSearch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
Product CodeDescriptionInterest CategoryDescriptionRCVBL_GLRCVBD_GL
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%>
+ <%} else if ((screenName.equalsIgnoreCase("EditServices.jsp")) && (lovKey.equalsIgnoreCase("FetchAccountList"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No account found. Please enter correct details and search again

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account NoCustomer NameGuardian NameAccount Type
<%=blankNA(resultSet.getString(1))%><%=blankNA(resultSet.getString(2))%><%=blankNA(resultSet.getString(3))%><%=blankNA(resultSet.getString(4))%>
+ + <%} } else if ((screenName.equalsIgnoreCase("AdhocReport.jsp")) && (lovKey.equalsIgnoreCase("reportSearch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Report IDReport Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ + <%} else if ((screenName.equalsIgnoreCase("transactionOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + + + + + + + + + <%}%> +
Account NoCustomer NameCustomer NoGuardian NameLinked SB A/C NoAvailable BalancePrincipal OustandingInterest OutstandingPenal Interest OutstandingNPA OutstandingSanction AmountAccount Opening DateOld Account NoLimitTotal Outstanding
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=blankNull(resultSet.getString(4))%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%><%=resultSet.getString(9)%><%=resultSet.getString(10)%><%=resultSet.getString(11)%><%=resultSet.getString(12)%><%=resultSet.getString(13)%><%=resultSet.getString(14)%><%=resultSet.getString(18)%>
+ + + <% } else if ((screenName.equalsIgnoreCase("accountRenewal.jsp")) && (lovKey.equalsIgnoreCase("renewalAccNumberSearch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + <%}%> +
CIF NumberNameCC Account NoLinked CBS Account No.
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ + <%} else if ((screenName.equalsIgnoreCase("mark_unmark_NPA_Operations.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Account No.Customer NameCustomer No.Linked SB A/C No.
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ <%} else if (screenName.equalsIgnoreCase("pacsProductOperation.jsp") && (lovKey.equalsIgnoreCase("ParameterPdAmend"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Product CodeProduct DescriptionInterest CategoryInterest Description
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ <%} + } else if (screenName.equalsIgnoreCase("StandingInstructionCreation.jsp") && (lovKey.equalsIgnoreCase("SIAccFroms"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Account No.CIF No.Customer NameProduct Details
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%> : <%=resultSet.getString(5)%>
+ <%} + } else if (screenName.equalsIgnoreCase("StandingInstructionCreation.jsp") && (lovKey.equalsIgnoreCase("SIAccTos"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + <% if (searchString2.equalsIgnoreCase("s2r")) {%> <%}%> + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <% if (searchString2.equalsIgnoreCase("s2r")) {%> + + <%}%> + + + <%}%> +
Account No.CIF No.Customer NameProduct DetailsInstallment Amount
opener.document.SIOperationForm.siAmount.value = document.getElementById('b<%=i%>').innerHTML;<%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%>opener.document.SIOperationForm.siAmount.value = document.getElementById('b<%=i%>').innerHTML;<%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%>opener.document.SIOperationForm.siAmount.value = document.getElementById('b<%=i%>').innerHTML;<%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%>opener.document.SIOperationForm.siAmount.value = document.getElementById('b<%=i%>').innerHTML;<%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%> : <%=resultSet.getString(5)%><%=resultSet.getString(6)%>
+ <%} + } else if (screenName.equalsIgnoreCase("StandingInstructionCreation.jsp") && (lovKey.equalsIgnoreCase("SIAccFromsSearch"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Account No.CIF No.Customer NameProduct Details
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%> : <%=resultSet.getString(5)%>
+ <%} + } else if (screenName.equalsIgnoreCase("StandingInstructionCreation.jsp") && (lovKey.equalsIgnoreCase("SIAccTosSearch"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Account No.CIF No.Customer NameProduct Details
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%> : <%=resultSet.getString(5)%>
+ <%} + } else if (screenName.equalsIgnoreCase("StandingInstructionCreation.jsp") && (lovKey.equalsIgnoreCase("SIAccSearchDiv"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Account No.CIF No.Customer NameProduct Details
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%> : <%=resultSet.getString(5)%>
+ <%} + } else if (screenName.equalsIgnoreCase("pacsProductOperation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAYABLESearchLOVKey"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
GL CodeGL DescriptionID
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} + } else if (screenName.equalsIgnoreCase("glAccountEnquiry.jsp") && (lovKey.equalsIgnoreCase("PopupGlAcc"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
GL CodeGL DescriptionGL Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} + } else if (screenName.equalsIgnoreCase("glTransactionEnquiry.jsp") && (lovKey.equalsIgnoreCase("PopupGlAcc"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
GL CodeGL DescriptionGL Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} + } else if (screenName.equalsIgnoreCase("pacsProductOperation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAYABLESearchLOVKeyAmend"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
GL CodeGL DescriptionID
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ + <%} + } else if (screenName.equalsIgnoreCase("pacsProductOperation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAIDSearchLOVKey"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
GL CodeGL DescriptionID
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} + } else if (screenName.equalsIgnoreCase("pacsProductOperation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAIDSearchLOVKeyAmend"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
GL CodeGL DescriptionID
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} + %> + <%} else if ((screenName.equalsIgnoreCase("NeftRtgsInitiation.jsp")) && (lovKey.equalsIgnoreCase("accNoSrch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + <%}%> +
Account NumberNameLinked Account NumberPacs NameAvailable BalancePhotoSignature
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%> + <% if (resultSet.getString(6) == null || resultSet.getString(6).isEmpty()) {%><%} else {%> <%}%> + <%if (resultSet.getString(7) == null || resultSet.getString(7).isEmpty()) {%><%} else {%> <%}%>
+ + + <%} else if ((screenName.equalsIgnoreCase("AccountAmendment.jsp")) && (lovKey.equalsIgnoreCase("newCifNoSrch"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
CIF No.Customer Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ + + + <%} else if ((screenName.equalsIgnoreCase("AccountAmendment.jsp")) && (lovKey.equalsIgnoreCase("newTransferAccNoSrch"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account No.Account TypeCustomer Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ + + <%} else if ((screenName.equalsIgnoreCase("AccountAmendment.jsp")) && (lovKey.equalsIgnoreCase("custName1Srch"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
CIF No.Customer NameGuardianAddress
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ <%} else if ((screenName.equalsIgnoreCase("TransactionAuthorization.jsp")) && (lovKey.equalsIgnoreCase("custDetails"))) {%> + + <%----%> + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + <%if (resultSet.getString(1).equalsIgnoreCase("CUST")) {%> + + <% } else if (resultSet.getString(1).equalsIgnoreCase("GL")) {%> + + <%}%> + + + + + + + <% if (!resultSet.getString(1).equalsIgnoreCase("GL")) {%> + + + + + <%}%> + + <%}%> +
CIF No.Customer NameGuardian NamePhotoSignature
CIF No.Customer NameGuardian NamePhotoSignature
Account No.Account NameLedger Description
<%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%if (resultSet.getString(5) == null || resultSet.getString(5).isEmpty()) {%><%} else {%> <%}%><%if (resultSet.getString(6) == null || resultSet.getString(6).isEmpty()) {%>No Signature Found<%} else {%> <%}%>

+
+ <%} else if ((screenName.equalsIgnoreCase("TransactionAuthorization.jsp")) && (lovKey.equalsIgnoreCase("accDetails1"))) {%> + + <%----%> + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + <%if (resultSet.getString(1).equalsIgnoreCase("DEPOSIT")) {%> + + <% } else if (resultSet.getString(1).equalsIgnoreCase("GL")) {%> + + <%} else if (resultSet.getString(1).equalsIgnoreCase("LOAN")) {%> + + <%} else if (resultSet.getString(1).equalsIgnoreCase("KCC")) {%> + + <%}%> + + + + + + + <% if (resultSet.getString(1).equalsIgnoreCase("GL") || resultSet.getString(1).equalsIgnoreCase("LOAN") || resultSet.getString(1).equalsIgnoreCase("KCC")) {%> + + <%}%> + <% if (resultSet.getString(1).equalsIgnoreCase("DEPOSIT")) {%> + + <%}%> + + <% if (!resultSet.getString(1).equalsIgnoreCase("GL")) {%> + + + + <%}%> + + + + + <% if (resultSet.getString(1).equalsIgnoreCase("DEPOSIT")) {%> + + + + + + + + + + + + + <%}%> + + <%}%> +
CIF No.Customer NameGuardian NamePhotoSignature
Account TypeAccount NumberProductMode Of OperationAccount Open DateAvailable BalanceInterest OustandingCapitalised AmountRemarkFirst Customer NameFirst Customer PhotoFirst Customer SignSecond Customer NameSecond Customer PhotoSecond Customer SignThird Customer NameThird Customer PhotoThird Customer SignFourth Customer NameFourth Customer PhotoFourth Customer Sign
Account TypeAccount NumberProductLedger DescriptionCurrent BalanceRemark
Account TypeAccount NumberProductCustomer NameAccount Open DatePrincipal OuststandingInterest OutstandingPenal Interest OutstandingRemark
Account TypeAccount NumberProductCustomer NameAccount Open DatePrincipal OuststandingInterest OutstandingPenal Interest OutstandingRemark
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(21)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%><%=resultSet.getString(9)%><%=resultSet.getString(4)%><%if (resultSet.getString(11) == null || resultSet.getString(11).isEmpty()) {%><%} else {%> <%}%><%if (resultSet.getString(10) == null || resultSet.getString(10).isEmpty()) {%>No Signature Found<%} else {%> <%}%><%=resultSet.getString(12)%><%if (resultSet.getString(14) == null || resultSet.getString(14).isEmpty()) {%><%} else {%> <%}%><%if (resultSet.getString(13) == null || resultSet.getString(13).isEmpty()) {%>No Signature Found<%} else {%> <%}%><%=resultSet.getString(15)%><%if (resultSet.getString(17) == null || resultSet.getString(17).isEmpty()) {%><%} else {%> <%}%><%if (resultSet.getString(16) == null || resultSet.getString(16).isEmpty()) {%>No Signature Found<%} else {%> <%}%><%=resultSet.getString(18)%><%if (resultSet.getString(20) == null || resultSet.getString(20).isEmpty()) {%><%} else {%> <%}%><%if (resultSet.getString(19) == null || resultSet.getString(19).isEmpty()) {%>No Signature Found<%} else {%> <%}%>

+
+ <%} else if ((screenName.equalsIgnoreCase("TransactionAuthorization.jsp")) && (lovKey.equalsIgnoreCase("accDetails2"))) {%> + + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found!

+ +
+ + <% } else {%> + + <%----%> + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + <%if (resultSet.getString(1).equalsIgnoreCase("DEPOSIT")) {%> + + <% } else if (resultSet.getString(1).equalsIgnoreCase("GL")) {%> + + <%} else if (resultSet.getString(1).equalsIgnoreCase("LOAN")) {%> + + <%} else if (resultSet.getString(1).equalsIgnoreCase("KCC")) {%> + + <%}%> + + + + + + + + + <% if (!resultSet.getString(1).equalsIgnoreCase("GL")) {%> + + + + + + <%}%> + + + + + <%} %> +
CIF No.Customer NameGuardian NamePhotoSignature
Account TypeAccount NumberProductCustomer NameAccount Open DateAvailable BalanceInterest OustandingCapitalised AmountRemark
Account TypeAccount NumberProductLedger DescriptionCurrent BalanceRemark
Account TypeAccount NumberProductCustomer NameAccount Open DatePrincipal OuststandingInterest OutstandingPenal Interest OutstandingRemark
Account TypeAccount NumberProductCustomer NameAccount Open DatePrincipal OuststandingInterest OutstandingPenal Interest OutstandingRemark
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%><%=resultSet.getString(9)%>

+
+ <%} } else if ((screenName.equalsIgnoreCase("NeftRtgsInitiation.jsp")) && (lovKey.equalsIgnoreCase("accNoSrch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + <%}%> +
Account NumberNamePacs NameAvailable BalancePhotoSignature
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%if (resultSet.getString(5) == null || resultSet.getString(5).isEmpty()) {%><%} else {%> <%}%><%if (resultSet.getString(6) == null || resultSet.getString(6).isEmpty()) {%>No Signature Found<%} else {%> <%}%>
+ + + + <%} else if ((screenName.equalsIgnoreCase("NeftRtgsInitiation.jsp")) && (lovKey.equalsIgnoreCase("SrcAccNoSrch2"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Account NumberNameLinked Account NumberPacs NameAvailable BalancePhotoSignature
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%if (resultSet.getString(6) == null || resultSet.getString(6).isEmpty()) {%><%} else {%> <%}%><%if (resultSet.getString(7) == null || resultSet.getString(7).isEmpty()) {%>No Signature Found<%} else {%> <%}%>
+ + + <%} else if ((screenName.equalsIgnoreCase("NeftRtgsInitiation.jsp")) && (lovKey.equalsIgnoreCase("ifscNoSrch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + <%}%> +
IFSC CodeBank NameBranch NameAddress
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ + <%} else if ((screenName.equalsIgnoreCase("NeftRtgsInitiation.jsp")) && (lovKey.equalsIgnoreCase("ifscNoSrch2"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
IFSC CodeBank NameBranch NameAddress
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ + <%} else if ((screenName.equalsIgnoreCase("Investment_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchBank"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No such Bank found! Close this window & Please recheck again

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
IFSC NumberBank NameBranch Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ + <%} } else if ((screenName.equalsIgnoreCase("Investment_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchBankAmend"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No such Bank found! Close this window & Please recheck again

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
IFSC NumberBank NameBranch Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ + <%} } else if ((screenName.equalsIgnoreCase("Investment_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchGl"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No A/C found! Close this window & Please recheck the input provided.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}}%> +
Account NumberLedger NameBalanceA/c Open DateGLCC
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + + <%} else if ((screenName.equalsIgnoreCase("Investment_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchGlAmend"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No A/C found! Close this window & Please recheck the input provided.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account NumberLedger NameBalanceA/c Open DateGLCC
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("Borrowing_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchBank"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
IFSC NumberBank NameBranch Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ + <%} else if ((screenName.equalsIgnoreCase("Borrowing_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchBankAmend"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
IFSC NumberBank NameBranch Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ + <%} else if ((screenName.equalsIgnoreCase("Borrowing_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchGl"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account NumberLedger NameBalanceA/c Open DateGL CODE
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + <%} + } else if ((screenName.equalsIgnoreCase("Borrowing_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchGlAmend"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + } + if (i == 1) {%> + + <%}%> + + + + + + + <%}%> +
Account NumberLedger NameBalanceA/c Open DateGL CODE
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("share_reports.jsp")) && (lovKey.equalsIgnoreCase("shareAccount"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + } + if (i == 1) {%> + + <%}%> + + + + + + + <%}%> +
Account No.ProductCustomer NameCustomer No.Account Type
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("inv_borr_rep.jsp")) && (lovKey.equalsIgnoreCase("searchGl"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account NumberLedger NameBalanceA/c Open DateGLCC
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%}%> + + + + + +
+ + <% + } catch (Exception ex) { + + } finally { + if (resultSet != null) { + resultSet.close(); + } + if (pstmt != null) { + pstmt.close(); + } + if (conn != null) { + conn.close(); + } + } + %> + + diff --git a/IPKS_Updated/web/web/web/CommonSearchInformationLoanLOV.jsp b/IPKS_Updated/web/web/web/CommonSearchInformationLoanLOV.jsp new file mode 100644 index 0000000..63c10ee --- /dev/null +++ b/IPKS_Updated/web/web/web/CommonSearchInformationLoanLOV.jsp @@ -0,0 +1,1726 @@ +<%-- + Document : CommonSearchInformationLoanLOV + Created on : Mar 10, 2016, 2:30:36 AM + Author : SUBHAM + Modified by : PARAMITA +--%> + +<%@page import="java.sql.PreparedStatement"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> + + + + + + Customer Information Search + + + + + <% + String searchString1 = ""; + String screenName = ""; + String searchString2 = ""; + String lovKey = ""; + String textIndex = ""; + String reportType = ""; + + screenName = request.getParameter("screenName"); + lovKey = request.getParameter("lovKey"); + String pacsId = session.getAttribute("pacsId").toString(); + textIndex = request.getParameter("textIndex"); + String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + String headPacsId = (String) session.getAttribute("headPacsId").toString(); + + String headerQry = null; + + if ((screenName.equalsIgnoreCase("LoanAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CifDetails"))) { + + //searchString1 = request.getParameter("cifNumber"); + if(subPacsFlag.equalsIgnoreCase("Y")){ + pacsId = headPacsId; + } + headerQry = "select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,nvl(t.customer_type,' '),nvl(t.address_1,' '),nvl(t.address_2,' '), nvl(t.address_3,''), nvl(t.GUARDIAN_NAME,'NA') from kyc_hdr t" + + " where t.cif_no = '" + searchString1.replace(' ', '%') + "' and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "')) "; + + + } else if ((screenName.equalsIgnoreCase("LoanAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CustNameDetails"))) { + + // searchString1 = request.getParameter("customerName"); + if(subPacsFlag.equalsIgnoreCase("Y")){ + pacsId = headPacsId; + } + headerQry = "select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,nvl(t.customer_type,' '),nvl(t.address_1,' '),nvl(t.address_2,' '), nvl(t.address_3,'') from kyc_hdr t" + + " where upper(t.first_name) like upper('" + searchString1.replace(' ', '%') + "%') and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "')) "; + + + } + + else if ((screenName.equalsIgnoreCase("LoanAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("productCodeSearch"))) { + + // searchString1 = request.getParameter("productCodeDetails"); + if (searchString1.equalsIgnoreCase("")) { + headerQry = "select prod_code,prod_desc,int_cat,intt_cat_desc,decode(GUARANTOR,'Y','Yes','N','No'),decode(security,'Y','Yes','N','No') , nvl((select gp.gl_code from gl_product gp where gp.id = gl_id_intt_rcvbl), 'NA') RCVBL_GL, nvl((select gp.gl_code from gl_product gp " + +" where gp.id = gl_id_intt_rcvd), 'NA') RCVBD_GL from loan_product where pacs_id like '%" + pacsId + "#%'"; + } else { + headerQry = "select prod_code,prod_desc,int_cat,intt_cat_desc,decode(GUARANTOR,'Y','Yes','N','No'),decode(security,'Y','Yes','N','No') , nvl((select gp.gl_code from gl_product gp where gp.id = gl_id_intt_rcvbl), 'NA') RCVBL_GL, nvl((select gp.gl_code from gl_product gp " + +" where gp.id = gl_id_intt_rcvd), 'NA') RCVBD_GL from loan_product where PROD_CODE like '%" + searchString1.substring(0, 4).replace(' ', '%') + "%' and pacs_id like '%" + pacsId + "#%'"; + } + + + } else if ((screenName.equalsIgnoreCase("LoanDisbursement.jsp")) && (lovKey.equalsIgnoreCase("LoanAcctSearch"))) { + + //searchString1 = request.getParameter("loanAcc"); + + headerQry = "select h.key_1,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,p.prod_desc,h.appl_amt,p.intt_cat_desc from loan_account h,kyc_hdr t,loan_product p where h.customer_no = t.cif_no and substr(h.GL_CLASS_CODE,9,2)='23' and h.loan_prod_id = p.id and h.pacs_id = '" + pacsId + "' and (h.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(t.first_name) like upper('" + searchString1.replace(' ', '%') + "%'))"; + + } + else if ((screenName.equalsIgnoreCase("LoanModify.jsp")) && (lovKey.equalsIgnoreCase("LoanAcctSearch"))) { + + //searchString1 = request.getParameter("loanAcc"); + + headerQry = "select h.key_1,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,p.prod_desc,h.sanction_amt,p.intt_cat_desc from loan_account h,kyc_hdr t,loan_product p where h.customer_no = t.cif_no and substr(h.GL_CLASS_CODE,9,2)='23' and h.loan_prod_id = p.id and h.pacs_id = '" + pacsId + "' and h.key_1 like '%" + searchString1.replace(' ', '%') + "%' union all select h.key_1,(t.first_name || nvl2(t.middle_name, ' ' || t.middle_name, '') || nvl2(t.last_name, ' ' || t.last_name, '')) name , p.prod_desc,h.sanction_amt,p.intt_cat_desc from dep_account h, kyc_hdr t, dep_product p where h.customer_no = t.cif_no and p.prod_code='6001' and substr(h.GL_CLASS_CODE,9,2)='23' and h.dep_prod_id = p.id and h.pacs_id = '" + pacsId + "' and h.key_1 like '%" + searchString1.replace(' ', '%') + "%'"; + + } + else if ((screenName.equalsIgnoreCase("LoanRepayment.jsp")) && (lovKey.equalsIgnoreCase("LoanAcctSearch"))) { + + // searchString1 = request.getParameter("loanAcc"); + + headerQry = "select h.key_1,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,p.prod_desc,h.sanction_amt,h.term,p.intt_cat_desc, to_char(h.DUE_DT,'YYYY/MM/DD'),(select count(*) from loan_repay_schedule l where l.accno= h.key_1) from loan_account h,kyc_hdr t,loan_product p where h.customer_no = t.cif_no and substr(h.GL_CLASS_CODE,9,2)='23' and h.loan_prod_id = p.id and p.loan_type='E' and h.pacs_id = '" + pacsId + "' and (h.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(t.first_name) like upper('" + searchString1.replace(' ', '%') + "%'))"; + + } else if ((screenName.equalsIgnoreCase("LoanTransactionOperation.jsp")) && (lovKey.equalsIgnoreCase("LoanAcctSearchfor_Transaction"))) { + + // searchString1 = request.getParameter("accNo"); + + if(subPacsFlag.equalsIgnoreCase("Y")){ + pacsId = headPacsId; + } + + headerQry = "select h.key_1,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,p.prod_desc,h.SANCTION_AMT,p.intt_cat_desc,p.prod_code,h.customer_no,(select count(m.member_id) from basic_info b, member_information m where b.shg_id = m.shg_id and b.cif = t.cif_no) memberCount from loan_account h,kyc_hdr t,loan_product p where h.customer_no = t.cif_no and substr(h.GL_CLASS_CODE,9,2)='23' and h.loan_prod_id = p.id and h.curr_status in ('01','02') and h.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') and (h.key_1 like '%" + searchString1 + "%' or upper(t.first_name) like upper('" + searchString1 + "%'))"; + + } else if ((screenName.equalsIgnoreCase("LoanInquiry.jsp")) && (lovKey.equalsIgnoreCase("CifDetails"))) { + + // searchString1 = request.getParameter("cifNumber"); + if(subPacsFlag.equalsIgnoreCase("Y")){ + pacsId = headPacsId; + } + + headerQry = "select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,nvl(t.customer_type,' '),nvl(t.address_1,' '),nvl(t.address_2,' '), nvl(t.address_3,'') from kyc_hdr t" + + " where (t.cif_no like '%" + searchString1.replace(' ', '%') + "%' or upper(t.first_name) like upper('" + searchString1 + "%')) and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') "; + + + } else if ((screenName.equalsIgnoreCase("RepayLoan.jsp")) && (lovKey.equalsIgnoreCase("LoanAcctSearch"))) { + + // searchString1 = request.getParameter("loanAcc"); + searchString2 = request.getParameter("repayType"); + + if(subPacsFlag.equalsIgnoreCase("Y") && searchString2.equalsIgnoreCase("R")){ + pacsId = headPacsId; + } + + if(searchString2.equalsIgnoreCase("R")) + headerQry = "select la.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')) name,la.sanction_amt,to_char(la.sanc_dt,'Mon DD, YYYY'),nvl(to_char(la.lst_txn_dt,'Mon DD, YYYY'), 'NA'),la.prin_outst,(la.intt_outst + la.penal_intt_outst + la.npa_intt_outst),(abs(la.prin_outst) + (abs(la.intt_outst) + abs(la.penal_intt_outst) + abs(la.npa_intt_outst)))*-1,nvl(to_char(la.emi), 'NA'),l.PROD_CODE,l.PROD_DESC,l.INT_CAT,l.intt_cat_desc,k.guardian_name,la.customer_no,(select count(m.member_id)from basic_info b, member_information m where b.shg_id = m.shg_id and b.cif = k.cif_no) memberCount from loan_account la, kyc_hdr k ,loan_product l where la.customer_no = k.cif_no and curr_status in ('02','03') and substr(la.GL_CLASS_CODE,9,2)='23' and l.id=la.loan_prod_id and la.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') and (la.key_1 like '%" + searchString1 + "%' or upper(k.first_name) like upper('" + searchString1 + "%') or la.old_accno='" + searchString1 + "')"; + else if(searchString2.equalsIgnoreCase("C")) + headerQry = "select la.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')) name,la.sanction_amt,to_char(la.sanc_dt,'Mon DD, YYYY'),nvl(to_char(la.lst_txn_dt,'Mon DD, YYYY'), 'NA'),la.prin_outst,(la.intt_outst + la.penal_intt_outst + la.npa_intt_outst + round(nvl(la.intt_accr, 0)) + round(nvl(la.penal_intt_accr, 0)) + round(nvl(la.npa_intt_accr, 0))),round((abs(la.prin_outst) + (abs(la.intt_outst) + abs(la.penal_intt_outst) + abs(la.npa_intt_outst)) + abs(round(nvl(la.intt_accr, 0)) + round(nvl(la.penal_intt_accr, 0)) + round(nvl(la.npa_intt_accr, 0))))),nvl(to_char(la.emi), 'NA'),l.PROD_CODE,l.PROD_DESC,l.INT_CAT,l.intt_cat_desc,k.guardian_name,la.customer_no,(select count(m.member_id)from basic_info b, member_information m where b.shg_id = m.shg_id and b.cif = k.cif_no) memberCount from loan_account la, kyc_hdr k ,loan_product l where la.customer_no = k.cif_no and curr_status in ('02','03') and substr(la.GL_CLASS_CODE,9,2)='23' and l.id=la.loan_prod_id and la.pacs_id = '" + pacsId + "' and (la.key_1 like '%" + searchString1 + "%' or upper(k.first_name) like upper('" + searchString1 + "%') or la.old_accno='" + searchString1 + "')"; + else + headerQry = "select * from loan_account where 1=2"; + + + } + //Added by P.Pahari on 25th April,2024 + else if ((screenName.equalsIgnoreCase("DepositMiscellaneousOperation.jsp")) && (lovKey.equalsIgnoreCase("LonAccLOB"))) { + + // searchString1 = request.getParameter("loanAccSearch"); + if(subPacsFlag.equalsIgnoreCase("Y")){ + pacsId = headPacsId; + } + + headerQry = "select h.key_1,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,p.prod_desc,h.SANCTION_AMT,p.intt_cat_desc,p.prod_code,h.customer_no,(select count(m.member_id) from basic_info b, member_information m where b.shg_id = m.shg_id and b.cif = t.cif_no) memberCount from loan_account h,kyc_hdr t,loan_product p where h.customer_no = t.cif_no and substr(h.GL_CLASS_CODE,9,2)='23' and h.loan_prod_id = p.id and h.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') and (h.key_1 like '%" + searchString1 + "%' or upper(t.first_name) like upper('" + searchString1 + "%'))"; + } + else if ((screenName.equalsIgnoreCase("RepayLoan.jsp")) && (lovKey.equalsIgnoreCase("transferAccSrch"))) { + + // searchString1 = request.getParameter("loanAcc"); + if(subPacsFlag.equalsIgnoreCase("Y")){ + pacsId = headPacsId; + } + + headerQry = "select d.customer_no,d.key_1,(h.first_name||nvl2(h.middle_name,' '||h.middle_name,'')||nvl2(h.last_name,' '||h.last_name,'')) Customer_Name,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,d.avail_bal from dep_account d,dep_product p,kyc_hdr h where d.dep_prod_id =p.id and substr(d.GL_CLASS_CODE,9,2)='14' and d.curr_status not in ('C','S') and d.customer_no = h.cif_no and p.prod_code in ('1101','1102') and d.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') and (d.customer_no in (select la.customer_no from loan_account la where la.key_1 = '" + searchString1 + "') or d.cif_no2 in (select la.customer_no from loan_account la where la.key_1 = '" + searchString1 + "') )"; + + + } else if ((screenName.equalsIgnoreCase("LoanTransactionOperation.jsp")) && (lovKey.equalsIgnoreCase("SavingsAccSearchTransfer"))) { + + // searchString1 = request.getParameter("accNo"); + if(subPacsFlag.equalsIgnoreCase("Y")){ + pacsId = headPacsId; + } + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc" + + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and p.prod_code in ('1101','1102') and substr(p.int_cat,1,1) = '1' and substr(t.GL_CLASS_CODE,9,2)='14' and (t.customer_no = (select customer_no from loan_account where key_1 = '" + searchString1 + "') or t.cif_no2 = (select customer_no from loan_account where key_1 = '" + searchString1 + "')) and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') and t.curr_status not in ('C','S') "; + + } else if (screenName.equalsIgnoreCase("LoanProductCreation.jsp") && (lovKey.equalsIgnoreCase("ParameterPdAmend"))) { + + //searchString1 = request.getParameter("productcodeSearch"); + //searchString2 = request.getParameter("intcatSearch"); + + if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select dp.prod_code,dp.prod_desc,dp.int_cat,dp.intt_cat_desc from loan_product dp"; + } else if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select dp.prod_code,dp.prod_desc,dp.int_cat,dp.intt_cat_desc from loan_product dp where dp.int_cat like '%" + searchString2.replace(' ', '%') + "%'"; + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select dp.prod_code,dp.prod_desc,dp.int_cat,dp.intt_cat_desc from loan_product dp where dp.prod_code like '%" + searchString1.replace(' ', '%') + "%'"; + } else { + headerQry = "select dp.prod_code,dp.prod_desc,dp.int_cat,dp.intt_cat_desc from loan_product dp where dp.prod_code like '%" + searchString1.replace(' ', '%') + "%' and dp.int_cat like '%" + searchString2.replace(' ', '%') + "%'"; + } + } else if ((screenName.equalsIgnoreCase("mark_unmark_npa_loan.jsp")) && (lovKey.equalsIgnoreCase("loanAccount"))) { + + // searchString1 = request.getParameter("accountNumber"); + + headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no " + + " from loan_account t,kyc_hdr k where k.cif_no=t.customer_no and substr(t.GL_CLASS_CODE,9,2)='23' and t.key_1 like '%" + searchString1.replace(' ', '%') + "%' and t.pacs_id= '" + pacsId + "' "; + + }else if ((screenName.equalsIgnoreCase("LoanAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("Account"))) { + + //searchString1 = request.getParameter("dep_acc_no"); + //searchString2 = request.getParameter("cifNumber"); + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + + headerQry = " select t.key_1, (k.first_name || nvl2(k.middle_name, ' ' || k.middle_name, '') ||nvl2(k.last_name, ' ' || k.last_name, '')) as Customer_Name, t.customer_no, p.prod_code, p.prod_desc, p.int_cat, p.intt_cat_desc, t.avail_bal, to_char(t.mat_dt,'DD-MON-YYYY') from dep_account t, kyc_hdr k, dep_product p where k.cif_no = t.customer_no and t.dep_prod_id = p.id and substr(t.GL_CLASS_CODE,9,2)='14' and substr(p.prod_code,1,1) in ('2','3') and t.curr_status <>'C' and t.customer_no like '%" + searchString2.replace(' ', '%') + "%' and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') order by t.mat_dt"; + + }else if (screenName.equalsIgnoreCase("LoanProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAYABLESearchLOVKey"))) { + + //searchString1 = request.getParameter("acc_gl_to_cash"); + + headerQry = "select gl_code,gl_name,id from gl_product"; + } else if (screenName.equalsIgnoreCase("LoanProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAYABLESearchLOVKeyAmend"))) { + + //searchString1 = request.getParameter("acc_gl_to_cash"); + + headerQry = "select gl_code,gl_name,id from gl_product"; + } else if (screenName.equalsIgnoreCase("LoanProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAIDSearchLOVKey"))) { + + //searchString1 = request.getParameter("acc_gl_to_cash"); + + headerQry = "select gl_code,gl_name,id from gl_product"; + } else if (screenName.equalsIgnoreCase("LoanProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAIDSearchLOVKeyAmend"))) { + + //searchString1 = request.getParameter("acc_gl_to_cash"); + + headerQry = "select gl_code,gl_name,id from gl_product"; + } else if ((screenName.equalsIgnoreCase("RepayLoan.jsp")) && (lovKey.equalsIgnoreCase("glAccSrch"))) { + + // searchString1 = request.getParameter("glAcc"); + + headerQry = "select ga.key_1, ga.ledger_name,gp.gl_code,gp.id,gp.gl_name from gl_account ga, gl_product gp where ga.gl_prod_id=gp.id and gp.id <> '201611000001184' and ga.pacs_id= '" + pacsId + "' and (gp.id like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') "; + + }else if ((screenName.equalsIgnoreCase("LoanTransactionOperation.jsp")) && (lovKey.equalsIgnoreCase("loanShgMember"))) { + + // searchString1 = request.getParameter("accNo"); + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + + headerQry = "select m.member_id,m.member_name from member_information m,basic_info b,kyc_hdr k where b.shg_id=m.shg_id and k.cif_no=b.cif and k.cif_no like '%" + searchString1 + "%' and k.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id in (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "')) "; + + + } + + else if ((screenName.equalsIgnoreCase("RepayLoan.jsp")) && (lovKey.equalsIgnoreCase("loanShgMember"))) { + + // searchString1 = request.getParameter("accNo"); + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + + headerQry = "select m.member_id,m.member_name from member_information m,basic_info b,kyc_hdr k where b.shg_id=m.shg_id and k.cif_no=b.cif and k.cif_no like '%" + searchString1 + "%' and k.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id in (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "')) "; + } + + else if ((screenName.equalsIgnoreCase("LoanAccountCreationReadOnly.jsp")) && (lovKey.equalsIgnoreCase("view_collateral"))) { + + // searchString1 = request.getParameter("refno"); + headerQry = "select n.ref_no,to_char(n.open_dt,'DD-MON-YYYY'),to_char(n.exp_dt,'DD-MON-YYYY'),n.amt from nsc_collateral n where n.q_no='" + searchString1 + "' and n.status='P'"; + + } else if ((screenName.equalsIgnoreCase("LoanAccountCreationReadOnly.jsp")) && (lovKey.equalsIgnoreCase("view_collateral_Gold"))) { + + // searchString1 = request.getParameter("refno"); + headerQry = "select n.bond_no,n.gross_weight,n.net_weight from gold_COLLATERAL n where n.q_no='" + searchString1 + "' and n.status='P' "; + + } else if ((screenName.equalsIgnoreCase("RemoveLien.jsp")) && (lovKey.equalsIgnoreCase("view_Gold"))) { + + // searchString1 = request.getParameter("acc"); + headerQry = "select n.bond_no,n.gross_weight,n.net_weight from gold_COLLATERAL n where n.acc_no='" + searchString1 + "' and n.status='A' "; + + } else if ((screenName.equalsIgnoreCase("amendInterest.jsp")) && (lovKey.equalsIgnoreCase("AccSrch"))) { + // searchString1 = request.getParameter("Acc"); + + headerQry = " select d.key_1,(select p.prod_name from dep_product p where p.id=d.dep_prod_id) prod_name, " + +" (select trim(r.first_name) || ' ' || trim(r.middle_name) || ' ' || trim(r.last_name) " + +" from kyc_hdr r where r.cif_no = d.customer_no) cust_name, d.limit, d.avail_bal, d.prin_outst, " + +" d.intt_outst cur_int, d.penal_intt_outst penal_int , d.npa_intt_outst npa_int,(d.intt_outst + d.penal_intt_outst + d.npa_intt_outst) tot_int from dep_account d " + +" where d.pacs_id = '" + pacsId + "' and d.dep_prod_id in (select p.id from dep_product p " + +" where p.prod_code ='6001' and p.int_method = 'S') and substr(d.GL_CLASS_CODE,9,2)='23' and d.curr_status = 'O' and d.key_1 like '%" + searchString1 + "%'" + +" union all " + +" select l.key_1, (select p.prod_name from loan_product p where p.id=l.loan_prod_id) prod_name, " + +" (select trim(r.first_name) || ' ' || trim(r.middle_name) || ' ' || trim(r.last_name) " + +" from kyc_hdr r where r.cif_no = l.customer_no) cust_name, l.sanction_amt, l.outst_bal, l.prin_outst, " + +" l.intt_outst cur_int , l.penal_intt_outst penal_int , l.npa_intt_outst npa_int, (l.intt_outst + l.penal_intt_outst + l.npa_intt_outst) tot_int from loan_account l " + +" where l.pacs_id = '" + pacsId + "' and substr(l.GL_CLASS_CODE,9,2)='23' and l.loan_prod_id in " + +" (select p.id from loan_product p where p.int_method in ('S','C')) and l.curr_status != '04' and l.key_1 like '%" + searchString1 + "%'"; + + } + + else if ((screenName.equalsIgnoreCase("ForceDebitCapitalisation.jsp")) && (lovKey.equalsIgnoreCase("AccSrch"))) { + // searchString1 = request.getParameter("Acc"); + + headerQry = " select l.key_1, (select p.prod_name from loan_product p where p.id=l.loan_prod_id) prod_name, " + +" (select trim(r.first_name) || ' ' || trim(r.middle_name) || ' ' || trim(r.last_name) " + +" from kyc_hdr r where r.cif_no = l.customer_no) cust_name, l.sanction_amt, l.outst_bal, l.prin_outst, " + +" l.intt_outst cur_int , l.penal_intt_outst penal_int , l.npa_intt_outst npa_int, (l.intt_outst + l.penal_intt_outst + l.npa_intt_outst) tot_int, " + +" (nvl(l.intt_accr,0)+nvl(l.penal_intt_accr,0)+nvl(l.npa_intt_accr,0) ) accrd_int from loan_account l " + +" where l.pacs_id = '" + pacsId + "' and l.loan_prod_id in " + +" (select p.id from loan_product p where p.int_method = 'C') and substr(l.GL_CLASS_CODE,9,2)='23' and l.curr_status != '04' and l.key_1 like '%" + searchString1 + "%'"; + + } + else if ((screenName.equalsIgnoreCase("AccountStatement_Report.jsp")) && (lovKey.equalsIgnoreCase("searchReport"))) { + + // searchString1 = request.getParameter("accno"); + reportType = request.getParameter("reportType"); + + if (reportType.equalsIgnoreCase("DEP")) { + headerQry = " select da.key_1 as account_no, dp.prod_desc, (CASE WHEN da.cif_no2 = '' or da.cif_no2 is null THEN kh.first_name || ' ' || kh.middle_name || ' ' || kh.last_name ELSE (select kh.first_name || ' ' || kh.middle_name || ' ' || kh.last_name || ' && ' || khh.first_name || ' ' || khh.middle_name || ' ' || khh.last_name " + +" from kyc_hdr khh where khh.cif_no = da.cif_no2) END) as cust_name, kh.cif_no from dep_account da, kyc_hdr kh, pacs_master pm, dep_product dp where da.customer_no = kh.cif_no and da.pacs_id = pm.pacs_id and da.dep_prod_id = dp.id and dp.prod_code<>'6001' and substr(da.GL_CLASS_CODE,9,2) in ('14','11') and (da.key_1 like '%" + searchString1.replace(' ', '%') + "%' or da.link_accno like upper('%" + searchString1.replace(' ', '%') + "%')) and da.pacs_id = '"+ pacsId +"' "; + } else if (reportType.equalsIgnoreCase("KCC")) { + headerQry = " select da.key_1 as account_no, dp.prod_desc, (CASE WHEN da.cif_no2 = '' or da.cif_no2 is null THEN kh.first_name || ' ' || kh.middle_name || ' ' || kh.last_name ELSE (select kh.first_name || ' ' || kh.middle_name || ' ' || kh.last_name || ' && ' || khh.first_name || ' ' || khh.middle_name || ' ' || khh.last_name " + +" from kyc_hdr khh where khh.cif_no = da.cif_no2) END) as cust_name, kh.cif_no from dep_account da, kyc_hdr kh, pacs_master pm, dep_product dp where da.customer_no = kh.cif_no and da.pacs_id = pm.pacs_id and da.dep_prod_id = dp.id and dp.prod_code='6001' and substr(da.GL_CLASS_CODE,9,2)='23' and da.key_1 like '%" + searchString1.replace(' ', '%') + "%' and da.pacs_id = '"+ pacsId +"' "; + } else if (reportType.equalsIgnoreCase("LOAN")) { + headerQry = " select da.key_1 as account_no, dp.prod_desc, kh.first_name || ' ' || kh.middle_name || ' ' || kh.last_name cust_name, kh.cif_no from loan_account da, kyc_hdr kh, " + +" pacs_master pm, loan_product dp where da.customer_no = kh.cif_no and da.pacs_id = pm.pacs_id and da.loan_prod_id = dp.id and substr(da.GL_CLASS_CODE,9,2)='23' and da.key_1 like '%" + searchString1.replace(' ', '%') + "%' and da.pacs_id = '" + pacsId + "' "; + } else if (reportType.equalsIgnoreCase("GL")) { + headerQry = " select da.key_1 as account_no, dp.gl_name, dp.gl_desc, dp.gl_code from gl_account da , pacs_master pm, gl_product dp " + +" where da.pacs_id = pm.pacs_id and da.gl_prod_id = dp.id and da.key_1 like '%" + searchString1.replace(' ', '%') + "%' and da.pacs_id = '" + pacsId + "' "; + } + } + + else if ((screenName.equalsIgnoreCase("KCCForceCapitalisation.jsp")) && (lovKey.equalsIgnoreCase("AccSrch"))) { + // searchString1 = request.getParameter("Acc"); + + headerQry = " select l.key_1,(select p.prod_name from dep_product p where p.id = l.dep_prod_id) prod_name, " + +" (select trim(r.first_name) || ' ' || trim(r.middle_name) || ' ' || trim(r.last_name) " + +" from kyc_hdr r where r.cif_no = l.customer_no) cust_name, nvl(l.sanction_amt,0) sanction_amt, " + +" l.prin_outst outst_bal, l.prin_outst, 0 cur_int, 0 penal_int, 0 npa_int, 0 tot_int, " + +" (nvl(l.intt_outst, 0) + nvl(l.penal_intt_outst, 0) + nvl(l.npa_intt_outst, 0)) accrd_int from dep_account l " + +" where l.pacs_id = '" + pacsId + "' and l.dep_prod_id in (select p.id from dep_product p where p.int_method = 'C' and p.prod_code='6001') " + +" and l.curr_status != 'C' and substr(l.GL_CLASS_CODE,9,2)='23' and l.key_1 like '%" + searchString1 + "%'"; + + } + + else if ((screenName.equalsIgnoreCase("CustomerNetWorth_Report.jsp")) && (lovKey.equalsIgnoreCase("searchReport"))) { + + // searchString1 = request.getParameter("accno"); + + headerQry = " select kh.cif_no, kh.first_name || ' ' || kh.middle_name || ' ' || kh.last_name as cust_name from kyc_hdr kh " + + " where kh.cif_no = '" + searchString1 + "' and kh.pacs_id in (select pacs_id from pacs_master p where p.head_pacs_id=(select head_pacs_id from pacs_master pk where pk.pacs_id='" +pacsId+ "')) "; + + } + + Connection conn = DbHandler.getDBConnection(); + PreparedStatement pstmt = null; + + ResultSet resultSet = null; + String bgColor = null; + int flag = 1; + + try { + pstmt = conn.prepareStatement(headerQry); + resultSet = pstmt.executeQuery(); + System.out.println(headerQry); + + %> + + +
+ + + <% if ((screenName.equalsIgnoreCase("LoanAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CifDetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
CIF NumberNameGuardian NameCustomer TypeAddress1Address2Address3
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(7)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%>
+ + <%}else if((screenName.equalsIgnoreCase("LoanTransactionOperation.jsp")) && (lovKey.equalsIgnoreCase("loanShgMember"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Member found! Close this window & Please retry!.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + <%}}%> +
Member IDMember Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ + <%}else if((screenName.equalsIgnoreCase("RepayLoan.jsp")) && (lovKey.equalsIgnoreCase("loanShgMember"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Member found! Close this window & Please retry!.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + <%}}%> +
Member IDMember Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ + + <%} +// Added by P.pahari for Loan accouny reset +else if ((screenName.equalsIgnoreCase("DepositMiscellaneousOperation.jsp")) && (lovKey.equalsIgnoreCase("LonAccLOB"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No A/C found! Close this window & Please retry!.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
Loan Account No.Customer NameCustomer CodeProduct DescriptionLoan Sanctioned AmountInterest Category DescProduct Code
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(7)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%>
+ + <%} + }else if ((screenName.equalsIgnoreCase("LoanAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("productCodeSearch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + <%}%> +
Product CodeDescriptionInterest CategoryDescriptionGuarantor RequiredSecurity RequiredRCVBL_GLRCVBD_GL
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%>
+ + <%} else if ((screenName.equalsIgnoreCase("LoanDisbursement.jsp")) && (lovKey.equalsIgnoreCase("LoanAcctSearch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + <%}%> +
Loan Account No.Customer NameProduct DescriptionLoan Applied AmountInterest Category Desc
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + + <%} else if ((screenName.equalsIgnoreCase("LoanModify.jsp")) && (lovKey.equalsIgnoreCase("LoanAcctSearch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + <%}%> +
Loan Account No.Customer NameProduct DescriptionLoan Applied AmountInterest Category Desc
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + <%} else if ((screenName.equalsIgnoreCase("LoanRepayment.jsp")) && (lovKey.equalsIgnoreCase("LoanAcctSearch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + <%}%> +
Loan Account No.Customer NameLoan Product DescriptionSanctioned AmountLoan TermInterest Category DescDue Date (YYYY/MM/DD)
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%>
+ + <%} else if ((screenName.equalsIgnoreCase("LoanTransactionOperation.jsp")) && (lovKey.equalsIgnoreCase("LoanAcctSearchfor_Transaction"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No A/C found! Close this window & Please retry!.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
Loan Account No.Customer NameCustomer CodeProduct DescriptionLoan Sanctioned AmountInterest Category DescProduct Code
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(7)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%>
+ + <%} + } else if ((screenName.equalsIgnoreCase("LoanAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CustNameDetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
CIF NumberNameCustomer TypeAddress1Address2Address3
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%>
+ <%} else if ((screenName.equalsIgnoreCase("LoanInquiry.jsp")) && (lovKey.equalsIgnoreCase("CifDetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
CIF NumberNameCustomer TypeAddress1Address2Address3
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%>
+ <%} else if ((screenName.equalsIgnoreCase("RepayLoan.jsp")) && (lovKey.equalsIgnoreCase("LoanAcctSearch"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No such account found.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + + + + + <%}%> +
Loan Account No.Customer NameCustomer NumberGuardian NameSanction AmountSanction DateLast Repay DatePrinciple OutstandingTotal Interest OutstandingOutstanding BalanceEMIProduct DetailsInterest Detail
opener.document.RepayLoan.repayAmt.value = document.getElementById('e<%=i%>').innerHTML; opener.document.RepayLoan.closeAmt.value = document.getElementById('e<%=i%>').innerHTML;<%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%>opener.document.RepayLoan.repayAmt.value = document.getElementById('e<%=i%>').innerHTML; opener.document.RepayLoan.closeAmt.value = document.getElementById('e<%=i%>').innerHTML;<%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%>opener.document.RepayLoan.repayAmt.value = document.getElementById('e<%=i%>').innerHTML; opener.document.RepayLoan.closeAmt.value = document.getElementById('e<%=i%>').innerHTML;<%}%> + opener.document.getElementById('lonDetails').style.display = 'block'; + self.close();" style="cursor:pointer;"><%=resultSet.getString(15)%>opener.document.RepayLoan.repayAmt.value = document.getElementById('e<%=i%>').innerHTML; opener.document.RepayLoan.closeAmt.value = document.getElementById('e<%=i%>').innerHTML;<%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(14)%>opener.document.RepayLoan.repayAmt.value = document.getElementById('e<%=i%>').innerHTML; opener.document.RepayLoan.closeAmt.value = document.getElementById('e<%=i%>').innerHTML;<%}%> + opener.document.getElementById('lonDetails').style.display = 'block'; + self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%>opener.document.RepayLoan.repayAmt.value = document.getElementById('e<%=i%>').innerHTML; opener.document.RepayLoan.closeAmt.value = document.getElementById('e<%=i%>').innerHTML;<%}%> + opener.document.getElementById('lonDetails').style.display = 'block'; + self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%>opener.document.RepayLoan.repayAmt.value = document.getElementById('e<%=i%>').innerHTML; opener.document.RepayLoan.closeAmt.value = document.getElementById('e<%=i%>').innerHTML;<%}%> + opener.document.getElementById('lonDetails').style.display = 'block'; + self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%>opener.document.RepayLoan.repayAmt.value = document.getElementById('e<%=i%>').innerHTML; opener.document.RepayLoan.closeAmt.value = document.getElementById('e<%=i%>').innerHTML;<%}%> + opener.document.getElementById('lonDetails').style.display = 'block'; + self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%>opener.document.RepayLoan.repayAmt.value = document.getElementById('e<%=i%>').innerHTML; opener.document.RepayLoan.closeAmt.value = document.getElementById('e<%=i%>').innerHTML;<%}%> + opener.document.getElementById('lonDetails').style.display = 'block'; + self.close();" style="cursor:pointer;"><%=resultSet.getString(7)%>opener.document.RepayLoan.repayAmt.value = document.getElementById('e<%=i%>').innerHTML; opener.document.RepayLoan.closeAmt.value = document.getElementById('e<%=i%>').innerHTML;<%}%> + opener.document.getElementById('lonDetails').style.display = 'block'; + self.close();" style="cursor:pointer;"><%=resultSet.getString(8)%>opener.document.RepayLoan.repayAmt.value = document.getElementById('e<%=i%>').innerHTML; opener.document.RepayLoan.closeAmt.value = document.getElementById('e<%=i%>').innerHTML;<%}%> + opener.document.getElementById('lonDetails').style.display = 'block'; + self.close();" style="cursor:pointer;"><%=resultSet.getString(9)%>opener.document.RepayLoan.repayAmt.value = document.getElementById('e<%=i%>').innerHTML; opener.document.RepayLoan.closeAmt.value = document.getElementById('e<%=i%>').innerHTML;<%}%> + opener.document.getElementById('lonDetails').style.display = 'block'; + self.close();" style="cursor:pointer;"><%=resultSet.getString(10)%> : <%=resultSet.getString(11)%>opener.document.RepayLoan.repayAmt.value = document.getElementById('e<%=i%>').innerHTML; opener.document.RepayLoan.closeAmt.value = document.getElementById('e<%=i%>').innerHTML;<%}%> + opener.document.getElementById('lonDetails').style.display = 'block'; + self.close();" style="cursor:pointer;"><%=resultSet.getString(12)%> : <%=resultSet.getString(13)%>
+ <%}%> + + <%} else if ((screenName.equalsIgnoreCase("RepayLoan.jsp")) && (lovKey.equalsIgnoreCase("transferAccSrch"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No savings account for this CIF found.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%} + }%> +
Account Number:Customer NameProduct DescriptionAvailable Balance
<%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>:<%=resultSet.getString(6)%>-<%=resultSet.getString(5)%> <%=resultSet.getString(7)%><%=resultSet.getString(8)%>
+ <%} else if ((screenName.equalsIgnoreCase("RepayLoan.jsp")) && (lovKey.equalsIgnoreCase("glAccSrch"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No such GL Account found.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%} + }%> +
Account Number:Ledger NameGL CodeGL Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ <%} else if ((screenName.equalsIgnoreCase("mark_unmark_npa_loan.jsp")) && (lovKey.equalsIgnoreCase("loanAccount"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Account No.Customer NameCustomer No.
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ + + <%} else if ((screenName.equalsIgnoreCase("LoanTransactionOperation.jsp")) && (lovKey.equalsIgnoreCase("SavingsAccSearchTransfer"))) {%> + <%if (!resultSet.isBeforeFirst()) {%> +

No savings a/c found for this customer

+
<%} else {%> + + + <%int i = 0; + + while (resultSet.next()) { + + i++; + + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%} }%> +
Account No.Customer NameCustomer No.Product Type
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%>
+ <%} else if ((screenName.equalsIgnoreCase("LoanAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("Account"))) {%> + <%if (!resultSet.isBeforeFirst()) {%> +

No Deposit a/c found for this customer

+
<%} else {%> + + <%int i = 0; + + while (resultSet.next()) { + + i++; + + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> + +
Account No.Customer NameCustomer No.Product DetailsInterest CategoryAvail BalMaturity Date
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%><%=resultSet.getString(8)%><%=resultSet.getString(9)%>
+ + <%}%> + <%} else if (screenName.equalsIgnoreCase("LoanProductCreation.jsp") && (lovKey.equalsIgnoreCase("ParameterPdAmend"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
Product CodeProduct DescriptionInterest CategoryInterest Description
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ <%} + }else if (screenName.equalsIgnoreCase("LoanProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAYABLESearchLOVKey"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
GL CodeGL DescriptionID
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} + }else if (screenName.equalsIgnoreCase("LoanProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAYABLESearchLOVKeyAmend"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
GL CodeGL DescriptionID
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} + }else if (screenName.equalsIgnoreCase("LoanProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAIDSearchLOVKey"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
GL CodeGL DescriptionID
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} + }else if (screenName.equalsIgnoreCase("LoanProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAIDSearchLOVKeyAmend"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
GL CodeGL DescriptionID
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} + }else if (screenName.equalsIgnoreCase("LoanAccountCreationReadOnly.jsp") && (lovKey.equalsIgnoreCase("view_collateral"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Ref NoOpen DateExpiry DateAmount
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+
+

+
+ <%} + } + else if (screenName.equalsIgnoreCase("LoanAccountCreationReadOnly.jsp") && (lovKey.equalsIgnoreCase("view_collateral_Gold"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
Bond NoGross WeightNet Weight
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+
+

+
+ <%} + } else if (screenName.equalsIgnoreCase("RemoveLien.jsp") && (lovKey.equalsIgnoreCase("view_Gold"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
Bond NoGross WeightNet Weight
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+
+

+
+ <%} + } else if ((screenName.equalsIgnoreCase("amendInterest.jsp")) && (lovKey.equalsIgnoreCase("AccSrch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + + <%}%> +
Account NoProduct NameCustomer NameLimitAvailable BalancePrinciple OutstandingCurrent InterestPenal InterestNPA InterestTotal Interest
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%><%=resultSet.getString(9)%><%=resultSet.getString(10)%>
+ <%} + + else if ((screenName.equalsIgnoreCase("ForceDebitCapitalisation.jsp")) && (lovKey.equalsIgnoreCase("AccSrch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + + + <%}%> +
Account NoProduct NameCustomer NameSanction AmttOutstanding BalancePrinciple OutstandingCurrent InterestPenal InterestNPA InterestTotal InterestAccr Interest
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%><%=resultSet.getString(9)%><%=resultSet.getString(10)%><%=resultSet.getString(11)%>
+ <%} + + else if ((screenName.equalsIgnoreCase("KCCForceCapitalisation.jsp")) && (lovKey.equalsIgnoreCase("AccSrch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + + + <%}%> +
Account NoProduct NameCustomer NameSanction AmttOutstanding BalancePrinciple OutstandingCurrent InterestPenal InterestNPA InterestTotal InterestAccr Interest
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%><%=resultSet.getString(9)%><%=resultSet.getString(10)%><%=resultSet.getString(11)%>
+ <%} + else if (screenName.equalsIgnoreCase("AccountStatement_Report.jsp") && (lovKey.equalsIgnoreCase("searchReport"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ + <%} else {%> + + <%if (reportType.equalsIgnoreCase("GL")) {%> + + <%} else {%> + + <%}%> + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + <% if (reportType.equalsIgnoreCase("GL")) {%> + + + + + + <%} else {%> + + + + + + <%}%> + <%}%> +
Account No.GL NumberGL DescGL Code
Account No.Product DescCustomer NameCIF NO
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ <%} + } + else if (screenName.equalsIgnoreCase("CustomerNetWorth_Report.jsp") && (lovKey.equalsIgnoreCase("searchReport"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Result found! Please try again.

+ +
+ <%} else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + <%}%> +
CIF NumberCustomer Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%}%> + <%}%> + +
+ + <% + } catch (Exception ex) { + // System.out.println(ex); + } finally { + if (resultSet != null) { + resultSet.close(); + } + if (pstmt != null) { + pstmt.close(); + } + if (conn != null) { + conn.close(); + } + } + %> + + diff --git a/IPKS_Updated/web/web/web/CommonSearchInformationPdsLOV.jsp b/IPKS_Updated/web/web/web/CommonSearchInformationPdsLOV.jsp new file mode 100644 index 0000000..d9aa133 --- /dev/null +++ b/IPKS_Updated/web/web/web/CommonSearchInformationPdsLOV.jsp @@ -0,0 +1,1087 @@ +<%-- + Document : CommonSearchInformationPdsLOV + Created on : Mar 10, 2016, 2:30:36 AM + Author : SUBHAM +--%> + +<%@page import="java.sql.PreparedStatement"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> + + + + + + Customer Information Search + + + <% + String searchString1 = ""; + String screenName = ""; + String searchString2 = ""; + String lovKey = ""; + String textIndex = ""; + String unitVal, unit = ""; + screenName = request.getParameter("screenName"); + lovKey = request.getParameter("lovKey"); + String pacsId = session.getAttribute("pacsId").toString(); + String productId = request.getParameter("productId"); + + String headerQry = null; + + if (screenName.equalsIgnoreCase("memberEnrollment.jsp") && (lovKey.equalsIgnoreCase("memberDetails"))) { + + searchString1 = request.getParameter("cifNumber"); + searchString2 = request.getParameter("cifName"); + + // if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,card_no,name from pds_card_holders"; + /* } else if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select id,card_no,name from pds_card_holders where name="+searchString2; + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,card_no,name from pds_card_holders where card_no="+searchString1; + } else { + headerQry = "select id,card_no,name from pds_card_holders where name="+searchString2+"and card_no="+searchString1; + }*/ + + } else if (screenName.equalsIgnoreCase("memberEnrollment.jsp") && (lovKey.equalsIgnoreCase("cardTypeSearch"))) { + + searchString1 = request.getParameter("cifNumber"); + searchString2 = request.getParameter("cifName"); + + //if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select card_type_id,card_type,card_desc from pds_card_type_mst"; + /* } else if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select card_type_id,card_type,card_desc from pds_card_type_mst where name="+searchString2; + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,card_no,name from pds_card_holders where card_no="+searchString1; + } else { + headerQry = "select id,card_no,name from pds_card_holders where name="+searchString2+"and card_no="+searchString1; + }*/ + + } else if (screenName.equalsIgnoreCase("memberEnrollment.jsp") && (lovKey.equalsIgnoreCase("cardTypeSearchAmend"))) { + + searchString1 = request.getParameter("cifNumber"); + searchString2 = request.getParameter("cifName"); + + //if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select card_type_id,card_type,card_desc from pds_card_type_mst"; + /* } else if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select card_type_id,card_type,card_desc from pds_card_type_mst where name="+searchString2; + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,card_no,name from pds_card_holders where card_no="+searchString1; + } else { + headerQry = "select id,card_no,name from pds_card_holders where name="+searchString2+"and card_no="+searchString1; + }*/ + + } else if (screenName.equalsIgnoreCase("raiseRequisition.jsp") && (lovKey.equalsIgnoreCase("memberDetails"))) { + + // searchString1 = request.getParameter("cifNumber"); + // searchString2 = request.getParameter("cifName"); + + if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name from kyc_details t,dep_account dp where dp.customer_no = t.cif_no and dp.pacs_id = '" + pacsId + "'"; + } else if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name from kyc_details t,dep_account dp where trim(first_name)||trim(middle_name)||trim(last_name) like '%" + searchString2.replace(' ', '%') + "%' and dp.customer_no = t.cif_no and dp.pacs_id = '" + pacsId + "'"; + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name from kyc_details t,dep_account dp where cif_no like '%" + searchString1.replace(' ', '%') + "%' and dp.customer_no = t.cif_no and dp.pacs_id = '" + pacsId + "'"; + } else { + headerQry = "select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name from kyc_details t,dep_account dp where cif_no like '%" + searchString1.replace(' ', '%') + "%' and trim(first_name)||trim(middle_name)||trim(last_name) like '%" + searchString2.replace(' ', '%') + "%' and dp.customer_no = t.cif_no and dp.pacs_id = '" + pacsId + "'"; + } + + } else if (screenName.equalsIgnoreCase("purchasedetail.jsp") && (lovKey.equalsIgnoreCase("memberDetails"))) { + + // searchString1 = request.getParameter("cifNumber"); + // searchString2 = request.getParameter("cifName"); + + if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name from kyc_details t,dep_account dp where dp.customer_no = t.cif_no and dp.pacs_id = '" + pacsId + "'"; + } else if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name from kyc_details t,dep_account dp where trim(first_name)||trim(middle_name)||trim(last_name) like '%" + searchString2.replace(' ', '%') + "%' and dp.customer_no = t.cif_no and dp.pacs_id = '" + pacsId + "'"; + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name from kyc_details t,dep_account dp where cif_no like '%" + searchString1.replace(' ', '%') + "%' and dp.customer_no = t.cif_no and dp.pacs_id = '" + pacsId + "'"; + } else { + headerQry = "select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name from kyc_details t,dep_account dp where cif_no like '%" + searchString1.replace(' ', '%') + "%' and trim(first_name)||trim(middle_name)||trim(last_name) like '%" + searchString2.replace(' ', '%') + "%' and dp.customer_no = t.cif_no and dp.pacs_id = '" + pacsId + "'"; + } + + } else if (screenName.equalsIgnoreCase("raiseRequisition.jsp") && (lovKey.equalsIgnoreCase("PdsProductSearch"))) { + + textIndex = request.getParameter("textIndex"); + + headerQry = "select to_char(st.STOCK_ENTRY_DATE,'DD/MM/YYYY'),pd.id as product_id,st.id as stock_id,pd.product_name,pd.product_code,st.QUANTITY_AVL, round((pd.profit_factor*st.price)/100 + st.price,2) " + + "from pds_product_mst pd,pds_stock_register st " + + "where pd.id=st.product_id and st.pacs_id = '" + pacsId + "' " + + "order by pd.product_code, st.STOCK_ENTRY_DATE"; + } else if (screenName.equalsIgnoreCase("pds_stock_register.jsp") && (lovKey.equalsIgnoreCase("PdsProductSearch"))) { + + textIndex = request.getParameter("textIndex"); + //searchString1= request.getParameter("productType"); + // searchString2= request.getParameter("productSubType"); + + + // if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc,unit from pds_product_mst"; + /* } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc,unit from pds_product_mst where item_type="+searchString1; + } else if (!searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc,unit from pds_product_mst where item_type="+searchString1+"and item_subtype="+searchString2; + }*/ + + + } else if (screenName.equalsIgnoreCase("pds_stock_register.jsp") && (lovKey.equalsIgnoreCase("PdsProductSearch1"))) { + + + // searchString1 = request.getParameter("productTypeSearch"); + //searchString2 = request.getParameter("productSubTypeSearch"); + + + if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc from pds_product_mst"; + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc from pds_product_mst where item_type=" + searchString1; + } else if (!searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc from pds_product_mst where item_type=" + searchString1 + "and item_subtype=" + searchString2; + } + + + } else if (screenName.equalsIgnoreCase("pdsSalesRegister.jsp") && (lovKey.equalsIgnoreCase("PdsProductSearch"))) { + + + //searchString1 = request.getParameter("productTypeSearch"); + // searchString2 = request.getParameter("productSubTypeSearch"); + + + if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc from pds_product_mst"; + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc from pds_product_mst where item_type=" + searchString1; + } else if (!searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc from pds_product_mst where item_type=" + searchString1 + "and item_subtype=" + searchString2; + } + + + } else if (screenName.equalsIgnoreCase("pdsSalesRegister.jsp") && (lovKey.equalsIgnoreCase("memberDetails"))) { + + searchString1 = request.getParameter("cifNumber"); + searchString2 = request.getParameter("cifName"); + + // if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,card_no,name from pds_card_holders"; + /* } else if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select id,card_no,name from pds_card_holders where name="+searchString2; + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,card_no,name from pds_card_holders where card_no="+searchString1; + } else { + headerQry = "select id,card_no,name from pds_card_holders where name="+searchString2+"and card_no="+searchString1; + }*/ + + } else if (screenName.equalsIgnoreCase("pdsRationCardTypeMaster.jsp") && (lovKey.equalsIgnoreCase("PdsProductSearch"))) { + + textIndex = request.getParameter("textIndex"); + headerQry = "select id,item_type,type_desc, item_subtype,subtype_desc,decode(p.unit,'1','K.g.','2','Lt.','3','Packets') unit from pds_product_mst p"; + } else if (screenName.equalsIgnoreCase("pdsProductCreation.jsp") && (lovKey.equalsIgnoreCase("PdsProductSearch"))) { + + + headerQry = "select id,item_type,type_desc, item_subtype, subtype_desc, from pds_product_mst"; + + } else if (screenName.equalsIgnoreCase("pdsProductCreation.jsp") && (lovKey.equalsIgnoreCase("PdsProductSearch1"))) { + + + //searchString1 = request.getParameter("productTypeSearch"); + //searchString2 = request.getParameter("productSubTypeSearch"); + + + if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc from pds_product_mst"; + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc from pds_product_mst where type_desc='" + searchString1 + "'"; + } else if (!searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc from pds_product_mst where type_desc='" + searchString1 + "' and subtype_desc='" + searchString2 + "'"; + } + + + + + + } else if (screenName.equalsIgnoreCase("pdsRationCardTypeMaster.jsp") && (lovKey.equalsIgnoreCase("cardDetails"))) { + + //searchString1 = request.getParameter("cardTypeSearch"); + //searchString2 = request.getParameter("cardDescriptionSearch"); + + if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select card_type_id,card_type,card_desc from pds_card_type_mst "; + } else if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select card_type_id,card_type,card_desc from pds_card_type_mst where upper(card_desc) like upper('%" + searchString2.replace(' ', '%') + "%') "; + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select card_type_id,card_type,card_desc from pds_card_type_mst where upper(card_type) like upper('%" + searchString1.replace(' ', '%') + "%') "; + } else { + headerQry = "select card_type_id,card_type,card_desc from pds_card_type_mst where upper(card_type) like upper('%" + searchString1.replace(' ', '%') + "%')and upper(card_desc) like upper('%" + searchString2.replace(' ', '%') + "%') "; + } + + + + } else if (screenName.equalsIgnoreCase("pdsRationCardTypeMaster.jsp") && (lovKey.equalsIgnoreCase("PdsProductSearchAmend"))) { + textIndex = request.getParameter("textIndex"); + + headerQry = "select id,item_type,type_desc, item_subtype,subtype_desc,decode(p.unit,'1','K.g.','2','Lt.','3','Packets') unit from pds_product_mst p"; + + } else if (screenName.equalsIgnoreCase("pdsRationingLedger.jsp") && (lovKey.equalsIgnoreCase("memberDetails"))) { + + // searchString1 = request.getParameter("cardNo"); + // searchString2 = request.getParameter("CustomerName"); + + if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select h.id,h.card_no,h.name,m.card_type " + + "from pds_card_holders h,pds_card_type_mst m " + + "where h.card_type_id=m.card_type_id and h.pacs_id = '" + pacsId + "' "; + + } else if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select h.id,h.card_no,h.name,m.card_type " + + "from pds_card_holders h,pds_card_type_mst m " + + "where h.card_type_id=m.card_type_id and h.pacs_id = '" + pacsId + "' and upper(h.name) like upper('%" + searchString2.replace(' ', '%') + "%') "; + + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select h.id,h.card_no,h.name,m.card_type " + + "from pds_card_holders h,pds_card_type_mst m " + + "where h.card_type_id=m.card_type_id and h.pacs_id = '" + pacsId + "' and h.card_no like '%" + searchString1.replace(' ', '%') + "%' "; + } else { + headerQry = "select h.id,h.card_no,h.name,m.card_type " + + "from pds_card_holders h,pds_card_type_mst m " + + "where h.card_type_id=m.card_type_id and h.pacs_id = '" + pacsId + "' and h.card_no like '%" + searchString1.replace(' ', '%') + "%' and upper(h.name) like upper('%" + searchString2.replace(' ', '%') + "%') "; + } + + + } else if (screenName.equalsIgnoreCase("PdsSellItem.jsp") && (lovKey.equalsIgnoreCase("memberDetails"))) { + + //searchString1 = request.getParameter("memberName"); + //searchString2 = request.getParameter("cardNo"); + + if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select t.id,t.card_no,t.name,t.card_type_id,m.card_type from pds_card_holders t,pds_card_type_mst m where t.pacs_id='" + pacsId + "' and t.card_type_id=m.card_type_id"; + } else if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select t.id,t.card_no,t.name,t.card_type_id ,m.card_type from pds_card_holders t,pds_card_type_mst m where t.pacs_id='" + pacsId + "' and t.card_type_id=m.card_type_id and t.card_no like '%" + searchString2.replace(' ', '%') + "%' "; + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select t.id,t.card_no,t.name,t.card_type_id ,m.card_type from pds_card_holders t,pds_card_type_mst m where t.pacs_id='" + pacsId + "' and t.card_type_id=m.card_type_id and upper(t.name) like upper('%" + searchString1.replace(' ', '%') + "%') "; + } else { + headerQry = "select t.id,t.card_no,t.name,t.card_type_id ,m.card_type from pds_card_holders t,pds_card_type_mst m where t.pacs_id='" + pacsId + "' and t.card_type_id=m.card_type_id and t.card_no like '%" + searchString2.replace(' ', '%') + "%' and upper(t.name) like upper('%" + searchString1.replace(' ', '%') + "%') "; + } + } else if (screenName.equalsIgnoreCase("PdsSellItem.jsp") && (lovKey.equalsIgnoreCase("PdsProductSearchForSell"))) { + + textIndex = request.getParameter("textIndex"); + //searchString1 = request.getParameter("memberId"); + // searchString2 = request.getParameter("cardTypeId"); + + + + headerQry = "select m.id,m.item_type,m.type_desc ,m.item_subtype,m.subtype_desc , " + + " sum(o.qty_remaining),t.id,d.unit_sell_rate,t.qty_remaining,to_char(t.stock_entry_date,'DD-MON-YYYY') " + + " from pds_product_mst m,pds_stock_register t,pds_ration_ledger o,pds_card_type_dtl d,pds_card_holders h " + + " where m.id=o.prod_id and d.prod_id=o.prod_id and t.prod_id=m.id and h.card_type_id=d.hdr_id " + + " and h.id=o.holder_id and t.qty_remaining >0 and o.avail_status='Y' and t.pacs_id=o.pacs_id " + + " and o.pacs_id=h.pacs_id and h.pacs_id= '" + pacsId + "' and h.id= '" + searchString1 + "' " + + " and d.hdr_id='" + searchString2 + "' group by m.id,to_char(t.stock_entry_date,'DD-MON-YYYY'),m.item_type,m.type_desc ,m.item_subtype,m.subtype_desc, " + + " d.elig_qty,t.id,d.unit_sell_rate,t.qty_remaining order by to_char(t.stock_entry_date, 'DD-MON-YYYY') "; + + + } + Connection conn = DbHandler.getDBConnection(); + PreparedStatement pstmt = null; + + ResultSet resultSet = null; + String bgColor = null; + int flag = 1; + + try { + pstmt = conn.prepareStatement(headerQry); + resultSet = pstmt.executeQuery(); + System.out.println(headerQry); + + %> + + +
+ + + <% if (screenName.equalsIgnoreCase("memberEnrollment.jsp") && (lovKey.equalsIgnoreCase("memberDetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
IDCard NoMember Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} else if (screenName.equalsIgnoreCase("memberEnrollment.jsp") && (lovKey.equalsIgnoreCase("cardTypeSearch"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
Card Type IDCard TypeCard Description
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} else if (screenName.equalsIgnoreCase("memberEnrollment.jsp") && (lovKey.equalsIgnoreCase("cardTypeSearchAmend"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + <%}%> +
Card Type IDCard TypeCard Description
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} else if (screenName.equalsIgnoreCase("pds_stock_register.jsp") && (lovKey.equalsIgnoreCase("PdsproductSearch"))) {%> + + + <%int i = 0; + + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + } + unitVal = resultSet.getString(6); + if (unitVal.equalsIgnoreCase("1")) { + unit = "Kg"; + } else if (unitVal.equalsIgnoreCase("2")) { + unit = "Ltr"; + } else if (unitVal.equalsIgnoreCase("3")) { + unit = "Packets"; + }%> + + + + + + + + <%}%> +
Product IDProduct TypeProduct Sub TypeUnit
<%=resultSet.getString(1)%><%=resultSet.getString(2) + ":" + resultSet.getString(3)%><%=resultSet.getString(4) + ":" + resultSet.getString(5)%><%=unit%>
+ + <%} else if (screenName.equalsIgnoreCase("raiseRequisition.jsp") && (lovKey.equalsIgnoreCase("memberDetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + <%}%> +
Member IDMember Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} else if (screenName.equalsIgnoreCase("purchasedetail.jsp") && (lovKey.equalsIgnoreCase("memberDetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + <%}%> +
Member IDMember Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} else if (screenName.equalsIgnoreCase("raiseRequisition.jsp") && (lovKey.equalsIgnoreCase("PdsproductSearch"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
Purchase DateProduct IDStock IDProduct NameProduct CodeProduct Quantity(KG)Product Price
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%>
+ <%} else if (screenName.equalsIgnoreCase("pds_stock_register.jsp") && (lovKey.equalsIgnoreCase("PdsproductSearch1"))) {%> + + + <%int i = 0; + + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + } + %> + + + + + + + + + + <%}%> +
Product IDProduct TypeProduct Type DescProduct Sub TypeProduct SubType Desc
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} else if (screenName.equalsIgnoreCase("pdsSalesRegister.jsp") && (lovKey.equalsIgnoreCase("memberDetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
IDCard NoMember Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} else if (screenName.equalsIgnoreCase("pdsSalesRegister.jsp") && (lovKey.equalsIgnoreCase("PdsproductSearch"))) {%> + + + <%int i = 0; + + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + } + %> + + + + + + + + + + <%}%> +
Product IDProduct TypeProduct Type DescProduct Sub TypeProduct SubType Desc
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} else if (screenName.equalsIgnoreCase("pdsRationCardTypeMaster.jsp") && (lovKey.equalsIgnoreCase("PdsProductSearch"))) {%> + + + <%int i = 0; + + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + } + %> + + + + + + + + + + + <%}%> +
Product IDProduct TypeProduct Type DescProduct Sub TypeProduct SubType DescUnit
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%>
+ <%} else if (screenName.equalsIgnoreCase("pdsProductCreation.jsp") && (lovKey.equalsIgnoreCase("PdsProductSearch"))) {%> + + + <%int i = 0; + + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + } + %> + + + + + + + + + + <%}%> +
Product IDProduct TypeProduct Type DescProduct Sub TypeProduct SubType Desc
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} else if (screenName.equalsIgnoreCase("pdsRationCardTypeMaster.jsp") && (lovKey.equalsIgnoreCase("cardDetails"))) {%> + + + <%int i = 0; + + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + } + %> + + + + + + + + + <%}%> +
IDCard TypeCard Desc
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} else if (screenName.equalsIgnoreCase("pdsRationCardTypeMaster.jsp") && (lovKey.equalsIgnoreCase("PdsProductSearchAmend"))) {%> + + + <%int i = 0; + + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + } + %> + + + + + + + + + + + <%}%> +
Product IDProduct TypeProduct Type DescProduct Sub TypeProduct SubType DescUnit
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%>
+ <%} else if (screenName.equalsIgnoreCase("pdsRationingLedger.jsp") && (lovKey.equalsIgnoreCase("memberDetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Customer IDRation Card No.Customer NameCard Type
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ <%} else if (screenName.equalsIgnoreCase("PdsSellItem.jsp") && (lovKey.equalsIgnoreCase("memberDetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + <%}%> +
Customer IDRation Card No.Customer NameCustomer Card TypeCustomer Card ID
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(5)%><%=resultSet.getString(4)%>
+ + + <%} else if (screenName.equalsIgnoreCase("pdsProductCreation.jsp") && (lovKey.equalsIgnoreCase("PdsproductSearch1"))) {%> + + + <%int i = 0; + + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + } + %> + + + + + + + + + + <%}%> +
Product IDProduct TypeProduct Type DescProduct Sub TypeProduct SubType Desc
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + + <%} else if (screenName.equalsIgnoreCase("PdsSellItem.jsp") && (lovKey.equalsIgnoreCase("PdsProductSearchForSell"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + + <%}%> +
Product IDCommodity TypeCommodity DescriptionCommodity SubtypeSubtype DescriptionEligible Quantity RemainingStock IDPrice/UnitStock Avaible QuantityStock Entry Date
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%><%=resultSet.getString(9)%><%=resultSet.getString(10)%>
+ <%}%> +
+ + <% + } catch (Exception ex) { + + System.out.println(headerQry); + + } finally { + if (resultSet != null) { + resultSet.close(); + } + if (pstmt != null) { + pstmt.close(); + } + if (conn != null) { + conn.close(); + } + } + %> + + diff --git a/IPKS_Updated/web/web/web/CommonSearchInformationShgLOV.jsp b/IPKS_Updated/web/web/web/CommonSearchInformationShgLOV.jsp new file mode 100644 index 0000000..fdbbc81 --- /dev/null +++ b/IPKS_Updated/web/web/web/CommonSearchInformationShgLOV.jsp @@ -0,0 +1,1200 @@ +<%-- + Document : CommonSearchInformationShgLOV + Created on : Mar 10, 2016, 2:30:36 AM + Author : SUBHAM +--%> + +<%@page import="java.sql.PreparedStatement"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> + + + + + + Customer Information Search + + + <% + String searchString1 = ""; + String screenName = ""; + String searchString2 = ""; + String lovKey = ""; + String textIndex = ""; + + screenName = request.getParameter("screenName"); + lovKey = request.getParameter("lovKey"); + String pacsId = session.getAttribute("pacsId").toString(); + String ShgId = request.getParameter("shg_id"); + + String headerQry = null; + + if (screenName.equalsIgnoreCase("BasicInformation.jsp") && (lovKey.equalsIgnoreCase("BasicInformation"))) { + + searchString1 = request.getParameter("Search"); + // if (searchString1.equalsIgnoreCase("")) { + headerQry = "select shg_id,shg_code,name_of_shg from basic_info j where (j.pacs_id in(select p.pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))) "; + // } else if (!searchString1.equalsIgnoreCase("")) { + // headerQry = "select shg_id,shg_code,name_of_shg from basic_info j where (j.pacs_id in(select p.pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))) and shg_code like '%" + searchString1.replace(' ', '%') + "%' "; + + // } + } else if (screenName.equalsIgnoreCase("BasicInformation.jsp") && (lovKey.equalsIgnoreCase("cif"))) { + + // searchString1 = request.getParameter("cif"); + // if (searchString1.equalsIgnoreCase("")) { + headerQry = "select j.cif_no,(j.first_name|| ' ' ||nvl(j.middle_name,' ')|| ' ' ||nvl(j.last_name,' ')) name from kyc_hdr j where j.cif_no = '" + searchString1.replace(' ', '%') + "' and (j.pacs_id in(select p.pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))) "; + + } else if (screenName.equalsIgnoreCase("BasicInformation.jsp") && (lovKey.equalsIgnoreCase("cifamend"))) { + + // searchString1 = request.getParameter("cifamend"); + // if (searchString1.equalsIgnoreCase("")) { + headerQry = "select j.cif_no,(j.first_name||nvl(j.middle_name,'')||nvl(j.last_name,'')) name from kyc_hdr j where (j.pacs_id in(select p.pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))) and j.cif_no = '" + searchString1.replace(' ', '%') + "' "; + + }else if (screenName.equalsIgnoreCase("AddressDetails.jsp") && (lovKey.equalsIgnoreCase("addressDetails"))) { + + searchString1 = request.getParameter("Search"); + //if (searchString1.equalsIgnoreCase("")) { + headerQry = "select A.shg_id,A.shg_code,B.name_of_shg from ADDRESS_DETAILS A,basic_info B where A.shg_id=to_number(B.shg_id) and B.pacs_id in(select p.pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))"; + // } else if (!searchString1.equalsIgnoreCase("")) { + // headerQry = "select shg_id,shg_code from ADDRESS_DETAILS where shg_code like '%" + searchString1.replace(' ', '%') + "%' "; + // } + + } else if (screenName.equalsIgnoreCase("AddressDetails.jsp") && (lovKey.equalsIgnoreCase("addressDetailscode"))) { + + searchString1 = request.getParameter("Search"); + //if (searchString1.equalsIgnoreCase("")) { + headerQry = "select SHG_CODE, NAME_OF_SHG, case GRP_CATEGORY when '1' then 'SGSY' when '2' then 'NABARD' when '3' then 'Co-Operative' when '4' then 'Others' end as Grp_Category, to_char(DATE_OF_FORMATION,'DD-MON-RRRR') as DATE_OF_FORMATION , DURATION from BASIC_INFO where pacs_id in(select p.pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))"; + + // } else if (!searchString1.equalsIgnoreCase("")) { + // headerQry = "select shg_id,shg_code from ADDRESS_DETAILS where shg_code like '%" + searchString1.replace(' ', '%') + "%' "; + // } + + } else if (screenName.equalsIgnoreCase("MemberDetails.jsp") && (lovKey.equalsIgnoreCase("MemberDetails"))) { + + + searchString1 = request.getParameter("Search"); + //if (searchString1.equalsIgnoreCase("")) {select A.shg_code,B.name_of_shg,A.member_name from Member_Details A,basic_info B where A.shg_code=B.shg_code + headerQry = "select distinct A.shg_code,B.name_of_shg from Member_Information A,basic_info B where A.shg_id=B.shg_id and B.pacs_id in(select p.pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))"; + //} else if (!searchString1.equalsIgnoreCase("")) { + // headerQry = "select member_id,shg_code,member_code,member_name from Member_Details where member_code like '%" + searchString1.replace(' ', '%') + "%' "; + //} + } else if (screenName.equalsIgnoreCase("MemberDetails.jsp") && (lovKey.equalsIgnoreCase("MemberDetailscode"))) { + + + searchString1 = request.getParameter("Search"); + //if (searchString1.equalsIgnoreCase("")) { + headerQry = "select SHG_CODE, NAME_OF_SHG, case GRP_CATEGORY when '1' then 'SGSY' when '2' then 'NABARD' when '3' then 'Co-Operative' when '4' then 'Others' end as Grp_Category, to_char(DATE_OF_FORMATION,'DD-MON-RRRR') as DATE_OF_FORMATION , DURATION from BASIC_INFO where shg_id not in (select shg_id from member_information) and pacs_id in(select p.pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))"; + + // } else if (!searchString1.equalsIgnoreCase("")) { + // headerQry = "select shg_id,shg_code from ADDRESS_DETAILS where shg_code like '%" + searchString1.replace(' ', '%') + "%' "; + // } + } else if (screenName.equalsIgnoreCase("ShgActivities.jsp") && (lovKey.equalsIgnoreCase("shgDetails"))) { + + + searchString1 = request.getParameter("Search"); + //if (searchString1.equalsIgnoreCase("")) { + headerQry = "select A.shg_id,A.shg_code,B.name_of_shg from SHG_ACTIVITIES A,basic_info B where A.shg_id=to_number(B.shg_id) and B.pacs_id in(select p.pacs_id from pacs_master p where p.head_pacs_id in (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))"; + // } else if (!searchString1.equalsIgnoreCase("")) { + // headerQry = "select shg_id,shg_code from ADDRESS_DETAILS where shg_code like '%" + searchString1.replace(' ', '%') + "%' "; + // } + } else if (screenName.equalsIgnoreCase("ShgActivities.jsp") && (lovKey.equalsIgnoreCase("shgDetailscode"))) { + + searchString1 = request.getParameter("Search"); + //if (searchString1.equalsIgnoreCase("")) { + headerQry = "select SHG_CODE, NAME_OF_SHG, case GRP_CATEGORY when '1' then 'SGSY' when '2' then 'NABARD' when '3' then 'Co-Operative' when '4' then 'Others' end as Grp_Category, to_char(DATE_OF_FORMATION,'DD-MON-RRRR') as DATE_OF_FORMATION , DURATION from BASIC_INFO where pacs_id in(select p.pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "')) "; + + // } else if (!searchString1.equalsIgnoreCase("")) { + // headerQry = "select shg_id,shg_code from ADDRESS_DETAILS where shg_code like '%" + searchString1.replace(' ', '%') + "%' "; + // } + } else if (screenName.equalsIgnoreCase("AccountDetails.jsp") && (lovKey.equalsIgnoreCase("AccountDetailscode"))) { + + searchString1 = request.getParameter("Search"); + //if (searchString1.equalsIgnoreCase("")) { + headerQry = "select SHG_CODE, NAME_OF_SHG, case GRP_CATEGORY when '1' then 'SGSY' when '2' then 'NABARD' when '3' then 'Co-Operative' when '4' then 'Others' end as Grp_Category, to_char(DATE_OF_FORMATION,'DD-MON-RRRR') as DATE_OF_FORMATION , DURATION from BASIC_INFO where pacs_id in(select p.pacs_id from pacs_master p where p.head_pacs_id =(select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))"; + + // } else if (!searchString1.equalsIgnoreCase("")) { + // headerQry = "select shg_id,shg_code from ADDRESS_DETAILS where shg_code like '%" + searchString1.replace(' ', '%') + "%' "; + // } + } else if (screenName.equalsIgnoreCase("AccountDetails.jsp") && (lovKey.equalsIgnoreCase("AccountDetailsLoan"))) { + + + searchString1 = request.getParameter("Search"); + //if (searchString1.equalsIgnoreCase("")) { + headerQry = "select distinct A.shg_id,A.shg_code,B.name_of_shg from Account_Details_Loan A,basic_info B where A.shg_code=B.shg_code and B.pacs_id in(select p.pacs_id from pacs_master p where p.head_pacs_id =(select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))"; + // } else if (!searchString1.equalsIgnoreCase("")) { + // headerQry = "select shg_id,shg_code from ADDRESS_DETAILS where shg_code like '%" + searchString1.replace(' ', '%') + "%' "; + // } + } else if (screenName.equalsIgnoreCase("AccountDetails.jsp") && (lovKey.equalsIgnoreCase("AccountDetailsLoan2"))) { + + + searchString1 = request.getParameter("Search"); + //if (searchString1.equalsIgnoreCase("")) { + headerQry = "select distinct A.shg_id,A.shg_code,B.name_of_shg from Account_Details_Loan A,basic_info B where A.shg_code=B.shg_code and B.pacs_id in(select p.pacs_id from pacs_master p where p.head_pacs_id =(select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))"; + // } else if (!searchString1.equalsIgnoreCase("")) { + // headerQry = "select shg_id,shg_code from ADDRESS_DETAILS where shg_code like '%" + searchString1.replace(' ', '%') + "%' "; + // } + }else if (screenName.equalsIgnoreCase("AccountDetails.jsp") && (lovKey.equalsIgnoreCase("AccountDetailsLoan3"))) { + + + searchString1 = request.getParameter("Search"); + //if (searchString1.equalsIgnoreCase("")) { + headerQry = "select distinct b.shg_id,b.shg_code,name_of_shg from basic_info b,kyc_hdr k where b.cif=k.cif_no and k.pacs_id in(select p.pacs_id from pacs_master p where p.head_pacs_id in (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))"; + // } else if (!searchString1.equalsIgnoreCase("")) { + // headerQry = "select shg_id,shg_code from ADDRESS_DETAILS where shg_code like '%" + searchString1.replace(' ', '%') + "%' "; + // } + } + else if (screenName.equalsIgnoreCase("AccountDetails.jsp") && (lovKey.equalsIgnoreCase("AccountDetailsDeposit"))) { + + + searchString1 = request.getParameter("Search"); + + headerQry = "select distinct A.shg_id,A.shg_code,B.name_of_shg from Account_Details_Deposit A,basic_info B where A.shg_code=B.shg_code and B.pacs_id in(select p.pacs_id from pacs_master p where p.head_pacs_id =(select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))"; + + } else if (screenName.equalsIgnoreCase("AccountDetails.jsp") && (lovKey.equalsIgnoreCase("AccountDetailsDeposit2"))) { + + + searchString1 = request.getParameter("Search"); + + headerQry = "select distinct A.shg_id,A.shg_code,B.name_of_shg from Account_Details_Deposit A,basic_info B where A.shg_code=B.shg_code and B.pacs_id in(select p.pacs_id from pacs_master p where p.head_pacs_id =(select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))"; + + } else if (screenName.equalsIgnoreCase("AccountDetails.jsp") && (lovKey.equalsIgnoreCase("AccountDetailsDeposit3"))) { + + + searchString1 = request.getParameter("Search"); + + headerQry = "select distinct b.shg_id,b.shg_code,name_of_shg from basic_info b,kyc_hdr k where b.cif=k.cif_no and k.pacs_id in(select p.pacs_id from pacs_master p where p.head_pacs_id in (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))"; + + } else if (screenName.equalsIgnoreCase("shg_reports.jsp") && (lovKey.equalsIgnoreCase("SearchShg"))) { + + // searchString1 = request.getParameter("shg_name"); + if (searchString1.equalsIgnoreCase("")) { + headerQry = "select shg_id,name_of_shg from basic_info where pacs_id in(select p.pacs_id from pacs_master p where p.head_pacs_id in (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))"; + } else if (!searchString1.equalsIgnoreCase("")) { + headerQry = "select shg_id,name_of_shg from basic_info where name_of_shg like '%" + searchString1.replace(' ', '%') + "%' and pacs_id in(select p.pacs_id from pacs_master p where p.head_pacs_id in (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))"; + + } + + + } else if (screenName.equalsIgnoreCase("shg_reports.jsp") && (lovKey.equalsIgnoreCase("SearchShg_Bank"))) { + + searchString1 = request.getParameter("shg_name_Bank"); + // searchString2 = request.getParameter("pacs_code"); + + headerQry = "select shg_id,name_of_shg from basic_info where pacs_id in(select p.pacs_id from pacs_master p where p.head_pacs_id in (select head_pacs_id from pacs_master where pacs_id like '%" + searchString2.replace(' ', '%') + "%'))"; + + } else if (screenName.equalsIgnoreCase("AccountDetails.jsp") && (lovKey.equalsIgnoreCase("Shg_code"))) { + headerQry = "select shg_id,name_of_shg from basic_info where pacs_id in(select p.pacs_id from pacs_master p where p.head_pacs_id in (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))"; + + } else if (screenName.equalsIgnoreCase("AccountDetails.jsp") && (lovKey.equalsIgnoreCase("searchShgMembers"))) { + + + // searchString1 = request.getParameter("searchShg"); + + headerQry = "select member_id,member_name from Member_Information where shg_id like '%" + searchString1.replace(' ', '%') + "%' "; + + } else if (screenName.equalsIgnoreCase("EmployeeMaster.jsp") && (lovKey.equalsIgnoreCase("PickUPSalary"))) { + + //searchString1 = request.getParameter("accNo"); + searchString2 = request.getParameter("textIndex"); + + headerQry = " select key_1 Acct,avail_bal balance from dep_account where customer_no='"+searchString1+"' and pacs_id='" + pacsId + "' and dep_prod_id in (select id from dep_product dp where dp.prod_code='1101' and substr(dp.int_cat,1,1)='1') and substr(gl_class_code,9,2)='14' "; + + } else if (screenName.equalsIgnoreCase("EmployeeMaster.jsp") && (lovKey.equalsIgnoreCase("PickUPDesgCode"))) { + + searchString1 = request.getParameter("accNo"); + searchString2 = request.getParameter("textIndex"); + + headerQry = " select ID, DESIGNATION from designation_master k where k.pacs_id = '" + pacsId + "' and k.status = 'Y' "; + + } else if (screenName.equalsIgnoreCase("EmployeeMaster.jsp") && (lovKey.equalsIgnoreCase("PickUPGradeCode"))) { + + searchString1 = request.getParameter("accNo"); + searchString2 = request.getParameter("textIndex"); + + headerQry = " select ID, GRADE from grade_master k where k.pacs_id='" + pacsId + "' and k.status = 'Y' "; + + } else if (screenName.equalsIgnoreCase("EmployeeDependentMaster.jsp") && (lovKey.equalsIgnoreCase("PickUPCustomer"))) { + searchString1 = request.getParameter("accNo"); + searchString2 = request.getParameter("textIndex"); + + headerQry = " select id, (select k.first_name || ' ' || k.middle_name || ' ' || k.last_name from kyc_hdr k where k.cif_no = w.cif_no) name, (select k.guardian_name from kyc_hdr k where k.cif_no = w.cif_no) guard_name, emp_id from employee_master w where pacs_id = '" + pacsId + "' "; + + } else if (screenName.equalsIgnoreCase("payroll_reports.jsp") && (lovKey.equalsIgnoreCase("EMPID"))) { + + headerQry = " select id, (select k.first_name || ' ' || k.middle_name || ' ' || k.last_name from kyc_hdr k where k.cif_no = w.cif_no) name, (select k.guardian_name from kyc_hdr k where k.cif_no = w.cif_no) guard_name, emp_id from employee_master w where pacs_id = '" + pacsId + "' "; + + } else if (screenName.equalsIgnoreCase("LeaveBalance.jsp") && (lovKey.equalsIgnoreCase("PickUPLeave"))) { + searchString1 = request.getParameter("accNo"); + searchString2 = request.getParameter("textIndex"); + + headerQry = " select id, leave_name, (case leave_type when '1' then 'Earned Leave' when '2' then 'Medical Leave' when '3' then 'Casual Leave' when '4' then 'Others Leave' end) leave_type from leave_master l where pacs_id = '" + pacsId + "' and status = 'Y' "; + + } else if ((screenName.equalsIgnoreCase("PayrollBglMaster.jsp")) && (lovKey.equalsIgnoreCase("sal"))) { + + // searchString1 = request.getParameter("salGL"); + searchString2 = request.getParameter("textIndex"); + headerQry = "select ga.key_1, ga.ledger_name, gp.gl_code, gp.id, gp.gl_name from gl_account ga, gl_product gp where substr(ga.gl_class_code, 9, 2) in ('60', '63') and gl_prod_id <> '310318000001905' and ga.gl_prod_id = gp.id and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%')"; + + } else if (screenName.equalsIgnoreCase("PayrollBglMaster.jsp") && (lovKey.equalsIgnoreCase("tax"))) { + //searchString1 = request.getParameter("accNo"); + searchString2 = request.getParameter("textIndex"); + + headerQry = " select ga.key_1, ga.ledger_name, gp.gl_code, gp.id, gp.gl_name from gl_account ga, gl_product gp where substr(ga.gl_class_code, 9, 2) in ('12', '10', '18') and gl_prod_id <> (select PARKING_GL_ID from year_end_map) and ga.gl_prod_id = gp.id and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') "; + + } else if (screenName.equalsIgnoreCase("PayrollBglMaster.jsp") && (lovKey.equalsIgnoreCase("other"))) { + // searchString1 = request.getParameter("accNo"); + searchString2 = request.getParameter("textIndex"); + + headerQry = " select ga.key_1, ga.ledger_name, gp.gl_code, gp.id, gp.gl_name from gl_account ga, gl_product gp where substr(ga.gl_class_code, 9, 2) in ('12', '10', '18') and gl_prod_id <> (select PARKING_GL_ID from year_end_map) and ga.gl_prod_id = gp.id and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') "; + + } else if (screenName.equalsIgnoreCase("PayrollBglMaster.jsp") && (lovKey.equalsIgnoreCase("StaffCr"))) { + // searchString1 = request.getParameter("accNo"); + searchString2 = request.getParameter("textIndex"); + + headerQry = " select ga.key_1, ga.ledger_name, gp.gl_code, gp.id, gp.gl_name from gl_account ga, gl_product gp where substr(ga.gl_class_code, 9, 2) in ('12', '10', '18') and gl_prod_id <> (select PARKING_GL_ID from year_end_map) and ga.gl_prod_id = gp.id and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') "; + + } else if ((screenName.equalsIgnoreCase("PayrollBglMaster.jsp")) && (lovKey.equalsIgnoreCase("SocDr"))) { + + // searchString1 = request.getParameter("accNo"); + searchString2 = request.getParameter("textIndex"); + headerQry = "select ga.key_1, ga.ledger_name, gp.gl_code, gp.id, gp.gl_name from gl_account ga, gl_product gp where substr(ga.gl_class_code, 9, 2) in ('60', '63') and gl_prod_id <> '310318000001905' and ga.gl_prod_id = gp.id and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%')"; + + } else if (screenName.equalsIgnoreCase("PayrollBglMaster.jsp") && (lovKey.equalsIgnoreCase("SocCr"))) { + // searchString1 = request.getParameter("accNo"); + searchString2 = request.getParameter("textIndex"); + + headerQry = " select ga.key_1, ga.ledger_name, gp.gl_code, gp.id, gp.gl_name from gl_account ga, gl_product gp where substr(ga.gl_class_code, 9, 2) in ('12', '10', '18') and gl_prod_id <> (select PARKING_GL_ID from year_end_map) and ga.gl_prod_id = gp.id and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') "; + + } + + Connection conn = DbHandler.getDBConnection(); + PreparedStatement pstmt = null; + + ResultSet resultSet = null; + String bgColor = null; + int flag = 1; + + System.out.println(headerQry); + + try { + pstmt = conn.prepareStatement(headerQry); + resultSet = pstmt.executeQuery(); + + %> + + +
+ + <% if ((screenName.equalsIgnoreCase("BasicInformation.jsp")) && (lovKey.equalsIgnoreCase("BasicInformation"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
SHG IDSHG CODE NAME OF SHG
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <% } else if ((screenName.equalsIgnoreCase("BasicInformation.jsp")) && (lovKey.equalsIgnoreCase("cif"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + <%}%> +
CIFCustomer Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <% } else if ((screenName.equalsIgnoreCase("BasicInformation.jsp")) && (lovKey.equalsIgnoreCase("cifamend"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + <%}%> +
CIFCustomer Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} else if ((screenName.equalsIgnoreCase("AddressDetails.jsp")) && (lovKey.equalsIgnoreCase("AddressDetails"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + <%}%> +
SHG CODE NAME OF SHG
<%=resultSet.getString(2)%><%=resultSet.getString(3)%>
<%} else if (screenName.equalsIgnoreCase("AddressDetails.jsp") && (lovKey.equalsIgnoreCase("addressDetailscode"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + <%}%> +
SHG CodeName Of SHGGroup CategoryDate Of FormationDuration
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
<%} else if (screenName.equalsIgnoreCase("ShgActivities.jsp") && (lovKey.equalsIgnoreCase("shgDetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + <%}%> +
SHG CODE NAME OF SHG
<%=resultSet.getString(2)%><%=resultSet.getString(3)%>
<%} else if (screenName.equalsIgnoreCase("ShgActivities.jsp") && (lovKey.equalsIgnoreCase("shgDetailscode"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + <%}%> +
SHG CodeName Of SHGGroup CategoryDate Of FormationDuration
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} else if (screenName.equalsIgnoreCase("MemberDetails.jsp") && (lovKey.equalsIgnoreCase("MemberDetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + <%}%> +
SHG CODE NAME OF SHG
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} else if (screenName.equalsIgnoreCase("MemberDetails.jsp") && (lovKey.equalsIgnoreCase("MemberDetailscode"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No SHG found with 0 members. Please amend for an existing SHG

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + <%}%> +
SHG CodeName Of SHGGroup CategoryDate Of FormationDuration
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} } else if (screenName.equalsIgnoreCase("AccountDetails.jsp") && (lovKey.equalsIgnoreCase("AccountDetailsDeposit"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + <%}%> +
SHG CODE NAME OF SHG
<%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} else if (screenName.equalsIgnoreCase("AccountDetails.jsp") && (lovKey.equalsIgnoreCase("AccountDetailsDeposit2"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + <%}%> +
SHG CODE NAME OF SHG
<%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} else if (screenName.equalsIgnoreCase("AccountDetails.jsp") && (lovKey.equalsIgnoreCase("AccountDetailsDeposit3"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + <%}%> +
SHG CODE NAME OF SHG
<%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} else if (screenName.equalsIgnoreCase("AccountDetails.jsp") && (lovKey.equalsIgnoreCase("AccountDetailsLoan"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + <%}%> +
SHG CODE NAME OF SHG
<%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} else if (screenName.equalsIgnoreCase("AccountDetails.jsp") && (lovKey.equalsIgnoreCase("AccountDetailsLoan2"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + <%}%> +
SHG CODE NAME OF SHG
<%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} else if (screenName.equalsIgnoreCase("AccountDetails.jsp") && (lovKey.equalsIgnoreCase("AccountDetailsLoan3"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + <%}%> +
SHG CODE NAME OF SHG
<%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} else if (screenName.equalsIgnoreCase("AccountDetails.jsp") && (lovKey.equalsIgnoreCase("AccountDetailscode"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + <%}%> +
SHG CodeName Of SHGGroup CategoryDate Of FormationDuration
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} else if (screenName.equalsIgnoreCase("shg_reports.jsp") && (lovKey.equalsIgnoreCase("SearchShg"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + <%}%> +
SHG ID NAME OF SHG
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ + <%} else if (screenName.equalsIgnoreCase("shg_reports.jsp") && (lovKey.equalsIgnoreCase("SearchShg_Bank"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + <%}%> +
SHG ID NAME OF SHG
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ + <%} else if (screenName.equalsIgnoreCase("AccountDetails.jsp") && (lovKey.equalsIgnoreCase("Shg_code"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + <%}%> +
SHG ID NAME OF SHG
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ + + <%} else if (screenName.equalsIgnoreCase("AccountDetails.jsp") && (lovKey.equalsIgnoreCase("searchShgMembers"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
Member IDMember NAME
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ + <%} else if (screenName.equalsIgnoreCase("EmployeeMaster.jsp") && (lovKey.equalsIgnoreCase("PickUPSalary"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No result found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + <%}%> +
Account NumberAvailable Balance
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%}%> + + <%} else if (screenName.equalsIgnoreCase("EmployeeMaster.jsp") && (lovKey.equalsIgnoreCase("PickUPDesgCode"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No result found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + < + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + <%}%> +
Designation IDDesignation Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%}%> + <%} else if (screenName.equalsIgnoreCase("EmployeeMaster.jsp") && (lovKey.equalsIgnoreCase("PickUPGradeCode"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No result found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + <%}%> +
Grade IDGrade Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%}%> + <%} else if (screenName.equalsIgnoreCase("EmployeeDependentMaster.jsp") && (lovKey.equalsIgnoreCase("PickUPCustomer"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
IDEmployee NameGuardian NameEmployee ID
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ + <%}%> + <%} else if (screenName.equalsIgnoreCase("payroll_reports.jsp") && (lovKey.equalsIgnoreCase("EMPID"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
IDEmployee NameGuardian NameEmployee ID
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ + <%}%> + <%} else if (screenName.equalsIgnoreCase("LeaveBalance.jsp") && (lovKey.equalsIgnoreCase("PickUPLeave"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
Leave IDLeave NameLeave Type
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ + <%}%> + <%} else if ((screenName.equalsIgnoreCase("PayrollBglMaster.jsp")) && (lovKey.equalsIgnoreCase("sal"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No GL A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account No.Ledger NameGl CodeIDGl Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%}%> + <%} else if (screenName.equalsIgnoreCase("PayrollBglMaster.jsp") && (lovKey.equalsIgnoreCase("tax"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account No.Ledger NameGl CodeIDGl Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + <%}%> + <%} else if (screenName.equalsIgnoreCase("PayrollBglMaster.jsp") && (lovKey.equalsIgnoreCase("other"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account No.Ledger NameGl CodeIDGl Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + <%}%> + <%} else if (screenName.equalsIgnoreCase("PayrollBglMaster.jsp") && (lovKey.equalsIgnoreCase("StaffCr"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account No.Ledger NameGl CodeIDGl Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + <%}%> + <%} else if ((screenName.equalsIgnoreCase("PayrollBglMaster.jsp")) && (lovKey.equalsIgnoreCase("SocDr"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No GL A/C found! Close this window & Please recheck the A/C No. selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account No.Ledger NameGl CodeIDGl Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%}%> + <%} else if (screenName.equalsIgnoreCase("PayrollBglMaster.jsp") && (lovKey.equalsIgnoreCase("SocCr"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account No.Ledger NameGl CodeIDGl Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + <%}%> + <%}%> + +
+ + <% + } catch (Exception ex) { + //System.out.println(ex); + } finally { + if (resultSet != null) { + resultSet.close(); + } + if (pstmt != null) { + pstmt.close(); + } + if (conn != null) { + conn.close(); + } + } + + %> + + \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/CommonSearchInformationTradingLOV.jsp b/IPKS_Updated/web/web/web/CommonSearchInformationTradingLOV.jsp new file mode 100644 index 0000000..a7ec6a4 --- /dev/null +++ b/IPKS_Updated/web/web/web/CommonSearchInformationTradingLOV.jsp @@ -0,0 +1,2494 @@ +<%-- + Document : CommonSearchInformationTradingLOV + Created on : Mar 10, 2016, 2:30:36 AM + Author : SUBHAM +--%> + +<%@page import="java.sql.PreparedStatement"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> + + + + + + Customer Information Search + + + + <% + String searchString1 = ""; + String screenName = ""; + String searchString2 = ""; + String searchString3 = ""; + String lovKey = ""; + String textIndex = ""; + String comType = ""; + + screenName = request.getParameter("screenName"); + lovKey = request.getParameter("lovKey"); + String pacsId = session.getAttribute("pacsId").toString(); + String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + String headPacsId = (String) session.getAttribute("headPacsId").toString(); + String productId = request.getParameter("productId"); + + String headerQry = null; + + if (screenName.equalsIgnoreCase("tradingProductCreation.jsp") && (lovKey.equalsIgnoreCase("prodDetails"))) { + + // searchString1 = request.getParameter("commoditytype"); + //searchString2 = request.getParameter("Subtype"); + + if (searchString1.equalsIgnoreCase("") && searchString1.equalsIgnoreCase("")) { + headerQry = "select ID,comm_type, TYPE_DESC, comm_subtype, SUBTYPE_DESC from trading_product_mst t where t.pacs_Id = '" +pacsId+ "'"; + } else if (!searchString1.equalsIgnoreCase("")) { + headerQry = "select ID,comm_type, TYPE_DESC, comm_subtype, SUBTYPE_DESC from trading_product_mst t where comm_type like '%" + searchString1.replace(' ', '%') + "%' and t.pacs_Id = '" +pacsId+ "' "; + } else if (!searchString2.equalsIgnoreCase("")) { + headerQry = "select ID,comm_type, TYPE_DESC, comm_subtype, SUBTYPE_DESC from trading_product_mst t where comm_subtype like '%" + searchString2.replace(' ', '%') + "%' and t.pacs_Id = '" +pacsId+ "'"; + } else if ((!searchString1.equalsIgnoreCase("")) && (!searchString1.equalsIgnoreCase(""))) { + headerQry = "select ID,comm_type, TYPE_DESC, comm_subtype, SUBTYPE_DESC from trading_product_mst t where comm_type like '%" + searchString1 + "%' and comm_subtype like '%" + searchString2.replace(' ', '%') + "%' and t.pacs_Id = '" +pacsId+ "' "; + } + + } else if (screenName.equalsIgnoreCase("Godown.jsp") && (lovKey.equalsIgnoreCase("godownDetails"))) { + + // textIndex = request.getParameter("Godowname"); + if (textIndex.equalsIgnoreCase("")) { + headerQry = "select ID,GODOWN_NAME, GODOWN_ADDRESS, GODOWN_SPOC, PHN_NO,CAPACITY from trading_godown_mst g where g.pacs_id = '"+pacsId+"'"; + + } else { + headerQry = "select ID,GODOWN_NAME, GODOWN_ADDRESS, GODOWN_SPOC, PHN_NO,CAPACITY from trading_godown_mst g where g.pacs_id = '"+pacsId+"' and GODOWN_NAME like '%" + textIndex.replace(' ', '%') + "%' "; + + } + + } else if (screenName.equalsIgnoreCase("VendorEnrollmentEnquiry.jsp") && (lovKey.equalsIgnoreCase("TradingProductSearch"))) { + + textIndex = request.getParameter("textIndex"); + + headerQry = "select ID,comm_type, TYPE_DESC, comm_subtype, SUBTYPE_DESC from trading_product_mst where pacs_id = '" + pacsId + "'"; + + } else if (screenName.equalsIgnoreCase("VendorEnrollmentEnquiry.jsp") && (lovKey.equalsIgnoreCase("VendorDetails"))) { + + // textIndex = request.getParameter("VendorName"); + if (textIndex.equalsIgnoreCase("")) { + headerQry = "select ID,NAME,ADDRESS,PHN_NO,CONTACT_PRSN,EFF_DATE,NVL(gst_no,'NA')gst_no from trading_vendor_mst where pacs_id='" + pacsId +"'"; + } else { + headerQry = "select ID,NAME,ADDRESS,PHN_NO,CONTACT_PRSN,EFF_DATE,NVL(gst_no,'NA')gst_no from trading_vendor_mst where pacs_id='" + pacsId +"' LOWER(NAME) like '%" + textIndex.replace(' ', '%') + "%' "; + + } + + + } else if (screenName.equalsIgnoreCase("customer.jsp") && (lovKey.equalsIgnoreCase("CustomerDetails"))) { + + // textIndex = request.getParameter("customername"); + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + + if (textIndex.equalsIgnoreCase("")) { + headerQry = "select CUST_ID,CUST_NAME,CUST_ADDRESS,CONTACT_NO,CONTACT_PERSON,NVL(gst_no,'NA')gst_no from trading_customer where pacs_id = '" + pacsId + "'"; + } else { + headerQry = "select CUST_ID,CUST_NAME,CUST_ADDRESS,CONTACT_NO,CONTACT_PERSON,NVL(gst_no,'NA')gst_no from trading_customer where CUST_NAME like '%" + textIndex.replace(' ', '%') + "%' and pacs_id = '" + pacsId + "' "; + } + + } + if ((screenName.equalsIgnoreCase("customer.jsp")) && (lovKey.equalsIgnoreCase("CifDetails"))) { + + //searchString1 = request.getParameter("cifNumber"); + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + // searchString1 = "%" + searchString1 + "%"; + + headerQry = "select cif_no,(first_name||nvl2(middle_name,' '||middle_name,'')||nvl2(last_name,' '||last_name,'')) name,(address_1||nvl(address_1,' ')||' '|| nvl(address_2,' ')||' ' || nvl(address_3,'')) address,nvl(mobile_no,' ') mobile_no from kyc_hdr where cif_no = '" + searchString1.replace(' ', '%') + "' and pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master pk where pk.pacs_id= '" + pacsId + "'))"; + headerQry = "select cif_no,(first_name||nvl2(middle_name,' '||middle_name,'')||nvl2(last_name,' '||last_name,'')) name,(address_1||nvl(address_1,' ')||' '|| nvl(address_2,' ')||' ' || nvl(address_3,'')) address,nvl(mobile_no,' ') mobile_no from kyc_hdr where cif_no = '" + searchString1.replace(' ', '%') + "' and pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master pk where pk.pacs_id= '" + pacsId + "'))"; + + + + + } else if (screenName.equalsIgnoreCase("VendorEnrollmentEnquiry.jsp") && (lovKey.equalsIgnoreCase("TradingProductSearchAmend"))) { + + textIndex = request.getParameter("textIndex"); + + headerQry = "select ID,comm_type, TYPE_DESC, comm_subtype, SUBTYPE_DESC from trading_product_mst where pacs_id = '" + pacsId + "'"; + + + + } else if (screenName.equalsIgnoreCase("saleregister.jsp") && (lovKey.equalsIgnoreCase("CustomerDetails"))) { + + // textIndex = request.getParameter("customername"); + if (textIndex.equalsIgnoreCase("")) { + headerQry = "select CUST_ID,CUST_NAME,CUST_ADDRESS,CONTACT_NO,CONTACT_PERSON from trading_customer"; + } else { + headerQry = "select CUST_ID,CUST_NAME,CUST_ADDRESS,CONTACT_NO,CONTACT_PERSON from trading_customer where CUST_NAME like '%" + textIndex.replace(' ', '%') + "%' "; + } + + + } else if (screenName.equalsIgnoreCase("tradingsaleregister.jsp") && (lovKey.equalsIgnoreCase("prodDetails"))) { + + //searchString1 = request.getParameter("commoditytype"); + //searchString2 = request.getParameter("Subtype"); + + if (searchString1.equalsIgnoreCase("") && searchString1.equalsIgnoreCase("")) { + headerQry = "select ID,comm_type, TYPE_DESC, comm_subtype, SUBTYPE_DESC from trading_product_mst"; + } else if (!searchString1.equalsIgnoreCase("")) { + headerQry = "select ID,comm_type, TYPE_DESC, comm_subtype, SUBTYPE_DESC from trading_product_mst where comm_type like '%" + searchString1.replace(' ', '%') + "%' "; + } else if (!searchString2.equalsIgnoreCase("")) { + headerQry = "select ID,comm_type, TYPE_DESC, comm_subtype, SUBTYPE_DESC from trading_product_mst where comm_subtype like '%" + searchString2.replace(' ', '%') + "%' "; + } else if ((!searchString1.equalsIgnoreCase("")) && (!searchString1.equalsIgnoreCase(""))) { + headerQry = "select ID,comm_type, TYPE_DESC, comm_subtype, SUBTYPE_DESC from trading_product_mst where comm_type like '%" + searchString1.replace(' ', '%') + "%' and comm_subtype like '%" + searchString2.replace(' ', '%') + "%' "; + } + + } else if (screenName.equalsIgnoreCase("raisePurchaseOrder.jsp") && (lovKey.equalsIgnoreCase("prodDetails"))) { + // searchString1 = request.getParameter("commoditytype"); + if (searchString1.equalsIgnoreCase("")) { + headerQry = "select id,comm_type,type_desc,comm_subtype,subtype_desc from trading_product_mst where pacs_id like '%" + pacsId + "%'"; + } else { + headerQry = "select ID,comm_type, TYPE_DESC, comm_subtype, SUBTYPE_DESC from trading_product_mst where comm_type like '%" + searchString1.replace(' ', '%') + "%' and pacs_id like '%" + pacsId + "%'"; + } + + + } else if (screenName.equalsIgnoreCase("raisePurchaseOrder.jsp") && (lovKey.equalsIgnoreCase("vendorDetails"))) { + //searchString1 = request.getParameter("vendorname"); + // searchString2 = request.getParameter("product_id"); + if (searchString1.equalsIgnoreCase("")) { + headerQry = "select v.id,v.name,v.address,v.phn_no,v.contact_prsn,to_char(v.eff_date,'Month DD, yyyy') from trading_vendor_mst v,trading_product_mst p,trading_vendor_dtl d where v.id = d.vnd_mst_id and p.id=d.prod_id and p.id ='" + searchString2 + "' and p.pacs_id like '%" + pacsId + "%'"; + } else { + headerQry = "select v.id,v.name,v.address,v.phn_no,v.contact_prsn,to_char(v.eff_date,'Month DD, yyyy') from trading_vendor_mst v,trading_product_mst p,trading_vendor_dtl d where v.id = d.vnd_mst_id and p.id=d.prod_id and p.id ='" + searchString2 + "' and LOWER(v.name) like '%" + searchString1.replace(' ', '%') + "%' and p.pacs_id like '%" + pacsId + "%'"; + } + + + } else if (screenName.equalsIgnoreCase("tradingstockregister.jsp") && (lovKey.equalsIgnoreCase("stockDetails"))) { + + // searchString1 = request.getParameter("commoditytype"); + // searchString2 = request.getParameter("Subtype"); + + if (searchString1.equalsIgnoreCase("") && searchString1.equalsIgnoreCase("")) { + headerQry = "select comm_type, TYPE_DESC, comm_subtype, SUBTYPE_DESC from trading_product_mst where pacs_id = '" + pacsId + "' "; + } else if (!searchString1.equalsIgnoreCase("")) { + headerQry = "select comm_type, TYPE_DESC, comm_subtype, SUBTYPE_DESC from trading_product_mst where comm_type like '%" + searchString1.replace(' ', '%') + "%' and pacs_id = '" + pacsId + "' "; + } else if (!searchString2.equalsIgnoreCase("")) { + headerQry = "select comm_type, TYPE_DESC, comm_subtype, SUBTYPE_DESC from trading_product_mst where comm_subtype like '%" + searchString2.replace(' ', '%') + "%' and pacs_id = '" + pacsId + "' "; + } else if ((!searchString1.equalsIgnoreCase("")) && (!searchString1.equalsIgnoreCase(""))) { + headerQry = "select comm_type, TYPE_DESC, comm_subtype, SUBTYPE_DESC from trading_product_mst where comm_type like '%" + searchString1 + "%' and comm_subtype like '%" + searchString2.replace(' ', '%') + "%' and pacs_id = '" + pacsId + "' "; + } + + } else if (screenName.equalsIgnoreCase("tradingstockregisteredit.jsp") && (lovKey.equalsIgnoreCase("editDetails"))) { + + //searchString1 = request.getParameter("commoditytype"); + //searchString2 = request.getParameter("Subtype"); + + if (searchString1.equalsIgnoreCase("") && searchString1.equalsIgnoreCase("")) { + headerQry = "select comm_type, TYPE_DESC, comm_subtype, SUBTYPE_DESC from trading_product_mst where pacs_id = '" + pacsId + "' "; + } else if (!searchString1.equalsIgnoreCase("")) { + headerQry = "select comm_type, TYPE_DESC, comm_subtype, SUBTYPE_DESC from trading_product_mst where comm_type like '%" + searchString1.replace(' ', '%') + "%' and pacs_id = '" + pacsId + "' "; + } else if (!searchString2.equalsIgnoreCase("")) { + headerQry = "select comm_type, TYPE_DESC, comm_subtype, SUBTYPE_DESC from trading_product_mst where comm_subtype like '%" + searchString2.replace(' ', '%') + "%' and pacs_id = '" + pacsId + "' "; + } else if ((!searchString1.equalsIgnoreCase("")) && (!searchString1.equalsIgnoreCase(""))) { + headerQry = "select comm_type, TYPE_DESC, comm_subtype, SUBTYPE_DESC from trading_product_mst where comm_type like '%" + searchString1 + "%' and comm_subtype like '%" + searchString2.replace(' ', '%') + "%' and pacs_id = '" + pacsId + "' "; + } + + } else if (screenName.equalsIgnoreCase("tradingstockregister.jsp") && (lovKey.equalsIgnoreCase("godownDetails"))) { + textIndex = request.getParameter("textIndex"); + + headerQry = "select ID,GODOWN_NAME, GODOWN_ADDRESS, GODOWN_SPOC, PHN_NO,CAPACITY from trading_godown_mst where pacs_id = '" + pacsId + "' "; + + } else if (screenName.equalsIgnoreCase("tradingstockregisteredit.jsp") && (lovKey.equalsIgnoreCase("godownDetails"))) { + textIndex = request.getParameter("textIndex"); + + headerQry = "select ID,GODOWN_NAME, GODOWN_ADDRESS, GODOWN_SPOC, PHN_NO,CAPACITY from trading_godown_mst where pacs_id = '" + pacsId + "' "; + + } else if (screenName.equalsIgnoreCase("tradingstockregister.jsp") && (lovKey.equalsIgnoreCase("purchaseDetails"))) { + textIndex = request.getParameter("textIndex"); + + headerQry = "select p.purchase_ref_no, m.comm_type,m.type_desc,m.comm_subtype,m.subtype_desc,p.prod_id,p.purchase_id,p.qty, p.unit_price from trading_purchase_order p, trading_product_mst m where p.prod_id = m.id and p.pacs_id='" + pacsId + "' and m.pacs_id='" + pacsId + "' and p.purchase_id not in (select k.purchase_id from trading_stock_register k where pacs_id='" + pacsId + "') "; + + } else if (screenName.equalsIgnoreCase("SellItem.jsp") && (lovKey.equalsIgnoreCase("memberDetails"))) { + + searchString1 = request.getParameter("memberId"); + // searchString2 = request.getParameter("memberName"); + + if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select c.cust_id,c.cust_name,c.cust_address,decode(c.member_flag,'N','No','Y','Yes') as memberStatus,c.pacs_id from trading_customer c where c.pacs_id='" + pacsId + "'"; + } else if (!searchString2.equalsIgnoreCase("")) { + headerQry = "select c.cust_id,c.cust_name,c.cust_address,decode(c.member_flag,'N','No','Y','Yes') as memberStatus,c.pacs_id from trading_customer c where upper(c.cust_name) like upper('%" + searchString2.replace(' ', '%') + "%') and c.pacs_id='" + pacsId + "'"; + } /* } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select c.cust_id,c.cust_name,c.cust_address,decode(c.member_flag,'N','No','Y','Yes') as memberStatus,c.pacs_id from trading_customer c where cust_id like '%" + searchString1.replace(' ', '%') + "%' and c.pacs_id='" + pacsId + "'"; + } else { + headerQry = "select c.cust_id,c.cust_name,c.cust_address,decode(c.member_flag,'N','No','Y','Yes') as memberStatus,c.pacs_id from trading_customer c where c.cust_id like '%" + searchString1.replace(' ', '%') + "%' and upper(c.name) like upper('%" + searchString2.replace(' ', '%') + "%') and c.pacs_id='" + pacsId + "'"; + }*/ + + } else if (screenName.equalsIgnoreCase("SellItem.jsp") && (lovKey.equalsIgnoreCase("TrandingProductSearchForSell")|| lovKey.equalsIgnoreCase("TrandingProductSearchBarcode"))) { + + textIndex = request.getParameter("textIndex"); + // String memberStatus = request.getParameter("memberStatus"); + // comType = request.getParameter("commoditytype"); + + if(lovKey.equalsIgnoreCase("TrandingProductSearchForSell")){ + headerQry = "select m.comm_type,m.type_desc,m.comm_subtype,m.subtype_desc,m.id as productId,t.stock_id,t.quantity_available,to_char(t.stock_entry_date,'DD-MON-YYYY'), " + + "(case when upper('" + memberStatus + "') in ('NO') then round(((t.profit_factor*t.unit_price)/100)+t.unit_price) else round(((t.prof_fct_member*t.unit_price)/100)+t.unit_price) end) ,nvl((select GODOWN_NAME from trading_godown_mst ki where ki.id=t.godown_id),'NA')GODOWN_NAME " + + " from trading_product_mst m,trading_stock_register t,trading_purchase_order o where m.id=o.prod_id " + + " and o.purchase_id=t.purchase_id and o.prod_id=t.prod_id and upper(m.comm_type||m.type_desc||m.comm_subtype||m.subtype_desc) like upper('%" + comType + "%') " + + " and t.quantity_available>0 and (m.lease_flag is null or m.lease_flag='N') and t.pacs_id= '" + pacsId + "' order by t.stock_expiry_date "; + }else if(lovKey.equalsIgnoreCase("TrandingProductSearchBarcode")) + { + // String invId = request.getParameter("invId"); + headerQry = "select m.comm_type,m.type_desc,m.comm_subtype,m.subtype_desc,m.id as productId,t.stock_id,t.quantity_available,to_char(t.stock_entry_date,'DD-MON-YYYY'), " + + "(case when upper('" + memberStatus + "') in ('NO') then round(((t.profit_factor*t.unit_price)/100)+t.unit_price) else round(((t.prof_fct_member*t.unit_price)/100)+t.unit_price) end) " + + " from trading_product_mst m,trading_stock_register t,trading_purchase_order o where m.id=o.prod_id " + + " and o.purchase_id=t.purchase_id and o.prod_id=t.prod_id " + + " and t.quantity_available>0 and (m.lease_flag is null or m.lease_flag='N') and t.pacs_id= '" + pacsId + "' and t.stock_id = '"+invId+"' order by t.stock_expiry_date "; + } + + + + } else if (screenName.equalsIgnoreCase("SalesRegister.jsp") && (lovKey.equalsIgnoreCase("TradingProductSearch"))) { + + + headerQry = "select s.id as sale_id,p.id,p.product_code,p.product_name from trading_sale_details s,trading_product_mst p where s.product_id = p.id"; + + } else if (screenName.equalsIgnoreCase("PaymentAcknowledgement.jsp") && (lovKey.equalsIgnoreCase("searchPurchase"))) { + + //searchString1 = request.getParameter("purchaseNo"); + if (searchString1.equalsIgnoreCase("")) { + + headerQry = "select p.purchase_id,m.name,p.purchase_ref_no,p.purchase_desc,p.total_amt, " + + "p.amt_paid,to_char(p.payment_due_date,'dd/mm/yyyy') as payment_due_date," + + "to_number(p.total_amt-p.amt_paid) due_amt,t.cgst,t.sgst,t.id " + + "from trading_purchase_order p,trading_vendor_mst m,trading_product_mst t " + + "where m.id=p.vendor_id and p.prod_id=t.id " + + "and p.mode_of_purchase='2' and to_number(p.total_amt-p.amt_paid)>0" + + " and p.pacs_id= '" + pacsId + "' "; + } else { + + + headerQry = "select p.purchase_id,m.name,p.purchase_ref_no,p.purchase_desc,p.total_amt, " + + "p.amt_paid,to_char(p.payment_due_date,'dd/mm/yyyy') as payment_due_date," + + "to_number(p.total_amt-p.amt_paid) due_amt,t.cgst,t.sgst,t.id " + + "from trading_purchase_order p,trading_vendor_mst m,trading_product_mst t " + + "where m.id=p.vendor_id and p.prod_id=t.id " + + "and p.mode_of_purchase='2' and to_number(p.total_amt-p.amt_paid)>0" + + " and p.pacs_id= '" + pacsId + "' and (p.purchase_ref_no like upper('%" + searchString1.replace(' ', '%') + "%') " + + " or p.purchase_id like upper('%" + searchString1.replace(' ', '%') + "%')) "; + + } + + } else if (screenName.equalsIgnoreCase("PaymentAcknowledgement.jsp") && (lovKey.equalsIgnoreCase("searchAccount"))) { + + // searchString1 = request.getParameter("glAcc"); + headerQry = "select ga.key_1,ga.ledger_name,gp.gl_code from gl_account ga,gl_product gp where ga.gl_prod_id=gp.id and " + + "(ga.key_1 like '%" + searchString1 + "%' or gp.gl_code like '%" + searchString1 + "%' or upper(gp.gl_name) like upper('%" + searchString1 + "%'))" + + " and ga.pacs_id= '" + pacsId + "' "; + + + } else if (screenName.equalsIgnoreCase("PaymentAcknowledgement.jsp") && (lovKey.equalsIgnoreCase("searchAccount2"))) { + + // searchString1 = request.getParameter("glAcc"); + searchString2 = request.getParameter("payMode"); + // searchString3 = request.getParameter("custId"); + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + if(searchString2.equalsIgnoreCase("G")) { + headerQry = "select ga.key_1,ga.ledger_name,gp.gl_code from gl_account ga,gl_product gp where ga.gl_prod_id=gp.id and " + + "(ga.key_1 like '%" + searchString1 + "%' or gp.gl_code like '%" + searchString1 + "%' or upper(gp.gl_name) like upper('%" + searchString1 + "%'))" + + " and ga.pacs_id= '" + pacsId + "' "; + } else if(searchString2.equalsIgnoreCase("T")) { + headerQry = "select da.key_1,(k.first_name || ' ' || k.middle_name || ' ' || k.last_name) custName,dp.prod_name, da.avail_bal from dep_account da, dep_product dp, kyc_hdr k" + + " where da.dep_prod_id = dp.id and da.customer_no = k.cif_no and (da.customer_no = '" + searchString3 + "' or da.cif_no2 = '" + searchString3 + "') " + + " and dp.prod_code in ('1101','1102') and da.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') "; + } + } else if (screenName.equalsIgnoreCase("PaymentAcknowledgement.jsp") && (lovKey.equalsIgnoreCase("searchSales"))) { + + // searchString1 = request.getParameter("salesNo"); + if (searchString1.equalsIgnoreCase("")) { + + headerQry = " select p.sales_ref_id,m.cust_id,m.cust_name,'NA' prod, " + + " to_number(p.total_amt - p.amount_paid) due_amt,nvl(to_char(p.payment_due_date, 'DD-MON-YYYY'),'NA') as payment_due_date," + + " sum (t.qty * t.unit_sp) prod_tot_amt, sum((t.qty * t.unit_sp) - t.amt_paid) prod_amt_due," + + " nvl((select max(nvl(tp.cgst, 0)) from trading_product_mst tp where tp.id in (select prod_id from trading_sales_dtl li where li.sales_ref_id=p.sales_ref_id)),0) cgst ," + + " nvl((select max(nvl(tp.sgst, 0)) from trading_product_mst tp where tp.id in (select prod_id from trading_sales_dtl li where li.sales_ref_id=p.sales_ref_id)),0) sgst,p.total_amt,p.amount_paid, max(t.prod_id) id " + + " from trading_sales_hdr p,trading_customer m, trading_sales_dtl t " + + " where m.cust_id=p.cust_id and p.sales_ref_id=t.sales_ref_id " + + " and p.mode_of_sales='2' and to_number(p.total_amt-p.amount_paid)>0 and ((t.qty*t.unit_sp)-t.amt_paid)>0" + + " and p.pacs_id= '" + pacsId + "' group by p.sales_ref_id,m.cust_id,m.cust_name,to_number(p.total_amt - p.amount_paid),p.total_amt, p.amount_paid,p.payment_due_date "; + } else { + + headerQry = " select p.sales_ref_id,m.cust_id,m.cust_name,'NA' prod, " + + " to_number(p.total_amt - p.amount_paid) due_amt,nvl(to_char(p.payment_due_date, 'DD-MON-YYYY'),'NA') as payment_due_date," + + " sum (t.qty * t.unit_sp) prod_tot_amt, sum((t.qty * t.unit_sp) - t.amt_paid) prod_amt_due," + + " nvl((select max(nvl(tp.cgst, 0)) from trading_product_mst tp where tp.id in (select prod_id from trading_sales_dtl li where li.sales_ref_id=p.sales_ref_id)),0) cgst ," + + " nvl((select max(nvl(tp.sgst, 0)) from trading_product_mst tp where tp.id in (select prod_id from trading_sales_dtl li where li.sales_ref_id=p.sales_ref_id)),0) sgst,p.total_amt,p.amount_paid, max(t.prod_id) id " + + " from trading_sales_hdr p,trading_customer m, trading_sales_dtl t " + + " where m.cust_id=p.cust_id and p.sales_ref_id=t.sales_ref_id " + + " and p.mode_of_sales='2' and to_number(p.total_amt-p.amount_paid)>0 and ((t.qty*t.unit_sp)-t.amt_paid)>0" + + " and p.pacs_id= '" + pacsId + "' and p.sales_ref_id like upper('%" + searchString1.replace(' ', '%') + "%') group by p.sales_ref_id,m.cust_id,m.cust_name,to_number(p.total_amt - p.amount_paid),p.total_amt, p.amount_paid,p.payment_due_date "; + + } + + } else if (screenName.equalsIgnoreCase("SellPurchaseAdjustment.jsp") && (lovKey.equalsIgnoreCase("searchPurchase"))) { + + //searchString1 = request.getParameter("purchaseNo"); + if (searchString1.equalsIgnoreCase("")) { + + headerQry = "select p.purchase_id,m.name,p.purchase_ref_no,p.purchase_desc,p.total_amt, " + + "p.amt_paid,to_char(p.payment_due_date,'dd/mm/yyyy') as payment_due_date," + + "to_number(p.total_amt-p.amt_paid) due_amt,t.cgst,t.sgst,t.id " + + "from trading_purchase_order p,trading_vendor_mst m,trading_product_mst t " + + "where m.id=p.vendor_id and p.prod_id=t.id " + + "and p.mode_of_purchase='2' and to_number(p.total_amt-p.amt_paid)>0" + + " and p.pacs_id= '" + pacsId + "' "; + } else { + + + headerQry = "select p.purchase_id,m.name,p.purchase_ref_no,p.purchase_desc,p.total_amt, " + + "p.amt_paid,to_char(p.payment_due_date,'dd/mm/yyyy') as payment_due_date," + + "to_number(p.total_amt-p.amt_paid) due_amt,t.cgst,t.sgst,t.id " + + "from trading_purchase_order p,trading_vendor_mst m,trading_product_mst t " + + "where m.id=p.vendor_id and p.prod_id=t.id " + + "and p.mode_of_purchase='2' and to_number(p.total_amt-p.amt_paid)>0" + + " and p.pacs_id= '" + pacsId + "' and (p.purchase_ref_no like upper('%" + searchString1.replace(' ', '%') + "%') " + + " or p.purchase_id like upper('%" + searchString1.replace(' ', '%') + "%')) "; + + } + + } else if (screenName.equalsIgnoreCase("SellPurchaseAdjustment.jsp") && (lovKey.equalsIgnoreCase("searchStock"))) { + + // searchString1 = request.getParameter("salesNo"); + if (searchString1.equalsIgnoreCase("")) { + + headerQry = " select p.sales_ref_id,m.cust_id,m.cust_name,'NA' prod, " + + " to_number(p.total_amt - p.amount_paid) due_amt,nvl(to_char(p.payment_due_date, 'DD-MON-YYYY'),'NA') as payment_due_date," + + " sum (t.qty * t.unit_sp) prod_tot_amt, sum((t.qty * t.unit_sp) - t.amt_paid) prod_amt_due," + + " nvl((select max(nvl(tp.cgst, 0)) from trading_product_mst tp where tp.id in (select prod_id from trading_sales_dtl li where li.sales_ref_id=p.sales_ref_id)),0) cgst ," + + " nvl((select max(nvl(tp.sgst, 0)) from trading_product_mst tp where tp.id in (select prod_id from trading_sales_dtl li where li.sales_ref_id=p.sales_ref_id)),0) sgst,p.total_amt,p.amount_paid, max(t.prod_id) id " + + " from trading_sales_hdr p,trading_customer m, trading_sales_dtl t " + + " where m.cust_id=p.cust_id and p.sales_ref_id=t.sales_ref_id " + + " and p.mode_of_sales='2' and to_number(p.total_amt-p.amount_paid)>0 and ((t.qty*t.unit_sp)-t.amt_paid)>0" + + " and p.pacs_id= '" + pacsId + "' group by p.sales_ref_id,m.cust_id,m.cust_name,to_number(p.total_amt - p.amount_paid),p.total_amt, p.amount_paid,p.payment_due_date "; + } else { + + headerQry = " select p.sales_ref_id,m.cust_id,m.cust_name,'NA' prod, " + + " to_number(p.total_amt - p.amount_paid) due_amt,nvl(to_char(p.payment_due_date, 'DD-MON-YYYY'),'NA') as payment_due_date," + + " sum (t.qty * t.unit_sp) prod_tot_amt, sum((t.qty * t.unit_sp) - t.amt_paid) prod_amt_due," + + " nvl((select max(nvl(tp.cgst, 0)) from trading_product_mst tp where tp.id in (select prod_id from trading_sales_dtl li where li.sales_ref_id=p.sales_ref_id)),0) cgst ," + + " nvl((select max(nvl(tp.sgst, 0)) from trading_product_mst tp where tp.id in (select prod_id from trading_sales_dtl li where li.sales_ref_id=p.sales_ref_id)),0) sgst,p.total_amt,p.amount_paid, max(t.prod_id) id " + + " from trading_sales_hdr p,trading_customer m, trading_sales_dtl t " + + " where m.cust_id=p.cust_id and p.sales_ref_id=t.sales_ref_id " + + " and p.mode_of_sales='2' and to_number(p.total_amt-p.amount_paid)>0 and ((t.qty*t.unit_sp)-t.amt_paid)>0" + + " and p.pacs_id= '" + pacsId + "' and p.sales_ref_id like upper('%" + searchString1.replace(' ', '%') + "%') group by p.sales_ref_id,m.cust_id,m.cust_name,to_number(p.total_amt - p.amount_paid),p.total_amt, p.amount_paid,p.payment_due_date "; + + } + + } else if (screenName.equalsIgnoreCase("leaseRentCommodity.jsp") && (lovKey.equalsIgnoreCase("commDetails"))) { + + // searchString1 = request.getParameter("commoditytype"); + searchString2 = request.getParameter("tranType"); + + if (searchString2.equalsIgnoreCase("L")) { + headerQry = "select t.comm_type,t.type_desc,t.comm_subtype,t.subtype_desc,t.price_per_unit,decode(t.price_freq,'D','Daily','W','Weekly','M','Monthly','Q','Quaterly','H','Half-Yearly','Y','Yearly'),t.min_trm,t.max_trm,t.id from trading_product_mst t where t.active_flag='A' and t.lease_flag='Y' and t.comm_type like '%" + searchString1 + "%' and pacs_id like '%" + pacsId + "%'"; + } else if (searchString2.equalsIgnoreCase("R") || searchString2.equalsIgnoreCase("RA")) { + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + headerQry = "select tp.comm_type, tp.type_desc, tp.comm_subtype, tp.subtype_desc, tp.price_per_unit, decode(tp.price_freq,'D','Daily','W','Weekly','M','Monthly','Q','Quaterly','H','Half-Yearly','Y','Yearly'),tp.min_trm,tp.max_trm,tp.id from trading_product_mst tp where tp.id in (select t.prod_id from trading_lease t where t.active_flag='Y' and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "')) and tp.lease_flag='Y' and tp.comm_type like '%" + searchString1 + "%'"; + } else { + headerQry = "select * from trading_product_mst where 1=2"; + } + + } else if (screenName.equalsIgnoreCase("leaseRentCommodity.jsp") && (lovKey.equalsIgnoreCase("custDetails"))) { + + //searchString1 = request.getParameter("custID"); + searchString2 = request.getParameter("tranType"); + if (subPacsFlag.equalsIgnoreCase("Y")) { + pacsId = headPacsId; + } + if (searchString2.equalsIgnoreCase("L")) { + headerQry = "select t.cust_id,t.cust_name,t.cust_address,t.contact_no,t.contact_person,decode(t.member_flag,'Y','MEMBER','NON-MEMBER') cust_type,t.cif_no,t.pacs_id from trading_customer t where t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') and (t.cust_id like '%" + searchString1 + "%' or t.cif_no like '%" + searchString1 + "%' or upper(t.cust_name) like upper('%" + searchString1 + "%'))"; + } else if (searchString2.equalsIgnoreCase("R") || searchString2.equalsIgnoreCase("RA")) { + headerQry = "select t.cust_id,tc.cust_name,tc.cust_address,tc.contact_no,tc.contact_person,decode(tc.member_flag, 'Y', 'MEMBER', 'NON-MEMBER') cust_type,tc.cif_no,tc.pacs_id,t.no_of_units,to_char(t.trm_from,'DD-MON-YYYY'),t.sec_amt,t.tot_amt,t.id,t.amt_paid,(t.tot_amt-t.amt_paid),t.due_flag,(t.trm_to-t.trm_from),t.price_freq from TRADING_LEASE t, trading_customer tc where t.cust_id = tc.cust_id and t.active_flag = 'Y' and (upper(tc.cust_name) like '%" + searchString1 + "%' or tc.cust_id like '%" + searchString1 + "%' or tc.cif_no like '%" + searchString1 + "%') and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "')"; + } else { + headerQry = "select * from trading_product_mst where 1=2"; + } + + } else if (screenName.equalsIgnoreCase("tradingProductCreation.jsp") && (lovKey.equalsIgnoreCase("commoditytype"))) { + + searchString1 = request.getParameter("commoditytype"); + headerQry = "select unique t.comm_type,t.type_desc,max(t.comm_subtype)+1 from trading_product_mst t group by t.comm_type,t.type_desc"; + + + } else if (screenName.equalsIgnoreCase("tradingProductCreation.jsp") && (lovKey.equalsIgnoreCase("purchaseGL"))) { + + // searchString1 = request.getParameter("accNo"); + headerQry = " select ga.key_1, ga.ledger_name, gp.gl_code, gp.id, gp.gl_name from gl_account ga, gl_product gp where substr(ga.gl_class_code, 9, 2) ='34' and gp.comp1 = '34000' and ga.gl_prod_id = gp.id and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') "; + + } else if (screenName.equalsIgnoreCase("tradingProductCreation.jsp") && (lovKey.equalsIgnoreCase("saleGL"))) { + + //searchString1 = request.getParameter("accNo"); + headerQry = " select ga.key_1, ga.ledger_name, gp.gl_code, gp.id, gp.gl_name from gl_account ga, gl_product gp where substr(ga.gl_class_code, 9, 2) ='41' and gp.comp1 = '41000' and ga.gl_prod_id = gp.id and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') "; + + } else if ((screenName.equalsIgnoreCase("tradingProductCreation.jsp")) && (lovKey.equalsIgnoreCase("closeGL"))) { + + //searchString1 = request.getParameter("accNo"); + headerQry = " select ga.key_1, ga.ledger_name, gp.gl_code, gp.id, gp.gl_name from gl_account ga, gl_product gp where substr(ga.gl_class_code, 9, 2) in ('45','46','47') and gp.comp1 in ('45000', '46000', '47000') and ga.gl_prod_id = gp.id and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') "; + + } else if (screenName.equalsIgnoreCase("tradingProductCreation.jsp") && (lovKey.equalsIgnoreCase("tradeGL"))) { + + // searchString1 = request.getParameter("accNo"); + headerQry = " select ga.key_1, ga.ledger_name, gp.gl_code, gp.id, gp.gl_name from gl_account ga, gl_product gp where substr(ga.gl_class_code, 9, 2) ='26' and gp.comp1 = '26000' and ga.gl_prod_id = gp.id and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') "; + + } else if (screenName.equalsIgnoreCase("tradingProductCreation.jsp") && (lovKey.equalsIgnoreCase("purchaseGLAmend"))) { + + // searchString1 = request.getParameter("accNo"); + headerQry = " select ga.key_1, ga.ledger_name, gp.gl_code, gp.id, gp.gl_name from gl_account ga, gl_product gp where substr(ga.gl_class_code, 9, 2) ='34' and gp.comp1 = '34000' and ga.gl_prod_id = gp.id and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') "; + + } else if (screenName.equalsIgnoreCase("tradingProductCreation.jsp") && (lovKey.equalsIgnoreCase("saleGLAmend"))) { + + //searchString1 = request.getParameter("accNo"); + headerQry = " select ga.key_1, ga.ledger_name, gp.gl_code, gp.id, gp.gl_name from gl_account ga, gl_product gp where substr(ga.gl_class_code, 9, 2) ='41' and gp.comp1 = '41000' and ga.gl_prod_id = gp.id and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') "; + + } else if ((screenName.equalsIgnoreCase("tradingProductCreation.jsp")) && (lovKey.equalsIgnoreCase("closeGLAmend"))) { + + //searchString1 = request.getParameter("accNo"); + headerQry = " select ga.key_1, ga.ledger_name, gp.gl_code, gp.id, gp.gl_name from gl_account ga, gl_product gp where substr(ga.gl_class_code, 9, 2) in ('45','46','47') and gp.comp1 in ('45000', '46000', '47000') and ga.gl_prod_id = gp.id and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') "; + + } else if (screenName.equalsIgnoreCase("tradingProductCreation.jsp") && (lovKey.equalsIgnoreCase("tradeGLAmend"))) { + + //searchString1 = request.getParameter("accNo"); + headerQry = " select ga.key_1, ga.ledger_name, gp.gl_code, gp.id, gp.gl_name from gl_account ga, gl_product gp where substr(ga.gl_class_code, 9, 2) ='26' and gp.comp1 = '26000' and ga.gl_prod_id = gp.id and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') "; + + } + + System.out.println(headerQry); + Connection conn = DbHandler.getDBConnection(); + PreparedStatement pstmt = null; + + ResultSet resultSet = null; + String bgColor = null; + int flag = 1; + + try { + pstmt = conn.prepareStatement(headerQry); + resultSet = pstmt.executeQuery(); + + %> + + +
+ + <% if ((screenName.equalsIgnoreCase("tradingProductCreation.jsp")) && (lovKey.equalsIgnoreCase("prodDetails"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
Product IDCommodity TypeCommodity DescriptionSubTypeSubType Description
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + <%} + if ((screenName.equalsIgnoreCase("VendorEnrollmentEnquiry.jsp")) && (lovKey.equalsIgnoreCase("TradingProductSearch"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Product found for your pacs !

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + <%}%> +
Product IDCommodity TypeCommodity DescriptionSubTypeSubType Description
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + <%} } + if ((screenName.equalsIgnoreCase("VendorEnrollmentEnquiry.jsp")) && (lovKey.equalsIgnoreCase("TradingProductSearchAmend"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No product found ! Please add new product for this vendor

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + <%}%> +
Product IDCommodity TypeCommodity DescriptionSubTypeSubType Description
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + <%} } else if ((screenName.equalsIgnoreCase("VendorEnrollmentEnquiry.jsp")) && (lovKey.equalsIgnoreCase("VendorDetails"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Vendor found ! Close this window & Create new Vendor

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
IDNameAddressPhone No.Contact Person
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} } else if ((screenName.equalsIgnoreCase("raisePurchaseOrder.jsp")) && (lovKey.equalsIgnoreCase("prodDetails"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
IDCommodity TypeType descSub TypeSub-Type desc
<%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
<%} else if ((screenName.equalsIgnoreCase("raisePurchaseOrder.jsp")) && (lovKey.equalsIgnoreCase("vendorDetails"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Vendor found! Close this window and Please reenter Vendor Name. Then, Search.

+ +
+ + <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
IDNameAddressPhone no.Contact Person
<%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
<%} + } else if ((screenName.equalsIgnoreCase("tradingstockregister.jsp")) && (lovKey.equalsIgnoreCase("stockDetails"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
COMMODITY TYPECOMMODITY TYPE DESCRPITIONSUB TYPESUB TYPE DESCRIPTION
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ <%} else if ((screenName.equalsIgnoreCase("tradingstockregisteredit.jsp")) && (lovKey.equalsIgnoreCase("editDetails"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
COMMODITY TYPECOMMODITY TYPE DESCRPITIONSUB TYPESUB TYPE DESCRIPTION
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ <%} else if ((screenName.equalsIgnoreCase("customer.jsp")) && (lovKey.equalsIgnoreCase("CifDetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
CIF NumberNameAddressPhone
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ <%} else if ((screenName.equalsIgnoreCase("customer.jsp")) && (lovKey.equalsIgnoreCase("CustomerDetails"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + <%}%> +
IDNameAddressPhone No.Contact Person
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} else if ((screenName.equalsIgnoreCase("tradingstockregister.jsp")) && (lovKey.equalsIgnoreCase("godownDetails"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + <%}%> +
IDNameAddressContact PersonPhone No.Capacity
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%>
+ <%} else if ((screenName.equalsIgnoreCase("tradingstockregisteredit.jsp")) && (lovKey.equalsIgnoreCase("godownDetails"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + <%}%> +
IDNameAddressContact PersonPhone No.Capacity
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%>
+ <%} else if ((screenName.equalsIgnoreCase("tradingstockregister.jsp")) && (lovKey.equalsIgnoreCase("purchaseDetails"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + + + + <%}%> +
Purchase Reference noCommodity typeType descSubtypeSubType descProduct IDPurchase IDQuantityPrice/unit
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%><%=resultSet.getString(9)%>
+ <%} else if ((screenName.equalsIgnoreCase("saleregister.jsp")) && (lovKey.equalsIgnoreCase("CustomerDetails"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
IDNameAddressPhone No.Contact Person
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} else if ((screenName.equalsIgnoreCase("tradingsaleregister.jsp")) && (lovKey.equalsIgnoreCase("prodDetails"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + <%}%> +
Product IDCommodity TypeCommodity DescriptionSubTypeSubType Description
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + <%} else if (screenName.equalsIgnoreCase("SellItem.jsp") && (lovKey.equalsIgnoreCase("memberDetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Member IDMember NameAddressMember StatusPACS ID
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} else if (screenName.equalsIgnoreCase("SellItem.jsp") && (lovKey.equalsIgnoreCase("TrandingProductSearchForSell")|| lovKey.equalsIgnoreCase("TrandingProductSearchBarcode"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + + <%}%> +
GodownCommodity TypeCommodity DescriptionSub TypeSubtype DescriptionProduct IDStock IDQuantity AvailableStock Entry DatePrice/Unit
<%=resultSet.getString(10)%><%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%><%=resultSet.getString(9)%>
<%} else if ((screenName.equalsIgnoreCase("SalesRegister.jsp")) && (lovKey.equalsIgnoreCase("TradingProductSearch"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
SALE IDIDProduct CodeProduct Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%>
+ <%} else if ((screenName.equalsIgnoreCase("PaymentAcknowledgement.jsp")) && (lovKey.equalsIgnoreCase("searchPurchase"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + + + + + <%}%> +
Purchase IDVendor NamePurchase Ref No.DescriptionTotal AmountAmount PaidPaymenent Due DateDue Amount
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%>
+ <%} else if ((screenName.equalsIgnoreCase("SellPurchaseAdjustment.jsp")) && (lovKey.equalsIgnoreCase("searchPurchase"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + + + + + <%}%> +
Purchase IDVendor NamePurchase Ref No.DescriptionTotal AmountAmount PaidPaymenent Due DateDue Amount
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%>
+ <%}else if ((screenName.equalsIgnoreCase("Godown.jsp")) && (lovKey.equalsIgnoreCase("godownDetails"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + <%}%> +
IDNameAddressContact PersonPhone No.Capacity
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%>
+ <%} else if ((screenName.equalsIgnoreCase("PaymentAcknowledgement.jsp")) && (lovKey.equalsIgnoreCase("searchSales"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + + + <%}%> +
Sales IDCustomer NameTotal Amount DuePayment Due DateProduct Total AmountProduct Amount Due
<%=resultSet.getString(1)%><%=resultSet.getString(3)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%>
+ <%} else if ((screenName.equalsIgnoreCase("SellPurchaseAdjustment.jsp")) && (lovKey.equalsIgnoreCase("searchStock"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + + + <%}%> +
Sell IDCustomer NameTotal Amount DuePayment Due DateProduct Total AmountProduct Amount Due
<%=resultSet.getString(1)%><%=resultSet.getString(3)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%>
+ <%} else if ((screenName.equalsIgnoreCase("leaseRentCommodity.jsp")) && (lovKey.equalsIgnoreCase("commDetails"))) {%> + <%if (!resultSet.isBeforeFirst()) {%> +

No Lease product found

+
<%} else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + <%}%> +
Commodity TypeCommodity Type DescCommodity Sub-TypeSub-Type DescPrice Per UnitPrice FrequencyMinimum TermMaximum Term
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%>
+ <%} + } else if ((screenName.equalsIgnoreCase("leaseRentCommodity.jsp")) && (lovKey.equalsIgnoreCase("custDetails"))) {%> + <%if (!resultSet.isBeforeFirst()) {%> +

No Customer found

+
<%} else {%> + + <%if (searchString2.equalsIgnoreCase("R") || searchString2.equalsIgnoreCase("RA")) {%> <%}%> + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%if (searchString2.equalsIgnoreCase("R") || searchString2.equalsIgnoreCase("RA")) {%> + + + + + + + + + + + + <% }%> + + + <%}%> +
Pacs IDCustomer IDCustomer NameCustomer AddressContact NumberContact PersonCustomer TypeCIF NumberNumber of UnitsLease/Rent Start DateSecurity AmountTotal AmountAmount PaidAmount DueTerm LengthPrice Frequency
opener.document.leaseCommodity.oldNoOfUnits.value = document.getElementById('f<%=i%>').innerHTML;opener.document.leaseCommodity.tdLeaseID.value = document.getElementById('j<%=i%>').innerHTML;opener.document.leaseCommodity.fxdNounit.value = document.getElementById('f<%=i%>').innerHTML;opener.document.leaseCommodity.fxdTrmLen.value = document.getElementById('n<%=i%>').innerHTML;opener.document.leaseCommodity.fxdSecAmt.value = document.getElementById('h<%=i%>').innerHTML;opener.document.leaseCommodity.fxdPayDue.value = document.getElementById('l<%=i%>').innerHTML;opener.showFixed();<%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(8)%>opener.document.leaseCommodity.oldNoOfUnits.value = document.getElementById('f<%=i%>').innerHTML;opener.document.leaseCommodity.tdLeaseID.value = document.getElementById('j<%=i%>').innerHTML;opener.document.leaseCommodity.fxdNounit.value = document.getElementById('f<%=i%>').innerHTML;opener.document.leaseCommodity.fxdTrmLen.value = document.getElementById('n<%=i%>').innerHTML;opener.document.leaseCommodity.fxdSecAmt.value = document.getElementById('h<%=i%>').innerHTML;opener.document.leaseCommodity.fxdPayDue.value = document.getElementById('l<%=i%>').innerHTML;opener.showFixed();<%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%>opener.document.leaseCommodity.oldNoOfUnits.value = document.getElementById('f<%=i%>').innerHTML;opener.document.leaseCommodity.tdLeaseID.value = document.getElementById('j<%=i%>').innerHTML;opener.document.leaseCommodity.fxdNounit.value = document.getElementById('f<%=i%>').innerHTML;opener.document.leaseCommodity.fxdTrmLen.value = document.getElementById('n<%=i%>').innerHTML;opener.document.leaseCommodity.fxdSecAmt.value = document.getElementById('h<%=i%>').innerHTML;opener.document.leaseCommodity.fxdPayDue.value = document.getElementById('l<%=i%>').innerHTML;opener.showFixed();<%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%>opener.document.leaseCommodity.oldNoOfUnits.value = document.getElementById('f<%=i%>').innerHTML;opener.document.leaseCommodity.tdLeaseID.value = document.getElementById('j<%=i%>').innerHTML;opener.document.leaseCommodity.fxdNounit.value = document.getElementById('f<%=i%>').innerHTML;opener.document.leaseCommodity.fxdTrmLen.value = document.getElementById('n<%=i%>').innerHTML;opener.document.leaseCommodity.fxdSecAmt.value = document.getElementById('h<%=i%>').innerHTML;opener.document.leaseCommodity.fxdPayDue.value = document.getElementById('l<%=i%>').innerHTML;opener.showFixed();<%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%>opener.document.leaseCommodity.oldNoOfUnits.value = document.getElementById('f<%=i%>').innerHTML;opener.document.leaseCommodity.tdLeaseID.value = document.getElementById('j<%=i%>').innerHTML;opener.document.leaseCommodity.fxdNounit.value = document.getElementById('f<%=i%>').innerHTML;opener.document.leaseCommodity.fxdTrmLen.value = document.getElementById('n<%=i%>').innerHTML;opener.document.leaseCommodity.fxdSecAmt.value = document.getElementById('h<%=i%>').innerHTML;opener.document.leaseCommodity.fxdPayDue.value = document.getElementById('l<%=i%>').innerHTML;opener.showFixed();<%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%>opener.document.leaseCommodity.oldNoOfUnits.value = document.getElementById('f<%=i%>').innerHTML;opener.document.leaseCommodity.tdLeaseID.value = document.getElementById('j<%=i%>').innerHTML;opener.document.leaseCommodity.fxdNounit.value = document.getElementById('f<%=i%>').innerHTML;opener.document.leaseCommodity.fxdTrmLen.value = document.getElementById('n<%=i%>').innerHTML;opener.document.leaseCommodity.fxdSecAmt.value = document.getElementById('h<%=i%>').innerHTML;opener.document.leaseCommodity.fxdPayDue.value = document.getElementById('l<%=i%>').innerHTML;opener.showFixed();<%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%>opener.document.leaseCommodity.oldNoOfUnits.value = document.getElementById('f<%=i%>').innerHTML;opener.document.leaseCommodity.tdLeaseID.value = document.getElementById('j<%=i%>').innerHTML;opener.document.leaseCommodity.fxdNounit.value = document.getElementById('f<%=i%>').innerHTML;opener.document.leaseCommodity.fxdTrmLen.value = document.getElementById('n<%=i%>').innerHTML;opener.document.leaseCommodity.fxdSecAmt.value = document.getElementById('h<%=i%>').innerHTML;opener.document.leaseCommodity.fxdPayDue.value = document.getElementById('l<%=i%>').innerHTML;opener.showFixed();<%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%>opener.document.leaseCommodity.oldNoOfUnits.value = document.getElementById('f<%=i%>').innerHTML;opener.document.leaseCommodity.tdLeaseID.value = document.getElementById('j<%=i%>').innerHTML;opener.document.leaseCommodity.fxdNounit.value = document.getElementById('f<%=i%>').innerHTML;opener.document.leaseCommodity.fxdTrmLen.value = document.getElementById('n<%=i%>').innerHTML;opener.document.leaseCommodity.fxdSecAmt.value = document.getElementById('h<%=i%>').innerHTML;opener.document.leaseCommodity.fxdPayDue.value = document.getElementById('l<%=i%>').innerHTML;opener.showFixed();<%}%> + self.close();" style="cursor:pointer;"><%=resultSet.getString(7)%><%=resultSet.getString(9)%><%=resultSet.getString(10)%><%=resultSet.getString(11)%><%=resultSet.getString(12)%><%=resultSet.getString(14)%><%=resultSet.getString(15)%><%=resultSet.getString(17)%><%=resultSet.getString(18)%>
+ <% }} else if ((screenName.equalsIgnoreCase("PaymentAcknowledgement.jsp")) && (lovKey.equalsIgnoreCase("searchAccount"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
GL Account NumberLedger NameGL Code
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <% } else if ((screenName.equalsIgnoreCase("PaymentAcknowledgement.jsp")) && (lovKey.equalsIgnoreCase("searchAccount2"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
GL Account NumberLedger NameGL Code
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <% } else if ((screenName.equalsIgnoreCase("tradingProductCreation.jsp")) && (lovKey.equalsIgnoreCase("commoditytype"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
Commodity TypeType DescriptionCommodity Sub-Type
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} else if (screenName.equalsIgnoreCase("tradingProductCreation.jsp") && (lovKey.equalsIgnoreCase("purchaseGL"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account No.Ledger NameGl CodeIDGl Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + <%}%> + <%} else if (screenName.equalsIgnoreCase("tradingProductCreation.jsp") && (lovKey.equalsIgnoreCase("saleGL"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account No.Ledger NameGl CodeIDGl Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + <%}%> + <%} else if (screenName.equalsIgnoreCase("tradingProductCreation.jsp") && (lovKey.equalsIgnoreCase("closeGL"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account No.Ledger NameGl CodeIDGl Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + <%}%> + <%} else if (screenName.equalsIgnoreCase("tradingProductCreation.jsp") && (lovKey.equalsIgnoreCase("tradeGL"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account No.Ledger NameGl CodeIDGl Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + <%}%> + <%} else if (screenName.equalsIgnoreCase("tradingProductCreation.jsp") && (lovKey.equalsIgnoreCase("purchaseGLAmend"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account No.Ledger NameGl CodeIDGl Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + <%}%> + <%} else if (screenName.equalsIgnoreCase("tradingProductCreation.jsp") && (lovKey.equalsIgnoreCase("saleGLAmend"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account No.Ledger NameGl CodeIDGl Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + <%}%> + <%} else if (screenName.equalsIgnoreCase("tradingProductCreation.jsp") && (lovKey.equalsIgnoreCase("closeGLAmend"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account No.Ledger NameGl CodeIDGl Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + <%}%> + <%} else if (screenName.equalsIgnoreCase("tradingProductCreation.jsp") && (lovKey.equalsIgnoreCase("tradeGLAmend"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account No.Ledger NameGl CodeIDGl Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + <%}%> + <%}%> +
+ + <% + } catch (Exception ex) { + + } finally { + if (resultSet != null) { + resultSet.close(); + } + if (pstmt != null) { + pstmt.close(); + } + if (conn != null) { + conn.close(); + } + } + %> + + diff --git a/IPKS_Updated/web/web/web/CommonSearchInformation_ASSET_LOV.jsp b/IPKS_Updated/web/web/web/CommonSearchInformation_ASSET_LOV.jsp new file mode 100644 index 0000000..a48fcb1 --- /dev/null +++ b/IPKS_Updated/web/web/web/CommonSearchInformation_ASSET_LOV.jsp @@ -0,0 +1,510 @@ +<%-- + Document : CommonSearchInformationTradingLOV + Created on : Mar 10, 2016, 2:30:36 AM + Author : SUBHAM +--%> + +<%@page import="java.sql.PreparedStatement"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> + + + + + + Customer Information Search + + + <% + String searchString1 = ""; + String screenName = ""; + String searchString2 = ""; + String lovKey = ""; + String textIndex = ""; + + screenName = request.getParameter("screenName"); + lovKey = request.getParameter("lovKey"); + String pacsId = session.getAttribute("pacsId").toString(); + String productId = request.getParameter("productId"); + + String headerQry = null; + + if (screenName.equalsIgnoreCase("assetEntry.jsp") && (lovKey.equalsIgnoreCase("AssetCodeSearch"))) { + + textIndex = request.getParameter("textIndex"); + + headerQry = "select ID,ASSET_TYPE,TYPE_DESC,ASSET_SUBTYPE,SUBTYPE_DESC from ASSET_MASTER"; + } else if (screenName.equalsIgnoreCase("assetRegister.jsp") && (lovKey.equalsIgnoreCase("assetDetails"))) { + + //searchString1 = request.getParameter("asset_type"); + //searchString2 = request.getParameter("asset_subtype"); + + if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,asset_type,type_desc,asset_subtype,subtype_desc from asset_master"; + } else if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select id,asset_type,type_desc,asset_subtype,subtype_desc from asset_master where asset_type like '%" + searchString2.replace(' ', '%') + "%'"; + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,asset_type,type_desc,asset_subtype,subtype_desc from asset_master where asset_type like '%" + searchString1.replace(' ', '%') + "%'"; + } else { + headerQry = "select id,asset_type,type_desc,asset_subtype,subtype_desc from asset_master where asset_type like '%" + searchString1.replace(' ', '%') + "%' and asset_subtype like '%" + searchString2.replace(' ', '%') + "%'"; + } + + } else if ((screenName.equalsIgnoreCase("assetDisposal.jsp")) && (lovKey.equalsIgnoreCase("assetDisposalDetails"))) { + + // searchString1 = request.getParameter("asset_id"); + + if (searchString1.equalsIgnoreCase("")) { + headerQry = "select id,asset_id,description from asset_register where pacs_id='"+pacsId+"'"; + } else if (!searchString1.equalsIgnoreCase("")) { + headerQry = "select id,asset_id,description from asset_register where pacs_id='"+pacsId+"' and upper(asset_id) like upper('%" + searchString1.replace(' ', '%') + "%') "; + } + } else if ((screenName.equalsIgnoreCase("assetRelocation.jsp")) && (lovKey.equalsIgnoreCase("assetRelocationDetails"))) { + + // searchString1 = request.getParameter("asset_id"); + + if (searchString1.equalsIgnoreCase("")) { + headerQry = "select id,asset_id,description from asset_register where pacs_id='"+pacsId+"'"; + } else if (!searchString1.equalsIgnoreCase("")) { + headerQry = "select id,asset_id,description from asset_register where pacs_id='"+pacsId+"' and upper(asset_id) like upper('%" + searchString1.replace(' ', '%') + "%') "; + } + } else if ((screenName.equalsIgnoreCase("assetRelocation.jsp")) && (lovKey.equalsIgnoreCase("assetRelocationDetails2"))) { + + // searchString1 = request.getParameter("pacsName"); + + if (searchString1.equalsIgnoreCase("")) { + headerQry = "select p.PACS_ID,p.PACS_NAME from pacs_master p where p.head_pacs_id in (select pm.head_pacs_id from pacs_master pm where pm.pacs_id='"+pacsId+"')"; + + } else if (!searchString1.equalsIgnoreCase("")) { + headerQry = "select PACS_ID,PACS_NAME from pacs_master where upper(PACS_NAME) like upper('%" + searchString1.replace(' ', '%') + "%') "; + } + } else if ((screenName.equalsIgnoreCase("Asset_Enquiry.jsp")) && (lovKey.equalsIgnoreCase("Asset_EnquiryDetails"))) { + + // searchString1 = request.getParameter("asset_id"); + + if (searchString1.equalsIgnoreCase("")) { + headerQry = "select ASSET_MST_ID,ASSET_ID,DESCRIPTION from ASSET_REGISTER order by ASSET_ID"; + } else if (!searchString1.equalsIgnoreCase("")) { + headerQry = "select ASSET_MST_ID,ASSET_ID,DESCRIPTION from ASSET_REGISTER where upper(ASSET_ID) like upper('%" + searchString1.replace(' ', '%') + "%') order by ASSET_ID "; + } + } else if (screenName.equalsIgnoreCase("assetMaster.jsp") && (lovKey.equalsIgnoreCase("assetMasterAmend"))) { + + // searchString1 = request.getParameter("asset_typeSearch"); + // searchString2 = request.getParameter("asset_subtypeSearch"); + + if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,asset_type,type_desc,asset_subtype,subtype_desc from asset_master"; + } else if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select id,asset_type,type_desc,asset_subtype,subtype_desc from asset_master where ASSET_SUBTYPE like '%" + searchString2.replace(' ', '%') + "%'"; + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,asset_type,type_desc,asset_subtype,subtype_desc from asset_master where asset_type like '%" + searchString1.replace(' ', '%') + "%'"; + } else { + headerQry = "select id,asset_type,type_desc,asset_subtype,subtype_desc from asset_master where asset_type like '%" + searchString1.replace(' ', '%') + "%' and asset_subtype like '%" + searchString2.replace(' ', '%') + "%'"; + } + + } else if (screenName.equalsIgnoreCase("assetEntry.jsp") && (lovKey.equalsIgnoreCase("gl"))) { + // searchString1 = request.getParameter("glcode"); + searchString2 = request.getParameter("textIndex"); + + headerQry = " select ga.key_1, ga.ledger_name, gp.gl_code, gp.comp1||gp.comp2 as id, gp.gl_name from gl_account ga, gl_product gp where substr(ga.gl_class_code, 9, 2) in ('20', '21', '22') and ga.gl_prod_id = gp.id and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') "; + + } else if (screenName.equalsIgnoreCase("crarRiskMaster.jsp") && (lovKey.equalsIgnoreCase("gl"))) { + // searchString1 = request.getParameter("glcode"); + searchString2 = request.getParameter("textIndex"); + + headerQry = " select ga.prod_name, substr(ga.glcc,14,5) gl_code, substr(ga.glcc,9,5)||substr(ga.glcc,14,5) id, substr(ga.glcc,9,5)comp1 , substr(ga.glcc,14,5) comp2 from trial_balance_shadow ga where substr(ga.glcc,9,1) ='2' and ga.ledger_dt=(select system_date-1 from system_date) and ga.pacs_id= '" + pacsId + "' and (substr(ga.glcc,14,5) like '%" + searchString1.replace(' ', '%') + "%' or ga.prod_name like upper('%" + searchString1.replace(' ', '%') + "%')) "; + + } else if (screenName.equalsIgnoreCase("crarWorthMaster.jsp") && (lovKey.equalsIgnoreCase("gl"))) { + // searchString1 = request.getParameter("glcode"); + searchString2 = request.getParameter("textIndex"); + + headerQry = " select ga.prod_name, substr(ga.glcc,14,5) gl_code, substr(ga.glcc,9,5)||substr(ga.glcc,14,5) id, substr(ga.glcc,9,5)comp1 , substr(ga.glcc,14,5) comp2 from trial_balance_shadow ga where substr(ga.glcc,9,1) ='1' and ga.ledger_dt=(select system_date-1 from system_date) and ga.pacs_id= '" + pacsId + "' and (substr(ga.glcc,14,5) like '%" + searchString1.replace(' ', '%') + "%' or ga.prod_name like upper('%" + searchString1.replace(' ', '%') + "%')) "; + } + + + Connection conn = DbHandler.getDBConnection(); + PreparedStatement pstmt = null; + + ResultSet resultSet = null; + String bgColor = null; + int flag = 1; + + try { + pstmt = conn.prepareStatement(headerQry); + resultSet = pstmt.executeQuery(); + + %> + + +
+ + <%if (screenName.equalsIgnoreCase("assetEntry.jsp") && (lovKey.equalsIgnoreCase("AssetCodeSearch"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
IDAsset TypeAsset Type DescAsset SubTypeAsset SubType Desc
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%}else if (screenName.equalsIgnoreCase("assetRegister.jsp") && (lovKey.equalsIgnoreCase("assetDetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Asset_MST_IDAsset TypeType DescAsset SubTypeSubType Desc
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} else if ((screenName.equalsIgnoreCase("assetDisposal.jsp")) && (lovKey.equalsIgnoreCase("assetDisposalDetails"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
IDASSET_IDDescription
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} else if ((screenName.equalsIgnoreCase("assetRelocation.jsp")) && (lovKey.equalsIgnoreCase("assetRelocationDetails"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
IDASSET_IDDescription
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%}else if ((screenName.equalsIgnoreCase("assetRelocation.jsp")) && (lovKey.equalsIgnoreCase("assetRelocationDetails2"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
PACS IDPACS NAME
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} else if ((screenName.equalsIgnoreCase("Asset_Enquiry.jsp")) && (lovKey.equalsIgnoreCase("Asset_EnquiryDetails"))) {%> + + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
ASSET MST IDASSET IDDESCRIPTION
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%>
+ <%} else if (screenName.equalsIgnoreCase("assetMaster.jsp") && (lovKey.equalsIgnoreCase("assetMasterAmend"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Asset_MST_IDAsset TypeType DescAsset SubTypeSubType Desc
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} else if (screenName.equalsIgnoreCase("assetEntry.jsp") && (lovKey.equalsIgnoreCase("gl"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account No.Ledger NameGl CodeIDGl Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%}%> + <%} else if (screenName.equalsIgnoreCase("crarRiskMaster.jsp") && (lovKey.equalsIgnoreCase("gl"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Product NameGL CodeGl IDComp1Comp2
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%}%> + <%} else if (screenName.equalsIgnoreCase("crarWorthMaster.jsp") && (lovKey.equalsIgnoreCase("gl"))) {%> + <% if (!resultSet.isBeforeFirst()) {%> +

No Customer found! Close this window & Please recheck the Customer Name selected.

+ +
+ <% } else {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + <%}%> +
Account No.Ledger NameGl CodeIDGl Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%}%> + <%}%> + +
+ + <% + } catch (Exception ex) { + // System.out.println(ex); + } finally { + if (resultSet != null) { + resultSet.close(); + } + if (pstmt != null) { + pstmt.close(); + } + if (conn != null) { + conn.close(); + } + } + %> + + diff --git a/IPKS_Updated/web/web/web/CommonSearchInformation_GPS_LOV.jsp b/IPKS_Updated/web/web/web/CommonSearchInformation_GPS_LOV.jsp new file mode 100644 index 0000000..b14e7fe --- /dev/null +++ b/IPKS_Updated/web/web/web/CommonSearchInformation_GPS_LOV.jsp @@ -0,0 +1,713 @@ +<%-- + Document : CommonSearchInformation_GPS_LOV + Created on : Jul 14, 2016, 11:36:14 AM + Author : Tcs Help desk122 +--%> + + +<%@page import="java.sql.PreparedStatement"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> + + + + + + Customer Information Search + + + <% + String searchString1 = ""; + String screenName = ""; + String searchString2 = ""; + String lovKey = ""; + String textIndex = ""; + + screenName = request.getParameter("screenName"); + lovKey = request.getParameter("lovKey"); + String pacsId = session.getAttribute("pacsId").toString(); + String productId = request.getParameter("productId"); + + String headerQry = null; + + if (screenName.equalsIgnoreCase("MasterRollEnrollment.jsp") && (lovKey.equalsIgnoreCase("memberDetails"))) { + + // searchString1 = request.getParameter("memberId"); + // searchString2 = request.getParameter("memberName"); + if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select ID,Name from master_roll_enrollment where upper(name) like upper('%" + searchString2.replace(' ', '%') + "%') and pacs_id='" + pacsId + "'"; + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select ID,Name from master_roll_enrollment where id like '%" + searchString1.replace(' ', '%') + "%' and pacs_id='" + pacsId + "'"; + } else if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select ID,Name from master_roll_enrollment where pacs_id='" + pacsId + "'"; + } else { + headerQry = "select ID,Name from master_roll_enrollment where id like '%" + searchString1.replace(' ', '%') + "%' and upper(name) like upper('%" + searchString2.replace(' ', '%') + "%') and pacs_id='" + pacsId + "'"; + } + } + + if (screenName.equalsIgnoreCase("CommodityMaster.jsp") && (lovKey.equalsIgnoreCase("CommodityMasterDetails"))) { + + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc from gps_commodity_master where pacs_id='" + pacsId + "' "; + } else if (screenName.equalsIgnoreCase("GovtOrderCreation.jsp") && (lovKey.equalsIgnoreCase("GovtOrderDetails"))) { + + textIndex = request.getParameter("textIndex"); + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc,unit from gps_commodity_master"; + } else if (screenName.equalsIgnoreCase("GovtOrderCreation.jsp") && (lovKey.equalsIgnoreCase("GovtOrderDetailsUpdate"))) { + + textIndex = request.getParameter("textIndex"); + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc,unit from gps_commodity_master "; + } else if (screenName.equalsIgnoreCase("ItemProcurement.jsp") && (lovKey.equalsIgnoreCase("ItemProcurementDetails"))) { + + textIndex = request.getParameter("textIndex"); + // searchString1 = request.getParameter("orderId"); + + headerQry = "select c.id,c.item_type,c.item_subtype,c.type_desc,c.subtype_desc,c.unit,p.quantity_available,p.rate_unit from gps_commodity_master c ,gps_govt_proc_detail p where c.id=p.commodity_id and p.order_id='" + searchString1 + "' "; + } else if (screenName.equalsIgnoreCase("sellregister.jsp") && (lovKey.equalsIgnoreCase("itemdetails"))) { + + // searchString1 = request.getParameter("itemType"); + // searchString2 = request.getParameter("itemSubType"); + if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc from gps_commodity_master where upper(subtype_desc) like upper('%" + searchString2.replace(' ', '%') + "%') "; + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc from gps_commodity_master where upper(type_desc) like upper('%" + searchString1.replace(' ', '%') + "%') "; + } else if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc from gps_commodity_master "; + } else { + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc from gps_commodity_master where upper(type_desc) like upper('%" + searchString1.replace(' ', '%') + "%') and upper(subtype_desc) like upper('%" + searchString2.replace(' ', '%') + "%')"; + } + } else if (screenName.equalsIgnoreCase("ProcurementRegister.jsp") && (lovKey.equalsIgnoreCase("procuredetails"))) { + + // searchString1 = request.getParameter("itemType"); + // searchString2 = request.getParameter("itemSubType"); + if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc from gps_commodity_master where upper(subtype_desc) like upper('%" + searchString2.replace(' ', '%') + "%') and pacs_id='" + pacsId + "'"; + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc from gps_commodity_master where upper(type_desc) like upper('%" + searchString1.replace(' ', '%') + "%') and pacs_id='" + pacsId + "'"; + } else if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc from gps_commodity_master "; + } else { + headerQry = "select id,item_type,type_desc,item_subtype,subtype_desc from gps_commodity_master where upper(type_desc) like upper('%" + searchString1.replace(' ', '%') + "%') and upper(subtype_desc) like upper('%" + searchString2.replace(' ', '%') + "%') and pacs_id='" + pacsId + "'"; + } + } else if (screenName.equalsIgnoreCase("ItemProcurement.jsp") && (lovKey.equalsIgnoreCase("masterdetails"))) { + + // searchString1 = request.getParameter("masterId"); + // searchString2 = request.getParameter("masterName"); + if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) { + headerQry = "select id,name from master_roll_enrollment where upper(name) like upper('%" + searchString2.replace(' ', '%') + "%') "; + } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,name from master_roll_enrollment where id like upper('%" + searchString1.replace(' ', '%') + "%')"; + } else if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) { + headerQry = "select id,name from master_roll_enrollment "; + } else { + headerQry = "select id,name from master_roll_enrollment where upper(name) like upper('%" + searchString2.replace(' ', '%') + "%') and id like upper('%" + searchString1.replace(' ', '%') + "%')"; + } + } else if (screenName.equalsIgnoreCase("GovtOrderCreation.jsp") && (lovKey.equalsIgnoreCase("Orderdetails"))) { + + headerQry = "select id,order_code from gps_govt_proc_header where pacs_id='" + pacsId + "'"; + + } else if (screenName.equalsIgnoreCase("SellProcureItem.jsp") && (lovKey.equalsIgnoreCase("SellProcureDetails"))) { + + textIndex = request.getParameter("textIndex"); + // searchString1 = request.getParameter("govtProcId"); + + headerQry = "select c.id,c.item_type,c.type_desc,c.item_subtype,c.subtype_desc,g.procurement_id,c.unit,p.rate_unit,g.available_quantity,g.muster_roll_id,g.stock_id from gps_commodity_master c ,gps_govt_proc_detail p,GPS_ITEM_PROCUREMENT g where c.id=p.commodity_id and c.id=g.COMMODITY_ID and g.govt_procurement_code = p.order_id and p.order_id='" + searchString1 + "' and g.pacs_id='" + pacsId + "' "; + + } else if (screenName.equalsIgnoreCase("SellProcureItem.jsp") && (lovKey.equalsIgnoreCase("govtprocuredetails"))) { + + headerQry = "select id,order_code from gps_govt_proc_header where pacs_id='" + pacsId + "'"; + + } + + Connection conn = DbHandler.getDBConnection(); + PreparedStatement pstmt = null; + + ResultSet resultSet = null; + String bgColor = null; + int flag = 1; + + try { + pstmt = conn.prepareStatement(headerQry); + resultSet = pstmt.executeQuery(); + + %> + + +
+ + <%if (screenName.equalsIgnoreCase("MasterRollEnrollment.jsp") && (lovKey.equalsIgnoreCase("memberDetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + <%}%> +
IDMember Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} else if (screenName.equalsIgnoreCase("CommodityMaster.jsp") && (lovKey.equalsIgnoreCase("CommodityMasterDetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Commodity IDItem TypeType DescItem SubTypeSubtype Desc
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} else if (screenName.equalsIgnoreCase("GovtOrderCreation.jsp") && (lovKey.equalsIgnoreCase("GovtOrderDetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Commodity IDItem TypeType DescItem SubTypeSubtype Desc
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} else if (screenName.equalsIgnoreCase("GovtOrderCreation.jsp") && (lovKey.equalsIgnoreCase("GovtOrderDetailsUpdate"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Commodity IDItem TypeType DescItem SubTypeSubtype Desc
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} else if (screenName.equalsIgnoreCase("ItemProcurement.jsp") && (lovKey.equalsIgnoreCase("ItemProcurementDetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + <%}%> +
Commodity IDItem TypeItem SubTypeUnitRemaining QuantityRate/Unit
<%=resultSet.getString(1)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%>
+ <%} else if (screenName.equalsIgnoreCase("sellregister.jsp") && (lovKey.equalsIgnoreCase("itemdetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Commodity IDItem TypeType DescSubtype ItemSubtype Desc
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ + <%} else if (screenName.equalsIgnoreCase("ProcurementRegister.jsp") && (lovKey.equalsIgnoreCase("procuredetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + <%}%> +
Commodity IDItem TypeType DescSubtype ItemSubtype Desc
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%>
+ <%} else if (screenName.equalsIgnoreCase("ItemProcurement.jsp") && (lovKey.equalsIgnoreCase("masterdetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
Master IDMaster Name
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%} else if (screenName.equalsIgnoreCase("GovtOrderCreation.jsp") && (lovKey.equalsIgnoreCase("Orderdetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
Order IDOrder Code
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ + <%} else if (screenName.equalsIgnoreCase("SellProcureItem.jsp") && (lovKey.equalsIgnoreCase("SellProcureDetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + + + + + + + + + + + <%}%> +
Commodity IDItem TypeType DescriptionProcurement IDItem SubTypeSubType DescriptionSeller IDUnitRate/UnitQuantity
<%=resultSet.getString(1)%><%=resultSet.getString(2)%><%=resultSet.getString(3)%><%=resultSet.getString(10)%><%=resultSet.getString(4)%><%=resultSet.getString(5)%><%=resultSet.getString(6)%><%=resultSet.getString(7)%><%=resultSet.getString(8)%><%=resultSet.getString(9)%>
+ <%} else if (screenName.equalsIgnoreCase("SellProcureItem.jsp") && (lovKey.equalsIgnoreCase("govtprocuredetails"))) {%> + + + <%int i = 0; + while (resultSet.next()) { + i++; + if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + <%}%> +
Procurement IDProcurement Code
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+ <%}%> +
+ + <% + } catch (Exception ex) { + // System.out.println(ex); + } finally { + if (resultSet != null) { + resultSet.close(); + } + if (pstmt != null) { + pstmt.close(); + } + if (conn != null) { + conn.close(); + } + } + %> + + diff --git a/IPKS_Updated/web/web/web/CommonSearchPhotoSignatureLOV.jsp b/IPKS_Updated/web/web/web/CommonSearchPhotoSignatureLOV.jsp new file mode 100644 index 0000000..16f611a --- /dev/null +++ b/IPKS_Updated/web/web/web/CommonSearchPhotoSignatureLOV.jsp @@ -0,0 +1,160 @@ +<%-- + Document : CommonSearchPhotoSignatureLOV + Created on : Jun 7, 2017, 1:53:19 PM + Author : 594267 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.PreparedStatement"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> + + + + + + Product Selection + + + + + + + + + + <% + String searchString1 = ""; + String screenName = ""; + String searchString2 = ""; + String lovKey = ""; + String textIndex = ""; + String tranType = ""; + String productCode = ""; + String searchString3 = ""; + + + screenName = request.getParameter("screenName"); + lovKey = request.getParameter("lovKey"); + String pacsId = session.getAttribute("pacsId").toString(); + textIndex = request.getParameter("textIndex"); + String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + String headPacsId = (String) session.getAttribute("headPacsId").toString(); + + String headerQry = null; + + searchString1 = request.getParameter("custNo"); + + String bgColor = null; + int flag = 1; + + %> + Photo Signature + + ');javascript:sigImageExists('${pageContext.request.contextPath}/UploadedFiles/<%="sig-" + searchString1 + ".jpg"%>')"> + <% + if (searchString1 == null || searchString1.isEmpty()) { + %> +

Please search a account to get the photo and signature

+ +
+ <%} else {%> + + + <% if (flag == 1) { + flag = 0; + bgColor = "#AFC7C7"; + } else { + flag = 1; + bgColor = "#95B9C7"; + }%> + + + + + + + + +
CIF NumberPhotoSignature
<%=searchString1%>" height="150" width="140" border="1px"/> + " height="50" width="140" border="1px"/> + +
+ <%}%> + + + diff --git a/IPKS_Updated/web/web/web/CropLoanDisbursementVidyasagar.jsp b/IPKS_Updated/web/web/web/CropLoanDisbursementVidyasagar.jsp new file mode 100644 index 0000000..9e6e046 --- /dev/null +++ b/IPKS_Updated/web/web/web/CropLoanDisbursementVidyasagar.jsp @@ -0,0 +1,72 @@ +<%-- + Document : CropLoanDisbursementVidyasagar + Created on : 23-May-2023, 6:31:49 PM + Author : 1815522 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + Crop Loan Disbursement Vidyasagar + + + + + + + + + + + + + + + +
+
+ Crop Loan Disbursement + +
+
+
+ Select file to upload: +

+ + + +
+
+
+ +
${errorMessageSAL}
+
${successMessageSAL}
+
+ + diff --git a/IPKS_Updated/web/web/web/DDS/CashWidrawlDeposit.jsp b/IPKS_Updated/web/web/web/DDS/CashWidrawlDeposit.jsp new file mode 100644 index 0000000..6f47aa3 --- /dev/null +++ b/IPKS_Updated/web/web/web/DDS/CashWidrawlDeposit.jsp @@ -0,0 +1,203 @@ +<%-- + Document : CashWithdrawlDeposit + Created on : Jul 11, 2018, 5:40:14 PM + Author : 1004242 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="java.util.Date"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + + + + + + DDS OPERATIONS + <%-- --%> + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + + + +
+ DDS Operations +
+
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + <%--
${errorMessage}
--%> +
+
+
+
+ + +
+
+ + + +
+
+ + + <%----%> +
+ +
+ + + +
+
+ + +
+ + <%--
+ + +
--%> + + + + + + +
+
+
+
+
+
+ + + + + + + + + + diff --git a/IPKS_Updated/web/web/web/DDS/MenuHead_DDS.jsp b/IPKS_Updated/web/web/web/DDS/MenuHead_DDS.jsp new file mode 100644 index 0000000..73bd582 --- /dev/null +++ b/IPKS_Updated/web/web/web/DDS/MenuHead_DDS.jsp @@ -0,0 +1,107 @@ +<%-- + Document : MenuHead_DDS + Created on : Jul 11, 2018, 4:34:49 PM + Author : 1004242 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.*"%> + + +<% try { +%> + +<% + String userName = new String(); + String pacsName = new String(); + String userRole = new String(); + String RoleName = new String(); + String sysDt = new String(); + + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select to_char(SYSTEM_DATE,'Month DD, YYYY') from system_date"); + while (rs.next()) { + sysDt = rs.getString(1); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + } + + userName = (String) session.getAttribute("UserName"); + userName = userName.toUpperCase(); + pacsName = (String) session.getAttribute("pacsName"); + userRole = (String) session.getAttribute("userRole"); + RoleName = (String) session.getAttribute("RoleName"); + + String moduleName = new String(); + moduleName = (String) session.getAttribute("moduleName"); + + +%> + +
+ +
+ Image - PACS +
+ +
+
User Name:
<%=userName%>
+
Date:
<%=sysDt%>
+
PACS Name:
<%=pacsName%>
+ +
User Type:
<%=RoleName%>
+
Module Name:
<%=moduleName.toUpperCase()%>
+ +
+ + + + +
+ + + + +
+ +<% } catch (Exception e) { + System.out.println("EX in " + e); + } +%> diff --git a/IPKS_Updated/web/web/web/DDS/TotalCashDepositDDS.jsp b/IPKS_Updated/web/web/web/DDS/TotalCashDepositDDS.jsp new file mode 100644 index 0000000..c0f2c59 --- /dev/null +++ b/IPKS_Updated/web/web/web/DDS/TotalCashDepositDDS.jsp @@ -0,0 +1,938 @@ +<%-- + Document : TotalCashDepositDDS + Created on : Aug 14, 2018, 3:19:08 PM + Author : 1004242 +--%> + + + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="java.util.Date"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="DataEntryBean.transactionOperationBean"%> +<%@page import="java.lang.*"%> +<%@page import="java.util.*"%> + +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + + + + Agent Cash Deposit + + <%-- --%> + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <% + String amt=null; + + String odeno2000 = ""; + String odeno500 = ""; + String odeno200 = ""; + String odeno100 = ""; + String odeno50 = ""; + String odeno20 = ""; + String odeno10 = ""; + String odeno5 = ""; + String odeno2 = ""; + String odeno1 = ""; + String status = "C"; + String odeno50P = ""; + String odeno1P = ""; + String pacsid = (String) session.getAttribute("pacsId"); + String makerId = session.getAttribute("user").toString(); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select nvl(d.deno_2000,0),nvl(d.deno_500,0),nvl(d.deno_100,0),nvl(d.deno_50,0),nvl(d.deno_20,0),nvl(d.deno_10,0),nvl(d.deno_5,0),nvl(d.deno_2,0),nvl(d.deno_1,0),nvl(d.DENO_50P,0),nvl(d.DENO_1P,0),d.status,nvl(d.deno_200,0) from cash_drawer d where d.entry_date = (select system_date from system_date) and d.teller_id ='" + makerId + "' and d.pacs_id ='" + pacsid + "' "); + + while (rs.next()) { + odeno2000 = rs.getString(1); + odeno500 = rs.getString(2); + odeno100 = rs.getString(3); + odeno50 = rs.getString(4); + odeno20 = rs.getString(5); + odeno10 = rs.getString(6); + odeno5 = rs.getString(7); + odeno2 = rs.getString(8); + odeno1 = rs.getString(9); + odeno50P = rs.getString(10); + odeno1P = rs.getString(11); + status = rs.getString(12); + odeno200 = rs.getString(13); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + + + +
+
+ Agent Cash Deposit +
+
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+
+
+ + + + +
+
+ +
+
+ + + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DenominationsAvailableINOUT
+
+
+ +
+ +
+
+
+
+ + + + + +<% } catch (Exception e) { + + } +%> + + + + + + + diff --git a/IPKS_Updated/web/web/web/DDS/TransactionReport.jsp b/IPKS_Updated/web/web/web/DDS/TransactionReport.jsp new file mode 100644 index 0000000..a352756 --- /dev/null +++ b/IPKS_Updated/web/web/web/DDS/TransactionReport.jsp @@ -0,0 +1,156 @@ +<%-- + Document : Transactionreport + Created on : Aug 02, 2018, 3:40:14 PM + Author : 1004242 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="java.util.Date"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + + + + + + DDS REPORTS + <%-- --%> + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + + + +
+ DDS Reports +
+
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+
+ +
+ + + +
+ + + + + + + + +
From Date:
To Date:
+
+ + + <%----%> + + + +
+
+
+
+
+
+ + + + + + + + + diff --git a/IPKS_Updated/web/web/web/Deposit/AccountModeOfOperation.jsp b/IPKS_Updated/web/web/web/Deposit/AccountModeOfOperation.jsp new file mode 100644 index 0000000..39839a8 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/AccountModeOfOperation.jsp @@ -0,0 +1,355 @@ +<%-- + Document : AccountModeOfOperation + Created on : june 19, 2019, 8:18:55 PM + Author : 1242938 +--%> + +<%@page import="java.sql.ResultSet"%> +<%@page import="DataEntryBean.DepositMiscellaneousBean"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + Account Mode Of Operation + + + + + + + + + + + + + + + + +
+ + <% + + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = "N"; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + <% + String pacsId = (String) session.getAttribute("pacsId"); + Object oDepositMiscellaneousBeanObj = request.getAttribute("oDepositMiscellaneousBeanObj"); + DepositMiscellaneousBean oDepositMiscellaneousBean = new DepositMiscellaneousBean(); + if (oDepositMiscellaneousBeanObj != null) { + oDepositMiscellaneousBean = (DepositMiscellaneousBean) request.getAttribute("oDepositMiscellaneousBeanObj"); + } + %> + +
+ Account Mode Of Operation +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+
+ + + + + + + + + +
Enter Deposit Account*:
+
+ + +
+
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + if (displayFlag.equalsIgnoreCase("Y")) { + + %> +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Deposit Account Number: Account Balance:
1st CIF Number: 1st A/C Holder:
2nd CIF Number: 2nd A/C Holder:
Account Status: Nominee CIF:
Account Mode Operation:
+
+ + Select Account Mode of Operation*: + +
+
+
+
+
+ <%}%> + + + +
+
+ + + +<% } catch (Exception e) { + + } +%> + diff --git a/IPKS_Updated/web/web/web/Deposit/AccountStatement_Report.jsp b/IPKS_Updated/web/web/web/Deposit/AccountStatement_Report.jsp new file mode 100644 index 0000000..8371954 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/AccountStatement_Report.jsp @@ -0,0 +1,330 @@ +<%-- + Document : AccountStatement_Report + Created on : May 04, 2019, 9:18:24 PM + Author : 1242938 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="java.util.Date"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.ArrayList" %> +<%@page import="java.lang.String" %> +<% try { +%> + + + + + + + + + + + + + + + + + Account Statement Reports + + + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankNA(String s) { + return (s == null) ? "NA" : s; + } + %> + <% + String pacsId = (String) session.getAttribute("pacsId"); + String userRole = (String) session.getAttribute("userRole"); + Object oEnquiryBeanSearchObj = request.getAttribute("oEnquiryBeanSearchObj"); + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + if (oEnquiryBeanSearchObj != null) { + oEnquiryBean = (EnquiryBean) request.getAttribute("oEnquiryBeanSearchObj"); + session.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearchObj); + } + %> + <%String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + %> + +
+
+ Account Statement Reports + +
+
+ + + <%if (request.getAttribute("error") != null) {%> + + <%}%> + + + + + + + + + + + + + + + + + + + + + + + + +
<%=request.getAttribute("error").toString()%>
Report Name *:
Account Number*: +
From Date*:
To Date*:
Sub-PACS Name:




+
+
+ +
+ + + +
+ + + + + + +
+
+
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Deposit/AdhocReport.jsp b/IPKS_Updated/web/web/web/Deposit/AdhocReport.jsp new file mode 100644 index 0000000..cbb721e --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/AdhocReport.jsp @@ -0,0 +1,198 @@ +<%-- + Document : PACS_REPORT + Created on : Sep 17, 2015, 12:59:59 PM + Author : 590685 +--%> + +<%@page import="DataEntryBean.adhocReportBean"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.ArrayList" %> +<% try { +%> + + + Adhoc Report + + + + + + + + + + + + + + + + + + + + + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + + <% + Object oadhocReportBeanObj = request.getAttribute("oadhocReportBeanObj"); + adhocReportBean oadhocReportBean = new adhocReportBean(); + + if (oadhocReportBeanObj != null) { + oadhocReportBean = (adhocReportBean) request.getAttribute("oadhocReportBeanObj"); + + } + %> + + +
+
+ ADHOC REPORT + +
+
+ <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ +       + +

+ +
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Parameter 1 :      + Param Value 1 :      +
Parameter 2 :      + Param Value 2 :      +
Parameter 3 :      + Param Value 3 :      +
Parameter 4 :      + Param Value 4 :      +
Parameter 5 :      + Param Value 5 :      +
Parameter 6 :      + Param Value 6 :      +
Parameter 7 :      + Param Value 7 :      +
Parameter 8 :      + Param Value 8 :      +
Parameter 9 :      + Param Value 9 :      +
Parameter 10 :      + Param Value 10 :      +
+

+ + +
+ + +
+
+
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Deposit/AgentMapping.jsp b/IPKS_Updated/web/web/web/Deposit/AgentMapping.jsp new file mode 100644 index 0000000..0916092 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/AgentMapping.jsp @@ -0,0 +1,324 @@ +<%-- + Document : CashWithdrawlDeposit + Created on : Jul 16, 2018, 5:40:14 PM + Author : 1004242 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="java.util.Date"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + + + + + + Agent Mapping + <%-- --%> + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + + String error_msg2 = ""; + Object error2 = request.getAttribute("message2"); + if (error2 != null) { + error_msg2 = error2.toString(); + } + %> + + + + +
+ Agent Mapping/Limit Setting +
+ Agent Mapping    + Limit Setting

+
+
+
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +
+
+
+
+ + +
+
+ + + + +
+
+ + + +
+
+ + + + +
+
+ <%----%> + + +
+
+ <%-- --%> + +
+ + <%--
+ + +
--%> + + + + + +
+
+
+
+
+ +
+
+ + <%if (!error_msg2.equalsIgnoreCase("")) {%> +
<%= error_msg2%>
+ <% }%> + +
+
+
+ + +
+ + + +
+ +
+ + +
+ + + + + + +
+
+
+
+
+
+ + + + + + + + + diff --git a/IPKS_Updated/web/web/web/Deposit/AssignToCashDrawer.jsp b/IPKS_Updated/web/web/web/Deposit/AssignToCashDrawer.jsp new file mode 100644 index 0000000..4f46d34 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/AssignToCashDrawer.jsp @@ -0,0 +1,590 @@ +<%-- + Document : AssignToCashDrawer + Created on : Nov 9, 2016, 1:32:46 PM + Author : 986137 +--%> + +<%@page import="DataEntryBean.transactionOperationBean"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + Assign Cash To Cash-Drawer + + + + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + <% String odeno2000 = ""; + String odeno500 = ""; + String odeno200 = ""; + String odeno100 = ""; + String odeno50 = ""; + String odeno20 = ""; + String odeno10 = ""; + String odeno5 = ""; + String odeno2 = ""; + String odeno1 = ""; + String odeno50P = ""; + String odeno1P = ""; + String pacsid = (String) session.getAttribute("pacsId"); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select nvl(r.deno_2000,0),nvl(r.deno_500,0),nvl(r.deno_100,0),nvl(r.deno_50,0),nvl(r.deno_20,0),nvl(r.deno_10,0),nvl(r.deno_5,0),nvl(r.deno_2,0),nvl(r.deno_1,0),nvl(r.DENO_50P,0),nvl(r.DENO_1P,0),nvl(r.deno_200,0) from cash_reserve r where r.pacs_id = '" + pacsid + "' "); + + while (rs.next()) { + odeno2000 = rs.getString(1); + odeno500 = rs.getString(2); + odeno100 = rs.getString(3); + odeno50 = rs.getString(4); + odeno20 = rs.getString(5); + odeno10 = rs.getString(6); + odeno5 = rs.getString(7); + odeno2 = rs.getString(8); + odeno1 = rs.getString(9); + odeno50P = rs.getString(10); + odeno1P = rs.getString(11); + odeno200 = rs.getString(12); + + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + %> + + + <% + String ModuleName = new String(); + + ModuleName = (String) session.getAttribute("moduleName"); + %> + <% if (ModuleName.equalsIgnoreCase("KCC")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Deposit")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Loan")) {%> + + <%}%> +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object otransactionOperationBeanObj = request.getAttribute("otransactionOperationBeanObj"); + transactionOperationBean otransactionOperationBean = new transactionOperationBean(); + if (otransactionOperationBeanObj != null) { + otransactionOperationBean = (transactionOperationBean) request.getAttribute("otransactionOperationBeanObj"); + session.setAttribute("otransactionOperationBeanObj", otransactionOperationBeanObj); + } + %> + +
+ Assign Cash To Cash-Drawer +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ +
+ + + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DenominationsAvailableTo Be Transfered
Rs.2000 Note
Rs.500 Note
Rs.200 Note
Rs.100 Note
Rs.50 Note
Rs.20 Note
Rs.10 Note/Coin
Rs.5 Note/Coin
Rs.2 Note/Coin
Rs.1 Coin
Total Amount(INR)


+ +
+ + +
+
+
+
+
+ + + +<% } catch (Exception e) { + + } +%> + diff --git a/IPKS_Updated/web/web/web/Deposit/Audit_Report.jsp b/IPKS_Updated/web/web/web/Deposit/Audit_Report.jsp new file mode 100644 index 0000000..0b7cb39 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/Audit_Report.jsp @@ -0,0 +1,439 @@ +<%-- + Document : Audit_Report + Created on : Nov 2, 2021, 5:18:24 PM + Author : 1242938 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="java.util.Date"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.ArrayList" %> +<%@page import="java.lang.String" %> +<% try { +%> + + + + + + + + + + + + + + + + + Audit Report + + + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankNA(String s) { + return (s == null) ? "NA" : s; + } + %> + <% + String pacsId = (String) session.getAttribute("pacsId"); + String userRole = (String) session.getAttribute("userRole"); + String moduleName = new String(); + moduleName = (String) session.getAttribute("moduleName"); + Object oEnquiryBeanSearchObj = request.getAttribute("oEnquiryBeanSearchObj"); + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + if (oEnquiryBeanSearchObj != null) { + oEnquiryBean = (EnquiryBean) request.getAttribute("oEnquiryBeanSearchObj"); + session.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearchObj); + } + %> + <%String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + %> + +
+
+ Audit Report + +
+
+ + + <%if (request.getAttribute("error") != null) {%> + + <%}%> + + + + + + + + + + + + + + + + + + +
<%=request.getAttribute("error").toString()%>
From Date*:  
To Date*:  
Report Name*:
Sub-PACS Name*:




+
+
+ +
+ + + +
+ + + + + +
+
+
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Deposit/BCommitteeReport.jsp b/IPKS_Updated/web/web/web/Deposit/BCommitteeReport.jsp new file mode 100644 index 0000000..0de6bf3 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/BCommitteeReport.jsp @@ -0,0 +1,326 @@ +<%-- + Document : BCOMT + Created on : 23112018, 9:18:24 PM + Author : 1004242 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="java.util.Date"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.ArrayList" %> +<%@page import="java.lang.String" %> +<% try { +%> + + + + + + + + + + + + + + + + + B-Committee Report + + + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankNA(String s) { + return (s == null) ? "NA" : s; + } + %> + <% + String pacsId = (String) session.getAttribute("pacsId"); + String userRole = (String) session.getAttribute("userRole"); + Object oEnquiryBeanSearchObj = request.getAttribute("oEnquiryBeanSearchObj"); + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + if (oEnquiryBeanSearchObj != null) { + oEnquiryBean = (EnquiryBean) request.getAttribute("oEnquiryBeanSearchObj"); + session.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearchObj); + } + %> + <%String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + %> + +
+
+ B-Committee Report + +
+
+ + + <%if (request.getAttribute("error") != null) {%> + + <%}%> + + + + + + + + + + + + + + + + + + +
<%=request.getAttribute("error").toString()%>
From Date *:
To Date *:
Report Name *:
Sub-PACS Name:




+
+
+ +
+ + +
+ + + + + + + +
+
+
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Deposit/BGLAccountCreation.jsp b/IPKS_Updated/web/web/web/Deposit/BGLAccountCreation.jsp new file mode 100644 index 0000000..a2fb5d8 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/BGLAccountCreation.jsp @@ -0,0 +1,174 @@ +<%-- + Document : BGLAccountCreation + Created on : May 13, 2019, 6:00:55 PM + Author : 1242938 +--%> + +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.UUID" %> + +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + SUB-GL Account Creation + + + + + + + + + + + + + + + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + + String error_msg = ""; + Object error = request.getAttribute("message1"); + if (error != null) { + error_msg = error.toString(); + + } + %> + +
+ SUB-GL Account Creation + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BGL Code*: +
BGL Name:
Sub GL Name*:
+
+ + + +
+
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Deposit/BatchAuthorisation.jsp b/IPKS_Updated/web/web/web/Deposit/BatchAuthorisation.jsp new file mode 100644 index 0000000..5e4ad40 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/BatchAuthorisation.jsp @@ -0,0 +1,557 @@ +<%-- + Document : BatchAuthorisation + Created on : Jul 23, 2018, 5:40:26 PM + Author : 1004242 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.SQLException"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="DataEntryBean.BatchProcessingBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.util.UUID" %> +<%@page import="java.lang.Math" %> +<%String uuid = UUID.randomUUID().toString();%> + +<% try { +%> + + + + + + Batch Transaction + + + + + + + + + + + + + <% + String handle_idVal = ""; + Object handle_id = request.getAttribute("handle_id"); + if (handle_id != null) { + handle_idVal = handle_id.toString(); + } + %> + + + + <% + int count = 1; + String error_msg = ""; + + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + + Object alBatchProcessingBeanObj = request.getAttribute("alBatchProcessingBean"); + ArrayList alBatchProcessingBean = new ArrayList(); + BatchProcessingBean oBatchProcessingBean = new BatchProcessingBean(); + if (alBatchProcessingBeanObj != null) { + alBatchProcessingBean = (ArrayList) request.getAttribute("alBatchProcessingBean"); + + } + error = request.getAttribute("batchID"); + String batchID = ""; + if (request.getAttribute("batchID") != null) { + batchID = error.toString(); + } + %> + + + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + %> + + + + +
+ + + + +
+ Batch Transaction + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ + +
+
+
+ + + <%--submitform(batchForm)"/>--%> +

+ + <%if (handle_idVal.equalsIgnoreCase("S")) { + double crTotal = 0; + double drTotal = 0; + double total = 0; + //DecimalFormat decim = new DecimalFormat("#.00"); + %> + +
+ + + + + + + + + + + + + + + + <% + for (int k = 0; k < alBatchProcessingBean.size(); k++) { + oBatchProcessingBean = alBatchProcessingBean.get(k); + if (oBatchProcessingBean.getTxnInd().equalsIgnoreCase("DR")) { + drTotal = drTotal + Double.parseDouble(oBatchProcessingBean.getTxnAmt()); + } else if (oBatchProcessingBean.getTxnInd().equalsIgnoreCase("CR")) { + crTotal = crTotal + Double.parseDouble(oBatchProcessingBean.getTxnAmt()); + } + %> + + + + + + + + + + + + + + <%} + drTotal = Math.round(drTotal * 100.0) / 100.0; + crTotal = Math.round(crTotal * 100.0) / 100.0; + total = crTotal - drTotal; + total = Math.round(total * 100.0) / 100.0; + %> + +
Account TypeAccount NumberAccount NameTransaction AmountTransaction IndicatorNarrationTransaction StatusTransaction Ref No
+ + + + + + + + + + + +
+


+
+ + + + + + + + + + + + +
+
+


+
+ + + + + + + +
+
+
+ + <%}%> +
+
+ + + +
+ + +

+ + +
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Deposit/BatchTransaction.jsp b/IPKS_Updated/web/web/web/Deposit/BatchTransaction.jsp new file mode 100644 index 0000000..af5d0d5 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/BatchTransaction.jsp @@ -0,0 +1,635 @@ +<%-- + Document : BatchTransaction + Created on : Jan 16, 2017, 3:21:24 PM + Author : 594267 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.SQLException"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="DataEntryBean.BatchProcessingBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.util.UUID" %> +<%@page import="java.lang.Math" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + + Batch Transaction + + + + + + + + + + + + + <% + String handle_idVal = ""; + Object handle_id = request.getAttribute("handle_id"); + if (handle_id != null) { + handle_idVal = handle_id.toString(); + } + %> + + + + <% + int count = 1; + String error_msg = ""; + + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + + Object alBatchProcessingBeanObj = request.getAttribute("alBatchProcessingBean"); + ArrayList alBatchProcessingBean = new ArrayList(); + BatchProcessingBean oBatchProcessingBean = new BatchProcessingBean(); + if (alBatchProcessingBeanObj != null) { + alBatchProcessingBean = (ArrayList) request.getAttribute("alBatchProcessingBean"); + + } + error = request.getAttribute("batchID"); + String batchID = ""; + if (request.getAttribute("batchID") != null) { + batchID = error.toString(); + } + %> + + + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + %> + + + + +
+ + + + +
+ Batch Processing + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ + +
+ + +
+ +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + +
Account TypeAccount NumberTransaction AmountTransaction IndicatorNarration
+ + + + + /> + + + + +
+


+
+ + + + + + + + + + + + +
+
+


+
+ + + + + + + +
+
+
+ + + + + +
+ +
+
+ +
+ + + +
+ + +

+ + +
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Deposit/BatchTransaction_old.jsp b/IPKS_Updated/web/web/web/Deposit/BatchTransaction_old.jsp new file mode 100644 index 0000000..36e4f7c --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/BatchTransaction_old.jsp @@ -0,0 +1,600 @@ +<%-- + Document : BatchTransaction + Created on : Jan 16, 2017, 3:21:24 PM + Author : 594267 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.SQLException"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="DataEntryBean.BatchProcessingBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + + Batch Transaction + + + + + + + + + + + + + <% + String handle_idVal = ""; + Object handle_id = request.getAttribute("handle_id"); + if (handle_id != null) { + handle_idVal = handle_id.toString(); + } + %> + + + + <% + int count = 1; + String error_msg = ""; + + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + + Object alBatchProcessingBeanObj = request.getAttribute("alBatchProcessingBean"); + ArrayList alBatchProcessingBean = new ArrayList(); + BatchProcessingBean oBatchProcessingBean = new BatchProcessingBean(); + if (alBatchProcessingBeanObj != null) { + alBatchProcessingBean = (ArrayList) request.getAttribute("alBatchProcessingBean"); + + } + error = request.getAttribute("batchID"); + String batchID = ""; + if (request.getAttribute("batchID") != null) { + batchID = error.toString(); + } + %> + + + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + %> + + + + +
+ + + + +
+ BATCH PROCESSING + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ + +
+ + +
+ +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + +
Account TypeAccount NumberTransaction AmountTransaction IndicatorNarration
+ + + + + + + + + +
+


+
+ + + + + + + + + + + + +
+
+


+
+ + + + + + + +
+
+
+ + + + + +
+ +
+
+ +
+ + + +
+ + +

+ + +
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Deposit/BulkFileUpload.jsp b/IPKS_Updated/web/web/web/Deposit/BulkFileUpload.jsp new file mode 100644 index 0000000..6eb59a2 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/BulkFileUpload.jsp @@ -0,0 +1,255 @@ +<%-- + Document : BulkFileUpload + Created on : Sep 26, 2018, 4:48:59 PM + Author : 1004242 +--%> + + + + + + Bulk File Upload + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + + + +
+
+ Bulk File Upload +
+ +
+ <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + + + + + +
Select Operation: + +
+
+
+ + + + + +
${errorMessageBulk}
+
+ + diff --git a/IPKS_Updated/web/web/web/Deposit/CBSAccountMapping.jsp b/IPKS_Updated/web/web/web/Deposit/CBSAccountMapping.jsp new file mode 100644 index 0000000..bf0d578 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/CBSAccountMapping.jsp @@ -0,0 +1,259 @@ +<%-- + Document : CBSAccountMapping + Created on : March 8, 2019, 6:00:55 PM + Author : 1242938 +--%> + +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.UUID" %> + +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + CBS Account Mapping + + + + + + + + + + + + + + + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + String error_msg = ""; + Object error = request.getAttribute("message1"); + if (error != null) { + error_msg = error.toString(); + } + %> + +
+ CBS Account Mapping + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +

+
+ + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
CBS Account:
Current Account*:
Enter PIN Code*:
+
+ + + + <%----%> +
+
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Deposit/CashDrawerCloseOperation.jsp b/IPKS_Updated/web/web/web/Deposit/CashDrawerCloseOperation.jsp new file mode 100644 index 0000000..a05a75a --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/CashDrawerCloseOperation.jsp @@ -0,0 +1,121 @@ +<%-- + Document : CashDrawerCloseOperation + Created on : Nov 9, 2016, 1:32:58 PM + Author : 986137 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + Cash Drawer Close/Open Operation + + + + + + + + + + + + + + + +
+ + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + +
+ + CLOSE CASH DRAWER + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +
+ + + + + + + + + + + + + + + + + + +
Select Operation :
+

+
+
+ + +
+ +
+
+ + +<% } catch (Exception e) { + + } +%> + diff --git a/IPKS_Updated/web/web/web/Deposit/CashDrawerEnquiry.jsp b/IPKS_Updated/web/web/web/Deposit/CashDrawerEnquiry.jsp new file mode 100644 index 0000000..b3ca55a --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/CashDrawerEnquiry.jsp @@ -0,0 +1,509 @@ +<%-- + Document : CashDrawerEnquiry + Created on : Nov 9, 2016, 1:33:18 PM + Author : 986137 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + + Cash Drawer Enquiry + + + + + + + + + + + + + + + + + <% + String ModuleName = new String(); + + ModuleName = (String) session.getAttribute("moduleName"); + %> + <% if (ModuleName.equalsIgnoreCase("KCC")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Deposit")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Loan")) {%> + + <%}%> +
+ +
+
+ Cash Drawer Enquiry + <% + String pacsid = (String) session.getAttribute("pacsId"); + String userRole = (String) session.getAttribute("userRole"); + + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> +
+ <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +
+ Teller ID: + + +

+ + +
+ + + + <% + String status = "Closed"; + error = request.getAttribute("status"); + if (error != null) { + status = error.toString(); + } + + int deno2000 = 0; + error = request.getAttribute("deno2000"); + if (error != null) { + deno2000 = Integer.parseInt(error.toString()); + } + + int deno500 = 0; + error = request.getAttribute("deno500"); + if (error != null) { + deno500 = Integer.parseInt(error.toString()); + } + + int deno200 = 0; + error = request.getAttribute("deno200"); + if (error != null) { + deno200 = Integer.parseInt(error.toString()); + } + + int deno100 = 0; + error = request.getAttribute("deno100"); + if (error != null) { + deno100 = Integer.parseInt(error.toString()); + } + + int deno50 = 0; + error = request.getAttribute("deno50"); + if (error != null) { + deno50 = Integer.parseInt(error.toString()); + } + + int deno20 = 0; + error = request.getAttribute("deno20"); + if (error != null) { + deno20 = Integer.parseInt(error.toString()); + } + + int deno10 = 0; + error = request.getAttribute("deno10"); + if (error != null) { + deno10 = Integer.parseInt(error.toString()); + } + + int deno5 = 0; + error = request.getAttribute("deno5"); + if (error != null) { + deno5 = Integer.parseInt(error.toString()); + } + + int deno2 = 0; + error = request.getAttribute("deno2"); + if (error != null) { + deno2 = Integer.parseInt(error.toString()); + } + + int deno1 = 0; + error = request.getAttribute("deno1"); + if (error != null) { + deno1 = Integer.parseInt(error.toString()); + } + + int deno50p = 0; + error = request.getAttribute("deno50p"); + if (error != null) { + deno50p = Integer.parseInt(error.toString()); + } + int deno1p = 0; + error = request.getAttribute("deno1p"); + if (error != null) { + deno1p = Integer.parseInt(error.toString()); + } + + + double totalAmt = 0; + totalAmt = (2000 * deno2000) + (500 * deno500) + (200 * deno200) + (100 * deno100) + (50 * deno50) + (20 * deno20) + (10 * deno10) + (5 * deno5) + (2 * deno2) + (deno1) + (0.50 * deno50p) + (deno1p * 0.01); + + int odeno2000 = 0; + error = request.getAttribute("odeno2000"); + if (error != null) { + odeno2000 = Integer.parseInt(error.toString()); + } + + int odeno500 = 0; + error = request.getAttribute("odeno500"); + if (error != null) { + odeno500 = Integer.parseInt(error.toString()); + } + + int odeno200 = 0; + error = request.getAttribute("odeno200"); + if (error != null) { + odeno200 = Integer.parseInt(error.toString()); + } + + int odeno100 = 0; + error = request.getAttribute("odeno100"); + if (error != null) { + odeno100 = Integer.parseInt(error.toString()); + } + + int odeno50 = 0; + error = request.getAttribute("odeno50"); + if (error != null) { + odeno50 = Integer.parseInt(error.toString()); + } + + int odeno20 = 0; + error = request.getAttribute("odeno20"); + if (error != null) { + odeno20 = Integer.parseInt(error.toString()); + } + + int odeno10 = 0; + error = request.getAttribute("odeno10"); + if (error != null) { + odeno10 = Integer.parseInt(error.toString()); + } + + int odeno5 = 0; + error = request.getAttribute("odeno5"); + if (error != null) { + odeno5 = Integer.parseInt(error.toString()); + } + + int odeno2 = 0; + error = request.getAttribute("odeno2"); + if (error != null) { + odeno2 = Integer.parseInt(error.toString()); + } + + int odeno1 = 0; + error = request.getAttribute("odeno1"); + if (error != null) { + odeno1 = Integer.parseInt(error.toString()); + } + + int odeno50p = 0; + error = request.getAttribute("odeno50p"); + if (error != null) { + odeno50p = Integer.parseInt(error.toString()); + } + + int odeno1p = 0; + error = request.getAttribute("odeno1p"); + if (error != null) { + odeno1p = Integer.parseInt(error.toString()); + } + + int Hdeno2000 = 0; + int Hdeno500 = 0; + int Hdeno200 = 0; + int Hdeno100 = 0; + int Hdeno50 = 0; + int Hdeno20 = 0; + int Hdeno10 = 0; + int Hdeno5 = 0; + int Hdeno2 = 0; + int Hdeno1 = 0; + int Hdeno50p = 0; + int Hdeno1p = 0; + + + error = request.getAttribute("Hdeno2000"); + if (error != null) { + Hdeno2000 = Integer.parseInt(error.toString()); + } + error = request.getAttribute("Hdeno500"); + if (error != null) { + Hdeno500 = Integer.parseInt(error.toString()); + } + error = request.getAttribute("Hdeno200"); + if (error != null) { + Hdeno200 = Integer.parseInt(error.toString()); + } + error = request.getAttribute("Hdeno100"); + if (error != null) { + Hdeno100 = Integer.parseInt(error.toString()); + } + error = request.getAttribute("Hdeno50"); + if (error != null) { + Hdeno50 = Integer.parseInt(error.toString()); + } + error = request.getAttribute("Hdeno20"); + if (error != null) { + Hdeno20 = Integer.parseInt(error.toString()); + } + error = request.getAttribute("Hdeno10"); + if (error != null) { + Hdeno10 = Integer.parseInt(error.toString()); + } + error = request.getAttribute("Hdeno5"); + if (error != null) { + Hdeno5 = Integer.parseInt(error.toString()); + } + error = request.getAttribute("Hdeno2"); + if (error != null) { + Hdeno2 = Integer.parseInt(error.toString()); + } + error = request.getAttribute("Hdeno1"); + if (error != null) { + Hdeno1 = Integer.parseInt(error.toString()); + } + error = request.getAttribute("Hdeno50p"); + if (error != null) { + Hdeno50p = Integer.parseInt(error.toString()); + } + error = request.getAttribute("Hdeno1p"); + if (error != null) { + Hdeno1p = Integer.parseInt(error.toString()); + } + + %> + + + + <% + String tellerName = ""; + error = request.getAttribute("tellerName"); + if (error != null) { + tellerName = error.toString(); + } + + String open_bal = ""; + error = request.getAttribute("open_bal"); + if (error != null) { + open_bal = error.toString(); + } + %> + +
+ + + <%if (!tellerName.equalsIgnoreCase("")) {%> +
+ + + + + + + + + + + + + + + +
Teller NameOpening BalanceStatus
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DenominationAvailableDrawer Opening valueCash on hold
Rs 2000
Rs 500
Rs 200
Rs 100
Rs 50
Rs 20
Rs 10
Rs 5
Rs 2
Rs 1
50 Paisa
1 Paisa
+

+ Total Cash Available: +

+ + + + +
+ <% }%> + + + + + +
+
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Deposit/CashDrawerEnquiryTeller.jsp b/IPKS_Updated/web/web/web/Deposit/CashDrawerEnquiryTeller.jsp new file mode 100644 index 0000000..db00a50 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/CashDrawerEnquiryTeller.jsp @@ -0,0 +1,407 @@ +<%-- + Document : CashDrawerEnquiry + Created on : Nov 9, 2016, 1:33:18 PM + Author : 986137 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Cash Drawer Enquiry + + + + + + + + + + + + + + + + <% + String ModuleName = new String(); + + ModuleName = (String) session.getAttribute("moduleName"); + %> + <% if (ModuleName.equalsIgnoreCase("kcc")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Deposit")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Loan")) {%> + + <%}%> +
+ +
+
+ Cash Drawer Enquiry + <% + String odeno2000 = ""; + String odeno500 = ""; + String odeno200 = ""; + String odeno100 = ""; + String odeno50 = ""; + String odeno20 = ""; + String odeno10 = ""; + String odeno5 = ""; + String odeno2 = ""; + String odeno1 = ""; + String odeno50p = ""; + String odeno1p = ""; + String open_bal = ""; + String totalAmt = ""; + String pacsid = (String) session.getAttribute("pacsId"); + String userRole = (String) session.getAttribute("userRole"); + String user = (String) session.getAttribute("user"); + + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select pacs_id,source,destination,nvl(deno_2000,0),nvl(deno_500,0),nvl(deno_100,0),nvl(deno_50,0),nvl(deno_20,0),nvl(deno_10,0),nvl(deno_5,0),nvl(deno_2,0),nvl(deno_1,0),nvl(deno_50P,0),nvl(deno_1P,0),nvl(deno_200,0) from cash_movement_log where id=(select min(id) from cash_movement_log where source like 'R%' and destination like 'D%' and transaction_date = (select system_date from system_date) and pacs_id='" + + pacsid + "' and teller_to='" + user + "' group by pacs_id,source,destination,transaction_date)"); + while (rs.next()) { + odeno2000 = rs.getString(4); + odeno500 = rs.getString(5); + odeno100 = rs.getString(6); + odeno50 = rs.getString(7); + odeno20 = rs.getString(8); + odeno10 = rs.getString(9); + odeno5 = rs.getString(10); + odeno2 = rs.getString(11); + odeno1 = rs.getString(12); + odeno50p = rs.getString(13); + odeno1p = rs.getString(14); + odeno200 = rs.getString(15); + + } + statement.close(); + } catch (Exception e) { + // System.out.println("Error occurred during processing."); + } +// finally { +// try { +// if(statement !=null) +// statement.close(); +// if (connection != null) +// connection.close(); +// +// } catch (Exception e) { +// System.out.println("Error Occurred during connection close."); +// } +// +// } + + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> +
+ <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +
+ +
+ + + + <% + + String deno2000 = ""; + String deno500 = ""; + String deno100 = ""; + String deno50 = ""; + String deno20 = ""; + String deno10 = ""; + String deno5 = ""; + String deno2 = ""; + String deno1 = ""; + String deno50p = ""; + String deno1p = ""; + String status = ""; + String deno200 = ""; + + String Hdeno2000 = "0"; + String Hdeno500 = "0"; + String Hdeno100 = "0"; + String Hdeno50 = "0"; + String Hdeno20 = "0"; + String Hdeno10 = "0"; + String Hdeno5 = "0"; + String Hdeno2 = "0"; + String Hdeno1 = "0"; + String Hdeno50p = "0"; + String Hdeno1p = "0"; + String Hdeno200 = "0"; + + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select nvl(deno_2000,0),nvl(deno_500,0),nvl(deno_100,0),nvl(deno_50,0),nvl(deno_20,0),nvl(deno_10,0),nvl(deno_5,0),nvl(deno_2,0),nvl(deno_1,0),nvl(cash_denominations.total_amt(deno_2000,deno_500,deno_100,deno_50,deno_20,deno_10,deno_5,deno_2,deno_1,DENO_50P,DENO_1P,deno_200),0),decode(status,'C','Closed','O','Open','Unknown Status'),nvl(open_balance,0),nvl(deno_50P,0),nvl(deno_1p,0),nvl(deno_200,0) from cash_drawer where pacs_id='" + pacsid + "' and teller_id='" + user + "' and entry_date = (select system_date from system_date)"); + if (!rs.isBeforeFirst()) { + open_bal = "NA"; + status = "Not Opened yet!!!"; + } else { + while (rs.next()) { + deno2000 = rs.getString(1); + deno500 = rs.getString(2); + deno100 = rs.getString(3); + deno50 = rs.getString(4); + deno20 = rs.getString(5); + deno10 = rs.getString(6); + deno5 = rs.getString(7); + deno2 = rs.getString(8); + deno1 = rs.getString(9); + totalAmt = rs.getString(10); + status = rs.getString(11); + open_bal = rs.getString(12); + deno50p = rs.getString(13); + deno1p = rs.getString(14); + deno200 = rs.getString(15); + } + statement.close(); + } + + rs = statement.executeQuery("select nvl(sum(nvl(c.deno_2000_in,0) - nvl(c.deno_2000_out,0)),0) as Hdeno_2000,nvl(sum(nvl(c.deno_500_in,0) - nvl(c.deno_500_out,0)),0) as Hdeno_500 ,nvl(sum(nvl(c.deno_100_in,0) - nvl(c.deno_100_out,0)),0) as Hdeno_100 ,nvl(sum(nvl(c.deno_50_in,0) - nvl(c.deno_50_out,0)),0) as Hdeno_50 ,nvl(sum(nvl(c.deno_20_in,0) - nvl(c.deno_20_out,0)),0) as Hdeno_20,nvl(sum(nvl(c.deno_10_in,0) - nvl(c.deno_10_out,0)),0) as Hdeno_10 ,nvl(sum(nvl(c.deno_5_in,0) - nvl(c.deno_5_out,0)),0) as Hdeno_5 ,nvl(sum(nvl(c.deno_2_in,0) - nvl(c.deno_2_out,0)),0) as Hdeno_2,nvl(sum(nvl(c.deno_1_in,0) - nvl(c.deno_1_out,0)),0) as Hdeno_1,nvl(sum(nvl(c.deno_50p_in,0) - nvl(c.deno_50p_out,0)),0) as Hdeno_50p ,nvl(sum(nvl(c.deno_1p_in,0) - nvl(c.deno_1p_out,0)),0) as Hdeno_1p,nvl(sum(nvl(c.deno_200_in,0) - nvl(c.deno_200_out,0)),0) as Hdeno_200 from cash_txn_hist c where c.status='P' and c.pacs_id='" + pacsid + "' and c.teller_id='" + + user + "'"); + while (rs.next()) { + Hdeno2000 = rs.getString(1); + Hdeno500 = rs.getString(2); + Hdeno100 = rs.getString(3); + Hdeno50 = rs.getString(4); + Hdeno20 = rs.getString(5); + Hdeno10 = rs.getString(6); + Hdeno5 = rs.getString(7); + Hdeno2 = rs.getString(8); + Hdeno1 = rs.getString(9); + Hdeno50p = rs.getString(10); + Hdeno1p = rs.getString(11); + Hdeno200 = rs.getString(12); + } + statement.close(); + connection.close(); + } catch (Exception e) { + // System.out.println("Error occurred during processing."); + + } +// finally { +// try { +// if(statement !=null) +// statement.close(); +// if (connection != null) +// connection.close(); +// +// } catch (Exception e) { +// System.out.println("Error Occurred during connection close."); +// } +// +// } + + %> + + <%if (!user.equalsIgnoreCase("")) {%> +
+ + + + + + + + + + + + + + + +
Teller IDOpening BalanceStatus
+
+ +
+ <%if (!("NA").equalsIgnoreCase(open_bal)) {%> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DenominationAvailableDrawer Opening valueCash on Hold
Rs 2000<%=deno2000%><%=odeno2000%><%=Hdeno2000%>
Rs 500<%=deno500%><%=odeno500%><%=Hdeno500%>
Rs 200<%=deno200%><%=odeno200%><%=Hdeno200%>
Rs 100<%=deno100%><%=odeno100%><%=Hdeno100%>
Rs 50<%=deno50%><%=odeno50%><%=Hdeno50%>
Rs 20<%=deno20%><%=odeno20%><%=Hdeno20%>
Rs 10<%=deno10%><%=odeno10%><%=Hdeno10%>
Rs 5<%=deno5%><%=odeno5%><%=Hdeno5%>
Rs 2<%=deno2%><%=odeno2%><%=Hdeno2%>
Rs 1<%=deno1%><%=odeno1%><%=Hdeno1%>
50 Paisa<%=deno50p%><%=odeno50p%><%=Hdeno50p%>
1 Paisa<%=deno1p%><%=odeno1p%><%=Hdeno1p%>
+

+ Total Cash Available: +

+ +                 + + +
+ + <%}%> + <% }%> +
+
+ + + +<% } catch (Exception e) { + + } +%> + diff --git a/IPKS_Updated/web/web/web/Deposit/CashReserveEnquiry.jsp b/IPKS_Updated/web/web/web/Deposit/CashReserveEnquiry.jsp new file mode 100644 index 0000000..dbafb8b --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/CashReserveEnquiry.jsp @@ -0,0 +1,211 @@ +<%-- + Document : CashReserveEnquiry + Created on : Nov 9, 2016, 1:33:08 PM + Author : 986137 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="javax.servlet.http.HttpSession"%> +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Cash Reserve Enquiry + + + + + + + + + + + + + + + <% + String ModuleName = new String(); + + ModuleName = (String) session.getAttribute("moduleName"); + %> + <% if (ModuleName.equalsIgnoreCase("KCC")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Deposit")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Loan")) {%> + + <%}%> +
+ + +
+
+ Cash Reserve + <% + int d2000, d500, d200, d100, d50, d20, d10, d5, d2, d1, d50p, d1p, totalAmt; + double d ; + d2000 = 0; + d500 = 0; + d200 = 0; + d100 = 0; + d50 = 0; + d20 = 0; + d10 = 0; + d5 = 0; + d2 = 0; + d1 = 0; + d50p = 0; + d1p = 0; + totalAmt = 0; + String pacsid = (String) session.getAttribute("pacsId"); + String open_bal, close_bal, last_upd_dt; + open_bal = ""; + close_bal = ""; + last_upd_dt = ""; + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select pacs_id,deno_2000,deno_500,deno_100,deno_50,deno_20,deno_10,deno_5,deno_2,deno_1,last_update_date,opening_bal,nvl(closing_bal,'Not Yet Closed'),DENO_50P,DENO_1P,deno_200 " + + "from cash_reserve where pacs_id='" + pacsid + "'"); + while (rs.next()) { + d2000 = Integer.parseInt(rs.getString(2)); + d500 = Integer.parseInt(rs.getString(3)); + d100 = Integer.parseInt(rs.getString(4)); + d50 = Integer.parseInt(rs.getString(5)); + d20 = Integer.parseInt(rs.getString(6)); + d10 = Integer.parseInt(rs.getString(7)); + d5 = Integer.parseInt(rs.getString(8)); + d2 = Integer.parseInt(rs.getString(9)); + d1 = Integer.parseInt(rs.getString(10)); + last_upd_dt = rs.getString(11); + open_bal = rs.getString(12); + close_bal = rs.getString(13); + d50p = Integer.parseInt(rs.getString(14)); + d1p = Integer.parseInt(rs.getString(15)); + d200 = Integer.parseInt(rs.getString(16)); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + d = (2000 * d2000) + (500 * d500) + (200 * d200) + (100 * d100) + (50 * d50) + (20 * d20) + (10 * d10) + (5 * d5) + (2 * d2) + d1 + (0.50 * d50p)+ (0.01 * d1p); + %> + +
+
+ + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DenominationAvailable
Rs 2000
Rs 500
Rs 200
Rs 100
Rs 50
Rs 20
Rs 10
Rs 5
Rs 2
Rs 1
50 Paisa
1 Paisa
+

+ Reserve Cash Available: +

+
+
+ +
+ + + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Deposit/ChequePosting.jsp b/IPKS_Updated/web/web/web/Deposit/ChequePosting.jsp new file mode 100644 index 0000000..bee604b --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/ChequePosting.jsp @@ -0,0 +1,465 @@ +<%-- + Document : ChequePosting + Created on : Jul 7, 2018, 2:34:34 PM + Author : 1004242 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.SQLException"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="DataEntryBean.ChequeDetailsBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + + Cheque Posting + + + + + + + + + + + + + + + + + <% + int count = 1; + String error_msg1 = ""; + String error_msg2 = ""; + Object tabSelect = null; + Object accNoServer = request.getAttribute("accNo"); + String accNo =""; + if(accNoServer !=null)accNo=(String)accNoServer; + + ArrayList chqDetBeanList=null; + Object allChq = request.getAttribute("allcheque"); + Object error1 = request.getAttribute("message1"); + Object error2 = request.getAttribute("message2"); + + + if(request.getAttribute("toggleTab") != null){ + tabSelect = request.getAttribute("toggleTab"); + }else + { + // tabSelect ="CHEQUE POSTING"; + } + + + + ChequeDetailsBean chqBean = null; + if (error1 != null) { + error_msg1 = error1.toString(); + + } + else if (error2 !=null){ + error_msg2 = error2.toString(); + } + else { + + chqDetBeanList = null;//new ArrayList(); + + if (allChq != null) { + chqDetBeanList = (ArrayList) request.getAttribute("allcheque"); + + } + } + + String userRole = (String) session.getAttribute("userRole"); + %> + + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + + + + + +
+ <%if ((userRole.equalsIgnoreCase( + "201606000004041")) ) {%> + + <%}else{%> + + <%}%> +
+ +
+
+
+ <%----%> +
+ <%if (!error_msg1.equalsIgnoreCase("")) {%> +
<%= error_msg1%>
+ <% }%> +
+
+ Account Number*: + + +

+ <%-- Customer Name.: + --%> +
+

+
+ + + + + + + + + + + + + + + + + + +
Cheque Number*:      Cheque Date*:  
Cheque Amount*:      Cheque Issuer Bank*:
+
+

+ + + +
+ + +
+ + + +
+
+
+ +
+
+ <%----%> +
+ <%if (!error_msg2.equalsIgnoreCase("")) {%> +
<%= error_msg2%>
+ <% }%> +
+ +
+ Account Number: + + +

+
+ + + + +
+
+
+ + + + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Deposit/ChequePosting_old.jsp b/IPKS_Updated/web/web/web/Deposit/ChequePosting_old.jsp new file mode 100644 index 0000000..0a99582 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/ChequePosting_old.jsp @@ -0,0 +1,158 @@ +<%-- + Document : ChequePosting + Created on : Jul 7, 2018, 2:34:34 PM + Author : 1004242 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + + Cheque Posting + + + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + + + + +
+
+ CHEQUE POSTING +
+ <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ Account No: + + +

+ <%-- Customer Name.: + --%> +
+

+
+ + + + + + + + + + + + + + + + + + +
Cheque No.      Cheque Date:
Cheque Amount.      Cheque Issuer Bank.
+
+

+ + + +
+ + +
+ + + +
+
+ + diff --git a/IPKS_Updated/web/web/web/Deposit/CustomerNetWorth_Report.jsp b/IPKS_Updated/web/web/web/Deposit/CustomerNetWorth_Report.jsp new file mode 100644 index 0000000..e299594 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/CustomerNetWorth_Report.jsp @@ -0,0 +1,243 @@ +<%-- + Document : CustomerNetWorth_Report + Created on : Aug 13, 2019, 5:28:24 PM + Author : 1242938 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="java.util.Date"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.ArrayList" %> +<%@page import="java.lang.String" %> +<% try { +%> + + + + + + + + + + + + + + + + + Customer Net Worth Report + + + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankNA(String s) { + return (s == null) ? "NA" : s; + } + %> + <% + String pacsId = (String) session.getAttribute("pacsId"); + String userRole = (String) session.getAttribute("userRole"); + Object oEnquiryBeanSearchObj = request.getAttribute("oEnquiryBeanSearchObj"); + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + if (oEnquiryBeanSearchObj != null) { + oEnquiryBean = (EnquiryBean) request.getAttribute("oEnquiryBeanSearchObj"); + session.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearchObj); + } + %> + <%String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + %> + +
+
+ Customer Net Worth Report + +
+
+ + + <%if (request.getAttribute("error") != null) {%> + + <%}%> + + + + + + + + + + + + + + + +
<%=request.getAttribute("error").toString()%>
Customer Number *: +
Sub-PACS Name:




+
+
+ +
+ + + +
+ + + + + + + +
+
+
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Deposit/DepositAccountCreation.jsp b/IPKS_Updated/web/web/web/Deposit/DepositAccountCreation.jsp new file mode 100644 index 0000000..f214e60 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/DepositAccountCreation.jsp @@ -0,0 +1,745 @@ +<%-- + Document : accountCreation + Created on : Mar 8, 2016, 1:20:58 PM + Author : Tcs Helpdesk10 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.AccountCreationBean"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + Deposit Account Creation + + + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + +
+ Deposit Account Creation + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + --%> + <%--Added By Bitan for Multiple CIF Change--%> + <%----%> + <%-- + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Account Information:

Product Code*: +
Interest Category*:
Segment Code*: + +
Account Holder Type: +
Primary CIF Number*: +
OD Limit:

Additional Information:

Activity Code*: + +
Customer Type*: + +
Interest Repay Method:
Interest Transfer Account:
+


+
+ + +
+
+
+ +
+ + + + +
+ +
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Deposit/DepositAccountCreationReadonly.jsp b/IPKS_Updated/web/web/web/Deposit/DepositAccountCreationReadonly.jsp new file mode 100644 index 0000000..eab0946 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/DepositAccountCreationReadonly.jsp @@ -0,0 +1,345 @@ +<%-- + Document : accountCreation + Created on : Mar 8, 2016, 1:20:58 PM + Author : Tcs Helpdesk10 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.DepositAccountCreationBean"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Deposit Account Creation + + + + + + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + + <% + Object DepositAccountCreationBeanObj = request.getAttribute("oDepositAccountCreationBean"); + DepositAccountCreationBean oDepositAccountCreationBean = new DepositAccountCreationBean(); + + if (DepositAccountCreationBeanObj != null) { + oDepositAccountCreationBean = (DepositAccountCreationBean) request.getAttribute("oDepositAccountCreationBean"); + + } + %> + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankNA(String s) { + return (s == null) ? "NA" : s; + } + %> + +
+ DEPOSIT ACCOUNT AUTHORIZATION + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + + + + --%> + <%--Start Changes By Bitan For Multiple CIF Changes--%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<%--END Changes By Bitan For Multiple CIF Changes--%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <% if (blankNull(oDepositAccountCreationBean.getProductName()).substring(0, 1).equalsIgnoreCase("3")){%> + + + <%} else {%> + + <%}%> + + + + + + + + +

Account Information :

Product Code :
Intt Category :
Segment Code : + +
Primary CIF Number:
Primary Customer Name:
Secondary CIF Number :
Secondary Customer Name:
Secondary CIF Number#1: +
Secondary CIF Number#2: +
Secondary CIF Number#3: +
Secondary CIF Number#4: +
Secondary CIF Number#5: +
Secondary CIF Number#6: +
Secondary CIF Number#7: +
Secondary CIF Number#8: +
Secondary CIF Number#9: +
Secondary CIF Number#10: +
Nominee: + +
Account Open Date :
OD Limit:

Additional Information :

Activity Code : + +
Customer Type : + +
Intt Repay Method
Intt Transfer Account:
Term Value:
Installment Amount:
Term Length (In Months):
Term Length:
Membership Number :
Authorizer's Comment: + +
+
+ + +
+
+
+ +
+ <%}%> + + + +
+
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Deposit/DepositAccountEnquiry.jsp b/IPKS_Updated/web/web/web/Deposit/DepositAccountEnquiry.jsp new file mode 100644 index 0000000..09c0c82 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/DepositAccountEnquiry.jsp @@ -0,0 +1,722 @@ +<%-- + Document : DepositAccountEnquiry + Created on : Sep 13, 2016, 2:23:35 PM + Author : +--%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="java.util.Date"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<% try { +%> + + + + + + + + Deposit Account Enquiry + + + + + + + + + + + + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankNA(String s) { + return (s == null) ? "NA" : s; + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + Object alEnquiryBeanObj = request.getAttribute("alEnquiryBean"); + ArrayList alEnquiryBean = new ArrayList(); + if (alEnquiryBeanObj != null) { + alEnquiryBean = (ArrayList) request.getAttribute("alEnquiryBean"); + } + %> + <% + String pacsId = (String) session.getAttribute("pacsId"); + Object oEnquiryBeanSearchObj = request.getAttribute("oEnquiryBeanSearchObj"); + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + if (oEnquiryBeanSearchObj != null) { + oEnquiryBean = (EnquiryBean) request.getAttribute("oEnquiryBeanSearchObj"); + session.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearchObj); + } + %> + + <% + int flag2 = 1; + int curPage = 0; + try { + curPage = Integer.parseInt(request.getAttribute("currentPage").toString()); + } catch (Exception e) { + curPage = 1; + } + if (alEnquiryBean.size() > 0) { + flag2 = 2; + } + int totalRecordCount = 0; + int recordCount = 0; + int noOfRecords =0; + + try { + totalRecordCount = Integer.parseInt(request.getAttribute("totalRecordCount").toString()); + recordCount = Integer.parseInt(request.getAttribute("recordCount").toString()); + } catch (Exception e) { + totalRecordCount = 0; + recordCount = 0; + } + totalRecordCount = totalRecordCount + alEnquiryBean.size(); + + %> + <%String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + %> + +
+ Account Enquiry Details +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ +
+ <%--
--%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + + +
+ + +
Account Number:      Product Name*: +

From Date:       To Date:  

From Amount:      To Amount:

Search By CIF: Sub-PACS Name:

Old CIF Number:     Old A/C or Link CBS A/C:
Mode Of Account : + --%> +

Customer Name:
+

+
+ + +
+


+ + + + "> + + + + + + + + + +
+
+ <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+
+ + + + + + + + + <%-- + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <% + oEnquiryBean = null; + + for (int i = 0; i < alEnquiryBean.size(); i++) { + oEnquiryBean = alEnquiryBean.get(i); + %> + + + + + + + + + <%-- + --%> + + <%----%> + + <%if( blankNA(oEnquiryBean.getJt_cifNumber1()).equals("NA") || oEnquiryBean.getJt_cifNumber1()==null){%> + + <%} + else {%> + + <% } %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%}%> + + +
Pacs IDAccount NumberCBS Account NumberPrimary Customer NumberPrimary Customer NameSecondary Customer NumberSecondary Customer NameSecondary CIF DetailsNominee NameProduct NameOpening DateAccount StatusAvailable BalanceInterest RateInterest AvailableInterest From DateInterest To DateTerm ValueMaturity ValueMaturity DateTerm From DateTerm To DateInterest ProjectedCapitalized InterestInstallment AmountNo.of Installments PaidNext Installment Due DateRD Penal CountHold ValueTerm LengthInt Repay MethodOld Account NumberMode Of AccountAccount Statement of The Day
<%=blankNull(oEnquiryBean.getPacs_id())%><%=blankNull(oEnquiryBean.getLinkAccNo())%><%=blankNull(oEnquiryBean.getCustomerNo())%><%=blankNull(oEnquiryBean.getCustomerName())%><%=blankNA(oEnquiryBean.getCif_no2())%><%=blankNA(oEnquiryBean.getSec_cust_name())%>NA + <%=blankNA(oEnquiryBean.getNomineeName())%><%=blankNull(oEnquiryBean.getProductNameDisplay())%><%=blankNull(oEnquiryBean.getAccountOpenDate())%><%=blankNull(oEnquiryBean.getCurr_Status())%><%=blankNull(oEnquiryBean.getAvailBalance())%><%=blankNull(oEnquiryBean.getInttrate())%><%=blankNull(oEnquiryBean.getInttAvail())%><%=blankNull(oEnquiryBean.getInttfroDt())%><%=blankNull(oEnquiryBean.getInttToDt())%><%=blankNA(oEnquiryBean.getTermValue())%><%=blankNA(oEnquiryBean.getMaturityValue())%><%=blankNA(oEnquiryBean.getMaturityDt())%><%=blankNA(oEnquiryBean.getTerm_from_date())%><%=blankNA(oEnquiryBean.getTerm_to_date())%><%=blankNA(oEnquiryBean.getInttProjected())%><%=blankNA(oEnquiryBean.getIntt_capptalized())%><%=blankNA(oEnquiryBean.getInstllAmt())%><%=blankNA(oEnquiryBean.getInstallPaidNo())%><%=blankNA(oEnquiryBean.getInstllDueDate())%><%=blankNA(oEnquiryBean.getPenalCnt())%><%=blankNull(oEnquiryBean.getHoldValue())%><%=blankNull(oEnquiryBean.getTermLen())%><%=blankNull(oEnquiryBean.getIntRepayMethod())%><%=blankNull(oEnquiryBean.getOldAccNo())%><%=blankNull(oEnquiryBean.getModOfAcc())%>
+
+

+ + <%--For displaying Previous link except for the 1st page --%> + + + <% if (curPage > 1 && flag2 == 2) {%> +
+ <% }%> + <% if (flag2 == 2) {%> + + <% if (curPage == 1) {%> + + <% } + }%> + +


+ + + +
+
+ <%}%> +
+ + + +<% } catch (Exception e) { + + } +%> + + + + + diff --git a/IPKS_Updated/web/web/web/Deposit/DepositKYCCreation.jsp b/IPKS_Updated/web/web/web/Deposit/DepositKYCCreation.jsp new file mode 100644 index 0000000..a1c86e6 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/DepositKYCCreation.jsp @@ -0,0 +1,1220 @@ +<%-- + Document : kycCreation + Created on : Mar 18, 2016, 12:19:23 PM + Author : TCS +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.SQLException"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> + + +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Deposit KYC Creation + + + + + + + + + + + + + + + + + + + + <% + String ModuleName = new String(); + + ModuleName = (String) session.getAttribute("moduleName"); + %> + + <%if (ModuleName.equalsIgnoreCase("Deposit")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Loan")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("KCC")) {%> + + <%}%> +
+ + <% + int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + String sysDt = new String(); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select to_char(SYSTEM_DATE,'DD/MM/YYYY') from system_date"); + while (rs.next()) { + sysDt = rs.getString(1); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + %> + + +
+ Customer (KYC) Details Creation +
+ +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Select Photograph: + +
+
Select Signature: + +
+
Customer Type: + +
Title:* + +
First Name:*Middle Name: Last Name:*
Guardian Name/ Husband Name: Mother's Name*:
Address Line1:*Address Line2:Address Line3:*
Block: PIN Code:* Area/Ward:
District:*City/Town: State:
Date Of Birth:* +   + <%----%> + Membership No: Farmer Type:*
Gender:*Religion:* + Caste:* +
Mobile Number: Email Id:
Alive/Dead:
Date of Death:  
+

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ID TypeScore ID Number ID Issued AtID Issue Date ID Scan Image
+ +
+
+
+
+ + + + + + + + + + + +
Total ID Score
+


+
+ + + + + + + + +
+
+ +
+ +
+ + + + + + + + + +
+ +
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Deposit/DepositKYCDocumentUpload.jsp b/IPKS_Updated/web/web/web/Deposit/DepositKYCDocumentUpload.jsp new file mode 100644 index 0000000..c1bb7bc --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/DepositKYCDocumentUpload.jsp @@ -0,0 +1,286 @@ +<%-- + Document : DepositKYCDocumentUpload + Created on : Sep 29, 2016, 12:05:56 PM + Author : 986137 +--%> + +<%@page import="DataEntryBean.DepositKYCCreationHdrBean"%> +<%@page import="DataEntryBean.DepositKYCCreationDetailBean"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + + + + + + KYC Document Upload + + + + + + + + + + + + + + + + +
+ + <%int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + <% + Object oDepositKYCCreationHdrBeanObj = request.getAttribute("oDepositKYCCreationBeanObj"); + DepositKYCCreationHdrBean oDepositKYCCreationHdrBean = new DepositKYCCreationHdrBean(); + if (oDepositKYCCreationHdrBeanObj != null) { + oDepositKYCCreationHdrBean = (DepositKYCCreationHdrBean) request.getAttribute("oDepositKYCCreationBeanObj"); + } + %> + + <% + Object alDepositKYCCreationDetailBeanObj = request.getAttribute("alDepositKYCCreationDetailBean"); + ArrayList alDepositKYCCreationDetailBean = new ArrayList(); + DepositKYCCreationDetailBean oDepositKYCCreationDetailBean = new DepositKYCCreationDetailBean(); + if (alDepositKYCCreationDetailBeanObj != null) { + alDepositKYCCreationDetailBean = (ArrayList) request.getAttribute("alDepositKYCCreationDetailBean"); + + } + %> + + + + + +
+ KYC DOCUMENT UPLOAD +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ +
+ + + + + +
Enter CIF Number

Enter CIF Name

+             + +
+ + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + + if (displayFlag.equalsIgnoreCase("Y")) { + + %> +
+ +
+ + + + + + + + + + + + + <% + oDepositKYCCreationDetailBean = new DepositKYCCreationDetailBean(); + count = 0; + + for (int i = 0; i < alDepositKYCCreationDetailBean.size(); i++) { + oDepositKYCCreationDetailBean = alDepositKYCCreationDetailBean.get(i); + + count++; + + %> + + + + + + + + + + + + <%}%> + +
ID TypeID NumberUpload Document
<%=blankNull(oDepositKYCCreationDetailBean.getIdType())%><%=blankNull(oDepositKYCCreationDetailBean.getIdNumber())%>
+ + + +
+ + +
+
+
+ +
+ + + + + + +
+
+ + <% }%> + + + + +
+
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Deposit/DepositKYCInquiry.jsp b/IPKS_Updated/web/web/web/Deposit/DepositKYCInquiry.jsp new file mode 100644 index 0000000..02479cc --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/DepositKYCInquiry.jsp @@ -0,0 +1,1460 @@ +<%-- + Document : DepositKYCInquiry + Created on : Mar 15, 2016, 3:46:48 PM + Author : Kaushik +--%> + +<%@page import="DataEntryBean.DepositKYCCreationHdrBean"%> +<%@page import="DataEntryBean.DepositKYCCreationDetailBean"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Customer Enquiry + + + + + + + + + + + + + + + + + + + + <% + String ModuleName = new String(); + + ModuleName = (String) session.getAttribute("moduleName"); + %> + + <%if (ModuleName.equalsIgnoreCase("Deposit")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Loan")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("SpecialBothKcc")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("SpecialBothDep")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("SpecialBoth")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("KCC")) {%> + + <%}%> +
+ + <%int count = 1; + int populatedRows = 0; + int idScore = 0; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + <% + Object oDepositKYCCreationHdrBeanObj = request.getAttribute("oDepositKYCCreationBeanObj"); + DepositKYCCreationHdrBean oDepositKYCCreationHdrBean = new DepositKYCCreationHdrBean(); + if (oDepositKYCCreationHdrBeanObj != null) { + oDepositKYCCreationHdrBean = (DepositKYCCreationHdrBean) request.getAttribute("oDepositKYCCreationBeanObj"); + } + %> + + <% + Object alDepositKYCCreationDetailBeanObj = request.getAttribute("alDepositKYCCreationDetailBean"); + ArrayList alDepositKYCCreationDetailBean = new ArrayList(); + DepositKYCCreationDetailBean oDepositKYCCreationDetailBean = new DepositKYCCreationDetailBean(); + if (alDepositKYCCreationDetailBeanObj != null) { + alDepositKYCCreationDetailBean = (ArrayList) request.getAttribute("alDepositKYCCreationDetailBean"); + + } + %> + +
+ Customer (KYC) Details +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+
+ + + + + + + + + + + + +
Search Customer By:

Enter CIF Number:

Enter CIF Name:

Enter KYC ID Number:

+             + + +
+
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + if (displayFlag.equalsIgnoreCase("Y")) { + %> +
+

CIF Details :

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Select Photograph: + +
+
Select Signature: + +
+
CIF Number:
Customer Type:
Tittle:*
First Name:*
Middle Name:
Last Name:*
Guardian Name/ Husband Name: Mother's Name:*
+ Address Line1:* + + + + Address Line2: + + + + Address Line3:* + + +
Block: PIN Code:* Area/Ward:
District*:City/Town: State:
Date Of Birth*:  Membership Number: Farmer Type*:
Gender*:Religion*: + Caste*: +
Mobile Number: Email Id:
Mother Bank CIF:
Alive/Dead:
Date of Death:  
+ +

Linked ID Details :

+
+ + + + + + + + + + + + + + + + <% + oDepositKYCCreationDetailBean = new DepositKYCCreationDetailBean(); + count = 0; + + for (int i = 0; i < alDepositKYCCreationDetailBean.size(); i++) { + oDepositKYCCreationDetailBean = alDepositKYCCreationDetailBean.get(i); + + count++; + populatedRows++; + + try { + if (oDepositKYCCreationDetailBean.getIDScore() != null + || !(oDepositKYCCreationDetailBean.getIDScore().equalsIgnoreCase(""))) { + idScore = idScore + Integer.parseInt(oDepositKYCCreationDetailBean.getIDScore()); + } + } catch (NumberFormatException e) { + idScore = idScore + 0; + } + + %> + + + + + + + + + + + + + + + + + + + + + <%}%> + +
ID TypeScore ID Number ID Issued AtID Issue DateScanned PhotoID Scan Image
<%if (oDepositKYCCreationDetailBean.getScanImg() == null || oDepositKYCCreationDetailBean.getScanImg().isEmpty()) {%>No Image found<%} else {%><%}%> + +
+
+
+
+ + + + + + + + + + + +
Total ID Score
+ +
+ + + + +
+ + + + + + + +
+ src="${pageContext.request.contextPath}/img/faceDefault - Copy.jpg" <%} else {%> + src="${pageContext.request.contextPath}/UploadedFiles/<%=oDepositKYCCreationHdrBean.getFile()%>" <%}%>/> style="display: block" <%} else {%> style="display: none" <%}%>>No Siganture Found + + style="display: none" <%} else {%> style="display: block; vertical-align: bottom" <%}%> /> +
+
+ + + +
+
+ +
+ + + + + + + +
+
+ + <% }%> + + + + + + + + +
+ +
+ + +<% } catch (Exception e) { + +%> diff --git a/IPKS_Updated/web/web/web/Deposit/DepositMiscellaneousEnquiry.jsp b/IPKS_Updated/web/web/web/Deposit/DepositMiscellaneousEnquiry.jsp new file mode 100644 index 0000000..a4a5d03 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/DepositMiscellaneousEnquiry.jsp @@ -0,0 +1,477 @@ +<%-- + Document : DepositAccountEnquiry + Created on : Sep 13, 2016, 2:23:35 PM + Author : +--%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="java.util.Date"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + + Deposit Miscellaneous Enquiry + + + + + + + + + + + + + + + + + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankNA(String s) { + return (s == null) ? "NA" : s; + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + Object alEnquiryBeanObj = request.getAttribute("alEnquiryBean"); + ArrayList alEnquiryBean = new ArrayList(); + if (alEnquiryBeanObj != null) { + alEnquiryBean = (ArrayList) request.getAttribute("alEnquiryBean"); + } + %> + <% + Object oEnquiryBeanSearchObj = request.getAttribute("oEnquiryBeanSearchObj"); + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + if (oEnquiryBeanSearchObj != null) { + oEnquiryBean = (EnquiryBean) request.getAttribute("oEnquiryBeanSearchObj"); + session.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearchObj); + } + %> + + + <% + int flag2 = 1; + int curPage = 0; + try { + curPage = Integer.parseInt(request.getAttribute("currentPage").toString()); + } catch (Exception e) { + curPage = 1; + } + if (alEnquiryBean.size() > 0) { + flag2 = 2; + } + int totalRecordCount = 0; + int recordCount = 0; + + try { + totalRecordCount = Integer.parseInt(request.getAttribute("totalRecordCount").toString()); + recordCount = Integer.parseInt(request.getAttribute("recordCount").toString()); + } catch (Exception e) { + totalRecordCount = 0; + recordCount = 0; + } + totalRecordCount = totalRecordCount + alEnquiryBean.size(); + + %> + <%String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + String pacsId = (String) session.getAttribute("pacsId"); + %> + + +
+ Deposit Miscellaneous Enquiry +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ + +
+ <%--
--%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Account Number*:      Enquiry Type: +

From Date:       To Date:  

Sub-PACS Name:


+

+
+ + +
+


+ + + + "> + + + + "> + + +
+ + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+
+ + + + + + + + + + + + + + + + + + + <% + oEnquiryBean = null; + + for (int i = 0; i < alEnquiryBean.size(); i++) { + oEnquiryBean = alEnquiryBean.get(i); + %> + + + + + + + + + + + + + + + + + + + + <%}%> + + +
Account NumberCustomer NumberCustomer NameAction NameOperation ValueAction DateReason ProvidedTeller IDTeller NameLoan A/C NumberActive Status
<%=blankNull(oEnquiryBean.getAccountNo())%><%=blankNull(oEnquiryBean.getCustomerNo())%><%=blankNull(oEnquiryBean.getCustomerName())%><%=blankNull(oEnquiryBean.getAction())%><%=blankNull(oEnquiryBean.getOp_Amt())%><%=blankNull(oEnquiryBean.getAction_Dt())%><%=blankNull(oEnquiryBean.getAction_Cmnt())%><%=blankNull(oEnquiryBean.getAction_teller())%><%=blankNull(oEnquiryBean.getTeller_name())%><%=blankNA(oEnquiryBean.getLoanAcc())%><%=blankNull(oEnquiryBean.getAction_STAT())%>
+
+

+ + <%--For displaying Previous link except for the 1st page --%> + + + <% if (curPage > 1 && flag2 == 2) {%> +
+ <% }%> + <% if (flag2 == 2) {%> + + <% if (curPage == 1) {%> + + <% } + }%> + +


+ + + +
+
+ <%}%> +
+ + +<% } catch (Exception e) { + + } +%> + + + + + diff --git a/IPKS_Updated/web/web/web/Deposit/DepositMiscellaneousOperation.jsp b/IPKS_Updated/web/web/web/Deposit/DepositMiscellaneousOperation.jsp new file mode 100644 index 0000000..7bbf289 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/DepositMiscellaneousOperation.jsp @@ -0,0 +1,900 @@ +<%-- + Document : DepositMiscellaneousOperation + Created on : Sep 27, 2016, 1:18:55 PM + Author : 986137 + Updated On : Apr 30,2024 + Author : 1121947 +--%> + +<%@page import="DataEntryBean.RepayLoanBean"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="DataEntryBean.DepositMiscellaneousBean"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + Miscellaneous Operation + + + + + + + + + + + + + + + + + + + + + + +
+ + <% + + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = "N"; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + System.out.println(displayFlag); + } + %> + + <% + Object oDepositMiscellaneousBeanObj = request.getAttribute("oDepositMiscellaneousBeanObj"); + DepositMiscellaneousBean oDepositMiscellaneousBean = new DepositMiscellaneousBean(); + if (oDepositMiscellaneousBeanObj != null) { + oDepositMiscellaneousBean = (DepositMiscellaneousBean) request.getAttribute("oDepositMiscellaneousBeanObj"); + } + %> + + <% + Object oRepayLoanBeanObj = request.getAttribute("oRepayLoanBeanObj"); + RepayLoanBean oRepayLoanBean = new RepayLoanBean(); + if(oRepayLoanBeanObj != null){ + oRepayLoanBean = (RepayLoanBean) request.getAttribute("oRepayLoanBeanObj"); + } + %> + +
+ Miscellaneous Operation +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ +
+ + + + + + + + + + + + + + + + + +
Select Transaction*:
+
+ + +
+
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + + if (displayFlag.equalsIgnoreCase("FY")) { + + %> +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Loan Account No: Customer Name:
Sanctioned Amount: Sanctioned Date:
Outstanding Principle: Interest Outstanding:
Last Transaction Date: Product Code:
Outstanding Balance: EMI:

+
+ +
+ + + + + + + + +
Select Operation*: +
+ + + + + + + + + + + + + + + +
+
+
+ + <%}else if (displayFlag.equalsIgnoreCase("Y")) { + %> +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Deposit Account Number:Account Balance:
1st CIF Number: 1st A/C Holder:
2nd CIF Number 2nd A/C Holder:
Account Status:Nominee CIF:

+
+ + + + + + + + + + + + + + + + + + <%----%> + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Select Operation*: + +
+
+ +
+
+
+
+
+ <%}%> + + + + + + +
+ + + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Deposit/DepositRateSlab.jsp b/IPKS_Updated/web/web/web/Deposit/DepositRateSlab.jsp new file mode 100644 index 0000000..86262cb --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/DepositRateSlab.jsp @@ -0,0 +1,847 @@ + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.DepositRateSlabBean"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Term Deposit Rate Slab + + + + + + + + + + + + + + + + + <% int count = 1; + int count3 = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + + <% + Object oDepositRateSlabBeanObj = request.getAttribute("oDepositRateSlabBean"); + DepositRateSlabBean oDepositRateSlabBeanHeader = new DepositRateSlabBean(); + if (oDepositRateSlabBeanObj != null) { + oDepositRateSlabBeanHeader = (DepositRateSlabBean) request.getAttribute("oDepositRateSlabBean"); + } + + Object alDepositRateSlabBeanObj = request.getAttribute("alDepositRateSlabBean"); + ArrayList alDepositRateSlabBean = new ArrayList(); + DepositRateSlabBean oDepositRateSlabBean = new DepositRateSlabBean(); + if (alDepositRateSlabBeanObj != null) { + alDepositRateSlabBean = (ArrayList) request.getAttribute("alDepositRateSlabBean"); + + } + %> + + +
+ +
+ Term Deposit Rate Slab + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ +

+ +

+ + + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+ + + + <%-- + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + <%----%> +

Select Product & Effective Date

Product Code :
Interest Category :

Amend Effective Date & Interest Rates

Effective From Date :
Effective To Date :

+ + + +

Interest Rate Details

+ +
+ + <%if (blankNull(oDepositRateSlabBeanHeader.getpCodeSearch()).substring(0, 1).equalsIgnoreCase("3")) {%> + + + + + + + + + + + <%} else {%> + + + + + + + + + + + <%}%> + + + <% + oDepositRateSlabBean = new DepositRateSlabBean(); + count3 = 0; + + for (int i = 0; i < alDepositRateSlabBean.size(); i++) { + oDepositRateSlabBean = alDepositRateSlabBean.get(i); + + count3++; + + %> + + + + + + + + + + + + + + <%}%> + +
Interest Rate(%)Term From (Months)Term To (Months)From AmountTo Amount
Interest Rate(%)Term From (Days)Term To (Days)From AmountTo Amount
+ +
+
+
+ + + + +
+ +
+
+ + +
+
+
+ + +
+ <%}%> + + + + + + + + + + + + + + + +
+ +
+ + +<% } catch (Exception e) { + + } +%> + diff --git a/IPKS_Updated/web/web/web/Deposit/DepositTransactionEnquiry.jsp b/IPKS_Updated/web/web/web/Deposit/DepositTransactionEnquiry.jsp new file mode 100644 index 0000000..1ed5777 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/DepositTransactionEnquiry.jsp @@ -0,0 +1,472 @@ +<%-- + Document : DepositTransactionEnquiry + Created on : Sep 13, 2016, 2:23:35 PM + Author : +--%> +<%@page import="DataEntryBean.TransactionEnquiryBean"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + + + + + + + + Deposit Transaction Enquiry + + + + + + + + + + + + + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <% + String pacsId = (String) session.getAttribute("pacsId"); + Object alTransactionEnquiryBeanObj = request.getAttribute("alTransactionEnquiryBean"); + ArrayList alTransactionEnquiryBean = new ArrayList(); + if (alTransactionEnquiryBeanObj != null) { + alTransactionEnquiryBean = (ArrayList) request.getAttribute("alTransactionEnquiryBean"); + + } + %> + <% + Object oTransactionEnquiryBeanobj = request.getAttribute("oTransactionEnquiryBeanSearchObj"); + TransactionEnquiryBean oTransactionEnquiryBean = new TransactionEnquiryBean(); + if (oTransactionEnquiryBeanobj != null) { + oTransactionEnquiryBean = (TransactionEnquiryBean) request.getAttribute("oTransactionEnquiryBeanSearchObj"); + session.setAttribute("oTransactionEnquiryBeanSearchObj", oTransactionEnquiryBeanobj); + + } + %> + + + <% + int flag2 = 1; + int curPage = 0; + try { + curPage = Integer.parseInt(request.getAttribute("currentPage").toString()); + } catch (Exception e) { + curPage = 1; + } + if (alTransactionEnquiryBean.size() > 0) { + flag2 = 2; + } + int totalRecordCount = 0; + int recordCount = 0; + + try { + totalRecordCount = Integer.parseInt(request.getAttribute("totalRecordCount").toString()); + recordCount = Integer.parseInt(request.getAttribute("recordCount").toString()); + } catch (Exception e) { + totalRecordCount = 0; + recordCount = 0; + } + totalRecordCount = totalRecordCount + alTransactionEnquiryBean.size(); + + %> + <%String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + %> + + +
+ Transaction Enquiry Details +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ + +
+ <%--
--%> + + + + + + <%-- + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Account Number*:     Product Name: +

From Date*:      To Date*: 

From Amount:     To Amount:

Transaction Reference Number:     Sub-PACS Name:

+ +
+
+
+ + +
+


+ + + + + "> + + + + "> + +
+ + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+
+ + + + + + + + + + + + + + + + + + <% + oTransactionEnquiryBean = null; + for (int i = 0; i < alTransactionEnquiryBean.size(); i++) { + oTransactionEnquiryBean = alTransactionEnquiryBean.get(i); + %> + + + + + + + + + + + + + + + + + + + <%}%> + +
Account No.Reference No.Product NameInterest DescriptionTransaction DateTransaction TypeTransaction AmountEnd BalanceNarrationMaker IDAutheriser ID
<%=blankNull(oTransactionEnquiryBean.getAccountNo())%><%=blankNull(oTransactionEnquiryBean.getCbs_Ref_No())%><%=blankNull(oTransactionEnquiryBean.getProductNameDisplay())%><%=blankNull(oTransactionEnquiryBean.getInttCatDesc())%><%=blankNull(oTransactionEnquiryBean.getTransactionDate())%><%=blankNull(oTransactionEnquiryBean.getTransactionType())%><%=blankNull(oTransactionEnquiryBean.getTransactionAmount())%><%=blankNull(oTransactionEnquiryBean.getAvailableBalance())%><%=blankNull(oTransactionEnquiryBean.getNarration())%><%=blankNull(oTransactionEnquiryBean.getMakerID())%><%=blankNull(oTransactionEnquiryBean.getAuthID())%>
+


+ + <%--For displaying Previous link except for the 1st page --%> + + + <% if (curPage > 1 && flag2 == 2) {%> +
+ <% }%> + <% if (flag2 == 2) {%> + + <% if (curPage == 1) {%> + + <% } + }%> + +


+ + +
+
+ <%}%> +
+ + +<% } catch (Exception e) { + + } +%> + diff --git a/IPKS_Updated/web/web/web/Deposit/DepositTransactionOperation.jsp b/IPKS_Updated/web/web/web/Deposit/DepositTransactionOperation.jsp new file mode 100644 index 0000000..e5b6607 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/DepositTransactionOperation.jsp @@ -0,0 +1,1248 @@ +<%-- + Document : ADHOC transaction + Created on : Aug 3, 2015, 2:23:35 PM + Author : Administrator +--%> +<%@page import="DataEntryBean.transactionOperationBean"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.lang.*"%> +<%@page import="java.util.*"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Cash Transaction + + + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + <% String odeno2000 = ""; + String odeno500 = ""; + String odeno200 = ""; + String odeno100 = ""; + String odeno50 = ""; + String odeno20 = ""; + String odeno10 = ""; + String odeno5 = ""; + String odeno2 = ""; + String odeno1 = ""; + String status = "C"; + String odeno50P = ""; + String odeno1P = ""; + String pacsid = (String) session.getAttribute("pacsId"); + String makerId = session.getAttribute("user").toString(); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select nvl(d.deno_2000,0),nvl(d.deno_500,0),nvl(d.deno_100,0),nvl(d.deno_50,0),nvl(d.deno_20,0),nvl(d.deno_10,0),nvl(d.deno_5,0),nvl(d.deno_2,0),nvl(d.deno_1,0),nvl(d.DENO_50P,0),nvl(d.DENO_1P,0),d.status,nvl(d.deno_200,0) from cash_drawer d where d.entry_date = (select system_date from system_date) and d.teller_id ='" + makerId + "' and d.pacs_id ='" + pacsid + "' "); + + while (rs.next()) { + odeno2000 = rs.getString(1); + odeno500 = rs.getString(2); + odeno100 = rs.getString(3); + odeno50 = rs.getString(4); + odeno20 = rs.getString(5); + odeno10 = rs.getString(6); + odeno5 = rs.getString(7); + odeno2 = rs.getString(8); + odeno1 = rs.getString(9); + odeno50P = rs.getString(10); + odeno1P = rs.getString(11); + status = rs.getString(12); + odeno200 = rs.getString(13); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + %> + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + + String s_id=null; + String amt=null; + String v_narration=null; + String t_Type=""; + String mem_id=null; + String p_id=null; + String c_no=null; + String mem_c=null; + if(displayFlag=="Y"){ + s_id=blankNull(request.getAttribute("accNo").toString()); + //String amt=blankNull(request.getAttribute("trAmount").toString()); + v_narration=blankNull(request.getAttribute("narration").toString()); + t_Type=blankNull(request.getAttribute("tranTp").toString()); + //mem_id=blankNull(request.getAttribute("member_id").toString()); + status=blankNull(request.getAttribute("status").toString()); + p_id=blankNull(request.getAttribute("product_id").toString()); + c_no=blankNull(request.getAttribute("cust_no").toString()); + mem_c=blankNull(request.getAttribute("member_count").toString()); + } + %> + + + +
+ Cash Transaction +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DenominationsAvailableINOUT
+
+
+ +
+ +
+
+ + + + + + + + + + + + + + <%if(displayFlag==""){%> + + + + <%}%> + <% + if(displayFlag=="Y") + { + %> + + <%-- + + + <%}%> + + + + + +
+
+ + + + + +
Select Transaction Type*: +
Account Number*:
+ +
Member's Name + --%> + + + + + + + + + + + + <% + transactionOperationBean oTransactionBean=new transactionOperationBean(); + Object alTransactionBeanObj = request.getAttribute("alTransactionBean"); + ArrayList alTransactionBean = new ArrayList(); + if (alTransactionBeanObj != null) { + alTransactionBean = (ArrayList) request.getAttribute("alTransactionBean"); + + } + int count = 0; + + for (int i = 0; i < alTransactionBean.size(); i++) { + oTransactionBean = alTransactionBean.get(i); + + count++; + + %> + + + + + + + + + <%}%> + +
Member IDMember NameAmount
+
+


+ +
+ + +
+
+ + + + <%-- --%> + + + +
+
+ + + + +<% } catch (Exception e) { + + } +%> + diff --git a/IPKS_Updated/web/web/web/Deposit/DepositTransferClosure.jsp b/IPKS_Updated/web/web/web/Deposit/DepositTransferClosure.jsp new file mode 100644 index 0000000..70a334d --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/DepositTransferClosure.jsp @@ -0,0 +1,1227 @@ +<%-- + Document : TDOperation + Created on : Nov 7, 2016, 12:41:01 PM + Author : 986137 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.transactionOperationBean"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Transfer By Closure Operation + + + + + + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + <% + Object otransactionOperationBeanObj = request.getAttribute("otransactionOperationBeanObj"); + transactionOperationBean otransactionOperationBean = new transactionOperationBean(); + if (otransactionOperationBeanObj != null) { + otransactionOperationBean = (transactionOperationBean) request.getAttribute("otransactionOperationBeanObj"); + session.setAttribute("otransactionOperationBeanObj", otransactionOperationBeanObj); + } + %> + <% String odeno2000 = ""; + String odeno500 = ""; + String odeno200 = ""; + String odeno100 = ""; + String odeno50 = ""; + String odeno20 = ""; + String odeno10 = ""; + String odeno5 = ""; + String odeno2 = ""; + String odeno1 = ""; + String odeno50P = ""; + String odeno1P = ""; + String status = "C"; + String pacsid = (String) session.getAttribute("pacsId"); + String makerId = session.getAttribute("user").toString(); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select nvl(d.deno_2000,0),nvl(d.deno_500,0),nvl(d.deno_100,0),nvl(d.deno_50,0),nvl(d.deno_20,0),nvl(d.deno_10,0),nvl(d.deno_5,0),nvl(d.deno_2,0),nvl(d.deno_1,0),nvl(d.DENO_50P,0),nvl(d.DENO_1P,0),d.status,nvl(d.deno_200,0) from cash_drawer d where d.entry_date = (select system_date from system_date) and d.teller_id ='" + makerId + "' and d.pacs_id ='" + pacsid + "' "); + + while (rs.next()) { + odeno2000 = rs.getString(1); + odeno500 = rs.getString(2); + odeno200 = rs.getString(13); + odeno100 = rs.getString(3); + odeno50 = rs.getString(4); + odeno20 = rs.getString(5); + odeno10 = rs.getString(6); + odeno5 = rs.getString(7); + odeno2 = rs.getString(8); + odeno1 = rs.getString(9); + odeno50P = rs.getString(10); + odeno1P = rs.getString(11); + + status = rs.getString(12); + + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + %> + + + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> +
+ Transfer By Closure Operations +
+ <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +


+ +
+ + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DenominationsAvailableINOUT
+
+
+ +
+ +
+ +
+ + + +
+ + +<% } catch (Exception e) { + + } +%> + diff --git a/IPKS_Updated/web/web/web/Deposit/DepositTransferOperation.jsp b/IPKS_Updated/web/web/web/Deposit/DepositTransferOperation.jsp new file mode 100644 index 0000000..0d6cf57 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/DepositTransferOperation.jsp @@ -0,0 +1,1379 @@ +<%-- + Document : DepositTransferOperation + Created on : Nov 23, 2016, 5:21:25 PM + Author : 986137 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.transactionOperationBean"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Deposit Transfer Operation + + + + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + <% + Object otransactionOperationBeanObj = request.getAttribute("otransactionOperationBeanObj"); + transactionOperationBean otransactionOperationBean = new transactionOperationBean(); + if (otransactionOperationBeanObj != null) { + otransactionOperationBean = (transactionOperationBean) request.getAttribute("otransactionOperationBeanObj"); + session.setAttribute("otransactionOperationBeanObj", otransactionOperationBeanObj); + } + %> + <% String odeno2000 = ""; + String odeno500 = ""; + String odeno200 = ""; + String odeno100 = ""; + String odeno50 = ""; + String odeno20 = ""; + String odeno10 = ""; + String odeno5 = ""; + String odeno2 = ""; + String odeno1 = ""; + String status = "C"; + String odeno50P = ""; + String odeno1P = ""; + String pacsid = (String) session.getAttribute("pacsId"); + String makerId = session.getAttribute("user").toString(); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select nvl(d.deno_2000,0),nvl(d.deno_500,0),nvl(d.deno_100,0),nvl(d.deno_50,0),nvl(d.deno_20,0),nvl(d.deno_10,0),nvl(d.deno_5,0),nvl(d.deno_2,0),nvl(d.deno_1,0),nvl(d.DENO_50P,0),nvl(d.DENO_1P,0),d.status,nvl(d.deno_200,0) from cash_drawer d where d.entry_date = (select system_date from system_date) and d.teller_id ='" + makerId + "' and d.pacs_id ='" + pacsid + "' "); + + while (rs.next()) { + odeno2000 = rs.getString(1); + odeno500 = rs.getString(2); + odeno100 = rs.getString(3); + odeno50 = rs.getString(4); + odeno20 = rs.getString(5); + odeno10 = rs.getString(6); + odeno5 = rs.getString(7); + odeno2 = rs.getString(8); + odeno1 = rs.getString(9); + odeno50P = rs.getString(10); + odeno1P = rs.getString(11); + status = rs.getString(12); + odeno200 = rs.getString(13); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + %> + + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + + +
+
+ Transfer Operations +
+ <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DenominationsAvailableINOUT
+
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +


+ +
+ + +
+ + + +
+ + + + + +
+ + +<% } catch (Exception e) { + + } +%> + + diff --git a/IPKS_Updated/web/web/web/Deposit/Deposit_Report.jsp b/IPKS_Updated/web/web/web/Deposit/Deposit_Report.jsp new file mode 100644 index 0000000..1dee4b4 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/Deposit_Report.jsp @@ -0,0 +1,1015 @@ +<%-- + Document : Deposit_Report + Created on : Jul 28, 2016, 9:18:24 PM + Author : 986137 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="java.util.Date"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.ArrayList" %> +<%@page import="java.lang.String" %> +<% try { +%> + + + + + + + + + + + + + + + + + Deposit Report + + + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankNA(String s) { + return (s == null) ? "NA" : s; + } + %> + <% + String pacsId = (String) session.getAttribute("pacsId"); + String userRole = (String) session.getAttribute("userRole"); + String moduleName = new String(); + moduleName = (String) session.getAttribute("moduleName"); + Object oEnquiryBeanSearchObj = request.getAttribute("oEnquiryBeanSearchObj"); + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + if (oEnquiryBeanSearchObj != null) { + oEnquiryBean = (EnquiryBean) request.getAttribute("oEnquiryBeanSearchObj"); + session.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearchObj); + } + %> + <%String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + %> + +
+
+ Deposit Report + +
+
+ + + <%if (request.getAttribute("error") != null) {%> + + <%}%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
<%=request.getAttribute("error").toString()%>
From Date:  
To Date:  
Report Name *:
Sub-PACS Name:




+
+
+ +
+ + + +
+ + + + + +
+
+
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Deposit/EditServices.jsp b/IPKS_Updated/web/web/web/Deposit/EditServices.jsp new file mode 100644 index 0000000..3042d0a --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/EditServices.jsp @@ -0,0 +1,254 @@ +<%-- + Document : LoanInquiry + Created on : Oct 19, 2016, 3:11:52 PM + Author : 986137 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="java.util.Date"%> + + + + + + + + + Add/Edit SMS-Email Services + + + + + + + + + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + + + +
+ Add/Edit SMS-Email Services +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ + <%if (!(displayFlag.equalsIgnoreCase("Y"))) {%> +
+
+ + + + + + + +
Account Number*: "/>     
+
+ +


+ <%}%> + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+ + + + + + + + + + + + + + + + + + + + + + +
Account No: " readonly/>     
 
Select Services:
>SMS" placeholder="Enter Mobile No"/>
 
>MAIL" placeholder="Enter Email Id"/>
 
>MISS CALL
 
+
+
+ <%}%> +
+ + +
+ + + +
+
+ + diff --git a/IPKS_Updated/web/web/web/Deposit/ForceAccountClosure.jsp b/IPKS_Updated/web/web/web/Deposit/ForceAccountClosure.jsp new file mode 100644 index 0000000..15f7ba6 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/ForceAccountClosure.jsp @@ -0,0 +1,146 @@ +<%-- + Document : ForceAccountClosure + Created on : May 9, 2019, 6:00:55 PM + Author : 1242938 +--%> + +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.UUID" %> + +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Force Account Closure + + + + + + + + + + + + + + + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + + String error_msg = ""; + Object error = request.getAttribute("message1"); + if (error != null) { + error_msg = error.toString(); + + } + %> + +
+ Force Account Closure + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ + + + + + + + + + + +
Account Number*:
+
+ + + +
+
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Deposit/GLCCBalanceReport.jsp b/IPKS_Updated/web/web/web/Deposit/GLCCBalanceReport.jsp new file mode 100644 index 0000000..b6016cf --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/GLCCBalanceReport.jsp @@ -0,0 +1,230 @@ +<%-- + Document : GLCCBalanceReport + Created on : Dec 8, 2016, 12:01:30 PM + Author : 986137 +--%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="java.util.Date"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.ArrayList" %> +<%@page import="java.lang.String" %> + + + + + GL CC Balance Report + + + + + + + + + + + + + + + GLCC Balance Report + + + + + +
+ + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankNA(String s) { + return (s == null) ? "NA" : s; + } + %> + <% + String pacsId = (String) session.getAttribute("pacsId"); + Object oEnquiryBeanSearchObj = request.getAttribute("oEnquiryBeanSearchObj"); + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + if (oEnquiryBeanSearchObj != null) { + oEnquiryBean = (EnquiryBean) request.getAttribute("oEnquiryBeanSearchObj"); + session.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearchObj); + } + %> + <%String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + %> + +
+
+ GLCC Balance Report + +
+
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ + + + + + + + + + + + + + + + + + +
Sub-PACS Name:


+ +
+
+ +
+ + + + + + + +
+
+
+ + diff --git a/IPKS_Updated/web/web/web/Deposit/GLProductCreation.jsp b/IPKS_Updated/web/web/web/Deposit/GLProductCreation.jsp new file mode 100644 index 0000000..b07f009 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/GLProductCreation.jsp @@ -0,0 +1,605 @@ +<%-- + Document : gl + Created on : Aug 3, 2015, 2:23:35 PM + Author : Administrator +--%> +<%@page import="DataEntryBean.GlProductOperationBean"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + + + + + + + GL Product Operation + + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object oGlProductOperationBeanObj = request.getAttribute("oGlProductOperationBeanObj"); + GlProductOperationBean oGlProductOperationBean = new GlProductOperationBean(); + if (oGlProductOperationBeanObj != null) { + oGlProductOperationBean = (GlProductOperationBean) request.getAttribute("oGlProductOperationBeanObj"); + session.setAttribute("oGlProductOperationBeanObj", oGlProductOperationBeanObj); + } + %> + +
+ GL PRODUCT OPERATION +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ +
Operation Selection + +
+
+ + + + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Effective Date:
Status: +
GL Name:
GL Code:
GL Type: +
Product Type:
INTT Category:
GL Description:
Segment Code: +
Component 1:
Component 2:
Applicable For: + +


+

+ +
+ +
+ +
+ <%}%> + + + + +
+
+ + +<% } catch (Exception e) { + + } +%> + + + + + diff --git a/IPKS_Updated/web/web/web/Deposit/GliffDepositReport.jsp b/IPKS_Updated/web/web/web/Deposit/GliffDepositReport.jsp new file mode 100644 index 0000000..db200d7 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/GliffDepositReport.jsp @@ -0,0 +1,175 @@ +<%-- + Document : GliffDepositReport + Created on : Nov 29, 2016, 12:27:48 PM + Author : 986137 +--%> + + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.GliffDepositReportBean"%> +<%@page import="java.util.Date"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + + + + + + + + Deposit Report + + + + + + + + + + + + + + + + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankNA(String s) { + return (s == null) ? "NA" : s; + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + Object alGliffDepositReportBeanObj = request.getAttribute("alGliffDepositReportBean"); + ArrayList alGliffDepositReportBean = new ArrayList(); + if (alGliffDepositReportBeanObj != null) { + alGliffDepositReportBean = (ArrayList) request.getAttribute("alGliffDepositReportBean"); + + } + %> + <% + Object oGliffDepositReportBeanSearchObj = request.getAttribute("oGliffDepositReportBeanSearch"); + GliffDepositReportBean oGliffDepositReportBean = new GliffDepositReportBean(); + GliffDepositReportBean oGliffDepositReportBeanSearch = new GliffDepositReportBean(); + if (oGliffDepositReportBeanSearchObj != null) { + oGliffDepositReportBeanSearch = (GliffDepositReportBean) request.getAttribute("oGliffDepositReportBeanSearch"); + session.setAttribute("oGliffDepositReportBeanSearch", oGliffDepositReportBeanSearch); + } + %> + + +
+ DEPOSIT_REPORT +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ + +
+
+ + +
+ + + From Date: + +       + + +
+ + +

+ + + +
+


+ + + + + + +
+ + +
+ + +<% } catch (Exception e) { + + } +%> + + + + + + diff --git a/IPKS_Updated/web/web/web/Deposit/LienMarking.jsp b/IPKS_Updated/web/web/web/Deposit/LienMarking.jsp new file mode 100644 index 0000000..5816a4e --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/LienMarking.jsp @@ -0,0 +1,425 @@ +<%-- + Document : LienMarking + Created on : May 13, 2019, 6:00:55 PM + Author : 1242938 +--%> + +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.UUID" %> + +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Lien Marking + + + + + + + + + + + + + + + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + + } + %> + +
+ Loan Lien Marking + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Select Lien Type*:
+ +
Loan Account*: +
CIF Number:
Deposit Account*: +
Security Amount:
Safe Lending Margin :%
Description*:
+
+
+ + +
+ + + + + + + + +
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Deposit/MenuHead_Deposit.jsp b/IPKS_Updated/web/web/web/Deposit/MenuHead_Deposit.jsp new file mode 100644 index 0000000..8c03385 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/MenuHead_Deposit.jsp @@ -0,0 +1,362 @@ +<%-- + Document : MenuHead_Deposit + Created on : Apr 20, 2016, 3:19:56 PM + Author : 590685 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.*"%> + + +<% try { +%> +<% + String userName = new String(); + String pacsName = new String(); + String userRole = new String(); + String RoleName = new String(); + String sysDt = new String(); + + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select to_char(SYSTEM_DATE,'Month DD, YYYY') from system_date"); + while (rs.next()) { + sysDt = rs.getString(1); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + userName = (String) session.getAttribute("UserName"); + userName = userName.toUpperCase(); + pacsName = (String) session.getAttribute("pacsName"); + userRole = (String) session.getAttribute("userRole"); + RoleName = (String) session.getAttribute("RoleName"); + + String moduleName = new String(); + moduleName = (String) session.getAttribute("moduleName"); + + +%> + +
+ +
+ Image - PACS +
+ + +
+
User Name:
<%=userName%>
+
Date:
<%=sysDt%>
+
PACS Name/ Bank Name:
<%=pacsName%>
+ +
User Type:
<%=RoleName%>
+
Module Name:
<%=moduleName.toUpperCase()%>
+ +
+ + + + +
+ +
+ +<% } catch (Exception e) { + System.out.println("EX in " + e); + } +%> + diff --git a/IPKS_Updated/web/web/web/Deposit/MiscChargeDeduction.jsp b/IPKS_Updated/web/web/web/Deposit/MiscChargeDeduction.jsp new file mode 100644 index 0000000..a32b2a6 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/MiscChargeDeduction.jsp @@ -0,0 +1,252 @@ +<%-- + Document : MiscChargeDeduction + Created on : Sep 20, 2019, 6:00:55 PM + Author : 1242938 +--%> + +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.UUID" %> + +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Misc Charge Deduction + + + + + + + + + + + + + + + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + + } + %> + +
+ Miscellaneous Charge Deduction + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Select Charge Deduction Type*:
+
Product Code*: +
Interest Category:
Deduction Amount*:
Narration*:
+
+


+
+ + +
+
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Deposit/NotificationReport.jsp b/IPKS_Updated/web/web/web/Deposit/NotificationReport.jsp new file mode 100644 index 0000000..b9bcc89 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/NotificationReport.jsp @@ -0,0 +1,447 @@ +<%-- + Document : NotificationReport + Created on : Nov 13, 2020, 5:28:24 PM + Author : 1242938 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + + + Notification Reports + + + + + + + + + + + + + + <%-- --%> + + + + + + <% + String ModuleName = new String(); + + ModuleName = (String) session.getAttribute("moduleName"); + String role = (String) session.getAttribute("userRole"); + String pacsId = (String) session.getAttribute("pacsId"); + String holidayList = (String) session.getAttribute("holidayList"); + + %> + <% if (ModuleName.equalsIgnoreCase("KCC")) {%> + <%-- + <%} else if (ModuleName.equalsIgnoreCase("pds")) {%> + --%> + <%} else if (ModuleName.equalsIgnoreCase("trading")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("asset")) {%> + <%-- + <%} else if (ModuleName.equalsIgnoreCase("governance")) {%> + --%> + <%} else if (ModuleName.equalsIgnoreCase("dashboard")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("shg")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Deposit")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Loan")) {%> + <%-- + <%} else if (ModuleName.equalsIgnoreCase("eod")) {%> + --%> + <%} else if (ModuleName.equalsIgnoreCase("dds")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("share")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("Special")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialKcc")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBoth")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBothKcc")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBothDep")) {%> + + <%}else {%> + + <%}%> + + +<% if(role.equalsIgnoreCase("201606000004041")) { %> + + + +<% if(!ModuleName.equalsIgnoreCase("Special")) { %> + +<%} %> + +<% if(!ModuleName.equalsIgnoreCase("Special")) { %> + +<%} %> + + <%} %> + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Pending Queues:
Authorised Queues.
Rejected Queues.
Cash In
Cash Out
Cash In/Out Diff
Cash In hand
+
+ +
+
+ + + + + +
Investments to be matured within 15 days:
+ + + +
+
+ +
+
+ + + + + +
NSC KVP Certificate to be expired within 15 days:
+ + + +
+
+ + + + diff --git a/IPKS_Updated/web/web/web/Deposit/PLAppropriationOperations.jsp b/IPKS_Updated/web/web/web/Deposit/PLAppropriationOperations.jsp new file mode 100644 index 0000000..667e1bc --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/PLAppropriationOperations.jsp @@ -0,0 +1,628 @@ +<%-- + Document : PLAppropration + Created on : Nov 8, 2021, 5:52:10 PM + Author : 1242938 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + +<%@page import="java.sql.SQLException"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="DataEntryBean.mocProcessingBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + + PL Appropriation Operations + + + + + + + + + + + + + <% + String handle_idVal = ""; + Object handle_id = request.getAttribute("handle_id"); + if (handle_id != null) { + handle_idVal = handle_id.toString(); + } + String userRole = (String) session.getAttribute("userRole"); + %> + + + + <% + int count = 1; + String error_msg = ""; + + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + + Object alMocProcessingBeanObj = request.getAttribute("alMocProcessingBean"); + ArrayList alMocProcessingBean = new ArrayList(); + mocProcessingBean oMocProcessingBean = new mocProcessingBean(); + if (alMocProcessingBeanObj != null) { + alMocProcessingBean = (ArrayList) request.getAttribute("alMocProcessingBean"); + + + } + error = request.getAttribute("batchID"); + String batchID = ""; + if (request.getAttribute("batchID") != null) { + batchID = error.toString(); + } + %> + + + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + %> + + + + +
+ +
+ PL Appropriation Operations + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ + +
+ + +
+ +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + +
First Account NumberTransaction AmountTransaction IndicatorSecond Account NumberNarration
+ + + + + + + + + +
+ +


+
+ + + + + + + +
+
+
+ + + + + +
+ +
+
+ +
+ + + + +
+ +

+ + +
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Deposit/PrintPassbook.jsp b/IPKS_Updated/web/web/web/Deposit/PrintPassbook.jsp new file mode 100644 index 0000000..5c91092 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/PrintPassbook.jsp @@ -0,0 +1,400 @@ +<%-- + Document : PrintPassbook + Created on : Jul 18, 2017, 1:49:12 PM + Author : 594267 +--%> + +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.UUID" %> +<% out.flush(); %> + +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + Print Passbook + + + + + + + + + + + <%----%> + + + + + + +
+ <% String userRole = (String) session.getAttribute("userRole"); + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + + String addToPrinter = ""; + error = request.getAttribute("addToPrinter"); + if (error != null) { + addToPrinter = error.toString(); + } + + String reprint = ""; + error = request.getAttribute("reprint"); + if (error != null) { + reprint = error.toString(); + } + + String accNo = ""; + error = request.getAttribute("accNo"); + if (error != null) { + accNo = error.toString(); + } + + String accSubType = ""; + error = request.getAttribute("accSubType"); + if (error != null) { + accSubType = error.toString(); + } + + String printType = ""; + error = request.getAttribute("printType"); + if (error != null) { + printType = error.toString(); + } + + String accType = ""; + error = request.getAttribute("accType"); + if (error != null) { + accType = error.toString(); + } + + String from_date = ""; + error = request.getAttribute("from_date"); + if (error != null) { + from_date = error.toString(); + } + + String to_date = ""; + error = request.getAttribute("to_date"); + if (error != null) { + to_date = error.toString(); + } + + + String pageNo = "1"; + error = request.getAttribute("page"); + if (error != null) { + pageNo = error.toString(); + } + + int startrow = 0; + error = request.getAttribute("startrow"); + if (error != null) { + startrow = Integer.parseInt(error.toString()); + } + + int endrow = 0; + error = request.getAttribute("endrow"); + if (error != null) { + endrow = Integer.parseInt(error.toString()); + } + %> + +
+ Print Passbook +
+ + <% + if (reprint.equalsIgnoreCase("Y")) { + %> + + <% }%> + <%--
This Screen is Under TESTING. Please DONOT Print Passbook
--%> + +
+ + + + + + + + + + + + + + + + + +
Account Type*: +
Account Sub-Type:<%}%> +
Account Number*:
Print Type*: +
+
+ +

+ + +

+ + + + + + + +
+
+ +


+
+ + +
+
+ + +
+ +
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Deposit/ProductCreation.jsp b/IPKS_Updated/web/web/web/Deposit/ProductCreation.jsp new file mode 100644 index 0000000..1c06eab --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/ProductCreation.jsp @@ -0,0 +1,1617 @@ +<%-- + Document : IdentificationDetails + Created on : Aug 3, 2015, 2:25:40 PM + Author : Administrator +--%> +<%@page import="DataEntryBean.DepositProductCreationBean" %> +<%@page import="java.sql.SQLException"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Deposit Product Creation + + + + + + + + + + + + + + + + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + + Object DepositProductCreationBeanobj = request.getAttribute("oDepositProductCreationBeanObj"); + DepositProductCreationBean oDepositProductCreationBean = new DepositProductCreationBean(); + if (DepositProductCreationBeanobj != null) { + oDepositProductCreationBean = (DepositProductCreationBean) request.getAttribute("oDepositProductCreationBeanObj"); + + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + +
+ DEPOSIT PRODUCT OPERATION + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ +
Operation Selection + +
+
+ + + + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Product Name:
Product Description:
Product Code:
INTT Category:
INTCAT Description:
Segment Code: +
Credit Comp1:
Credit Comp2:
Debit Comp1:
Debit Comp2:
Status: +
Effective Date:
MIN BAL:
MAX BAL:
MIN WDL:
MAX WDL:
INTT Rate:
INTT Method: + +
INTT Frequency: + +
INTT Capitalization Frequency: + +
INTT Payout Frequency: + +
Principal Balance GL Code: + <% + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select distinct(gl_code),gl_name,id from gl_product where id='" + oDepositProductCreationBean.getGlCode() + "'"); + %> + " /> + + + + + <% + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + %> + +
Interest Payable GL Code: + <% String InttPAYABLE_Amend = ""; + String InttPAYABLE_AmendID = ""; + Connection connection1 = null; + ResultSet rs1 = null; + Statement statement1 = null; + connection1 = DbHandler.getDBConnection(); + try { + statement1 = connection1.createStatement(); + rs1 = statement1.executeQuery("select distinct(gl_code) as gl_code,gl_name,id from gl_product where id='" + oDepositProductCreationBean.getGlCodeInttPAYABLE() + "'"); + while (rs1.next()) { + InttPAYABLE_Amend = rs1.getString("gl_code") + ":" + rs1.getString("gl_name"); + InttPAYABLE_AmendID = rs1.getString("id"); + } + + // statement1.close(); + // connection1.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement1 !=null) + statement1.close(); + if (connection1 != null) + connection1.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + %> + + + + + +
Interest Paid GL Code: + <% String glCodeInttPAID_AmendShow = ""; + String glCodeInttPAID_Amend = ""; + Connection connection2 = null; + ResultSet rs2 = null; + Statement statement2 = null; + connection2 = DbHandler.getDBConnection(); + try { + statement2 = connection2.createStatement(); + rs2 = statement2.executeQuery("select distinct(gl_code) as gl_code,gl_name,id from gl_product where id='" + oDepositProductCreationBean.getGlCodeInttPAID() + "'"); + while (rs2.next()) { + glCodeInttPAID_AmendShow = rs2.getString("gl_code") + ":" + rs2.getString("gl_name"); + glCodeInttPAID_Amend = rs2.getString("id"); + } + + // statement2.close(); + // connection2.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement2 !=null) + statement2.close(); + if (connection2 != null) + connection2.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + %> + + + + + +
OD Indicator: + +
Allow Debit Transaction: + +
Allow Credit Transaction: + +
Dormancy Period(Days):
Minimum Term(Days): + +
Maximum Term(Days): + +
Dormancy Trigger + +
RD Flag + +
OverDue Rate + +
PreClosure Charges(%): + +
Head of A/c Type: +
+

+ +
+ +
+

All fields are mandatory

+
+ <%}%> + + + + +
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Deposit/RDOperation.jsp b/IPKS_Updated/web/web/web/Deposit/RDOperation.jsp new file mode 100644 index 0000000..ce2a60e --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/RDOperation.jsp @@ -0,0 +1,1302 @@ +<%-- + Document : RDOperation + Created on : Nov 26, 2016, 12:41:01 PM + Author : 986517 +--%> + + +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + + + + Recurring Deposit Transaction + + + + + + + + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% String odeno2000 = ""; + String odeno500 = ""; + String odeno200 = ""; + String odeno100 = ""; + String odeno50 = ""; + String odeno20 = ""; + String odeno10 = ""; + String odeno5 = ""; + String odeno2 = ""; + String odeno1 = ""; + String odeno50P = ""; + String odeno1P = ""; + String status = "C"; + String pacsid = (String) session.getAttribute("pacsId"); + String makerId = session.getAttribute("user").toString(); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select nvl(d.deno_2000,0),nvl(d.deno_500,0),nvl(d.deno_100,0),nvl(d.deno_50,0),nvl(d.deno_20,0),nvl(d.deno_10,0),nvl(d.deno_5,0),nvl(d.deno_2,0),nvl(d.deno_1,0),nvl(d.DENO_50P,0),nvl(d.DENO_1P,0),d.status,nvl(d.deno_200,0) from cash_drawer d where d.entry_date = (select system_date from system_date) and d.teller_id ='" + makerId + "' and d.pacs_id ='" + pacsid + "' "); + + while (rs.next()) { + odeno2000 = rs.getString(1); + odeno500 = rs.getString(2); + odeno100 = rs.getString(3); + odeno50 = rs.getString(4); + odeno20 = rs.getString(5); + odeno10 = rs.getString(6); + odeno5 = rs.getString(7); + odeno2 = rs.getString(8); + odeno1 = rs.getString(9); + odeno50P = rs.getString(10); + odeno1P = rs.getString(11); + status = rs.getString(12); + odeno200 = rs.getString(13); + + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + %> + +
+ Recurring Deposit Transaction +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DenominationsAvailableINOUT
+
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Select Transaction Type*: +

+ + + +
+ + +
+ + + + +
+
+ + + + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Deposit/ResetPassword.jsp b/IPKS_Updated/web/web/web/Deposit/ResetPassword.jsp new file mode 100644 index 0000000..8304aaa --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/ResetPassword.jsp @@ -0,0 +1,142 @@ +<%-- + Document : ResetPassword + Created on : Jun 19, 2018, 5:18:08 PM + Author : 1242938 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + Reset Password + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("error"); + if (error != null) { + error_msg = error.toString();%> + + <% } + + %> + + + + + + <% + String ModuleName = new String(); + + ModuleName = (String) session.getAttribute("moduleName"); + String role = (String) session.getAttribute("userRole"); + String pacsId = (String) session.getAttribute("pacsId"); + + %> + <% if (ModuleName.equalsIgnoreCase("KCC")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("pds")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("trading")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("asset")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("governance")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("dashboard")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("shg")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Deposit")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Loan")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("eod")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("dds")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("share")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("Special")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialKcc")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBoth")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBothKcc")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBothDep")) {%> + + <%}%> +
+ +
+
+
+ Reset To Default Password + +

Use this feature to reset password of the user.

+
+
+ + + + + + + + + + + + + + + +
User Id:
  
+ + +
+
         <%= error_msg%>
+
+
+
+
+ + diff --git a/IPKS_Updated/web/web/web/Deposit/ReverseTransaction.jsp b/IPKS_Updated/web/web/web/Deposit/ReverseTransaction.jsp new file mode 100644 index 0000000..3f40aaf --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/ReverseTransaction.jsp @@ -0,0 +1,110 @@ +<%-- + Document : ReverseTransaction + Created on : Nov 29, 2016, 1:16:44 PM + Author : 986137 +--%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Reverse Transaction + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("errorMessage"); + if (error != null) { + error_msg = error.toString(); + } + %> + + +
+
+ TRANSACTION REVERSAL +
+ <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +
+ + + + + + +
Enter Reference No : +
+
+ +
+ +
+ + + + +<% } catch (Exception e) { + + } +%> + diff --git a/IPKS_Updated/web/web/web/Deposit/SBRateSlab.jsp b/IPKS_Updated/web/web/web/Deposit/SBRateSlab.jsp new file mode 100644 index 0000000..3903408 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/SBRateSlab.jsp @@ -0,0 +1,501 @@ + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.DepositRateSlabBean"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + SB Rate Slab + + + + + + + + + + + + + + + + + <% int count = 1; + int count3 = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + + <% + Object oDepositRateSlabBeanObj = request.getAttribute("oDepositRateSlabBean"); + DepositRateSlabBean oDepositRateSlabBeanHeader = new DepositRateSlabBean(); + if (oDepositRateSlabBeanObj != null) { + oDepositRateSlabBeanHeader = (DepositRateSlabBean) request.getAttribute("oDepositRateSlabBean"); + } + + Object alDepositRateSlabBeanObj = request.getAttribute("alDepositRateSlabBean"); + ArrayList alDepositRateSlabBean = new ArrayList(); + DepositRateSlabBean oDepositRateSlabBean = new DepositRateSlabBean(); + if (alDepositRateSlabBeanObj != null) { + alDepositRateSlabBean = (ArrayList) request.getAttribute("alDepositRateSlabBean"); + + } + %> + + +
+ +
+ SB Rate Slab + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ +

+ +

+ +
+
+
+ +
+ +
+
+

+ <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + <% + oDepositRateSlabBean = new DepositRateSlabBean(); + count3 = 0; + + for (int i = 0; i < alDepositRateSlabBean.size(); i++) { + oDepositRateSlabBean = alDepositRateSlabBean.get(i); + + count3++; + %> + + + + + + + + + + + + + + + + + + + + + <%}%> + +
Product CodeProduct DescriptionInt CategoryInt Category DescriptionInterest Rate(%)Int Cap FreqThreshold BalanceThreshold Intt RateMinimum BalMaximum BalMinimum WithdrawalMaximum WithdrawalDebit Allow FlagDormancy
+ + + +
+ +
+
+
+ <%}%> +
+
+ <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+ + +
+
+ <%}%> + + + + + + + + + + + + +
+ +
+ + +<% } catch (Exception e) { + + } +%> + diff --git a/IPKS_Updated/web/web/web/Deposit/StandingInstructionreport.jsp b/IPKS_Updated/web/web/web/Deposit/StandingInstructionreport.jsp new file mode 100644 index 0000000..5b723ce --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/StandingInstructionreport.jsp @@ -0,0 +1,273 @@ +<%-- + Document : Trading_Report + Created on : Jul 28, 2016, 9:18:24 PM + Author : 986137 +--%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="java.util.Date"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.ArrayList" %> +<% try { +%> + + + + + + + + + + + + + + + + + + SI Report + + + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankNA(String s) { + return (s == null) ? "NA" : s; + } + %> + <% + String pacsId = (String) session.getAttribute("pacsId"); + Object oEnquiryBeanSearchObj = request.getAttribute("oEnquiryBeanSearchObj"); + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + if (oEnquiryBeanSearchObj != null) { + oEnquiryBean = (EnquiryBean) request.getAttribute("oEnquiryBeanSearchObj"); + session.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearchObj); + } + %> + <%String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + %> +
+
+ SI REPORT + +
+
+ + + <%if (request.getAttribute("error") != null) {%> + + <%}%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
<%=request.getAttribute("error").toString()%>
From Date: To Date: Report Name:
Sub-PACS Name:




+
+ + + + + +
+ + + + + + +
+
+
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Deposit/TDOperation.jsp b/IPKS_Updated/web/web/web/Deposit/TDOperation.jsp new file mode 100644 index 0000000..7278683 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/TDOperation.jsp @@ -0,0 +1,2078 @@ +<%-- + Document : TDOperation + Created on : Nov 7, 2016, 12:41:01 PM + Author : 986137 +--%> + +<%@page import="DataEntryBean.transactionOperationBean"%> +<%@page import="DataEntryBean.transactionOperationBean"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + + + + + Term Deposit Operation + + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + <% String odeno2000 = ""; + String odeno500 = ""; + String odeno200 = ""; + String odeno100 = ""; + String odeno50 = ""; + String odeno20 = ""; + String odeno10 = ""; + String odeno5 = ""; + String odeno2 = ""; + String odeno1 = ""; + String odeno50P = ""; + String odeno1P = ""; + String status = "C"; + String pacsid = (String) session.getAttribute("pacsId"); + String makerId = session.getAttribute("user").toString(); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select nvl(d.deno_2000,0),nvl(d.deno_500,0),nvl(d.deno_100,0),nvl(d.deno_50,0),nvl(d.deno_20,0),nvl(d.deno_10,0),nvl(d.deno_5,0),nvl(d.deno_2,0),nvl(d.deno_1,0),nvl(d.DENO_50P,0),nvl(d.DENO_1P,0),d.status,nvl(d.deno_200,0) from cash_drawer d where d.entry_date = (select system_date from system_date) and d.teller_id ='" + makerId + "' and d.pacs_id ='" + pacsid + "' "); + + while (rs.next()) { + odeno2000 = rs.getString(1); + odeno500 = rs.getString(2); + odeno100 = rs.getString(3); + odeno50 = rs.getString(4); + odeno20 = rs.getString(5); + odeno10 = rs.getString(6); + odeno5 = rs.getString(7); + odeno2 = rs.getString(8); + odeno1 = rs.getString(9); + odeno50P = rs.getString(10); + odeno1P = rs.getString(11); + status = rs.getString(12); + odeno200 = rs.getString(13); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + %> + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + + +
+ Term Deposit Transaction +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DenominationsAvailableINOUT
+
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Denominations for Interest
DenominationsAvailableINOUT
+
+
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Select Transaction Type*: +
+ + +
+ +
+ + + + +
+ + + + + + + + + +
+
+
+ + + + + + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Deposit/TDRepayMethod.jsp b/IPKS_Updated/web/web/web/Deposit/TDRepayMethod.jsp new file mode 100644 index 0000000..860f26f --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/TDRepayMethod.jsp @@ -0,0 +1,224 @@ +<%-- + Document : TDRepayMethod + Created on : Aug 22, 2019, 6:00:55 PM + Author : 1242938 +--%> + +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.UUID" %> + +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + TD/RD Interest TRF Method + + + + + + + + + + + + + + + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + + } + %> + +
+ TD/RD Interest TRF Method Change + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ + + + + + + + + + + + + + + + + + + + +
Account Number*: +
Customer Number*:
Select New Interest TD TRF Method*:
+ +
Interest Transfer Account: +
+
+


+
+ + +
+
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Deposit/UpdatePacsDetails.jsp b/IPKS_Updated/web/web/web/Deposit/UpdatePacsDetails.jsp new file mode 100644 index 0000000..36c3d3d --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/UpdatePacsDetails.jsp @@ -0,0 +1,226 @@ +<%-- + Document : UpdatePacsDetails + Created on : Oct 21, 2019, 6:00:55 PM + Author : 1242938 +--%> + +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.UUID" %> + +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Update PACS Details + + + + + + + + + + + + + + + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + + } + %> + +
+ Update PACS Details + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PACS Name*:
Address 1*:
Address 2*:
Address 3*:
GSTIN Number:
+
+

+
+ + +
+
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Deposit/UserAmendment.jsp b/IPKS_Updated/web/web/web/Deposit/UserAmendment.jsp new file mode 100644 index 0000000..9854362 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/UserAmendment.jsp @@ -0,0 +1,262 @@ +<%-- + Document : UserAmendment + Created on : Sep 13, 2019, 6:00:55 PM + Author : 1242938 +--%> + +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.UUID" %> + +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + User Amendment + + + + + + + + + + + + + + + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + + String error_msg = ""; + Object error = request.getAttribute("message1"); + if (error != null) { + error_msg = error.toString(); + + } + %> + +
+ User Amendment + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ + + + + + +
Operation Selection*: + + +
+
+ + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + +
User Name*:    
User Id:
Select IP Flag*: +
Static IP:
+ + + + + +
+
+ + + +
+
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Deposit/UserCreation.jsp b/IPKS_Updated/web/web/web/Deposit/UserCreation.jsp new file mode 100644 index 0000000..2021339 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/UserCreation.jsp @@ -0,0 +1,243 @@ +<%-- + Document : UserCreation + Created on : May 15, 2019, 6:00:55 PM + Author : 1242938 +--%> + +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.UUID" %> + +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + User Creation + + + + + + + + + + + + + + + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + + String error_msg = ""; + Object error = request.getAttribute("message1"); + if (error != null) { + error_msg = error.toString(); + + } + %> + +
+ User Creation + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ + + + + + + + <%-- + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
User Name*:
User Role*:    
Select IP Flag*: +
Static IP*:
DDS Limit:
+
+
+ + + +
+
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Deposit/authBulkIncr.jsp b/IPKS_Updated/web/web/web/Deposit/authBulkIncr.jsp new file mode 100644 index 0000000..674d907 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/authBulkIncr.jsp @@ -0,0 +1,409 @@ +<%-- + Document : authBulkIncr + Created on : Oct 26, 2018, 1:20:17 PM + Author : 1004242 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.SQLException"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="DataEntryBean.ChequeDetailsBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + + Auth Bulk Mark + + + + + + + + + + + + + + + + + + + <%-- <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + %>--%> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + + + + + +
+
+ <%----%> + Auth Bulk Mark +
+ <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+

+ <%--
+ Account No: + + +

+ Customer Name.: + +
--%> +
+ Auth Bulk Mark for: +
+

+ +
+ <%--

Tellerwise Transaction details

--%> +

Marked Non-Existing Bank CIF Bulk Account Details

+ + + + + + + + + + + + + + + + +
Account NoProductCustomer NameGuardian NameFirst ID TypeFirst ID NumberSecond ID TypeSecond ID NumberSelect
+
+

+ + + + +
+
+
+ <%--

Tellerwise Transaction details

--%> +

Marked Existing Bank CIF Bulk Account Details

+ + + + + + + + + + + + + +
Account NoProductCustomer NameGuardian NameBank CIFSelect
+
+

+ + + + +
+
+
+
+
+ + + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Deposit/authBulkIncr_STB.jsp b/IPKS_Updated/web/web/web/Deposit/authBulkIncr_STB.jsp new file mode 100644 index 0000000..057da07 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/authBulkIncr_STB.jsp @@ -0,0 +1,334 @@ +<%-- + Document : authBulkIncr_STB + Created on : Oct 26, 2018, 1:20:17 PM + Author : 1004242 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.SQLException"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="DataEntryBean.ChequeDetailsBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + + Bulk Mark + + + + + + + + + + + + + + + + + + <%-- <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %>--%> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + + + + + +
+
+ <%----%> + Bulk Mark +
+ <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +
+

+ +
+ <%--

Tellerwise Transaction details

--%> +

Marked Non-Existing Bank CIF Bulk Account Details

+ + + + + + + + + + + + + + + +
Account NoProductCustomer NameGuardian NameFirst ID TypeFirst ID NumberSecond ID TypeSecond ID NumberSelect
+
+

+ + + + + +
+
+ +
+ <%--

Tellerwise Transaction details

--%> +

Marked Existing Bank CIF Bulk Account Details

+ + + + + + + + + + + + +
Account NoProductCustomer NameGuardian NameBank CIF NumberSelect
+
+

+ + + + + +
+
+
+
+
+ + + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Deposit/bulkIncrDetails.jsp b/IPKS_Updated/web/web/web/Deposit/bulkIncrDetails.jsp new file mode 100644 index 0000000..cca200d --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/bulkIncrDetails.jsp @@ -0,0 +1,382 @@ +<%-- + Document : bulkIncrDetails + Created on : Oct 26, 2018, 1:20:17 PM + Author : 1004242 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.SQLException"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="DataEntryBean.ChequeDetailsBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + + Bulk Mark + + + + + + + + + + + + + + + + + + + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + + + +
+
+ <%----%> + Bulk Mark +
+ <%-- <%if (!error_msg1.equalsIgnoreCase("")) {%> +
<%= error_msg1%>
+ <% }%> +
--%> +

+
+ Bulk Mark for: +
+

+
+ Non-Existing Account Number*: + + +
+
+ Existing Account Number*: + + +
+

+ <%-- Customer Name.: + --%> +
+ +
+ <%--

Tellerwise Transaction details

--%> +

Non-Existing Bank CIF Bulk Account Details

+ + + + + + + + + + + + + +
Account NumberProductCustomer NameGuardian NameSelect
+
+

+ <%----%> +
+
+
+

Existing Bank CIF Bulk Account Details

+ + + + + + + + + + + + + + +
Account NumberProductCustomer NameGuardian NameBank CIFSelect
+
+
+
+
+ + + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Deposit/inv_borr_rep.jsp b/IPKS_Updated/web/web/web/Deposit/inv_borr_rep.jsp new file mode 100644 index 0000000..db9efa3 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/inv_borr_rep.jsp @@ -0,0 +1,389 @@ +<%-- + Document : inv_borr_rep + Created on : Dec 22, 2017, 1:36:03 PM + Author : 1027350 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="java.util.Date"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.ArrayList" %> +<%@page import="java.lang.String" %> +<% try { +%> + + + + + + + + + + + + + + + + + Investment/Borrowing Report + + + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankNA(String s) { + return (s == null) ? "NA" : s; + } + %> + <% + String pacsId = (String) session.getAttribute("pacsId"); + Object oEnquiryBeanSearchObj = request.getAttribute("oEnquiryBeanSearchObj"); + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + if (oEnquiryBeanSearchObj != null) { + oEnquiryBean = (EnquiryBean) request.getAttribute("oEnquiryBeanSearchObj"); + session.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearchObj); + } + %> + <%String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + %> + +
+
+ Investment/Borrowing Report + +
+
+ + + <%if (request.getAttribute("error") != null) {%> + + <%}%> + + <%-- + Investment + Borrowing

+ --%> + + + + + + + + + + + + + + + + + + + + + +
<%=request.getAttribute("error").toString()%>
Report Name *:
Date *:
GL Account*: +
Sub-PACS Name:




+
+
+ +
+ + + + +
+ + + + + +
+
+
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Deposit/microFileUploadDownload.jsp b/IPKS_Updated/web/web/web/Deposit/microFileUploadDownload.jsp new file mode 100644 index 0000000..65bb296 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/microFileUploadDownload.jsp @@ -0,0 +1,117 @@ +<%-- + Document : microFileUploadDownload + Created on : May 17, 2018, 2:15:10 PM + Author : 1004242 +--%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> + + + + Handbill File Processing + + + + + + + + + + + + + + + <% + String pacsId = (String) session.getAttribute("pacsId"); + + %> +
+
+ Handbill File Processing +
+
+ + + + + +
Select Operation: + +
+
+
+ + + +
${errorMessage}
+
+ + + diff --git a/IPKS_Updated/web/web/web/Deposit/mocOperations.jsp b/IPKS_Updated/web/web/web/Deposit/mocOperations.jsp new file mode 100644 index 0000000..c633db3 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/mocOperations.jsp @@ -0,0 +1,658 @@ +<%-- + Document : moc + Created on : Mar 19, 2018, 5:52:10 PM + Author : 981898 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + +<%@page import="java.sql.SQLException"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="DataEntryBean.mocProcessingBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + + MOC Operations + + + + + + + + + + + + + <% + String handle_idVal = ""; + Object handle_id = request.getAttribute("handle_id"); + if (handle_id != null) { + handle_idVal = handle_id.toString(); + } + String userRole = (String) session.getAttribute("userRole"); + %> + + + + <% + int count = 1; + String error_msg = ""; + + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + + Object alMocProcessingBeanObj = request.getAttribute("alMocProcessingBean"); + ArrayList alMocProcessingBean = new ArrayList(); + mocProcessingBean oMocProcessingBean = new mocProcessingBean(); + if (alMocProcessingBeanObj != null) { + alMocProcessingBean = (ArrayList) request.getAttribute("alMocProcessingBean"); + + + } + error = request.getAttribute("batchID"); + String batchID = ""; + if (request.getAttribute("batchID") != null) { + batchID = error.toString(); + } + %> + + + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + %> + + <%-- --%> + + + +
+ +
+ MOC Operations + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ + +
+ + +
+ +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + +
First Account NumberTransaction AmountTransaction IndicatorSecond Account NumberNarration
+ + + + + + + + + +
+ +


+
+ + + + + + + +
+
+
+ + + + + +
+ +
+
+ +
+ + + + +
+ +
+ + +
+ +

+ + +
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Deposit/viewBulkIncr_STB.jsp b/IPKS_Updated/web/web/web/Deposit/viewBulkIncr_STB.jsp new file mode 100644 index 0000000..28e2208 --- /dev/null +++ b/IPKS_Updated/web/web/web/Deposit/viewBulkIncr_STB.jsp @@ -0,0 +1,298 @@ +<%-- + Document : viewBulkIncr_STB + Created on : Oct 26, 2018, 1:20:17 PM + Author : 1004242 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.SQLException"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="DataEntryBean.ChequeDetailsBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + + Bulk Mark + + + + + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + + + + + +
+
+ <%----%> + Bulk Mark +
+ <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+

+
+ Auth Bulk Mark for: +
+

+ +
+ <%--

Tellerwise Transaction details

--%> +

Marked Non-Existing Bank CIF Bulk Account Details

+ + + + + + + + + + + +
Pacs IdPacs NameCountSelect
+
+

+ + +
+
+ +
+

Marked Existing Bank CIF Bulk Account Details

+ + + + + + + + + + + +
Pacs IdPacs NameCountSelect
+
+

+
+
+
+
+
+ + + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/DynamicInttCategory.jsp b/IPKS_Updated/web/web/web/DynamicInttCategory.jsp new file mode 100644 index 0000000..64b82a5 --- /dev/null +++ b/IPKS_Updated/web/web/web/DynamicInttCategory.jsp @@ -0,0 +1,82 @@ +<%-- + Document : DynamicInttCategory + Created on : Mar 9, 2016, 6:27:36 PM + Author : Tcs Helpdesk10 +--%> + +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.AccountCreationBean"%> +<%@page import="DataEntryBean.GlProductOperationBean"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="controller.*"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + Dynamic Drop Down + + + + + + + + + + + + + + <% + Connection connection = null; + ResultSet rs = null; + ResultSet rs_pname = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + AccountCreationBean oAccountCreationBean = new AccountCreationBean(); + ArrayList alAccountCreationBean = new ArrayList(); + // String str = request.getParameter("handle_id"); + statement = connection.createStatement(); + // rs = statement.executeQuery("select prod_code,prod_desc,int_cat,intt_cat_desc from dep_product where prod_code='" + str + "'"); + while(rs.next()){ + + oAccountCreationBean = new AccountCreationBean(); + oAccountCreationBean.setId(str); + oAccountCreationBean.setProductCode(rs.getString("prod_code")); + oAccountCreationBean.setProductName(rs.getString("prod_desc")); + oAccountCreationBean.setInttCategory(rs.getString("int_cat")); + oAccountCreationBean.setInttDescription(rs.getString("intt_cat_desc")); + + alAccountCreationBean.add(oAccountCreationBean); + + } + + request.setAttribute("oAccountCreationBeanObj", alAccountCreationBean); + request.setAttribute("flag", 'Y'); + request.getRequestDispatcher("/accountCreation.jsp").forward(request, response); + // statement.close(); + //connection.close(); + + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + %> + + diff --git a/IPKS_Updated/web/web/web/DynamicPacsDisplay.jsp b/IPKS_Updated/web/web/web/DynamicPacsDisplay.jsp new file mode 100644 index 0000000..4677788 --- /dev/null +++ b/IPKS_Updated/web/web/web/DynamicPacsDisplay.jsp @@ -0,0 +1,94 @@ +<%-- + Document : DynamicPacsDisplay + Created on : Mar 9, 2016, 6:27:36 PM + Author : Tcs Helpdesk10 +--%> + +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.UserMaintainanceBean"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="controller.*"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + Dynamic Drop Down + + + + + + + + + + + + + + <% + Connection connection = null; + ResultSet rs = null; + ResultSet rs_pname = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + String Option = request.getParameter("checkOption"); + int Search = 0; + + if (Option.equalsIgnoreCase("create")) { + + try { + UserMaintainanceBean oUserMaintainanceBean = new UserMaintainanceBean(); + ArrayList alUserMaintainanceBean = new ArrayList(); + + //String str = request.getParameter("dccbCode"); + statement = connection.createStatement(); + // rs = statement.executeQuery("select t.pacs_id,t.pacs_id||':'||t.pacs_name from pacs_master t where t.dccb_code='" + str + "'"); + while (rs.next()) { + oUserMaintainanceBean = new UserMaintainanceBean(); + + oUserMaintainanceBean.setPacsId(rs.getString(1)); + oUserMaintainanceBean.setPacsDetails(rs.getString(2)); + + alUserMaintainanceBean.add(oUserMaintainanceBean); + Search = 1; + request.setAttribute("flag", "Y"); + oUserMaintainanceBean.setDccbCode(str); + } + + + oUserMaintainanceBean.setCheckOption("create"); + if (Search == 0) { + request.setAttribute("flag", "N"); + } + request.setAttribute("alUserMaintainanceBean", alUserMaintainanceBean); + request.setAttribute("oUserMaintainanceBeanObj", oUserMaintainanceBean); + + request.getRequestDispatcher("/userMaintenance.jsp").forward(request, response); + // statement.close(); + // connection.close(); + + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + } + + + %> + + diff --git a/IPKS_Updated/web/web/web/EODinttComputation.jsp b/IPKS_Updated/web/web/web/EODinttComputation.jsp new file mode 100644 index 0000000..88927ef --- /dev/null +++ b/IPKS_Updated/web/web/web/EODinttComputation.jsp @@ -0,0 +1,105 @@ +<%-- + Document : EODinttComputation + Created on : Mar 18, 2016, 2:00:29 PM + Author : Tcs Helpdesk10 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> + + + + + Interest Computation + + + + + + + + + + + + + + + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + +
+ EOD INTEREST COMPUTATION + +
+ +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <%}%> +
+ +
+

+ + + + + + +
 
+
+ + + + + + +
+
+ + diff --git a/IPKS_Updated/web/web/web/FarmerDetailsUpdation.jsp b/IPKS_Updated/web/web/web/FarmerDetailsUpdation.jsp new file mode 100644 index 0000000..d2e6678 --- /dev/null +++ b/IPKS_Updated/web/web/web/FarmerDetailsUpdation.jsp @@ -0,0 +1,357 @@ +<%-- + Document : FarmerDetailsUpdation + Created on : Oct 10, 2018, 2:39:08 PM + Author : 1004242 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.SQLException"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="DataEntryBean.BatchProcessingBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + + Farmer Details Updation + + + + + + + + + + + + + + + + + <% + int count = 1; + String error_msg = ""; + + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + + %> + + + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + %> + + + + +
+ + + + +
+ Farmer Details Updation + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ +
+
+
+ + + + +
Enter CIF Number*: +

+ +
+ + + + + + + +
+ +
+ + + +
+ + +

+ + +
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/GPS_JSP/CommodityMaster.jsp b/IPKS_Updated/web/web/web/GPS_JSP/CommodityMaster.jsp new file mode 100644 index 0000000..72a240b --- /dev/null +++ b/IPKS_Updated/web/web/web/GPS_JSP/CommodityMaster.jsp @@ -0,0 +1,424 @@ +<%-- + Document : CommodityMaster + Created on : Jul 13, 2016, 1:31:58 PM + Author : Tcs Helpdesk10 +--%> + + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="DataEntryBean.CommodityMasterBean"%> +<% try { +%> + + + + + + + + + + + + + + + Commodity Master + + + + + + <% + String error_msg = ""; + String pacsid = ""; + String commodityID = ""; + Object obj = session.getAttribute("pacsId"); + pacsid = obj.toString(); + Object commodityObj = request.getAttribute("commodityID"); + if (commodityObj != null) { + commodityID = commodityObj.toString(); + } + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + <% + Object CommodityMasterBeanObj = request.getAttribute("oCommodityMasterBean"); + CommodityMasterBean OCommodityMasterBean = new CommodityMasterBean(); + if (CommodityMasterBeanObj != null) { + OCommodityMasterBean = (CommodityMasterBean) request.getAttribute("oCommodityMasterBean"); + + } + %> + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + + +
+ Commodity Master +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ +
+ +
+
+
+ + + + + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Item Type:
Item Description:
Sub Type:
Sub Type Description:
+
+ + + +
+ +
+ + + + +
+ +
+ <%}%> + + + +
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/GPS_JSP/GovtOrderCreation.jsp b/IPKS_Updated/web/web/web/GPS_JSP/GovtOrderCreation.jsp new file mode 100644 index 0000000..8e98db9 --- /dev/null +++ b/IPKS_Updated/web/web/web/GPS_JSP/GovtOrderCreation.jsp @@ -0,0 +1,1110 @@ +<%-- + Document : GovtOrderCreation + Created on : Jul 14, 2016, 11:09:54 AM + Author : Tcs Helpdesk10 +--%> + + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.GovtOrderCreationExpenseBean"%> +<%@page import="DataEntryBean.GovtOrderCreationDetailBean"%> +<%@page import="DataEntryBean.GovtOrderCreationHeaderBean"%> +<% try { +%> + + + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% int count1 = 1; + String error_msg1 = ""; + Object error1 = request.getAttribute("message"); + if (error1 != null) { + error_msg1 = error.toString(); + } + %> + + <% int count3 = 1; + String error_msg3 = ""; + Object error3 = request.getAttribute("message"); + if (error1 != null) { + error_msg1 = error.toString(); + } + %> + + <% int count4 = 1; + String error_msg4 = ""; + Object error4 = request.getAttribute("message"); + if (error1 != null) { + error_msg1 = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + <% + Object GovtOrderCreationHeaderBeanObj = request.getAttribute("GovtOrderCreationHeaderBeanObj"); + GovtOrderCreationHeaderBean oGovtOrderCreationHeaderBean = new GovtOrderCreationHeaderBean(); + if (GovtOrderCreationHeaderBeanObj != null) { + oGovtOrderCreationHeaderBean = (GovtOrderCreationHeaderBean) request.getAttribute("GovtOrderCreationHeaderBeanObj"); + } + %> + + <% + Object alGovtOrderCreationDetailBeanObj = request.getAttribute("alGovtOrderCreationDetailBean"); + ArrayList alGovtOrderCreationDetailBean = new ArrayList(); + GovtOrderCreationDetailBean oGovtOrderCreationDetailBean = new GovtOrderCreationDetailBean(); + if (alGovtOrderCreationDetailBeanObj != null) { + alGovtOrderCreationDetailBean = (ArrayList) request.getAttribute("alGovtOrderCreationDetailBean"); + + } + %> + + <% + Object alGovtOrderCreationExpenseBeanObj = request.getAttribute("alGovtOrderCreationExpenseBean"); + ArrayList alGovtOrderCreationExpenseBean = new ArrayList(); + GovtOrderCreationExpenseBean oGovtOrderCreationExpenseBean = new GovtOrderCreationExpenseBean(); + if (alGovtOrderCreationExpenseBeanObj != null) { + alGovtOrderCreationExpenseBean = (ArrayList) request.getAttribute("alGovtOrderCreationExpenseBean"); + + } + %> + + + +
+ + + +
+ GOVT. ORDER CREATION + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ +
+ +
+
+
+ + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Government Order Information

Govt.Order Code :
Description :
Procurement Start Date :
Procurement End Date :

+ + + +

Item Details

+ +
+ + + + + + + + + + + + + + + + + + <% + oGovtOrderCreationDetailBean = new GovtOrderCreationDetailBean(); + count3 = 0; + + for (int i = 0; i < alGovtOrderCreationDetailBean.size(); i++) { + oGovtOrderCreationDetailBean = alGovtOrderCreationDetailBean.get(i); + + count3++; + + %> + + + + + + + + + + + + + + + + + <%}%> + +
Item TypeItem SubTypeItem UnitQuantityItem Rate Per UnitTotal
+
+ +
+
+
+ + + + + + +
+ + + + + + + + + + + +

Commission Details

Procurement Commission Rate % Per Unit


+ +

Expense Details

+ +
+ + + + + + + + + + <% + oGovtOrderCreationExpenseBean = new GovtOrderCreationExpenseBean(); + count4 = 0; + + for (int i = 0; i < alGovtOrderCreationExpenseBean.size(); i++) { + oGovtOrderCreationExpenseBean = alGovtOrderCreationExpenseBean.get(i); + + count4++; + + %> + + + + <%-- --%> + + + + + + <%}%> + +
Expense HeadExpense Rate Per Unit
+ +

+ +
+ +
+ + + + + + +
+ +
+
+ + +
+
+
+ + +
+ <%}%> + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/GPS_JSP/ItemProcureChallan.jsp b/IPKS_Updated/web/web/web/GPS_JSP/ItemProcureChallan.jsp new file mode 100644 index 0000000..860fd27 --- /dev/null +++ b/IPKS_Updated/web/web/web/GPS_JSP/ItemProcureChallan.jsp @@ -0,0 +1,105 @@ +<%-- + Document : ItemProcureChallan + Created on : Jul 19, 2016, 2:05:29 PM + Author : Tcs Helpdesk10 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<% try { +%> + + + + + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + String govtProcId = ""; + + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + Object govtProcIdObj = request.getAttribute("govtProcId"); + if (govtProcIdObj != null) { + govtProcId = govtProcIdObj.toString(); + } + + + %> + + +
+
+ + + Item Procure Challan + + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+
+ + + + + +

Download The Challan

+
+
+ +
+
+ + + + + +
+ +
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/GPS_JSP/ItemProcurement.jsp b/IPKS_Updated/web/web/web/GPS_JSP/ItemProcurement.jsp new file mode 100644 index 0000000..1ac30c2 --- /dev/null +++ b/IPKS_Updated/web/web/web/GPS_JSP/ItemProcurement.jsp @@ -0,0 +1,404 @@ +<%-- + Document : ItemProcurement + Created on : Jul 14, 2016, 5:01:13 PM + Author : Tcs Helpdesk10 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.ItemProcurementBean"%> +<% try { +%> + + + Item Procurement + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + +
+ + + +
+ ITEM PROCUREMENT + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ + + + + + + + + + + + + + + + + + + + + + + + + +

Item Procurement

Muster Roll ID :
Name :
Govt.Procurement Code :

+ + +

Item Details

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Item TypeItem SubTypeRate Per UnitQuantity UnitRemaining Quantity QuantityTotal
+
+ + + + + + + + + + + +
+ +

+ +
+
+ + + + + +
+ + +
+ +
+ + +
+ + + +
+ + +<% } catch (Exception e) { + + } +%> + diff --git a/IPKS_Updated/web/web/web/GPS_JSP/MasterRollEnrollment.jsp b/IPKS_Updated/web/web/web/GPS_JSP/MasterRollEnrollment.jsp new file mode 100644 index 0000000..9214da5 --- /dev/null +++ b/IPKS_Updated/web/web/web/GPS_JSP/MasterRollEnrollment.jsp @@ -0,0 +1,483 @@ +<%-- + Document : MasterRollEnrollment + Created on : Jul 13, 2016, 2:35:09 PM + Author : Tcs Help desk122 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="DataEntryBean.masterRollEnrollmentBean;"%> +<% try { +%> + + + + + + + + + + + + + + + Muster Roll Enrollment + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + <% + Object masterRollEnrollmentBeanObj = request.getAttribute("masterRollEnrollmentBeanObj"); + masterRollEnrollmentBean OmasterRollEnrollmentBean = new masterRollEnrollmentBean(); + if (masterRollEnrollmentBeanObj != null) { + OmasterRollEnrollmentBean = (masterRollEnrollmentBean) request.getAttribute("masterRollEnrollmentBeanObj"); + + } + %> + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + + +
+ MUSTER ROLL ENROLMENT +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ +
+ +
+
+
+ + + + + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name:
Address:
Contact No:
Voter Card No:
Adhaar Card No:
Details Of Produce:
+
+ + + +
+ +
+ + + +
+ +
+ <%}%> + + +
+
+ + + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/GPS_JSP/MenuHead_GPS.jsp b/IPKS_Updated/web/web/web/GPS_JSP/MenuHead_GPS.jsp new file mode 100644 index 0000000..7b5da64 --- /dev/null +++ b/IPKS_Updated/web/web/web/GPS_JSP/MenuHead_GPS.jsp @@ -0,0 +1,151 @@ +<%-- + Document : MenuHead_GPS + Created on : Jul 13, 2016, 12:14:39 PM + Author : Tcs Help desk122 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.*"%> + + + + +<% + String userName = new String(); + String pacsName = new String(); + String userRole = new String(); + String RoleName = new String(); + String sysDt = new String(); + + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select to_char(SYSTEM_DATE,'Month DD, YYYY') from system_date"); + while (rs.next()) { + sysDt = rs.getString(1); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + } + + + userName = (String) session.getAttribute("UserName"); + userName = userName.toUpperCase(); + pacsName = (String) session.getAttribute("pacsName"); + userRole = (String) session.getAttribute("userRole"); + RoleName = (String) session.getAttribute("RoleName"); + + +String moduleName = new String(); + moduleName = (String) session.getAttribute("moduleName"); + + +%> + +
+ +
+ Image - PACS +
+ +
+
User Name: <%=userName%>
+
Date: <%=sysDt%>
+
PACS Name: <%=pacsName%>
+ +
User Type: <%=RoleName%>
+
Module Name: <%=moduleName.toUpperCase()%>
+ +
+ + + + + +
+ diff --git a/IPKS_Updated/web/web/web/GPS_JSP/ProcurementRegister.jsp b/IPKS_Updated/web/web/web/GPS_JSP/ProcurementRegister.jsp new file mode 100644 index 0000000..2c1d02e --- /dev/null +++ b/IPKS_Updated/web/web/web/GPS_JSP/ProcurementRegister.jsp @@ -0,0 +1,258 @@ +<%-- + Document : ProcurementRegister + Created on : Jul 15, 2016, 2:15:03 PM + Author : Tcs Helpdesk10 +--%> + +<%@page import="DataEntryBean.ProcurementRegisterBean"%> +<%@page import="java.lang.String"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.sql.PreparedStatement"%> +<% try { +%> + + + + Procurement Register + + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + Object gPSProcurementRegisterBeanObjObj = request.getAttribute("ProcurementRegisterBeanObj"); + + ProcurementRegisterBean gPSProcurementRegisterBeanObjApend = new ProcurementRegisterBean(); + if (gPSProcurementRegisterBeanObjObj != null) { + gPSProcurementRegisterBeanObjApend = (ProcurementRegisterBean) request.getAttribute("ProcurementRegisterBeanObj"); + } + + Object alProcurementRegisterBeanObj = request.getAttribute("alProcurementRegisterBean"); + ArrayList alProcurementRegisterBean = new ArrayList(); + if (alProcurementRegisterBeanObj != null) { + alProcurementRegisterBean = (ArrayList) request.getAttribute("alProcurementRegisterBean"); + } + ProcurementRegisterBean gPSProcurementRegisterBeanObj = new ProcurementRegisterBean(); + %> + + +
+
+ + + PROCUREMENT REGISTER DETAILS + + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + +

+ + + + +
Item Type:
Item Sub Type:
From Date:
To Date:




+ + + +
+
+ + + <% + if (displayFlag.equalsIgnoreCase("Y")) { + + %> + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + <% for (int i = 0; i < alProcurementRegisterBean.size(); i++) { + gPSProcurementRegisterBeanObj = alProcurementRegisterBean.get(i); + %> + + + + + + + + + + + + + + + <%}%> + +
Govt.Procurement CodeProcurement IDProcurement DateItem Type:DescItem Sub Type:DescUnitRate Per UnitBase QuantityRemaining Quantity AvailableQuantity Availed
+
+
+

+ +
+ + + <% }%> + + + + +
+ + +
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/GPS_JSP/SellItemChallan.jsp b/IPKS_Updated/web/web/web/GPS_JSP/SellItemChallan.jsp new file mode 100644 index 0000000..ba7d304 --- /dev/null +++ b/IPKS_Updated/web/web/web/GPS_JSP/SellItemChallan.jsp @@ -0,0 +1,107 @@ +<%-- + Document : SellItemChallan + Created on : Jul 21, 2016, 5:22:09 PM + Author : Tcs Help desk122 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<% try { +%> + + + + Sell Item Challan + + + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + String govtProcId = ""; + + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + Object govtProcIdObj = request.getAttribute("sellId"); + if (govtProcIdObj != null) { + govtProcId = govtProcIdObj.toString(); + } + + + %> + + +
+
+ + + Sell Item Challan + + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+
+ + + + + +

Download The Challan

+
+
+ +
+
+ + + + + +
+ +
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/GPS_JSP/SellProcureItem.jsp b/IPKS_Updated/web/web/web/GPS_JSP/SellProcureItem.jsp new file mode 100644 index 0000000..245d7fd --- /dev/null +++ b/IPKS_Updated/web/web/web/GPS_JSP/SellProcureItem.jsp @@ -0,0 +1,547 @@ +<%-- + Document : SellProcureItem + Created on : Jul 15, 2016, 11:03:20 AM + Author : Tcs Helpdesk10 +--%> + +<%@page import="DataEntryBean.GPSSellProcurementBean"%> +<%@page import="DataEntryBean.GovtOrderCreationExpenseBean"%> +<%@page import="java.sql.CallableStatement"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.SellProcureItemBean"%> +<% try { +%> + + + + Sell Procure Item + + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + int count1 = 1; + String error_msg1 = ""; + Object error1 = request.getAttribute("message"); + if (error1 != null) { + error_msg1 = error.toString(); + } + %> + + + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + + Object govtOrderCreationExpenseBeanObj = request.getAttribute("oGovtOrderCreationExpenseBean"); + + GovtOrderCreationExpenseBean govtOrderCreationExpenseBeanObjApend = new GovtOrderCreationExpenseBean(); + if (govtOrderCreationExpenseBeanObj != null) { + govtOrderCreationExpenseBeanObjApend = (GovtOrderCreationExpenseBean) request.getAttribute("oGovtOrderCreationExpenseBean"); + } + + GovtOrderCreationExpenseBean oGovtOrderCreationExpenseBean = new GovtOrderCreationExpenseBean(); + + Object AlGovtOrderCreationExpenseBean = request.getAttribute("alGovtOrderCreationExpenseBean"); + ArrayList alGovtOrderCreationExpenseBean = new ArrayList(); + if (AlGovtOrderCreationExpenseBean != null) { + alGovtOrderCreationExpenseBean = (ArrayList) request.getAttribute("alGovtOrderCreationExpenseBean"); + } + + Object AlGPSSellProcurementBean = request.getAttribute("alGPSSellProcurementBean"); + ArrayList alGPSSellProcurementBean = new ArrayList(); + if (AlGPSSellProcurementBean != null) { + alGPSSellProcurementBean = (ArrayList) request.getAttribute("alGPSSellProcurementBean"); + } + GPSSellProcurementBean oGPSSellProcurementBean = new GPSSellProcurementBean(); + %> + + +
+ + + +
+ SELL PROCURE ITEM DETAILS + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ + + + + + + + + + + + + + + + + + + + + +

Sell Details

Sell To :
Delivered To :
Address :
Govt.Procurement Code :

+ +

Item Details

+ +
+ + + + + + + + + + + + + + + + + + <% + if (displayFlag.equalsIgnoreCase("Y")) { + for (int i = 0; i < alGPSSellProcurementBean.size(); i++) { + oGPSSellProcurementBean = alGPSSellProcurementBean.get(i); + + %> + + + + + + + + + + + + + + + + + + + + + + <%}%> + + <%} else {%> + + + + + + + + + + + + + + + + + + + + <%if (!displayFlag.equalsIgnoreCase("Y")) {%> + + + + +
Item Type:DescItem SubType:DescProcurement IDSeller IDItem UnitItem Rate Per UnitItem QuantitySelling QuantityTotal
+
+ <%}%> +
+
+ + + +

+ +
+ + + <%}%> + + +

+ +
+ + + + + + + + + +
+ <% + if (displayFlag.equalsIgnoreCase("Y")) { + + %> +
+ + + +

+

Expense

+ +
+ + + + + + + + + + + + + + + <% if (alGovtOrderCreationExpenseBean.size() > 0) {%> + <% for (int i = 0; i < alGovtOrderCreationExpenseBean.size(); i++) { + oGovtOrderCreationExpenseBean = alGovtOrderCreationExpenseBean.get(i); + %> + + + + + + + + + <%}%> +
Expense DetailsExpense ChargesExpense Total
+ + + + + + + + + + + + +
+ <%}%> + + +

+
+ +
+
+ + +
+
+
+
+ <%}%> + + +
+ + + + +
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/GPS_JSP/gps_report.jsp b/IPKS_Updated/web/web/web/GPS_JSP/gps_report.jsp new file mode 100644 index 0000000..1815747 --- /dev/null +++ b/IPKS_Updated/web/web/web/GPS_JSP/gps_report.jsp @@ -0,0 +1,167 @@ + +<%-- + Document : PACS_REPORT + Created on : Sep 17, 2015, 12:59:59 PM + Author : 454222 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.ArrayList" %> +<% try { +%> + + + + + + + + + + + + + + + + + PACS Report + + + + + +
+
+
+ PACS REPORT + +
+
+ + + <%if (request.getAttribute("error") != null) {%> + + <%}%> + + + + + + + + + + + + + + + + + + + + + + +
<%=request.getAttribute("error").toString()%>
From Date: To Date: Report Name:




+
+ + + + + +
+ + + + + + +
+
+
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/GPS_JSP/sellregister.jsp b/IPKS_Updated/web/web/web/GPS_JSP/sellregister.jsp new file mode 100644 index 0000000..b79ac15 --- /dev/null +++ b/IPKS_Updated/web/web/web/GPS_JSP/sellregister.jsp @@ -0,0 +1,254 @@ +<%-- + Document : sellregister + Created on : Jul 14, 2016, 5:03:36 PM + Author : Tcs Help desk122 +--%> + +<%@page import="DataEntryBean.GPSSellRegisterBean"%> +<%@page import="java.lang.String"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.sql.PreparedStatement"%> +<% try { +%> + + + + Sell Register + + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + Object gPSSellRegisterBeanObjObj = request.getAttribute("gPSSellRegisterBeanObj"); + + GPSSellRegisterBean gPSSellRegisterBeanObjApend = new GPSSellRegisterBean(); + if (gPSSellRegisterBeanObjObj != null) { + gPSSellRegisterBeanObjApend = (GPSSellRegisterBean) request.getAttribute("gPSSellRegisterBeanObj"); + } + + Object alGPSSellRegisterBeanObj = request.getAttribute("alGPSSellRegisterBean"); + ArrayList alGPSSellRegisterBean = new ArrayList(); + if (alGPSSellRegisterBeanObj != null) { + alGPSSellRegisterBean = (ArrayList) request.getAttribute("alGPSSellRegisterBean"); + } + GPSSellRegisterBean gPSSellRegisterBeanObj = new GPSSellRegisterBean(); + %> + + +
+
+ + + SALE REGISTER + + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + +

+ + + + +
Item Type:
Item Sub Type:
From Date:
To Date:




+ + + +
+
+ + + <% + if (displayFlag.equalsIgnoreCase("Y")) { + + %> + + +
+
+
+
+ + + + + + + + + + + + + + + + + + <% for (int i = 0; i < alGPSSellRegisterBean.size(); i++) { + gPSSellRegisterBeanObj = alGPSSellRegisterBean.get(i); + %> + + + + + + + + + + + + + <%}%> + +
Sell ToDelivered ToProcurement CodeQuantityPriceTotalExpenseSell Date
+
+
+

+ +
+ + + <% }%> + + + + +
+ + +
+ + +<% } catch (Exception e) { + + } +%> + diff --git a/IPKS_Updated/web/web/web/IdentificationDetails.jsp b/IPKS_Updated/web/web/web/IdentificationDetails.jsp new file mode 100644 index 0000000..13c5887 --- /dev/null +++ b/IPKS_Updated/web/web/web/IdentificationDetails.jsp @@ -0,0 +1,198 @@ +<%-- + Document : IdentificationDetails + Created on : Aug 3, 2015, 2:25:40 PM + Author : Administrator +--%> + + + + + Identification Details + + + + + + + + + + + + + + + + + + <%! + String blankNull(String s){ + return(s==null)?"":s; + } + %> + +
+ Identification +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Identification
CIF Details:*
First ID Type:
ID Issued at:
Remark:
First ID No:*ID Issue Date:
Second ID Type:
Second ID No:Relationship Manager:
Home Branch:Customer Evalution Rate:
Introducer:
Internet Banking Details
Request For INB: Email ID:
Email Address:
Internet Banking Ref:
Visa Details
Visa Details:
Vise Issued By:
Visa Issue Date: Visa Expiry Date:
Customer Risk
Domestic Risk:*
Country Risk:
Cross Border Risk:*
Customer Details
Segment Code: Locker Holder:
CIS Organisation Code: TFN Indicator:


+
+ + +
+ +
+

"*" fields are mandatory

+
+ + + diff --git a/IPKS_Updated/web/web/web/InsuranceAddition.jsp b/IPKS_Updated/web/web/web/InsuranceAddition.jsp new file mode 100644 index 0000000..d6350c4 --- /dev/null +++ b/IPKS_Updated/web/web/web/InsuranceAddition.jsp @@ -0,0 +1,251 @@ +<%-- + Document : InsuranceAddition + Created on : Mar 15, 2016, 3:46:48 PM + Author : Kaushik + --%> + + <%@page import="DataEntryBean.customerEnquiryBean"%> + <%@page import="java.sql.ResultSet"%> + + + + Insurance Addition + + + + <%-- --%> + + + + + + + + + + + + + + + + + +
+ + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + + +
+ Insurance Addtion +
+
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + + <%--
--%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Select Type of Operation*:
Customer CIF Number*: +
Customer Name:
Existing Insurance Number:
Existing Insuracne Issue Date:
Existing Insurance Company:
Existing Insurance Status:
Insurance Number*:
Insurance Issue Date*: 
Insurance Company*:
+ +
+             +
+ + +
+ +
+
+ + \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/KCCForceCapitalisation.jsp b/IPKS_Updated/web/web/web/KCCForceCapitalisation.jsp new file mode 100644 index 0000000..28b9b45 --- /dev/null +++ b/IPKS_Updated/web/web/web/KCCForceCapitalisation.jsp @@ -0,0 +1,204 @@ +<%-- + Document : KCCForceCapitalisation + Created on : April 5, 2019, 7:00:55 PM + Author : 1242938 +--%> + +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.UUID" %> + +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + KCC Force Capitalisation + + + + + + + + + + + + + + + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + + String error_msg = ""; + Object error = request.getAttribute("message1"); + if (error != null) { + error_msg = error.toString(); + + } + %> + +
+ KCC Force Capitalisation + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Account Number*:
Current Interest:      
Penal Interest:      
NPA Interest:      
Accural Interest:      
Forced Capitalisation*:      
+
+ + + + <%----%> +
+
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Loan/DepositKYCCreation.jsp b/IPKS_Updated/web/web/web/Loan/DepositKYCCreation.jsp new file mode 100644 index 0000000..9f2dbd3 --- /dev/null +++ b/IPKS_Updated/web/web/web/Loan/DepositKYCCreation.jsp @@ -0,0 +1,1202 @@ +<%-- + Document : kycCreation + Created on : Mar 18, 2016, 12:19:23 PM + Author : TCS +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.SQLException"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> + + +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Deposit KYC Creation + + + + + + + + + + + + + + + + + + + + <% + String ModuleName = new String(); + + ModuleName = (String) session.getAttribute("moduleName"); + %> + + <%if (ModuleName.equalsIgnoreCase("Deposit")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Loan")) {%> + + <%}%> +
+ + <% + int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + String sysDt = new String(); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select to_char(SYSTEM_DATE,'DD/MM/YYYY') from system_date"); + while (rs.next()) { + sysDt = rs.getString(1); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + } + %> + + +
+ CUSTOMER (KYC) DETAILS CREATION +
+ +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Select Photograph: + +
+
Select Signature: + +
+
Customer Type: + +
Title:* + +
First Name:*
Middle Name:
Last Name:*
Guardian Name/ Husband Name:
+ Address Line1:* + + + Block: + Address Line2: + + +
+ Address Line3:* + + +
District:*City/Town: State:
Date Of Birth: * + + <%----%> + Membership No: Farmer Type:*
Gender:*Religion:* + Caste:* +
Mobile Number: Email Id:
+

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ID TypeScore ID Number ID Issued AtID Issue DateID Scan Image
+ +
+
+
+
+ + + + + + + + + + + +
Total ID Score
+


+
+ + + + + + + + +
+
+
+ +
+ + + + + + + + + +
+ +
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Loan/ForceDebitCapitalisation.jsp b/IPKS_Updated/web/web/web/Loan/ForceDebitCapitalisation.jsp new file mode 100644 index 0000000..c592ed7 --- /dev/null +++ b/IPKS_Updated/web/web/web/Loan/ForceDebitCapitalisation.jsp @@ -0,0 +1,195 @@ +<%-- + Document : ForceDebitCapitalisation + Created on : March 8, 2019, 6:00:55 PM + Author : 1242938 +--%> + +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.UUID" %> + +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Force Debit Capitalisation + + + + + + + + + + + + + + + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + + String error_msg = ""; + Object error = request.getAttribute("message1"); + if (error != null) { + error_msg = error.toString(); + + } + %> + +
+ Force Debit Capitalisation + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
       Account Number*:
Current Interest:      
Penal Interest:      
NPA Interest:      
Accural Interest:      
Forced Capitalisation*:      
+
+ + + + <%----%> +
+
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Loan/LoanAccountCreation.jsp b/IPKS_Updated/web/web/web/Loan/LoanAccountCreation.jsp new file mode 100644 index 0000000..9d7adad --- /dev/null +++ b/IPKS_Updated/web/web/web/Loan/LoanAccountCreation.jsp @@ -0,0 +1,850 @@ +<%-- + Document : accountCreation + Created on : Mar 8, 2016, 1:20:58 PM + Author : Tcs Helpdesk10 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> + + + + + + Loan Account Creation + + + + + + + + + + + + + + + + + <% + int count = 0; + %> + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + +
+ Loan Account Creation + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Account Information :

Product Code*:
Intt Category*:
Segment Code*: + +
CIF Number*:
Customer Name:
Loan Application Amount*:
Loan Terms(Months)*:
Scheme Code*: + +
Purpose Code*: + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

Additional Information:

Activity Code*: + +
Customer Type*:

Interest Information:

Interest Rate*:
Penal Interest Rate*:
+ + + + +
+
+
+ + +
+
+
+ +
+ + + + + + + + + + + + + +
+
+ + diff --git a/IPKS_Updated/web/web/web/Loan/LoanAccountCreationReadOnly.jsp b/IPKS_Updated/web/web/web/Loan/LoanAccountCreationReadOnly.jsp new file mode 100644 index 0000000..8044be4 --- /dev/null +++ b/IPKS_Updated/web/web/web/Loan/LoanAccountCreationReadOnly.jsp @@ -0,0 +1,452 @@ +<%-- + Document : LoanAccountCreationReadOnly + Created on : Mar 8, 2016, 1:20:58 PM + Author : Tcs Helpdesk10 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.LoanAccountCreationBean"%> + + + + Loan Account Creation + + + + + + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + + <% + Object LoanAccountCreationBeanObj = request.getAttribute("oLoanAccountCreationBean"); + LoanAccountCreationBean oLoanAccountCreationBean = new LoanAccountCreationBean(); + + if (LoanAccountCreationBeanObj != null) { + oLoanAccountCreationBean = (LoanAccountCreationBean) request.getAttribute("oLoanAccountCreationBean"); + + } + %> + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <%! + String blankNullable(String s) { + return (s == null) ? "NA" : s; + } + %> + +
+ Loan ACCOUNT AUTHORIZATION + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%if (!blankNull(oLoanAccountCreationBean.getCollateralType()).equalsIgnoreCase("") ) {%> + + + + + + + <%if(oLoanAccountCreationBean.getProductCode().startsWith("7001")){%> + + <%} else if(oLoanAccountCreationBean.getProductCode().startsWith("7010")){%> + + <%}%> + + + + + + + + + + + + + + + + + <%}%> + + + + + + + + + + + + + + + + + + + + + + + + + <%if (!blankNull(oLoanAccountCreationBean.getGurantorName()).equalsIgnoreCase("")) {%> + + + + + + + + + + + + + + + + + + + + + + + + + + <%}%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Account Information :

Product Code :
Intt Category :
Segment Code : + +
CIF Number :
Customer Name :
Loan Application Amount :
Loan Terms(Months) :
Scheme Code : + +
Purpose Code : + +

Collateral Information :

Collateral Type : + + + +
Description :
Current Valuation (in Rs.):
Safe Lending Margin :%

Interest Information:

Interest Rate*:
Penal Interest Rate*:

Additional Information :

Activity Code : + +
Customer Type : + +

Guarantor Information :

Guarantor Name :
Guarantor Address :
Guarantor Date of Birth :
Guarantor Job : +
Guarantor Annual Income :
Sanctioned Amount :
Charges(if required) :
Relationship with Guarantor : + + +
Guarantor Id Type : + +
Guarantor ID NO : + + +
Authorizer's Comment: + +
+
+ + +
+
+
+ +
+ <%}%> + + + +
+
+ + diff --git a/IPKS_Updated/web/web/web/Loan/LoanDisbursement.jsp b/IPKS_Updated/web/web/web/Loan/LoanDisbursement.jsp new file mode 100644 index 0000000..cac9293 --- /dev/null +++ b/IPKS_Updated/web/web/web/Loan/LoanDisbursement.jsp @@ -0,0 +1,726 @@ +<%-- + Document : LoanDisbursement + Created on : Sep 21, 2016, 8:15:48 PM + Author : 590685 +--%> + +<%@page import="DataEntryBean.LoanDisbursementHdrBean"%> +<%@page import="DataEntryBean.LoanDisbursementDetailBean"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> + + + + + Loan Disbursement Schedule + + + + + + + + + + + + + + + + +
+ + <%int count = 1; + int count2 = 1; + int populatedRows = 0; + + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + <% + Object oLoanDisbursementHdrBeanObj = request.getAttribute("oLoanDisbursementHdrBeanObj"); + LoanDisbursementHdrBean oLoanDisbursementHdrBean = new LoanDisbursementHdrBean(); + if (oLoanDisbursementHdrBeanObj != null) { + oLoanDisbursementHdrBean = (LoanDisbursementHdrBean) request.getAttribute("oLoanDisbursementHdrBeanObj"); + } + %> + + <% + Object alLoanDisbursementDetailBeanObj = request.getAttribute("alLoanDisbursementDetailBean"); + ArrayList alLoanDisbursementDetailBean = new ArrayList(); + LoanDisbursementDetailBean oLoanDisbursementDetailBean = new LoanDisbursementDetailBean(); + if (alLoanDisbursementDetailBeanObj != null) { + alLoanDisbursementDetailBean = (ArrayList) request.getAttribute("alLoanDisbursementDetailBean"); + + } + %> + +
+ Loan Disbursement Schedule +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ <% if (displayFlag.equalsIgnoreCase("")) {%> + + +
+ + + + + + + + + +
Enter Loan Account*:
+
+ + +
+ + <%}%> +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + if (displayFlag.equalsIgnoreCase("Y")) { + %> +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Loan Account Number: CIF Number:
Customer Name: Product Description:
Loan Outstanding: Approved Amount:
Approved Date: Advance Amount:

+
+ + +

Disbursement Details

+ + <% if (alLoanDisbursementDetailBean.size() > 0) {%> + + + + + + + + + + + + + + <% + oLoanDisbursementDetailBean = new LoanDisbursementDetailBean(); + count = 0; + + for (int i = 0; i < alLoanDisbursementDetailBean.size(); i++) { + oLoanDisbursementDetailBean = alLoanDisbursementDetailBean.get(i); + + count++; + populatedRows++; + + + %> + + + + + + + + + + + + <%}%> + +
Disbursement Month(YYYYMM)Disbursement Amount Description Amount Remaining
+
+ + + + + + + + + + + +
Total Disbursement Amount
+ +

+
+ + + + + + + +
+
+ <%} else {%> + + + + + + + + + + + + + + + + + + + + +
Disbursement Month(YYYYMM)Disbursement Amount Description Amount Remaining
+ + +
+
+ + + + + + + + + + + +
Total Disbursement Amount
+ +

+
+ + + + + + + +
+
+ <%}%> +
+
+
+ + + + <% }%> + + + + + + + + +
+ +
+ + diff --git a/IPKS_Updated/web/web/web/Loan/LoanInquiry.jsp b/IPKS_Updated/web/web/web/Loan/LoanInquiry.jsp new file mode 100644 index 0000000..0fcfd24 --- /dev/null +++ b/IPKS_Updated/web/web/web/Loan/LoanInquiry.jsp @@ -0,0 +1,542 @@ +<%-- + Document : LoanInquiry + Created on : Oct 19, 2016, 3:11:52 PM + Author : 986137 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="java.util.Date"%> + + + + + + + + + Loan Account Enquiry + + + + + + + + + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + Object alEnquiryBeanObj = request.getAttribute("alEnquiryBean"); + ArrayList alEnquiryBean = new ArrayList(); + if (alEnquiryBeanObj != null) { + alEnquiryBean = (ArrayList) request.getAttribute("alEnquiryBean"); + } + %> + <% + String pacsId = (String) session.getAttribute("pacsId"); + Object oEnquiryBeanSearchObj = request.getAttribute("oEnquiryBeanSearchObj"); + EnquiryBean oEnquiryBean = new EnquiryBean(); + + if (oEnquiryBeanSearchObj != null) { + oEnquiryBean = (EnquiryBean) request.getAttribute("oEnquiryBeanSearchObj"); + session.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearchObj); + } + %> + + + <% + int flag2 = 1; + int curPage = 0; + try { + curPage = Integer.parseInt(request.getAttribute("currentPage").toString()); + } catch (Exception e) { + curPage = 1; + } + if (alEnquiryBean.size() > 0) { + flag2 = 2; + } + int totalRecordCount = 0; + int recordCount = 0; + + try { + totalRecordCount = Integer.parseInt(request.getAttribute("totalRecordCount").toString()); + recordCount = Integer.parseInt(request.getAttribute("recordCount").toString()); + } catch (Exception e) { + totalRecordCount = 0; + recordCount = 0; + } + totalRecordCount = totalRecordCount + alEnquiryBean.size(); + + %> + <%String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + %> + + +
+ Loan Account Enquiry +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Loan Account Number:      CIF Number:

From Date:      To Date:
Old A/C Number:     Old CIF Number:
Sub-PACS Name:

Product Name*: +

+

+ +
+ + +
+


+ + + + + + + "> + + + + "> + + +
+ + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <% + oEnquiryBean = null; + + for (int i = 0; i < alEnquiryBean.size(); i++) { + oEnquiryBean = alEnquiryBean.get(i); + %> + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + <%}%> + + +
Pacs IDAccount NumberCustomer NumberCustomer NameProduct NameInterest DescriptionAccount StatusInterest RatePenal Interest RateSanction AmountSanction DateAmount DisbursedEMI AmountPrincipal OutstandingInterest OutstandingPrincipal PaidInterest PaidTotal Interest OutstandingTotal Interest AccruedTotal Interest PaidNext Due DateLast Repayment DateOld Account NumberAccount Statement of The Day
<%=blankNull(oEnquiryBean.getPacs_id())%><%=blankNull(oEnquiryBean.getAccountNo())%><%=blankNull(oEnquiryBean.getCustomerNo())%><%=blankNull(oEnquiryBean.getCustomerName())%><%=blankNull(oEnquiryBean.getProduct_name())%><%=blankNull(oEnquiryBean.getIntt_cat_desc())%><%=blankNull(oEnquiryBean.getCurr_Status())%><%=blankNull(oEnquiryBean.getInttrate())%><%=blankNull(oEnquiryBean.getPenalIntt())%><%=blankNull(oEnquiryBean.getSanctionAmount())%><%=blankNull(oEnquiryBean.getSancDt())%><%=blankNull(oEnquiryBean.getAmntDsbrd())%><%=blankNull(oEnquiryBean.getEmi())%><%=blankNull(oEnquiryBean.getPrinOutstanding())%><%=blankNull(oEnquiryBean.getInttOutstanding())%><%=blankNull(oEnquiryBean.getPrinPaid())%><%=blankNull(oEnquiryBean.getInttPaid())%><%=blankNull(oEnquiryBean.getTotal_intt_outst())%><%=blankNull(oEnquiryBean.getTotal_intt_accr())%><%=blankNull(oEnquiryBean.getTotal_intt_paid())%><%=blankNull(oEnquiryBean.getNext_due_date())%><%=blankNull(oEnquiryBean.getLast_repay_date())%><%=blankNull(oEnquiryBean.getOldAccNo())%>
+


+ <%--For displaying Previous link except for the 1st page --%> + + + <% if (curPage > 1 && flag2 == 2) {%> +
+ <% }%> + <% if (flag2 == 2) {%> + + <% if (curPage == 1) {%> + + <% } + }%> + +


+ + + +
+
+ <%}%> +
+ + diff --git a/IPKS_Updated/web/web/web/Loan/LoanModify.jsp b/IPKS_Updated/web/web/web/Loan/LoanModify.jsp new file mode 100644 index 0000000..6038d35 --- /dev/null +++ b/IPKS_Updated/web/web/web/Loan/LoanModify.jsp @@ -0,0 +1,247 @@ +<%-- + Document : LoanModify + Created on : Oct 19, 2016, 3:11:52 PM + Author : 986137 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="java.util.Date"%> + + + + + + + + + Modify Interest Rate + + + + + + + + + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String error_msg = ""; + String acc_no = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + + error = request.getAttribute("acc_no"); + if (error != null) { + acc_no = error.toString(); + } + %> + + + + +
+ Modify Interest Rate For Active Loan Accounts +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ + <%if (!(displayFlag.equalsIgnoreCase("Y"))) {%> +
+
+ + + + + + + +
Loan Account Number*: " style="text-align:right;" onkeypress='return event.charCode >= 48 && event.charCode <= 57' />     
+
+ +


+ <%}%> + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Loan Account Number: " style="text-align:right;" readonly/>     
Active Interest Rate: " style="text-align:right;" readonly/>     
Set New Interest Rate as*:      
Active Penal Interest Rate: " style="text-align:right;" readonly/>     
Set New Penal Interest Rate as*:      

*marked fields are mandatory.
+
+
+ <%}%> +
+ + + +
+
+
+ + diff --git a/IPKS_Updated/web/web/web/Loan/LoanPrincipalAdjustment.jsp b/IPKS_Updated/web/web/web/Loan/LoanPrincipalAdjustment.jsp new file mode 100644 index 0000000..b211662 --- /dev/null +++ b/IPKS_Updated/web/web/web/Loan/LoanPrincipalAdjustment.jsp @@ -0,0 +1,292 @@ +<%-- + Document : Loan Principal Adjustment + Created on : Aug 29, 2019, 6:00:55 PM + Author : 1242938 +--%> + +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.UUID" %> + +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Loan Principal Adjustment + + + + + + + + + + + + + + + + <% + String ModuleName = new String(); + ModuleName = (String) session.getAttribute("moduleName"); + %> + + <%if (ModuleName.equalsIgnoreCase("KCC")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Loan")) {%> + + <%}%> +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + + String error_msg = ""; + Object error = request.getAttribute("message1"); + if (error != null) { + error_msg = error.toString(); + + } + %> + +
+ Loan Principal Adjustment + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Account Number*:      
Current Principal:      
New Principal*:      
Reconciliation BGL Account Number*:      
Narration*:      
+

+ + + + +
+
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Loan/LoanProductCreation.jsp b/IPKS_Updated/web/web/web/Loan/LoanProductCreation.jsp new file mode 100644 index 0000000..6b3bad0 --- /dev/null +++ b/IPKS_Updated/web/web/web/Loan/LoanProductCreation.jsp @@ -0,0 +1,1666 @@ +<%-- + Document : LoanProductCreation + Created on : Sep 19, 2016, 8:03:41 PM + Author : 986137 +--%> + +<%@page import="DataEntryBean.LoanProductCreationBean" %> +<%@page import="java.sql.SQLException"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> + + + + + Loan Product Creation + + + + + + + + + + + + + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object LoanProductCreationBeanobj = request.getAttribute("oLoanProductCreationBeanObj"); + LoanProductCreationBean oLoanProductCreationBean = new LoanProductCreationBean(); + if (LoanProductCreationBeanobj != null) { + oLoanProductCreationBean = (LoanProductCreationBean) request.getAttribute("oLoanProductCreationBeanObj"); + + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + +
+ LOAN PRODUCT OPERATION + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ +
Operation Selection + +
+
+ + + + + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Product Name:
Product Description:
Product Code:
INTT Category:
INTCAT Description:
Segment Code: +
GL Code: + +
Interest Receivable GL Code: + <% String InttPAYABLE_Amend = ""; + String InttPAYABLE_AmendID = ""; + Connection connection1 = null; + ResultSet rs1 = null; + Statement statement1 = null; + connection1 = DbHandler.getDBConnection(); + try { + statement1 = connection1.createStatement(); + rs1 = statement1.executeQuery("select distinct(gl_code) as gl_code,gl_name,id from gl_product where id='" + oLoanProductCreationBean.getGlCodeInttReceivable() + "'"); + while (rs1.next()) { + InttPAYABLE_Amend = rs1.getString("gl_code") + ":" + rs1.getString("gl_name"); + InttPAYABLE_AmendID = rs1.getString("id"); + } + + // statement1.close(); + // connection1.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement1 !=null) + statement1.close(); + if (connection1 != null) + connection1.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + %> + + + + + +
Interest Received GL Code: + <% String glCodeInttPAID_AmendShow = ""; + String glCodeInttPAID_Amend = ""; + Connection connection2 = null; + ResultSet rs2 = null; + Statement statement2 = null; + connection2 = DbHandler.getDBConnection(); + try { + statement2 = connection2.createStatement(); + rs2 = statement2.executeQuery("select distinct(gl_code) as gl_code,gl_name,id from gl_product where id='" + oLoanProductCreationBean.getGlCodeInttReceived() + "'"); + while (rs2.next()) { + glCodeInttPAID_AmendShow = rs2.getString("gl_code") + ":" + rs2.getString("gl_name"); + glCodeInttPAID_Amend = rs2.getString("id"); + } + + // statement2.close(); + // connection2.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement2 !=null) + statement2.close(); + if (connection2 != null) + connection2.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + %> + + + + + +
Debit Comp1:
Debit Comp2:
Status: +
INTT Rate:
INTT Method: + +
INTT Frequency: + +
INTT Capitalization Frequency: + +
Penalty Interest Rate:
Penalty Interest Method: + +
Penalty Interest Frequency: + +
MIN Disbursement:
MAX Disbursement:
MIN Repayment:
MAX Repayment:
Repayment Frequency: + +
MIN Term:
MAX Term:
MIN Sanctioned Amount:
MAX Sanctioned Amount:
Effect Date :
Penalty Grace Period(days):
Guarantor Required: +
Security Required: +
Loan Type: +
Head of A/c Type: +
+

+
+ +
+ +
+

All fields are mandatory

+
+ <%}%> + + + + +
+
+ + + diff --git a/IPKS_Updated/web/web/web/Loan/LoanRepayment.jsp b/IPKS_Updated/web/web/web/Loan/LoanRepayment.jsp new file mode 100644 index 0000000..ca4f1b5 --- /dev/null +++ b/IPKS_Updated/web/web/web/Loan/LoanRepayment.jsp @@ -0,0 +1,521 @@ +<%-- + Document : LoanRepayment + Created on : Sep 22, 2016, 1:03:06 PM + Author : 986137 +--%> + +<%@page import="DataEntryBean.LoanRepaymentScheduleBean"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> + + + + + Loan Repayment Schedule + + + + + + + + + + + + + + + + +
+ + <% + int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + <% + String displayFlag1 = ""; + Object display1 = request.getAttribute("displayFlag1"); + if (display1 != null) { + displayFlag1 = display1.toString(); + } + %> + + <% + Object alLoanRepaymentScheduleBeanObj = request.getAttribute("alLoanRepaymentScheduleBean"); + Object oLoanRepaymentScheduleBeanObj = request.getAttribute("oLoanRepaymentScheduleBean"); + ArrayList alLoanRepaymentScheduleBean = new ArrayList(); + LoanRepaymentScheduleBean oLoanRepaymentScheduleBean = new LoanRepaymentScheduleBean(); + if (alLoanRepaymentScheduleBeanObj != null) { + alLoanRepaymentScheduleBean = (ArrayList) request.getAttribute("alLoanRepaymentScheduleBean"); + + } + + if (oLoanRepaymentScheduleBeanObj != null) { + oLoanRepaymentScheduleBean = (LoanRepaymentScheduleBean) request.getAttribute("oLoanRepaymentScheduleBean"); + + } + + session.setAttribute("oLoanRepaymentScheduleBean", oLoanRepaymentScheduleBean); + %> + + <% + Object oLoanRepaymentScheduleBeanObj1 = request.getAttribute("oLoanRepaymentScheduleBean1"); + LoanRepaymentScheduleBean oLoanRepaymentScheduleBean1 = new LoanRepaymentScheduleBean(); + + + if (oLoanRepaymentScheduleBeanObj1 != null) { + oLoanRepaymentScheduleBean1 = (LoanRepaymentScheduleBean) request.getAttribute("oLoanRepaymentScheduleBean1"); + + } + + session.setAttribute("oLoanRepaymentScheduleBean1", oLoanRepaymentScheduleBean1); + %> + + <% + int flag2 = 1; + int curPage = 0; + try { + curPage = Integer.parseInt(request.getAttribute("currentPage").toString()); + } catch (Exception e) { + curPage = 1; + } + if (alLoanRepaymentScheduleBean.size() > 0) { + flag2 = 2; + } + int totalRecordCount = 0; + int recordCount = 0; + + try { + totalRecordCount = Integer.parseInt(request.getAttribute("totalRecordCount").toString()); + recordCount = Integer.parseInt(request.getAttribute("recordCount").toString()); + } catch (Exception e) { + totalRecordCount = 0; + recordCount = 0; + } + totalRecordCount = totalRecordCount + alLoanRepaymentScheduleBean.size(); + + %> + +
+ Loan Repayment Schedule +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ + +
+ + + + + + + + + +
Enter Loan Account*: +
Enter Repayment YYYYMM:
+
+ + + + +
+
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + if (displayFlag1.equalsIgnoreCase("Y")) { + %> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Loan Account Number:CIF Number:
Customer Name: Product Description:
Loan Outstanding: Approved Amount:
Approved Date: Loan Category:
Loan Term: Due Date:

+ <% + } + if (displayFlag.equalsIgnoreCase("Y")) { + %> + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + <% + oLoanRepaymentScheduleBean = new LoanRepaymentScheduleBean(); + count = 0; + + for (int i = 0; i < alLoanRepaymentScheduleBean.size(); i++) { + oLoanRepaymentScheduleBean = alLoanRepaymentScheduleBean.get(i); + + count++; + + %> + + + + + + + + + + + + + + + + + + <%}%> + +
Install
Number
Repayment
Month(YYYYMM)
EMI
Amount
Pricipal
Amount
Interest
Amount
Pricipal
Outstanding
Opening
Principal
Closing
Principal
<%=blankNull(oLoanRepaymentScheduleBean.getInstallNo())%><%=blankNull(oLoanRepaymentScheduleBean.getRepYYYYMM())%><%=blankNull(oLoanRepaymentScheduleBean.getEmiAmt())%><%=blankNull(oLoanRepaymentScheduleBean.getPrincAmt())%><%=blankNull(oLoanRepaymentScheduleBean.getInttAmt())%><%=blankNull(oLoanRepaymentScheduleBean.getPrincOutStd())%><%=blankNull(oLoanRepaymentScheduleBean.getOpenBal())%><%=blankNull(oLoanRepaymentScheduleBean.getCloseBal())%>


+ + <%--For displaying Previous link except for the 1st page --%> + + + <% if (curPage > 1 && flag2 == 2) {%> +
+ <% }%> + <% if (flag2 == 2) {%> + + <% if (curPage == 1) {%> + + <% } + }%> +


+ +
+
+ <%} else if (displayFlag.equalsIgnoreCase("N")) {%> + +

Repayment Schedule has not Generated yet.

+ <%}%> + + + + + + "> + + + + "> + + +
+
+
+ + + + +
+ +
+ + + diff --git a/IPKS_Updated/web/web/web/Loan/LoanTransactionEnquiry.jsp b/IPKS_Updated/web/web/web/Loan/LoanTransactionEnquiry.jsp new file mode 100644 index 0000000..4769c67 --- /dev/null +++ b/IPKS_Updated/web/web/web/Loan/LoanTransactionEnquiry.jsp @@ -0,0 +1,474 @@ +<%-- + Document : LoanTransactionEnquiry + Created on : Sep 13, 2016, 2:23:35 PM + Author : +--%> +<%@page import="DataEntryBean.TransactionEnquiryBean"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + + + + + + + + Loan Transaction Enquiry + + + + + + + + + + + + + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <% + String pacsId = (String) session.getAttribute("pacsId"); + Object alTransactionEnquiryBeanObj = request.getAttribute("alTransactionEnquiryBean"); + ArrayList alTransactionEnquiryBean = new ArrayList(); + if (alTransactionEnquiryBeanObj != null) { + alTransactionEnquiryBean = (ArrayList) request.getAttribute("alTransactionEnquiryBean"); + + } + %> + <% + Object oTransactionEnquiryBeanobj = request.getAttribute("oTransactionEnquiryBeanSearchObj"); + TransactionEnquiryBean oTransactionEnquiryBean = new TransactionEnquiryBean(); + if (oTransactionEnquiryBeanobj != null) { + oTransactionEnquiryBean = (TransactionEnquiryBean) request.getAttribute("oTransactionEnquiryBeanSearchObj"); + session.setAttribute("oTransactionEnquiryBeanSearchObj", oTransactionEnquiryBeanobj); + + } + %> + + + <% + int flag2 = 1; + int curPage = 0; + try { + curPage = Integer.parseInt(request.getAttribute("currentPage").toString()); + } catch (Exception e) { + curPage = 1; + } + if (alTransactionEnquiryBean.size() > 0) { + flag2 = 2; + } + int totalRecordCount = 0; + int recordCount = 0; + + try { + totalRecordCount = Integer.parseInt(request.getAttribute("totalRecordCount").toString()); + recordCount = Integer.parseInt(request.getAttribute("recordCount").toString()); + } catch (Exception e) { + totalRecordCount = 0; + recordCount = 0; + } + totalRecordCount = totalRecordCount + alTransactionEnquiryBean.size(); + + %> + <%String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + %> + + +
+ Loan Transaction Enquiry +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ + +
+
+ + + + + + <%-- + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Account Number*:      Product Name: +

From Date*:      To Date*:

From Amount:     To Amount:

Transaction Reference Number:     Sub-PACS Name:

+ +
+
+ + +
+


+ + + + + "> + + + + "> + +
+ + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+ + + + + + + + + + + + + + + + + <% + for (int i = 0; i < alTransactionEnquiryBean.size(); i++) { + oTransactionEnquiryBean = alTransactionEnquiryBean.get(i); + %> + + + + + + + + + + + + + + + + + <%}%> + +
Account No.Reference No.Product NameInterest DescriptionTransaction DateTransaction TypeTransaction AmountEnd BalanceNarration
<%=blankNull(oTransactionEnquiryBean.getAccountNo())%><%=blankNull(oTransactionEnquiryBean.getCbs_Ref_No())%><%=blankNull(oTransactionEnquiryBean.getProductNameDisplay())%><%=blankNull(oTransactionEnquiryBean.getInttCatDesc())%><%=blankNull(oTransactionEnquiryBean.getTransactionDate())%><%=blankNull(oTransactionEnquiryBean.getTransactionType())%><%=blankNull(oTransactionEnquiryBean.getTransactionAmount())%><%=blankNull(oTransactionEnquiryBean.getAvailableBalance())%><%=blankNull(oTransactionEnquiryBean.getNarration())%>


+ + <%--For displaying Previous link except for the 1st page --%> + + + <% if (curPage > 1 && flag2 == 2) {%> +
+ <% }%> + <% if (flag2 == 2) {%> + + <% if (curPage == 1) {%> + + <% } + }%> + +


+ + +
+
+ <%}%> +
+ + +<% } catch (Exception e) { + + } +%> + + + + + diff --git a/IPKS_Updated/web/web/web/Loan/LoanTransactionOperation.jsp b/IPKS_Updated/web/web/web/Loan/LoanTransactionOperation.jsp new file mode 100644 index 0000000..b0df9fc --- /dev/null +++ b/IPKS_Updated/web/web/web/Loan/LoanTransactionOperation.jsp @@ -0,0 +1,1147 @@ +<%-- + Document : LoanTransactionOperation + Created on : Sep 23, 2016, 3:56:20 PM + Author : 986137 +--%> + +<%@page import="DataEntryBean.transactionOperationBean"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<% try { +%> + + + Loan Disbursement Operation + + + + + + + + + + + + <%-- --%> + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + <% String odeno2000 = ""; + String odeno500 = ""; + String odeno200 = ""; + String odeno100 = ""; + String odeno50 = ""; + String odeno20 = ""; + String odeno10 = ""; + String odeno5 = ""; + String odeno2 = ""; + String odeno1 = ""; + String status = "C"; + String odeno50P = ""; + String odeno1P = ""; + String pacsid = (String) session.getAttribute("pacsId"); + String makerId = session.getAttribute("user").toString(); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select nvl(d.deno_2000,0),nvl(d.deno_500,0),nvl(d.deno_100,0),nvl(d.deno_50,0),nvl(d.deno_20,0),nvl(d.deno_10,0),nvl(d.deno_5,0),nvl(d.deno_2,0),nvl(d.deno_1,0),nvl(d.DENO_50P,0),nvl(d.DENO_1P,0),d.status,nvl(d.deno_200,0) from cash_drawer d where d.entry_date = (select system_date from system_date) and d.teller_id ='" + makerId + "' and d.pacs_id ='" + pacsid + "' "); + + while (rs.next()) { + odeno2000 = rs.getString(1); + odeno500 = rs.getString(2); + odeno100 = rs.getString(3); + odeno50 = rs.getString(4); + odeno20 = rs.getString(5); + odeno10 = rs.getString(6); + odeno5 = rs.getString(7); + odeno2 = rs.getString(8); + odeno1 = rs.getString(9); + odeno50P = rs.getString(10); + odeno1P = rs.getString(11); + status = rs.getString(12); + odeno200 = rs.getString(13); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + %> + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object otransactionOperationBeanObj = request.getAttribute("otransactionOperationBeanObj"); + transactionOperationBean otransactionOperationBean = new transactionOperationBean(); + if (otransactionOperationBeanObj != null) { + otransactionOperationBean = (transactionOperationBean) request.getAttribute("otransactionOperationBeanObj"); + session.setAttribute("otransactionOperationBeanObj", otransactionOperationBeanObj); + } + %> + +
+ Loan Disbursement Operation +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DenominationsAvailableINOUT
+
+
+ +
+
+ +
+ + + <%-- + + + --%> + + + + + + + + + + + + + + + + + + + <%-- + --%> + + + + + + + + + + + + + + +
Select Transaction Type: +
Account Number*:
Payment Mode*: +
Transaction Amount*:
Transaction Amount:
Charges to be deducted*:
Transaction Narration*:


+
+ + + +
+
+ + + + + + +
+
+ + + + + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Loan/Loan_Report.jsp b/IPKS_Updated/web/web/web/Loan/Loan_Report.jsp new file mode 100644 index 0000000..e6586c7 --- /dev/null +++ b/IPKS_Updated/web/web/web/Loan/Loan_Report.jsp @@ -0,0 +1,502 @@ +<%-- + Document : Loan_Report + Created on : Jul 28, 2016, 9:18:24 PM + Author : 986137 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="java.util.Date"%> +<%@page import="java.util.ArrayList" %> +<%@page import="java.lang.String" %> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.ArrayList" %> +<% try { +%> + + + + + + + + + + + + + + + + + Loan Report + + + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankNA(String s) { + return (s == null) ? "NA" : s; + } + %> + <% + String pacsId = (String) session.getAttribute("pacsId"); + String userRole = (String) session.getAttribute("userRole"); + Object oEnquiryBeanSearchObj = request.getAttribute("oEnquiryBeanSearchObj"); + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + if (oEnquiryBeanSearchObj != null) { + oEnquiryBean = (EnquiryBean) request.getAttribute("oEnquiryBeanSearchObj"); + session.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearchObj); + } + %> + <%String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + %> +
+
+ Loan Report + +
+
+ + + <%if (request.getAttribute("error") != null) {%> + + <%}%> + + + + + + + + + + + + + + + + + + + + + + + +
<%=request.getAttribute("error").toString()%>
From Date:
To Date:
Report Name *:
Sub-PACS Name:




+ +
+ + +
+ + + + + + +
+
+
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Loan/MenuHead_Loan.jsp b/IPKS_Updated/web/web/web/Loan/MenuHead_Loan.jsp new file mode 100644 index 0000000..420bc40 --- /dev/null +++ b/IPKS_Updated/web/web/web/Loan/MenuHead_Loan.jsp @@ -0,0 +1,235 @@ +<%-- + Document : MenuHead_Loan + Created on : Sep 19, 2016, 8:00:29 PM + Author : 590685 +--%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.*"%> + + +<% try { +%> +<% + String userName = new String(); + String pacsName = new String(); + String userRole = new String(); + String RoleName = new String(); + String sysDt = new String(); + + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select to_char(SYSTEM_DATE,'Month DD, YYYY') from system_date"); + while (rs.next()) { + sysDt = rs.getString(1); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + + userName = (String) session.getAttribute("UserName"); + userName = userName.toUpperCase(); + pacsName = (String) session.getAttribute("pacsName"); + userRole = (String) session.getAttribute("userRole"); + RoleName = (String) session.getAttribute("RoleName"); + + +String moduleName = new String(); + moduleName = (String) session.getAttribute("moduleName"); + + +%> + +
+ +
+ Image - PACS +
+ + +
+
User Name:
<%=userName%>
+
Date:
<%=sysDt%>
+
PACS Name:
<%=pacsName%>
+ +
User Type:
<%=RoleName%>
+
Module Name:
<%=moduleName.toUpperCase()%>
+ +
+ + +
+ +
+ +<% } catch (Exception e) { + System.out.println("EX in " + e); + } +%> + diff --git a/IPKS_Updated/web/web/web/Loan/RemoveLien.jsp b/IPKS_Updated/web/web/web/Loan/RemoveLien.jsp new file mode 100644 index 0000000..accfb5d --- /dev/null +++ b/IPKS_Updated/web/web/web/Loan/RemoveLien.jsp @@ -0,0 +1,411 @@ +<%-- + Document : RemoveLien + Created on : Dec 29, 2021, 6:00:55 PM + Author : 1242938 +--%> + +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.UUID" %> +<%@page import="DataEntryBean.LoanAccountCreationBean"%> + +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Remove Lien + + + + + + + + + + + + + + + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + + } + %> + <% + Object LoanAccountCreationBeanObj = request.getAttribute("oLoanAccountCreationBean"); + LoanAccountCreationBean oLoanAccountCreationBean = new LoanAccountCreationBean(); + + if (LoanAccountCreationBeanObj != null) { + oLoanAccountCreationBean = (LoanAccountCreationBean) request.getAttribute("oLoanAccountCreationBean"); + + } + %> + +
+ Remove Lien + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Select Lien Type*:
+ +
Loan Account*: +
CIF Number:
Deposit Account*: +
Description*:
Comments*:
+
+
+ + +
+ + + + + + + + + +
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Loan/RepayLoan.jsp b/IPKS_Updated/web/web/web/Loan/RepayLoan.jsp new file mode 100644 index 0000000..d2a1a7a --- /dev/null +++ b/IPKS_Updated/web/web/web/Loan/RepayLoan.jsp @@ -0,0 +1,1200 @@ +<%-- + Document : RepayLoan + Created on : Dec 21, 2016, 4:06:13 PM + Author : 986137 +--%> + +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.UUID" %> + +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + Loan Repayment + + + + + + + + + + + + + + + + + + + + +
+ <% String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + <% String odeno2000 = ""; + String odeno500 = ""; + String odeno200 = ""; + String odeno100 = ""; + String odeno50 = ""; + String odeno20 = ""; + String odeno10 = ""; + String odeno5 = ""; + String odeno2 = ""; + String odeno1 = ""; + String odeno50P = ""; + String odeno1P = ""; + String status = "C"; + String pacsid = (String) session.getAttribute("pacsId"); + String makerId = session.getAttribute("user").toString(); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select nvl(d.deno_2000,0),nvl(d.deno_500,0),nvl(d.deno_100,0),nvl(d.deno_50,0),nvl(d.deno_20,0),nvl(d.deno_10,0),nvl(d.deno_5,0),nvl(d.deno_2,0),nvl(d.deno_1,0),nvl(d.DENO_50P,0),nvl(d.DENO_1P,0),d.status,nvl(d.deno_200,0) from cash_drawer d where d.entry_date = (select system_date from system_date) and d.teller_id ='" + makerId + "' and d.pacs_id ='" + pacsid + "' "); + + while (rs.next()) { + odeno2000 = rs.getString(1); + odeno500 = rs.getString(2); + odeno100 = rs.getString(3); + odeno50 = rs.getString(4); + odeno20 = rs.getString(5); + odeno10 = rs.getString(6); + odeno5 = rs.getString(7); + odeno2 = rs.getString(8); + odeno1 = rs.getString(9); + odeno50P = rs.getString(10); + odeno1P = rs.getString(11); + status = rs.getString(12); + odeno200 = rs.getString(13); + + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + %> + +
+ Loan Repayment +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DenominationsAvailableINOUT
+
+
+ +
+ +
+ + + + +
Repay Type*:
Enter Loan Account*:
+ +
+ + + +
+ + + +
+ +
+ + + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Loan/amendInterest.jsp b/IPKS_Updated/web/web/web/Loan/amendInterest.jsp new file mode 100644 index 0000000..bc9dd4b --- /dev/null +++ b/IPKS_Updated/web/web/web/Loan/amendInterest.jsp @@ -0,0 +1,237 @@ +<%-- + Document : amendInterest + Created on : Feb 8, 2019, 6:00:55 PM + Author : 1242938 +--%> + +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.UUID" %> + +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Interest Amendmend + + + + + + + + + + + + + + + <% + String ModuleName = new String(); + ModuleName = (String) session.getAttribute("moduleName"); + %> + + <%if (ModuleName.equalsIgnoreCase("KCC")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Loan")) {%> + + <%}%> +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + + String error_msg = ""; + Object error = request.getAttribute("message1"); + if (error != null) { + error_msg = error.toString(); + + } + %> + +
+ Interest Amendmend + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Account Number*:
Current Interest*:      
Penal Interest*:      
NPA Interest*:      
Total Interest:      
+
+ + + + +
+
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Loan/mark_unmark_npa_loan.jsp b/IPKS_Updated/web/web/web/Loan/mark_unmark_npa_loan.jsp new file mode 100644 index 0000000..f54574e --- /dev/null +++ b/IPKS_Updated/web/web/web/Loan/mark_unmark_npa_loan.jsp @@ -0,0 +1,152 @@ +<%-- + Document : mark_unmark_NPA_Operations + Created on : Mar 22, 2016, 12:37:45 PM + Author : Shubhrangshu +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + Mark/Unmark NPA + + + + + + + + + + + + + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + +
+
+ Mark/Unmark As Npa Operation + +
+ <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Enter Account Number*:

Mark Account As*:

+
+
+
+ + + diff --git a/IPKS_Updated/web/web/web/Loan/popupGoldLoanDetails.jsp b/IPKS_Updated/web/web/web/Loan/popupGoldLoanDetails.jsp new file mode 100644 index 0000000..1b2499c --- /dev/null +++ b/IPKS_Updated/web/web/web/Loan/popupGoldLoanDetails.jsp @@ -0,0 +1,212 @@ +<%-- + Document : popupGoldLoanDetails + Created on : Dec 21, 2021, 4:45:36 PM + Author : 1242938 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + + Fill-up Gold Details + + + + + + + + + + + + + + + <% + int count = 1; + %> +
+
+ + + + + + + + + + + + + + + + + + + +
Bond NoGross WeightNet Weight
+ + + + + + + +
+
+ + + + +
+ + + diff --git a/IPKS_Updated/web/web/web/Loan/popupnscdetails.jsp b/IPKS_Updated/web/web/web/Loan/popupnscdetails.jsp new file mode 100644 index 0000000..24b9397 --- /dev/null +++ b/IPKS_Updated/web/web/web/Loan/popupnscdetails.jsp @@ -0,0 +1,242 @@ +<%-- + Document : popupnscdetails + Created on : Nov 8, 2018, 4:45:36 PM + Author : 1004242 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + + Fill-up NSC Details + + + + + + + + + + + + + + + <% + int count = 1; + %> +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
REF NoAmountOpen DateExpiry Date
+ + + + + + + +
+
+ + + + +
+ + + diff --git a/IPKS_Updated/web/web/web/Login.jsp b/IPKS_Updated/web/web/web/Login.jsp new file mode 100644 index 0000000..98334c5 --- /dev/null +++ b/IPKS_Updated/web/web/web/Login.jsp @@ -0,0 +1,736 @@ +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + +<% try { +%> + + + + + + + + + + + + + + + + Integrated PACS Kisan Solution + + + + + + + <% + String changePasswordFlag = null; // initializatoin changed to null for SAST + Object display = request.getAttribute("changePasswordFlag"); + if (display != null) { + changePasswordFlag = display.toString(); + } + %> + + <% String otp_flag = (String) request.getAttribute("otp_flag"); + //otp_flag = "valid"; + %> + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("error"); + if (error != null) { + error_msg = error.toString(); + } + %> + + + + + + + + +
+
+ +

Integrated
PACS Kisan
Solution
(IPKS)

+
+ +
+ + <%if (otp_flag == null) {%> +
+

Sign In

+
+ <%} else {%> +
+

+

Enter OTP

+
+ <%}%> + + + + <%if (otp_flag == null) {%> +
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+ <%= error_msg%> +
+
+ + +
+
+ + <%} else {%> +
+ +
+ +
+
+ <%= error_msg%> +
+
+ + +
+
+ +

You can resend OTP after 60 seconds.

+ + <%}%> + +
+
+ + + + + + + + + + + + + + + + + + + + + + +<% } catch (Exception e) { + System.out.println("EX in " + e); + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/META-INF/context.xml b/IPKS_Updated/web/web/web/META-INF/context.xml new file mode 100644 index 0000000..9ef4b26 --- /dev/null +++ b/IPKS_Updated/web/web/web/META-INF/context.xml @@ -0,0 +1,2 @@ + + diff --git a/IPKS_Updated/web/web/web/MenuHead.jsp b/IPKS_Updated/web/web/web/MenuHead.jsp new file mode 100644 index 0000000..399802f --- /dev/null +++ b/IPKS_Updated/web/web/web/MenuHead.jsp @@ -0,0 +1,278 @@ +<%-- + Document : MenuHead + Created on : Apr 20, 2016, 3:19:56 PM + Author : 590685 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.*"%> + + +<% + + String pacsName = new String(); + String userRole = new String(); + String RoleName = new String(); + String sysDt = new String(); + String userName = new String(); + + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select to_char(SYSTEM_DATE,'Month DD, YYYY') from system_date"); + while (rs.next()) { + sysDt = rs.getString(1); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if (statement != null) { + statement.close(); + } + if (connection != null) { + connection.close(); + } + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + userName = (String) session.getAttribute("UserName"); + userName = userName.toUpperCase(); + pacsName = (String) session.getAttribute("pacsName"); + userRole = (String) session.getAttribute("userRole"); + RoleName = (String) session.getAttribute("RoleName"); + + String moduleName = new String(); + moduleName = (String) session.getAttribute("moduleName"); + + +%> + +
+ +
+ Image - PACS +
+ +
+
User Name:
<%=userName%>
+
Date:
<%=sysDt%>
+
PACS Name/ Bank Name:
<%=pacsName%>
+ +
User Type:
<%=RoleName%>
+
Module Name:
<%=moduleName.toUpperCase()%>
+ +
+
+ + + +
diff --git a/IPKS_Updated/web/web/web/MenuHead_DASHBOARD.jsp b/IPKS_Updated/web/web/web/MenuHead_DASHBOARD.jsp new file mode 100644 index 0000000..ea9cb09 --- /dev/null +++ b/IPKS_Updated/web/web/web/MenuHead_DASHBOARD.jsp @@ -0,0 +1,116 @@ +<%-- + Document : MenuHead_DASHBOARD + Created on : Apr 20, 2016, 3:19:56 PM + Author : 590685 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.*"%> + + +<% + String userName = new String(); + String pacsName = new String(); + String userRole = new String(); + String RoleName = new String(); + String sysDt = new String(); + + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select to_char(SYSTEM_DATE,'Month DD, YYYY') from system_date"); + while (rs.next()) { + sysDt = rs.getString(1); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + + userName = (String) session.getAttribute("UserName"); + userName = userName.toUpperCase(); + pacsName = (String) session.getAttribute("pacsName"); + userRole = (String) session.getAttribute("userRole"); + RoleName = (String) session.getAttribute("RoleName"); + + +String moduleName = new String(); + moduleName = (String) session.getAttribute("moduleName"); + + +%> + +
+ +
+ Image - PACS +
+ + +
+
User Name:
<%=userName%>
+
Date:
<%=sysDt%>
+
PACS Name:
<%=pacsName%>
+ +
User Type:
<%=RoleName%>
+
Module Name:
<%=moduleName.toUpperCase()%>
+ +
+ + +
+ +
+ diff --git a/IPKS_Updated/web/web/web/MenuHead_EOD.jsp b/IPKS_Updated/web/web/web/MenuHead_EOD.jsp new file mode 100644 index 0000000..b2a5135 --- /dev/null +++ b/IPKS_Updated/web/web/web/MenuHead_EOD.jsp @@ -0,0 +1,118 @@ + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.*"%> + + +<% + String userName = new String(); + String pacsName = new String(); + String userRole = new String(); + String RoleName = new String(); + String sysDt = new String(); + + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select to_char(SYSTEM_DATE,'Month DD, YYYY') from system_date"); + while (rs.next()) { + sysDt = rs.getString(1); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + + userName = (String) session.getAttribute("UserName"); + userName = userName.toUpperCase(); + pacsName = (String) session.getAttribute("pacsName"); + userRole = (String) session.getAttribute("userRole"); + RoleName = (String) session.getAttribute("RoleName"); + +String moduleName = new String(); + moduleName = (String) session.getAttribute("moduleName"); + + +%> + +
+ +
+ Image - PACS +
+ +
+
User Name: <%=userName%>
+
Date: <%=sysDt%>
+
PACS Name: <%=pacsName%>
+ +
User Type: <%=RoleName%>
+
Module Name: <%=moduleName.toUpperCase()%>
+ +
+ + + +
+ diff --git a/IPKS_Updated/web/web/web/ModifyAccount.jsp b/IPKS_Updated/web/web/web/ModifyAccount.jsp new file mode 100644 index 0000000..5e38d4f --- /dev/null +++ b/IPKS_Updated/web/web/web/ModifyAccount.jsp @@ -0,0 +1,349 @@ +<%-- + Document : ModifyAccount + Created on : Apr 24, 2017, 5:38:06 PM + Author : 594267 +--%> + +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.UUID" %> + + + + + + + Account Modification + + + + + + + + + + + + + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + String ModuleName = new String(); + + ModuleName = (String) session.getAttribute("moduleName"); + %> + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + + <%if (ModuleName.equalsIgnoreCase("Deposit")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Loan")) {%> + + <%}%> +
+ +
+ ACCOUNT MODIFICATION OPERATION + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
Operation Selection + +
+
+
+
+ + diff --git a/IPKS_Updated/web/web/web/MyIntimation.jsp b/IPKS_Updated/web/web/web/MyIntimation.jsp new file mode 100644 index 0000000..e343fda --- /dev/null +++ b/IPKS_Updated/web/web/web/MyIntimation.jsp @@ -0,0 +1,445 @@ +<%-- + Document : accountEnquiry + Created on : Aug 3, 2015, 2:23:35 PM + Author : Administrator +--%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.MyIntimationBean"%> + + + + My Intimation + + + + + + + + + + + + + + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + <% + String ModuleName = new String(); + + ModuleName = (String) session.getAttribute("moduleName"); + %> + + <% if (ModuleName.equalsIgnoreCase("KCC")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Deposit")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Loan")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBothKcc") || ModuleName.equalsIgnoreCase("SpecialKcc")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBothDep")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBoth")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("Special")) {%> + + <%}%> +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + Object alMyIntimationBeanObj = request.getAttribute("alMyIntimationBean"); + ArrayList alMyIntimationBean = new ArrayList(); + if (alMyIntimationBeanObj != null) { + alMyIntimationBean = (ArrayList) request.getAttribute("alMyIntimationBean"); + } + %> + <% + Object oMyIntimationBeanSearchObj = request.getAttribute("oMyIntimationBeanSearchObj"); + MyIntimationBean oMyIntimationBean = new MyIntimationBean(); + MyIntimationBean oMyIntimationBeanSearch = new MyIntimationBean(); + if (oMyIntimationBeanSearchObj != null) { + oMyIntimationBean = (MyIntimationBean) request.getAttribute("oMyIntimationBeanSearchObj"); + + } + %> +
+ My Intimation +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ +
+ Intimation For*: + +
+

+
+
+ + + + + + + + + + + + + + + + + + + +
From Date*:      To Date*: 

Transaction Reference Number:     Transaction Type: +
+

+ + + +
+


+ + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+ + <% if (oMyIntimationBean.getCheckOption().equalsIgnoreCase("TXN")) {%> +
+ + + + + + + + + + + + + + + + + <% + oMyIntimationBean = null; + + for (int i = 0; i < alMyIntimationBean.size(); i++) { + oMyIntimationBean = alMyIntimationBean.get(i); + %> + + + + + + + + + + + + + + <%}%> + + +
Reference No.Account No.AmountChargesTransaction DateTransaction TypeAuthorizer IDAuthorizer's RemarksTransaction Status
+
+ <%} else if (oMyIntimationBean.getCheckOption().equalsIgnoreCase("TTP")) {%> +
+ + + + + + + + + + + + + + + + + <% + oMyIntimationBean = null; + + for (int i = 0; i < alMyIntimationBean.size(); i++) { + oMyIntimationBean = alMyIntimationBean.get(i); + %> + + + + + + + + + + + + + + <%}%> + + +
Reference No.Account No.AmountChargesTransaction DateTransaction TypeAuthorizer IDAuthorizer's RemarksTransaction Status
+
+ <%} else if (oMyIntimationBean.getCheckOption().equalsIgnoreCase("ACC") + || oMyIntimationBean.getCheckOption().equalsIgnoreCase("LACC") || oMyIntimationBean.getCheckOption().equalsIgnoreCase("KCC")) {%> +
+ + + + + + + + + + + + + + + + + <% + oMyIntimationBean = null; + + for (int i = 0; i < alMyIntimationBean.size(); i++) { + oMyIntimationBean = alMyIntimationBean.get(i); + %> + + + + + + + + + + + <%}%> + + +
Reference No.Open A/C No.Transaction DateTransaction TypeAuthorizer IDAuthorizer's RemarksTransaction Status
+
+ + <%}%> + +

+ +
+
+ <%}%> + +
+
+ + + + + + + diff --git a/IPKS_Updated/web/web/web/MyIntimation_STB.jsp b/IPKS_Updated/web/web/web/MyIntimation_STB.jsp new file mode 100644 index 0000000..6ba4b47 --- /dev/null +++ b/IPKS_Updated/web/web/web/MyIntimation_STB.jsp @@ -0,0 +1,387 @@ +<%-- + Document : myIntimation_STB + Created on : Aug 17, 2021, 2:23:35 PM + Author : 1242938 +--%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.MyIntimationBean"%> + + + + My Intimation + + + + + + + + + + + + + + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + <% + String ModuleName = new String(); + + ModuleName = (String) session.getAttribute("moduleName"); + %> + + <% if (ModuleName.equalsIgnoreCase("KCC")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Deposit")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Loan")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBothKcc") || ModuleName.equalsIgnoreCase("SpecialKcc")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBothDep")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBoth")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("Special")) {%> + + <%}%> +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + Object alMyIntimationBeanObj = request.getAttribute("alMyIntimationBean"); + ArrayList alMyIntimationBean = new ArrayList(); + if (alMyIntimationBeanObj != null) { + alMyIntimationBean = (ArrayList) request.getAttribute("alMyIntimationBean"); + } + %> + <% + Object oMyIntimationBeanSearchObj = request.getAttribute("oMyIntimationBeanSearchObj"); + MyIntimationBean oMyIntimationBean = new MyIntimationBean(); + MyIntimationBean oMyIntimationBeanSearch = new MyIntimationBean(); + if (oMyIntimationBeanSearchObj != null) { + oMyIntimationBean = (MyIntimationBean) request.getAttribute("oMyIntimationBeanSearchObj"); + + } + %> +
+ My Intimation +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ +
+ Intimation For*: + +
+

+
+
+ + + + + + + + + + + + + + + + + + + +
From Date*:      To Date*: 

Transaction Reference Number:     Transaction Type: +
+

+ + + +
+


+ + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+ + <% if (oMyIntimationBean.getCheckOption().equalsIgnoreCase("TP")) {%> +
+ + + + + + + + + + + + + + + + + + + + <% + oMyIntimationBean = null; + + for (int i = 0; i < alMyIntimationBean.size(); i++) { + oMyIntimationBean = alMyIntimationBean.get(i); + %> + + + + + + + + + + + + + + + + + <%}%> + + +
Pacs IDPacs NameCBS AccountReference No.Account No.Account No2Account BalanceAmountTransaction DateAuthorizer IDAuthorizer's RemarksTransaction Status
+
+ <%} else if (oMyIntimationBean.getCheckOption().equalsIgnoreCase("TTP")) {%> +
+ + + + + + + + + + + + + + + + + <% + oMyIntimationBean = null; + + for (int i = 0; i < alMyIntimationBean.size(); i++) { + oMyIntimationBean = alMyIntimationBean.get(i); + %> + + + + + + + + + + + + + + <%}%> + + +
Reference No.Account No.AmountChargesTransaction DateTransaction TypeAuthorizer IDAuthorizer's RemarksTransaction Status
+
+ <%} else if (oMyIntimationBean.getCheckOption().equalsIgnoreCase("ACC") + || oMyIntimationBean.getCheckOption().equalsIgnoreCase("LACC") || oMyIntimationBean.getCheckOption().equalsIgnoreCase("KCC")) {%> +
+ + + + + + + + + + + + + + + + + <% + oMyIntimationBean = null; + + for (int i = 0; i < alMyIntimationBean.size(); i++) { + oMyIntimationBean = alMyIntimationBean.get(i); + %> + + + + + + + + + + + <%}%> + + +
Reference No.Open A/C No.Transaction DateTransaction TypeAuthorizer IDAuthorizer's RemarksTransaction Status
+
+ + <%}%> + +

+ +
+
+ <%}%> + +
+
+ + diff --git a/IPKS_Updated/web/web/web/NeftRtgsInitiation.jsp b/IPKS_Updated/web/web/web/NeftRtgsInitiation.jsp new file mode 100644 index 0000000..dee0517 --- /dev/null +++ b/IPKS_Updated/web/web/web/NeftRtgsInitiation.jsp @@ -0,0 +1,804 @@ +<%-- + Document : NEFT_RTGS + Created on : May 19, 2017, 5:56:39 PM + Author : 981898 + updated on : Jan 31,2024 + Author : 1121947 +--%> +<%@page import="com.itextpdf.text.Document"%> +<%@page import="DataEntryBean.NeftRtgsEnquiryBean"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.text.DateFormat"%> +<%@page import="java.text.SimpleDateFormat"%> +<%@page import="java.util.Date"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.UUID" %> + + + +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + NEFT/RTGS Initiation + + + + + + + + + + + + + + + + + + +
+ <% String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankNA(String s) { + return (s == null) ? "NA" : s; + } + %> + + <% + Object oEnquiryBeanObj = request.getAttribute("oNeftRtgsEnquiryBean"); + NeftRtgsEnquiryBean oEnquiryBean = new NeftRtgsEnquiryBean(); + Object EnqBean=request.getAttribute("EnqBean"); + ArrayList alEnquiryBean = new ArrayList(); + if (oEnquiryBeanObj != null) { + alEnquiryBean = (ArrayList) request.getAttribute("alNeftRtgsEnquiryBean"); + session.setAttribute("alEnquiryBeanobj", EnqBean); + + } + %> + + + <% + int flag2 = 1; + int curPage = 0; + try { + curPage = Integer.parseInt(request.getAttribute("currentPage").toString()); + } catch (Exception e) { + curPage = 1; + } + if (alEnquiryBean.size() > 0) { + flag2 = 2; + } + int totalRecordCount = 0; + int recordCount = 0; + + try { + //totalRecordCount = Integer.parseInt(request.getAttribute("totalRecordCount").toString()); + recordCount = Integer.parseInt(request.getAttribute("recordCount").toString()); + } catch (Exception e) { + totalRecordCount = 0; + recordCount = 0; + } + /*totalRecordCount = totalRecordCount + alTransactionEnquiryBean.size();*/ + + %> + +
+ NEFT/RTGS Initiation +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ + +
NEFT/RTGS Transactions :
+

+ + + + + + + + + <%-- + + + + + + + + + + + + + + + + + + + style="display: none"<%} else{%>style="display: none"<%}%>> + + + + + + +
Remitter Account Number:
Beneficiary Account Number:
IFSC Code:
Reference Number:
Transaction From Date*: 
Transaction To Date*: 
+
+ + +
+ + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + <% + + oEnquiryBean=null; + //DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); + for (int i = 0; i < alEnquiryBean.size(); i++) { + oEnquiryBean = alEnquiryBean.get(i); + //Date dt = (Date)df.parse((oEnquiryBean.getTxnDate().substring(0, 10))); + + + %> + + + + + + + + + + + + + + + + + + + + <%}%> + +
Transaction No.IPKS Account No.Remitter Account No.Beneficiary Account No.Beneficiary NameBeneficiary AddressBank NameBranch NameIFSC CodeTransaction AmountCommission Transaction NumberCommission AmountStatusTransaction DateCBS Queue NoCBS Queue No2
<%=blankNull(oEnquiryBean.getTxnNo())%><%=blankNull(oEnquiryBean.getSrcAccNo())%><%=blankNull(oEnquiryBean.getRem_ac_no())%><%=blankNull(oEnquiryBean.getDestAccNo2())%><%=blankNull(oEnquiryBean.getBen_name())%><%=blankNull(oEnquiryBean.getBen_add())%><%=blankNull(oEnquiryBean.getBankName())%><%=blankNull(oEnquiryBean.getBranchName())%><%=blankNull(oEnquiryBean.getIfscNoVal2())%><%=blankNull(oEnquiryBean.getTransAmt())%><%=blankNull(oEnquiryBean.getCom_txn_no())%><%=blankNull(oEnquiryBean.getCom_amt())%><%=blankNull(oEnquiryBean.getStatus())%><%=blankNull(oEnquiryBean.getTxnDate().substring(0, 10))%><%=blankNull(oEnquiryBean.getQueueNo())%><%=blankNA(oEnquiryBean.getQueueNo2())%>


+
+ +
+ <%}%> +
+ + + + + + + + + + +
style="display: none"<%}%> onclick="javascript:submitform2(NeftRtgsInitiationForm)"/>style="display: none"<%}%> onclick="javascript:download()"/>
+
+
+
+ + + +<% } catch (Exception e) { + + } +%> + diff --git a/IPKS_Updated/web/web/web/P2P_I2I_Report.jsp b/IPKS_Updated/web/web/web/P2P_I2I_Report.jsp new file mode 100644 index 0000000..32c4c17 --- /dev/null +++ b/IPKS_Updated/web/web/web/P2P_I2I_Report.jsp @@ -0,0 +1,153 @@ +<%-- + Document : PACS_REPORT + Created on : Sep 17, 2015, 12:59:59 PM + Author : 590685 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.ArrayList" %> + + + + + + + + + + + + + + + + + + P2P And I2I Report + + + + + +
+ + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + +
+
+ SAL Generation + +
+
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ + + + + + + + + + + + + + + + + + + + + + +
Select Date#: DCCB Name#:




+ +
+
+ + +
+ + + + + + + +
+
+
+ + diff --git a/IPKS_Updated/web/web/web/PACS_REPORT.jsp b/IPKS_Updated/web/web/web/PACS_REPORT.jsp new file mode 100644 index 0000000..a1b7413 --- /dev/null +++ b/IPKS_Updated/web/web/web/PACS_REPORT.jsp @@ -0,0 +1,765 @@ +<%-- + Document : PACS_REPORT + Created on : Sep 17, 2015, 12:59:59 PM + Author : 454222 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.ArrayList" %> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="java.util.Date"%> +<%@page import="java.util.ArrayList" %> +<%@page import="java.lang.String" %> + + + + + + + + + + + + + + + + + KCC Report + + + + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankNA(String s) { + return (s == null) ? "NA" : s; + } + %> + <% + String pacsId = (String) session.getAttribute("pacsId"); + String userRole = (String) session.getAttribute("userRole"); + String moduleName = new String(); + moduleName = (String) session.getAttribute("moduleName"); + Object oEnquiryBeanSearchObj = request.getAttribute("oEnquiryBeanSearchObj"); //----------****--------- + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + if (oEnquiryBeanSearchObj != null) { + oEnquiryBean = (EnquiryBean) request.getAttribute("oEnquiryBeanSearchObj"); + session.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearchObj); //-------------****---------- + } + %> + <%String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + %> + +
+
+ KCC Report + +
+
+ + <%if (request.getAttribute("error") != null) {%> + + <%}%> + + + + + + + + + + + + + + + + + + + + + + + + + + +
<%=request.getAttribute("error").toString()%>
Report Name *:
Sub-PACS Name:
From Date:  
To Date:  
+



+
+ + + + + + + + + +
+
+ + diff --git a/IPKS_Updated/web/web/web/PacsInformationLOV.jsp b/IPKS_Updated/web/web/web/PacsInformationLOV.jsp new file mode 100644 index 0000000..ddfa339 --- /dev/null +++ b/IPKS_Updated/web/web/web/PacsInformationLOV.jsp @@ -0,0 +1,82 @@ +<%-- + Document : PACSinformationLOV + Created on : Mar 10, 2016, 2:30:36 AM + Author : SUBHAM +--%> + +<%@page import="java.sql.PreparedStatement"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> + + + + + + PACS Information Search + + + <% + + // String searchString = request.getParameter("DccbCode"); + String lovKey = request.getParameter("lovKey"); + String headerQry = "select p.pacs_id,p.pacs_name from pacs_master p where p.dccb_code= '" + searchString + "'"; + //System.out.println(headerQry); + Connection conn = DbHandler.getDBConnection(); + PreparedStatement pstmt = null; + + ResultSet resultSet = null; + String bgColor = null; + int flag = 1; + + try { + pstmt = conn.prepareStatement(headerQry); + resultSet = pstmt.executeQuery(); + + %> + + +
+ + + <%int i = 0; + while(resultSet.next()) + { + i++; + if(flag==1) + { + flag=0; + bgColor="#AFC7C7"; + } else { + flag=1; + bgColor="#95B9C7"; + }%> + <% if (lovKey.equalsIgnoreCase("update")) {%> + + + <%} else if (lovKey.equalsIgnoreCase("create")) {%> + + + <%}%> + <%}%> +
PACS IDPACS NAME
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
<%=resultSet.getString(1)%><%=resultSet.getString(2)%>
+
+ + <% + } catch(Exception ex) { + //System.out.println(ex); + System.out.println("Error occurred during processing."); + } finally { + if(resultSet != null) + resultSet.close(); + if(pstmt != null) + pstmt.close(); + if(conn != null) + conn.close(); + } + %> + diff --git a/IPKS_Updated/web/web/web/Payroll/DesignationMaster.jsp b/IPKS_Updated/web/web/web/Payroll/DesignationMaster.jsp new file mode 100644 index 0000000..dbfe872 --- /dev/null +++ b/IPKS_Updated/web/web/web/Payroll/DesignationMaster.jsp @@ -0,0 +1,388 @@ +<%-- + Document : DesignationMaster + Created on : March 29, 2022, 1:00:00 PM + Author : 1242938 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.PayrollBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + + + Designation Master + + + + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object oPayrollBeanObj = request.getAttribute("oPayrollBean"); + Object alPayrollBeanObj = request.getAttribute("arrPayrollBean"); + + PayrollBean oPayrollBean = new PayrollBean(); + if (oPayrollBeanObj != null) { + oPayrollBean = (PayrollBean) request.getAttribute("oPayrollBean"); + } + + ArrayList alPayrollBean = new ArrayList(); + if (alPayrollBeanObj != null) { + alPayrollBean = (ArrayList) request.getAttribute("arrPayrollBean"); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + + String userRole = (String) session.getAttribute("userRole"); + + String checkOption = ""; + error = request.getAttribute("checkOption"); + if (error != null) { + checkOption = error.toString(); + } + %> + + +
+
+ + Designation Master + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ +
+
+
+ +
+
+
+ +
+
+ <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+ + + + + + + + + <% + oPayrollBean = null; + oPayrollBean = new PayrollBean(); + int count2= 1; + + for (int i = 0; i < alPayrollBean.size(); i++) { + oPayrollBean = alPayrollBean.get(i); + count2++; + %> + + + + + + + + + <%}%> +
Designation NameStatus
+ +
+ +
+
+
+ + +
+ + + +
+ <%}%> + + + + +
+ +
+ + + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Payroll/EmployeeDependentMaster.jsp b/IPKS_Updated/web/web/web/Payroll/EmployeeDependentMaster.jsp new file mode 100644 index 0000000..72377a0 --- /dev/null +++ b/IPKS_Updated/web/web/web/Payroll/EmployeeDependentMaster.jsp @@ -0,0 +1,427 @@ +<%-- + Document : EmployeeDependentMaster + Created on : April 29, 2022, 4:00:00 PM + Author : 1242938 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.PayrollBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + + + Employee Dependent Master + + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object oPayrollBeanObj = request.getAttribute("oPayrollBean"); + Object alPayrollBeanObj = request.getAttribute("arrPayrollBean"); + + PayrollBean oPayrollBean = new PayrollBean(); + if (oPayrollBeanObj != null) { + oPayrollBean = (PayrollBean) request.getAttribute("oPayrollBean"); + } + + ArrayList alPayrollBean = new ArrayList(); + if (alPayrollBeanObj != null) { + alPayrollBean = (ArrayList) request.getAttribute("arrPayrollBean"); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + + String userRole = (String) session.getAttribute("userRole"); + + String checkOption = ""; + error = request.getAttribute("checkOption"); + if (error != null) { + checkOption = error.toString(); + } + %> + + +
+
+ + Employee Dependent Master + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ +
+
+
+ +
+
+
+ +
+
+ <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+ + + + + + + + + + + + + + <% + oPayrollBean = null; + oPayrollBean = new PayrollBean(); + int count2= 1; + + for (int i = 0; i < alPayrollBean.size(); i++) { + oPayrollBean = alPayrollBean.get(i); + count2++; + %> + + + + + + + + + + + + + + + <%}%> +
Employee IDEmployee NameDependent NameDate of BirthRelationNominee FlagStatus
+ + + +
+ +
+
+
+ + +
+ + + +
+ <%}%> + + + + +
+ +
+ + + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Payroll/EmployeeMaster.jsp b/IPKS_Updated/web/web/web/Payroll/EmployeeMaster.jsp new file mode 100644 index 0000000..d4df933 --- /dev/null +++ b/IPKS_Updated/web/web/web/Payroll/EmployeeMaster.jsp @@ -0,0 +1,980 @@ +<%-- + Document : EmployeeMaster + Created on : March 31, 2022, 6:00:00 PM + Author : 1242938 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.PayrollBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + + + Employee Master + + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object oPayrollBeanObj = request.getAttribute("oPayrollBean"); + Object alPayrollBeanObj = request.getAttribute("arrPayrollBean"); + + PayrollBean oPayrollBean = new PayrollBean(); + if (oPayrollBeanObj != null) { + oPayrollBean = (PayrollBean) request.getAttribute("oPayrollBean"); + } + + ArrayList alPayrollBean = new ArrayList(); + if (alPayrollBeanObj != null) { + alPayrollBean = (ArrayList) request.getAttribute("arrPayrollBean"); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + + String userRole = (String) session.getAttribute("userRole"); + + String checkOption = ""; + error = request.getAttribute("checkOption"); + if (error != null) { + checkOption = error.toString(); + } + %> + + +
+
+ + Employee Master + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ +
+
+ +
+
+ +
+
+ <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <% + oPayrollBean = null; + oPayrollBean = new PayrollBean(); + int count2= 1; + + for (int i = 0; i < alPayrollBean.size(); i++) { + oPayrollBean = alPayrollBean.get(i); + count2++; + %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%}%> +
Employee IDCIF NoEmployee NameJoining DateConfirmation DateRetirement DateDesignation CodeSalary AccountGrade CodeBasic AmountDA RateDA AmountMSA AmountGross AmountEPF Staff RateEPF Staff AmountEPF Society RateEPF Society AmountP.Tax AmountOther Deduction AmountTotal EPFNet PayStatus
+
+ +
+
+

+
+ + +
+ + + +
+ <%}%> + + + + +
+ +
+ + + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Payroll/GradeMaster.jsp b/IPKS_Updated/web/web/web/Payroll/GradeMaster.jsp new file mode 100644 index 0000000..7c8677c --- /dev/null +++ b/IPKS_Updated/web/web/web/Payroll/GradeMaster.jsp @@ -0,0 +1,388 @@ +<%-- + Document : GradeMaster + Created on : March 14, 2022, 8:00:00 PM + Author : 1242938 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.PayrollBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + + + Grade Master + + + + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object oPayrollBeanObj = request.getAttribute("oPayrollBean"); + Object alPayrollBeanObj = request.getAttribute("arrPayrollBean"); + + PayrollBean oPayrollBean = new PayrollBean(); + if (oPayrollBeanObj != null) { + oPayrollBean = (PayrollBean) request.getAttribute("oPayrollBean"); + } + + ArrayList alPayrollBean = new ArrayList(); + if (alPayrollBeanObj != null) { + alPayrollBean = (ArrayList) request.getAttribute("arrPayrollBean"); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + + String userRole = (String) session.getAttribute("userRole"); + + String checkOption = ""; + error = request.getAttribute("checkOption"); + if (error != null) { + checkOption = error.toString(); + } + %> + + +
+
+ + Grade Master + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ +
+
+
+ +
+
+
+ +
+
+ <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+ + + + + + + + + <% + oPayrollBean = null; + oPayrollBean = new PayrollBean(); + int count2= 1; + + for (int i = 0; i < alPayrollBean.size(); i++) { + oPayrollBean = alPayrollBean.get(i); + count2++; + %> + + + + + + + + + <%}%> +
Grade NameStatus
+ +
+ +
+
+
+ + +
+ + + +
+ <%}%> + + + + +
+ +
+ + + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Payroll/LeaveBalance.jsp b/IPKS_Updated/web/web/web/Payroll/LeaveBalance.jsp new file mode 100644 index 0000000..1d81b5b --- /dev/null +++ b/IPKS_Updated/web/web/web/Payroll/LeaveBalance.jsp @@ -0,0 +1,457 @@ +<%-- + Document : Leave Balance + Created on : May 24, 2022, 1:00:00 PM + Author : 1242938 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.PayrollBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + + + Leave Balance + + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object oPayrollBeanObj = request.getAttribute("oPayrollBean"); + Object alPayrollBeanObj = request.getAttribute("arrPayrollBean"); + + PayrollBean oPayrollBean = new PayrollBean(); + if (oPayrollBeanObj != null) { + oPayrollBean = (PayrollBean) request.getAttribute("oPayrollBean"); + } + + ArrayList alPayrollBean = new ArrayList(); + if (alPayrollBeanObj != null) { + alPayrollBean = (ArrayList) request.getAttribute("arrPayrollBean"); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + + String userRole = (String) session.getAttribute("userRole"); + + String checkOption = ""; + error = request.getAttribute("checkOption"); + if (error != null) { + checkOption = error.toString(); + } + %> + + +
+
+ + Leave Balance + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ +
+
+
+ +
+
+
+ +
+
+ <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+ + + + + + + + + + + + <% + oPayrollBean = null; + oPayrollBean = new PayrollBean(); + int count2= 1; + + for (int i = 0; i < alPayrollBean.size(); i++) { + oPayrollBean = alPayrollBean.get(i); + count2++; + %> + + + + + + + + + + + + <%}%> +
Employee IDEmployee NameLeave TypeLeave BalanceRemarks
+ +
+
+
+ + +
+ + + +
+ <%}%> + + + + +
+ +
+ + + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Payroll/LeaveMaster.jsp b/IPKS_Updated/web/web/web/Payroll/LeaveMaster.jsp new file mode 100644 index 0000000..45d16d8 --- /dev/null +++ b/IPKS_Updated/web/web/web/Payroll/LeaveMaster.jsp @@ -0,0 +1,660 @@ +<%-- + Document : LeaveMaster + Created on : May 6, 2022, 6:00:00 PM + Author : 1242938 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.PayrollBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + + + Leave Master + + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object oPayrollBeanObj = request.getAttribute("oPayrollBean"); + Object alPayrollBeanObj = request.getAttribute("arrPayrollBean"); + + PayrollBean oPayrollBean = new PayrollBean(); + if (oPayrollBeanObj != null) { + oPayrollBean = (PayrollBean) request.getAttribute("oPayrollBean"); + } + + ArrayList alPayrollBean = new ArrayList(); + if (alPayrollBeanObj != null) { + alPayrollBean = (ArrayList) request.getAttribute("arrPayrollBean"); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + + String userRole = (String) session.getAttribute("userRole"); + + String checkOption = ""; + error = request.getAttribute("checkOption"); + if (error != null) { + checkOption = error.toString(); + } + %> + + +
+
+ + Leave Master + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ +
+
+ +
+
+ +
+
+ <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+
+ + + + + + + + + + + + + + + + + + <% + oPayrollBean = null; + oPayrollBean = new PayrollBean(); + int count2= 1; + + for (int i = 0; i < alPayrollBean.size(); i++) { + oPayrollBean = alPayrollBean.get(i); + count2++; + %> + + + + + + + + + + + + + + + + <%}%> +
Leave NameLeave TypeYearly Credit LimitEncash FlagCarry Forward FlagEncash LimitMin Reserve LimitMax Reserve LimitMin Allowed LimitMax Allowed LimitStatus
+ +
+
+

+
+ + +
+ + + +
+ <%}%> + + + + +
+ +
+ + + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Payroll/LeaveTransaction.jsp b/IPKS_Updated/web/web/web/Payroll/LeaveTransaction.jsp new file mode 100644 index 0000000..c16da6f --- /dev/null +++ b/IPKS_Updated/web/web/web/Payroll/LeaveTransaction.jsp @@ -0,0 +1,573 @@ +<%-- + Document : Leave Transaction + Created on : May 30, 2022, 3:00:00 PM + Author : 1242938 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.PayrollBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + + + Leave Transaction + + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object oPayrollBeanObj = request.getAttribute("oPayrollBean"); + Object alPayrollBeanObj = request.getAttribute("arrPayrollBean"); + + PayrollBean oPayrollBean = new PayrollBean(); + if (oPayrollBeanObj != null) { + oPayrollBean = (PayrollBean) request.getAttribute("oPayrollBean"); + } + + ArrayList alPayrollBean = new ArrayList(); + if (alPayrollBeanObj != null) { + alPayrollBean = (ArrayList) request.getAttribute("arrPayrollBean"); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + + String userRole = (String) session.getAttribute("userRole"); + + String checkOption = ""; + error = request.getAttribute("checkOption"); + if (error != null) { + checkOption = error.toString(); + } + %> + + +
+
+ + Leave Transaction + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ +
+
+
+ +
+
+
+ +
+
+ <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+ + + + + + + + + + + + + + + + <% + oPayrollBean = null; + oPayrollBean = new PayrollBean(); + int count2= 1; + + for (int i = 0; i < alPayrollBean.size(); i++) { + oPayrollBean = alPayrollBean.get(i); + count2++; + %> + + + + + + + + + + + + + + + + <%}%> +
Employee IDEmployee NameLeave TypeFrom DateTo DateNo of LeaveHalf DayRemarksStatus
+
+
+
+ + +
+ + + +
+ <%}%> + + + + +
+ +
+ + + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Payroll/MenuHead_Payroll.jsp b/IPKS_Updated/web/web/web/Payroll/MenuHead_Payroll.jsp new file mode 100644 index 0000000..b99f59c --- /dev/null +++ b/IPKS_Updated/web/web/web/Payroll/MenuHead_Payroll.jsp @@ -0,0 +1,120 @@ +<%-- + Document : MenuHead_Payroll + Created on : March 14, 2022, 7:00:00 PM + Author : 1242938 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.*"%> + + +<% try { +%> + +<% + String userName = new String(); + String pacsName = new String(); + String userRole = new String(); + String RoleName = new String(); + String sysDt = new String(); + + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select to_char(SYSTEM_DATE,'Month DD, YYYY') from system_date"); + while (rs.next()) { + sysDt = rs.getString(1); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + } + + userName = (String) session.getAttribute("UserName"); + userName = userName.toUpperCase(); + pacsName = (String) session.getAttribute("pacsName"); + userRole = (String) session.getAttribute("userRole"); + RoleName = (String) session.getAttribute("RoleName"); + + String moduleName = new String(); + moduleName = (String) session.getAttribute("moduleName"); + + +%> + +
+ +
+ Image - PACS +
+ +
+
User Name:
<%=userName%>
+
Date:
<%=sysDt%>
+
PACS Name:
<%=pacsName%>
+ +
User Type:
<%=RoleName%>
+
Module Name:
<%=moduleName.toUpperCase()%>
+ +
+ + + + +
+ + + + +
+ +<% } catch (Exception e) { + System.out.println("EX in " + e); + } +%> diff --git a/IPKS_Updated/web/web/web/Payroll/PayrollBglMaster.jsp b/IPKS_Updated/web/web/web/Payroll/PayrollBglMaster.jsp new file mode 100644 index 0000000..323a8b6 --- /dev/null +++ b/IPKS_Updated/web/web/web/Payroll/PayrollBglMaster.jsp @@ -0,0 +1,541 @@ +<%-- + Document : Leave Balance + Created on : May 24, 2022, 1:00:00 PM + Author : 1242938 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.PayrollBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + + + Payroll BGL Master + + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object oPayrollBeanObj = request.getAttribute("oPayrollBean"); + Object alPayrollBeanObj = request.getAttribute("arrPayrollBean"); + + PayrollBean oPayrollBean = new PayrollBean(); + if (oPayrollBeanObj != null) { + oPayrollBean = (PayrollBean) request.getAttribute("oPayrollBean"); + } + + ArrayList alPayrollBean = new ArrayList(); + if (alPayrollBeanObj != null) { + alPayrollBean = (ArrayList) request.getAttribute("arrPayrollBean"); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + + String userRole = (String) session.getAttribute("userRole"); + + String checkOption = ""; + error = request.getAttribute("checkOption"); + if (error != null) { + checkOption = error.toString(); + } + %> + + +
+
+ + Payroll BGL Master + +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ +
+
+
+ +
+
+
+ +
+
+ <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+
+ + + + + + + + + + + + + <% + oPayrollBean = null; + oPayrollBean = new PayrollBean(); + int count2= 1; + + for (int i = 0; i < alPayrollBean.size(); i++) { + oPayrollBean = alPayrollBean.get(i); + count2++; + %> + + + + + + + + + + + + + + + + + + + + + + + <%}%> +
Salary GL (Debit)PTax GL (Credit)Other Deduction GL (Credit)EPF Staff GL (Credit)EPF Society GL (Debit)EPF Society GL (Credit)
+
+
+
+
+ + +
+ + + +
+ <%}%> + + + + +
+ +
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Payroll/PayrollSchedule.jsp b/IPKS_Updated/web/web/web/Payroll/PayrollSchedule.jsp new file mode 100644 index 0000000..659ee6e --- /dev/null +++ b/IPKS_Updated/web/web/web/Payroll/PayrollSchedule.jsp @@ -0,0 +1,414 @@ +<%-- + Document : Leave Balance + Created on : May 24, 2022, 1:00:00 PM + Author : 1242938 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.PayrollBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + + + Payroll Schedule + + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object oPayrollBeanObj = request.getAttribute("oPayrollBean"); + Object alPayrollBeanObj = request.getAttribute("arrPayrollBean"); + + PayrollBean oPayrollBean = new PayrollBean(); + if (oPayrollBeanObj != null) { + oPayrollBean = (PayrollBean) request.getAttribute("oPayrollBean"); + } + + ArrayList alPayrollBean = new ArrayList(); + if (alPayrollBeanObj != null) { + alPayrollBean = (ArrayList) request.getAttribute("arrPayrollBean"); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + + String userRole = (String) session.getAttribute("userRole"); + + String checkOption = ""; + error = request.getAttribute("checkOption"); + if (error != null) { + checkOption = error.toString(); + } + %> + + +
+
+ + Payroll Schedule + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ +
+
+
+ +
+
+
+ +
+
+ <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+ + + + + + + + + + + <% + oPayrollBean = null; + oPayrollBean = new PayrollBean(); + int count2= 1; + + for (int i = 0; i < alPayrollBean.size(); i++) { + oPayrollBean = alPayrollBean.get(i); + count2++; + %> + + + + + + + + + + <%}%> +
Payroll Month YearPayroll Processing DateRemarksStatus
+
+
+
+ + +
+ + + +
+ <%}%> + + + + +
+ +
+ + + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Payroll/payroll_reports.jsp b/IPKS_Updated/web/web/web/Payroll/payroll_reports.jsp new file mode 100644 index 0000000..1780924 --- /dev/null +++ b/IPKS_Updated/web/web/web/Payroll/payroll_reports.jsp @@ -0,0 +1,209 @@ +<%-- + Document : Payroll Report + Created on : May 18, 2022, 4:50:51 PM + Author : 1242938 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.ArrayList" %> +<% try { +%> + + + Payroll Report + + + + + + + + + + + + + + + + + + + +
+
+
+ Payroll Report + +
+
+ + + <%if (request.getAttribute("error") != null) {%> + + <%}%> + + + + + + + + + + + + +
+ + + + + + + + +
<%=request.getAttribute("error").toString()%>
Report Name *:
Date *: (Enter year and month only)
Employee ID *: +
+



+
+ + + + + + + + + +
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Pds_JSP/MenuHead_PDS.jsp b/IPKS_Updated/web/web/web/Pds_JSP/MenuHead_PDS.jsp new file mode 100644 index 0000000..8d53631 --- /dev/null +++ b/IPKS_Updated/web/web/web/Pds_JSP/MenuHead_PDS.jsp @@ -0,0 +1,159 @@ +<%-- + Document : MenuHead_PDS + Created on : Apr 20, 2016, 3:19:56 PM + Author : 590685 +--%> + + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.*"%> + + +<% + String userName = new String(); + String pacsName = new String(); + String userRole = new String(); + String RoleName = new String(); + String sysDt = new String(); + + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select to_char(SYSTEM_DATE,'Month DD, YYYY') from system_date"); + while (rs.next()) { + sysDt = rs.getString(1); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + } + + + userName = (String) session.getAttribute("UserName"); + userName = userName.toUpperCase(); + pacsName = (String) session.getAttribute("pacsName"); + userRole = (String) session.getAttribute("userRole"); + RoleName = (String) session.getAttribute("RoleName"); + + +String moduleName = new String(); + moduleName = (String) session.getAttribute("moduleName"); + + +%> + +
+ +
+ Image - PACS +
+ +
+
User Name: <%=userName%>
+
Date: <%=sysDt%>
+
PACS Name: <%=pacsName%>
+ +
User Type: <%=RoleName%>
+
Module Name: <%=moduleName.toUpperCase()%>
+ +
+ + + + + +
+ diff --git a/IPKS_Updated/web/web/web/Pds_JSP/PDS_Report.jsp b/IPKS_Updated/web/web/web/Pds_JSP/PDS_Report.jsp new file mode 100644 index 0000000..c05d2cc --- /dev/null +++ b/IPKS_Updated/web/web/web/Pds_JSP/PDS_Report.jsp @@ -0,0 +1,181 @@ + +<%-- + Document : PACS_REPORT + Created on : Sep 17, 2015, 12:59:59 PM + Author : 454222 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.ArrayList" %> +<% try { +%> + + + + + + + + + + + + + + + + PACS Report + + + + +
+
+
+ PACS REPORT + +
+
+ + + <%if (request.getAttribute("error") != null) {%> + + <%}%> + + + + + + + + + + + + + + + + + + + + + + +
<%=request.getAttribute("error").toString()%>
From Date: To Date: Report Name:




+
+ + + + + +
+ + + + + + +
+
+
+ + +<% } catch (Exception e) { + + } +%> + diff --git a/IPKS_Updated/web/web/web/Pds_JSP/PdsInvoice.jsp b/IPKS_Updated/web/web/web/Pds_JSP/PdsInvoice.jsp new file mode 100644 index 0000000..e9f698f --- /dev/null +++ b/IPKS_Updated/web/web/web/Pds_JSP/PdsInvoice.jsp @@ -0,0 +1,103 @@ +<%-- + Document : Invoice + Created on : Jun 25, 2016, 10:52:10 AM + Author : Tcs Help desk122 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<% try { +%> + + + + Invoice + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + String requisitionId = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + Object requisitionIdObj = request.getAttribute("requisitionId"); + if (requisitionIdObj != null) { + requisitionId = requisitionIdObj.toString(); + } + + %> + + +
+
+ + + Invoice + + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+
+ + + + + +

Download The Invoice

+
+
+ +
+
+ + + + + +
+ +
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Pds_JSP/PdsSellItem.jsp b/IPKS_Updated/web/web/web/Pds_JSP/PdsSellItem.jsp new file mode 100644 index 0000000..847f581 --- /dev/null +++ b/IPKS_Updated/web/web/web/Pds_JSP/PdsSellItem.jsp @@ -0,0 +1,491 @@ +<%-- + Document : pdsSellItem + Created on : May 5, 2016, 12:31:09 PM + Author : 590685 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.pdsStockRegisterBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> + +<% try { +%> + + + + Sell Item + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + +
+
+ + + Sell Item + + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + + + +
+
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
Customer ID:
Customer Name:
Ration Card No:
Grand Total:
+
+ +
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Commodity TypeType DescriptionCommodity Sub-TypeSub-Type DescriptionQuantityPrice/UnitTotal
+ + +
+ +

+
+ + + + + + +
+ + + + + + + +
+ + + + + + +
+ +
+ + +<% } catch (Exception e) { + System.out.println("EX in " + e); + } +%> diff --git a/IPKS_Updated/web/web/web/Pds_JSP/memberEnrollment.jsp b/IPKS_Updated/web/web/web/Pds_JSP/memberEnrollment.jsp new file mode 100644 index 0000000..2af2d6e --- /dev/null +++ b/IPKS_Updated/web/web/web/Pds_JSP/memberEnrollment.jsp @@ -0,0 +1,1083 @@ +<%-- + Document : memberEnrollment + Created on : Apr 22, 2016, 8:00:44 PM + Author : 590685 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="DataEntryBean.memberEnrollmentHeaderBean"%> +<%@page import="DataEntryBean.memberEnrollmentDetailsBean"%> +<%@page import="java.util.ArrayList"%> +<% try { +%> + + + Member Enrollment + + + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + int count = 1; + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + <% + Object memberEnrollmentHeaderBeanObj = request.getAttribute("omemberEnrollmentHeaderBean"); + memberEnrollmentHeaderBean OmemberEnrollmentHeaderBean = new memberEnrollmentHeaderBean(); + if (memberEnrollmentHeaderBeanObj != null) { + OmemberEnrollmentHeaderBean = (memberEnrollmentHeaderBean) request.getAttribute("omemberEnrollmentHeaderBean"); + + } + + %> + <% int divFamily = 0; + Object alMemberEnrollmentDetailsBeanApendObj = request.getAttribute("alMemberEnrollmentDetailsBeanApend"); + ArrayList alMemberEnrollmentDetailsBeanApend = new ArrayList(); + if (alMemberEnrollmentDetailsBeanApendObj != null) { + alMemberEnrollmentDetailsBeanApend = (ArrayList) request.getAttribute("alMemberEnrollmentDetailsBeanApend"); + divFamily = alMemberEnrollmentDetailsBeanApend.size(); + } + + %> + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + + +
+ MEMBER ENROLLMENT +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ +
+ +
+
+
+ + + + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Card No:
Card Holder Name:
S/D/W of:
Date of Birth:
House No:
Street/Road:
Gram Panchayat:
Revenue Block:
Subdivision:
District:
State:
Issued on:
Valid upto:
Card category:   +
+ +
+ <% + if (alMemberEnrollmentDetailsBeanApend.size() > 0) { + %> + + + + + + + + + + + + <% + count = 0; + memberEnrollmentDetailsBean omemberEnrollmentDetailsBeanApend = new memberEnrollmentDetailsBean(); + int i; + for (i = 0; i < alMemberEnrollmentDetailsBeanApend.size(); i++) { + omemberEnrollmentDetailsBeanApend = alMemberEnrollmentDetailsBeanApend.get(i); + count++; + %> + + + + + + + + + + + + + + + + + + + <%}%> + +
+ Card No + + + Card Holder Name + + + DOB + +
+

+ + +

+ + <%} else {%> + + + + + + + + + + +
Enter Family Details:Yes  No
+ + + + + + + + + <%}%> + + +
+ + + + +
+ + + +
+ <%}%> +
+ + + + + + + + + + + + + + + +
+ +
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Pds_JSP/pdsProductCreation.jsp b/IPKS_Updated/web/web/web/Pds_JSP/pdsProductCreation.jsp new file mode 100644 index 0000000..3b4d6ee --- /dev/null +++ b/IPKS_Updated/web/web/web/Pds_JSP/pdsProductCreation.jsp @@ -0,0 +1,379 @@ +<%-- + Document : tradingProductCreation + Created on : Apr 20, 2016, 3:16:34 PM + Author : 590685 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="DataEntryBean.pdsProductCreationBean"%> +<% try { +%> + + + + + + + + + + + + + + PDS Product + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object pdsProductCreationBeanObj = request.getAttribute("pdsProductCreationBeanObj"); + pdsProductCreationBean opdsProductCreationBean = new pdsProductCreationBean(); + if (pdsProductCreationBeanObj != null) { + opdsProductCreationBean = (pdsProductCreationBean) request.getAttribute("pdsProductCreationBeanObj"); + + } + %> + +
+
+ + Product Management + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +
+
+
Operation Selection + +
+ +

+ + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Status: +
Product Type:
Product Description:
Product Sub Type:
Product Sub Type Description:
Quantity Unit: + +




+ +

+ +
+ +
+ + + + + + +


+ +
+ <% }%> + + + + + +
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Pds_JSP/pdsRationCardTypeMaster.jsp b/IPKS_Updated/web/web/web/Pds_JSP/pdsRationCardTypeMaster.jsp new file mode 100644 index 0000000..5f178d6 --- /dev/null +++ b/IPKS_Updated/web/web/web/Pds_JSP/pdsRationCardTypeMaster.jsp @@ -0,0 +1,751 @@ +<%-- + Document : pdsRationCardTypeMaster + Created on : Jul 14, 2016, 12:22:27 PM + Author : 1320035 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="DataEntryBean.RationCardTypeHeaderBean"%> +<%@page import="DataEntryBean.RationCardTypeDetailsBean"%> +<%@page import="java.util.ArrayList"%> +<% try { +%> + + + + + + + + + + + + + + Ration Card Type Enrollment + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object rationCardTypeHeaderBeanObj = request.getAttribute("orationCardTypeHeaderBean"); + RationCardTypeHeaderBean OrationCardTypeHeaderBean = new RationCardTypeHeaderBean(); + if (rationCardTypeHeaderBeanObj != null) { + OrationCardTypeHeaderBean = (RationCardTypeHeaderBean) request.getAttribute("orationCardTypeHeaderBean"); + + } + + %> + <% + Object alRationCardTypeDetailsBeanApendObj = request.getAttribute("alRationCardTypeDetailsBeanApend"); + ArrayList alRationCardTypeDetailsBeanApend = new ArrayList(); + RationCardTypeDetailsBean OrationCardTypeDetailsBean = new RationCardTypeDetailsBean(); + if (alRationCardTypeDetailsBeanApendObj != null) { + alRationCardTypeDetailsBeanApend = (ArrayList) request.getAttribute("alRationCardTypeDetailsBeanApend"); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + + +
+ + + +
+ RATION CARD TYPE CREATION +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ +
+ +
+
+
+ + + + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> + +
+ + + + + + + + + + + + + + + + + + + + +
Card Type:
Card Type Description:
Status:
+ + + +

+ + + + + + + + + + + + + + + + + + + <% + OrationCardTypeDetailsBean = new RationCardTypeDetailsBean(); + count = 0; + for (int i = 0; i < alRationCardTypeDetailsBeanApend.size(); i++) { + OrationCardTypeDetailsBean = alRationCardTypeDetailsBeanApend.get(i); + count++; + %> + + + + + + + + + + + + + + + + + + + + <%}%> + +
Product TypeProduct Sub TypeQuantity UnitEligible QuantityEligibilityFrequencySale Rate Per UnitExpiry Date
disabled<%}%> name="chckboxAmend<%=count%>" id="chckboxAmend<%=count%>" onclick="return checkboxTrueAmend(<%=count%>)" value="<%=blankNull(OrationCardTypeDetailsBean.getDetailId())%>"/>
+
+
+
+ +
+ + + + + +
+
+ <%}%> + + + + + + + + + + +
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Pds_JSP/pdsRationingLedger.jsp b/IPKS_Updated/web/web/web/Pds_JSP/pdsRationingLedger.jsp new file mode 100644 index 0000000..db90d77 --- /dev/null +++ b/IPKS_Updated/web/web/web/Pds_JSP/pdsRationingLedger.jsp @@ -0,0 +1,303 @@ +<%-- + Document : pdsRationingLedger + Created on : Jul 15, 2016, 10:05:16 AM + Author : 1320035 +--%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="DataEntryBean.RationingLedgerHeaderBean"%> +<%@page import="DataEntryBean.RationingLedgerDetailsBean"%> +<%@page import="java.lang.String"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.sql.PreparedStatement"%> +<%@page import="java.util.ArrayList"%> +<% try { +%> + + + + + + + + + + + + + + Ration Card Type Enrollment + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + <% + Object RationingLedgerHeaderBeanObj = request.getAttribute("oRationingLedgerHeaderBean"); + RationingLedgerHeaderBean ORationingLedgerHeaderBean = new RationingLedgerHeaderBean(); + if (RationingLedgerHeaderBeanObj != null) { + ORationingLedgerHeaderBean = (RationingLedgerHeaderBean) request.getAttribute("oRationingLedgerHeaderBean"); + + } + + %> + <% + Object alRationingLedgerDetailsBeanApendObj = request.getAttribute("alRationingLedgerDetailsBeanApend"); + RationingLedgerDetailsBean rationingLedgerDetailsBeanObj = new RationingLedgerDetailsBean(); + ArrayList alRationingLedgerDetailsBeanApend = new ArrayList(); + if (alRationingLedgerDetailsBeanApendObj != null) { + alRationingLedgerDetailsBeanApend = (ArrayList) request.getAttribute("alRationingLedgerDetailsBeanApend"); + } + + %> + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + + +
+ RATIONING LEDGER +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ + +
+
+ +
+ + + +
+
+ <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+ + + + + + + + + + + + + + + + + + + + + + <% for (int i = 0; i < alRationingLedgerDetailsBeanApend.size(); i++) { + rationingLedgerDetailsBeanObj = alRationingLedgerDetailsBeanApend.get(i); + %> + + + + + + + + + + + + + + + + <%}%> + +
+ Product Type Details + + + Product Sub Type Details + + + Eligibility Begin Date + + + Eligibility End Date + + + Expiry Date + + + Base Quantity + + + Availed Quantity + + + Quantity Available + +
+ +
+
+ <%}%> + +
+ + + +
+
+ + + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Pds_JSP/pdsSalesRegister.jsp b/IPKS_Updated/web/web/web/Pds_JSP/pdsSalesRegister.jsp new file mode 100644 index 0000000..a1a82f0 --- /dev/null +++ b/IPKS_Updated/web/web/web/Pds_JSP/pdsSalesRegister.jsp @@ -0,0 +1,292 @@ +<%-- + Document : SalesRegister + Created on : May 5, 2016, 12:31:09 PM + Author : 590685 +--%> + +<%@page import="DataEntryBean.pdsSalesRegisterHeaderBean"%> +<%@page import="DataEntryBean.pdsSalesRegisterDetailsBean"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> + +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> + +<% try { +%> + + + + Sales Register + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object alpdsSalesRegisterDetailsBeanApendObj = request.getAttribute("alpdsSalesRegisterDetailsBeanApend"); + ArrayList alpdsSalesRegisterDetailsBeanApend = new ArrayList(); + if (alpdsSalesRegisterDetailsBeanApendObj != null) { + alpdsSalesRegisterDetailsBeanApend = (ArrayList) request.getAttribute("alpdsSalesRegisterDetailsBeanApend"); + } + + Object opdsSalesRegisterHeaderBeanObj = request.getAttribute("opdsSalesRegisterHeaderBean"); + pdsSalesRegisterHeaderBean opdsSalesRegisterHeaderBean = new pdsSalesRegisterHeaderBean(); + if (opdsSalesRegisterHeaderBeanObj != null) { + opdsSalesRegisterHeaderBean = (pdsSalesRegisterHeaderBean) request.getAttribute("opdsSalesRegisterHeaderBean"); + } + + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + +
+
+ + + SALES REGISTER + + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + + +
+ +
+ +
+ + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+ + + + + + + + + + + + + + + + + + + + + <% + pdsSalesRegisterDetailsBean opdsSalesRegisterDetailsBeanApend = new pdsSalesRegisterDetailsBean(); + + for (int i = 0; i < alpdsSalesRegisterDetailsBeanApend.size(); i++) { + opdsSalesRegisterDetailsBeanApend = alpdsSalesRegisterDetailsBeanApend.get(i); + %> + + + + + + + + + + + + + + + + <%}%> + +
Name Card No Product Type Product Sub Type Quantity Unit Sale Price Sale Date Stock ID Total Amount
+ + +
+
+ <%}%> +
+ +
+ +
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Pds_JSP/pds_raise_requisition.jsp b/IPKS_Updated/web/web/web/Pds_JSP/pds_raise_requisition.jsp new file mode 100644 index 0000000..d9645e6 --- /dev/null +++ b/IPKS_Updated/web/web/web/Pds_JSP/pds_raise_requisition.jsp @@ -0,0 +1,256 @@ +<%-- + Document : pds_raise_requisition + Created on : May 2, 2016, 6:36:27 PM + Author : 590685 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<% try { +%> + + + + Raise Requisition + < + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + +
+
+ + + Raise Requisition + + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+
+ + + + + + + + + + + + +
Name:
Member ID:
+
+
+ +
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Product NamePriceQuantityTotal
+
+

+
+ + + + + +
+
+ + + +
+ + +
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Pds_JSP/pds_stock_register.jsp b/IPKS_Updated/web/web/web/Pds_JSP/pds_stock_register.jsp new file mode 100644 index 0000000..79933fe --- /dev/null +++ b/IPKS_Updated/web/web/web/Pds_JSP/pds_stock_register.jsp @@ -0,0 +1,548 @@ +<%-- + Document : pds_stock_register + Created on : May 5, 2016, 12:31:09 PM + Author : 590685 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.pdsStockRegisterBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> + +<% try { +%> + + + + Stock Register + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object alpdsStockRegisterBeanApendObj = request.getAttribute("alpdsStockRegisterBeanApend"); + ArrayList alpdsStockRegisterBeanApend = new ArrayList(); + if (alpdsStockRegisterBeanApendObj != null) { + alpdsStockRegisterBeanApend = (ArrayList) request.getAttribute("alpdsStockRegisterBeanApend"); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + +
+
+ + + STOCK REGISTER + + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ +
+
+ + +
+ + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+ +
+ + + + + + <% + pdsStockRegisterBean opdsStockRegisterBeanApend = new pdsStockRegisterBean(); + + for (int i = 0; i < alpdsStockRegisterBeanApend.size(); i++) { + opdsStockRegisterBeanApend = alpdsStockRegisterBeanApend.get(i); + %> + + + + + + + + + + + + + + + + + + <%}%> + +
Product DetailsStock Entry Date PriceBase QuantityQuantity AvailedQuantity AvailableStock Expiry DatePerishable FlagStock ID
<%=blankNull(opdsStockRegisterBeanApend.getProductDetails())%><%=blankNull(opdsStockRegisterBeanApend.getStockEntryDate())%><%=blankNull(opdsStockRegisterBeanApend.getPrice())%><%=blankNull(opdsStockRegisterBeanApend.getQuantity())%><%=blankNull(opdsStockRegisterBeanApend.getQuantityAbled())%><%=blankNull(opdsStockRegisterBeanApend.getQuantityAvailable())%><%=blankNull(opdsStockRegisterBeanApend.getStockExpiryDate())%><%=blankNull(opdsStockRegisterBeanApend.getPerishableFlag())%><%=blankNull(opdsStockRegisterBeanApend.getStockId())%>
+
+
+ + <%}%> + + +
+ +
+ + + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Pds_JSP/purchasedetail.jsp b/IPKS_Updated/web/web/web/Pds_JSP/purchasedetail.jsp new file mode 100644 index 0000000..2beb65b --- /dev/null +++ b/IPKS_Updated/web/web/web/Pds_JSP/purchasedetail.jsp @@ -0,0 +1,218 @@ +<%-- + Document : purchasedetail + Created on : Jun 24, 2016, 1:41:11 PM + Author : Tcs Help desk122 +--%> + +<%@page import="DataEntryBean.PurchaseDetailBean"%> +<%@page import="java.lang.String"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.sql.PreparedStatement"%> + + + + Purchased Details + + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + + Object alPurchaseDetailBeanObj = request.getAttribute("alPurchaseDetailBean"); + ArrayList alPurchaseDetailBean = new ArrayList(); + if (alPurchaseDetailBeanObj != null) { + alPurchaseDetailBean = (ArrayList) request.getAttribute("alPurchaseDetailBean"); + } + PurchaseDetailBean purchaseDetailBeanObj = new PurchaseDetailBean(); + %> + + +
+
+ + + Purchase Details + + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+
+ + + + + + + + + + + + + + + + + +
Name:
Member ID:
+
+
+ + + <% + if (displayFlag.equalsIgnoreCase("Y")) { + + %> + + +
+
+
+ + + + + + + + + + + + + + + + + <% for (int i = 0; i < alPurchaseDetailBean.size(); i++) { + purchaseDetailBeanObj = alPurchaseDetailBean.get(i); + %> + + + + + + + + + + + + <%}%> + +
Member IdMember NameProduct NameQuantityPriceTotalPurchase Date
+
+

+ +
+ + + <% }%> + + + + +
+ + +
+ + + diff --git a/IPKS_Updated/web/web/web/Report_gen_monthly.jsp b/IPKS_Updated/web/web/web/Report_gen_monthly.jsp new file mode 100644 index 0000000..a096b06 --- /dev/null +++ b/IPKS_Updated/web/web/web/Report_gen_monthly.jsp @@ -0,0 +1,226 @@ +<%-- + Document : Trading_Report + Created on : January 31, 2017, 5:18:24 PM + Author : 986137 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBeanReportBean"%> +<%@page import="java.util.Date"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.ArrayList" %> +<%@page import="java.lang.String" %> +<% try { +%> + + + + + + + + + + + + + + + + + DEPOSIT RETURN REPORT + + + + + <% + String ModuleName = new String(); + + ModuleName = (String) session.getAttribute("moduleName"); + %> + <% if (ModuleName.equalsIgnoreCase("KCC")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Deposit")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Loan")) {%> + + <%}%> +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankNA(String s) { + return (s == null) ? "NA" : s; + } + %> + + <% + String pacsId = (String) session.getAttribute("pacsId"); + String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + Object oReportBeanObj = request.getAttribute("oReportBeanObj"); + ReportBean oReportBean = new ReportBean(); + if (oReportBeanObj != null) { + oReportBean = (ReportBean) request.getAttribute("oReportBean"); + session.setAttribute("oReportBeanObj", oReportBeanObj); + } + %> + +
+
+ Deposit Return Report + +
+
+ + <%if (request.getAttribute("error") != null) {%> + + <%}%> + + + + + + + + + + + + + + + + + + + + + +
<%=request.getAttribute("error").toString()%>
From Date *:
To Date *:
Sub-PACS Name:




+
+
+ +
+ + +
+ + + + + + +
+
+
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Reports.jsp b/IPKS_Updated/web/web/web/Reports.jsp new file mode 100644 index 0000000..b8d4dee --- /dev/null +++ b/IPKS_Updated/web/web/web/Reports.jsp @@ -0,0 +1,125 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> +<%@page import="net.sfreports.engine.export.JRTextExporterParameter"%> +<%@page import="net.sfreports.engine.export.JRTextExporter"%> +<%@page import="net.sfreports.engine.export.JRCsvExporterParameter"%> +<%@page import="net.sfreports.engine.export.JRCsvExporter"%> +<%@page import="net.sfreports.engine.JRExporterParameter"%> +<%@page import="net.sfreports.engine.export.JRHtmlExporter"%> +<%@page import="net.sfreports.engine.export.JRHtmlExporterParameter"%> +<%@page import="net.sfreports.engine.export.JRPdfExporter"%> +<%@page import="net.sfreports.engine.export.JRPdfExporterParameter"%> +<%@page import="net.sfreports.engine.export.JRXlsExporter"%> +<%@page import="net.sfreports.engine.export.JRXlsExporterParameter"%> +<%@page import="net.sfreports.j2ee.servlets.ImageServlet"%> +<%@page import="java.util.Map"%> +<%@page import="java.util.HashMap"%> +<%@page import="java.io.*"%> +<%@page import="java.util.zip.*"%> + + + + + + Report + + + + + <% + out.clear(); + out.clearBuffer(); + long startTime = System.currentTimeMillis(); + if ("C".equalsIgnoreCase(request.getParameter("DOWNLOAD"))) { + JRCsvExporter csvExporter = new JRCsvExporter(); + csvExporter.setParameter(JRCsvExporterParameter_PRINT, request.getAttribute("reportBody")); + csvExporter.setParameter(JRExporterParameter.OUTPUT_WRITER, out); + response.setContentType("application/octet-stream"); + String fileName = (String) request.getAttribute("fileName"); + response.setHeader("Content-Disposition", fileName); + csvExporter.exportReport(); + response.flushBuffer(); + response.reset(); + + } else if ("T".equalsIgnoreCase(request.getParameter("DOWNLOAD"))) { + char PAGE_BREAK = 12; + JRTextExporter textExporter = new JRTextExporter(); + textExporter.setParameter(JRTextExporterParameter_PRINT, request.getAttribute("reportBody")); + textExporter.setParameter(JRTextExporterParameter.OUTPUT_WRITER, out); + textExporter.setParameter(JRTextExporterParameter.PAGE_HEIGHT, new Integer(53)); + textExporter.setParameter(JRTextExporterParameter.PAGE_WIDTH, new Integer(130)); + textExporter.setParameter(JRTextExporterParameter.BETWEEN_PAGES_TEXT, String.valueOf(PAGE_BREAK)); + response.setContentType("text/html"); + String fileName = (String) request.getAttribute("fileName"); + response.setHeader("Content-Disposition", fileName); + textExporter.exportReport(); + response.flushBuffer(); + response.reset(); + + } else if ("P".equalsIgnoreCase(request.getParameter("DOWNLOAD"))) { + JRPdfExporter pdfExporter = new JRPdfExporter(); + pdfExporter.setParameter(JRPdfExporterParameter_PRINT, request.getAttribute("reportBody")); + + pdfExporter.setParameter(JRPdfExporterParameter.OUTPUT_STREAM, response.getOutputStream()); + response.setContentType("application/pdf"); + + String fileName = (String) request.getAttribute("fileName"); + response.setHeader("Content-Disposition", fileName); + pdfExporter.exportReport(); + + response.flushBuffer(); + response.reset(); + + }//Added By SUBHAM For Excel Format on 26/09/2014 + else if ("E".equalsIgnoreCase(request.getParameter("DOWNLOAD"))) { + // coding For Excel: + JRXlsExporter exporterXLS = new JRXlsExporter(); + exporterXLS.setParameter(JRXlsExporterParameter_PRINT, request.getAttribute("reportBody")); + exporterXLS.setParameter(JRXlsExporterParameter.OUTPUT_STREAM, response.getOutputStream()); + exporterXLS.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE); + exporterXLS.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE); + exporterXLS.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE); + exporterXLS.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE); + // SET THE MIME TYPE. + response.setContentType("application/vnd.ms-excel"); + // set content dispostion to attachment in with file name. + // case the open/save dialog needs to appear. + String fileName = (String) request.getAttribute("fileName"); + response.setHeader("Content-Disposition", fileName); + exporterXLS.exportReport(); + response.flushBuffer(); + response.reset(); + } //Added By SUBHAM For Excel Format + else { + JRHtmlExporter exporter = new JRHtmlExporter(); + Map imagesMap = new HashMap(); + request.getSession().setAttribute("IMAGES_MAP", imagesMap); + exporter.setParameter(JRHtmlExporterParameter.IMAGES_MAP, imagesMap); + exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "image.jsp?image="); + exporter.setParameter(JRExporterParameter_PRINT, request.getAttribute("reportBody")); + exporter.setParameter(JRExporterParameter.OUTPUT_WRITER, out); + exporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, Boolean.FALSE); + exporter.setParameter(JRHtmlExporterParameter.IS_WRAP_BREAK_WORD, Boolean.TRUE); + //exporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, Boolean.FALSE); + //exporter.setParameter(JRHtmlExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.TRUE); + //exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI,ContextLoader.getCurrentWebApplicationContext().getServletContext().getContextPa??th() + "/image?image="); + //exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "../image?image="); + //exporter.setParameter(JRHtmlExporterParameter.IMAGES_MAP, imagesMap); exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "image.jsp?image="); + //exporter.setParameter(JRHtmlExporterParameter.IMAGES_DIR_NAME, "//images/"); + //exporter.setParameter(JRHtmlExporterParameter.IS_OUTPUT_IMAGES_TO_DIR, Boolean.TRUE); + + exporter.exportReport(); + //response.flushBuffer(); + //response.reset(); + } + + + + long endTime = System.currentTimeMillis(); + //Logger errorLog = Logger.getLogger("ERRORLOG"); + //errorLog.fatal("REPORT RENDERED="+request.getParameter("reportPath")+", TIME TAKEN="+(endTime-startTime)); + + + %> + + + \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Reports/25473.png b/IPKS_Updated/web/web/web/Reports/25473.png new file mode 100644 index 0000000..d612a83 Binary files /dev/null and b/IPKS_Updated/web/web/web/Reports/25473.png differ diff --git a/IPKS_Updated/web/web/web/ResetLogin.jsp b/IPKS_Updated/web/web/web/ResetLogin.jsp new file mode 100644 index 0000000..70b61c1 --- /dev/null +++ b/IPKS_Updated/web/web/web/ResetLogin.jsp @@ -0,0 +1,144 @@ +<%-- + Document : ResetLogin + Created on : Jun 19, 2018, 5:18:08 PM + Author : 1004242 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + Reset Login Status + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("error"); + if (error != null) { + error_msg = error.toString();%> + + <% } + + %> + + + + + + + <% + String ModuleName = new String(); + + ModuleName = (String) session.getAttribute("moduleName"); + String role = (String) session.getAttribute("userRole"); + String pacsId = (String) session.getAttribute("pacsId"); + + %> + <% if (ModuleName.equalsIgnoreCase("KCC")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("pds")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("trading")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("asset")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("governance")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("dashboard")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("shg")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Deposit")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Loan")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("eod")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("dds")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("share")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("Special")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialKcc")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBoth")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBothKcc")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBothDep")) {%> + + <%}%> +
+ +
+
+ +
+

Use this feature in case of account gets locked due to inappropriate logout procedure.

+
+
+ + + + + + + + + + + + + + + + +
Enter User Id:
  
+ + +
+
         <%= error_msg%>
+
+
+
+
+ + + diff --git a/IPKS_Updated/web/web/web/Share_Module/MenuHead_Share.jsp b/IPKS_Updated/web/web/web/Share_Module/MenuHead_Share.jsp new file mode 100644 index 0000000..35ae7de --- /dev/null +++ b/IPKS_Updated/web/web/web/Share_Module/MenuHead_Share.jsp @@ -0,0 +1,225 @@ +<%-- + Document : MenuHead_Share + Created on : Jan 5, 2017, 4:59:04 PM + Author : 986517 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.*"%> + + +<% + String userName = new String(); + String pacsName = new String(); + String userRole = new String(); + String RoleName = new String(); + String sysDt = new String(); + + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select to_char(SYSTEM_DATE,'Month DD, YYYY') from system_date"); + while (rs.next()) { + sysDt = rs.getString(1); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + + userName = (String) session.getAttribute("UserName"); + userName = userName.toUpperCase(); + pacsName = (String) session.getAttribute("pacsName"); + userRole = (String) session.getAttribute("userRole"); + RoleName = (String) session.getAttribute("RoleName"); + + +String moduleName = new String(); + moduleName = (String) session.getAttribute("moduleName"); + + +%> + +
+ +
+ Image - PACS +
+ +
+
User Name:
<%=userName%>
+
Date:
<%=sysDt%>
+
PACS Name/ Bank Name:
<%=pacsName%>
+ +
User Type:
<%=RoleName%>
+
Module Name:
<%=moduleName.toUpperCase()%>
+ + +
+ +
+ + + +
+ + diff --git a/IPKS_Updated/web/web/web/Share_Module/dividendpayout.jsp b/IPKS_Updated/web/web/web/Share_Module/dividendpayout.jsp new file mode 100644 index 0000000..bde39fc --- /dev/null +++ b/IPKS_Updated/web/web/web/Share_Module/dividendpayout.jsp @@ -0,0 +1,246 @@ +<%-- + Document : dividendpayout + Created on : Aug 3, 2015, 2:23:35 PM + Author : Administrator +--%> +<%@page import="DataEntryBean.ShareAccountCreationBean"%> +<% try { +%> + + + Dividend Payout + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object ShareAccountCreationBeanObj = request.getAttribute("ShareAccountCreationBeanObj"); + ShareAccountCreationBean oShareAccountCreationBean = new ShareAccountCreationBean(); + if (ShareAccountCreationBeanObj != null) { + oShareAccountCreationBean = (ShareAccountCreationBean) request.getAttribute("ShareAccountCreationBeanObj"); + + } + %> + + + <%--changed on 26/4/24
+ Dividend Payout--%> +
+ Dividend Payout +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Share Account Number*:
Saving Account No*:
Available Share Balance*:
Divident Amount*:
Narration*:
+
+
+
+ +
+ + +
+ + +
+
+ + +
+
+ + + +<% } catch (Exception e) { + + } +%> + diff --git a/IPKS_Updated/web/web/web/Share_Module/shareOperations.jsp b/IPKS_Updated/web/web/web/Share_Module/shareOperations.jsp new file mode 100644 index 0000000..7a1aaaf --- /dev/null +++ b/IPKS_Updated/web/web/web/Share_Module/shareOperations.jsp @@ -0,0 +1,225 @@ +<%-- + Document : gl + Created on : Aug 3, 2015, 2:23:35 PM + Author : Administrator +--%> +<%@page import="DataEntryBean.ShareAccountCreationBean"%> +<% try { +%> + + + Share Operations + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object ShareAccountCreationBeanObj = request.getAttribute("ShareAccountCreationBeanObj"); + ShareAccountCreationBean oShareAccountCreationBean = new ShareAccountCreationBean(); + if (ShareAccountCreationBeanObj != null) { + oShareAccountCreationBean = (ShareAccountCreationBean) request.getAttribute("ShareAccountCreationBeanObj"); + + } + %> + + +
+ SHARE OPERATIONS + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Share Account Number:
Share Membership No:
Share Value:
Share Amount to be paid:
No. of Share:
+ +
+
+ + +
+ + +
+
+ + + + +
+
+ + + +<% } catch (Exception e) { + + } +%> + + + + + diff --git a/IPKS_Updated/web/web/web/Share_Module/share_reports.jsp b/IPKS_Updated/web/web/web/Share_Module/share_reports.jsp new file mode 100644 index 0000000..3808adb --- /dev/null +++ b/IPKS_Updated/web/web/web/Share_Module/share_reports.jsp @@ -0,0 +1,525 @@ +<%-- + Document : share_reports + Created on : Oct 30, 2017, 4:17:20 PM + Author : 981898 +--%> + + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="java.util.Date"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.ArrayList" %> +<%@page import="java.lang.String" %> +<% try { +%> + + + + + + + + + + + + + + + + + + + + + + Share Report + + + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankNA(String s) { + return (s == null) ? "NA" : s; + } + %> + <% + // String pacsval = request.getParameter("subpacs_id"); + // String pacsvalue1 = (String) session.getAttribute("pacsvalue"); + //String pacsval = (String) session.getAttribute("subpacs_id"); + //System.out.println(pacsval); + String name = "abc"; + request.setAttribute("pacsValueInput", name); + // String pacsvalue1 = (String) session.getAttribute("subpacs"); + String pacsId = (String) session.getAttribute("pacsId"); + String str = pacsId.substring(0, 2); + String dccb = str.replaceFirst("^0+(?!$)", ""); + String br_code = pacsId.substring(2, 5); + System.out.println(dccb + "+" + br_code); + String userRole = (String) session.getAttribute("userRole"); + Object oEnquiryBeanSearchObj = request.getAttribute("oEnquiryBeanSearchObj"); + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + if (oEnquiryBeanSearchObj != null) { + oEnquiryBean = (EnquiryBean) request.getAttribute("oEnquiryBeanSearchObj"); + session.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearchObj); + } + %> + <%String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + %> + +
+ <%--changed on 24/4/23
+ Share Report--%> +
+ Share Report + +
+ + +
+ + + <%if (request.getAttribute("error") != null) {%> + + <%}%> + + + + + + + + + + + + + + + + + + + + + + <%-- <% if (userRole.equalsIgnoreCase("201603000008020")) {%> + + + + + <%} else{%> --%> + + + + + <%-- <%}%> --%> + + <%-- <% if (userRole.equalsIgnoreCase("201603000008020")) {%> + + + <%} else{%> --%> + + + + <%-- <%}%> --%> + +
<%=request.getAttribute("error").toString()%>
Report Name*:
PACS Name:
Sub-PACS Name:
+
+ +


+
+ + + +
+ + + + + + +
+
+
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Share_Module/shareaccountenquiry.jsp b/IPKS_Updated/web/web/web/Share_Module/shareaccountenquiry.jsp new file mode 100644 index 0000000..025fdba --- /dev/null +++ b/IPKS_Updated/web/web/web/Share_Module/shareaccountenquiry.jsp @@ -0,0 +1,508 @@ +<%-- + Document : shareaccountenquiry + Created on : Jan 5, 2017, 4:59:04 PM + Author : 986517 +--%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="java.util.Date"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<% try { +%> + + + + + + + + Share Account Enquiry + + + + + + + + + + + + + + + + + + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankNA(String s) { + return (s == null) ? "NA" : s; + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + Object alEnquiryBeanObj = request.getAttribute("alEnquiryBean"); + ArrayList alEnquiryBean = new ArrayList(); + if (alEnquiryBeanObj != null) { + alEnquiryBean = (ArrayList) request.getAttribute("alEnquiryBean"); + } + %> + <% + String pacsId = (String) session.getAttribute("pacsId"); + Object oEnquiryBeanSearchObj = request.getAttribute("oEnquiryBeanSearchObj"); + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + if (oEnquiryBeanSearchObj != null) { + oEnquiryBean = (EnquiryBean) request.getAttribute("oEnquiryBeanSearchObj"); + session.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearchObj); + } + %> + + + <% + int flag2 = 1; + int curPage = 0; + try { + curPage = Integer.parseInt(request.getAttribute("currentPage").toString()); + } catch (Exception e) { + curPage = 1; + } + if (alEnquiryBean.size() > 0) { + flag2 = 2; + } + int totalRecordCount = 0; + int recordCount = 0; + + try { + totalRecordCount = Integer.parseInt(request.getAttribute("totalRecordCount").toString()); + recordCount = Integer.parseInt(request.getAttribute("recordCount").toString()); + } catch (Exception e) { + totalRecordCount = 0; + recordCount = 0; + } + totalRecordCount = totalRecordCount + alEnquiryBean.size(); + + %> + <%String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + %> + + + <%--changed on 29/4/24
+ Share Account Enquiry--%> +
+ Share Account Enquiry +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ +
+ <%--
--%> + + + + + + + + + + + + + + <%--changed from right to left--%> + + + + + + + + + + + + + + + + + + + + + + + + +
Account Number:      Product Name*: +

From Date:      To Date:

Search By CIF: Sub-PACS Name:

+

+
+ + +
+


+ + + + "> + + + + "> + + +
+ + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+
+ + + + + + + + + + + + + + + + + + + + <% + oEnquiryBean = null; + + for (int i = 0; i < alEnquiryBean.size(); i++) { + oEnquiryBean = alEnquiryBean.get(i); + %> + + + + + + + + + + + + + + + + + + + + <%}%> + + +
Account NumberCustomer NumberMember NameAccount Open DateMembership NumberShare ClassShare ValueNumber of ShareShare Amount PaidShare Amount Due
<%=blankNull(oEnquiryBean.getAccountNo())%><%=blankNull(oEnquiryBean.getCustomerNo())%><%=blankNull(oEnquiryBean.getCustomerName())%><%=blankNull(oEnquiryBean.getAccountOpenDate())%><%=blankNull(oEnquiryBean.getMemberno())%><%=blankNull(oEnquiryBean.getShareclass())%><%=blankNull(oEnquiryBean.getSharevalue())%><%=blankNull(oEnquiryBean.getShareno())%><%=blankNull(oEnquiryBean.getShareamt())%><%=blankNull(oEnquiryBean.getSharedue())%>
+
+

+ + <%--For displaying Previous link except for the 1st page --%> + + + <% if (curPage > 1 && flag2 == 2) {%> +
+ <% }%> + <% if (flag2 == 2) {%> + + <% if (curPage == 1) {%> + + <% } + }%> + +


+ + + +
+
+ <%}%> +
+ + +<% } catch (Exception e) { + + } +%> + + + + + diff --git a/IPKS_Updated/web/web/web/Share_Module/shareaccounttransaction.jsp b/IPKS_Updated/web/web/web/Share_Module/shareaccounttransaction.jsp new file mode 100644 index 0000000..e62e0fc --- /dev/null +++ b/IPKS_Updated/web/web/web/Share_Module/shareaccounttransaction.jsp @@ -0,0 +1,1132 @@ +<%-- + Document : ADHOC transaction + Created on : Aug 3, 2015, 2:23:35 PM + Author : Administrator +--%> +<%@page import="DataEntryBean.transactionOperationBean"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + Buy/Sell Share + + + + + + + + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + <% String odeno2000 = ""; + String odeno500 = ""; + String odeno200 = ""; + String odeno100 = ""; + String odeno50 = ""; + String odeno20 = ""; + String odeno10 = ""; + String odeno5 = ""; + String odeno2 = ""; + String odeno1 = ""; + String status = "C"; + String odeno50P = ""; + String odeno1P = ""; + String pacsid = (String) session.getAttribute("pacsId"); + String makerId = session.getAttribute("user").toString(); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select nvl(d.deno_2000,0),nvl(d.deno_500,0),nvl(d.deno_100,0),nvl(d.deno_50,0),nvl(d.deno_20,0),nvl(d.deno_10,0),nvl(d.deno_5,0),nvl(d.deno_2,0),nvl(d.deno_1,0),nvl(d.DENO_50P,0),nvl(d.DENO_1P,0),d.status,nvl(d.deno_200,0) from cash_drawer d where d.entry_date = (select system_date from system_date) and d.teller_id ='" + makerId + "' and d.pacs_id ='" + pacsid + "' "); + + while (rs.next()) { + odeno2000 = rs.getString(1); + odeno500 = rs.getString(2); + odeno100 = rs.getString(3); + odeno50 = rs.getString(4); + odeno20 = rs.getString(5); + odeno10 = rs.getString(6); + odeno5 = rs.getString(7); + odeno2 = rs.getString(8); + odeno1 = rs.getString(9); + odeno50P = rs.getString(10); + odeno1P = rs.getString(11); + status = rs.getString(12); + odeno200 = rs.getString(13); + + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + %> + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + + + <%-- added on 23/4/24
+ Buy/Sell Share--%> +
+ Buy/Sell Share +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DenominationsAvailableINOUT
+
+
+ +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Select Transaction Type*: +
Account Number*:

Customer Name:Share Amount Due:
Number of Share Bought:Share Value:

Number of Share*:
Payment Mode*:
Transaction Amount*:
Transaction Narration*:
+
+

+ +
+ + +
+
+ + + +
+
+ + + + +<% } catch (Exception e) { + + } +%> + + + + + diff --git a/IPKS_Updated/web/web/web/Share_Module/sharevaluecreation.jsp b/IPKS_Updated/web/web/web/Share_Module/sharevaluecreation.jsp new file mode 100644 index 0000000..94b1b67 --- /dev/null +++ b/IPKS_Updated/web/web/web/Share_Module/sharevaluecreation.jsp @@ -0,0 +1,210 @@ +<%-- + Document : gl + Created on : Aug 3, 2015, 2:23:35 PM + Author : Administrator +--%> +<%@page import="DataEntryBean.ShareAccountCreationBean"%> +<% try { +%> + + + Share value + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object ShareAccountCreationBeanObj = request.getAttribute("ShareAccountCreationBeanObj"); + ShareAccountCreationBean oShareAccountCreationBean = new ShareAccountCreationBean(); + if (ShareAccountCreationBeanObj != null) { + oShareAccountCreationBean = (ShareAccountCreationBean) request.getAttribute("ShareAccountCreationBeanObj"); + + } + %> + + +
+ SHARE VALUE CREATION + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Account Type:
Share Value:
Percentage to be deducted:%
Percentage of Dividend:%
+ +
+
+ + +
+ + +
+
+ + + + +
+
+ + + +<% } catch (Exception e) { + + } +%> + + + + + diff --git a/IPKS_Updated/web/web/web/Shg_JSP/AccountDetails.jsp b/IPKS_Updated/web/web/web/Shg_JSP/AccountDetails.jsp new file mode 100644 index 0000000..3704bd8 --- /dev/null +++ b/IPKS_Updated/web/web/web/Shg_JSP/AccountDetails.jsp @@ -0,0 +1,2039 @@ +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.AccountDetailsBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + + + Account Details + + + + + + + + + + + + + + + + <% + + int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + Object oAccountDetailsBeanObj = request.getAttribute("AccountDetailsBeanObj"); + AccountDetailsBean oAccountDetailsBean = new AccountDetailsBean(); + if (oAccountDetailsBeanObj != null) { + oAccountDetailsBean = (AccountDetailsBean) request.getAttribute("AccountDetailsBeanObj"); + + } + %> + <% + Object alAccountDetailsBeanObj = request.getAttribute("alAccountDetailsBean"); + ArrayList alAccountDetailsBean = new ArrayList(); + if (alAccountDetailsBeanObj != null) { + alAccountDetailsBean = (ArrayList) request.getAttribute("alAccountDetailsBean"); + + } + %> + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + String checkoption3 = ""; + Object check3 = request.getAttribute("checkoption3"); + if (check3 != null) { + checkoption3 = check3.toString(); + } + String checkoption4 = ""; + Object check4 = request.getAttribute("checkoption4"); + if (check4 != null) { + checkoption4 = check4.toString(); + } + String checkoption5 = ""; + Object check5 = request.getAttribute("checkoption5"); + if (check5 != null) { + checkoption5 = check5.toString(); + } + String checkoption = ""; + Object check = request.getAttribute("checkoption"); + if (check != null) { + checkoption = check.toString(); + } + %> + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + +
+ + Account Details: +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +
+
+
Operation Selection: + +
+ + <%-- Create Seaction --%> + + + + + + + <%-- Amend Seaction --%> + + + + + <%--if (checkoption.equalsIgnoreCase("amend")) { + --%> + + <%if (checkoption3.equalsIgnoreCase("loan1")) { + %> + + <%----%> + +
+ + +

+ + + + + + + + +
Account Selection: +
+ SHG Code:
Name Of SHG:
+
+ +
+

+
+ + + + + + + + + + + + + + + + + + + <% + oAccountDetailsBean = new AccountDetailsBean(); + count = 0; + + for (int i = 0; i < alAccountDetailsBean.size(); i++) { + oAccountDetailsBean = alAccountDetailsBean.get(i); + + count++; + + %> + + + + + + + + + + + + + + + + <%}%> + +
SourceBank NameAccount NumberAccount Open DateLast Disbursement DateLoan AmountPrincipal OutstandingPrincipal PaidInterest OutstandingInterest Paid
disabled <%}%>> +
+
+

+ All fields are mandatory +
+ + + + + +
+ +
+<%}%> <%if (checkoption3.equalsIgnoreCase("deposit1")) { +%> +<%----%> + +
+
+ + +

+ + + + + + + + +
Account Selection: +
+ SHG Code:
Name Of SHG:
+
+
+ + + + + + + + + + + + + + + <% + oAccountDetailsBean = new AccountDetailsBean(); + count = 0; + + for (int i = 0; i < alAccountDetailsBean.size(); i++) { + oAccountDetailsBean = alAccountDetailsBean.get(i); + + count++; + + %> + + + + + + + + + + + + + + <%}%> + +
SourceBank NameAccount NumberAccount Open DateOutstanding BalanceInterest AccruedLast Transaction Date
disabled <%}%>>
+
+

+All fields are mandatory +
+ + + + + +
+ +
+<%}%> + +<%-- View Seaction --%> + + + + +<%--if (checkoption.equalsIgnoreCase("amend")) { +--%> + +<%if (checkoption4.equalsIgnoreCase("loan2")) { +%> + +<%----%> + + +
+ + +

+ + + + + + + + +
Account Selection: +
+ SHG Code:
Name Of SHG:
+
+ +
+

+
+
+ + + + + + + + + + + + + + + + + + + <% + oAccountDetailsBean = new AccountDetailsBean(); + count = 0; + + for (int i = 0; i < alAccountDetailsBean.size(); i++) { + oAccountDetailsBean = alAccountDetailsBean.get(i); + + count++; + %> + + + + + + + + + + + + + + + <%}%> + +
SourceBank NameAccount NumberAccount Open DateLast Disbursement DateLoan AmountPrincipal OutstandingPrincipal PaidInterest OutstandingInterest Paid
disabled <%}%>> +
+
+
+

+
+ + +
+ +
+<%}%> <%if (checkoption4.equalsIgnoreCase("deposit2")) { +%> +<%----%> + +
+
+ +

+ + + + + + + + +
Account Selection: +
+ SHG Code:
Name Of SHG:
+
+
+
+ + + + + + + + + + + + + + + <% + oAccountDetailsBean = new AccountDetailsBean(); + count = 0; + + for (int i = 0; i < alAccountDetailsBean.size(); i++) { + oAccountDetailsBean = alAccountDetailsBean.get(i); + + count++; + %> + + + + + + + + + + + + + <%}%> + +
SourceBank NameAccount NumberAccount Open DateOutstanding BalanceInterest AccruedLast Transaction Date
disabled <%}%>>
+
+
+

+
+ + +
+ +
+<%}%> + +<%-- Transaction Seaction --%> + + + + +<%--if (checkoption.equalsIgnoreCase("amend")) { +--%> + +<%if (checkoption5.equalsIgnoreCase("loan3")) { +%> + +<%----%> + + +
+ + +

+ + + + + + + + +
Account Selection +
+ SHG Code:
Name Of SHG:
+
+
+
+ + + + + + + + + + + + + + + <% + oAccountDetailsBean = new AccountDetailsBean(); + count = 0; + + for (int i = 0; i < alAccountDetailsBean.size(); i++) { + oAccountDetailsBean = alAccountDetailsBean.get(i); + + count++; + + %> + + + + + + + + + + + + + <%}%> + +
Transaction Reference No.Account NumberTransaction AmountTransaction TypeTransaction DateMember Name
+
+
+

+
+ + +
+ +<%}%> <%if (checkoption5.equalsIgnoreCase("deposit3")) { +%> +<%----%> + +
+
+ + +

+ + + + + + + + +
Account Selection: +
+ SHG Code:
Name Of SHG:
+
+
+
+ + + + + + + + + + + + + + + <% + oAccountDetailsBean = new AccountDetailsBean(); + count = 0; + + for (int i = 0; i < alAccountDetailsBean.size(); i++) { + oAccountDetailsBean = alAccountDetailsBean.get(i); + + count++; + + %> + + + + + + + + + + + + + <%}%> + +
Transaction Reference No.Account NumberTransaction AmountTransaction TypeTransaction DateMember Name
+
+
+

+
+ + + +
+
+ +<%}%> + +<%-- Member Details Section --%> + +
+
+ + + + + + + + + + +
+ +
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Shg_JSP/AddressDetails.jsp b/IPKS_Updated/web/web/web/Shg_JSP/AddressDetails.jsp new file mode 100644 index 0000000..28d1e69 --- /dev/null +++ b/IPKS_Updated/web/web/web/Shg_JSP/AddressDetails.jsp @@ -0,0 +1,480 @@ +<%-- + Document :AddressDetails + Created on : Apr 20, 2016, 3:16:34 PM + Author : +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="DataEntryBean.AddressDetailsBean"%> +<% try { +%> + + + + + Address Details + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + <% + Object oAddressDetailsBeanObj = request.getAttribute("AddressDetailsBeanObj"); + AddressDetailsBean oAddressDetailsBean = new AddressDetailsBean(); + if (oAddressDetailsBeanObj != null) { + oAddressDetailsBean = (AddressDetailsBean) request.getAttribute("AddressDetailsBeanObj"); + + } + %> + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + +
+ + Address Details +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +
+
+
Operation Selection: + +
+ +

+ + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+ + + + + + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SHG Code*:
District*: + + +
Subdivisions*: + + +
Block/Municipality*: + + +
Panchayat/Ward Number*:
Village*:
Police Station*:
Post Office*:
Pin Code*:


*All fields are mandatory.


+ +

+ +
+ + +
+ +
+ <% }%> + + + + +
+ +
+ + + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Shg_JSP/BasicInformation.jsp b/IPKS_Updated/web/web/web/Shg_JSP/BasicInformation.jsp new file mode 100644 index 0000000..8e62e6d --- /dev/null +++ b/IPKS_Updated/web/web/web/Shg_JSP/BasicInformation.jsp @@ -0,0 +1,450 @@ +<%-- + Document : BasicInformation + Created on : Jul 14, 2016, 10:59:29 AM + Author : 1320029 +--%> + + + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="DataEntryBean.BasicInformationBean"%> +<% try { +%> + + + + + Basic Information + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + <% + Object oBasicInformationBeanObj = request.getAttribute("BasicInformationBeanObj"); + BasicInformationBean oBasicInformationBean = new BasicInformationBean(); + if (oBasicInformationBeanObj != null) { + oBasicInformationBean = (BasicInformationBean) request.getAttribute("BasicInformationBeanObj"); + + } + %> + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + +
+ + Basic Information +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +
+
+
Operation Selection: + +
+ +

+ + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+ + + + + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SHG Code:
CIF Number:
Name of SHG:
Group Category: + +
Date Of Formation:   +
Duration:


*All fields are mandatory.


+ +

+ +
+ + +
+ +
+ <% }%> + + + +
+ +
+ + + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Shg_JSP/MemberDetails.jsp b/IPKS_Updated/web/web/web/Shg_JSP/MemberDetails.jsp new file mode 100644 index 0000000..b854812 --- /dev/null +++ b/IPKS_Updated/web/web/web/Shg_JSP/MemberDetails.jsp @@ -0,0 +1,1040 @@ +<%-- + Document : MemberDetails + Created on : Apr 20, 2016, 3:16:34 PM + Author : +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.MemberDetailsBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + + + Member Details + + + + + + + + + + + + + + + + + <% + int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <% + int malecount = 0; + int femalecount = 0; + int othercount = 0; + int totalcount = 0; + int muslimcount = 0; + int christiancount = 0; + int sikhcount = 0; + int parsicount = 0; + int buddhistcount = 0; + int jaincount = 0; + int otherscount = 0; + + %> + <% + Object oMemberDetailsBeanObj = request.getAttribute("MemberDetailsBeanObj"); + MemberDetailsBean oMemberDetailsBean = new MemberDetailsBean(); + if (oMemberDetailsBeanObj != null) { + oMemberDetailsBean = (MemberDetailsBean) request.getAttribute("MemberDetailsBeanObj"); + + } + %> + <% + Object alMemberDetailsBeanObj = request.getAttribute("alMemberDetailsBean"); + ArrayList alMemberDetailsBean = new ArrayList(); + if (alMemberDetailsBeanObj != null) { + alMemberDetailsBean = (ArrayList) request.getAttribute("alMemberDetailsBean"); + + } + %> + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + +
+ + Member Details +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +
+
+
Operation Selection + +
+ + + +

+ + + + <%if (displayFlag.equalsIgnoreCase("Y")) { + %> + + +
+
+ + + + + + + + + + + + + + + + + + + <% + oMemberDetailsBean = new MemberDetailsBean(); + count = 0; + String lastUpdate=""; + + for (int i = 0; i < alMemberDetailsBean.size(); i++) { + oMemberDetailsBean = alMemberDetailsBean.get(i); + lastUpdate=blankNull(oMemberDetailsBean.getAmend_date()); + count++; + + %> + + + + + + + + + + + + + + + + + <%}%> + + +
CIF NumberMember NameGenderDate Of BirthGuardian NameAddressReligionCasteQualificationEntry Date
+ +
+
+
+ <%=blankNull(oMemberDetailsBean.getAmend_date())%> +

+ All fields are mandatory +
+ + + + + + +
+

+
+ <% }%> + + + + + + + +
+ +
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Shg_JSP/MenuHead_SHG.jsp b/IPKS_Updated/web/web/web/Shg_JSP/MenuHead_SHG.jsp new file mode 100644 index 0000000..a3474d8 --- /dev/null +++ b/IPKS_Updated/web/web/web/Shg_JSP/MenuHead_SHG.jsp @@ -0,0 +1,150 @@ +<%-- + Document : MenuHead_SHG + Created on : Apr 20, 2016, 3:19:56 PM + Author : 590685 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.*"%> + +<% + String userName = new String(); + String pacsName = new String(); + String userRole = new String(); + String RoleName = new String(); + String sysDt = new String(); + + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select to_char(SYSTEM_DATE,'Month DD, YYYY') from system_date"); + while (rs.next()) { + sysDt = rs.getString(1); + } + //statement.close(); + //connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + } + + userName = (String) session.getAttribute("UserName"); + userName = userName.toUpperCase(); + pacsName = (String) session.getAttribute("pacsName"); + userRole = (String) session.getAttribute("userRole"); + RoleName = (String) session.getAttribute("RoleName"); + + String moduleName = new String(); + moduleName = (String) session.getAttribute("moduleName"); + +%> + +
+ +
+ Image - PACS +
+ +
+
User Name:
<%=userName%>
+
Date:
<%=sysDt%>
+
PACS Name:
<%=pacsName%>
+ +
User Type:
<%=RoleName%>
+
Module Name:
<%=moduleName.toUpperCase()%>
+ +
+ +
+ + +
+ diff --git a/IPKS_Updated/web/web/web/Shg_JSP/ShgActivities.jsp b/IPKS_Updated/web/web/web/Shg_JSP/ShgActivities.jsp new file mode 100644 index 0000000..0fb6cc2 --- /dev/null +++ b/IPKS_Updated/web/web/web/Shg_JSP/ShgActivities.jsp @@ -0,0 +1,766 @@ +<%-- + Document :ShgActivities + Created on : Apr 20, 2016, 3:16:34 PM + Author : +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="DataEntryBean.ShgActivitiesBean"%> +<% try { +%> + + + SHG Activities + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <% + Object oShgActivitiesBeanObj = request.getAttribute("ShgActivitiesBeanObj"); + ShgActivitiesBean oShgActivitiesBean = new ShgActivitiesBean(); + if (oShgActivitiesBeanObj != null) { + oShgActivitiesBean = (ShgActivitiesBean) request.getAttribute("ShgActivitiesBeanObj"); + + } + %> + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + +
+ + SHG Activities +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +
+
+
Operation Selection: + +
+ +

+ + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+ + + + + + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SHG Code*:

President Details :

  Name*:
  Occupation*:
  Mobile*:

Secretary Details:

  Name*:
  Occupation*:
  Mobile*:

Treasurer Details:

  Name*:
  Occupation*:
  Mobile*:

Other Details:

  Economic Activities Of Group:
    Group Meeting: + checked <%}%> >Regular + checked <%}%> >Irregular + checked <%}%>>Never +
    Committees's Resolution Book: + checked <%}%> >Yes + checked <%}%> >No + +
    Committees's Loan Register: + checked <%}%> >Yes + checked <%}%>>No + +
    Committees's Cash Book: + checked <%}%> >Yes + checked <%}%> >No + +
    Committees's Savings Book: + checked <%}%> >Yes + checked <%}%>>No + +
    Committees's Other Register/Book: + checked <%}%> >Yes + checked <%}%>>No + +


*All fields are mandatory.


+ +

+ +
+ + +
+ +
+ <% }%> + + + + +
+ +
+ + + + <% } catch (Exception e) { + + } + %> diff --git a/IPKS_Updated/web/web/web/Shg_JSP/shg_reports.jsp b/IPKS_Updated/web/web/web/Shg_JSP/shg_reports.jsp new file mode 100644 index 0000000..d5081bb --- /dev/null +++ b/IPKS_Updated/web/web/web/Shg_JSP/shg_reports.jsp @@ -0,0 +1,589 @@ + +<%-- + Document : PACS_REPORT + Created on : Sep 17, 2015, 12:59:59 PM + Author : 454222 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.ArrayList" %> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="java.util.Date"%> +<%@page import="java.util.ArrayList" %> +<%@page import="java.lang.String" %> +<% try { +%> + + + + + + + + + + + + + + + + <% + String pacsId = (String) session.getAttribute("pacsId"); + String userRole = (String) session.getAttribute("userRole"); + Object oEnquiryBeanSearchObj = request.getAttribute("oEnquiryBeanSearchObj"); + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + if (oEnquiryBeanSearchObj != null) { + oEnquiryBean = (EnquiryBean) request.getAttribute("oEnquiryBeanSearchObj"); + session.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearchObj); + } + %> + <%String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankNA(String s) { + return (s == null) ? "NA" : s; + } + %> + + SHG Report + + + + + +
+
+
+ SHG Report + +
+
+ + + <%if (request.getAttribute("error") != null) {%> + + <%}%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
<%=request.getAttribute("error").toString()%>
Report Name*:




+ +
+ + + + + + + + + + +
+
+ + + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/ShowCCODDetails.jsp b/IPKS_Updated/web/web/web/ShowCCODDetails.jsp new file mode 100644 index 0000000..cf8aa9d --- /dev/null +++ b/IPKS_Updated/web/web/web/ShowCCODDetails.jsp @@ -0,0 +1,136 @@ +<%-- + Document : CC_OD + Created on : Aug 5, 2015, 12:51:24 PM + Author : Administrator +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@page import="DataEntryBean.CcOdBean"%> + + + + CC OD Account Details + + + + + + + + + + + + + + + + + + + +

+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + CcOdBean CcOdBean = (CcOdBean) request.getAttribute("oCcOdBeanObj"); + %> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Account Number + Customer Name +
Account Type + Sub Cat +
Product Description + Outstanding +
Current Status + Intt Accrued +
Per Day Interest + Limit Amount +
Account Opening Date + NPA Date +
Limit Expiry Date + Amt Of Irregularity +
Effective DP + Intt Rate +
Expiry Rate + New IRAC Status +
Land Register(Land In Acre) +
 
 
+ + +
+
+ + + diff --git a/IPKS_Updated/web/web/web/ShowCifDetails.jsp b/IPKS_Updated/web/web/web/ShowCifDetails.jsp new file mode 100644 index 0000000..e8c602e --- /dev/null +++ b/IPKS_Updated/web/web/web/ShowCifDetails.jsp @@ -0,0 +1,196 @@ +<%-- + Document : CifDetails + Created on : Aug 3, 2015, 2:23:35 PM + Author : Administrator +--%> + +<%@page import="DataEntryBean.CustomerInfBean"%> + + + + CIF Details + + + + + + + + + + + + + + + + + + + + + + <%! + String blankNull(String s){ + return(s==null)?"":s; + } + %> + <% + CustomerInfBean CustomerInfBean=(CustomerInfBean) request.getAttribute("oCustomerInfBeanobj"); + %> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Customer Name and Address
CIF Details:*
Customer Type:*
Title:*
First Name:*
Middle Name:
Last Name:*
Father/Spouse Name:
User Mother's Maiden Name:
Door/Flat No;Building/Society:*
Block:
Gram Panchayet:*
District:
City/Town:* State:*
Country Post Code:*
Language Phone(Home)
Date Of Birth:* Phone(Business)
Gender Code:* Mobile No:
Marital Status: Fax No:
Nationality: Domicile:
Occupancy: Resident Status:


+
+ + +
+
+

"*" fields are mandatory

+ + + + diff --git a/IPKS_Updated/web/web/web/ShowIdentificationDetails.jsp b/IPKS_Updated/web/web/web/ShowIdentificationDetails.jsp new file mode 100644 index 0000000..303926d --- /dev/null +++ b/IPKS_Updated/web/web/web/ShowIdentificationDetails.jsp @@ -0,0 +1,210 @@ +<%-- + Document : IdentificationDetails + Created on : Aug 3, 2015, 2:25:40 PM + Author : Administrator +--%> + +<%@page import="DataEntryBean.CustomerIdentificationBean"%> + + + + Identification Details + + + + + + + + + + + + + + + + + + + + + <%! + String blankNull(String s){ + return(s==null)?"":s; + } + %> + + <% + CustomerIdentificationBean CustomerIdentificationBean=(CustomerIdentificationBean) request.getAttribute("oCustomerIdentificationBeanObj"); + %> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Identification
CIF Details:*
First ID Type:
ID Issued at:
Remark:
First ID No:*ID Issue Date:
Second ID Type:
Second ID No:Relationship Manager:
Home Branch:Customer Evalution Rate:
Introducer:
Internet Banking Details
Request For INB: Email ID:
Email Address:
Internet Banking Ref:
Visa Details
Visa Details:
Vise Issued By:
Visa Issue Date: Visa Expiry Date:
Customer Risk
Domestic Risk:*
Country Risk:
Cross Border Risk:*
Customer Details
Segment Code: Locker Holder:
CIS Organisation Code: TFN Indicator:


+
+ + +
+ +
+

"*" fields are mandatory

+ + + diff --git a/IPKS_Updated/web/web/web/StandingInstructionCreation.jsp b/IPKS_Updated/web/web/web/StandingInstructionCreation.jsp new file mode 100644 index 0000000..a95d388 --- /dev/null +++ b/IPKS_Updated/web/web/web/StandingInstructionCreation.jsp @@ -0,0 +1,775 @@ +<%-- + Document : StandingInstructionCreation + Created on : Dec 28, 2016, 4:36:14 PM + Author : 986137 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.StandingInstructionBean" %> +<%@page import="DataEntryBean.BatchProcessingBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.sql.SQLException"%> +<%@page import="java.lang.Math" %> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Standing Instruction Creation + + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% + String ModuleName = new String(); + + ModuleName = (String) session.getAttribute("moduleName"); + %> + + <% + Object StandingInstructionBeanobj = request.getAttribute("oStandingInstructionBeanObj"); + StandingInstructionBean oStandingInstructionBean = new StandingInstructionBean(); + if (StandingInstructionBeanobj != null) { + oStandingInstructionBean = (StandingInstructionBean) request.getAttribute("oStandingInstructionBeanObj"); + + } + %> + + <% + int count = 1; + + Object alBatchProcessingBeanObj = request.getAttribute("alBatchProcessingBean"); + ArrayList alBatchProcessingBean = new ArrayList(); + BatchProcessingBean oBatchProcessingBean = new BatchProcessingBean(); + if (alBatchProcessingBeanObj != null) { + alBatchProcessingBean = (ArrayList) request.getAttribute("alBatchProcessingBean"); + + } + error = request.getAttribute("batchID"); + String batchID = ""; + if (request.getAttribute("batchID") != null) { + batchID = error.toString(); + } + %> + + <% Object alEnquiryBeanObj = request.getAttribute("alEnquiryBean"); + ArrayList alEnquiryBean = new ArrayList(); + if (alEnquiryBeanObj != null) { + alEnquiryBean = (ArrayList) request.getAttribute("alEnquiryBean"); + } + %> + <% + String pacsId = (String) session.getAttribute("pacsId"); + Object oEnquiryBeanSearchObj = request.getAttribute("oEnquiryBeanSearchObj"); + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + if (oEnquiryBeanSearchObj != null) { + oEnquiryBean = (EnquiryBean) request.getAttribute("oEnquiryBeanSearchObj"); + session.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearchObj); + } + %> + + <%if (ModuleName.equalsIgnoreCase("Deposit")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Loan")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBothKcc")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBothDep")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBoth")) {%> + + <%}%> +
+ +
+ Standing Instruction Operation +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
Operation Selection: + +
+
+ + + + + + + <% if (displayFlag.equalsIgnoreCase("Y")) {%> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
  
  
 
Start Date:
End Date:
Amount:
Chase Days:
+
+ + +
+
+ <%}%> + + + +
+
+ + + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Trading_JSP/CustomerEnrollment.jsp b/IPKS_Updated/web/web/web/Trading_JSP/CustomerEnrollment.jsp new file mode 100644 index 0000000..70f8e00 --- /dev/null +++ b/IPKS_Updated/web/web/web/Trading_JSP/CustomerEnrollment.jsp @@ -0,0 +1,405 @@ +<%-- + Document : tradingProductCreation + Created on : Apr 20, 2016, 3:16:34 PM + Author : 590685 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + Customer Enrollment + + + + + + + + + + + + + + + + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + +
+ + Customer Enrollment +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +
+
+
Operation Selection: + +
+ +

+ + + + +
+ +
+ + + + diff --git a/IPKS_Updated/web/web/web/Trading_JSP/Godown.jsp b/IPKS_Updated/web/web/web/Trading_JSP/Godown.jsp new file mode 100644 index 0000000..6cd8680 --- /dev/null +++ b/IPKS_Updated/web/web/web/Trading_JSP/Godown.jsp @@ -0,0 +1,373 @@ +<%-- + Document : Godown + Created on : Apr 20, 2016, 3:16:34 PM + Author : 590685 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="DataEntryBean.GodownBean"%> + +<% try { +%> + + + Godown + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object GodownBeanObj = request.getAttribute("GodownBeanObj"); + GodownBean oGodownBean = new GodownBean(); + if (GodownBeanObj != null) { + oGodownBean = (GodownBean) request.getAttribute("GodownBeanObj"); + + } + %> +
+ + Godown +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +
+
+
Operation Selection: + +
+ +

+ + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Godown Name:*  
Address:*   +
Phone Number:*  
Contact Person:*  
Total Capacity:*  
Available Capacity:*  




+ +

+
+ +
+ +
+ <% }%> + + + + +
+ +
+ + + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Trading_JSP/MenuHead_TRADING.jsp b/IPKS_Updated/web/web/web/Trading_JSP/MenuHead_TRADING.jsp new file mode 100644 index 0000000..e26a41f --- /dev/null +++ b/IPKS_Updated/web/web/web/Trading_JSP/MenuHead_TRADING.jsp @@ -0,0 +1,179 @@ +<%-- + Document : MenuHead_TRADING + Created on : Apr 20, 2016, 3:19:56 PM + Author : 590685 +--%> + + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.*"%> + + + +<% + String userName = new String(); + String pacsName = new String(); + String userRole = new String(); + String RoleName = new String(); + String sysDt = new String(); + + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select to_char(SYSTEM_DATE,'Month DD, YYYY') from system_date"); + while (rs.next()) { + sysDt = rs.getString(1); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + + + userName = (String) session.getAttribute("UserName"); + userName = userName.toUpperCase(); + pacsName = (String) session.getAttribute("pacsName"); + userRole = (String) session.getAttribute("userRole"); + RoleName = (String) session.getAttribute("RoleName"); + + +String moduleName = new String(); + moduleName = (String) session.getAttribute("moduleName"); + + +%> + +
+ +
+ Image - PACS +
+ + +
+
User Name:
<%=userName%>
+
Date:
<%=sysDt%>
+
PACS Name:
<%=pacsName%>
+ +
User Type:
<%=RoleName%>
+
Module Name:
<%=moduleName.toUpperCase()%>
+ +
+ +
+ +
+ + + + diff --git a/IPKS_Updated/web/web/web/Trading_JSP/MyIntimation_Trading.jsp b/IPKS_Updated/web/web/web/Trading_JSP/MyIntimation_Trading.jsp new file mode 100644 index 0000000..c056642 --- /dev/null +++ b/IPKS_Updated/web/web/web/Trading_JSP/MyIntimation_Trading.jsp @@ -0,0 +1,373 @@ +<%-- + Document : myIntimation_Trading + Created on : Oct 1, 2021, 2:23:35 PM + Author : 1242938 +--%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.MyIntimationBean"%> + + + + My Intimation + + + + + + + + + + + + + + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + <% + String ModuleName = new String(); + + ModuleName = (String) session.getAttribute("moduleName"); + %> + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + Object alMyIntimationBeanObj = request.getAttribute("alMyIntimationBean"); + ArrayList alMyIntimationBean = new ArrayList(); + if (alMyIntimationBeanObj != null) { + alMyIntimationBean = (ArrayList) request.getAttribute("alMyIntimationBean"); + } + %> + <% + Object oMyIntimationBeanSearchObj = request.getAttribute("oMyIntimationBeanSearchObj"); + MyIntimationBean oMyIntimationBean = new MyIntimationBean(); + MyIntimationBean oMyIntimationBeanSearch = new MyIntimationBean(); + if (oMyIntimationBeanSearchObj != null) { + oMyIntimationBean = (MyIntimationBean) request.getAttribute("oMyIntimationBeanSearchObj"); + + } + %> +
+ My Intimation +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ +
+ Intimation For*: + +
+

+
+
+ + + + + + + + + + + + + + + + + + + +
From Date*:      To Date*: 

Transaction Reference Number:     Transaction Type: +
+

+ + + +
+


+ + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+ + <% if (oMyIntimationBean.getCheckOption().equalsIgnoreCase("TTXN")) {%> +
+ + + + + + + + + + + + + + + + + + + + <% + oMyIntimationBean = null; + + for (int i = 0; i < alMyIntimationBean.size(); i++) { + oMyIntimationBean = alMyIntimationBean.get(i); + %> + + + + + + + + + + + + + + + + + <%}%> + + +
Account NoAccount No2Account BalanceReference NoTransaction DateTransaction TypeAmountSale Purchase Ref IDProduct NameAuthorizer IDAuthorizer's RemarksTransaction Status
+
+ <%} else if (oMyIntimationBean.getCheckOption().equalsIgnoreCase("TTP")) {%> +
+ + + + + + + + + + + + + + + + + <% + oMyIntimationBean = null; + + for (int i = 0; i < alMyIntimationBean.size(); i++) { + oMyIntimationBean = alMyIntimationBean.get(i); + %> + + + + + + + + + + + + + + <%}%> + + +
Reference No.Account No.AmountChargesTransaction DateTransaction TypeAuthorizer IDAuthorizer's RemarksTransaction Status
+
+ <%} else if (oMyIntimationBean.getCheckOption().equalsIgnoreCase("ACC") + || oMyIntimationBean.getCheckOption().equalsIgnoreCase("LACC") || oMyIntimationBean.getCheckOption().equalsIgnoreCase("KCC")) {%> +
+ + + + + + + + + + + + + + + + + <% + oMyIntimationBean = null; + + for (int i = 0; i < alMyIntimationBean.size(); i++) { + oMyIntimationBean = alMyIntimationBean.get(i); + %> + + + + + + + + + + + <%}%> + + +
Reference No.Open A/C No.Transaction DateTransaction TypeAuthorizer IDAuthorizer's RemarksTransaction Status
+
+ + <%}%> + +

+ +
+
+ <%}%> + +
+
+ + diff --git a/IPKS_Updated/web/web/web/Trading_JSP/PaymentAcknowldgement.jsp b/IPKS_Updated/web/web/web/Trading_JSP/PaymentAcknowldgement.jsp new file mode 100644 index 0000000..513becd --- /dev/null +++ b/IPKS_Updated/web/web/web/Trading_JSP/PaymentAcknowldgement.jsp @@ -0,0 +1,1517 @@ +<%-- + Document : tradingProductCreation + Created on : Apr 20, 2016, 3:16:34 PM + Author : 590685 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="DataEntryBean.PaymentAcknowledgementBean"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + Payment Acknowledgment + + + + + + + + + + + + + + + + + + + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + + <% String odeno2000 = ""; + String odeno500 = ""; + String odeno200 = ""; + String odeno100 = ""; + String odeno50 = ""; + String odeno20 = ""; + String odeno10 = ""; + String odeno5 = ""; + String odeno2 = ""; + String odeno1 = ""; + String odeno50P = ""; + String odeno1P = ""; + String status = "C"; + String pacsid = (String) session.getAttribute("pacsId"); + String makerId = session.getAttribute("user").toString(); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select nvl(d.deno_2000,0),nvl(d.deno_500,0),nvl(d.deno_100,0),nvl(d.deno_50,0),nvl(d.deno_20,0),nvl(d.deno_10,0),nvl(d.deno_5,0),nvl(d.deno_2,0),nvl(d.deno_1,0),nvl(d.DENO_50P,0),nvl(d.DENO_1P,0),d.status,nvl(d.deno_200,0) from cash_drawer d where d.entry_date = (select system_date from system_date) and d.teller_id ='" + makerId + "' and d.pacs_id ='" + pacsid + "' "); + + while (rs.next()) { + odeno2000 = rs.getString(1); + odeno500 = rs.getString(2); + odeno100 = rs.getString(3); + odeno50 = rs.getString(4); + odeno20 = rs.getString(5); + odeno10 = rs.getString(6); + odeno5 = rs.getString(7); + odeno2 = rs.getString(8); + odeno1 = rs.getString(9); + odeno50P = rs.getString(10); + odeno1P = rs.getString(11); + status = rs.getString(12); + odeno200 = rs.getString(13); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + %> + + +
+ + Payment Acknowledgement +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DenominationsAvailableINOUT
+
+
+ +
+ +
+ +
+
Operation Selection: + +
+
+ + + + + + + + +
+
+ +
+ + + + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Trading_JSP/PrintStockBarCode.jsp b/IPKS_Updated/web/web/web/Trading_JSP/PrintStockBarCode.jsp new file mode 100644 index 0000000..54bcf13 --- /dev/null +++ b/IPKS_Updated/web/web/web/Trading_JSP/PrintStockBarCode.jsp @@ -0,0 +1,123 @@ +<%-- + Document : PrintStockBarCode + Created on : Jul 26, 2018, 5:16:29 PM + Author : 1004242 +--%> + + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.pdsStockRegisterBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + +
+
+ + + Print Barcode + + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + + +
+ + +
+ + +<% } catch (Exception e) { + + } +%> + diff --git a/IPKS_Updated/web/web/web/Trading_JSP/RaisePurchaseOrder.jsp b/IPKS_Updated/web/web/web/Trading_JSP/RaisePurchaseOrder.jsp new file mode 100644 index 0000000..87909ab --- /dev/null +++ b/IPKS_Updated/web/web/web/Trading_JSP/RaisePurchaseOrder.jsp @@ -0,0 +1,366 @@ +<%-- + Document : gl + Created on : Aug 3, 2015, 2:23:35 PM + Author : Administrator +--%> +<%@page import="DataEntryBean.tradingPurchaseOrderBean"%> +<% try { +%> + + + Raise Purchase Order + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object tradingPurchaseOrderBeanObj = request.getAttribute("tradingPurchaseOrderBeanObj"); + tradingPurchaseOrderBean otradingPurchaseOrderBean = new tradingPurchaseOrderBean(); + if (tradingPurchaseOrderBeanObj != null) { + otradingPurchaseOrderBean = (tradingPurchaseOrderBean) request.getAttribute("tradingPurchaseOrderBeanObj"); + + } + %> + + +
+ Raise Purchase Order + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Commodity Type*:
Type Description*:
Commodity Sub-Type*:
Sub-Type Description*:
Number of Units*:
Price Per/Units*:
Total:
Vendor Name*:
Purchase Reference Number*:
Purchase Description*:
+ + + + + + + + + +
Mode of Payment*: + +
+ + +
+
+ + +
+ + +
+
+ + + + + +
+
+ + + +<% } catch (Exception e) { + + } +%> + diff --git a/IPKS_Updated/web/web/web/Trading_JSP/SalesRegister.jsp b/IPKS_Updated/web/web/web/Trading_JSP/SalesRegister.jsp new file mode 100644 index 0000000..8f78222 --- /dev/null +++ b/IPKS_Updated/web/web/web/Trading_JSP/SalesRegister.jsp @@ -0,0 +1,348 @@ +<%-- + Document : SalesRegister + Created on : May 5, 2016, 12:31:09 PM + Author : 590685 +--%> + +<%@page import="DataEntryBean.TradingSaleRegisterBean"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.pdsStockRegisterBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + + + Sales Register + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object alTradingSaleRegisterBeanApendObj = request.getAttribute("alTradingSaleRegisterBeanApend"); + ArrayList alTradingSaleRegisterBeanApend = new ArrayList(); + if (alTradingSaleRegisterBeanApendObj != null) { + alTradingSaleRegisterBeanApend = (ArrayList) request.getAttribute("alTradingSaleRegisterBeanApend"); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + +
+
+ + + Sales Register + + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ + + + + + + + + + + + +
Commodity Type*: Commodity Sub-Type*:
+
+
+ + + + + + + + + + + + +
From Date*:  
To Date*: 
Customer Name*:
+
+
+
+
+ + + +
+
+ +
+ <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+ + + + + + + + + + + + + + + + + + + <% + TradingSaleRegisterBean oTradingSaleRegisterBeanApend = new TradingSaleRegisterBean(); + + for (int i = 0; i < alTradingSaleRegisterBeanApend.size(); i++) { + oTradingSaleRegisterBeanApend = alTradingSaleRegisterBeanApend.get(i); + %> + + + + + + + + + + + + + + <%}%> + +
Sales Reference ID Customer Name Commodity type Commodity sub-type Sale Date Stock ID Quantity Price Total
+
+
+ <%}%> + + + + + +
+ +
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Trading_JSP/SellItem.jsp b/IPKS_Updated/web/web/web/Trading_JSP/SellItem.jsp new file mode 100644 index 0000000..94b2869 --- /dev/null +++ b/IPKS_Updated/web/web/web/Trading_JSP/SellItem.jsp @@ -0,0 +1,453 @@ + <%-- + Document : SellItem + Created on : May 5, 2016, 12:31:09 PM + Author : 590685 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.pdsStockRegisterBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + + Sell Item + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + +
+
+ + + Sell Item + + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
Customer ID*:
Customer Name*:
Mode of Payment: + +
Grand Total:
+
+
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Stock ID / InventoryCommodity TypeType DescriptionCommodity Sub-TypeSub-Type DescriptionQuantityPrice/UnitTotal
+
+ +

+
+ + + + + +
+ + + + + +
+ + +
+ + +
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Trading_JSP/SellPurchaseAdjustment.jsp b/IPKS_Updated/web/web/web/Trading_JSP/SellPurchaseAdjustment.jsp new file mode 100644 index 0000000..9f5a780 --- /dev/null +++ b/IPKS_Updated/web/web/web/Trading_JSP/SellPurchaseAdjustment.jsp @@ -0,0 +1,346 @@ +<%-- + Document : SellPurchaseAdjustment + Created on : March 7, 2022, 3:16:34 PM + Author : 1242938 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="DataEntryBean.PaymentAcknowledgementBean"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + Sell Purchase Adjustment + + + + + + + + + + + + + + + + + + + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + +
+ + Sell Purchase Adjustment +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +
+
+
Operation Selection: + +
+
+ + + + + + + +
+
+
+ + + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Trading_JSP/TradingInvoice.jsp b/IPKS_Updated/web/web/web/Trading_JSP/TradingInvoice.jsp new file mode 100644 index 0000000..1102642 --- /dev/null +++ b/IPKS_Updated/web/web/web/Trading_JSP/TradingInvoice.jsp @@ -0,0 +1,106 @@ +<%-- + Document : Invoice + Created on : Jun 25, 2016, 10:52:10 AM + Author : Tcs Help desk122 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<% try { +%> + + + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + String requisitionId = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + Object requisitionIdObj = request.getAttribute("requisitionId"); + if (requisitionIdObj != null) { + requisitionId = requisitionIdObj.toString(); + } + + %> + + +
+
+ + + Invoice + + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+
+ + + + + +

Download The Invoice

+
+
+ +
+
+ + + + + +
+ +
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Trading_JSP/TradingPO.jsp b/IPKS_Updated/web/web/web/Trading_JSP/TradingPO.jsp new file mode 100644 index 0000000..0380211 --- /dev/null +++ b/IPKS_Updated/web/web/web/Trading_JSP/TradingPO.jsp @@ -0,0 +1,106 @@ +<%-- + Document : Invoice + Created on : Jun 25, 2016, 10:52:10 AM + Author : Tcs Help desk122 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<% try { +%> + + + + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + String requisitionId = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + Object requisitionIdObj = request.getAttribute("requisitionId"); + if (requisitionIdObj != null) { + requisitionId = requisitionIdObj.toString(); + } + + %> + + +
+
+ + + Invoice + + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+
+ + + + + +

Download The PO

+
+
+ +
+
+ + + + + +
+ +
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Trading_JSP/TradingStockRegister.jsp b/IPKS_Updated/web/web/web/Trading_JSP/TradingStockRegister.jsp new file mode 100644 index 0000000..541fd1f --- /dev/null +++ b/IPKS_Updated/web/web/web/Trading_JSP/TradingStockRegister.jsp @@ -0,0 +1,612 @@ +<%-- + Document : TradingStockRegister + Created on : May 5, 2016, 12:31:09 PM + Author : 590685 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.TrandinStockRegisterBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + + + Trading Stock Register + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object oTrandinStockRegisterBeanObj = request.getAttribute("oTrandinStockRegisterBean"); + Object alTrandinStockRegisterBeanAppendObj = request.getAttribute("arrTrandinStockRegisterBean"); + + TrandinStockRegisterBean oTrandinStockRegisterBeanApend = new TrandinStockRegisterBean(); + if (oTrandinStockRegisterBeanObj != null) { + oTrandinStockRegisterBeanApend = (TrandinStockRegisterBean) request.getAttribute("oTrandinStockRegisterBean"); + } + + ArrayList alTrandinStockRegisterBeanAppend = new ArrayList(); + if (alTrandinStockRegisterBeanAppendObj != null) { + alTrandinStockRegisterBeanAppend = (ArrayList) request.getAttribute("arrTrandinStockRegisterBean"); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + +
+
+ + + Trading Stock Register + + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ +
+
+ +
+ + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+
+ + + + + + + + + + + + + + + + + + + + + + <% + oTrandinStockRegisterBeanApend = null; + oTrandinStockRegisterBeanApend = new TrandinStockRegisterBean(); + count= 0; + + for (int i = 0; i < alTrandinStockRegisterBeanAppend.size(); i++) { + oTrandinStockRegisterBeanApend = alTrandinStockRegisterBeanAppend.get(i); + count++; + %> + + + + + + + + + + + + + + + + + + + + + + + + <%}%> +
Commodity TypeCommodity Sub-TypeVendor NameStock Entry DatePerishable(Y/N)Stock Expiry DatePrice/UnitQuantity(Base)Quantity(Availed)Quantity(Available)Profit Factor(Non-Member)Sell Price(Non-Member)Profit Factor(Member)Sell Price(Member)Action
<%=blankNull(oTrandinStockRegisterBeanApend.getCommoditytype())%><%=blankNull(oTrandinStockRegisterBeanApend.getCommoditysubtype())%><%=blankNull(oTrandinStockRegisterBeanApend.getName())%><%=blankNull(oTrandinStockRegisterBeanApend.getEntDate())%><%=blankNull(oTrandinStockRegisterBeanApend.getSelectperish())%><%=blankNull(oTrandinStockRegisterBeanApend.getStkexpiryDate())%><%=blankNull(oTrandinStockRegisterBeanApend.getQuantity())%><%=blankNull(oTrandinStockRegisterBeanApend.getQuantity_availed())%><%=blankNull(oTrandinStockRegisterBeanApend.getQuantity_available())%>
+
+
+
+
+ +
+ + +
+ <%}%> + + +
+ +
+ + + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Trading_JSP/TradingStockRegisterEdit.jsp b/IPKS_Updated/web/web/web/Trading_JSP/TradingStockRegisterEdit.jsp new file mode 100644 index 0000000..8b9a58c --- /dev/null +++ b/IPKS_Updated/web/web/web/Trading_JSP/TradingStockRegisterEdit.jsp @@ -0,0 +1,492 @@ +<%-- + Document : TradingStockRegisterEdit + Created on : Feb 10, 2022, 12:31:09 PM + Author : 1242938 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.TrandinStockRegisterBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> + + + + + Trading Stock Register + + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object oTrandinStockRegisterBeanObj = request.getAttribute("oTrandinStockRegisterBean"); + Object alTrandinStockRegisterBeanAppendObj = request.getAttribute("arrTrandinStockRegisterBean"); + + TrandinStockRegisterBean oTrandinStockRegisterBeanApend = new TrandinStockRegisterBean(); + if (oTrandinStockRegisterBeanObj != null) { + oTrandinStockRegisterBeanApend = (TrandinStockRegisterBean) request.getAttribute("oTrandinStockRegisterBean"); + } + + ArrayList alTrandinStockRegisterBeanAppend = new ArrayList(); + if (alTrandinStockRegisterBeanAppendObj != null) { + alTrandinStockRegisterBeanAppend = (ArrayList) request.getAttribute("arrTrandinStockRegisterBean"); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + +
+
+ + + Trading Stock Register + + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ +
+
+ + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + <% + oTrandinStockRegisterBeanApend = null; + oTrandinStockRegisterBeanApend = new TrandinStockRegisterBean(); + count= 0; + + for (int i = 0; i < alTrandinStockRegisterBeanAppend.size(); i++) { + oTrandinStockRegisterBeanApend = alTrandinStockRegisterBeanAppend.get(i); + count++; + %> + + + + + + + + + + + + + + + + + + + + + + <%}%> +
Commodity TypeCommodity Sub-TypeVendor NameStock Entry DatePerishable(Y/N)Stock Expiry DatePrice/UnitQuantity(Base)Quantity(Availed)Quantity(Available)Profit Factor(Non-Member)Sell Price(Non-Member)Profit Factor(Member)Sell Price(Member)Purchase IDGodown IDStock Desc
+
+ +

+
+ + +
+ + + + +
+
+ <%}%> + + +
+ +
+ + + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Trading_JSP/Trading_Report.jsp b/IPKS_Updated/web/web/web/Trading_JSP/Trading_Report.jsp new file mode 100644 index 0000000..008d45b --- /dev/null +++ b/IPKS_Updated/web/web/web/Trading_JSP/Trading_Report.jsp @@ -0,0 +1,374 @@ +<%-- + Document : Trading_Report + Created on : Jul 28, 2016, 9:18:24 PM + Author : 986137 +--%> + + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.ArrayList" %> +<%@page import="DataEntryBean.EnquiryBean"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<% try { +%> + + + + + + + + + + + + + + + + + Trading Report + + + + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankNA(String s) { + return (s == null) ? "NA" : s; + } + %> + <% + String pacsId = (String) session.getAttribute("pacsId"); + Object oEnquiryBeanSearchObj = request.getAttribute("oEnquiryBeanSearchObj"); + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + if (oEnquiryBeanSearchObj != null) { + oEnquiryBean = (EnquiryBean) request.getAttribute("oEnquiryBeanSearchObj"); + session.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearchObj); + } + %> + <%String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + %> + +
+
+ Trading Report + +
+
+ + + <%if (request.getAttribute("error") != null) {%> + + <%}%> + + + + + + + + + + + + + + + + + + + + + + + +
<%=request.getAttribute("error").toString()%>
Report Name *:
From Date*:  
To Date*:  
Sub-PACS Name:




+
+ + + + + + + + + + + + +
+
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Trading_JSP/TransactionAuthorization_Trading.jsp b/IPKS_Updated/web/web/web/Trading_JSP/TransactionAuthorization_Trading.jsp new file mode 100644 index 0000000..8b9201d --- /dev/null +++ b/IPKS_Updated/web/web/web/Trading_JSP/TransactionAuthorization_Trading.jsp @@ -0,0 +1,477 @@ +<%-- + Document : Trnsaction Authorization Trading + Created on : Oct 1, 2021, 2:23:35 PM + Author : 1242938 +--%> +<%@page import="DataEntryBean.myWorlistBean"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> + + + + + Transaction Authorization + + + + + + + + + + + + + + + + + + + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + <% + String ModuleName = new String(); + + ModuleName = (String) session.getAttribute("moduleName"); + %> + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankCash(String s) { + return (s == null) ? "CASH" : s; + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + + String showButton = ""; + Object err = request.getAttribute("showButton"); + if (err != null) { + showButton = err.toString(); + } + + String auth_id = (String) session.getAttribute("user"); + %> + + <% + Object almyWorlistBeanObj = request.getAttribute("almyWorlistBean"); + ArrayList almyWorlistBean = new ArrayList(); + if (almyWorlistBeanObj != null) { + almyWorlistBean = (ArrayList) request.getAttribute("almyWorlistBean"); + } + %> + <% + Object myWorlistBeanObj = request.getAttribute("myWorlistBeanObj"); + myWorlistBean omyWorlistBean = new myWorlistBean(); + + if (myWorlistBeanObj != null) { + omyWorlistBean = (myWorlistBean) request.getAttribute("myWorlistBeanObj"); + + } + %> + +
+ Transaction Authorization +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <%if(showButton.equalsIgnoreCase("Y")) {%> +
+ + + + + "/> + + <%}%> +
+ <% }%> +
+
+
+ Authorization For*: + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + +
Transaction Ref. Number:      Transaction Type: +

From Date:      To Date:
+

+ + + +
+


+ + + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+ + <% if (omyWorlistBean.getCheckOption().equalsIgnoreCase("TTXN")) {%> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + <% + omyWorlistBean = null; + int i; + for (i = 0; i < almyWorlistBean.size(); i++) { + omyWorlistBean = almyWorlistBean.get(i); + %> + + + + + + + + + + + + + + + + + + + + + + <%}%> + +
Account NoAccount No2BalanceReference NoTransaction DateTransaction IndicatorTransaction TypeAmount To Be PaidSGST AmtCGST AmtDiscount AmtNet AmtSale Purchase Ref IDProduct NameInitiator IDRemarksStatusAct On Worklist
+
+
+ <%} else if (omyWorlistBean.getCheckOption().equalsIgnoreCase("TTP")) {%> +
+ + + + + + + + + + + + <% if( ModuleName.equalsIgnoreCase("KCC") ) {%> + + + <%}%> + + + + + + + + + + <% + omyWorlistBean = null; + int i; + for (i = 0; i < almyWorlistBean.size(); i++) { + omyWorlistBean = almyWorlistBean.get(i); + %> + + + + + + + + + + + + <% if ( ModuleName.equalsIgnoreCase("KCC") ) {%> + + + <%}%> + + + + + + + + <%}%> + +
Reference NoAccount No1Customer NameAccount No2Account BalanceTransaction TypeTransaction DateAmountPrincipal RepaymentInterest RepaymentChargesInitiator IDRemarksStatusAct On Worklist
+
+
+ <%} else if (omyWorlistBean.getCheckOption().equalsIgnoreCase("ACC") + || omyWorlistBean.getCheckOption().equalsIgnoreCase("LACC") || omyWorlistBean.getCheckOption().equalsIgnoreCase("KCC")) {%> + + + + + + + + + + + + + + <% + omyWorlistBean = null; + int i; + for (i = 0; i < almyWorlistBean.size(); i++) { + omyWorlistBean = almyWorlistBean.get(i); + %> + + + + + + + + <%}%> + +
Reference No.Transaction TypeTransaction DateInitiator IDAct On Worklist
+ + <%}%> +

+
+
+ <%}%> +
+
+ + + diff --git a/IPKS_Updated/web/web/web/Trading_JSP/VendorEnrollmentEnquiry.jsp b/IPKS_Updated/web/web/web/Trading_JSP/VendorEnrollmentEnquiry.jsp new file mode 100644 index 0000000..ff96247 --- /dev/null +++ b/IPKS_Updated/web/web/web/Trading_JSP/VendorEnrollmentEnquiry.jsp @@ -0,0 +1,717 @@ +<%-- + Document : Vendor EnrollmentEnquiry + Created on : May 5, 2016, 12:31:09 PM + Author : 590685 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.VendorMasterHeaderBean"%> +<%@page import="DataEntryBean.VendorMasterDtlBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="LoginDb.DbHandler"%> + +<% try { +%> + + + + Vendor Enrollment/Enquiry + + + + + + + + + + + + + + + + <% int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + Object ObjVendorMasterHeaderBean = request.getAttribute("VendorMasterHeaderBeanObj"); + VendorMasterHeaderBean VendorMasterHeaderBeanObj = new VendorMasterHeaderBean(); + if (ObjVendorMasterHeaderBean != null) { + VendorMasterHeaderBeanObj = (VendorMasterHeaderBean) request.getAttribute("VendorMasterHeaderBeanObj"); + } + %> + + <% + Object alVendorMasterDtlBeanObj = request.getAttribute("alVendorMasterDtlBean"); + ArrayList alVendorMasterDtlBean = new ArrayList(); + VendorMasterDtlBean oVendorMasterDtlBean = new VendorMasterDtlBean(); + if (alVendorMasterDtlBeanObj != null) { + alVendorMasterDtlBean = (ArrayList) request.getAttribute("alVendorMasterDtlBean"); + + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + +
+
+ + Vendor Enrollment/Enquiry + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ +
+ +
+ + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> + +
+ + + + + + + + + + + + + + + + + + + + + + +
Vendor Name:
Address: + +
Phone:
Contact person:
GSTIN Number:
+
+ + + <% if (alVendorMasterDtlBean.size() > 0) { %> + + + + + + + + + + + + + + + + <% + oVendorMasterDtlBean = new VendorMasterDtlBean(); + count = 0; + + for (int i = 0; i < alVendorMasterDtlBean.size(); i++) { + oVendorMasterDtlBean = alVendorMasterDtlBean.get(i); + + count++; + %> + + + + + + + + + + + + + + + + + <%}%> + +
Commodity TypeType DescriptionSub TypeSub Type description
+ +
+ +
+
+ + + + + +
+ <%}%> +
+ <%}%> + + + + + + + + +
+ +
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Trading_JSP/leaseRentCommodity.jsp b/IPKS_Updated/web/web/web/Trading_JSP/leaseRentCommodity.jsp new file mode 100644 index 0000000..49212dc --- /dev/null +++ b/IPKS_Updated/web/web/web/Trading_JSP/leaseRentCommodity.jsp @@ -0,0 +1,1054 @@ +<%-- + Document : leaseRentCommodity + Created on : Oct 16, 2017, 8:24:40 PM + Author : 594267 +--%> +<%@page import="DataEntryBean.tradingPurchaseOrderBean"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<% try { +%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + Lease/Rent Commodity + + + + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% String odeno2000 = ""; + String odeno500 = ""; + String odeno200 = ""; + String odeno100 = ""; + String odeno50 = ""; + String odeno20 = ""; + String odeno10 = ""; + String odeno5 = ""; + String odeno2 = ""; + String odeno1 = ""; + String odeno50P = ""; + String odeno1P = ""; + String status = "C"; + String pacsid = (String) session.getAttribute("pacsId"); + String makerId = session.getAttribute("user").toString(); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select nvl(d.deno_2000,0),nvl(d.deno_500,0),nvl(d.deno_100,0),nvl(d.deno_50,0),nvl(d.deno_20,0),nvl(d.deno_10,0),nvl(d.deno_5,0),nvl(d.deno_2,0),nvl(d.deno_1,0),nvl(d.DENO_50P,0),nvl(d.DENO_1P,0),d.status,nvl(d.deno_200,0) from cash_drawer d where d.entry_date = (select system_date from system_date) and d.teller_id ='" + makerId + "' and d.pacs_id ='" + pacsid + "' "); + + while (rs.next()) { + odeno2000 = rs.getString(1); + odeno500 = rs.getString(2); + odeno100 = rs.getString(3); + odeno50 = rs.getString(4); + odeno20 = rs.getString(5); + odeno10 = rs.getString(6); + odeno5 = rs.getString(7); + odeno2 = rs.getString(8); + odeno1 = rs.getString(9); + odeno50P = rs.getString(10); + odeno1P = rs.getString(11); + status = rs.getString(12); + odeno200 = rs.getString(13); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + %> +
+ Lease/Rent Commodity +
+
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DenominationsAvailableINOUT
+
+
+ +
+ +
+ +
+ Operation Selection: + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Commodity Type:* + + +

+ Number Of Units + + + + Term Length + + +
+ Security Amount + + + + Total Payment Due + + +
+ Transaction Amount: + + +
+
+ + + + + + + +
+
+
+ + + + + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/Trading_JSP/tradingFinancialYearAdjustment.jsp b/IPKS_Updated/web/web/web/Trading_JSP/tradingFinancialYearAdjustment.jsp new file mode 100644 index 0000000..06b2996 --- /dev/null +++ b/IPKS_Updated/web/web/web/Trading_JSP/tradingFinancialYearAdjustment.jsp @@ -0,0 +1,624 @@ +<%-- + Document : tradingFinancialYearAdjustment + Created on : June 17, 2019, 5:52:10 PM + Author : 1242938 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + +<%@page import="java.sql.SQLException"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="DataEntryBean.tradingFinancialYearAdjustmentBean"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.util.UUID" %> +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + + Trading Financial Year Adjustment + + + + + + + + + + + + + <% + String handle_idVal = ""; + Object handle_id = request.getAttribute("handle_id"); + if (handle_id != null) { + handle_idVal = handle_id.toString(); + } + String userRole = (String) session.getAttribute("userRole"); + %> + + + + <% + int count = 1; + String error_msg = ""; + + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + + Object alMocProcessingBeanObj = request.getAttribute("alMocProcessingBean"); + ArrayList alMocProcessingBean = new ArrayList(); + tradingFinancialYearAdjustmentBean oMocProcessingBean = new tradingFinancialYearAdjustmentBean(); + if (alMocProcessingBeanObj != null) { + alMocProcessingBean = (ArrayList) request.getAttribute("alMocProcessingBean"); + + + } + error = request.getAttribute("batchID"); + String batchID = ""; + if (request.getAttribute("batchID") != null) { + batchID = error.toString(); + } + %> + + + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + %> + + + + +
+ +
+ Trading Financial Year Adjustment + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ + +
+ + +
+ +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + +
First Account NumberTransaction AmountTransaction IndicatorSecond Account NumberNarration
+ + + + + + + + + +
+ +


+
+ + + + + + + +
+
+
+ + + + + +
+ +
+
+ +
+ + + + +
+ + +

+ + +
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/Trading_JSP/tradingProductCreation.jsp b/IPKS_Updated/web/web/web/Trading_JSP/tradingProductCreation.jsp new file mode 100644 index 0000000..d43d660 --- /dev/null +++ b/IPKS_Updated/web/web/web/Trading_JSP/tradingProductCreation.jsp @@ -0,0 +1,980 @@ +<%-- + Document : tradingProductCreation + Created on : Apr 20, 2016, 3:16:34 PM + Author : 590685 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="DataEntryBean.tradingProductCreationBean"%> +<% try { +%> + + + + Trading Product Master + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + + + String ServletName = ""; + display = request.getAttribute("ServletName"); + if (display != null) { + ServletName = display.toString(); + } + %> + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String pacsId = (String) session.getAttribute("pacsId"); + String userRole = (String) session.getAttribute("userRole"); + Object tradingProductCreationBeanObj = request.getAttribute("tradingProductCreationBeanObj"); + tradingProductCreationBean otradingProductCreationBean = new tradingProductCreationBean(); + if (tradingProductCreationBeanObj != null) { + otradingProductCreationBean = (tradingProductCreationBean) request.getAttribute("tradingProductCreationBeanObj"); + + } + %> +
+ + Trading Product Master +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +
+
Operation Selection: + +

+ +

+ + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%if (userRole.equalsIgnoreCase("201603000004021") ){%> + + + + + + + <%}else if(userRole.equalsIgnoreCase("201606000004041") ) {%> + + + + + + + <%}%> + + + +
Commodity type:Type Description:
Commodity Sub Type:Sub Type Description:
Quantity Unit: + Status: +
CGST RateSGST Rate
Purchase GL*:Sale GL*:
Closing Stock GL*:Stock-In Trade GL*:
Available for Lease +
Pacs Id
Pacs Id


+ + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ + + + +
+ <% }%> + +
+ + + +
+
+ + +<% } catch (Exception e) { + + } +%> diff --git a/IPKS_Updated/web/web/web/TransactionAuthorization.jsp b/IPKS_Updated/web/web/web/TransactionAuthorization.jsp new file mode 100644 index 0000000..76ba9d0 --- /dev/null +++ b/IPKS_Updated/web/web/web/TransactionAuthorization.jsp @@ -0,0 +1,552 @@ +<%-- + Document : Trnsaction Authorization + Created on : Aug 3, 2015, 2:23:35 PM + Author : Administrator +--%> +<%@page import="DataEntryBean.myWorlistBean"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> + + + + + Transaction Authorization + + + + + + + + + + + + + + + + + + + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + <% + String ModuleName = new String(); + + ModuleName = (String) session.getAttribute("moduleName"); + %> + + <% if (ModuleName.equalsIgnoreCase("KCC")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Deposit")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Loan")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Share")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBothKcc") || ModuleName.equalsIgnoreCase("SpecialKcc")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBothDep")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBoth")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("Special")) {%> + + <%}%> +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankCash(String s) { + return (s == null) ? "CASH" : s; + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + + String showButton = ""; + Object err = request.getAttribute("showButton"); + if (err != null) { + showButton = err.toString(); + } + + String auth_id = (String) session.getAttribute("user"); + %> + + <% + Object almyWorlistBeanObj = request.getAttribute("almyWorlistBean"); + ArrayList almyWorlistBean = new ArrayList(); + if (almyWorlistBeanObj != null) { + almyWorlistBean = (ArrayList) request.getAttribute("almyWorlistBean"); + } + %> + <% + Object myWorlistBeanObj = request.getAttribute("myWorlistBeanObj"); + myWorlistBean omyWorlistBean = new myWorlistBean(); + + if (myWorlistBeanObj != null) { + omyWorlistBean = (myWorlistBean) request.getAttribute("myWorlistBeanObj"); + + } + %> + +
+ Transaction Authorization +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <%if(showButton.equalsIgnoreCase("Y")) {%> +
+ + + + + "/> + + <%}%> +
+ <% }%> +
+
+
+ Authorization For*: + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + +
Transaction Ref. Number:      Transaction Type: +

From Date:      To Date:
+

+ + + +
+


+ + + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+ + <% if (omyWorlistBean.getCheckOption().equalsIgnoreCase("TXN")) {%> +
+ + + + + + + + <% if (ModuleName.equalsIgnoreCase("Loan")) {%> + + <%} else {%> + + <%}%> + + + + <% if (ModuleName.equalsIgnoreCase("Loan") || ModuleName.equalsIgnoreCase("KCC") ) {%> + + + <%}%> + + + + + + + + + + <% + omyWorlistBean = null; + int i; + for (i = 0; i < almyWorlistBean.size(); i++) { + omyWorlistBean = almyWorlistBean.get(i); + %> + + + + + + + + + + + + + <% if ( ModuleName.equalsIgnoreCase("Loan") || ModuleName.equalsIgnoreCase("KCC") ) {%> + + + <%}%> + + + + + + + <%}%> + +
Reference NoAccount No1NameAccount No2Sanctioned AmountAccount BalanceTransaction TypeTransaction DateAmountPrincipal RepaymentInterest RepaymentChargesInitiator IDRemarksStatusAct On Worklist
+
+
+ <%} else if (omyWorlistBean.getCheckOption().equalsIgnoreCase("TTP")) {%> +
+ + + + + + + + + + + + <% if( ModuleName.equalsIgnoreCase("KCC") ) {%> + + + <%}%> + + + + + + + + + + <% + omyWorlistBean = null; + int i; + for (i = 0; i < almyWorlistBean.size(); i++) { + omyWorlistBean = almyWorlistBean.get(i); + %> + + + + + + + + + + + + <% if ( ModuleName.equalsIgnoreCase("KCC") ) {%> + + + <%}%> + + + + + + + + <%}%> + +
Reference NoAccount No1Customer NameAccount No2Account BalanceTransaction TypeTransaction DateAmountPrincipal RepaymentInterest RepaymentChargesInitiator IDRemarksStatusAct On Worklist
+
+
+ <%} else if (omyWorlistBean.getCheckOption().equalsIgnoreCase("ACC") + || omyWorlistBean.getCheckOption().equalsIgnoreCase("LACC") || omyWorlistBean.getCheckOption().equalsIgnoreCase("KCC")) {%> + + + + + + + + + + + + + + <% + omyWorlistBean = null; + int i; + for (i = 0; i < almyWorlistBean.size(); i++) { + omyWorlistBean = almyWorlistBean.get(i); + %> + + + + + + + + <%}%> + +
Reference No.Transaction TypeTransaction DateInitiator IDAct On Worklist
+ + <%}%> +

+ +
+
+ <%}%> +
+
+ + + diff --git a/IPKS_Updated/web/web/web/TransactionAuthorization_STB.jsp b/IPKS_Updated/web/web/web/TransactionAuthorization_STB.jsp new file mode 100644 index 0000000..8c56eaa --- /dev/null +++ b/IPKS_Updated/web/web/web/TransactionAuthorization_STB.jsp @@ -0,0 +1,506 @@ +<%-- + Document : Trnsaction Authorization STB + Created on : Aug 17, 2021, 2:23:35 PM + Author : 1242938 +--%> +<%@page import="DataEntryBean.myWorlistBean"%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> + + + + + Transaction Authorization + + + + + + + + + + + + + + + + + + + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + <% + String ModuleName = new String(); + + ModuleName = (String) session.getAttribute("moduleName"); + %> + + <% if (ModuleName.equalsIgnoreCase("KCC")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Deposit")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Loan")) {%> + + <%} else if (ModuleName.equalsIgnoreCase("Share")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBothKcc") || ModuleName.equalsIgnoreCase("SpecialKcc")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBothDep")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("SpecialBoth")) {%> + + <%}else if (ModuleName.equalsIgnoreCase("Special")) {%> + + <%}%> +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + + String blankCash(String s) { + return (s == null) ? "CASH" : s; + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + + String showButton = ""; + Object err = request.getAttribute("showButton"); + if (err != null) { + showButton = err.toString(); + } + + String auth_id = (String) session.getAttribute("user"); + %> + + <% + Object almyWorlistBeanObj = request.getAttribute("almyWorlistBean"); + ArrayList almyWorlistBean = new ArrayList(); + if (almyWorlistBeanObj != null) { + almyWorlistBean = (ArrayList) request.getAttribute("almyWorlistBean"); + } + %> + <% + Object myWorlistBeanObj = request.getAttribute("myWorlistBeanObj"); + myWorlistBean omyWorlistBean = new myWorlistBean(); + + if (myWorlistBeanObj != null) { + omyWorlistBean = (myWorlistBean) request.getAttribute("myWorlistBeanObj"); + + } + %> + +
+ Transaction Authorization +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <%if(showButton.equalsIgnoreCase("Y")) {%> +
+ + + + + "/> + + <%}%> +
+ <% }%> +
+
+
+ Autorization For*: + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + +
Transaction Ref. Number:      Transaction Type: +

From Date:      To Date:
+

+ + + +
+


+ + + + + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+ + <% if (omyWorlistBean.getCheckOption().equalsIgnoreCase("TP")) {%> +
+ + + + + + + + + + + <% if (ModuleName.equalsIgnoreCase("Loan")) {%> + + <%} else {%> + + <%}%> + + + + <% if (ModuleName.equalsIgnoreCase("Loan") || ModuleName.equalsIgnoreCase("KCC") ) {%> + + + <%}%> + + + + + + + + + + <% + omyWorlistBean = null; + int i; + for (i = 0; i < almyWorlistBean.size(); i++) { + omyWorlistBean = almyWorlistBean.get(i); + %> + + + + + + + + + + + + + + + + <% if ( ModuleName.equalsIgnoreCase("Loan") || ModuleName.equalsIgnoreCase("KCC") ) {%> + + + <%}%> + + + + + + + <%}%> + +
Pacs IDPacs NameCBS AccountReference NoAccount No1NameAccount No2Sanctioned AmountAccount BalanceTransaction TypeTransaction DateAmountPrincipal RepaymentInterest RepaymentChargesInitiator IDRemarksStatusAct On Worklist
+
+
+ <%} else if (omyWorlistBean.getCheckOption().equalsIgnoreCase("TTP")) {%> +
+ + + + + + + + + + + + <% if( ModuleName.equalsIgnoreCase("KCC") ) {%> + + + <%}%> + + + + + + + + + + <% + omyWorlistBean = null; + int i; + for (i = 0; i < almyWorlistBean.size(); i++) { + omyWorlistBean = almyWorlistBean.get(i); + %> + + + + + + + + + + + + <% if ( ModuleName.equalsIgnoreCase("KCC") ) {%> + + + <%}%> + + + + + + + + <%}%> + +
Reference NoAccount No1Customer NameAccount No2Account BalanceTransaction TypeTransaction DateAmountPrincipal RepaymentInterest RepaymentChargesInitiator IDRemarksStatusAct On Worklist
+
+
+ <%} else if (omyWorlistBean.getCheckOption().equalsIgnoreCase("ACC") + || omyWorlistBean.getCheckOption().equalsIgnoreCase("LACC") || omyWorlistBean.getCheckOption().equalsIgnoreCase("KCC")) {%> + + + + + + + + + + + + + + <% + omyWorlistBean = null; + int i; + for (i = 0; i < almyWorlistBean.size(); i++) { + omyWorlistBean = almyWorlistBean.get(i); + %> + + + + + + + + <%}%> + +
Reference No.Transaction TypeTransaction DateInitiator IDAct On Worklist
+ + <%}%> +

+
+
+ <%}%> +
+
+ + + diff --git a/IPKS_Updated/web/web/web/WEB-INF/BULK TXN POSTING STEPS DETAILS.docx b/IPKS_Updated/web/web/web/WEB-INF/BULK TXN POSTING STEPS DETAILS.docx new file mode 100644 index 0000000..9284a8c Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/BULK TXN POSTING STEPS DETAILS.docx differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/BULK_TXN_FORMAT.xlsx b/IPKS_Updated/web/web/web/WEB-INF/BULK_TXN_FORMAT.xlsx new file mode 100644 index 0000000..8ec97ff Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/BULK_TXN_FORMAT.xlsx differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/CBS_BULK_ACCT_MANUAL.doc b/IPKS_Updated/web/web/web/WEB-INF/CBS_BULK_ACCT_MANUAL.doc new file mode 100644 index 0000000..caf504e Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/CBS_BULK_ACCT_MANUAL.doc differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/IPKS MOC.pdf b/IPKS_Updated/web/web/web/WEB-INF/IPKS MOC.pdf new file mode 100644 index 0000000..862166e Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/IPKS MOC.pdf differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/KCC_ACCT_RENEWAL.xlsx b/IPKS_Updated/web/web/web/WEB-INF/KCC_ACCT_RENEWAL.xlsx new file mode 100644 index 0000000..30b7a7d Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/KCC_ACCT_RENEWAL.xlsx differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/PASSBOOK_SETUP.doc b/IPKS_Updated/web/web/web/WEB-INF/PASSBOOK_SETUP.doc new file mode 100644 index 0000000..7416863 Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/PASSBOOK_SETUP.doc differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/Passbook_Sample.jpg b/IPKS_Updated/web/web/web/WEB-INF/Passbook_Sample.jpg new file mode 100644 index 0000000..4a308fa Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/Passbook_Sample.jpg differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/bulk_sb.csv b/IPKS_Updated/web/web/web/WEB-INF/bulk_sb.csv new file mode 100644 index 0000000..9c28abe --- /dev/null +++ b/IPKS_Updated/web/web/web/WEB-INF/bulk_sb.csv @@ -0,0 +1,12 @@ +SB,03000170200059479,03000170200059477,10,TEST TXN +SB,03000170200059480,03000170200059478,10,TEST TXN +SB,03000170200059483,03000170200059481,10,TEST TXN +SB,03000170200059487,03000170200059484,10,TEST TXN +SB,03000170200059490,03000170200059485,10,TEST TXN +SB,03000170200059104,03000170200059486,10,TEST TXN +SB,03000170200059105,03000170200059488,10,TEST TXN +SB,03000170200056369,03000170200059491,10,TEST TXN +SB,03000170200059738,03000170200059096,10,TEST TXN +SB,03000170200059739,03000170200059097,10,TEST TXN +SB,03000170200059740,03000170200059098,10,TEST TXN +SB,03000170200059740,03000170200059098,10,TEST TXN \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/WEB-INF/jboss-web.xml b/IPKS_Updated/web/web/web/WEB-INF/jboss-web.xml new file mode 100644 index 0000000..61ff498 --- /dev/null +++ b/IPKS_Updated/web/web/web/WEB-INF/jboss-web.xml @@ -0,0 +1,11 @@ + + + /PacsApplication + + jdbc/conDS + java:jdbc/conDS + javax.sql.DataSource + Container + Shareable + + diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/aws-java-sdk-1.11.313.jar b/IPKS_Updated/web/web/web/WEB-INF/lib/aws-java-sdk-1.11.313.jar new file mode 100644 index 0000000..9c271d8 Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/lib/aws-java-sdk-1.11.313.jar differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/commons-beanutils-1.9.4.jar b/IPKS_Updated/web/web/web/WEB-INF/lib/commons-beanutils-1.9.4.jar new file mode 100644 index 0000000..b73543c Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/lib/commons-beanutils-1.9.4.jar differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/commons-collections-3.2.2.jar b/IPKS_Updated/web/web/web/WEB-INF/lib/commons-collections-3.2.2.jar new file mode 100644 index 0000000..fa5df82 Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/lib/commons-collections-3.2.2.jar differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/commons-csv-1.4.jar b/IPKS_Updated/web/web/web/WEB-INF/lib/commons-csv-1.4.jar new file mode 100644 index 0000000..e9eb0bd Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/lib/commons-csv-1.4.jar differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/commons-digester-1.7.jar b/IPKS_Updated/web/web/web/WEB-INF/lib/commons-digester-1.7.jar new file mode 100644 index 0000000..1783dbe Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/lib/commons-digester-1.7.jar differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/commons-fileupload-1.4.jar b/IPKS_Updated/web/web/web/WEB-INF/lib/commons-fileupload-1.4.jar new file mode 100644 index 0000000..e25a6bc Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/lib/commons-fileupload-1.4.jar differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/commons-io-2.8.0.jar b/IPKS_Updated/web/web/web/WEB-INF/lib/commons-io-2.8.0.jar new file mode 100644 index 0000000..177e58d Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/lib/commons-io-2.8.0.jar differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/commons-lang3-3.0.jar b/IPKS_Updated/web/web/web/WEB-INF/lib/commons-lang3-3.0.jar new file mode 100644 index 0000000..7f2cfe1 Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/lib/commons-lang3-3.0.jar differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/commons-logging-1.3.4.jar b/IPKS_Updated/web/web/web/WEB-INF/lib/commons-logging-1.3.4.jar new file mode 100644 index 0000000..b99c937 Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/lib/commons-logging-1.3.4.jar differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/commons-net-3.3.jar b/IPKS_Updated/web/web/web/WEB-INF/lib/commons-net-3.3.jar new file mode 100644 index 0000000..f4f19a9 Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/lib/commons-net-3.3.jar differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/gson-2.3.1.jar b/IPKS_Updated/web/web/web/WEB-INF/lib/gson-2.3.1.jar new file mode 100644 index 0000000..250132c Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/lib/gson-2.3.1.jar differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/jackson-core-2.18.2.jar b/IPKS_Updated/web/web/web/WEB-INF/lib/jackson-core-2.18.2.jar new file mode 100644 index 0000000..12b2a46 Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/lib/jackson-core-2.18.2.jar differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/javax.servlet-api-4.0.0.jar b/IPKS_Updated/web/web/web/WEB-INF/lib/javax.servlet-api-4.0.0.jar new file mode 100644 index 0000000..9c9f4b7 Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/lib/javax.servlet-api-4.0.0.jar differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/jcommon-1.0.0.jar b/IPKS_Updated/web/web/web/WEB-INF/lib/jcommon-1.0.0.jar new file mode 100644 index 0000000..c5d23f4 Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/lib/jcommon-1.0.0.jar differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/jfreechart-1.0.3.jar b/IPKS_Updated/web/web/web/WEB-INF/lib/jfreechart-1.0.3.jar new file mode 100644 index 0000000..2970d66 Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/lib/jfreechart-1.0.3.jar differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/jsch-0.1.55.jar b/IPKS_Updated/web/web/web/WEB-INF/lib/jsch-0.1.55.jar new file mode 100644 index 0000000..c6fd21d Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/lib/jsch-0.1.55.jar differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/json-20140107.jar b/IPKS_Updated/web/web/web/WEB-INF/lib/json-20140107.jar new file mode 100644 index 0000000..40a325d Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/lib/json-20140107.jar differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/jxl-2.6.12.jar b/IPKS_Updated/web/web/web/WEB-INF/lib/jxl-2.6.12.jar new file mode 100644 index 0000000..4a1fc64 Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/lib/jxl-2.6.12.jar differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/nblibraries-private.properties b/IPKS_Updated/web/web/web/WEB-INF/lib/nblibraries-private.properties new file mode 100644 index 0000000..e69de29 diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/nblibraries.properties b/IPKS_Updated/web/web/web/WEB-INF/lib/nblibraries.properties new file mode 100644 index 0000000..6e9dc43 --- /dev/null +++ b/IPKS_Updated/web/web/web/WEB-INF/lib/nblibraries.properties @@ -0,0 +1,11 @@ +libs.CopyLibs.classpath=\ + ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar;\ + ${base}/CopyLibs/junit-4.5.jar;\ + ${base}/CopyLibs/junit-3.8.2.jar;\ + ${base}/CopyLibs/junit/;\ + ${base}/junit-4.5.jar;\ + ${base}/junit-4.5.jar;\ + ${base}/junit-4.5.jar;\ + ${base}/CopyLibs/junit-3.8.2.jar +libs.junit.classpath=\ + ${base}/junit-4.5.jar diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/ojdbc8-23.6.0.24.10.jar b/IPKS_Updated/web/web/web/WEB-INF/lib/ojdbc8-23.6.0.24.10.jar new file mode 100644 index 0000000..4c92806 Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/lib/ojdbc8-23.6.0.24.10.jar differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/org.apache.commons.io-2.18.0.jar b/IPKS_Updated/web/web/web/WEB-INF/lib/org.apache.commons.io-2.18.0.jar new file mode 100644 index 0000000..7affdef Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/lib/org.apache.commons.io-2.18.0.jar differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/lib/poi-5.0.0.jar b/IPKS_Updated/web/web/web/WEB-INF/lib/poi-5.0.0.jar new file mode 100644 index 0000000..d239022 Binary files /dev/null and b/IPKS_Updated/web/web/web/WEB-INF/lib/poi-5.0.0.jar differ diff --git a/IPKS_Updated/web/web/web/WEB-INF/web.xml b/IPKS_Updated/web/web/web/WEB-INF/web.xml new file mode 100644 index 0000000..ed1affb --- /dev/null +++ b/IPKS_Updated/web/web/web/WEB-INF/web.xml @@ -0,0 +1,1585 @@ + + + + SessionFilter + org.common.filter.SessionFilter + + + XSSPreventionFilter + org.common.filter.XSSPreventionFilter + + + + org.common.filter.SessionListener + + + + org.common.filter.ServerDownEventListener + + + SessionFilter + /* + + + XSSPreventionFilter + /* + + + + 404 + /error.jsp + + + 500 + /error.jsp + + + + ChequePostingServlet + Controller.ChequePostingServlet + + + LoginServlet + Controller.LoginServlet + + + LogoutServlet + Controller.LogoutServlet + + + CifEntryServlet + Controller.CifEntryServlet + + + MainServletCCOD + Controller.MainServletCCOD + + + IdenticationEntryServet + Controller.IdenticationEntryServet + + + UploadServlet + Controller.UploadServlet + + + UploadExcelServlet + Controller.UploadExcelServlet + + + NewServlet + Controller.NewServlet + + + NewServlet1 + Controller.NewServlet1 + + + DownloadExcelServlet + Controller.DownloadExcelServlet + + + GenerateTrickleFeedServlet + Controller.GenerateTrickleFeedServlet + + + PacsReportDownload + Controller.PacsReportDownload + + + DownloadPacsReport + Controller.DownloadPacsReport + + + GlProductOperationServlet + Controller.GlProductOperationServlet + + + pacsProductOperationServlet + Controller.pacsProductOperationServlet + + + PacsManagementServlet + Controller.PacsManagementServlet + + + PacsManagementBean + DataEntryBean.PacsManagementBean + + + AccountCreationServlet + Controller.AccountCreationServlet + + + GlEnquiryServlet + Controller.GlEnquiryServlet + + + UserMaintenanceServlet + Controller.UserMaintenanceServlet + + + ChangeUserPasswordServlet + Controller.ChangeUserPasswordServlet + + + customerEnquiryServlet + Controller.customerEnquiryServlet + + + cbsExtractPostingServlet + Controller.cbsExtractPostingServlet + + + ExcelReportServlet + ExcelReportController.ExcelReportServlet + + + interestComputationServlet + Controller.interestComputationServlet + + + kycCreationServlet + Controller.kycCreationServlet + + + SodServlet + Controller.SodServlet + + + Mark_Unmark_NPAOperationsServlet + Controller.Mark_Unmark_NPAOperationsServlet + + + HrmAdhocReportServlet + Controller.HrmAdhocReportServlet + + + AccountRenewalServlet + Controller.AccountRenewalServlet + + + TradingProductOperationServlet + Controller.TradingProductOperationServlet + + + MemberEnrollmentServlet + Controller.MemberEnrollmentServlet + + + RaiseRequisitionServlet + Controller.RaiseRequisitionServlet + + + PdsProductOperationServlet + Controller.PdsProductOperationServlet + + + pdsStockRegisterServlet + Controller.pdsStockRegisterServlet + + + purchaseDetailServlet + Controller.purchaseDetailServlet + + + tradingPurchaseOrderServlet + Controller.tradingPurchaseOrderServlet + + + TradingStockRegisterServlet + Controller.TradingStockRegisterServlet + + + TradingSaleItemEntry + Controller.TradingSaleItemEntry + + + TradingSaleRegisterServlet + Controller.TradingSaleRegisterServlet + + + AssetDisposalServlet + Controller.AssetDisposalServlet + + + AssetEntryServlet + Controller.AssetEntryServlet + + + AssetMasterServlet + Controller.AssetMasterServlet + + + AssetRegisterServlet + Controller.AssetRegisterServlet + + + AssetRelocationServlet + Controller.AssetRelocationServlet + + + VendorMasterServlet + Controller.VendorMasterServlet + + + RationCardTypeServlet + Controller.RationCardTypeServlet + + + PaymentAcknowledgementServlet + Controller.PaymentAcknowledgementServlet + + + RationingLedgerServlet + Controller.RationingLedgerServlet + + + pdssaleitemEntry + Controller.pdssaleitemEntry + + + pdsSalesRegisterServlet + Controller.pdsSalesRegisterServlet + + + TradingCustomerEnrollmentServlet + Controller.TradingCustomerEnrollmentServlet + + + GodownServlet + Controller.GodownServlet + + + AddressDetailsServlet + Controller.AddressDetailsServlet + + + BasicInformationServlet + Controller.BasicInformationServlet + + + MemberDetailsServlet + Controller.MemberDetailsServlet + + + ShgActivitiesServlet + Controller.ShgActivitiesServlet + + + CommodityMasterServlet + Controller.CommodityMasterServlet + + + GovtOrderCreationServlet + Controller.GovtOrderCreationServlet + + + GPSSellRegisterServlet + Controller.GPSSellRegisterServlet + + + ItemProcurementServlet + Controller.ItemProcurementServlet + + + MasterEnrollmentServlet + Controller.MasterEnrollmentServlet + + + ProcurementRegisterServlet + Controller.ProcurementRegisterServlet + + + SellProcureItemServlet + Controller.SellProcureItemServlet + + + Asset_EnquiryServlet + Controller.Asset_EnquiryServlet + + + MyIntimationServlet + Controller.MyIntimationServlet + + + TransactionAuthorizationServlet + Controller.TransactionAuthorizationServlet + + + JsonDashboardServlet + JsonGraphs.Controller.JsonDashboardServlet + + + DepositKYCCreationServlet + Controller.DepositKYCCreationServlet + + + LoanProductCreationServlet + Controller.LoanProductCreationServlet + + + LoanAccountCreationServlet + Controller.LoanAccountCreationServlet + + + LoanDisbursementServlet + Controller.LoanDisbursementServlet + + + LoanRepaymentScheduleServlet + Controller.LoanRepaymentScheduleServlet + + + DepositMiscellaneousOperationServlet + Controller.DepositMiscellaneousOperationServlet + + + DepositKYCDocumentUploadServlet + Controller.DepositKYCDocumentUploadServlet + + + DepositProductCreationServlet + Controller.DepositProductCreationServlet + + + ReadOnlyServlet + Controller.ReadOnlyServlet + + + DepositRateSlabServlet + Controller.DepositRateSlabServlet + + + transactionOperationServlet + Controller.transactionOperationServlet + + + AssignToCashDrawerServlet + Controller.AssignToCashDrawerServlet + + + CloseCashDrawerServlet + Controller.CloseCashDrawerServlet + + + CashDrawerEnquiryServlet + Controller.CashDrawerEnquiryServlet + + + TermDepositOperationServlet + Controller.TermDepositOperationServlet + + + DepositGlTransactionServlet + Controller.DepositGlTransactionServlet + + + DepositAccountCreationServlet + Controller.DepositAccountCreationServlet + + + DepositTransferClosureServlet + Controller.DepositTransferClosureServlet + + + GliffDepositReportServlet + Controller.GliffDepositReportServlet + + + DepositTxnReversalServlet + Controller.DepositTxnReversalServlet + + + RDOperationServlet + Controller.RDOperationServlet + + + RepayLoanServlet + Controller.RepayLoanServlet + + + LoanTransactionOperationServlet + Controller.LoanTransactionOperationServlet + + + StandingInstructionServlet + Controller.StandingInstructionServlet + + + AssetServlet + Controller.AssetServlet + + + DepositServlet + Controller.DepositServlet + + + GPSServlet + Controller.GPSServlet + + + KCCSevlet + Controller.KCCSevlet + + + LoanServlet + Controller.LoanServlet + + + MISDashboardSevlet + Controller.MISDashboardSevlet + + + PDSServlet + Controller.PDSServlet + + + ShareServlet + Controller.ShareServlet + + + SHGServlet + Controller.SHGServlet + + + SODEODServlet + Controller.SODEODServlet + + + TradingSevlet + Controller.TradingSevlet + + + shareOperations + shareOperations + + + ShareTransactionServlet + Controller.ShareTransactionServlet + + + ShareValueCreationServlet + Controller.ShareValueCreationServlet + + + BatchTransactionServlet + Controller.BatchTransactionServlet + + + ShareTransactionOperationServlet + Controller.ShareTransactionOperationServlet + + + UploadFile + Controller.UploadFile + + + ShareDividentpayoutServlet + Controller.ShareDividentpayoutServlet + + + SigUploadFile + Controller.SigUploadFile + + + PassbookServlet + Controller.PassbookServlet + + + NeftRtgsInitiationServlet + Controller.NeftRtgsInitiationServlet + + + DistScaleOfFinanceServlet + Controller.DistScaleOfFinanceServlet + + + LeaseCommodityServlet + Controller.LeaseCommodityServlet + + + InvestmentCreationServlet + Controller.InvestmentCreationServlet + + + BorrowingCreationServlet + Controller.BorrowingCreationServlet + + + mocOperationsServlet + Controller.mocOperationsServlet + + + SwapCashDenoServlet + Controller.SwapCashDenoServlet + + + resetLoginServlet + Controller.resetLoginServlet + + + CashWidrawlDDSServlet + Controller.CashWidrawlDDSServlet + + + AgentMappingServlet + Controller.AgentMappingServlet + + + TransactionDDSServlet + Controller.TransactionDDSServlet + + + TotalCashDepositDDSServlet + Controller.TotalCashDepositDDSServlet + + + InsuranceAdditionServlet + Controller.InsuranceAdditionServlet + + + WelcomeServlet + Controller.WelcomeServlet + + + WelcomeDao + Dao.WelcomeDao + + + UserLoginManagementServlet + Controller.UserLoginManagementServlet + + + BulkFileUploadServlet + Controller.BulkFileUploadServlet + + + AccountRewnewBulkServlet + Controller.AccountRewnewBulkServlet + + + FarmerDetailsUpdationServlet + Controller.FarmerDetailsUpdationServlet + + + BulkMarkServlet + Controller.BulkMarkServlet + + + BulkMarkServletSTB + Controller.BulkMarkServletSTB + + + EnquiryServlet + Controller.EnquiryServlet + + + InwardCsvServlet + Controller.InwardCsvServlet + + + UploadIdFile + Controller.UploadIdFile + + + DirectBenifitTransferServlet + Controller.DirectBenifitTransferServlet + + + AccountServlet + Controller.AccountServlet + + + AccAmendServlet + Controller.AccAmendServlet + + + AmendInterestServlet + Controller.AmendInterestServlet + + + ForceDebitCapitalisationServlet + Controller.ForceDebitCapitalisationServlet + + + CBSAccountMappingServlet + Controller.CBSAccountMappingServlet + + + resetPasswordServlet + Controller.resetPasswordServlet + + + KCCForceCapitalisationServlet + Controller.KCCForceCapitalisationServlet + + + ForceAccountClosureServlet + Controller.ForceAccountClosureServlet + + + BGLAccountCreationServlet + Controller.BGLAccountCreationServlet + + + UserCreationServlet + Controller.UserCreationServlet + + + LienMarkingServlet + Controller.LienMarkingServlet + + + tradingFinancialYearAdjustmentServlet + Controller.tradingFinancialYearAdjustmentServlet + + + AccountModeOfOperationServlet + Controller.AccountModeOfOperationServlet + + + TDRepayMethodServlet + Controller.TDRepayMethodServlet + + + LoanPrincipalAdjustmentServlet + Controller.LoanPrincipalAdjustmentServlet + + + AccountRewnewBulkSTBServlet + Controller.AccountRewnewBulkSTBServlet + + + MiscChargeDeductionServlet + Controller.MiscChargeDeductionServlet + + + UserAmendmentServlet + Controller.UserAmendmentServlet + + + UpdatePacsDetailsServlet + Controller.UpdatePacsDetailsServlet + + + AccountServletSTB + Controller.AccountServletSTB + + + AccountDetailsServlet + Controller.AccountDetailsServlet + + + TransactionAuthorizationServlet_STB + Controller.TransactionAuthorizationServlet_STB + + + MyIntimationServlet_STB + Controller.MyIntimationServlet_STB + + + ChangeUserPasswordServlet_fflag + Controller.ChangeUserPasswordServlet_fflag + + + privacyPolicyServlet + Controller.privacyPolicyServlet + + + TransactionAuthorizationServlet_Trading + Controller.TransactionAuthorizationServlet_Trading + + + MyIntimationServlet_Trading + Controller.MyIntimationServlet_Trading + + + SBRateSlabServlet + Controller.SBRateSlabServlet + + + PLAppropriationServlet + Controller.PLAppropriationServlet + + + RemoveLienServlet + Controller.RemoveLienServlet + + + SellPurchaseAdjustmentServlet + Controller.SellPurchaseAdjustmentServlet + + + GradeMasterServlet + Controller.GradeMasterServlet + + + DesignationMasterServlet + Controller.DesignationMasterServlet + + + EmployeeMasterServlet + Controller.EmployeeMasterServlet + + + EmployeeDependentMasterServlet + Controller.EmployeeDependentMasterServlet + + + LeaveMasterServlet + Controller.LeaveMasterServlet + + + LeaveBalanceServlet + Controller.LeaveBalanceServlet + + + LeaveTransactionServlet + Controller.LeaveTransactionServlet + + + PayrollBglMasterServlet + Controller.PayrollBglMasterServlet + + + PayrollScheduleServlet + Controller.PayrollScheduleServlet + + + CRARRiskMasterServlet + Controller.CRARRiskMasterServlet + + + CRARWorthMasterServlet + Controller.CRARWorthMasterServlet + + + CropLoanDisbursementServlet + Controller.CropLoanDisbursementServlet + + + OtpVerificationServlet + Controller.OtpVerificationServlet + + + OtpResendServlet + Controller.OtpResendServlet + + + resetLoginServlet + /resetLoginServlet + + + LoginServlet + /LoginServlet + + + LogoutServlet + /LogoutServlet + + + CifEntryServlet + /CifEntryServlet + + + MainServletCCOD + /MainServletCCOD + + + IdenticationEntryServet + /IdenticationEntryServet + + + UploadServlet + /UploadServlet + + + UploadExcelServlet + /UploadExcelServlet + + + NewServlet + /NewServlet + + + NewServlet1 + /NewServlet1 + + + DownloadExcelServlet + /DownloadExcelServlet + + + GenerateTrickleFeedServlet + /GenerateTrickleFeedServlet + + + PacsReportDownload + /PacsReportDownload + + + DownloadPacsReport + /DownloadPacsReport + + + GlProductOperationServlet + /GlProductOperationServlet + + + pacsProductOperationServlet + /pacsProductOperationServlet + + + PacsManagementServlet + /PacsManagementServlet + + + PacsManagementBean + /PacsManagementBean + + + AccountCreationServlet + /AccountCreationServlet + + + GlEnquiryServlet + /GlEnquiryServlet + + + UserMaintenanceServlet + /UserMaintenanceServlet + + + ChangeUserPasswordServlet + /ChangeUserPasswordServlet + + + customerEnquiryServlet + /customerEnquiryServlet + + + cbsExtractPostingServlet + /cbsExtractPostingServlet + + + ExcelReportServlet + /ExcelReportServlet + + + interestComputationServlet + /interestComputationServlet + + + kycCreationServlet + /kycCreationServlet + + + SodServlet + /SodServlet + + + ExcelReportServlet + /ExcelReportServlet + + + Mark_Unmark_NPAOperationsServlet + /Mark_Unmark_NPAOperationsServlet + + + HrmAdhocReportServlet + /HrmAdhocReportServlet + + + AccountRenewalServlet + /AccountRenewalServlet + + + TradingProductOperationServlet + /TradingProductOperationServlet + + + MemberEnrollmentServlet + /MemberEnrollmentServlet + + + RaiseRequisitionServlet + /RaiseRequisitionServlet + + + PdsProductOperationServlet + /PdsProductOperationServlet + + + pdsStockRegisterServlet + /pdsStockRegisterServlet + + + purchaseDetailServlet + /purchaseDetailServlet + + + tradingPurchaseOrderServlet + /tradingPurchaseOrderServlet + + + TradingStockRegisterServlet + /TradingStockRegisterServlet + + + TradingSaleItemEntry + /TradingSaleItemEntry + + + TradingSaleRegisterServlet + /TradingSaleRegisterServlet + + + AssetDisposalServlet + /AssetDisposalServlet + + + AssetEntryServlet + /AssetEntryServlet + + + AssetMasterServlet + /AssetMasterServlet + + + AssetRegisterServlet + /AssetRegisterServlet + + + AssetRelocationServlet + /AssetRelocationServlet + + + VendorMasterServlet + /VendorMasterServlet + + + RationCardTypeServlet + /RationCardTypeServlet + + + PaymentAcknowledgementServlet + /PaymentAcknowledgementServlet + + + RationingLedgerServlet + /RationingLedgerServlet + + + pdssaleitemEntry + /pdssaleitemEntry + + + pdsSalesRegisterServlet + /pdsSalesRegisterServlet + + + TradingCustomerEnrollmentServlet + /TradingCustomerEnrollmentServlet + + + GodownServlet + /GodownServlet + + + AddressDetailsServlet + /AddressDetailsServlet + + + BasicInformationServlet + /BasicInformationServlet + + + MemberDetailsServlet + /MemberDetailsServlet + + + ShgActivitiesServlet + /ShgActivitiesServlet + + + CommodityMasterServlet + /CommodityMasterServlet + + + GovtOrderCreationServlet + /GovtOrderCreationServlet + + + GPSSellRegisterServlet + /GPSSellRegisterServlet + + + ItemProcurementServlet + /ItemProcurementServlet + + + MasterEnrollmentServlet + /MasterEnrollmentServlet + + + ProcurementRegisterServlet + /ProcurementRegisterServlet + + + SellProcureItemServlet + /SellProcureItemServlet + + + Asset_EnquiryServlet + /Asset_EnquiryServlet + + + MyIntimationServlet + /MyIntimationServlet + + + TransactionAuthorizationServlet + /TransactionAuthorizationServlet + + + JsonDashboardServlet + /JsonDashboardServlet + + + DepositKYCCreationServlet + /DepositKYCCreationServlet + + + LoanProductCreationServlet + /LoanProductCreationServlet + + + LoanAccountCreationServlet + /LoanAccountCreationServlet + + + LoanDisbursementServlet + /LoanDisbursementServlet + + + LoanRepaymentScheduleServlet + /LoanRepaymentScheduleServlet + + + DepositMiscellaneousOperationServlet + /DepositMiscellaneousOperationServlet + + + DepositKYCDocumentUploadServlet + /DepositKYCDocumentUploadServlet + + + DepositProductCreationServlet + /DepositProductCreationServlet + + + ReadOnlyServlet + /ReadOnlyServlet + + + DepositRateSlabServlet + /DepositRateSlabServlet + + + transactionOperationServlet + /transactionOperationServlet + + + AssignToCashDrawerServlet + /AssignToCashDrawerServlet + + + CloseCashDrawerServlet + /CloseCashDrawerServlet + + + CashDrawerEnquiryServlet + /CashDrawerEnquiryServlet + + + TermDepositOperationServlet + /TermDepositOperationServlet + + + DepositGlTransactionServlet + /DepositGlTransactionServlet + + + DepositAccountCreationServlet + /DepositAccountCreationServlet + + + DepositTransferClosureServlet + /DepositTransferClosureServlet + + + GliffDepositReportServlet + /GliffDepositReportServlet + + + DepositTxnReversalServlet + /DepositTxnReversalServlet + + + RDOperationServlet + /RDOperationServlet + + + RepayLoanServlet + /RepayLoanServlet + + + LoanTransactionOperationServlet + /LoanTransactionOperationServlet + + + StandingInstructionServlet + /StandingInstructionServlet + + + AssetServlet + /AssetServlet + + + DepositServlet + /DepositServlet + + + GPSServlet + /GPSServlet + + + KCCSevlet + /KCCSevlet + + + LoanServlet + /LoanServlet + + + MISDashboardSevlet + /MISDashboardSevlet + + + PDSServlet + /PDSServlet + + + ShareServlet + /ShareServlet + + + SHGServlet + /SHGServlet + + + SODEODServlet + /SODEODServlet + + + TradingSevlet + /TradingSevlet + + + shareOperations + /shareOperations + + + ShareTransactionServlet + /ShareTransactionServlet + + + ShareValueCreationServlet + /ShareValueCreationServlet + + + BatchTransactionServlet + /BatchTransactionServlet + + + ShareTransactionOperationServlet + /ShareTransactionOperationServlet + + + UploadFile + /UploadFile + + + ShareDividentpayoutServlet + /ShareDividentpayoutServlet + + + SigUploadFile + /SigUploadFile + + + PassbookServlet + /PassbookServlet + + + NeftRtgsInitiationServlet + /NeftRtgsInitiationServlet + + + DistScaleOfFinanceServlet + /DistScaleOfFinanceServlet + + + LeaseCommodityServlet + /LeaseCommodityServlet + + + InvestmentCreationServlet + /InvestmentCreationServlet + + + BorrowingCreationServlet + /BorrowingCreationServlet + + + mocOperationsServlet + /mocOperationsServlet + + + SwapCashDenoServlet + /SwapCashDenoServlet + + + MicroFileProcesssingServlet + Controller.MicroFileProcesssingServlet + + + MicroFileProcesssingServlet + /MicroFileProcesssingServlet + + + ChequePostingServlet + /ChequePostingServlet + + + CashWidrawlDDSServlet + /CashWidrawlDDSServlet + + + AgentMappingServlet + /AgentMappingServlet + + + TransactionDDSServlet + /TransactionDDSServlet + + + TotalCashDepositDDSServlet + /TotalCashDepositDDSServlet + + + InsuranceAdditionServlet + /InsuranceAdditionServlet + + + WelcomeServlet + /WelcomeServlet + + + WelcomeDao + /WelcomeDao + + + UserLoginManagementServlet + /UserLoginManagementServlet + + + BulkFileUploadServlet + /BulkFileUploadServlet + + + AccountRewnewBulkServlet + /AccountRewnewBulkServlet + + + + ModifyLoanInterestServlet + Controller.ModifyLoanInterestServlet + + + ModifyLoanInterestServlet + /ModifyLoanInterestServlet + + + + ModifyServicesServlet + Controller.ModifyServicesServlet + + + ModifyServicesServlet + /ModifyServicesServlet + + + FarmerDetailsUpdationServlet + /FarmerDetailsUpdationServlet + + + BulkMarkServlet + /BulkMarkServlet + + + BulkMarkServletSTB + /BulkMarkServletSTB + + + EnquiryServlet + /EnquiryServlet + + + InwardCsvServlet + /InwardCsvServlet + + + UploadIdFile + /UploadIdFile + + + DirectBenifitTransferServlet + /DirectBenifitTransferServlet + + + AccountServlet + /AccountServlet + + + AccAmendServlet + /AccAmendServlet + + + AmendInterestServlet + /AmendInterestServlet + + + ForceDebitCapitalisationServlet + /ForceDebitCapitalisationServlet + + + CBSAccountMappingServlet + /CBSAccountMappingServlet + + + resetPasswordServlet + /resetPasswordServlet + + + KCCForceCapitalisationServlet + /KCCForceCapitalisationServlet + + + ForceAccountClosureServlet + /ForceAccountClosureServlet + + + BGLAccountCreationServlet + /BGLAccountCreationServlet + + + UserCreationServlet + /UserCreationServlet + + + LienMarkingServlet + /LienMarkingServlet + + + tradingFinancialYearAdjustmentServlet + /tradingFinancialYearAdjustmentServlet + + + AccountModeOfOperationServlet + /AccountModeOfOperationServlet + + + TDRepayMethodServlet + /TDRepayMethodServlet + + + LoanPrincipalAdjustmentServlet + /LoanPrincipalAdjustmentServlet + + + UserAmendmentServlet + /UserAmendmentServlet + + + AccountRewnewBulkSTBServlet + /AccountRewnewBulkSTBServlet + + + MiscChargeDeductionServlet + /MiscChargeDeductionServlet + + + UpdatePacsDetailsServlet + /UpdatePacsDetailsServlet + + + AccountServletSTB + /AccountServletSTB + + + AccountDetailsServlet + /AccountDetailsServlet + + + TransactionAuthorizationServlet_STB + /TransactionAuthorizationServlet_STB + + + MyIntimationServlet_STB + /MyIntimationServlet_STB + + + ChangeUserPasswordServlet_fflag + /ChangeUserPasswordServlet_fflag + + + privacyPolicyServlet + /privacyPolicyServlet + + + TransactionAuthorizationServlet_Trading + /TransactionAuthorizationServlet_Trading + + + MyIntimationServlet_Trading + /MyIntimationServlet_Trading + + + SBRateSlabServlet + /SBRateSlabServlet + + + PLAppropriationServlet + /PLAppropriationServlet + + + RemoveLienServlet + /RemoveLienServlet + + + SellPurchaseAdjustmentServlet + /SellPurchaseAdjustmentServlet + + + GradeMasterServlet + /GradeMasterServlet + + + DesignationMasterServlet + /DesignationMasterServlet + + + EmployeeMasterServlet + /EmployeeMasterServlet + + + EmployeeDependentMasterServlet + /EmployeeDependentMasterServlet + + + LeaveMasterServlet + /LeaveMasterServlet + + + LeaveBalanceServlet + /LeaveBalanceServlet + + + LeaveTransactionServlet + /LeaveTransactionServlet + + + PayrollBglMasterServlet + /PayrollBglMasterServlet + + + PayrollScheduleServlet + /PayrollScheduleServlet + + + CRARRiskMasterServlet + /CRARRiskMasterServlet + + + CRARWorthMasterServlet + /CRARWorthMasterServlet + + + CropLoanDisbursementServlet + /CropLoanDisbursementServlet + + + OtpVerificationServlet + /OtpVerificationServlet + + + OtpResendServlet + /OtpResendServlet + + + + 10 + + + + + Login.jsp + + + jdbc/conDS + javax.sql.DataSource + Container + Shareable + + + PACS Report Location + pacs-report + E:\PACS_REPORT + + + PACS-CBS Extract Location + cbs-extract + E:\CBS_EXTRACT + + + LoginFilter + org.common.filter.LoginFilter + + + LoginFilter + /LoginServlet + + + diff --git a/IPKS_Updated/web/web/web/accountAmend.jsp b/IPKS_Updated/web/web/web/accountAmend.jsp new file mode 100644 index 0000000..3bb278b --- /dev/null +++ b/IPKS_Updated/web/web/web/accountAmend.jsp @@ -0,0 +1,250 @@ +<%-- + Document : accountAmend + Created on : Dec 11, 2018, 6:00:55 PM + Author : 981898 +--%> + +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.UUID" %> + +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Account Limit Update + + + + + + + + + + + + + + + + +
+ + <% + int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + String sysDt = new String(); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select to_char(SYSTEM_DATE,'DD/MM/YYYY') from system_date"); + while (rs.next()) { + sysDt = rs.getString(1); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if (statement != null) { + statement.close(); + } + if (connection != null) { + connection.close(); + } + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + %> + +
+ Account Limit Update +
+ <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Account Number*:

CIF Number:Customer Name:
Limit/Sanction Amount:Available Balance:
Principle Outstanding:Interest Outstanding:
Penal Interest:Loan Due Date:

New Limit/Sanction Amount*:
New Loan Due Date*: 
+
+ + + + +
+
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/accountAmendSTB.jsp b/IPKS_Updated/web/web/web/accountAmendSTB.jsp new file mode 100644 index 0000000..3b6b83b --- /dev/null +++ b/IPKS_Updated/web/web/web/accountAmendSTB.jsp @@ -0,0 +1,245 @@ +<%-- + Document : accountAmendSTB + Created on : Dec 11, 2018, 6:00:55 PM + Author : 1242938 +--%> + +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.Date"%> +<%@page import="LoginDb.DbHandler"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="java.util.UUID" %> + +<%String uuid = UUID.randomUUID().toString();%> +<% try { +%> + + + + + Account Amendmend + + + + + + + + + + + + + + + + +
+ + <% + int count = 1; + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + String sysDt = new String(); + Connection connection = null; + ResultSet rs = null; + Statement statement = null; + connection = DbHandler.getDBConnection(); + try { + statement = connection.createStatement(); + rs = statement.executeQuery("select to_char(SYSTEM_DATE,'DD/MM/YYYY') from system_date"); + while (rs.next()) { + sysDt = rs.getString(1); + } + // statement.close(); + // connection.close(); + } catch (Exception e) { + System.out.println("Error occurred during processing."); + } finally { + try { + if(statement !=null) + statement.close(); + if (connection != null) + connection.close(); + + } catch (Exception e) { + System.out.println("Error Occurred during connection close."); + } + + } + %> + +
+ Account Limit Update +
+ <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> + +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Account Number:

Pacs ID:Pacs Name:
CIF Number:Customer Name:
Limit/Sanction Amt:Available Balance:
Priciple Outstanding:Interest Outstanding:
Penal Interest:Loan Due Date:

New Limit/Sanction Amt:
New Loan Due Date:
+
+ + + + +
+
+
+ + +<% } catch (Exception e) { + + } +%> \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/accountCreation.jsp b/IPKS_Updated/web/web/web/accountCreation.jsp new file mode 100644 index 0000000..c4cf1f2 --- /dev/null +++ b/IPKS_Updated/web/web/web/accountCreation.jsp @@ -0,0 +1,487 @@ +<%-- + Document : accountCreation + Created on : Mar 8, 2016, 1:20:58 PM + Author : Tcs Helpdesk10 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.AccountCreationBean"%> + + + Account Creation + + + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + +
+ Account Creation + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Account Information :

Product Code*:
Interest Category*:
Segment Code*: + +
CIF Number*:

Collateral Information :

Collateral Type*: + +
Land in Acres*:
Description*:
Current Valuation (in Rs.)*:
Safe Lending Margin*: %%

Limit Information

Total Limit/Sanction Amount*:
Limit in Kind*: %%
Loan Due Date*: 

Additional Information :

Activity Code*: + +
Customer Type*: + +

Interest Information:

Interest Rate*:
Penal Interest Rate*:
+
+ + +
+
+
+ +
+ + + + +
+
+ + diff --git a/IPKS_Updated/web/web/web/accountCreationReadOnly.jsp b/IPKS_Updated/web/web/web/accountCreationReadOnly.jsp new file mode 100644 index 0000000..614b84d --- /dev/null +++ b/IPKS_Updated/web/web/web/accountCreationReadOnly.jsp @@ -0,0 +1,309 @@ +<%-- + Document : accountCreationReadOnly + Created on : Mar 8, 2016, 1:20:58 PM + Author : Tcs Helpdesk10 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.AccountCreationBean"%> + + + Account Creation + + + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + + <% + Object AccountCreationBeanObj = request.getAttribute("oAccountCreationBean"); + AccountCreationBean oAccountCreationBean = new AccountCreationBean(); + + if (AccountCreationBeanObj != null) { + oAccountCreationBean = (AccountCreationBean) request.getAttribute("oAccountCreationBean"); + + } + %> + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + +
+ ACCOUNT CREATION + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+ + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Account Information :

Product Code :
Intt Category :
Segment Code : + +
CIF Number :
Customer Name :
Linked CBS Savings Account :

Limit Information

Total Limit/Sanction Amt :
Limit in Kind :%
Loan Due Date :

Collateral Information :

Collateral Type : + +
Land in Acres :
Description :
Current Valuation (in Rs.):
Safe Lending Margin :%

Interest Information:

Interest Rate*:
Penal Interest Rate*:

Additional Information :

Activity Code : + +
Customer Type : + +
Authorizer's Comment: + +
+
+ + +
+
+
+ +
+ <%}%> + + + + +
+
+ + diff --git a/IPKS_Updated/web/web/web/accountEnquiry.jsp b/IPKS_Updated/web/web/web/accountEnquiry.jsp new file mode 100644 index 0000000..35c33ec --- /dev/null +++ b/IPKS_Updated/web/web/web/accountEnquiry.jsp @@ -0,0 +1,545 @@ +<%-- + Document : accountEnquiry + Created on : Aug 3, 2015, 2:23:35 PM + Author : Administrator +--%> +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.util.ArrayList"%> +<%@page import="DataEntryBean.EnquiryBean"%> + + + KCC Account Enquiry + + + + + + + + + + + + + + + + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + +
+ <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + Object alEnquiryBeanObj = request.getAttribute("alEnquiryBean"); + ArrayList alEnquiryBean = new ArrayList(); + if (alEnquiryBeanObj != null) { + alEnquiryBean = (ArrayList) request.getAttribute("alEnquiryBean"); + } + %> + <% + String pacsId = (String) session.getAttribute("pacsId"); + Object oEnquiryBeanSearchObj = request.getAttribute("oEnquiryBeanSearchObj"); + EnquiryBean oEnquiryBean = new EnquiryBean(); + EnquiryBean oEnquiryBeanSearch = new EnquiryBean(); + if (oEnquiryBeanSearchObj != null) { + oEnquiryBean = (EnquiryBean) request.getAttribute("oEnquiryBeanSearchObj"); + session.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearchObj); + } + %> + + + <% + int flag2 = 1; + int curPage = 0; + try { + curPage = Integer.parseInt(request.getAttribute("currentPage").toString()); + } catch (Exception e) { + curPage = 1; + } + if (alEnquiryBean.size() > 0) { + flag2 = 2; + } + int totalRecordCount = 0; + int recordCount = 0; + + try { + totalRecordCount = Integer.parseInt(request.getAttribute("totalRecordCount").toString()); + recordCount = Integer.parseInt(request.getAttribute("recordCount").toString()); + } catch (Exception e) { + totalRecordCount = 0; + recordCount = 0; + } + totalRecordCount = totalRecordCount + alEnquiryBean.size(); + + %> + <%String subPacsFlag = (String) session.getAttribute("subPacsFlag"); + %> + +
+ KCC Account Enquiry Details +
+ + + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <% }%> +
+
+ + +
+ <%--
--%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Account Number:      Product Name*: +

From Date:       To Date:  

From Amount:      To Amount:

Linked SB Account Number:      Sub-PACS Name:

Old A/C Number:     Old CIF Number:

IPKS CIF Number:
+

+
+ + +
+


+ + + + + "> + + + + "> + + + + + +
+ + <%if (displayFlag.equalsIgnoreCase("Y")) {%> +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <% + oEnquiryBean = null; + + for (int i = 0; i < alEnquiryBean.size(); i++) { + oEnquiryBean = alEnquiryBean.get(i); + %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%}%> + + +
Account NumberLink CBS Account NumberCustomer NumberProduct NameCustomer NameOpening DateAccount StatusSanction AmountAvailable BalanceLoan Due DatePrincipal PaidPrincipal OutstandingInterest RatePenal Interest RatePrincipal OverdueInterest PaidInterest OutstandingPenal Interest PaidPenal Interest OutstandingNPA Interest PaidNPA Interest OutstandingTotal Outstanding BalanceTotal Interest AccruedOld Account NoOld CIF NoAccount Statement of The Day
<%=blankNull(oEnquiryBean.getLinkAccNo())%><%=blankNull(oEnquiryBean.getCustomerNo())%><%=blankNull(oEnquiryBean.getProductNameDisplay())%><%=blankNull(oEnquiryBean.getCustomerName())%><%=blankNull(oEnquiryBean.getAccountOpenDate())%><%=blankNull(oEnquiryBean.getCurr_Status())%><%=blankNull(oEnquiryBean.getSanctionAmount())%><%=blankNull(oEnquiryBean.getAvailBalance())%><%=blankNull(oEnquiryBean.getLimitExpiryDate())%><%=blankNull(oEnquiryBean.getPrinPaid())%><%=blankNull(oEnquiryBean.getPrinOutstanding())%><%=blankNull(oEnquiryBean.getInttrate())%><%=blankNull(oEnquiryBean.getPenalIntRate())%><%=blankNull(oEnquiryBean.getPrinOverdue())%><%=blankNull(oEnquiryBean.getInttPaid())%><%=blankNull(oEnquiryBean.getInttOutstanding())%><%=blankNull(oEnquiryBean.getPenalIntt())%><%=blankNull(oEnquiryBean.getPenalInttOutstanding())%><%=blankNull(oEnquiryBean.getNPAINTTPAID())%><%=blankNull(oEnquiryBean.getNPAINTTOUTST())%><%=blankNull(oEnquiryBean.getTotaloutst())%><%=blankNull(oEnquiryBean.getintAccrued())%><%=blankNull(oEnquiryBean.getOldAccNo())%><%=blankNull(oEnquiryBean.getOldCifNo())%>
+


+ + <%--For displaying Previous link except for the 1st page --%> + + + <% if (curPage > 1 && flag2 == 2) {%> +
+ <% }%> + <% if (flag2 == 2) {%> + + <% if (curPage == 1) {%> + + <% } + }%> + +


+ + +
+
+ <%}%> +
+ + + + + + + diff --git a/IPKS_Updated/web/web/web/accountRenewal.jsp b/IPKS_Updated/web/web/web/accountRenewal.jsp new file mode 100644 index 0000000..b1201e7 --- /dev/null +++ b/IPKS_Updated/web/web/web/accountRenewal.jsp @@ -0,0 +1,431 @@ +<%-- + Document : accountRenewal + Created on : Mar 8, 2016, 1:20:58 PM + Author : Tcs Helpdesk10 +--%> + +<%@page import="LoginDb.DbHandler"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.io.*"%> +<%@page import="java.util.*"%> +<%@page import="java.sql.Connection"%> +<%@page import="DataEntryBean.AccountRenewalBean"%> + + + Account Renewal + + + + + + + + + + + + + + + + + <% + String error_msg = ""; + Object error = request.getAttribute("message"); + if (error != null) { + error_msg = error.toString(); + } + %> + + <% + String displayFlag = ""; + Object display = request.getAttribute("displayFlag"); + if (display != null) { + displayFlag = display.toString(); + } + %> + + <% + Object oAccountRenewalBeanObj = request.getAttribute("oAccountRenewalBeanObj"); + AccountRenewalBean oAccountRenewalBean = new AccountRenewalBean(); + if (oAccountRenewalBeanObj != null) { + oAccountRenewalBean = (AccountRenewalBean) request.getAttribute("oAccountRenewalBeanObj"); + + } + %> + + +
+ + <%! + String blankNull(String s) { + return (s == null) ? "" : s; + } + %> + +
+ Account Renewal + +
+ + <%if (!error_msg.equalsIgnoreCase("")) {%> +
<%= error_msg%>
+ <%}%> +
+ <% if (displayFlag.equalsIgnoreCase("")) {%> +
+
+ + + + + +
Enter CIF Number:

Enter CC Account Number:

+                          + +
+
+ <%}%> +
+ <% + if (displayFlag.equalsIgnoreCase("Y")) { + %> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Account Information:

Account Number:
Product Code:
Interest Category:
Segment Code: + +
CIF Number:
Linked CBS Savings Account:

Limit Information

Limit/Sanction Amount*:
Loan Due Date*: 

Collateral Information:

Collateral Type*: + +
Land in Acres*:
Description*:
Current Valuation (in Rs.)*:
Safe Lending Margin*:%

Additional Information:

Activity Code: + +
Customer Type: + +
+
+ + +
+
+
+ +
+ <% }%> + + + +
+
+ + \ No newline at end of file diff --git a/IPKS_Updated/web/web/web/bootstrap/css/bootstrap-responsive.css b/IPKS_Updated/web/web/web/bootstrap/css/bootstrap-responsive.css new file mode 100644 index 0000000..c0bba15 --- /dev/null +++ b/IPKS_Updated/web/web/web/bootstrap/css/bootstrap-responsive.css @@ -0,0 +1,1109 @@ +/*! + * Bootstrap Responsive v2.3.2 + * + * Copyright 2013 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world by @mdo and @fat. + */ + +.clearfix { + *zoom: 1; +} + +.clearfix:before, +.clearfix:after { + display: table; + line-height: 0; + content: ""; +} + +.clearfix:after { + clear: both; +} + +.hide-text { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} + +.input-block-level { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +@-ms-viewport { + width: device-width; +} + +.hidden { + display: none; + visibility: hidden; +} + +.visible-phone { + display: none !important; +} + +.visible-tablet { + display: none !important; +} + +.hidden-desktop { + display: none !important; +} + +.visible-desktop { + display: inherit !important; +} + +@media (min-width: 768px) and (max-width: 979px) { + .hidden-desktop { + display: inherit !important; + } + .visible-desktop { + display: none !important ; + } + .visible-tablet { + display: inherit !important; + } + .hidden-tablet { + display: none !important; + } +} + +@media (max-width: 767px) { + .hidden-desktop { + display: inherit !important; + } + .visible-desktop { + display: none !important; + } + .visible-phone { + display: inherit !important; + } + .hidden-phone { + display: none !important; + } +} + +.visible-print { + display: none !important; +} + +@media print { + .visible-print { + display: inherit !important; + } + .hidden-print { + display: none !important; + } +} + +@media (min-width: 1200px) { + .row { + margin-left: -30px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + line-height: 0; + content: ""; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 30px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 1170px; + } + .span12 { + width: 1170px; + } + .span11 { + width: 1070px; + } + .span10 { + width: 970px; + } + .span9 { + width: 870px; + } + .span8 { + width: 770px; + } + .span7 { + width: 670px; + } + .span6 { + width: 570px; + } + .span5 { + width: 470px; + } + .span4 { + width: 370px; + } + .span3 { + width: 270px; + } + .span2 { + width: 170px; + } + .span1 { + width: 70px; + } + .offset12 { + margin-left: 1230px; + } + .offset11 { + margin-left: 1130px; + } + .offset10 { + margin-left: 1030px; + } + .offset9 { + margin-left: 930px; + } + .offset8 { + margin-left: 830px; + } + .offset7 { + margin-left: 730px; + } + .offset6 { + margin-left: 630px; + } + .offset5 { + margin-left: 530px; + } + .offset4 { + margin-left: 430px; + } + .offset3 { + margin-left: 330px; + } + .offset2 { + margin-left: 230px; + } + .offset1 { + margin-left: 130px; + } + .row-fluid { + width: 100%; + *zoom: 1; + } + .row-fluid:before, + .row-fluid:after { + display: table; + line-height: 0; + content: ""; + } + .row-fluid:after { + clear: both; + } + .row-fluid [class*="span"] { + display: block; + float: left; + width: 100%; + min-height: 30px; + margin-left: 2.564102564102564%; + *margin-left: 2.5109110747408616%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .row-fluid [class*="span"]:first-child { + margin-left: 0; + } + .row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.564102564102564%; + } + .row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; + } + .row-fluid .span11 { + width: 91.45299145299145%; + *width: 91.39979996362975%; + } + .row-fluid .span10 { + width: 82.90598290598291%; + *width: 82.8527914166212%; + } + .row-fluid .span9 { + width: 74.35897435897436%; + *width: 74.30578286961266%; + } + .row-fluid .span8 { + width: 65.81196581196582%; + *width: 65.75877432260411%; + } + .row-fluid .span7 { + width: 57.26495726495726%; + *width: 57.21176577559556%; + } + .row-fluid .span6 { + width: 48.717948717948715%; + *width: 48.664757228587014%; + } + .row-fluid .span5 { + width: 40.17094017094017%; + *width: 40.11774868157847%; + } + .row-fluid .span4 { + width: 31.623931623931625%; + *width: 31.570740134569924%; + } + .row-fluid .span3 { + width: 23.076923076923077%; + *width: 23.023731587561375%; + } + .row-fluid .span2 { + width: 14.52991452991453%; + *width: 14.476723040552828%; + } + .row-fluid .span1 { + width: 5.982905982905983%; + *width: 5.929714493544281%; + } + .row-fluid .offset12 { + margin-left: 105.12820512820512%; + *margin-left: 105.02182214948171%; + } + .row-fluid .offset12:first-child { + margin-left: 102.56410256410257%; + *margin-left: 102.45771958537915%; + } + .row-fluid .offset11 { + margin-left: 96.58119658119658%; + *margin-left: 96.47481360247316%; + } + .row-fluid .offset11:first-child { + margin-left: 94.01709401709402%; + *margin-left: 93.91071103837061%; + } + .row-fluid .offset10 { + margin-left: 88.03418803418803%; + *margin-left: 87.92780505546462%; + } + .row-fluid .offset10:first-child { + margin-left: 85.47008547008548%; + *margin-left: 85.36370249136206%; + } + .row-fluid .offset9 { + margin-left: 79.48717948717949%; + *margin-left: 79.38079650845607%; + } + .row-fluid .offset9:first-child { + margin-left: 76.92307692307693%; + *margin-left: 76.81669394435352%; + } + .row-fluid .offset8 { + margin-left: 70.94017094017094%; + *margin-left: 70.83378796144753%; + } + .row-fluid .offset8:first-child { + margin-left: 68.37606837606839%; + *margin-left: 68.26968539734497%; + } + .row-fluid .offset7 { + margin-left: 62.393162393162385%; + *margin-left: 62.28677941443899%; + } + .row-fluid .offset7:first-child { + margin-left: 59.82905982905982%; + *margin-left: 59.72267685033642%; + } + .row-fluid .offset6 { + margin-left: 53.84615384615384%; + *margin-left: 53.739770867430444%; + } + .row-fluid .offset6:first-child { + margin-left: 51.28205128205128%; + *margin-left: 51.175668303327875%; + } + .row-fluid .offset5 { + margin-left: 45.299145299145295%; + *margin-left: 45.1927623204219%; + } + .row-fluid .offset5:first-child { + margin-left: 42.73504273504273%; + *margin-left: 42.62865975631933%; + } + .row-fluid .offset4 { + margin-left: 36.75213675213675%; + *margin-left: 36.645753773413354%; + } + .row-fluid .offset4:first-child { + margin-left: 34.18803418803419%; + *margin-left: 34.081651209310785%; + } + .row-fluid .offset3 { + margin-left: 28.205128205128204%; + *margin-left: 28.0987452264048%; + } + .row-fluid .offset3:first-child { + margin-left: 25.641025641025642%; + *margin-left: 25.53464266230224%; + } + .row-fluid .offset2 { + margin-left: 19.65811965811966%; + *margin-left: 19.551736679396257%; + } + .row-fluid .offset2:first-child { + margin-left: 17.094017094017094%; + *margin-left: 16.98763411529369%; + } + .row-fluid .offset1 { + margin-left: 11.11111111111111%; + *margin-left: 11.004728132387708%; + } + .row-fluid .offset1:first-child { + margin-left: 8.547008547008547%; + *margin-left: 8.440625568285142%; + } + input, + textarea, + .uneditable-input { + margin-left: 0; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 30px; + } + input.span12, + textarea.span12, + .uneditable-input.span12 { + width: 1156px; + } + input.span11, + textarea.span11, + .uneditable-input.span11 { + width: 1056px; + } + input.span10, + textarea.span10, + .uneditable-input.span10 { + width: 956px; + } + input.span9, + textarea.span9, + .uneditable-input.span9 { + width: 856px; + } + input.span8, + textarea.span8, + .uneditable-input.span8 { + width: 756px; + } + input.span7, + textarea.span7, + .uneditable-input.span7 { + width: 656px; + } + input.span6, + textarea.span6, + .uneditable-input.span6 { + width: 556px; + } + input.span5, + textarea.span5, + .uneditable-input.span5 { + width: 456px; + } + input.span4, + textarea.span4, + .uneditable-input.span4 { + width: 356px; + } + input.span3, + textarea.span3, + .uneditable-input.span3 { + width: 256px; + } + input.span2, + textarea.span2, + .uneditable-input.span2 { + width: 156px; + } + input.span1, + textarea.span1, + .uneditable-input.span1 { + width: 56px; + } + .thumbnails { + margin-left: -30px; + } + .thumbnails > li { + margin-left: 30px; + } + .row-fluid .thumbnails { + margin-left: 0; + } +} + +@media (min-width: 768px) and (max-width: 979px) { + .row { + margin-left: -20px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + line-height: 0; + content: ""; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 724px; + } + .span12 { + width: 724px; + } + .span11 { + width: 662px; + } + .span10 { + width: 600px; + } + .span9 { + width: 538px; + } + .span8 { + width: 476px; + } + .span7 { + width: 414px; + } + .span6 { + width: 352px; + } + .span5 { + width: 290px; + } + .span4 { + width: 228px; + } + .span3 { + width: 166px; + } + .span2 { + width: 104px; + } + .span1 { + width: 42px; + } + .offset12 { + margin-left: 764px; + } + .offset11 { + margin-left: 702px; + } + .offset10 { + margin-left: 640px; + } + .offset9 { + margin-left: 578px; + } + .offset8 { + margin-left: 516px; + } + .offset7 { + margin-left: 454px; + } + .offset6 { + margin-left: 392px; + } + .offset5 { + margin-left: 330px; + } + .offset4 { + margin-left: 268px; + } + .offset3 { + margin-left: 206px; + } + .offset2 { + margin-left: 144px; + } + .offset1 { + margin-left: 82px; + } + .row-fluid { + width: 100%; + *zoom: 1; + } + .row-fluid:before, + .row-fluid:after { + display: table; + line-height: 0; + content: ""; + } + .row-fluid:after { + clear: both; + } + .row-fluid [class*="span"] { + display: block; + float: left; + width: 100%; + min-height: 30px; + margin-left: 2.7624309392265194%; + *margin-left: 2.709239449864817%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .row-fluid [class*="span"]:first-child { + margin-left: 0; + } + .row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.7624309392265194%; + } + .row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; + } + .row-fluid .span11 { + width: 91.43646408839778%; + *width: 91.38327259903608%; + } + .row-fluid .span10 { + width: 82.87292817679558%; + *width: 82.81973668743387%; + } + .row-fluid .span9 { + width: 74.30939226519337%; + *width: 74.25620077583166%; + } + .row-fluid .span8 { + width: 65.74585635359117%; + *width: 65.69266486422946%; + } + .row-fluid .span7 { + width: 57.18232044198895%; + *width: 57.12912895262725%; + } + .row-fluid .span6 { + width: 48.61878453038674%; + *width: 48.56559304102504%; + } + .row-fluid .span5 { + width: 40.05524861878453%; + *width: 40.00205712942283%; + } + .row-fluid .span4 { + width: 31.491712707182323%; + *width: 31.43852121782062%; + } + .row-fluid .span3 { + width: 22.92817679558011%; + *width: 22.87498530621841%; + } + .row-fluid .span2 { + width: 14.3646408839779%; + *width: 14.311449394616199%; + } + .row-fluid .span1 { + width: 5.801104972375691%; + *width: 5.747913483013988%; + } + .row-fluid .offset12 { + margin-left: 105.52486187845304%; + *margin-left: 105.41847889972962%; + } + .row-fluid .offset12:first-child { + margin-left: 102.76243093922652%; + *margin-left: 102.6560479605031%; + } + .row-fluid .offset11 { + margin-left: 96.96132596685082%; + *margin-left: 96.8549429881274%; + } + .row-fluid .offset11:first-child { + margin-left: 94.1988950276243%; + *margin-left: 94.09251204890089%; + } + .row-fluid .offset10 { + margin-left: 88.39779005524862%; + *margin-left: 88.2914070765252%; + } + .row-fluid .offset10:first-child { + margin-left: 85.6353591160221%; + *margin-left: 85.52897613729868%; + } + .row-fluid .offset9 { + margin-left: 79.8342541436464%; + *margin-left: 79.72787116492299%; + } + .row-fluid .offset9:first-child { + margin-left: 77.07182320441989%; + *margin-left: 76.96544022569647%; + } + .row-fluid .offset8 { + margin-left: 71.2707182320442%; + *margin-left: 71.16433525332079%; + } + .row-fluid .offset8:first-child { + margin-left: 68.50828729281768%; + *margin-left: 68.40190431409427%; + } + .row-fluid .offset7 { + margin-left: 62.70718232044199%; + *margin-left: 62.600799341718584%; + } + .row-fluid .offset7:first-child { + margin-left: 59.94475138121547%; + *margin-left: 59.838368402492065%; + } + .row-fluid .offset6 { + margin-left: 54.14364640883978%; + *margin-left: 54.037263430116376%; + } + .row-fluid .offset6:first-child { + margin-left: 51.38121546961326%; + *margin-left: 51.27483249088986%; + } + .row-fluid .offset5 { + margin-left: 45.58011049723757%; + *margin-left: 45.47372751851417%; + } + .row-fluid .offset5:first-child { + margin-left: 42.81767955801105%; + *margin-left: 42.71129657928765%; + } + .row-fluid .offset4 { + margin-left: 37.01657458563536%; + *margin-left: 36.91019160691196%; + } + .row-fluid .offset4:first-child { + margin-left: 34.25414364640884%; + *margin-left: 34.14776066768544%; + } + .row-fluid .offset3 { + margin-left: 28.45303867403315%; + *margin-left: 28.346655695309746%; + } + .row-fluid .offset3:first-child { + margin-left: 25.69060773480663%; + *margin-left: 25.584224756083227%; + } + .row-fluid .offset2 { + margin-left: 19.88950276243094%; + *margin-left: 19.783119783707537%; + } + .row-fluid .offset2:first-child { + margin-left: 17.12707182320442%; + *margin-left: 17.02068884448102%; + } + .row-fluid .offset1 { + margin-left: 11.32596685082873%; + *margin-left: 11.219583872105325%; + } + .row-fluid .offset1:first-child { + margin-left: 8.56353591160221%; + *margin-left: 8.457152932878806%; + } + input, + textarea, + .uneditable-input { + margin-left: 0; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; + } + input.span12, + textarea.span12, + .uneditable-input.span12 { + width: 710px; + } + input.span11, + textarea.span11, + .uneditable-input.span11 { + width: 648px; + } + input.span10, + textarea.span10, + .uneditable-input.span10 { + width: 586px; + } + input.span9, + textarea.span9, + .uneditable-input.span9 { + width: 524px; + } + input.span8, + textarea.span8, + .uneditable-input.span8 { + width: 462px; + } + input.span7, + textarea.span7, + .uneditable-input.span7 { + width: 400px; + } + input.span6, + textarea.span6, + .uneditable-input.span6 { + width: 338px; + } + input.span5, + textarea.span5, + .uneditable-input.span5 { + width: 276px; + } + input.span4, + textarea.span4, + .uneditable-input.span4 { + width: 214px; + } + input.span3, + textarea.span3, + .uneditable-input.span3 { + width: 152px; + } + input.span2, + textarea.span2, + .uneditable-input.span2 { + width: 90px; + } + input.span1, + textarea.span1, + .uneditable-input.span1 { + width: 28px; + } +} + +@media (max-width: 767px) { + body { + padding-right: 20px; + padding-left: 20px; + } + .navbar-fixed-top, + .navbar-fixed-bottom, + .navbar-static-top { + margin-right: -20px; + margin-left: -20px; + } + .container-fluid { + padding: 0; + } + .dl-horizontal dt { + float: none; + width: auto; + clear: none; + text-align: left; + } + .dl-horizontal dd { + margin-left: 0; + } + .container { + width: auto; + } + .row-fluid { + width: 100%; + } + .row, + .thumbnails { + margin-left: 0; + } + .thumbnails > li { + float: none; + margin-left: 0; + } + [class*="span"], + .uneditable-input[class*="span"], + .row-fluid [class*="span"] { + display: block; + float: none; + width: 100%; + margin-left: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .span12, + .row-fluid .span12 { + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .row-fluid [class*="offset"]:first-child { + margin-left: 0; + } + .input-large, + .input-xlarge, + .input-xxlarge, + input[class*="span"], + select[class*="span"], + textarea[class*="span"], + .uneditable-input { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .input-prepend input, + .input-append input, + .input-prepend input[class*="span"], + .input-append input[class*="span"] { + display: inline-block; + width: auto; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 0; + } + .modal { + position: fixed; + top: 20px; + right: 20px; + left: 20px; + width: auto; + margin: 0; + } + .modal.fade { + top: -100px; + } + .modal.fade.in { + top: 20px; + } +} + +@media (max-width: 480px) { + .nav-collapse { + -webkit-transform: translate3d(0, 0, 0); + } + .page-header h1 small { + display: block; + line-height: 20px; + } + input[type="checkbox"], + input[type="radio"] { + border: 1px solid #ccc; + } + .form-horizontal .control-label { + float: none; + width: auto; + padding-top: 0; + text-align: left; + } + .form-horizontal .controls { + margin-left: 0; + } + .form-horizontal .control-list { + padding-top: 0; + } + .form-horizontal .form-actions { + padding-right: 10px; + padding-left: 10px; + } + .media .pull-left, + .media .pull-right { + display: block; + float: none; + margin-bottom: 10px; + } + .media-object { + margin-right: 0; + margin-left: 0; + } + .modal { + top: 10px; + right: 10px; + left: 10px; + } + .modal-header .close { + padding: 10px; + margin: -10px; + } + .carousel-caption { + position: static; + } +} + +@media (max-width: 979px) { + body { + padding-top: 0; + } + .navbar-fixed-top, + .navbar-fixed-bottom { + position: static; + } + .navbar-fixed-top { + margin-bottom: 20px; + } + .navbar-fixed-bottom { + margin-top: 20px; + } + .navbar-fixed-top .navbar-inner, + .navbar-fixed-bottom .navbar-inner { + padding: 5px; + } + .navbar .container { + width: auto; + padding: 0; + } + .navbar .brand { + padding-right: 10px; + padding-left: 10px; + margin: 0 0 0 -5px; + } + .nav-collapse { + clear: both; + } + .nav-collapse .nav { + float: none; + margin: 0 0 10px; + } + .nav-collapse .nav > li { + float: none; + } + .nav-collapse .nav > li > a { + margin-bottom: 2px; + } + .nav-collapse .nav > .divider-vertical { + display: none; + } + .nav-collapse .nav .nav-header { + color: #777777; + text-shadow: none; + } + .nav-collapse .nav > li > a, + .nav-collapse .dropdown-menu a { + padding: 9px 15px; + font-weight: bold; + color: #777777; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + } + .nav-collapse .btn { + padding: 4px 10px 4px; + font-weight: normal; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + } + .nav-collapse .dropdown-menu li + li a { + margin-bottom: 2px; + } + .nav-collapse .nav > li > a:hover, + .nav-collapse .nav > li > a:focus, + .nav-collapse .dropdown-menu a:hover, + .nav-collapse .dropdown-menu a:focus { + background-color: #f2f2f2; + } + .navbar-inverse .nav-collapse .nav > li > a, + .navbar-inverse .nav-collapse .dropdown-menu a { + color: #999999; + } + .navbar-inverse .nav-collapse .nav > li > a:hover, + .navbar-inverse .nav-collapse .nav > li > a:focus, + .navbar-inverse .nav-collapse .dropdown-menu a:hover, + .navbar-inverse .nav-collapse .dropdown-menu a:focus { + background-color: #111111; + } + .nav-collapse.in .btn-group { + padding: 0; + margin-top: 5px; + } + .nav-collapse .dropdown-menu { + position: static; + top: auto; + left: auto; + display: none; + float: none; + max-width: none; + padding: 0; + margin: 0 15px; + background-color: transparent; + border: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + } + .nav-collapse .open > .dropdown-menu { + display: block; + } + .nav-collapse .dropdown-menu:before, + .nav-collapse .dropdown-menu:after { + display: none; + } + .nav-collapse .dropdown-menu .divider { + display: none; + } + .nav-collapse .nav > li > .dropdown-menu:before, + .nav-collapse .nav > li > .dropdown-menu:after { + display: none; + } + .nav-collapse .navbar-form, + .nav-collapse .navbar-search { + float: none; + padding: 10px 15px; + margin: 10px 0; + border-top: 1px solid #f2f2f2; + border-bottom: 1px solid #f2f2f2; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); + } + .navbar-inverse .nav-collapse .navbar-form, + .navbar-inverse .nav-collapse .navbar-search { + border-top-color: #111111; + border-bottom-color: #111111; + } + .navbar .nav-collapse .nav.pull-right { + float: none; + margin-left: 0; + } + .nav-collapse, + .nav-collapse.collapse { + height: 0; + overflow: hidden; + } + .navbar .btn-navbar { + display: block; + } + .navbar-static .navbar-inner { + padding-right: 10px; + padding-left: 10px; + } +} + +@media (min-width: 980px) { + .nav-collapse.collapse { + height: auto !important; + overflow: visible !important; + } +} diff --git a/IPKS_Updated/web/web/web/bootstrap/css/bootstrap-responsive.min.css b/IPKS_Updated/web/web/web/bootstrap/css/bootstrap-responsive.min.css new file mode 100644 index 0000000..96a435b --- /dev/null +++ b/IPKS_Updated/web/web/web/bootstrap/css/bootstrap-responsive.min.css @@ -0,0 +1,9 @@ +/*! + * Bootstrap Responsive v2.3.2 + * + * Copyright 2013 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world by @mdo and @fat. + */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@-ms-viewport{width:device-width}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}.visible-desktop{display:inherit!important}@media(min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media(max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:inherit!important}.hidden-print{display:none!important}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:30px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.564102564102564%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%}.row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%}.row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%}.row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%}.row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%}.row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%}.row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%}.row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%}.row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%}.row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%}.row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%}.row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%}.row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%}.row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:30px}input.span12,textarea.span12,.uneditable-input.span12{width:1156px}input.span11,textarea.span11,.uneditable-input.span11{width:1056px}input.span10,textarea.span10,.uneditable-input.span10{width:956px}input.span9,textarea.span9,.uneditable-input.span9{width:856px}input.span8,textarea.span8,.uneditable-input.span8{width:756px}input.span7,textarea.span7,.uneditable-input.span7{width:656px}input.span6,textarea.span6,.uneditable-input.span6{width:556px}input.span5,textarea.span5,.uneditable-input.span5{width:456px}input.span4,textarea.span4,.uneditable-input.span4{width:356px}input.span3,textarea.span3,.uneditable-input.span3{width:256px}input.span2,textarea.span2,.uneditable-input.span2{width:156px}input.span1,textarea.span1,.uneditable-input.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.7624309392265194%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.span11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}[class*="span"],.uneditable-input[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="offset"]:first-child{margin-left:0}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.controls-row [class*="span"]+[class*="span"]{margin-left:0}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.modal.fade{top:-100px}.modal.fade.in{top:20px}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.media .pull-left,.media .pull-right{display:block;float:none;margin-bottom:10px}.media-object{margin-right:0;margin-left:0}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#777;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .nav>li>a:focus,.nav-collapse .dropdown-menu a:hover,.nav-collapse .dropdown-menu a:focus{background-color:#f2f2f2}.navbar-inverse .nav-collapse .nav>li>a,.navbar-inverse .nav-collapse .dropdown-menu a{color:#999}.navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .nav>li>a:focus,.navbar-inverse .nav-collapse .dropdown-menu a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:focus{background-color:#111}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:none;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .open>.dropdown-menu{display:block}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111;border-bottom-color:#111}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}} diff --git a/IPKS_Updated/web/web/web/bootstrap/css/bootstrap.css b/IPKS_Updated/web/web/web/bootstrap/css/bootstrap.css new file mode 100644 index 0000000..5b7fe7e --- /dev/null +++ b/IPKS_Updated/web/web/web/bootstrap/css/bootstrap.css @@ -0,0 +1,6167 @@ +/*! + * Bootstrap v2.3.2 + * + * Copyright 2013 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world by @mdo and @fat. + */ + +.clearfix { + *zoom: 1; +} + +.clearfix:before, +.clearfix:after { + display: table; + line-height: 0; + content: ""; +} + +.clearfix:after { + clear: both; +} + +.hide-text { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} + +.input-block-level { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section { + display: block; +} + +audio, +canvas, +video { + display: inline-block; + *display: inline; + *zoom: 1; +} + +audio:not([controls]) { + display: none; +} + +html { + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} + +a:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +a:hover, +a:active { + outline: 0; +} + +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +img { + width: auto\9; + height: auto; + max-width: 100%; + vertical-align: middle; + border: 0; + -ms-interpolation-mode: bicubic; +} + +#map_canvas img, +.google-maps img { + max-width: none; +} + +button, +input, +select, +textarea { + margin: 0; + font-size: 100%; + vertical-align: middle; +} + +button, +input { + *overflow: visible; + line-height: normal; +} + +button::-moz-focus-inner, +input::-moz-focus-inner { + padding: 0; + border: 0; +} + +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + cursor: pointer; + -webkit-appearance: button; +} + +label, +select, +button, +input[type="button"], +input[type="reset"], +input[type="submit"], +input[type="radio"], +input[type="checkbox"] { + cursor: pointer; +} + +input[type="search"] { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-appearance: textfield; +} + +input[type="search"]::-webkit-search-decoration, +input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; +} + +textarea { + overflow: auto; + vertical-align: top; +} + +@media print { + * { + color: #000 !important; + text-shadow: none !important; + background: transparent !important; + box-shadow: none !important; + } + a, + a:visited { + text-decoration: underline; + } + a[href]:after { + content: " (" attr(href) ")"; + } + abbr[title]:after { + content: " (" attr(title) ")"; + } + .ir a:after, + a[href^="javascript:"]:after, + a[href^="#"]:after { + content: ""; + } + pre, + blockquote { + border: 1px solid #999; + page-break-inside: avoid; + } + thead { + display: table-header-group; + } + tr, + img { + page-break-inside: avoid; + } + img { + max-width: 100% !important; + } + @page { + margin: 0.5cm; + } + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + h2, + h3 { + page-break-after: avoid; + } +} + +body { + margin: 0; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 20px; + color: #333333; + background-color: #ffffff; +} + +a { + color: #0088cc; + text-decoration: none; +} + +a:hover, +a:focus { + color: #005580; + text-decoration: underline; +} + +.img-rounded { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.img-polaroid { + padding: 4px; + background-color: #fff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); +} + +.img-circle { + -webkit-border-radius: 500px; + -moz-border-radius: 500px; + border-radius: 500px; +} + +.row { + margin-left: -20px; + *zoom: 1; +} + +.row:before, +.row:after { + display: table; + line-height: 0; + content: ""; +} + +.row:after { + clear: both; +} + +[class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} + +.container, +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 940px; +} + +.span12 { + width: 940px; +} + +.span11 { + width: 860px; +} + +.span10 { + width: 780px; +} + +.span9 { + width: 700px; +} + +.span8 { + width: 620px; +} + +.span7 { + width: 540px; +} + +.span6 { + width: 460px; +} + +.span5 { + width: 380px; +} + +.span4 { + width: 300px; +} + +.span3 { + width: 220px; +} + +.span2 { + width: 140px; +} + +.span1 { + width: 60px; +} + +.offset12 { + margin-left: 980px; +} + +.offset11 { + margin-left: 900px; +} + +.offset10 { + margin-left: 820px; +} + +.offset9 { + margin-left: 740px; +} + +.offset8 { + margin-left: 660px; +} + +.offset7 { + margin-left: 580px; +} + +.offset6 { + margin-left: 500px; +} + +.offset5 { + margin-left: 420px; +} + +.offset4 { + margin-left: 340px; +} + +.offset3 { + margin-left: 260px; +} + +.offset2 { + margin-left: 180px; +} + +.offset1 { + margin-left: 100px; +} + +.row-fluid { + width: 100%; + *zoom: 1; +} + +.row-fluid:before, +.row-fluid:after { + display: table; + line-height: 0; + content: ""; +} + +.row-fluid:after { + clear: both; +} + +.row-fluid [class*="span"] { + display: block; + float: left; + width: 100%; + min-height: 30px; + margin-left: 2.127659574468085%; + *margin-left: 2.074468085106383%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.row-fluid [class*="span"]:first-child { + margin-left: 0; +} + +.row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.127659574468085%; +} + +.row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; +} + +.row-fluid .span11 { + width: 91.48936170212765%; + *width: 91.43617021276594%; +} + +.row-fluid .span10 { + width: 82.97872340425532%; + *width: 82.92553191489361%; +} + +.row-fluid .span9 { + width: 74.46808510638297%; + *width: 74.41489361702126%; +} + +.row-fluid .span8 { + width: 65.95744680851064%; + *width: 65.90425531914893%; +} + +.row-fluid .span7 { + width: 57.44680851063829%; + *width: 57.39361702127659%; +} + +.row-fluid .span6 { + width: 48.93617021276595%; + *width: 48.88297872340425%; +} + +.row-fluid .span5 { + width: 40.42553191489362%; + *width: 40.37234042553192%; +} + +.row-fluid .span4 { + width: 31.914893617021278%; + *width: 31.861702127659576%; +} + +.row-fluid .span3 { + width: 23.404255319148934%; + *width: 23.351063829787233%; +} + +.row-fluid .span2 { + width: 14.893617021276595%; + *width: 14.840425531914894%; +} + +.row-fluid .span1 { + width: 6.382978723404255%; + *width: 6.329787234042553%; +} + +.row-fluid .offset12 { + margin-left: 104.25531914893617%; + *margin-left: 104.14893617021275%; +} + +.row-fluid .offset12:first-child { + margin-left: 102.12765957446808%; + *margin-left: 102.02127659574467%; +} + +.row-fluid .offset11 { + margin-left: 95.74468085106382%; + *margin-left: 95.6382978723404%; +} + +.row-fluid .offset11:first-child { + margin-left: 93.61702127659574%; + *margin-left: 93.51063829787232%; +} + +.row-fluid .offset10 { + margin-left: 87.23404255319149%; + *margin-left: 87.12765957446807%; +} + +.row-fluid .offset10:first-child { + margin-left: 85.1063829787234%; + *margin-left: 84.99999999999999%; +} + +.row-fluid .offset9 { + margin-left: 78.72340425531914%; + *margin-left: 78.61702127659572%; +} + +.row-fluid .offset9:first-child { + margin-left: 76.59574468085106%; + *margin-left: 76.48936170212764%; +} + +.row-fluid .offset8 { + margin-left: 70.2127659574468%; + *margin-left: 70.10638297872339%; +} + +.row-fluid .offset8:first-child { + margin-left: 68.08510638297872%; + *margin-left: 67.9787234042553%; +} + +.row-fluid .offset7 { + margin-left: 61.70212765957446%; + *margin-left: 61.59574468085106%; +} + +.row-fluid .offset7:first-child { + margin-left: 59.574468085106375%; + *margin-left: 59.46808510638297%; +} + +.row-fluid .offset6 { + margin-left: 53.191489361702125%; + *margin-left: 53.085106382978715%; +} + +.row-fluid .offset6:first-child { + margin-left: 51.063829787234035%; + *margin-left: 50.95744680851063%; +} + +.row-fluid .offset5 { + margin-left: 44.68085106382979%; + *margin-left: 44.57446808510638%; +} + +.row-fluid .offset5:first-child { + margin-left: 42.5531914893617%; + *margin-left: 42.4468085106383%; +} + +.row-fluid .offset4 { + margin-left: 36.170212765957444%; + *margin-left: 36.06382978723405%; +} + +.row-fluid .offset4:first-child { + margin-left: 34.04255319148936%; + *margin-left: 33.93617021276596%; +} + +.row-fluid .offset3 { + margin-left: 27.659574468085104%; + *margin-left: 27.5531914893617%; +} + +.row-fluid .offset3:first-child { + margin-left: 25.53191489361702%; + *margin-left: 25.425531914893618%; +} + +.row-fluid .offset2 { + margin-left: 19.148936170212764%; + *margin-left: 19.04255319148936%; +} + +.row-fluid .offset2:first-child { + margin-left: 17.02127659574468%; + *margin-left: 16.914893617021278%; +} + +.row-fluid .offset1 { + margin-left: 10.638297872340425%; + *margin-left: 10.53191489361702%; +} + +.row-fluid .offset1:first-child { + margin-left: 8.51063829787234%; + *margin-left: 8.404255319148938%; +} + +[class*="span"].hide, +.row-fluid [class*="span"].hide { + display: none; +} + +[class*="span"].pull-right, +.row-fluid [class*="span"].pull-right { + float: right; +} + +.container { + margin-right: auto; + margin-left: auto; + *zoom: 1; +} + +.container:before, +.container:after { + display: table; + line-height: 0; + content: ""; +} + +.container:after { + clear: both; +} + +.container-fluid { + padding-right: 20px; + padding-left: 20px; + *zoom: 1; +} + +.container-fluid:before, +.container-fluid:after { + display: table; + line-height: 0; + content: ""; +} + +.container-fluid:after { + clear: both; +} + +p { + margin: 0 0 10px; +} + +.lead { + margin-bottom: 20px; + font-size: 21px; + font-weight: 200; + line-height: 30px; +} + +small { + font-size: 85%; +} + +strong { + font-weight: bold; +} + +em { + font-style: italic; +} + +cite { + font-style: normal; +} + +.muted { + color: #999999; +} + +a.muted:hover, +a.muted:focus { + color: #808080; +} + +.text-warning { + color: #c09853; +} + +a.text-warning:hover, +a.text-warning:focus { + color: #a47e3c; +} + +.text-error { + color: #b94a48; +} + +a.text-error:hover, +a.text-error:focus { + color: #953b39; +} + +.text-info { + color: #3a87ad; +} + +a.text-info:hover, +a.text-info:focus { + color: #2d6987; +} + +.text-success { + color: #468847; +} + +a.text-success:hover, +a.text-success:focus { + color: #356635; +} + +.text-left { + text-align: left; +} + +.text-right { + text-align: right; +} + +.text-center { + text-align: center; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 10px 0; + font-family: inherit; + font-weight: bold; + line-height: 20px; + color: inherit; + text-rendering: optimizelegibility; +} + +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small { + font-weight: normal; + line-height: 1; + color: #999999; +} + +h1, +h2, +h3 { + line-height: 40px; +} + +h1 { + font-size: 38.5px; +} + +h2 { + font-size: 31.5px; +} + +h3 { + font-size: 24.5px; +} + +h4 { + font-size: 17.5px; +} + +h5 { + font-size: 14px; +} + +h6 { + font-size: 11.9px; +} + +h1 small { + font-size: 24.5px; +} + +h2 small { + font-size: 17.5px; +} + +h3 small { + font-size: 14px; +} + +h4 small { + font-size: 14px; +} + +.page-header { + padding-bottom: 9px; + margin: 20px 0 30px; + border-bottom: 1px solid #eeeeee; +} + +ul, +ol { + padding: 0; + margin: 0 0 10px 25px; +} + +ul ul, +ul ol, +ol ol, +ol ul { + margin-bottom: 0; +} + +li { + line-height: 20px; +} + +ul.unstyled, +ol.unstyled { + margin-left: 0; + list-style: none; +} + +ul.inline, +ol.inline { + margin-left: 0; + list-style: none; +} + +ul.inline > li, +ol.inline > li { + display: inline-block; + *display: inline; + padding-right: 5px; + padding-left: 5px; + *zoom: 1; +} + +dl { + margin-bottom: 20px; +} + +dt, +dd { + line-height: 20px; +} + +dt { + font-weight: bold; +} + +dd { + margin-left: 10px; +} + +.dl-horizontal { + *zoom: 1; +} + +.dl-horizontal:before, +.dl-horizontal:after { + display: table; + line-height: 0; + content: ""; +} + +.dl-horizontal:after { + clear: both; +} + +.dl-horizontal dt { + float: left; + width: 160px; + overflow: hidden; + clear: left; + text-align: right; + text-overflow: ellipsis; + white-space: nowrap; +} + +.dl-horizontal dd { + margin-left: 180px; +} + +hr { + margin: 20px 0; + border: 0; + border-top: 1px solid #eeeeee; + border-bottom: 1px solid #ffffff; +} + +abbr[title], +abbr[data-original-title] { + cursor: help; + border-bottom: 1px dotted #999999; +} + +abbr.initialism { + font-size: 90%; + text-transform: uppercase; +} + +blockquote { + padding: 0 0 0 15px; + margin: 0 0 20px; + border-left: 5px solid #eeeeee; +} + +blockquote p { + margin-bottom: 0; + font-size: 17.5px; + font-weight: 300; + line-height: 1.25; +} + +blockquote small { + display: block; + line-height: 20px; + color: #999999; +} + +blockquote small:before { + content: '\2014 \00A0'; +} + +blockquote.pull-right { + float: right; + padding-right: 15px; + padding-left: 0; + border-right: 5px solid #eeeeee; + border-left: 0; +} + +blockquote.pull-right p, +blockquote.pull-right small { + text-align: right; +} + +blockquote.pull-right small:before { + content: ''; +} + +blockquote.pull-right small:after { + content: '\00A0 \2014'; +} + +q:before, +q:after, +blockquote:before, +blockquote:after { + content: ""; +} + +address { + display: block; + margin-bottom: 20px; + font-style: normal; + line-height: 20px; +} + +code, +pre { + padding: 0 3px 2px; + font-family: Monaco, Menlo, Consolas, "Courier New", monospace; + font-size: 12px; + color: #333333; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +code { + padding: 2px 4px; + color: #d14; + white-space: nowrap; + background-color: #f7f7f9; + border: 1px solid #e1e1e8; +} + +pre { + display: block; + padding: 9.5px; + margin: 0 0 10px; + font-size: 13px; + line-height: 20px; + word-break: break-all; + word-wrap: break-word; + white-space: pre; + white-space: pre-wrap; + background-color: #f5f5f5; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.15); + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +pre.prettyprint { + margin-bottom: 20px; +} + +pre code { + padding: 0; + color: inherit; + white-space: pre; + white-space: pre-wrap; + background-color: transparent; + border: 0; +} + +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} + +form { + margin: 0 0 20px; +} + +fieldset { + padding: 0; + margin: 0; + border: 0; +} + +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 20px; + font-size: 21px; + line-height: 40px; + color: #333333; + border: 0; + border-bottom: 1px solid #e5e5e5; +} + +legend small { + font-size: 15px; + color: #999999; +} + +label, +input, +button, +select, +textarea { + font-size: 14px; + font-weight: normal; + line-height: 20px; +} + +input, +button, +select, +textarea { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} + +label { + display: block; + margin-bottom: 5px; +} + +select, +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + display: inline-block; + height: 20px; + padding: 4px 6px; + margin-bottom: 10px; + font-size: 14px; + line-height: 20px; + color: #555555; + vertical-align: middle; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +input, +textarea, +.uneditable-input { + width: 206px; +} + +textarea { + height: auto; +} + +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + background-color: #ffffff; + border: 1px solid #cccccc; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; + -moz-transition: border linear 0.2s, box-shadow linear 0.2s; + -o-transition: border linear 0.2s, box-shadow linear 0.2s; + transition: border linear 0.2s, box-shadow linear 0.2s; +} + +textarea:focus, +input[type="text"]:focus, +input[type="password"]:focus, +input[type="datetime"]:focus, +input[type="datetime-local"]:focus, +input[type="date"]:focus, +input[type="month"]:focus, +input[type="time"]:focus, +input[type="week"]:focus, +input[type="number"]:focus, +input[type="email"]:focus, +input[type="url"]:focus, +input[type="search"]:focus, +input[type="tel"]:focus, +input[type="color"]:focus, +.uneditable-input:focus { + border-color: rgba(82, 168, 236, 0.8); + outline: 0; + outline: thin dotted \9; + /* IE6-9 */ + + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); +} + +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + margin-top: 1px \9; + *margin-top: 0; + line-height: normal; +} + +input[type="file"], +input[type="image"], +input[type="submit"], +input[type="reset"], +input[type="button"], +input[type="radio"], +input[type="checkbox"] { + width: auto; +} + +select, +input[type="file"] { + height: 30px; + /* In IE7, the height of the select element cannot be changed by height, only font-size */ + + *margin-top: 4px; + /* For IE7, add top margin to align select with labels */ + + line-height: 30px; +} + +select { + width: 220px; + background-color: #ffffff; + border: 1px solid #cccccc; +} + +select[multiple], +select[size] { + height: auto; +} + +select:focus, +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +.uneditable-input, +.uneditable-textarea { + color: #999999; + cursor: not-allowed; + background-color: #fcfcfc; + border-color: #cccccc; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); +} + +.uneditable-input { + overflow: hidden; + white-space: nowrap; +} + +.uneditable-textarea { + width: auto; + height: auto; +} + +input:-moz-placeholder, +textarea:-moz-placeholder { + color: #999999; +} + +input:-ms-input-placeholder, +textarea:-ms-input-placeholder { + color: #999999; +} + +input::-webkit-input-placeholder, +textarea::-webkit-input-placeholder { + color: #999999; +} + +.radio, +.checkbox { + min-height: 20px; + padding-left: 20px; +} + +.radio input[type="radio"], +.checkbox input[type="checkbox"] { + float: left; + margin-left: -20px; +} + +.controls > .radio:first-child, +.controls > .checkbox:first-child { + padding-top: 5px; +} + +.radio.inline, +.checkbox.inline { + display: inline-block; + padding-top: 5px; + margin-bottom: 0; + vertical-align: middle; +} + +.radio.inline + .radio.inline, +.checkbox.inline + .checkbox.inline { + margin-left: 10px; +} + +.input-mini { + width: 60px; +} + +.input-small { + width: 90px; +} + +.input-medium { + width: 150px; +} + +.input-large { + width: 210px; +} + +.input-xlarge { + width: 270px; +} + +.input-xxlarge { + width: 530px; +} + +input[class*="span"], +select[class*="span"], +textarea[class*="span"], +.uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"] { + float: none; + margin-left: 0; +} + +.input-append input[class*="span"], +.input-append .uneditable-input[class*="span"], +.input-prepend input[class*="span"], +.input-prepend .uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"], +.row-fluid .input-prepend [class*="span"], +.row-fluid .input-append [class*="span"] { + display: inline-block; +} + +input, +textarea, +.uneditable-input { + margin-left: 0; +} + +.controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; +} + +input.span12, +textarea.span12, +.uneditable-input.span12 { + width: 926px; +} + +input.span11, +textarea.span11, +.uneditable-input.span11 { + width: 846px; +} + +input.span10, +textarea.span10, +.uneditable-input.span10 { + width: 766px; +} + +input.span9, +textarea.span9, +.uneditable-input.span9 { + width: 686px; +} + +input.span8, +textarea.span8, +.uneditable-input.span8 { + width: 606px; +} + +input.span7, +textarea.span7, +.uneditable-input.span7 { + width: 526px; +} + +input.span6, +textarea.span6, +.uneditable-input.span6 { + width: 446px; +} + +input.span5, +textarea.span5, +.uneditable-input.span5 { + width: 366px; +} + +input.span4, +textarea.span4, +.uneditable-input.span4 { + width: 286px; +} + +input.span3, +textarea.span3, +.uneditable-input.span3 { + width: 206px; +} + +input.span2, +textarea.span2, +.uneditable-input.span2 { + width: 126px; +} + +input.span1, +textarea.span1, +.uneditable-input.span1 { + width: 46px; +} + +.controls-row { + *zoom: 1; +} + +.controls-row:before, +.controls-row:after { + display: table; + line-height: 0; + content: ""; +} + +.controls-row:after { + clear: both; +} + +.controls-row [class*="span"], +.row-fluid .controls-row [class*="span"] { + float: left; +} + +.controls-row .checkbox[class*="span"], +.controls-row .radio[class*="span"] { + padding-top: 5px; +} + +input[disabled], +select[disabled], +textarea[disabled], +input[readonly], +select[readonly], +textarea[readonly] { + cursor: not-allowed; + background-color: #eeeeee; +} + +input[type="radio"][disabled], +input[type="checkbox"][disabled], +input[type="radio"][readonly], +input[type="checkbox"][readonly] { + background-color: transparent; +} + +.control-group.warning .control-label, +.control-group.warning .help-block, +.control-group.warning .help-inline { + color: #c09853; +} + +.control-group.warning .checkbox, +.control-group.warning .radio, +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + color: #c09853; +} + +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + border-color: #c09853; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.warning input:focus, +.control-group.warning select:focus, +.control-group.warning textarea:focus { + border-color: #a47e3c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; +} + +.control-group.warning .input-prepend .add-on, +.control-group.warning .input-append .add-on { + color: #c09853; + background-color: #fcf8e3; + border-color: #c09853; +} + +.control-group.error .control-label, +.control-group.error .help-block, +.control-group.error .help-inline { + color: #b94a48; +} + +.control-group.error .checkbox, +.control-group.error .radio, +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + color: #b94a48; +} + +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + border-color: #b94a48; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.error input:focus, +.control-group.error select:focus, +.control-group.error textarea:focus { + border-color: #953b39; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; +} + +.control-group.error .input-prepend .add-on, +.control-group.error .input-append .add-on { + color: #b94a48; + background-color: #f2dede; + border-color: #b94a48; +} + +.control-group.success .control-label, +.control-group.success .help-block, +.control-group.success .help-inline { + color: #468847; +} + +.control-group.success .checkbox, +.control-group.success .radio, +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + color: #468847; +} + +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + border-color: #468847; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.success input:focus, +.control-group.success select:focus, +.control-group.success textarea:focus { + border-color: #356635; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; +} + +.control-group.success .input-prepend .add-on, +.control-group.success .input-append .add-on { + color: #468847; + background-color: #dff0d8; + border-color: #468847; +} + +.control-group.info .control-label, +.control-group.info .help-block, +.control-group.info .help-inline { + color: #3a87ad; +} + +.control-group.info .checkbox, +.control-group.info .radio, +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + color: #3a87ad; +} + +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + border-color: #3a87ad; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.info input:focus, +.control-group.info select:focus, +.control-group.info textarea:focus { + border-color: #2d6987; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; +} + +.control-group.info .input-prepend .add-on, +.control-group.info .input-append .add-on { + color: #3a87ad; + background-color: #d9edf7; + border-color: #3a87ad; +} + +input:focus:invalid, +textarea:focus:invalid, +select:focus:invalid { + color: #b94a48; + border-color: #ee5f5b; +} + +input:focus:invalid:focus, +textarea:focus:invalid:focus, +select:focus:invalid:focus { + border-color: #e9322d; + -webkit-box-shadow: 0 0 6px #f8b9b7; + -moz-box-shadow: 0 0 6px #f8b9b7; + box-shadow: 0 0 6px #f8b9b7; +} + +.form-actions { + padding: 19px 20px 20px; + margin-top: 20px; + margin-bottom: 20px; + background-color: #f5f5f5; + border-top: 1px solid #e5e5e5; + *zoom: 1; +} + +.form-actions:before, +.form-actions:after { + display: table; + line-height: 0; + content: ""; +} + +.form-actions:after { + clear: both; +} + +.help-block, +.help-inline { + color: #595959; +} + +.help-block { + display: block; + margin-bottom: 10px; +} + +.help-inline { + display: inline-block; + *display: inline; + padding-left: 5px; + vertical-align: middle; + *zoom: 1; +} + +.input-append, +.input-prepend { + display: inline-block; + margin-bottom: 10px; + font-size: 0; + white-space: nowrap; + vertical-align: middle; +} + +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input, +.input-append .dropdown-menu, +.input-prepend .dropdown-menu, +.input-append .popover, +.input-prepend .popover { + font-size: 14px; +} + +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input { + position: relative; + margin-bottom: 0; + *margin-left: 0; + vertical-align: top; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-append input:focus, +.input-prepend input:focus, +.input-append select:focus, +.input-prepend select:focus, +.input-append .uneditable-input:focus, +.input-prepend .uneditable-input:focus { + z-index: 2; +} + +.input-append .add-on, +.input-prepend .add-on { + display: inline-block; + width: auto; + height: 20px; + min-width: 16px; + padding: 4px 5px; + font-size: 14px; + font-weight: normal; + line-height: 20px; + text-align: center; + text-shadow: 0 1px 0 #ffffff; + background-color: #eeeeee; + border: 1px solid #ccc; +} + +.input-append .add-on, +.input-prepend .add-on, +.input-append .btn, +.input-prepend .btn, +.input-append .btn-group > .dropdown-toggle, +.input-prepend .btn-group > .dropdown-toggle { + vertical-align: top; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.input-append .active, +.input-prepend .active { + background-color: #a9dba9; + border-color: #46a546; +} + +.input-prepend .add-on, +.input-prepend .btn { + margin-right: -1px; +} + +.input-prepend .add-on:first-child, +.input-prepend .btn:first-child { + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.input-append input, +.input-append select, +.input-append .uneditable-input { + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.input-append input + .btn-group .btn:last-child, +.input-append select + .btn-group .btn:last-child, +.input-append .uneditable-input + .btn-group .btn:last-child { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-append .add-on, +.input-append .btn, +.input-append .btn-group { + margin-left: -1px; +} + +.input-append .add-on:last-child, +.input-append .btn:last-child, +.input-append .btn-group:last-child > .dropdown-toggle { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-prepend.input-append input, +.input-prepend.input-append select, +.input-prepend.input-append .uneditable-input { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.input-prepend.input-append input + .btn-group .btn, +.input-prepend.input-append select + .btn-group .btn, +.input-prepend.input-append .uneditable-input + .btn-group .btn { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-prepend.input-append .add-on:first-child, +.input-prepend.input-append .btn:first-child { + margin-right: -1px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.input-prepend.input-append .add-on:last-child, +.input-prepend.input-append .btn:last-child { + margin-left: -1px; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-prepend.input-append .btn-group:first-child { + margin-left: 0; +} + +input.search-query { + padding-right: 14px; + padding-right: 4px \9; + padding-left: 14px; + padding-left: 4px \9; + /* IE7-8 doesn't have border-radius, so don't indent the padding */ + + margin-bottom: 0; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} + +/* Allow for input prepend/append in search forms */ + +.form-search .input-append .search-query, +.form-search .input-prepend .search-query { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.form-search .input-append .search-query { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} + +.form-search .input-append .btn { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} + +.form-search .input-prepend .search-query { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} + +.form-search .input-prepend .btn { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} + +.form-search input, +.form-inline input, +.form-horizontal input, +.form-search textarea, +.form-inline textarea, +.form-horizontal textarea, +.form-search select, +.form-inline select, +.form-horizontal select, +.form-search .help-inline, +.form-inline .help-inline, +.form-horizontal .help-inline, +.form-search .uneditable-input, +.form-inline .uneditable-input, +.form-horizontal .uneditable-input, +.form-search .input-prepend, +.form-inline .input-prepend, +.form-horizontal .input-prepend, +.form-search .input-append, +.form-inline .input-append, +.form-horizontal .input-append { + display: inline-block; + *display: inline; + margin-bottom: 0; + vertical-align: middle; + *zoom: 1; +} + +.form-search .hide, +.form-inline .hide, +.form-horizontal .hide { + display: none; +} + +.form-search label, +.form-inline label, +.form-search .btn-group, +.form-inline .btn-group { + display: inline-block; +} + +.form-search .input-append, +.form-inline .input-append, +.form-search .input-prepend, +.form-inline .input-prepend { + margin-bottom: 0; +} + +.form-search .radio, +.form-search .checkbox, +.form-inline .radio, +.form-inline .checkbox { + padding-left: 0; + margin-bottom: 0; + vertical-align: middle; +} + +.form-search .radio input[type="radio"], +.form-search .checkbox input[type="checkbox"], +.form-inline .radio input[type="radio"], +.form-inline .checkbox input[type="checkbox"] { + float: left; + margin-right: 3px; + margin-left: 0; +} + +.control-group { + margin-bottom: 10px; +} + +legend + .control-group { + margin-top: 20px; + -webkit-margin-top-collapse: separate; +} + +.form-horizontal .control-group { + margin-bottom: 20px; + *zoom: 1; +} + +.form-horizontal .control-group:before, +.form-horizontal .control-group:after { + display: table; + line-height: 0; + content: ""; +} + +.form-horizontal .control-group:after { + clear: both; +} + +.form-horizontal .control-label { + float: left; + width: 160px; + padding-top: 5px; + text-align: right; +} + +.form-horizontal .controls { + *display: inline-block; + *padding-left: 20px; + margin-left: 180px; + *margin-left: 0; +} + +.form-horizontal .controls:first-child { + *padding-left: 180px; +} + +.form-horizontal .help-block { + margin-bottom: 0; +} + +.form-horizontal input + .help-block, +.form-horizontal select + .help-block, +.form-horizontal textarea + .help-block, +.form-horizontal .uneditable-input + .help-block, +.form-horizontal .input-prepend + .help-block, +.form-horizontal .input-append + .help-block { + margin-top: 10px; +} + +.form-horizontal .form-actions { + padding-left: 180px; +} + +table { + max-width: 100%; + background-color: transparent; + border-collapse: collapse; + border-spacing: 0; +} + +.table { + width: 100%; + margin-bottom: 20px; +} + +.table th, +.table td { + padding: 8px; + line-height: 20px; + text-align: left; + vertical-align: top; + border-top: 1px solid #dddddd; +} + +.table th { + font-weight: bold; +} + +.table thead th { + vertical-align: bottom; +} + +.table caption + thead tr:first-child th, +.table caption + thead tr:first-child td, +.table colgroup + thead tr:first-child th, +.table colgroup + thead tr:first-child td, +.table thead:first-child tr:first-child th, +.table thead:first-child tr:first-child td { + border-top: 0; +} + +.table tbody + tbody { + border-top: 2px solid #dddddd; +} + +.table .table { + background-color: #ffffff; +} + +.table-condensed th, +.table-condensed td { + padding: 4px 5px; +} + +.table-bordered { + border: 1px solid #dddddd; + border-collapse: separate; + *border-collapse: collapse; + border-left: 0; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.table-bordered th, +.table-bordered td { + border-left: 1px solid #dddddd; +} + +.table-bordered caption + thead tr:first-child th, +.table-bordered caption + tbody tr:first-child th, +.table-bordered caption + tbody tr:first-child td, +.table-bordered colgroup + thead tr:first-child th, +.table-bordered colgroup + tbody tr:first-child th, +.table-bordered colgroup + tbody tr:first-child td, +.table-bordered thead:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child td { + border-top: 0; +} + +.table-bordered thead:first-child tr:first-child > th:first-child, +.table-bordered tbody:first-child tr:first-child > td:first-child, +.table-bordered tbody:first-child tr:first-child > th:first-child { + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; +} + +.table-bordered thead:first-child tr:first-child > th:last-child, +.table-bordered tbody:first-child tr:first-child > td:last-child, +.table-bordered tbody:first-child tr:first-child > th:last-child { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; +} + +.table-bordered thead:last-child tr:last-child > th:first-child, +.table-bordered tbody:last-child tr:last-child > td:first-child, +.table-bordered tbody:last-child tr:last-child > th:first-child, +.table-bordered tfoot:last-child tr:last-child > td:first-child, +.table-bordered tfoot:last-child tr:last-child > th:first-child { + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; +} + +.table-bordered thead:last-child tr:last-child > th:last-child, +.table-bordered tbody:last-child tr:last-child > td:last-child, +.table-bordered tbody:last-child tr:last-child > th:last-child, +.table-bordered tfoot:last-child tr:last-child > td:last-child, +.table-bordered tfoot:last-child tr:last-child > th:last-child { + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-bottomright: 4px; +} + +.table-bordered tfoot + tbody:last-child tr:last-child td:first-child { + -webkit-border-bottom-left-radius: 0; + border-bottom-left-radius: 0; + -moz-border-radius-bottomleft: 0; +} + +.table-bordered tfoot + tbody:last-child tr:last-child td:last-child { + -webkit-border-bottom-right-radius: 0; + border-bottom-right-radius: 0; + -moz-border-radius-bottomright: 0; +} + +.table-bordered caption + thead tr:first-child th:first-child, +.table-bordered caption + tbody tr:first-child td:first-child, +.table-bordered colgroup + thead tr:first-child th:first-child, +.table-bordered colgroup + tbody tr:first-child td:first-child { + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; +} + +.table-bordered caption + thead tr:first-child th:last-child, +.table-bordered caption + tbody tr:first-child td:last-child, +.table-bordered colgroup + thead tr:first-child th:last-child, +.table-bordered colgroup + tbody tr:first-child td:last-child { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; +} + +.table-striped tbody > tr:nth-child(odd) > td, +.table-striped tbody > tr:nth-child(odd) > th { + background-color: #f9f9f9; +} + +.table-hover tbody tr:hover > td, +.table-hover tbody tr:hover > th { + background-color: #f5f5f5; +} + +table td[class*="span"], +table th[class*="span"], +.row-fluid table td[class*="span"], +.row-fluid table th[class*="span"] { + display: table-cell; + float: none; + margin-left: 0; +} + +.table td.span1, +.table th.span1 { + float: none; + width: 44px; + margin-left: 0; +} + +.table td.span2, +.table th.span2 { + float: none; + width: 124px; + margin-left: 0; +} + +.table td.span3, +.table th.span3 { + float: none; + width: 204px; + margin-left: 0; +} + +.table td.span4, +.table th.span4 { + float: none; + width: 284px; + margin-left: 0; +} + +.table td.span5, +.table th.span5 { + float: none; + width: 364px; + margin-left: 0; +} + +.table td.span6, +.table th.span6 { + float: none; + width: 444px; + margin-left: 0; +} + +.table td.span7, +.table th.span7 { + float: none; + width: 524px; + margin-left: 0; +} + +.table td.span8, +.table th.span8 { + float: none; + width: 604px; + margin-left: 0; +} + +.table td.span9, +.table th.span9 { + float: none; + width: 684px; + margin-left: 0; +} + +.table td.span10, +.table th.span10 { + float: none; + width: 764px; + margin-left: 0; +} + +.table td.span11, +.table th.span11 { + float: none; + width: 844px; + margin-left: 0; +} + +.table td.span12, +.table th.span12 { + float: none; + width: 924px; + margin-left: 0; +} + +.table tbody tr.success > td { + background-color: #dff0d8; +} + +.table tbody tr.error > td { + background-color: #f2dede; +} + +.table tbody tr.warning > td { + background-color: #fcf8e3; +} + +.table tbody tr.info > td { + background-color: #d9edf7; +} + +.table-hover tbody tr.success:hover > td { + background-color: #d0e9c6; +} + +.table-hover tbody tr.error:hover > td { + background-color: #ebcccc; +} + +.table-hover tbody tr.warning:hover > td { + background-color: #faf2cc; +} + +.table-hover tbody tr.info:hover > td { + background-color: #c4e3f3; +} + +[class^="icon-"], +[class*=" icon-"] { + display: inline-block; + width: 14px; + height: 14px; + margin-top: 1px; + *margin-right: .3em; + line-height: 14px; + vertical-align: text-top; + background-image: url("../img/glyphicons-halflings.png"); + background-position: 14px 14px; + background-repeat: no-repeat; +} + +/* White icons with optional class, or on hover/focus/active states of certain elements */ + +.icon-white, +.nav-pills > .active > a > [class^="icon-"], +.nav-pills > .active > a > [class*=" icon-"], +.nav-list > .active > a > [class^="icon-"], +.nav-list > .active > a > [class*=" icon-"], +.navbar-inverse .nav > .active > a > [class^="icon-"], +.navbar-inverse .nav > .active > a > [class*=" icon-"], +.dropdown-menu > li > a:hover > [class^="icon-"], +.dropdown-menu > li > a:focus > [class^="icon-"], +.dropdown-menu > li > a:hover > [class*=" icon-"], +.dropdown-menu > li > a:focus > [class*=" icon-"], +.dropdown-menu > .active > a > [class^="icon-"], +.dropdown-menu > .active > a > [class*=" icon-"], +.dropdown-submenu:hover > a > [class^="icon-"], +.dropdown-submenu:focus > a > [class^="icon-"], +.dropdown-submenu:hover > a > [class*=" icon-"], +.dropdown-submenu:focus > a > [class*=" icon-"] { + background-image: url("../img/glyphicons-halflings-white.png"); +} + +.icon-glass { + background-position: 0 0; +} + +.icon-music { + background-position: -24px 0; +} + +.icon-search { + background-position: -48px 0; +} + +.icon-envelope { + background-position: -72px 0; +} + +.icon-heart { + background-position: -96px 0; +} + +.icon-star { + background-position: -120px 0; +} + +.icon-star-empty { + background-position: -144px 0; +} + +.icon-user { + background-position: -168px 0; +} + +.icon-film { + background-position: -192px 0; +} + +.icon-th-large { + background-position: -216px 0; +} + +.icon-th { + background-position: -240px 0; +} + +.icon-th-list { + background-position: -264px 0; +} + +.icon-ok { + background-position: -288px 0; +} + +.icon-remove { + background-position: -312px 0; +} + +.icon-zoom-in { + background-position: -336px 0; +} + +.icon-zoom-out { + background-position: -360px 0; +} + +.icon-off { + background-position: -384px 0; +} + +.icon-signal { + background-position: -408px 0; +} + +.icon-cog { + background-position: -432px 0; +} + +.icon-trash { + background-position: -456px 0; +} + +.icon-home { + background-position: 0 -24px; +} + +.icon-file { + background-position: -24px -24px; +} + +.icon-time { + background-position: -48px -24px; +} + +.icon-road { + background-position: -72px -24px; +} + +.icon-download-alt { + background-position: -96px -24px; +} + +.icon-download { + background-position: -120px -24px; +} + +.icon-upload { + background-position: -144px -24px; +} + +.icon-inbox { + background-position: -168px -24px; +} + +.icon-play-circle { + background-position: -192px -24px; +} + +.icon-repeat { + background-position: -216px -24px; +} + +.icon-refresh { + background-position: -240px -24px; +} + +.icon-list-alt { + background-position: -264px -24px; +} + +.icon-lock { + background-position: -287px -24px; +} + +.icon-flag { + background-position: -312px -24px; +} + +.icon-headphones { + background-position: -336px -24px; +} + +.icon-volume-off { + background-position: -360px -24px; +} + +.icon-volume-down { + background-position: -384px -24px; +} + +.icon-volume-up { + background-position: -408px -24px; +} + +.icon-qrcode { + background-position: -432px -24px; +} + +.icon-barcode { + background-position: -456px -24px; +} + +.icon-tag { + background-position: 0 -48px; +} + +.icon-tags { + background-position: -25px -48px; +} + +.icon-book { + background-position: -48px -48px; +} + +.icon-bookmark { + background-position: -72px -48px; +} + +.icon-print { + background-position: -96px -48px; +} + +.icon-camera { + background-position: -120px -48px; +} + +.icon-font { + background-position: -144px -48px; +} + +.icon-bold { + background-position: -167px -48px; +} + +.icon-italic { + background-position: -192px -48px; +} + +.icon-text-height { + background-position: -216px -48px; +} + +.icon-text-width { + background-position: -240px -48px; +} + +.icon-align-left { + background-position: -264px -48px; +} + +.icon-align-center { + background-position: -288px -48px; +} + +.icon-align-right { + background-position: -312px -48px; +} + +.icon-align-justify { + background-position: -336px -48px; +} + +.icon-list { + background-position: -360px -48px; +} + +.icon-indent-left { + background-position: -384px -48px; +} + +.icon-indent-right { + background-position: -408px -48px; +} + +.icon-facetime-video { + background-position: -432px -48px; +} + +.icon-picture { + background-position: -456px -48px; +} + +.icon-pencil { + background-position: 0 -72px; +} + +.icon-map-marker { + background-position: -24px -72px; +} + +.icon-adjust { + background-position: -48px -72px; +} + +.icon-tint { + background-position: -72px -72px; +} + +.icon-edit { + background-position: -96px -72px; +} + +.icon-share { + background-position: -120px -72px; +} + +.icon-check { + background-position: -144px -72px; +} + +.icon-move { + background-position: -168px -72px; +} + +.icon-step-backward { + background-position: -192px -72px; +} + +.icon-fast-backward { + background-position: -216px -72px; +} + +.icon-backward { + background-position: -240px -72px; +} + +.icon-play { + background-position: -264px -72px; +} + +.icon-pause { + background-position: -288px -72px; +} + +.icon-stop { + background-position: -312px -72px; +} + +.icon-forward { + background-position: -336px -72px; +} + +.icon-fast-forward { + background-position: -360px -72px; +} + +.icon-step-forward { + background-position: -384px -72px; +} + +.icon-eject { + background-position: -408px -72px; +} + +.icon-chevron-left { + background-position: -432px -72px; +} + +.icon-chevron-right { + background-position: -456px -72px; +} + +.icon-plus-sign { + background-position: 0 -96px; +} + +.icon-minus-sign { + background-position: -24px -96px; +} + +.icon-remove-sign { + background-position: -48px -96px; +} + +.icon-ok-sign { + background-position: -72px -96px; +} + +.icon-question-sign { + background-position: -96px -96px; +} + +.icon-info-sign { + background-position: -120px -96px; +} + +.icon-screenshot { + background-position: -144px -96px; +} + +.icon-remove-circle { + background-position: -168px -96px; +} + +.icon-ok-circle { + background-position: -192px -96px; +} + +.icon-ban-circle { + background-position: -216px -96px; +} + +.icon-arrow-left { + background-position: -240px -96px; +} + +.icon-arrow-right { + background-position: -264px -96px; +} + +.icon-arrow-up { + background-position: -289px -96px; +} + +.icon-arrow-down { + background-position: -312px -96px; +} + +.icon-share-alt { + background-position: -336px -96px; +} + +.icon-resize-full { + background-position: -360px -96px; +} + +.icon-resize-small { + background-position: -384px -96px; +} + +.icon-plus { + background-position: -408px -96px; +} + +.icon-minus { + background-position: -433px -96px; +} + +.icon-asterisk { + background-position: -456px -96px; +} + +.icon-exclamation-sign { + background-position: 0 -120px; +} + +.icon-gift { + background-position: -24px -120px; +} + +.icon-leaf { + background-position: -48px -120px; +} + +.icon-fire { + background-position: -72px -120px; +} + +.icon-eye-open { + background-position: -96px -120px; +} + +.icon-eye-close { + background-position: -120px -120px; +} + +.icon-warning-sign { + background-position: -144px -120px; +} + +.icon-plane { + background-position: -168px -120px; +} + +.icon-calendar { + background-position: -192px -120px; +} + +.icon-random { + width: 16px; + background-position: -216px -120px; +} + +.icon-comment { + background-position: -240px -120px; +} + +.icon-magnet { + background-position: -264px -120px; +} + +.icon-chevron-up { + background-position: -288px -120px; +} + +.icon-chevron-down { + background-position: -313px -119px; +} + +.icon-retweet { + background-position: -336px -120px; +} + +.icon-shopping-cart { + background-position: -360px -120px; +} + +.icon-folder-close { + width: 16px; + background-position: -384px -120px; +} + +.icon-folder-open { + width: 16px; + background-position: -408px -120px; +} + +.icon-resize-vertical { + background-position: -432px -119px; +} + +.icon-resize-horizontal { + background-position: -456px -118px; +} + +.icon-hdd { + background-position: 0 -144px; +} + +.icon-bullhorn { + background-position: -24px -144px; +} + +.icon-bell { + background-position: -48px -144px; +} + +.icon-certificate { + background-position: -72px -144px; +} + +.icon-thumbs-up { + background-position: -96px -144px; +} + +.icon-thumbs-down { + background-position: -120px -144px; +} + +.icon-hand-right { + background-position: -144px -144px; +} + +.icon-hand-left { + background-position: -168px -144px; +} + +.icon-hand-up { + background-position: -192px -144px; +} + +.icon-hand-down { + background-position: -216px -144px; +} + +.icon-circle-arrow-right { + background-position: -240px -144px; +} + +.icon-circle-arrow-left { + background-position: -264px -144px; +} + +.icon-circle-arrow-up { + background-position: -288px -144px; +} + +.icon-circle-arrow-down { + background-position: -312px -144px; +} + +.icon-globe { + background-position: -336px -144px; +} + +.icon-wrench { + background-position: -360px -144px; +} + +.icon-tasks { + background-position: -384px -144px; +} + +.icon-filter { + background-position: -408px -144px; +} + +.icon-briefcase { + background-position: -432px -144px; +} + +.icon-fullscreen { + background-position: -456px -144px; +} + +.dropup, +.dropdown { + position: relative; +} + +.dropdown-toggle { + *margin-bottom: -3px; +} + +.dropdown-toggle:active, +.open .dropdown-toggle { + outline: 0; +} + +.caret { + display: inline-block; + width: 0; + height: 0; + vertical-align: top; + border-top: 4px solid #000000; + border-right: 4px solid transparent; + border-left: 4px solid transparent; + content: ""; +} + +.dropdown .caret { + margin-top: 8px; + margin-left: 2px; +} + +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + list-style: none; + background-color: #ffffff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + *border-right-width: 2px; + *border-bottom-width: 2px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} + +.dropdown-menu.pull-right { + right: 0; + left: auto; +} + +.dropdown-menu .divider { + *width: 100%; + height: 1px; + margin: 9px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} + +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 20px; + color: #333333; + white-space: nowrap; +} + +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus, +.dropdown-submenu:hover > a, +.dropdown-submenu:focus > a { + color: #ffffff; + text-decoration: none; + background-color: #0081c2; + background-image: -moz-linear-gradient(top, #0088cc, #0077b3); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); + background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); + background-image: -o-linear-gradient(top, #0088cc, #0077b3); + background-image: linear-gradient(to bottom, #0088cc, #0077b3); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); +} + +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + color: #ffffff; + text-decoration: none; + background-color: #0081c2; + background-image: -moz-linear-gradient(top, #0088cc, #0077b3); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); + background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); + background-image: -o-linear-gradient(top, #0088cc, #0077b3); + background-image: linear-gradient(to bottom, #0088cc, #0077b3); + background-repeat: repeat-x; + outline: 0; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); +} + +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + color: #999999; +} + +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + text-decoration: none; + cursor: default; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.open { + *z-index: 1000; +} + +.open > .dropdown-menu { + display: block; +} + +.dropdown-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 990; +} + +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} + +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + border-top: 0; + border-bottom: 4px solid #000000; + content: ""; +} + +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 1px; +} + +.dropdown-submenu { + position: relative; +} + +.dropdown-submenu > .dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + -webkit-border-radius: 0 6px 6px 6px; + -moz-border-radius: 0 6px 6px 6px; + border-radius: 0 6px 6px 6px; +} + +.dropdown-submenu:hover > .dropdown-menu { + display: block; +} + +.dropup .dropdown-submenu > .dropdown-menu { + top: auto; + bottom: 0; + margin-top: 0; + margin-bottom: -2px; + -webkit-border-radius: 5px 5px 5px 0; + -moz-border-radius: 5px 5px 5px 0; + border-radius: 5px 5px 5px 0; +} + +.dropdown-submenu > a:after { + display: block; + float: right; + width: 0; + height: 0; + margin-top: 5px; + margin-right: -10px; + border-color: transparent; + border-left-color: #cccccc; + border-style: solid; + border-width: 5px 0 5px 5px; + content: " "; +} + +.dropdown-submenu:hover > a:after { + border-left-color: #ffffff; +} + +.dropdown-submenu.pull-left { + float: none; +} + +.dropdown-submenu.pull-left > .dropdown-menu { + left: -100%; + margin-left: 10px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} + +.dropdown .dropdown-menu .nav-header { + padding-right: 20px; + padding-left: 20px; +} + +.typeahead { + z-index: 1051; + margin-top: 2px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); +} + +.well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, 0.15); +} + +.well-large { + padding: 24px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.well-small { + padding: 9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.fade { + opacity: 0; + -webkit-transition: opacity 0.15s linear; + -moz-transition: opacity 0.15s linear; + -o-transition: opacity 0.15s linear; + transition: opacity 0.15s linear; +} + +.fade.in { + opacity: 1; +} + +.collapse { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition: height 0.35s ease; + -moz-transition: height 0.35s ease; + -o-transition: height 0.35s ease; + transition: height 0.35s ease; +} + +.collapse.in { + height: auto; +} + +.close { + float: right; + font-size: 20px; + font-weight: bold; + line-height: 20px; + color: #000000; + text-shadow: 0 1px 0 #ffffff; + opacity: 0.2; + filter: alpha(opacity=20); +} + +.close:hover, +.close:focus { + color: #000000; + text-decoration: none; + cursor: pointer; + opacity: 0.4; + filter: alpha(opacity=40); +} + +button.close { + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; +} + +.btn { + display: inline-block; + *display: inline; + padding: 4px 12px; + margin-bottom: 0; + *margin-left: .3em; + font-size: 14px; + line-height: 20px; + color: #333333; + text-align: center; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + vertical-align: middle; + cursor: pointer; + background-color: #f5f5f5; + *background-color: #e6e6e6; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + border: 1px solid #cccccc; + *border: 0; + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + border-bottom-color: #b3b3b3; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); + *zoom: 1; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn:hover, +.btn:focus, +.btn:active, +.btn.active, +.btn.disabled, +.btn[disabled] { + color: #333333; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} + +.btn:active, +.btn.active { + background-color: #cccccc \9; +} + +.btn:first-child { + *margin-left: 0; +} + +.btn:hover, +.btn:focus { + color: #333333; + text-decoration: none; + background-position: 0 -15px; + -webkit-transition: background-position 0.1s linear; + -moz-transition: background-position 0.1s linear; + -o-transition: background-position 0.1s linear; + transition: background-position 0.1s linear; +} + +.btn:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +.btn.active, +.btn:active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn.disabled, +.btn[disabled] { + cursor: default; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} + +.btn-large { + padding: 11px 19px; + font-size: 17.5px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.btn-large [class^="icon-"], +.btn-large [class*=" icon-"] { + margin-top: 4px; +} + +.btn-small { + padding: 2px 10px; + font-size: 11.9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.btn-small [class^="icon-"], +.btn-small [class*=" icon-"] { + margin-top: 0; +} + +.btn-mini [class^="icon-"], +.btn-mini [class*=" icon-"] { + margin-top: -1px; +} + +.btn-mini { + padding: 0 6px; + font-size: 10.5px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.btn-block { + display: block; + width: 100%; + padding-right: 0; + padding-left: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.btn-block + .btn-block { + margin-top: 5px; +} + +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} + +.btn-primary.active, +.btn-warning.active, +.btn-danger.active, +.btn-success.active, +.btn-info.active, +.btn-inverse.active { + color: rgba(255, 255, 255, 0.75); +} + +.btn-primary { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #006dcc; + *background-color: #0044cc; + background-image: -moz-linear-gradient(top, #0088cc, #0044cc); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); + background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); + background-image: -o-linear-gradient(top, #0088cc, #0044cc); + background-image: linear-gradient(to bottom, #0088cc, #0044cc); + background-repeat: repeat-x; + border-color: #0044cc #0044cc #002a80; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-primary:hover, +.btn-primary:focus, +.btn-primary:active, +.btn-primary.active, +.btn-primary.disabled, +.btn-primary[disabled] { + color: #ffffff; + background-color: #0044cc; + *background-color: #003bb3; +} + +.btn-primary:active, +.btn-primary.active { + background-color: #003399 \9; +} + +.btn-warning { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #faa732; + *background-color: #f89406; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-repeat: repeat-x; + border-color: #f89406 #f89406 #ad6704; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-warning:hover, +.btn-warning:focus, +.btn-warning:active, +.btn-warning.active, +.btn-warning.disabled, +.btn-warning[disabled] { + color: #ffffff; + background-color: #f89406; + *background-color: #df8505; +} + +.btn-warning:active, +.btn-warning.active { + background-color: #c67605 \9; +} + +.btn-danger { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #da4f49; + *background-color: #bd362f; + background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); + background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f); + background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); + background-image: linear-gradient(to bottom, #ee5f5b, #bd362f); + background-repeat: repeat-x; + border-color: #bd362f #bd362f #802420; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-danger:hover, +.btn-danger:focus, +.btn-danger:active, +.btn-danger.active, +.btn-danger.disabled, +.btn-danger[disabled] { + color: #ffffff; + background-color: #bd362f; + *background-color: #a9302a; +} + +.btn-danger:active, +.btn-danger.active { + background-color: #942a25 \9; +} + +.btn-success { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #5bb75b; + *background-color: #51a351; + background-image: -moz-linear-gradient(top, #62c462, #51a351); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); + background-image: -webkit-linear-gradient(top, #62c462, #51a351); + background-image: -o-linear-gradient(top, #62c462, #51a351); + background-image: linear-gradient(to bottom, #62c462, #51a351); + background-repeat: repeat-x; + border-color: #51a351 #51a351 #387038; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-success:hover, +.btn-success:focus, +.btn-success:active, +.btn-success.active, +.btn-success.disabled, +.btn-success[disabled] { + color: #ffffff; + background-color: #51a351; + *background-color: #499249; +} + +.btn-success:active, +.btn-success.active { + background-color: #408140 \9; +} + +.btn-info { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #49afcd; + *background-color: #2f96b4; + background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); + background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4); + background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); + background-image: linear-gradient(to bottom, #5bc0de, #2f96b4); + background-repeat: repeat-x; + border-color: #2f96b4 #2f96b4 #1f6377; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-info:hover, +.btn-info:focus, +.btn-info:active, +.btn-info.active, +.btn-info.disabled, +.btn-info[disabled] { + color: #ffffff; + background-color: #2f96b4; + *background-color: #2a85a0; +} + +.btn-info:active, +.btn-info.active { + background-color: #24748c \9; +} + +.btn-inverse { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #363636; + *background-color: #222222; + background-image: -moz-linear-gradient(top, #444444, #222222); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222)); + background-image: -webkit-linear-gradient(top, #444444, #222222); + background-image: -o-linear-gradient(top, #444444, #222222); + background-image: linear-gradient(to bottom, #444444, #222222); + background-repeat: repeat-x; + border-color: #222222 #222222 #000000; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-inverse:hover, +.btn-inverse:focus, +.btn-inverse:active, +.btn-inverse.active, +.btn-inverse.disabled, +.btn-inverse[disabled] { + color: #ffffff; + background-color: #222222; + *background-color: #151515; +} + +.btn-inverse:active, +.btn-inverse.active { + background-color: #080808 \9; +} + +button.btn, +input[type="submit"].btn { + *padding-top: 3px; + *padding-bottom: 3px; +} + +button.btn::-moz-focus-inner, +input[type="submit"].btn::-moz-focus-inner { + padding: 0; + border: 0; +} + +button.btn.btn-large, +input[type="submit"].btn.btn-large { + *padding-top: 7px; + *padding-bottom: 7px; +} + +button.btn.btn-small, +input[type="submit"].btn.btn-small { + *padding-top: 3px; + *padding-bottom: 3px; +} + +button.btn.btn-mini, +input[type="submit"].btn.btn-mini { + *padding-top: 1px; + *padding-bottom: 1px; +} + +.btn-link, +.btn-link:active, +.btn-link[disabled] { + background-color: transparent; + background-image: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} + +.btn-link { + color: #0088cc; + cursor: pointer; + border-color: transparent; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.btn-link:hover, +.btn-link:focus { + color: #005580; + text-decoration: underline; + background-color: transparent; +} + +.btn-link[disabled]:hover, +.btn-link[disabled]:focus { + color: #333333; + text-decoration: none; +} + +.btn-group { + position: relative; + display: inline-block; + *display: inline; + *margin-left: .3em; + font-size: 0; + white-space: nowrap; + vertical-align: middle; + *zoom: 1; +} + +.btn-group:first-child { + *margin-left: 0; +} + +.btn-group + .btn-group { + margin-left: 5px; +} + +.btn-toolbar { + margin-top: 10px; + margin-bottom: 10px; + font-size: 0; +} + +.btn-toolbar > .btn + .btn, +.btn-toolbar > .btn-group + .btn, +.btn-toolbar > .btn + .btn-group { + margin-left: 5px; +} + +.btn-group > .btn { + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.btn-group > .btn + .btn { + margin-left: -1px; +} + +.btn-group > .btn, +.btn-group > .dropdown-menu, +.btn-group > .popover { + font-size: 14px; +} + +.btn-group > .btn-mini { + font-size: 10.5px; +} + +.btn-group > .btn-small { + font-size: 11.9px; +} + +.btn-group > .btn-large { + font-size: 17.5px; +} + +.btn-group > .btn:first-child { + margin-left: 0; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-topleft: 4px; +} + +.btn-group > .btn:last-child, +.btn-group > .dropdown-toggle { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-bottomright: 4px; +} + +.btn-group > .btn.large:first-child { + margin-left: 0; + -webkit-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -webkit-border-top-left-radius: 6px; + border-top-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + -moz-border-radius-topleft: 6px; +} + +.btn-group > .btn.large:last-child, +.btn-group > .large.dropdown-toggle { + -webkit-border-top-right-radius: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + -moz-border-radius-topright: 6px; + -moz-border-radius-bottomright: 6px; +} + +.btn-group > .btn:hover, +.btn-group > .btn:focus, +.btn-group > .btn:active, +.btn-group > .btn.active { + z-index: 2; +} + +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} + +.btn-group > .btn + .dropdown-toggle { + *padding-top: 5px; + padding-right: 8px; + *padding-bottom: 5px; + padding-left: 8px; + -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn-group > .btn-mini + .dropdown-toggle { + *padding-top: 2px; + padding-right: 5px; + *padding-bottom: 2px; + padding-left: 5px; +} + +.btn-group > .btn-small + .dropdown-toggle { + *padding-top: 5px; + *padding-bottom: 4px; +} + +.btn-group > .btn-large + .dropdown-toggle { + *padding-top: 7px; + padding-right: 12px; + *padding-bottom: 7px; + padding-left: 12px; +} + +.btn-group.open .dropdown-toggle { + background-image: none; + -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn-group.open .btn.dropdown-toggle { + background-color: #e6e6e6; +} + +.btn-group.open .btn-primary.dropdown-toggle { + background-color: #0044cc; +} + +.btn-group.open .btn-warning.dropdown-toggle { + background-color: #f89406; +} + +.btn-group.open .btn-danger.dropdown-toggle { + background-color: #bd362f; +} + +.btn-group.open .btn-success.dropdown-toggle { + background-color: #51a351; +} + +.btn-group.open .btn-info.dropdown-toggle { + background-color: #2f96b4; +} + +.btn-group.open .btn-inverse.dropdown-toggle { + background-color: #222222; +} + +.btn .caret { + margin-top: 8px; + margin-left: 0; +} + +.btn-large .caret { + margin-top: 6px; +} + +.btn-large .caret { + border-top-width: 5px; + border-right-width: 5px; + border-left-width: 5px; +} + +.btn-mini .caret, +.btn-small .caret { + margin-top: 8px; +} + +.dropup .btn-large .caret { + border-bottom-width: 5px; +} + +.btn-primary .caret, +.btn-warning .caret, +.btn-danger .caret, +.btn-info .caret, +.btn-success .caret, +.btn-inverse .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + +.btn-group-vertical { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; +} + +.btn-group-vertical > .btn { + display: block; + float: none; + max-width: 100%; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.btn-group-vertical > .btn + .btn { + margin-top: -1px; + margin-left: 0; +} + +.btn-group-vertical > .btn:first-child { + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} + +.btn-group-vertical > .btn:last-child { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} + +.btn-group-vertical > .btn-large:first-child { + -webkit-border-radius: 6px 6px 0 0; + -moz-border-radius: 6px 6px 0 0; + border-radius: 6px 6px 0 0; +} + +.btn-group-vertical > .btn-large:last-child { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} + +.alert { + padding: 8px 35px 8px 14px; + margin-bottom: 20px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + background-color: #fcf8e3; + border: 1px solid #fbeed5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.alert, +.alert h4 { + color: #c09853; +} + +.alert h4 { + margin: 0; +} + +.alert .close { + position: relative; + top: -2px; + right: -21px; + line-height: 20px; +} + +.alert-success { + color: #468847; + background-color: #dff0d8; + border-color: #d6e9c6; +} + +.alert-success h4 { + color: #468847; +} + +.alert-danger, +.alert-error { + color: #b94a48; + background-color: #f2dede; + border-color: #eed3d7; +} + +.alert-danger h4, +.alert-error h4 { + color: #b94a48; +} + +.alert-info { + color: #3a87ad; + background-color: #d9edf7; + border-color: #bce8f1; +} + +.alert-info h4 { + color: #3a87ad; +} + +.alert-block { + padding-top: 14px; + padding-bottom: 14px; +} + +.alert-block > p, +.alert-block > ul { + margin-bottom: 0; +} + +.alert-block p + p { + margin-top: 5px; +} + +.nav { + margin-bottom: 20px; + margin-left: 0; + list-style: none; +} + +.nav > li > a { + display: block; +} + +.nav > li > a:hover, +.nav > li > a:focus { + text-decoration: none; + background-color: #eeeeee; +} + +.nav > li > a > img { + max-width: none; +} + +.nav > .pull-right { + float: right; +} + +.nav-header { + display: block; + padding: 3px 15px; + font-size: 11px; + font-weight: bold; + line-height: 20px; + color: #999999; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + text-transform: uppercase; +} + +.nav li + .nav-header { + margin-top: 9px; +} + +.nav-list { + padding-right: 15px; + padding-left: 15px; + margin-bottom: 0; +} + +.nav-list > li > a, +.nav-list .nav-header { + margin-right: -15px; + margin-left: -15px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); +} + +.nav-list > li > a { + padding: 3px 15px; +} + +.nav-list > .active > a, +.nav-list > .active > a:hover, +.nav-list > .active > a:focus { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); + background-color: #0088cc; +} + +.nav-list [class^="icon-"], +.nav-list [class*=" icon-"] { + margin-right: 2px; +} + +.nav-list .divider { + *width: 100%; + height: 1px; + margin: 9px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} + +.nav-tabs, +.nav-pills { + *zoom: 1; +} + +.nav-tabs:before, +.nav-pills:before, +.nav-tabs:after, +.nav-pills:after { + display: table; + line-height: 0; + content: ""; +} + +.nav-tabs:after, +.nav-pills:after { + clear: both; +} + +.nav-tabs > li, +.nav-pills > li { + float: left; +} + +.nav-tabs > li > a, +.nav-pills > li > a { + padding-right: 12px; + padding-left: 12px; + margin-right: 2px; + line-height: 14px; +} + +.nav-tabs { + border-bottom: 1px solid #ddd; +} + +.nav-tabs > li { + margin-bottom: -1px; +} + +.nav-tabs > li > a { + padding-top: 8px; + padding-bottom: 8px; + line-height: 20px; + border: 1px solid transparent; + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} + +.nav-tabs > li > a:hover, +.nav-tabs > li > a:focus { + border-color: #eeeeee #eeeeee #dddddd; +} + +.nav-tabs > .active > a, +.nav-tabs > .active > a:hover, +.nav-tabs > .active > a:focus { + color: #555555; + cursor: default; + background-color: #ffffff; + border: 1px solid #ddd; + border-bottom-color: transparent; +} + +.nav-pills > li > a { + padding-top: 8px; + padding-bottom: 8px; + margin-top: 2px; + margin-bottom: 2px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} + +.nav-pills > .active > a, +.nav-pills > .active > a:hover, +.nav-pills > .active > a:focus { + color: #ffffff; + background-color: #0088cc; +} + +.nav-stacked > li { + float: none; +} + +.nav-stacked > li > a { + margin-right: 0; +} + +.nav-tabs.nav-stacked { + border-bottom: 0; +} + +.nav-tabs.nav-stacked > li > a { + border: 1px solid #ddd; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.nav-tabs.nav-stacked > li:first-child > a { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-topleft: 4px; +} + +.nav-tabs.nav-stacked > li:last-child > a { + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -moz-border-radius-bottomright: 4px; + -moz-border-radius-bottomleft: 4px; +} + +.nav-tabs.nav-stacked > li > a:hover, +.nav-tabs.nav-stacked > li > a:focus { + z-index: 2; + border-color: #ddd; +} + +.nav-pills.nav-stacked > li > a { + margin-bottom: 3px; +} + +.nav-pills.nav-stacked > li:last-child > a { + margin-bottom: 1px; +} + +.nav-tabs .dropdown-menu { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} + +.nav-pills .dropdown-menu { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.nav .dropdown-toggle .caret { + margin-top: 6px; + border-top-color: #0088cc; + border-bottom-color: #0088cc; +} + +.nav .dropdown-toggle:hover .caret, +.nav .dropdown-toggle:focus .caret { + border-top-color: #005580; + border-bottom-color: #005580; +} + +/* move down carets for tabs */ + +.nav-tabs .dropdown-toggle .caret { + margin-top: 8px; +} + +.nav .active .dropdown-toggle .caret { + border-top-color: #fff; + border-bottom-color: #fff; +} + +.nav-tabs .active .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} + +.nav > .dropdown.active > a:hover, +.nav > .dropdown.active > a:focus { + cursor: pointer; +} + +.nav-tabs .open .dropdown-toggle, +.nav-pills .open .dropdown-toggle, +.nav > li.dropdown.open.active > a:hover, +.nav > li.dropdown.open.active > a:focus { + color: #ffffff; + background-color: #999999; + border-color: #999999; +} + +.nav li.dropdown.open .caret, +.nav li.dropdown.open.active .caret, +.nav li.dropdown.open a:hover .caret, +.nav li.dropdown.open a:focus .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; + opacity: 1; + filter: alpha(opacity=100); +} + +.tabs-stacked .open > a:hover, +.tabs-stacked .open > a:focus { + border-color: #999999; +} + +.tabbable { + *zoom: 1; +} + +.tabbable:before, +.tabbable:after { + display: table; + line-height: 0; + content: ""; +} + +.tabbable:after { + clear: both; +} + +.tab-content { + overflow: auto; +} + +.tabs-below > .nav-tabs, +.tabs-right > .nav-tabs, +.tabs-left > .nav-tabs { + border-bottom: 0; +} + +.tab-content > .tab-pane, +.pill-content > .pill-pane { + display: none; +} + +.tab-content > .active, +.pill-content > .active { + display: block; +} + +.tabs-below > .nav-tabs { + border-top: 1px solid #ddd; +} + +.tabs-below > .nav-tabs > li { + margin-top: -1px; + margin-bottom: 0; +} + +.tabs-below > .nav-tabs > li > a { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} + +.tabs-below > .nav-tabs > li > a:hover, +.tabs-below > .nav-tabs > li > a:focus { + border-top-color: #ddd; + border-bottom-color: transparent; +} + +.tabs-below > .nav-tabs > .active > a, +.tabs-below > .nav-tabs > .active > a:hover, +.tabs-below > .nav-tabs > .active > a:focus { + border-color: transparent #ddd #ddd #ddd; +} + +.tabs-left > .nav-tabs > li, +.tabs-right > .nav-tabs > li { + float: none; +} + +.tabs-left > .nav-tabs > li > a, +.tabs-right > .nav-tabs > li > a { + min-width: 74px; + margin-right: 0; + margin-bottom: 3px; +} + +.tabs-left > .nav-tabs { + float: left; + margin-right: 19px; + border-right: 1px solid #ddd; +} + +.tabs-left > .nav-tabs > li > a { + margin-right: -1px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.tabs-left > .nav-tabs > li > a:hover, +.tabs-left > .nav-tabs > li > a:focus { + border-color: #eeeeee #dddddd #eeeeee #eeeeee; +} + +.tabs-left > .nav-tabs .active > a, +.tabs-left > .nav-tabs .active > a:hover, +.tabs-left > .nav-tabs .active > a:focus { + border-color: #ddd transparent #ddd #ddd; + *border-right-color: #ffffff; +} + +.tabs-right > .nav-tabs { + float: right; + margin-left: 19px; + border-left: 1px solid #ddd; +} + +.tabs-right > .nav-tabs > li > a { + margin-left: -1px; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.tabs-right > .nav-tabs > li > a:hover, +.tabs-right > .nav-tabs > li > a:focus { + border-color: #eeeeee #eeeeee #eeeeee #dddddd; +} + +.tabs-right > .nav-tabs .active > a, +.tabs-right > .nav-tabs .active > a:hover, +.tabs-right > .nav-tabs .active > a:focus { + border-color: #ddd #ddd #ddd transparent; + *border-left-color: #ffffff; +} + +.nav > .disabled > a { + color: #999999; +} + +.nav > .disabled > a:hover, +.nav > .disabled > a:focus { + text-decoration: none; + cursor: default; + background-color: transparent; +} + +.navbar { + *position: relative; + *z-index: 2; + margin-bottom: 20px; + overflow: visible; +} + +.navbar-inner { + min-height: 40px; + padding-right: 20px; + padding-left: 20px; + background-color: #fafafa; + background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2)); + background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -o-linear-gradient(top, #ffffff, #f2f2f2); + background-image: linear-gradient(to bottom, #ffffff, #f2f2f2); + background-repeat: repeat-x; + border: 1px solid #d4d4d4; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); + *zoom: 1; + -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); +} + +.navbar-inner:before, +.navbar-inner:after { + display: table; + line-height: 0; + content: ""; +} + +.navbar-inner:after { + clear: both; +} + +.navbar .container { + width: auto; +} + +.nav-collapse.collapse { + height: auto; + overflow: visible; +} + +.navbar .brand { + display: block; + float: left; + padding: 10px 20px 10px; + margin-left: -20px; + font-size: 20px; + font-weight: 200; + color: #777777; + text-shadow: 0 1px 0 #ffffff; +} + +.navbar .brand:hover, +.navbar .brand:focus { + text-decoration: none; +} + +.navbar-text { + margin-bottom: 0; + line-height: 40px; + color: #777777; +} + +.navbar-link { + color: #777777; +} + +.navbar-link:hover, +.navbar-link:focus { + color: #333333; +} + +.navbar .divider-vertical { + height: 40px; + margin: 0 9px; + border-right: 1px solid #ffffff; + border-left: 1px solid #f2f2f2; +} + +.navbar .btn, +.navbar .btn-group { + margin-top: 5px; +} + +.navbar .btn-group .btn, +.navbar .input-prepend .btn, +.navbar .input-append .btn, +.navbar .input-prepend .btn-group, +.navbar .input-append .btn-group { + margin-top: 0; +} + +.navbar-form { + margin-bottom: 0; + *zoom: 1; +} + +.navbar-form:before, +.navbar-form:after { + display: table; + line-height: 0; + content: ""; +} + +.navbar-form:after { + clear: both; +} + +.navbar-form input, +.navbar-form select, +.navbar-form .radio, +.navbar-form .checkbox { + margin-top: 5px; +} + +.navbar-form input, +.navbar-form select, +.navbar-form .btn { + display: inline-block; + margin-bottom: 0; +} + +.navbar-form input[type="image"], +.navbar-form input[type="checkbox"], +.navbar-form input[type="radio"] { + margin-top: 3px; +} + +.navbar-form .input-append, +.navbar-form .input-prepend { + margin-top: 5px; + white-space: nowrap; +} + +.navbar-form .input-append input, +.navbar-form .input-prepend input { + margin-top: 0; +} + +.navbar-search { + position: relative; + float: left; + margin-top: 5px; + margin-bottom: 0; +} + +.navbar-search .search-query { + padding: 4px 14px; + margin-bottom: 0; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + font-weight: normal; + line-height: 1; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} + +.navbar-static-top { + position: static; + margin-bottom: 0; +} + +.navbar-static-top .navbar-inner { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + z-index: 1030; + margin-bottom: 0; +} + +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + border-width: 0 0 1px; +} + +.navbar-fixed-bottom .navbar-inner { + border-width: 1px 0 0; +} + +.navbar-fixed-top .navbar-inner, +.navbar-fixed-bottom .navbar-inner { + padding-right: 0; + padding-left: 0; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 940px; +} + +.navbar-fixed-top { + top: 0; +} + +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); +} + +.navbar-fixed-bottom { + bottom: 0; +} + +.navbar-fixed-bottom .navbar-inner { + -webkit-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); + box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); +} + +.navbar .nav { + position: relative; + left: 0; + display: block; + float: left; + margin: 0 10px 0 0; +} + +.navbar .nav.pull-right { + float: right; + margin-right: 0; +} + +.navbar .nav > li { + float: left; +} + +.navbar .nav > li > a { + float: none; + padding: 10px 15px 10px; + color: #777777; + text-decoration: none; + text-shadow: 0 1px 0 #ffffff; +} + +.navbar .nav .dropdown-toggle .caret { + margin-top: 8px; +} + +.navbar .nav > li > a:focus, +.navbar .nav > li > a:hover { + color: #333333; + text-decoration: none; + background-color: transparent; +} + +.navbar .nav > .active > a, +.navbar .nav > .active > a:hover, +.navbar .nav > .active > a:focus { + color: #555555; + text-decoration: none; + background-color: #e5e5e5; + -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); +} + +.navbar .btn-navbar { + display: none; + float: right; + padding: 7px 10px; + margin-right: 5px; + margin-left: 5px; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #ededed; + *background-color: #e5e5e5; + background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5)); + background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5); + background-repeat: repeat-x; + border-color: #e5e5e5 #e5e5e5 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); +} + +.navbar .btn-navbar:hover, +.navbar .btn-navbar:focus, +.navbar .btn-navbar:active, +.navbar .btn-navbar.active, +.navbar .btn-navbar.disabled, +.navbar .btn-navbar[disabled] { + color: #ffffff; + background-color: #e5e5e5; + *background-color: #d9d9d9; +} + +.navbar .btn-navbar:active, +.navbar .btn-navbar.active { + background-color: #cccccc \9; +} + +.navbar .btn-navbar .icon-bar { + display: block; + width: 18px; + height: 2px; + background-color: #f5f5f5; + -webkit-border-radius: 1px; + -moz-border-radius: 1px; + border-radius: 1px; + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); +} + +.btn-navbar .icon-bar + .icon-bar { + margin-top: 3px; +} + +.navbar .nav > li > .dropdown-menu:before { + position: absolute; + top: -7px; + left: 9px; + display: inline-block; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-left: 7px solid transparent; + border-bottom-color: rgba(0, 0, 0, 0.2); + content: ''; +} + +.navbar .nav > li > .dropdown-menu:after { + position: absolute; + top: -6px; + left: 10px; + display: inline-block; + border-right: 6px solid transparent; + border-bottom: 6px solid #ffffff; + border-left: 6px solid transparent; + content: ''; +} + +.navbar-fixed-bottom .nav > li > .dropdown-menu:before { + top: auto; + bottom: -7px; + border-top: 7px solid #ccc; + border-bottom: 0; + border-top-color: rgba(0, 0, 0, 0.2); +} + +.navbar-fixed-bottom .nav > li > .dropdown-menu:after { + top: auto; + bottom: -6px; + border-top: 6px solid #ffffff; + border-bottom: 0; +} + +.navbar .nav li.dropdown > a:hover .caret, +.navbar .nav li.dropdown > a:focus .caret { + border-top-color: #333333; + border-bottom-color: #333333; +} + +.navbar .nav li.dropdown.open > .dropdown-toggle, +.navbar .nav li.dropdown.active > .dropdown-toggle, +.navbar .nav li.dropdown.open.active > .dropdown-toggle { + color: #555555; + background-color: #e5e5e5; +} + +.navbar .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #777777; + border-bottom-color: #777777; +} + +.navbar .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} + +.navbar .pull-right > li > .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right { + right: 0; + left: auto; +} + +.navbar .pull-right > li > .dropdown-menu:before, +.navbar .nav > li > .dropdown-menu.pull-right:before { + right: 12px; + left: auto; +} + +.navbar .pull-right > li > .dropdown-menu:after, +.navbar .nav > li > .dropdown-menu.pull-right:after { + right: 13px; + left: auto; +} + +.navbar .pull-right > li > .dropdown-menu .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu { + right: 100%; + left: auto; + margin-right: -1px; + margin-left: 0; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} + +.navbar-inverse .navbar-inner { + background-color: #1b1b1b; + background-image: -moz-linear-gradient(top, #222222, #111111); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111)); + background-image: -webkit-linear-gradient(top, #222222, #111111); + background-image: -o-linear-gradient(top, #222222, #111111); + background-image: linear-gradient(to bottom, #222222, #111111); + background-repeat: repeat-x; + border-color: #252525; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); +} + +.navbar-inverse .brand, +.navbar-inverse .nav > li > a { + color: #999999; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} + +.navbar-inverse .brand:hover, +.navbar-inverse .nav > li > a:hover, +.navbar-inverse .brand:focus, +.navbar-inverse .nav > li > a:focus { + color: #ffffff; +} + +.navbar-inverse .brand { + color: #999999; +} + +.navbar-inverse .navbar-text { + color: #999999; +} + +.navbar-inverse .nav > li > a:focus, +.navbar-inverse .nav > li > a:hover { + color: #ffffff; + background-color: transparent; +} + +.navbar-inverse .nav .active > a, +.navbar-inverse .nav .active > a:hover, +.navbar-inverse .nav .active > a:focus { + color: #ffffff; + background-color: #111111; +} + +.navbar-inverse .navbar-link { + color: #999999; +} + +.navbar-inverse .navbar-link:hover, +.navbar-inverse .navbar-link:focus { + color: #ffffff; +} + +.navbar-inverse .divider-vertical { + border-right-color: #222222; + border-left-color: #111111; +} + +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle { + color: #ffffff; + background-color: #111111; +} + +.navbar-inverse .nav li.dropdown > a:hover .caret, +.navbar-inverse .nav li.dropdown > a:focus .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + +.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #999999; + border-bottom-color: #999999; +} + +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + +.navbar-inverse .navbar-search .search-query { + color: #ffffff; + background-color: #515151; + border-color: #111111; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + transition: none; +} + +.navbar-inverse .navbar-search .search-query:-moz-placeholder { + color: #cccccc; +} + +.navbar-inverse .navbar-search .search-query:-ms-input-placeholder { + color: #cccccc; +} + +.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder { + color: #cccccc; +} + +.navbar-inverse .navbar-search .search-query:focus, +.navbar-inverse .navbar-search .search-query.focused { + padding: 5px 15px; + color: #333333; + text-shadow: 0 1px 0 #ffffff; + background-color: #ffffff; + border: 0; + outline: 0; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); +} + +.navbar-inverse .btn-navbar { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e0e0e; + *background-color: #040404; + background-image: -moz-linear-gradient(top, #151515, #040404); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404)); + background-image: -webkit-linear-gradient(top, #151515, #040404); + background-image: -o-linear-gradient(top, #151515, #040404); + background-image: linear-gradient(to bottom, #151515, #040404); + background-repeat: repeat-x; + border-color: #040404 #040404 #000000; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.navbar-inverse .btn-navbar:hover, +.navbar-inverse .btn-navbar:focus, +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active, +.navbar-inverse .btn-navbar.disabled, +.navbar-inverse .btn-navbar[disabled] { + color: #ffffff; + background-color: #040404; + *background-color: #000000; +} + +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active { + background-color: #000000 \9; +} + +.breadcrumb { + padding: 8px 15px; + margin: 0 0 20px; + list-style: none; + background-color: #f5f5f5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.breadcrumb > li { + display: inline-block; + *display: inline; + text-shadow: 0 1px 0 #ffffff; + *zoom: 1; +} + +.breadcrumb > li > .divider { + padding: 0 5px; + color: #ccc; +} + +.breadcrumb > .active { + color: #999999; +} + +.pagination { + margin: 20px 0; +} + +.pagination ul { + display: inline-block; + *display: inline; + margin-bottom: 0; + margin-left: 0; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + *zoom: 1; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.pagination ul > li { + display: inline; +} + +.pagination ul > li > a, +.pagination ul > li > span { + float: left; + padding: 4px 12px; + line-height: 20px; + text-decoration: none; + background-color: #ffffff; + border: 1px solid #dddddd; + border-left-width: 0; +} + +.pagination ul > li > a:hover, +.pagination ul > li > a:focus, +.pagination ul > .active > a, +.pagination ul > .active > span { + background-color: #f5f5f5; +} + +.pagination ul > .active > a, +.pagination ul > .active > span { + color: #999999; + cursor: default; +} + +.pagination ul > .disabled > span, +.pagination ul > .disabled > a, +.pagination ul > .disabled > a:hover, +.pagination ul > .disabled > a:focus { + color: #999999; + cursor: default; + background-color: transparent; +} + +.pagination ul > li:first-child > a, +.pagination ul > li:first-child > span { + border-left-width: 1px; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-topleft: 4px; +} + +.pagination ul > li:last-child > a, +.pagination ul > li:last-child > span { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-bottomright: 4px; +} + +.pagination-centered { + text-align: center; +} + +.pagination-right { + text-align: right; +} + +.pagination-large ul > li > a, +.pagination-large ul > li > span { + padding: 11px 19px; + font-size: 17.5px; +} + +.pagination-large ul > li:first-child > a, +.pagination-large ul > li:first-child > span { + -webkit-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -webkit-border-top-left-radius: 6px; + border-top-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + -moz-border-radius-topleft: 6px; +} + +.pagination-large ul > li:last-child > a, +.pagination-large ul > li:last-child > span { + -webkit-border-top-right-radius: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + -moz-border-radius-topright: 6px; + -moz-border-radius-bottomright: 6px; +} + +.pagination-mini ul > li:first-child > a, +.pagination-small ul > li:first-child > a, +.pagination-mini ul > li:first-child > span, +.pagination-small ul > li:first-child > span { + -webkit-border-bottom-left-radius: 3px; + border-bottom-left-radius: 3px; + -webkit-border-top-left-radius: 3px; + border-top-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + -moz-border-radius-topleft: 3px; +} + +.pagination-mini ul > li:last-child > a, +.pagination-small ul > li:last-child > a, +.pagination-mini ul > li:last-child > span, +.pagination-small ul > li:last-child > span { + -webkit-border-top-right-radius: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + border-bottom-right-radius: 3px; + -moz-border-radius-topright: 3px; + -moz-border-radius-bottomright: 3px; +} + +.pagination-small ul > li > a, +.pagination-small ul > li > span { + padding: 2px 10px; + font-size: 11.9px; +} + +.pagination-mini ul > li > a, +.pagination-mini ul > li > span { + padding: 0 6px; + font-size: 10.5px; +} + +.pager { + margin: 20px 0; + text-align: center; + list-style: none; + *zoom: 1; +} + +.pager:before, +.pager:after { + display: table; + line-height: 0; + content: ""; +} + +.pager:after { + clear: both; +} + +.pager li { + display: inline; +} + +.pager li > a, +.pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} + +.pager li > a:hover, +.pager li > a:focus { + text-decoration: none; + background-color: #f5f5f5; +} + +.pager .next > a, +.pager .next > span { + float: right; +} + +.pager .previous > a, +.pager .previous > span { + float: left; +} + +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > a:focus, +.pager .disabled > span { + color: #999999; + cursor: default; + background-color: #fff; +} + +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000000; +} + +.modal-backdrop.fade { + opacity: 0; +} + +.modal-backdrop, +.modal-backdrop.fade.in { + opacity: 0.8; + filter: alpha(opacity=80); +} + +.modal { + position: fixed; + top: 10%; + left: 50%; + z-index: 1050; + width: 560px; + margin-left: -280px; + background-color: #ffffff; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, 0.3); + *border: 1px solid #999; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + outline: none; + -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -webkit-background-clip: padding-box; + -moz-background-clip: padding-box; + background-clip: padding-box; +} + +.modal.fade { + top: -25%; + -webkit-transition: opacity 0.3s linear, top 0.3s ease-out; + -moz-transition: opacity 0.3s linear, top 0.3s ease-out; + -o-transition: opacity 0.3s linear, top 0.3s ease-out; + transition: opacity 0.3s linear, top 0.3s ease-out; +} + +.modal.fade.in { + top: 10%; +} + +.modal-header { + padding: 9px 15px; + border-bottom: 1px solid #eee; +} + +.modal-header .close { + margin-top: 2px; +} + +.modal-header h3 { + margin: 0; + line-height: 30px; +} + +.modal-body { + position: relative; + max-height: 400px; + padding: 15px; + overflow-y: auto; +} + +.modal-form { + margin-bottom: 0; +} + +.modal-footer { + padding: 14px 15px 15px; + margin-bottom: 0; + text-align: right; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; + *zoom: 1; + -webkit-box-shadow: inset 0 1px 0 #ffffff; + -moz-box-shadow: inset 0 1px 0 #ffffff; + box-shadow: inset 0 1px 0 #ffffff; +} + +.modal-footer:before, +.modal-footer:after { + display: table; + line-height: 0; + content: ""; +} + +.modal-footer:after { + clear: both; +} + +.modal-footer .btn + .btn { + margin-bottom: 0; + margin-left: 5px; +} + +.modal-footer .btn-group .btn + .btn { + margin-left: -1px; +} + +.modal-footer .btn-block + .btn-block { + margin-left: 0; +} + +.tooltip { + position: absolute; + z-index: 1030; + display: block; + font-size: 11px; + line-height: 1.4; + opacity: 0; + filter: alpha(opacity=0); + visibility: visible; +} + +.tooltip.in { + opacity: 0.8; + filter: alpha(opacity=80); +} + +.tooltip.top { + padding: 5px 0; + margin-top: -3px; +} + +.tooltip.right { + padding: 0 5px; + margin-left: 3px; +} + +.tooltip.bottom { + padding: 5px 0; + margin-top: 3px; +} + +.tooltip.left { + padding: 0 5px; + margin-left: -3px; +} + +.tooltip-inner { + max-width: 200px; + padding: 8px; + color: #ffffff; + text-align: center; + text-decoration: none; + background-color: #000000; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} + +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-top-color: #000000; + border-width: 5px 5px 0; +} + +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-right-color: #000000; + border-width: 5px 5px 5px 0; +} + +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-left-color: #000000; + border-width: 5px 0 5px 5px; +} + +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-bottom-color: #000000; + border-width: 0 5px 5px; +} + +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1010; + display: none; + max-width: 276px; + padding: 1px; + text-align: left; + white-space: normal; + background-color: #ffffff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} + +.popover.top { + margin-top: -10px; +} + +.popover.right { + margin-left: 10px; +} + +.popover.bottom { + margin-top: 10px; +} + +.popover.left { + margin-left: -10px; +} + +.popover-title { + padding: 8px 14px; + margin: 0; + font-size: 14px; + font-weight: normal; + line-height: 18px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + -webkit-border-radius: 5px 5px 0 0; + -moz-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} + +.popover-title:empty { + display: none; +} + +.popover-content { + padding: 9px 14px; +} + +.popover .arrow, +.popover .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} + +.popover .arrow { + border-width: 11px; +} + +.popover .arrow:after { + border-width: 10px; + content: ""; +} + +.popover.top .arrow { + bottom: -11px; + left: 50%; + margin-left: -11px; + border-top-color: #999; + border-top-color: rgba(0, 0, 0, 0.25); + border-bottom-width: 0; +} + +.popover.top .arrow:after { + bottom: 1px; + margin-left: -10px; + border-top-color: #ffffff; + border-bottom-width: 0; +} + +.popover.right .arrow { + top: 50%; + left: -11px; + margin-top: -11px; + border-right-color: #999; + border-right-color: rgba(0, 0, 0, 0.25); + border-left-width: 0; +} + +.popover.right .arrow:after { + bottom: -10px; + left: 1px; + border-right-color: #ffffff; + border-left-width: 0; +} + +.popover.bottom .arrow { + top: -11px; + left: 50%; + margin-left: -11px; + border-bottom-color: #999; + border-bottom-color: rgba(0, 0, 0, 0.25); + border-top-width: 0; +} + +.popover.bottom .arrow:after { + top: 1px; + margin-left: -10px; + border-bottom-color: #ffffff; + border-top-width: 0; +} + +.popover.left .arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-left-color: #999; + border-left-color: rgba(0, 0, 0, 0.25); + border-right-width: 0; +} + +.popover.left .arrow:after { + right: 1px; + bottom: -10px; + border-left-color: #ffffff; + border-right-width: 0; +} + +.thumbnails { + margin-left: -20px; + list-style: none; + *zoom: 1; +} + +.thumbnails:before, +.thumbnails:after { + display: table; + line-height: 0; + content: ""; +} + +.thumbnails:after { + clear: both; +} + +.row-fluid .thumbnails { + margin-left: 0; +} + +.thumbnails > li { + float: left; + margin-bottom: 20px; + margin-left: 20px; +} + +.thumbnail { + display: block; + padding: 4px; + line-height: 20px; + border: 1px solid #ddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} + +a.thumbnail:hover, +a.thumbnail:focus { + border-color: #0088cc; + -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); + -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); + box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); +} + +.thumbnail > img { + display: block; + max-width: 100%; + margin-right: auto; + margin-left: auto; +} + +.thumbnail .caption { + padding: 9px; + color: #555555; +} + +.media, +.media-body { + overflow: hidden; + *overflow: visible; + zoom: 1; +} + +.media, +.media .media { + margin-top: 15px; +} + +.media:first-child { + margin-top: 0; +} + +.media-object { + display: block; +} + +.media-heading { + margin: 0 0 5px; +} + +.media > .pull-left { + margin-right: 10px; +} + +.media > .pull-right { + margin-left: 10px; +} + +.media-list { + margin-left: 0; + list-style: none; +} + +.label, +.badge { + display: inline-block; + padding: 2px 4px; + font-size: 11.844px; + font-weight: bold; + line-height: 14px; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + white-space: nowrap; + vertical-align: baseline; + background-color: #999999; +} + +.label { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.badge { + padding-right: 9px; + padding-left: 9px; + -webkit-border-radius: 9px; + -moz-border-radius: 9px; + border-radius: 9px; +} + +.label:empty, +.badge:empty { + display: none; +} + +a.label:hover, +a.label:focus, +a.badge:hover, +a.badge:focus { + color: #ffffff; + text-decoration: none; + cursor: pointer; +} + +.label-important, +.badge-important { + background-color: #b94a48; +} + +.label-important[href], +.badge-important[href] { + background-color: #953b39; +} + +.label-warning, +.badge-warning { + background-color: #f89406; +} + +.label-warning[href], +.badge-warning[href] { + background-color: #c67605; +} + +.label-success, +.badge-success { + background-color: #468847; +} + +.label-success[href], +.badge-success[href] { + background-color: #356635; +} + +.label-info, +.badge-info { + background-color: #3a87ad; +} + +.label-info[href], +.badge-info[href] { + background-color: #2d6987; +} + +.label-inverse, +.badge-inverse { + background-color: #333333; +} + +.label-inverse[href], +.badge-inverse[href] { + background-color: #1a1a1a; +} + +.btn .label, +.btn .badge { + position: relative; + top: -1px; +} + +.btn-mini .label, +.btn-mini .badge { + top: 0; +} + +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +@-moz-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +@-ms-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +@-o-keyframes progress-bar-stripes { + from { + background-position: 0 0; + } + to { + background-position: 40px 0; + } +} + +@keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +.progress { + height: 20px; + margin-bottom: 20px; + overflow: hidden; + background-color: #f7f7f7; + background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); + background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9); + background-repeat: repeat-x; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); +} + +.progress .bar { + float: left; + width: 0; + height: 100%; + font-size: 12px; + color: #ffffff; + text-align: center; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e90d2; + background-image: -moz-linear-gradient(top, #149bdf, #0480be); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); + background-image: -webkit-linear-gradient(top, #149bdf, #0480be); + background-image: -o-linear-gradient(top, #149bdf, #0480be); + background-image: linear-gradient(to bottom, #149bdf, #0480be); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition: width 0.6s ease; + -moz-transition: width 0.6s ease; + -o-transition: width 0.6s ease; + transition: width 0.6s ease; +} + +.progress .bar + .bar { + -webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -moz-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); +} + +.progress-striped .bar { + background-color: #149bdf; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + -webkit-background-size: 40px 40px; + -moz-background-size: 40px 40px; + -o-background-size: 40px 40px; + background-size: 40px 40px; +} + +.progress.active .bar { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -moz-animation: progress-bar-stripes 2s linear infinite; + -ms-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} + +.progress-danger .bar, +.progress .bar-danger { + background-color: #dd514c; + background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); + background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); + background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); +} + +.progress-danger.progress-striped .bar, +.progress-striped .bar-danger { + background-color: #ee5f5b; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.progress-success .bar, +.progress .bar-success { + background-color: #5eb95e; + background-image: -moz-linear-gradient(top, #62c462, #57a957); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); + background-image: -webkit-linear-gradient(top, #62c462, #57a957); + background-image: -o-linear-gradient(top, #62c462, #57a957); + background-image: linear-gradient(to bottom, #62c462, #57a957); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); +} + +.progress-success.progress-striped .bar, +.progress-striped .bar-success { + background-color: #62c462; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.progress-info .bar, +.progress .bar-info { + background-color: #4bb1cf; + background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); + background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); + background-image: -o-linear-gradient(top, #5bc0de, #339bb9); + background-image: linear-gradient(to bottom, #5bc0de, #339bb9); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); +} + +.progress-info.progress-striped .bar, +.progress-striped .bar-info { + background-color: #5bc0de; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.progress-warning .bar, +.progress .bar-warning { + background-color: #faa732; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); +} + +.progress-warning.progress-striped .bar, +.progress-striped .bar-warning { + background-color: #fbb450; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.accordion { + margin-bottom: 20px; +} + +.accordion-group { + margin-bottom: 2px; + border: 1px solid #e5e5e5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.accordion-heading { + border-bottom: 0; +} + +.accordion-heading .accordion-toggle { + display: block; + padding: 8px 15px; +} + +.accordion-toggle { + cursor: pointer; +} + +.accordion-inner { + padding: 9px 15px; + border-top: 1px solid #e5e5e5; +} + +.carousel { + position: relative; + margin-bottom: 20px; + line-height: 1; +} + +.carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} + +.carousel-inner > .item { + position: relative; + display: none; + -webkit-transition: 0.6s ease-in-out left; + -moz-transition: 0.6s ease-in-out left; + -o-transition: 0.6s ease-in-out left; + transition: 0.6s ease-in-out left; +} + +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + display: block; + line-height: 1; +} + +.carousel-inner > .active, +.carousel-inner > .next, +.carousel-inner > .prev { + display: block; +} + +.carousel-inner > .active { + left: 0; +} + +.carousel-inner > .next, +.carousel-inner > .prev { + position: absolute; + top: 0; + width: 100%; +} + +.carousel-inner > .next { + left: 100%; +} + +.carousel-inner > .prev { + left: -100%; +} + +.carousel-inner > .next.left, +.carousel-inner > .prev.right { + left: 0; +} + +.carousel-inner > .active.left { + left: -100%; +} + +.carousel-inner > .active.right { + left: 100%; +} + +.carousel-control { + position: absolute; + top: 40%; + left: 15px; + width: 40px; + height: 40px; + margin-top: -20px; + font-size: 60px; + font-weight: 100; + line-height: 30px; + color: #ffffff; + text-align: center; + background: #222222; + border: 3px solid #ffffff; + -webkit-border-radius: 23px; + -moz-border-radius: 23px; + border-radius: 23px; + opacity: 0.5; + filter: alpha(opacity=50); +} + +.carousel-control.right { + right: 15px; + left: auto; +} + +.carousel-control:hover, +.carousel-control:focus { + color: #ffffff; + text-decoration: none; + opacity: 0.9; + filter: alpha(opacity=90); +} + +.carousel-indicators { + position: absolute; + top: 15px; + right: 15px; + z-index: 5; + margin: 0; + list-style: none; +} + +.carousel-indicators li { + display: block; + float: left; + width: 10px; + height: 10px; + margin-left: 5px; + text-indent: -999px; + background-color: #ccc; + background-color: rgba(255, 255, 255, 0.25); + border-radius: 5px; +} + +.carousel-indicators .active { + background-color: #fff; +} + +.carousel-caption { + position: absolute; + right: 0; + bottom: 0; + left: 0; + padding: 15px; + background: #333333; + background: rgba(0, 0, 0, 0.75); +} + +.carousel-caption h4, +.carousel-caption p { + line-height: 20px; + color: #ffffff; +} + +.carousel-caption h4 { + margin: 0 0 5px; +} + +.carousel-caption p { + margin-bottom: 0; +} + +.hero-unit { + padding: 60px; + margin-bottom: 30px; + font-size: 18px; + font-weight: 200; + line-height: 30px; + color: inherit; + background-color: #eeeeee; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.hero-unit h1 { + margin-bottom: 0; + font-size: 60px; + line-height: 1; + letter-spacing: -1px; + color: inherit; +} + +.hero-unit li { + line-height: 30px; +} + +.pull-right { + float: right; +} + +.pull-left { + float: left; +} + +.hide { + display: none; +} + +.show { + display: block; +} + +.invisible { + visibility: hidden; +} + +.affix { + position: fixed; +} diff --git a/IPKS_Updated/web/web/web/bootstrap/css/bootstrap.min.css b/IPKS_Updated/web/web/web/bootstrap/css/bootstrap.min.css new file mode 100644 index 0000000..df96c86 --- /dev/null +++ b/IPKS_Updated/web/web/web/bootstrap/css/bootstrap.min.css @@ -0,0 +1,9 @@ +/*! + * Bootstrap v2.3.2 + * + * Copyright 2013 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world by @mdo and @fat. + */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{width:auto\9;height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}label,select,button,input[type="button"],input[type="reset"],input[type="submit"],input[type="radio"],input[type="checkbox"]{cursor:pointer}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:hover,a:focus{color:#005580;text-decoration:underline}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.127659574468085%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;line-height:0;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;line-height:0;content:""}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:bold}em{font-style:italic}cite{font-style:normal}.muted{color:#999}a.muted:hover,a.muted:focus{color:#808080}.text-warning{color:#c09853}a.text-warning:hover,a.text-warning:focus{color:#a47e3c}.text-error{color:#b94a48}a.text-error:hover,a.text-error:focus{color:#953b39}.text-info{color:#3a87ad}a.text-info:hover,a.text-info:focus{color:#2d6987}.text-success{color:#468847}a.text-success:hover,a.text-success:focus{color:#356635}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:20px;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999}h1,h2,h3{line-height:40px}h1{font-size:38.5px}h2{font-size:31.5px}h3{font-size:24.5px}h4{font-size:17.5px}h5{font-size:14px}h6{font-size:11.9px}h1 small{font-size:24.5px}h2 small{font-size:17.5px}h3 small{font-size:14px}h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ul,ol{padding:0;margin:0 0 10px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}li{line-height:20px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}ul.inline,ol.inline{margin-left:0;list-style:none}ul.inline>li,ol.inline>li{display:inline-block;*display:inline;padding-right:5px;padding-left:5px;*zoom:1}dl{margin-bottom:20px}dt,dd{line-height:20px}dt{font-weight:bold}dd{margin-left:10px}.dl-horizontal{*zoom:1}.dl-horizontal:before,.dl-horizontal:after{display:table;line-height:0;content:""}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;white-space:nowrap;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555;vertical-align:middle;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}input,textarea,.uneditable-input{width:206px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;*margin-top:0;line-height:normal}input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px}select{width:220px;background-color:#fff;border:1px solid #ccc}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.radio,.checkbox{min-height:20px;padding-left:20px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-20px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.uneditable-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;line-height:0;content:""}.controls-row:after{clear:both}.controls-row [class*="span"],.row-fluid .controls-row [class*="span"]{float:left}.controls-row .checkbox[class*="span"],.controls-row .radio[class*="span"]{padding-top:5px}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad}.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3}.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:invalid,textarea:focus:invalid,select:focus:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:invalid:focus,textarea:focus:invalid:focus,select:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;line-height:0;content:""}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-append,.input-prepend{display:inline-block;margin-bottom:10px;font-size:0;white-space:nowrap;vertical-align:middle}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input,.input-append .dropdown-menu,.input-prepend .dropdown-menu,.input-append .popover,.input-prepend .popover{font-size:14px}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child,.input-append .uneditable-input+.btn-group .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn,.input-prepend.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .btn-group:first-child{margin-left:0}input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;vertical-align:middle;*zoom:1}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;line-height:0;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .input-append+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:bold}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child>th:first-child,.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child>th:last-child,.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered thead:last-child tr:last-child>th:first-child,.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child{-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered thead:last-child tr:last-child>th:last-child,.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomleft:0}.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomright:0}.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5}table td[class*="span"],table th[class*="span"],.row-fluid table td[class*="span"],.row-fluid table th[class*="span"]{display:table-cell;float:none;margin-left:0}.table td.span1,.table th.span1{float:none;width:44px;margin-left:0}.table td.span2,.table th.span2{float:none;width:124px;margin-left:0}.table td.span3,.table th.span3{float:none;width:204px;margin-left:0}.table td.span4,.table th.span4{float:none;width:284px;margin-left:0}.table td.span5,.table th.span5{float:none;width:364px;margin-left:0}.table td.span6,.table th.span6{float:none;width:444px;margin-left:0}.table td.span7,.table th.span7{float:none;width:524px;margin-left:0}.table td.span8,.table th.span8{float:none;width:604px;margin-left:0}.table td.span9,.table th.span9{float:none;width:684px;margin-left:0}.table td.span10,.table th.span10{float:none;width:764px;margin-left:0}.table td.span11,.table th.span11{float:none;width:844px;margin-left:0}.table td.span12,.table th.span12{float:none;width:924px;margin-left:0}.table tbody tr.success>td{background-color:#dff0d8}.table tbody tr.error>td{background-color:#f2dede}.table tbody tr.warning>td{background-color:#fcf8e3}.table tbody tr.info>td{background-color:#d9edf7}.table-hover tbody tr.success:hover>td{background-color:#d0e9c6}.table-hover tbody tr.error:hover>td{background-color:#ebcccc}.table-hover tbody tr.warning:hover>td{background-color:#faf2cc}.table-hover tbody tr.info:hover>td{background-color:#c4e3f3}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:focus>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:focus>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:focus>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:focus>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{width:16px;background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-submenu:hover>a,.dropdown-submenu:focus>a{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;outline:0;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open{*z-index:1000}.open>.dropdown-menu{display:block}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{z-index:1051;margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 12px;margin-bottom:0;*margin-left:.3em;font-size:14px;line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #ccc;*border:0;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);*zoom:1;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:hover,.btn:focus{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class^="icon-"],.btn-small [class*=" icon-"]{margin-top:0}.btn-mini [class^="icon-"],.btn-mini [class*=" icon-"]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#006dcc;*background-color:#04c;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary:active,.btn-primary.active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#faa732;*background-color:#f89406;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#da4f49;*background-color:#bd362f;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffbd362f',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#5bb75b;*background-color:#51a351;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff51a351',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#49afcd;*background-color:#2f96b4;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff2f96b4',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#363636;*background-color:#222;background-image:-moz-linear-gradient(top,#444,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444',endColorstr='#ff222222',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{color:#08c;cursor:pointer;border-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover,.btn-link:focus{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,.btn-link[disabled]:focus{color:#333;text-decoration:none}.btn-group{position:relative;display:inline-block;*display:inline;*margin-left:.3em;font-size:0;white-space:nowrap;vertical-align:middle;*zoom:1}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{*padding-top:5px;padding-right:8px;*padding-bottom:5px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn-group>.btn-mini+.dropdown-toggle{*padding-top:2px;padding-right:5px;*padding-bottom:2px;padding-left:5px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{*padding-top:7px;padding-right:12px;*padding-bottom:7px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-large .caret{margin-top:6px}.btn-large .caret{border-top-width:5px;border-right-width:5px;border-left-width:5px}.btn-mini .caret,.btn-small .caret{margin-top:8px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical>.btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert,.alert h4{color:#c09853}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-success h4{color:#468847}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-danger h4,.alert-error h4{color:#b94a48}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-info h4{color:#3a87ad}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:none}.nav>li>a{display:block}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li>a>img{max-width:none}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover,.nav-list>.active>a:focus{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#08c}.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;line-height:0;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover,.nav-tabs>.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover,.nav-pills>.active>a:focus{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:hover,.nav-tabs.nav-stacked>li>a:focus{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav .dropdown-toggle:hover .caret,.nav .dropdown-toggle:focus .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:hover,.nav>.dropdown.active>a:focus{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover,.nav>li.dropdown.open.active>a:focus{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open a:focus .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover,.tabs-stacked .open>a:focus{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover,.tabs-below>.nav-tabs>li>a:focus{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover,.tabs-below>.nav-tabs>.active>a:focus{border-color:transparent #ddd #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover,.tabs-left>.nav-tabs>li>a:focus{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover,.tabs-left>.nav-tabs .active>a:focus{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover,.tabs-right>.nav-tabs>li>a:focus{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover,.tabs-right>.nav-tabs .active>a:focus{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover,.nav>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent}.navbar{*position:relative;*z-index:2;margin-bottom:20px;overflow:visible}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff2f2f2',GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.065);box-shadow:0 1px 4px rgba(0,0,0,0.065)}.navbar-inner:before,.navbar-inner:after{display:table;line-height:0;content:""}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{display:block;float:left;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:hover,.navbar .brand:focus{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:hover,.navbar-link:focus{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn,.navbar .input-prepend .btn-group,.navbar .input-append .btn-group{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;line-height:0;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,0.1);box-shadow:0 1px 10px rgba(0,0,0,0.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,0.1);box-shadow:0 -1px 10px rgba(0,0,0,0.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#333;text-decoration:none;background-color:transparent}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);box-shadow:inset 0 3px 8px rgba(0,0,0,0.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#ededed;*background-color:#e5e5e5;background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffe5e5e5',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#ccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 rgba(0,0,0,0.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown>a:hover .caret,.navbar .nav li.dropdown>a:focus .caret{border-top-color:#333;border-bottom-color:#333}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{color:#555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{right:12px;left:auto}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{right:13px;left:auto}.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);background-repeat:repeat-x;border-color:#252525;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222',endColorstr='#ff111111',GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover,.navbar-inverse .brand:focus,.navbar-inverse .nav>li>a:focus{color:#fff}.navbar-inverse .brand{color:#999}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover,.navbar-inverse .navbar-link:focus{color:#fff}.navbar-inverse .divider-vertical{border-right-color:#222;border-left-color:#111}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{color:#fff;background-color:#111}.navbar-inverse .nav li.dropdown>a:hover .caret,.navbar-inverse .nav li.dropdown>a:focus .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e0e0e;*background-color:#040404;background-image:-moz-linear-gradient(top,#151515,#040404);background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515',endColorstr='#ff040404',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.breadcrumb>li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{margin:20px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999;cursor:default;background-color:transparent}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px}.pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px}.pager{margin:20px 0;text-align:center;list-style:none;*zoom:1}.pager:before,.pager:after{display:table;line-height:0;content:""}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;cursor:default;background-color:#fff}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;outline:0;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out}.modal.fade.in{top:10%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{position:relative;max-height:400px;padding:15px;overflow-y:auto}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:before,.modal-footer:after{display:table;line-height:0;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{position:absolute;z-index:1030;display:block;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-title:empty{display:none}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);border-bottom-width:0}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-top-color:#fff;border-bottom-width:0}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,0.25);border-left-width:0}.popover.right .arrow:after{bottom:-10px;left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom .arrow{top:-11px;left:50%;margin-left:-11px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);border-top-width:0}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-bottom-color:#fff;border-top-width:0}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-left-color:#999;border-left-color:rgba(0,0,0,0.25);border-right-width:0}.popover.left .arrow:after{right:1px;bottom:-10px;border-left-color:#fff;border-right-width:0}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;line-height:0;content:""}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.055);box-shadow:0 1px 3px rgba(0,0,0,0.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover,a.thumbnail:focus{border-color:#08c;-webkit-box-shadow:0 1px 4px rgba(0,105,214,0.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,0.25);box-shadow:0 1px 4px rgba(0,105,214,0.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#555}.media,.media-body{overflow:hidden;*overflow:visible;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{margin-left:0;list-style:none}.label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:bold;line-height:14px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding-right:9px;padding-left:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}.label:empty,.badge:empty{display:none}a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f89406}.label-warning[href],.badge-warning[href]{background-color:#c67605}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}.btn .label,.btn .badge{position:relative;top:-1px}.btn-mini .label,.btn-mini .badge{top:0}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5',endColorstr='#fff9f9f9',GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress .bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf',endColorstr='#ff0480be',GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffc43c35',GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff57a957',GradientType=0)}.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(to bottom,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff339bb9',GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0)}.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{right:15px;left:auto}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-indicators{position:absolute;top:15px;right:15px;z-index:5;margin:0;list-style:none}.carousel-indicators li{display:block;float:left;width:10px;height:10px;margin-left:5px;text-indent:-999px;background-color:#ccc;background-color:rgba(255,255,255,0.25);border-radius:5px}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:15px;background:#333;background:rgba(0,0,0,0.75)}.carousel-caption h4,.carousel-caption p{line-height:20px;color:#fff}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;color:inherit}.hero-unit li{line-height:30px}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed} diff --git a/IPKS_Updated/web/web/web/bootstrap/img/glyphicons-halflings-white.png b/IPKS_Updated/web/web/web/bootstrap/img/glyphicons-halflings-white.png new file mode 100644 index 0000000..3bf6484 Binary files /dev/null and b/IPKS_Updated/web/web/web/bootstrap/img/glyphicons-halflings-white.png differ diff --git a/IPKS_Updated/web/web/web/bootstrap/img/glyphicons-halflings.png b/IPKS_Updated/web/web/web/bootstrap/img/glyphicons-halflings.png new file mode 100644 index 0000000..a996999 Binary files /dev/null and b/IPKS_Updated/web/web/web/bootstrap/img/glyphicons-halflings.png differ diff --git a/IPKS_Updated/web/web/web/bootstrap/js/bootstrap.js b/IPKS_Updated/web/web/web/bootstrap/js/bootstrap.js new file mode 100644 index 0000000..44109f6 --- /dev/null +++ b/IPKS_Updated/web/web/web/bootstrap/js/bootstrap.js @@ -0,0 +1,2280 @@ +/* =================================================== + * bootstrap-transition.js v2.3.2 + * http://getbootstrap.com/2.3.2/javascript.html#transitions + * =================================================== + * Copyright 2013 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) + * ======================================================= */ + + $(function () { + + $.support.transition = (function () { + + var transitionEnd = (function () { + + var el = document.createElement('bootstrap') + , transEndEventNames = { + 'WebkitTransition' : 'webkitTransitionEnd' + , 'MozTransition' : 'transitionend' + , 'OTransition' : 'oTransitionEnd otransitionend' + , 'transition' : 'transitionend' + } + , name + + for (name in transEndEventNames){ + if (el.style[name] !== undefined) { + return transEndEventNames[name] + } + } + + }()) + + return transitionEnd && { + end: transitionEnd + } + + })() + + }) + +}(window.jQuery);/* ========================================================== + * bootstrap-alert.js v2.3.2 + * http://getbootstrap.com/2.3.2/javascript.html#alerts + * ========================================================== + * Copyright 2013 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* ALERT CLASS DEFINITION + * ====================== */ + + var dismiss = '[data-dismiss="alert"]' + , Alert = function (el) { + $(el).on('click', dismiss, this.close) + } + + Alert.prototype.close = function (e) { + var $this = $(this) + , selector = $this.attr('data-target') + , $parent + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + $parent = $(selector) + + e && e.preventDefault() + + $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) + + $parent.trigger(e = $.Event('close')) + + if (e.isDefaultPrevented()) return + + $parent.removeClass('in') + + function removeElement() { + $parent + .trigger('closed') + .remove() + } + + $.support.transition && $parent.hasClass('fade') ? + $parent.on($.support.transition.end, removeElement) : + removeElement() + } + + + /* ALERT PLUGIN DEFINITION + * ======================= */ + + var old = $.fn.alert + + $.fn.alert = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('alert') + if (!data) $this.data('alert', (data = new Alert(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + $.fn.alert.Constructor = Alert + + + /* ALERT NO CONFLICT + * ================= */ + + $.fn.alert.noConflict = function () { + $.fn.alert = old + return this + } + + + /* ALERT DATA-API + * ============== */ + + $(document).on('click.alert.data-api', dismiss, Alert.prototype.close) + +}(window.jQuery);/* ============================================================ + * bootstrap-button.js v2.3.2 + * http://getbootstrap.com/2.3.2/javascript.html#buttons + * ============================================================ + * Copyright 2013 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* BUTTON PUBLIC CLASS DEFINITION + * ============================== */ + + var Button = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, $.fn.button.defaults, options) + } + + Button.prototype.setState = function (state) { + var d = 'disabled' + , $el = this.$element + , data = $el.data() + , val = $el.is('input') ? 'val' : 'html' + + state = state + 'Text' + data.resetText || $el.data('resetText', $el[val]()) + + $el[val](data[state] || this.options[state]) + + // push to event loop to allow forms to submit + setTimeout(function () { + state == 'loadingText' ? + $el.addClass(d).attr(d, d) : + $el.removeClass(d).removeAttr(d) + }, 0) + } + + Button.prototype.toggle = function () { + var $parent = this.$element.closest('[data-toggle="buttons-radio"]') + + $parent && $parent + .find('.active') + .removeClass('active') + + this.$element.toggleClass('active') + } + + + /* BUTTON PLUGIN DEFINITION + * ======================== */ + + var old = $.fn.button + + $.fn.button = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('button') + , options = typeof option == 'object' && option + if (!data) $this.data('button', (data = new Button(this, options))) + if (option == 'toggle') data.toggle() + else if (option) data.setState(option) + }) + } + + $.fn.button.defaults = { + loadingText: 'loading...' + } + + $.fn.button.Constructor = Button + + + /* BUTTON NO CONFLICT + * ================== */ + + $.fn.button.noConflict = function () { + $.fn.button = old + return this + } + + + /* BUTTON DATA-API + * =============== */ + + $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) { + var $btn = $(e.target) + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') + $btn.button('toggle') + }) + +}(window.jQuery);/* ========================================================== + * bootstrap-carousel.js v2.3.2 + * http://getbootstrap.com/2.3.2/javascript.html#carousel + * ========================================================== + * Copyright 2013 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* CAROUSEL CLASS DEFINITION + * ========================= */ + + var Carousel = function (element, options) { + this.$element = $(element) + this.$indicators = this.$element.find('.carousel-indicators') + this.options = options + this.options.pause == 'hover' && this.$element + .on('mouseenter', $.proxy(this.pause, this)) + .on('mouseleave', $.proxy(this.cycle, this)) + } + + Carousel.prototype = { + + cycle: function (e) { + if (!e) this.paused = false + if (this.interval) clearInterval(this.interval); + this.options.interval + && !this.paused + && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) + return this + } + + , getActiveIndex: function () { + this.$active = this.$element.find('.item.active') + this.$items = this.$active.parent().children() + return this.$items.index(this.$active) + } + + , to: function (pos) { + var activeIndex = this.getActiveIndex() + , that = this + + if (pos > (this.$items.length - 1) || pos < 0) return + + if (this.sliding) { + return this.$element.one('slid', function () { + that.to(pos) + }) + } + + if (activeIndex == pos) { + return this.pause().cycle() + } + + return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) + } + + , pause: function (e) { + if (!e) this.paused = true + if (this.$element.find('.next, .prev').length && $.support.transition.end) { + this.$element.trigger($.support.transition.end) + this.cycle(true) + } + clearInterval(this.interval) + this.interval = null + return this + } + + , next: function () { + if (this.sliding) return + return this.slide('next') + } + + , prev: function () { + if (this.sliding) return + return this.slide('prev') + } + + , slide: function (type, next) { + var $active = this.$element.find('.item.active') + , $next = next || $active[type]() + , isCycling = this.interval + , direction = type == 'next' ? 'left' : 'right' + , fallback = type == 'next' ? 'first' : 'last' + , that = this + , e + + this.sliding = true + + isCycling && this.pause() + + $next = $next.length ? $next : this.$element.find('.item')[fallback]() + + e = $.Event('slide', { + relatedTarget: $next[0] + , direction: direction + }) + + if ($next.hasClass('active')) return + + if (this.$indicators.length) { + this.$indicators.find('.active').removeClass('active') + this.$element.one('slid', function () { + var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) + $nextIndicator && $nextIndicator.addClass('active') + }) + } + + if ($.support.transition && this.$element.hasClass('slide')) { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + $next.addClass(type) + $next[0].offsetWidth // force reflow + $active.addClass(direction) + $next.addClass(direction) + this.$element.one($.support.transition.end, function () { + $next.removeClass([type, direction].join(' ')).addClass('active') + $active.removeClass(['active', direction].join(' ')) + that.sliding = false + setTimeout(function () { that.$element.trigger('slid') }, 0) + }) + } else { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + $active.removeClass('active') + $next.addClass('active') + this.sliding = false + this.$element.trigger('slid') + } + + isCycling && this.cycle() + + return this + } + + } + + + /* CAROUSEL PLUGIN DEFINITION + * ========================== */ + + var old = $.fn.carousel + + $.fn.carousel = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('carousel') + , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option) + , action = typeof option == 'string' ? option : options.slide + if (!data) $this.data('carousel', (data = new Carousel(this, options))) + if (typeof option == 'number') data.to(option) + else if (action) data[action]() + else if (options.interval) data.pause().cycle() + }) + } + + $.fn.carousel.defaults = { + interval: 5000 + , pause: 'hover' + } + + $.fn.carousel.Constructor = Carousel + + + /* CAROUSEL NO CONFLICT + * ==================== */ + + $.fn.carousel.noConflict = function () { + $.fn.carousel = old + return this + } + + /* CAROUSEL DATA-API + * ================= */ + + $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { + var $this = $(this), href + , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 + , options = $.extend({}, $target.data(), $this.data()) + , slideIndex + + $target.carousel(options) + + if (slideIndex = $this.attr('data-slide-to')) { + $target.data('carousel').pause().to(slideIndex).cycle() + } + + e.preventDefault() + }) + +}(window.jQuery);/* ============================================================= + * bootstrap-collapse.js v2.3.2 + * http://getbootstrap.com/2.3.2/javascript.html#collapse + * ============================================================= + * Copyright 2013 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* COLLAPSE PUBLIC CLASS DEFINITION + * ================================ */ + + var Collapse = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, $.fn.collapse.defaults, options) + + if (this.options.parent) { + this.$parent = $(this.options.parent) + } + + this.options.toggle && this.toggle() + } + + Collapse.prototype = { + + constructor: Collapse + + , dimension: function () { + var hasWidth = this.$element.hasClass('width') + return hasWidth ? 'width' : 'height' + } + + , show: function () { + var dimension + , scroll + , actives + , hasData + + if (this.transitioning || this.$element.hasClass('in')) return + + dimension = this.dimension() + scroll = $.camelCase(['scroll', dimension].join('-')) + actives = this.$parent && this.$parent.find('> .accordion-group > .in') + + if (actives && actives.length) { + hasData = actives.data('collapse') + if (hasData && hasData.transitioning) return + actives.collapse('hide') + hasData || actives.data('collapse', null) + } + + this.$element[dimension](0) + this.transition('addClass', $.Event('show'), 'shown') + $.support.transition && this.$element[dimension](this.$element[0][scroll]) + } + + , hide: function () { + var dimension + if (this.transitioning || !this.$element.hasClass('in')) return + dimension = this.dimension() + this.reset(this.$element[dimension]()) + this.transition('removeClass', $.Event('hide'), 'hidden') + this.$element[dimension](0) + } + + , reset: function (size) { + var dimension = this.dimension() + + this.$element + .removeClass('collapse') + [dimension](size || 'auto') + [0].offsetWidth + + this.$element[size !== null ? 'addClass' : 'removeClass']('collapse') + + return this + } + + , transition: function (method, startEvent, completeEvent) { + var that = this + , complete = function () { + if (startEvent.type == 'show') that.reset() + that.transitioning = 0 + that.$element.trigger(completeEvent) + } + + this.$element.trigger(startEvent) + + if (startEvent.isDefaultPrevented()) return + + this.transitioning = 1 + + this.$element[method]('in') + + $.support.transition && this.$element.hasClass('collapse') ? + this.$element.one($.support.transition.end, complete) : + complete() + } + + , toggle: function () { + this[this.$element.hasClass('in') ? 'hide' : 'show']() + } + + } + + + /* COLLAPSE PLUGIN DEFINITION + * ========================== */ + + var old = $.fn.collapse + + $.fn.collapse = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('collapse') + , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option) + if (!data) $this.data('collapse', (data = new Collapse(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.collapse.defaults = { + toggle: true + } + + $.fn.collapse.Constructor = Collapse + + + /* COLLAPSE NO CONFLICT + * ==================== */ + + $.fn.collapse.noConflict = function () { + $.fn.collapse = old + return this + } + + + /* COLLAPSE DATA-API + * ================= */ + + $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { + var $this = $(this), href + , target = $this.attr('data-target') + || e.preventDefault() + || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 + , option = $(target).data('collapse') ? 'toggle' : $this.data() + $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') + $(target).collapse(option) + }) + +}(window.jQuery);/* ============================================================ + * bootstrap-dropdown.js v2.3.2 + * http://getbootstrap.com/2.3.2/javascript.html#dropdowns + * ============================================================ + * Copyright 2013 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* DROPDOWN CLASS DEFINITION + * ========================= */ + + var toggle = '[data-toggle=dropdown]' + , Dropdown = function (element) { + var $el = $(element).on('click.dropdown.data-api', this.toggle) + $('html').on('click.dropdown.data-api', function () { + $el.parent().removeClass('open') + }) + } + + Dropdown.prototype = { + + constructor: Dropdown + + , toggle: function (e) { + var $this = $(this) + , $parent + , isActive + + if ($this.is('.disabled, :disabled')) return + + $parent = getParent($this) + + isActive = $parent.hasClass('open') + + clearMenus() + + if (!isActive) { + if ('ontouchstart' in document.documentElement) { + // if mobile we we use a backdrop because click events don't delegate + $('