Search in sources :

Example 6 with DegreeFeedbackProjectVO

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();
}
Also used : DegreeFeedbackProjectVO(com.netsteadfast.greenstep.vo.DegreeFeedbackProjectVO)

Example 7 with DegreeFeedbackProjectVO

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;
    }
}
Also used : DegreeFeedbackProjectVO(com.netsteadfast.greenstep.vo.DegreeFeedbackProjectVO)

Example 8 with DegreeFeedbackProjectVO

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;
}
Also used : HashMap(java.util.HashMap) EmployeeVO(com.netsteadfast.greenstep.vo.EmployeeVO) ServiceException(com.netsteadfast.greenstep.base.exception.ServiceException) DegreeFeedbackItemVO(com.netsteadfast.greenstep.vo.DegreeFeedbackItemVO) BbDegreeFeedbackLevel(com.netsteadfast.greenstep.po.hbm.BbDegreeFeedbackLevel) DegreeFeedbackProjectVO(com.netsteadfast.greenstep.vo.DegreeFeedbackProjectVO)

Example 9 with DegreeFeedbackProjectVO

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;
    }
}
Also used : DegreeFeedbackProjectVO(com.netsteadfast.greenstep.vo.DegreeFeedbackProjectVO)

Aggregations

DegreeFeedbackProjectVO (com.netsteadfast.greenstep.vo.DegreeFeedbackProjectVO)9 ServiceException (com.netsteadfast.greenstep.base.exception.ServiceException)4 ServiceMethodAuthority (com.netsteadfast.greenstep.base.model.ServiceMethodAuthority)3 Transactional (org.springframework.transaction.annotation.Transactional)3 DefaultResult (com.netsteadfast.greenstep.base.model.DefaultResult)2 SystemMessage (com.netsteadfast.greenstep.base.model.SystemMessage)2 BusinessProcessManagementTaskVO (com.netsteadfast.greenstep.vo.BusinessProcessManagementTaskVO)2 HashMap (java.util.HashMap)2 BbDegreeFeedbackLevel (com.netsteadfast.greenstep.po.hbm.BbDegreeFeedbackLevel)1 BbDegreeFeedbackProject (com.netsteadfast.greenstep.po.hbm.BbDegreeFeedbackProject)1 BbEmployee (com.netsteadfast.greenstep.po.hbm.BbEmployee)1 DegreeFeedbackAssignVO (com.netsteadfast.greenstep.vo.DegreeFeedbackAssignVO)1 DegreeFeedbackItemVO (com.netsteadfast.greenstep.vo.DegreeFeedbackItemVO)1 DegreeFeedbackScoreVO (com.netsteadfast.greenstep.vo.DegreeFeedbackScoreVO)1 EmployeeVO (com.netsteadfast.greenstep.vo.EmployeeVO)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1