use of com.netsteadfast.greenstep.vo.PdcaKpisVO in project bamboobsc by billchen198318.
the class PdcaLogicServiceImpl method createKpis.
private void createKpis(PdcaVO pdca, List<String> kpiOids) throws ServiceException, Exception {
for (String oid : kpiOids) {
KpiVO kpi = new KpiVO();
kpi.setOid(oid);
DefaultResult<KpiVO> kpiResult = this.kpiService.findObjectByOid(kpi);
if (kpiResult.getValue() == null) {
throw new ServiceException(kpiResult.getSystemMessage().getValue());
}
kpi = kpiResult.getValue();
if (!YesNo.YES.equals(kpi.getActivate())) {
// 在打開 KPI-tree 選取時還是 ACTIVATE = 'Y' , 然後故意的去KPI修改, 把 ACTIVATE 設定為'N' , 所以要檢查是否正確
throw new ServiceException(SysMessageUtil.get(GreenStepSysMsgConstants.DATA_ERRORS));
}
PdcaKpisVO pdcaKpi = new PdcaKpisVO();
pdcaKpi.setPdcaOid(pdca.getOid());
pdcaKpi.setKpiId(kpi.getId());
this.pdcaKpisService.saveObject(pdcaKpi);
}
}
Aggregations