use of com.netsteadfast.greenstep.vo.OrganizationVO in project bamboobsc by billchen198318.
the class CommonOrgChartAction method createOrgChartDataForOrganization2.
private void createOrgChartDataForOrganization2() throws ControllerException, AuthorityException, ServiceException, Exception {
OrganizationVO organization = new OrganizationVO();
organization = this.transformFields2ValueObject(organization, "oid");
DefaultResult<Map<String, Object>> result = this.organizationLogicService.getOrgChartData(ApplicationSiteUtils.getBasePath(Constants.getMainSystem(), this.getHttpServletRequest()), organization);
this.rootData = result.getValue();
this.message = result.getSystemMessage().getValue();
if (this.rootData != null && this.rootData.size() > 0) {
this.success = IS_YES;
}
}
use of com.netsteadfast.greenstep.vo.OrganizationVO in project bamboobsc by billchen198318.
the class MeasureDataCalendarUtils method findOrganization.
private static OrganizationVO findOrganization(String orgOid) throws ServiceException, Exception {
OrganizationVO organization = new OrganizationVO();
organization.setOid(orgOid);
DefaultResult<OrganizationVO> result = organizationService.findObjectByOid(organization);
if (result.getValue() == null) {
throw new ServiceException(result.getSystemMessage().getValue());
}
organization = result.getValue();
return organization;
}
use of com.netsteadfast.greenstep.vo.OrganizationVO in project bamboobsc by billchen198318.
the class MeasureDataCalendarUtils method getParameter.
private static Map<String, Object> getParameter(KpiVO kpi, FormulaVO formula, String date, String frequency, String dataFor, String orgaOid, String emplOid) throws ServiceException, Exception {
Map<String, Object> parameter = new HashMap<String, Object>();
parameter.put("date", date);
parameter.put("frequency", frequency);
parameter.put("dataFor", dataFor);
parameter.put("kpi", kpi);
parameter.put("formula", formula);
parameter.put("managementName", BscKpiCode.getManagementMap(false).get(kpi.getManagement()));
//parameter.put("calculationName", BscKpiCode.getCalculationMap(false).get(kpi.getCal()) );
parameter.put("calculationName", AggregationMethodUtils.getNameByAggrId(kpi.getCal()));
parameter.put("orgId", BscConstants.MEASURE_DATA_ORGANIZATION_FULL);
parameter.put("empId", BscConstants.MEASURE_DATA_EMPLOYEE_FULL);
if (BscConstants.MEASURE_DATA_FOR_ORGANIZATION.equals(dataFor)) {
OrganizationVO organization = findOrganization(orgaOid);
parameter.put("orgId", organization.getOrgId());
}
if (BscConstants.MEASURE_DATA_FOR_EMPLOYEE.equals(dataFor)) {
EmployeeVO employee = findEmployee(emplOid);
parameter.put("empId", employee.getEmpId());
}
parameter.put("masureDatas", findMeasureData(kpi, date, frequency, dataFor, (String) parameter.get("orgId"), (String) parameter.get("empId")));
return parameter;
}
use of com.netsteadfast.greenstep.vo.OrganizationVO in project bamboobsc by billchen198318.
the class PerformanceScoreChainUtils method createOrUpdateMonitorItemScoreCurrentDateForOrganizations.
public static void createOrUpdateMonitorItemScoreCurrentDateForOrganizations(String frequency) throws ServiceException, Exception {
Map<String, String> organizationMap = organizationService.findForMap(false);
if (null == organizationMap || organizationMap.size() < 1) {
return;
}
Map<String, Object> paramMap = new HashMap<String, Object>();
for (Map.Entry<String, String> org : organizationMap.entrySet()) {
OrganizationVO organization = BscBaseLogicServiceCommonSupport.findOrganizationData(organizationService, org.getKey());
paramMap.put("orgId", organization.getOrgId());
if (kpiOrgaService.countByParams(paramMap) < 1) {
continue;
}
try {
createOrUpdateMonitorItemScoreCurrentDate(frequency, "organization", organization.getOid(), "");
} catch (Exception e) {
e.printStackTrace();
}
}
}
use of com.netsteadfast.greenstep.vo.OrganizationVO in project bamboobsc by billchen198318.
the class PerformanceScoreChainUtils method getContext.
public static Context getContext(String visionOid, String startDate, String endDate, String startYearDate, String endYearDate, String frequency, String dataFor, String measureDataOrganizationOid, String measureDataEmployeeOid) throws ServiceException, Exception {
Context context = new ContextBase();
context.put("visionOid", visionOid);
context.put("startDate", startDate);
context.put("endDate", endDate);
context.put("startYearDate", startYearDate);
context.put("endYearDate", endYearDate);
context.put("frequency", frequency);
context.put("dataFor", dataFor);
context.put("orgId", BscConstants.MEASURE_DATA_ORGANIZATION_FULL);
context.put("empId", BscConstants.MEASURE_DATA_EMPLOYEE_FULL);
context.put("account", "");
if (!Constants.HTML_SELECT_NO_SELECT_ID.equals(measureDataOrganizationOid) && !StringUtils.isBlank(measureDataOrganizationOid)) {
OrganizationVO organization = new OrganizationVO();
organization.setOid(measureDataOrganizationOid);
DefaultResult<OrganizationVO> result = organizationService.findObjectByOid(organization);
if (result.getValue() == null) {
throw new ServiceException(result.getSystemMessage().getValue());
}
organization = result.getValue();
context.put("orgId", organization.getOrgId());
}
if (!Constants.HTML_SELECT_NO_SELECT_ID.equals(measureDataEmployeeOid) && !StringUtils.isBlank(measureDataEmployeeOid)) {
EmployeeVO employee = new EmployeeVO();
employee.setOid(measureDataEmployeeOid);
DefaultResult<EmployeeVO> result = employeeService.findObjectByOid(employee);
if (result.getValue() == null) {
throw new ServiceException(result.getSystemMessage().getValue());
}
employee = result.getValue();
context.put("empId", employee.getEmpId());
context.put("account", employee.getAccount());
}
return context;
}
Aggregations