use of com.netsteadfast.greenstep.vo.EmployeeVO in project bamboobsc by billchen198318.
the class MeasureDataCalendarUtils method findEmployee.
/*
private static FormulaVO findFormula(String forId) throws ServiceException, Exception {
FormulaVO formula = new FormulaVO();
formula.setForId(forId);
DefaultResult<FormulaVO> result = formulaService.findByUK(formula);
if (result.getValue()==null) {
throw new ServiceException( result.getSystemMessage().getValue() );
}
formula = result.getValue();
return formula;
}
*/
private static EmployeeVO findEmployee(String empOid) throws ServiceException, Exception {
EmployeeVO employee = new EmployeeVO();
employee.setOid(empOid);
DefaultResult<EmployeeVO> result = employeeService.findObjectByOid(employee);
if (result.getValue() == null) {
throw new ServiceException(result.getSystemMessage().getValue());
}
employee = result.getValue();
return employee;
}
use of com.netsteadfast.greenstep.vo.EmployeeVO in project bamboobsc by billchen198318.
the class KpiReportExcelCommand method fillHeadContent.
private void fillHeadContent(Context context, Map<String, Object> parameter) throws ServiceException, Exception {
String headContent = "";
String orgId = (String) context.get("orgId");
String empId = (String) context.get("empId");
String account = (String) context.get("account");
if (!BscConstants.MEASURE_DATA_ORGANIZATION_FULL.equals(orgId) && !StringUtils.isBlank(orgId)) {
OrganizationVO organization = new OrganizationVO();
organization.setOrgId(orgId);
DefaultResult<OrganizationVO> result = this.organizationService.findByUK(organization);
if (result.getValue() != null) {
organization = result.getValue();
headContent += "\nMeasure data for: " + organization.getOrgId() + " - " + organization.getName();
}
}
if (!BscConstants.MEASURE_DATA_EMPLOYEE_FULL.equals(empId) && !StringUtils.isBlank(empId) && !StringUtils.isBlank(account)) {
EmployeeVO employee = new EmployeeVO();
employee.setEmpId(empId);
employee.setAccount(account);
DefaultResult<EmployeeVO> result = this.employeeService.findByUK(employee);
if (result.getValue() != null) {
employee = result.getValue();
headContent += "\nMeasure data for: " + employee.getEmpId() + " - " + employee.getFullName();
if (!StringUtils.isBlank(employee.getJobTitle())) {
headContent += " ( " + employee.getJobTitle() + " ) ";
}
}
}
parameter.put("headContent", headContent);
}
use of com.netsteadfast.greenstep.vo.EmployeeVO in project bamboobsc by billchen198318.
the class KpiReportPdfCommand method fillHeadContent.
private void fillHeadContent(Context context, Map<String, Object> parameter) throws ServiceException, Exception {
String headContent = "";
String orgId = (String) context.get("orgId");
String empId = (String) context.get("empId");
String account = (String) context.get("account");
if (!BscConstants.MEASURE_DATA_ORGANIZATION_FULL.equals(orgId) && !StringUtils.isBlank(orgId)) {
OrganizationVO organization = new OrganizationVO();
organization.setOrgId(orgId);
DefaultResult<OrganizationVO> result = this.organizationService.findByUK(organization);
if (result.getValue() != null) {
organization = result.getValue();
headContent += "\nMeasure data for: " + organization.getOrgId() + " - " + organization.getName();
}
}
if (!BscConstants.MEASURE_DATA_EMPLOYEE_FULL.equals(empId) && !StringUtils.isBlank(empId) && !StringUtils.isBlank(account)) {
EmployeeVO employee = new EmployeeVO();
employee.setEmpId(empId);
employee.setAccount(account);
DefaultResult<EmployeeVO> result = this.employeeService.findByUK(employee);
if (result.getValue() != null) {
employee = result.getValue();
headContent += "\nMeasure data for: " + employee.getEmpId() + " - " + employee.getFullName();
if (!StringUtils.isBlank(employee.getJobTitle())) {
headContent += " ( " + employee.getJobTitle() + " ) ";
}
}
}
parameter.put("headContent", headContent);
}
use of com.netsteadfast.greenstep.vo.EmployeeVO in project bamboobsc by billchen198318.
the class LoadPdcaDataCommand method execute.
@SuppressWarnings("unchecked")
@Override
public boolean execute(Context context) throws Exception {
pdcaService = (IPdcaService<PdcaVO, BbPdca, String>) AppContext.getBean("bsc.service.PdcaService");
pdcaDocService = (IPdcaDocService<PdcaDocVO, BbPdcaDoc, String>) AppContext.getBean("bsc.service.PdcaDocService");
pdcaItemService = (IPdcaItemService<PdcaItemVO, BbPdcaItem, String>) AppContext.getBean("bsc.service.PdcaItemService");
pdcaItemDocService = (IPdcaItemDocService<PdcaItemDocVO, BbPdcaItemDoc, String>) AppContext.getBean("bsc.service.PdcaItemDocService");
pdcaAuditService = (IPdcaAuditService<PdcaAuditVO, BbPdcaAudit, String>) AppContext.getBean("bsc.service.PdcaAuditService");
employeeService = (IEmployeeService<EmployeeVO, BbEmployee, String>) AppContext.getBean("bsc.service.EmployeeService");
organizationService = (IOrganizationService<OrganizationVO, BbOrganization, String>) AppContext.getBean("bsc.service.OrganizationService");
kpiService = (IKpiService<KpiVO, BbKpi, String>) AppContext.getBean("bsc.service.KpiService");
String pdcaOid = (String) context.get("pdcaOid");
PdcaVO pdca = new PdcaVO();
pdca.setOid(pdcaOid);
DefaultResult<PdcaVO> result = pdcaService.findObjectByOid(pdca);
if (result.getValue() == null) {
this.setMessage(context, result.getSystemMessage().getValue());
} else {
pdca = result.getValue();
this.loadDetail(pdca);
this.loadPdcaItems(pdca);
this.loadAudit(pdca);
this.setResult(context, pdca);
// Action 輸出可能會要用到
context.put("pdca", pdca);
}
return false;
}
use of com.netsteadfast.greenstep.vo.EmployeeVO in project bamboobsc by billchen198318.
the class BscBaseLogicServiceCommonSupport method findEmployeeData.
public static EmployeeVO findEmployeeData(IEmployeeService<EmployeeVO, BbEmployee, String> service, String oid) throws ServiceException, Exception {
if (StringUtils.isBlank(oid)) {
throw new ServiceException(SysMessageUtil.get(GreenStepSysMsgConstants.PARAMS_BLANK));
}
EmployeeVO employee = new EmployeeVO();
employee.setOid(oid);
DefaultResult<EmployeeVO> empResult = service.findObjectByOid(employee);
if (empResult.getValue() == null) {
throw new ServiceException(empResult.getSystemMessage().getValue());
}
employee = empResult.getValue();
return employee;
}
Aggregations