Search in sources :

Example 31 with PerspectiveVO

use of com.netsteadfast.greenstep.vo.PerspectiveVO in project bamboobsc by billchen198318.

the class RegionMapRelationKpisAction method fillCharts.

private void fillCharts(BscStructTreeObj treeObj) throws Exception {
    List<VisionVO> visions = treeObj.getVisions();
    for (VisionVO vision : visions) {
        List<String> names = new LinkedList<String>();
        List<Float> values = new LinkedList<Float>();
        List<String> colors = new LinkedList<String>();
        for (PerspectiveVO perspective : vision.getPerspectives()) {
            names.add(perspective.getName() + "(" + BscReportSupportUtils.parse2(perspective.getScore()) + ")");
            values.add(perspective.getScore());
            colors.add(perspective.getBgColor());
        }
        this.barUploadOids.add(JFreeChartDataMapperUtils.createBarData(vision.getTitle(), "Score", "", names, values, colors, 480, 280, false));
        this.pieUploadOids.add(JFreeChartDataMapperUtils.createPieData(vision.getTitle(), names, values, colors, 480, 280));
    }
}
Also used : PerspectiveVO(com.netsteadfast.greenstep.vo.PerspectiveVO) VisionVO(com.netsteadfast.greenstep.vo.VisionVO) LinkedList(java.util.LinkedList)

Example 32 with PerspectiveVO

use of com.netsteadfast.greenstep.vo.PerspectiveVO in project bamboobsc by billchen198318.

the class PerspectiveManagementAction method loadPerspectiveData.

private void loadPerspectiveData() throws ServiceException, Exception {
    this.transformFields2ValueObject(this.perspective, new String[] { "oid" });
    DefaultResult<PerspectiveVO> result = this.perspectiveService.findObjectByOid(this.perspective);
    if (result.getValue() == null) {
        throw new ServiceException(result.getSystemMessage().getValue());
    }
    this.perspective = result.getValue();
    this.getFields().put("visionSelectValue", Constants.HTML_SELECT_NO_SELECT_ID);
    VisionVO vision = new VisionVO();
    vision.setVisId(this.perspective.getVisId());
    DefaultResult<VisionVO> vResult = this.visionService.findForSimpleByVisId(vision.getVisId());
    if (vResult.getValue() != null) {
        this.getFields().put("visionSelectValue", vResult.getValue().getOid());
    }
}
Also used : ServiceException(com.netsteadfast.greenstep.base.exception.ServiceException) PerspectiveVO(com.netsteadfast.greenstep.vo.PerspectiveVO) VisionVO(com.netsteadfast.greenstep.vo.VisionVO)

Example 33 with PerspectiveVO

use of com.netsteadfast.greenstep.vo.PerspectiveVO in project bamboobsc by billchen198318.

the class StrategyMapManagementAction method loadObjectiveItem.

private void loadObjectiveItem() throws ControllerException, ServiceException, Exception {
    // 這裡的 fields.oid 放的是 BB_OBJECTIVE.OBJ_ID
    String objId = super.defaultString(super.getFields().get("oid")).trim();
    if (StringUtils.isBlank(objId)) {
        throw new ControllerException(SysMessageUtil.get(GreenStepSysMsgConstants.PARAMS_BLANK));
    }
    this.objective = new ObjectiveVO();
    this.objective.setObjId(objId);
    DefaultResult<ObjectiveVO> result = this.objectiveService.findByUK(this.objective);
    if (result.getValue() == null) {
        throw new ServiceException(result.getSystemMessage().getValue());
    }
    this.objective = result.getValue();
    PerspectiveVO perspective = new PerspectiveVO();
    perspective.setPerId(this.objective.getPerId());
    DefaultResult<PerspectiveVO> pResult = this.perspectiveService.findByUK(perspective);
    if (pResult.getValue() == null) {
        throw new ServiceException(pResult.getSystemMessage().getValue());
    }
    perspective = pResult.getValue();
    DefaultResult<VisionVO> vResult = this.visionService.findForSimpleByVisId(perspective.getVisId());
    if (vResult.getValue() == null) {
        throw new ServiceException(vResult.getSystemMessage().getValue());
    }
    VisionVO vision = vResult.getValue();
    this.visionOid = vision.getOid();
}
Also used : ControllerException(com.netsteadfast.greenstep.base.exception.ControllerException) ServiceException(com.netsteadfast.greenstep.base.exception.ServiceException) ObjectiveVO(com.netsteadfast.greenstep.vo.ObjectiveVO) PerspectiveVO(com.netsteadfast.greenstep.vo.PerspectiveVO) VisionVO(com.netsteadfast.greenstep.vo.VisionVO)

Example 34 with PerspectiveVO

use of com.netsteadfast.greenstep.vo.PerspectiveVO in project bamboobsc by billchen198318.

the class ScorecardQueryContentAction method loadPerspectiveCardContent.

private void loadPerspectiveCardContent() throws ServiceException, Exception {
    StringBuilder outContent = new StringBuilder();
    this.message = SysMessageUtil.get(GreenStepSysMsgConstants.SEARCH_NO_DATA);
    String uploadOid = this.getFields().get("uploadOid");
    VisionVO vision = BscMobileCardUtils.getVisionCardFromUpload(uploadOid);
    this.rootVision = vision;
    List<PerspectiveVO> perspectives = vision.getPerspectives();
    for (PerspectiveVO perspective : perspectives) {
        outContent.append(BscMobileCardUtils.getPerspectivesCardContent(uploadOid, perspective));
        outContent.append(super.getHtmlBr());
    }
    this.content = outContent.toString();
    if (!StringUtils.isBlank(content)) {
        this.loadColor();
        this.message = this.getText("MESSAGE.ScorecardQueryContentAction_06");
        this.success = IS_YES;
    }
}
Also used : PerspectiveVO(com.netsteadfast.greenstep.vo.PerspectiveVO) VisionVO(com.netsteadfast.greenstep.vo.VisionVO)

Example 35 with PerspectiveVO

use of com.netsteadfast.greenstep.vo.PerspectiveVO in project bamboobsc by billchen198318.

the class ScorecardQueryContentAction method loadObjectiveCardContent.

private void loadObjectiveCardContent() throws ServiceException, Exception {
    StringBuilder outContent = new StringBuilder();
    this.message = SysMessageUtil.get(GreenStepSysMsgConstants.SEARCH_NO_DATA);
    String uploadOid = this.getFields().get("uploadOid");
    String perspectiveOid = super.defaultString(this.getFields().get("perspectiveOid"));
    VisionVO vision = BscMobileCardUtils.getVisionCardFromUpload(uploadOid);
    List<PerspectiveVO> perspectives = vision.getPerspectives();
    for (PerspectiveVO perspective : perspectives) {
        if (perspectiveOid.equals(perspective.getOid())) {
            this.rootPerspective = perspective;
            List<ObjectiveVO> objectives = perspective.getObjectives();
            for (ObjectiveVO objective : objectives) {
                outContent.append(BscMobileCardUtils.getObjectivesCardContent(uploadOid, objective));
                outContent.append(super.getHtmlBr());
            }
        }
    }
    this.content = outContent.toString();
    if (!StringUtils.isBlank(content)) {
        this.loadColor();
        this.message = this.getText("MESSAGE.ScorecardQueryContentAction_06");
        this.success = IS_YES;
    }
}
Also used : ObjectiveVO(com.netsteadfast.greenstep.vo.ObjectiveVO) PerspectiveVO(com.netsteadfast.greenstep.vo.PerspectiveVO) VisionVO(com.netsteadfast.greenstep.vo.VisionVO)

Aggregations

PerspectiveVO (com.netsteadfast.greenstep.vo.PerspectiveVO)58 ObjectiveVO (com.netsteadfast.greenstep.vo.ObjectiveVO)44 VisionVO (com.netsteadfast.greenstep.vo.VisionVO)38 KpiVO (com.netsteadfast.greenstep.vo.KpiVO)33 HashMap (java.util.HashMap)17 ServiceException (com.netsteadfast.greenstep.base.exception.ServiceException)15 BscStructTreeObj (com.netsteadfast.greenstep.bsc.model.BscStructTreeObj)8 DateRangeScoreVO (com.netsteadfast.greenstep.vo.DateRangeScoreVO)8 LinkedList (java.util.LinkedList)8 Map (java.util.Map)8 ServiceMethodAuthority (com.netsteadfast.greenstep.base.model.ServiceMethodAuthority)6 ArrayList (java.util.ArrayList)6 Transactional (org.springframework.transaction.annotation.Transactional)6 Phrase (com.itextpdf.text.Phrase)4 PdfPCell (com.itextpdf.text.pdf.PdfPCell)4 ChainResultObj (com.netsteadfast.greenstep.base.model.ChainResultObj)4 Cell (org.apache.poi.ss.usermodel.Cell)4 Row (org.apache.poi.ss.usermodel.Row)4 CellRangeAddress (org.apache.poi.ss.util.CellRangeAddress)4 XSSFCellStyle (org.apache.poi.xssf.usermodel.XSSFCellStyle)4