use of com.netsteadfast.greenstep.vo.DegreeFeedbackProjectVO in project bamboobsc by billchen198318.
the class DegreeFeedbackProjectSaveOrUpdateAction method update.
private void update() throws ControllerException, AuthorityException, ServiceException, Exception {
this.checkFields();
DegreeFeedbackProjectVO project = new DegreeFeedbackProjectVO();
this.transformFields2ValueObject(project, new String[] { "oid", "name", "year", "description" });
DefaultResult<DegreeFeedbackProjectVO> result = this.degreeFeedbackLogicService.updateProject(project, this.fillItems(), this.fillLevels(), this.transformAppendIds2List(this.getFields().get("ownerOids")), this.transformAppendIds2List(this.getFields().get("raterOids")));
if (result.getValue() != null) {
this.success = IS_YES;
}
this.message = result.getSystemMessage().getValue();
}
use of com.netsteadfast.greenstep.vo.DegreeFeedbackProjectVO in project bamboobsc by billchen198318.
the class DegreeFeedbackProjectSaveOrUpdateAction method startProcess.
private void startProcess() throws ControllerException, AuthorityException, ServiceException, Exception {
DegreeFeedbackProjectVO project = new DegreeFeedbackProjectVO();
this.transformFields2ValueObject(project, new String[] { "oid" });
DefaultResult<DegreeFeedbackProjectVO> result = this.degreeFeedbackLogicService.startProcess(project);
this.message = result.getSystemMessage().getValue();
if (result.getValue() != null) {
this.success = IS_YES;
}
}
use of com.netsteadfast.greenstep.vo.DegreeFeedbackProjectVO in project bamboobsc by billchen198318.
the class DegreeFeedbackScoreCalculateUtils method getProjectScore.
public static DegreeFeedbackProjectVO getProjectScore(String projectOid, String ownerEmployeeOid) throws ServiceException, Exception {
DegreeFeedbackProjectVO project = new DegreeFeedbackProjectVO();
project.setOid(projectOid);
DefaultResult<DegreeFeedbackProjectVO> projectResult = degreeFeedbackProjectService.findObjectByOid(project);
if (projectResult.getValue() == null) {
throw new ServiceException(projectResult.getSystemMessage().getValue());
}
project = projectResult.getValue();
EmployeeVO employee = new EmployeeVO();
employee.setOid(ownerEmployeeOid);
DefaultResult<EmployeeVO> empResult = employeeService.findObjectByOid(employee);
if (empResult.getValue() == null) {
throw new ServiceException(empResult.getSystemMessage().getValue());
}
employee = empResult.getValue();
List<DegreeFeedbackItemVO> items = getItemsScore(project, employee);
if (items != null && items.size() > 0) {
project.setEmployee(employee);
project.setItems(items);
Map<String, Object> paramMap = new HashMap<String, Object>();
paramMap.put("projectOid", project.getOid());
Map<String, String> orderMap = new HashMap<String, String>();
orderMap.put("value", "asc");
List<BbDegreeFeedbackLevel> levels = degreeFeedbackLevelService.findListByParams(paramMap, null, orderMap);
project.setLevels(wrapLevels(levels));
}
return project;
}
use of com.netsteadfast.greenstep.vo.DegreeFeedbackProjectVO in project bamboobsc by billchen198318.
the class DegreeFeedbackProjectSaveOrUpdateAction method delete.
private void delete() throws ControllerException, AuthorityException, ServiceException, Exception {
DegreeFeedbackProjectVO project = new DegreeFeedbackProjectVO();
this.transformFields2ValueObject(project, new String[] { "oid" });
DefaultResult<Boolean> result = this.degreeFeedbackLogicService.deleteProject(project);
this.message = result.getSystemMessage().getValue();
if (result.getValue() != null && result.getValue()) {
this.success = IS_YES;
}
}
Aggregations