Package com.ordobill.webapp.beans

Examples of com.ordobill.webapp.beans.ImportBean


    XSSFWorkbook wb = new XSSFWorkbook(data);
   
    Sheet sheet = wb.getSheetAt(0);
    if (sheet != null) {
      while (true) {
        ImportBean importBean = new ImportBean();
        row = sheet.getRow(fieldsize);
        //System.out.println(row.getPhysicalNumberOfCells());
        try {
          if (row.getCell(0).equals(null)) {
            break;
          }
          importBean.setSubsystem(row.getCell(0).toString().trim());
          importBean.setCategory(row.getCell(1).toString().trim());
          importBean.setItem(row.getCell(2).toString().trim());
          importBean.setFail_mode(row.getCell(3).toString().trim());
          importBean.setFailure_distribution(row.getCell(4).toString().trim());
          importBean.setFparam1(chkCellfloat(row.getCell(5)));
          importBean.setFparam2(chkCellfloat(row.getCell(6)));
          importBean.setFparam3(chkCellfloat(row.getCell(7)));
          //importBean.setFparam3(row.getCell(7));
          importBean.setRparam1(chkCellfloat(row.getCell(8)));
          importBean.setRparam2(chkCellfloat(row.getCell(9)));
          importBean.setRparam3(chkCellfloat(row.getCell(10)));
          importBean.setFailure(chkCellfloat(row.getCell(11)));
          importBean.setRepair(chkCellfloat(row.getCell(12)));
          importBean.setConnection((int)row.getCell(13).getNumericCellValue());
          importBean.setUserID(pro_id);
          resultdata.add(rowSize, importBean);
          fieldsize++;
          rowSize++;
          System.out.println(resultdata.size());
        } catch(NullPointerException e) {
View Full Code Here


     */
    public ActionForward projectImport(ActionMapping mapping,
            ActionForm form,
            HttpServletRequest request,
            HttpServletResponse response) throws Exception {
      ImportBean importBean = (ImportBean)form;
    HttpSession session = request.getSession();

      log.debug(importBean.getImportfile().getFileName());
      PoiManager result = new PoiManager();
      result.excelData(importBean.getImportfile(),(String)session.getAttribute(Constants.SESSION_UNIT_ID));
        return mapping.findForward("impSuccess");
    }
View Full Code Here

    ArrayList<ImportBean> resultdata = new ArrayList<ImportBean>();
   
    for (int i=0 ; i < _data.length; i++)
    {
      String[] spStr = _data[i].split("┘");
      ImportBean importBean = new ImportBean();
      importBean.setSubsystem(spStr[0].trim());
      importBean.setCategory(spStr[1].trim());
      importBean.setItem(spStr[2].trim());
      importBean.setFail_mode(spStr[3].trim());
      importBean.setFailure_distribution(spStr[4].trim());
      importBean.setFparam1(Float.valueOf(spStr[5].trim()).floatValue());
      importBean.setFparam2(Float.valueOf(spStr[6].trim()).floatValue());
      importBean.setFparam3(Float.valueOf(spStr[7].trim()).floatValue());
      //importBean.setFparam3(row.getCell(7));
      importBean.setRparam1(Float.valueOf(spStr[8].trim()).floatValue());
      importBean.setRparam2(Float.valueOf(spStr[9].trim()).floatValue());
      importBean.setRparam3(Float.valueOf(spStr[10].trim()).floatValue());
      importBean.setFailure(Float.valueOf(spStr[11].trim()).floatValue());
      importBean.setRepair(Float.valueOf(spStr[12].trim()).floatValue());
      importBean.setConnection(Integer.parseInt(spStr[13].trim()));
      importBean.setUserID(pro_id);
      resultdata.add(rowSize, importBean);
      rowSize++;
    }
   
    System.out.println(resultdata.size());
View Full Code Here

   
    return this.importData(resultdata);
  }
 
  public int importData (ArrayList<ImportBean> result) throws Exception{
    ImportBean importBean = new ImportBean();
    GregorianCalendar calender = new GregorianCalendar();
    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
    String dateTime = dateFormat.format(calender.getTime());
    //System.out.println(result.size());   
    int prouid = (Integer) sqlMap.queryForObject("Import.getPK", importBean);
View Full Code Here

TOP

Related Classes of com.ordobill.webapp.beans.ImportBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.