Search in sources :

Example 56 with PerspectiveVO

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

the class PerspectiveSaveOrUpdateAction method update.

private void update() throws ControllerException, AuthorityException, ServiceException, Exception {
    this.checkFields();
    PerspectiveVO perspective = new PerspectiveVO();
    this.transformFields2ValueObject(perspective, new String[] { "oid", "name", "weight", "target", "min", "description" });
    DefaultResult<PerspectiveVO> result = this.perspectiveLogicService.update(perspective, this.getFields().get("visionOid"));
    this.message = result.getSystemMessage().getValue();
    if (result.getValue() != null) {
        this.success = IS_YES;
    }
}
Also used : PerspectiveVO(com.netsteadfast.greenstep.vo.PerspectiveVO)

Example 57 with PerspectiveVO

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

the class PerspectiveSaveOrUpdateAction method delete.

private void delete() throws ControllerException, AuthorityException, ServiceException, Exception {
    PerspectiveVO perspective = new PerspectiveVO();
    this.transformFields2ValueObject(perspective, new String[] { "oid" });
    DefaultResult<Boolean> result = this.perspectiveLogicService.delete(perspective);
    this.message = result.getSystemMessage().getValue();
    if (result.getValue() != null && result.getValue()) {
        this.success = IS_YES;
    }
}
Also used : PerspectiveVO(com.netsteadfast.greenstep.vo.PerspectiveVO)

Example 58 with PerspectiveVO

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

the class RegionMapRelationKpisAction method fillRelationKpis.

private void fillRelationKpis(BscStructTreeObj treeObj) throws Exception {
    List<VisionVO> visions = treeObj.getVisions();
    for (VisionVO vision : visions) {
        for (PerspectiveVO perspective : vision.getPerspectives()) {
            for (ObjectiveVO objective : perspective.getObjectives()) {
                for (KpiVO kpi : objective.getKpis()) {
                    boolean isFound = false;
                    for (Map<String, Object> founds : this.relationKpis) {
                        if (kpi.getId().equals(founds.get("id"))) {
                            isFound = true;
                        }
                    }
                    if (isFound) {
                        continue;
                    }
                    Map<String, Object> paramMap = new HashMap<String, Object>();
                    paramMap.put("id", kpi.getId());
                    paramMap.put("name", kpi.getName());
                    paramMap.put("score", NumberUtils.toFloat(BscReportSupportUtils.parse2(kpi.getScore())));
                    paramMap.put("bgColor", kpi.getBgColor());
                    paramMap.put("fontColor", kpi.getFontColor());
                    paramMap.put("target", kpi.getTarget());
                    paramMap.put("min", kpi.getMin());
                    this.relationKpis.add(paramMap);
                }
            }
        }
    }
}
Also used : ObjectiveVO(com.netsteadfast.greenstep.vo.ObjectiveVO) HashMap(java.util.HashMap) KpiVO(com.netsteadfast.greenstep.vo.KpiVO) 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