Package com.ordobill.webapp.beans

Examples of com.ordobill.webapp.beans.Report


        breakEconomicResulut = breakEconomicResulut/economicList.size();
       
        System.out.println("총계산 결과:"+breakEconomicResulut+"+"+economicResulut);*/
        //끝 경제성 계산
        // report 데이터 처리
        Report _Report = computeReport(sampleform,projectForm);
        int reportUid = (Integer) sqlMap.insert("Report.Insert", _Report);
        ArrayList<FigInform> figInformList;
        for (int i=0;i<figList.size();i++) {
            figInformList = new ArrayList<FigInform>();
            for (int s=0;s<sampleform.getIteration();s++) {
View Full Code Here


     * 리포트 결과값을 계산합니다
     * @param sampleform
     * @return Report
     */
    public Report computeReport(Sampleform sampleform,Project projectForm) {
        Report reportBean = new Report();
        reportBean.setProUid(projectForm.getProUid());
        reportBean.setSampleCount(sampleform.getIteration());
        reportBean.setSampleAve(sampleform.getTotAvailability());
        reportBean.setIterationArr(sampleform.getIterationArr());
        reportBean.setStepFigName(sampleform.getStepFigName());
        if (reportBean.getIterationArr() != null) {
          for (int i=0;i<reportBean.getIterationArr().length;i++) {
            reportBean.setTempiterationArr((reportBean.getTempiterationArr()+String.valueOf(reportBean.getIterationArr()[i]+"||")).trim());
            }
        }
        /*if (reportBean.getStepFigName() != null) {
          for (int i=0;i<reportBean.getStepFigName().length;i++) {
            reportBean.setTempstepFigName((reportBean.getTempstepFigName()+reportBean.getStepFigName()[i]+"||").trim());
            }
        }*/
        if (sampleform.getStepAve()[0].length > 0) {
          String TempstepFigName = "";
          for (int i=0;i<sampleform.getStepAve()[0].length;i++) {
            TempstepFigName += sampleform.getStepAve()[0][i]+";;;"+sampleform.getStepAve()[1][i]+"||";
            TempstepFigName.trim();
            }
          reportBean.setTempstepFigName(TempstepFigName);
        }
        //표준편차
        for (int i=0;i<reportBean.getIterationArr().length;i++) {
          reportBean.setVariance(reportBean.getVariance()+Math.pow(((double)(reportBean.getIterationArr()[i]*100)-sampleform.getTotAvailability()),2d));
        }
        reportBean.setVariance(reportBean.getVariance()/(sampleform.getIteration()-1));
        reportBean.setStdDeviation(Math.sqrt(reportBean.getVariance()));
        //신뢰수준 68%
        reportBean.setConfidenceLevel68st(reportBean.getSampleAve()-(reportBean.getStdDeviation()/Math.sqrt(reportBean.getSampleCount())));
        reportBean.setConfidenceLevel68ed(reportBean.getSampleAve()+(reportBean.getStdDeviation()/Math.sqrt(reportBean.getSampleCount())));
        //신뢰수준 95%
        reportBean.setConfidenceLevel95st(reportBean.getSampleAve()-1.96*(reportBean.getStdDeviation()/Math.sqrt(reportBean.getSampleCount())));
        reportBean.setConfidenceLevel95ed(reportBean.getSampleAve()+1.96*(reportBean.getStdDeviation()/Math.sqrt(reportBean.getSampleCount())));
        //신뢰수준 99%
        reportBean.setConfidenceLevel99st(reportBean.getSampleAve()-2.54*(reportBean.getStdDeviation()/Math.sqrt(reportBean.getSampleCount())));
        reportBean.setConfidenceLevel99ed(reportBean.getSampleAve()+2.54*(reportBean.getStdDeviation()/Math.sqrt(reportBean.getSampleCount())));
       
        return reportBean;
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    public ActionForward list(ActionMapping mapping,
                               ActionForm form,
                               HttpServletRequest request,
                               HttpServletResponse response) throws Exception {
      Report _Report = (Report)form;
      Report report = (Report) sqlMap.queryForObject("Report.Select", _Report) ;
     
        ArrayList result = this.computeReport(report);
       
        request.setAttribute("data", result);
        return mapping.findForward("list");
View Full Code Here

TOP

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

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.