use of com.netsteadfast.greenstep.vo.RoleVO in project bamboobsc by billchen198318.
the class RoleSaveOrUpdateAction method update.
/**
* 更新 TB_ROLE 資料
*
* @throws ControllerException
* @throws AuthorityException
* @throws ServiceException
* @throws Exception
*/
private void update() throws ControllerException, AuthorityException, ServiceException, Exception {
this.checkFields();
RoleVO role = new RoleVO();
this.transformFields2ValueObject(role, new String[] { "oid", "role", "description" });
DefaultResult<RoleVO> result = this.roleLogicService.update(role);
this.message = result.getSystemMessage().getValue();
if (result.getValue() == null) {
return;
}
this.success = IS_YES;
}
use of com.netsteadfast.greenstep.vo.RoleVO in project bamboobsc by billchen198318.
the class ReportRoleViewManagementAction method loadAppendDatas.
private void loadAppendDatas() throws ServiceException, Exception {
if (super.isNoSelectId(this.getFields().get("oid"))) {
return;
}
RoleVO role = new RoleVO();
role.setOid(this.getFields().get("oid"));
DefaultResult<RoleVO> result = this.roleService.findObjectByOid(role);
if (result.getValue() == null) {
throw new ServiceException(result.getSystemMessage().getValue());
}
role = result.getValue();
List<String> emplOids = this.employeeService.findForAppendEmployeeOidsByReportRoleViewEmpl(role.getRole());
List<String> orgaOids = this.organizationService.findForAppendOrganizationOidsByReportRoleViewOrga(role.getRole());
List<String> emplNames = this.employeeService.findForAppendNames(emplOids);
List<String> orgaNames = this.organizationService.findForAppendNames(orgaOids);
StringBuilder sb = new StringBuilder();
for (int i = 0; emplOids != null && i < emplOids.size(); i++) {
sb.append(emplOids.get(i)).append(Constants.ID_DELIMITER);
}
this.getFields().put("appendEmplOids", sb.toString());
sb.setLength(0);
for (int i = 0; emplNames != null && i < emplNames.size(); i++) {
sb.append(emplNames.get(i)).append(Constants.ID_DELIMITER);
}
this.getFields().put("appendEmplNames", sb.toString());
sb.setLength(0);
for (int i = 0; orgaOids != null && i < orgaOids.size(); i++) {
sb.append(orgaOids.get(i)).append(Constants.ID_DELIMITER);
}
this.getFields().put("appendOrgaOids", sb.toString());
sb.setLength(0);
for (int i = 0; orgaNames != null && i < orgaNames.size(); i++) {
sb.append(orgaNames.get(i)).append(Constants.ID_DELIMITER);
}
this.getFields().put("appendOrgaNames", sb.toString());
}
Aggregations