use of com.netsteadfast.greenstep.vo.EmployeeVO in project bamboobsc by billchen198318.
the class PersonalReportPdfCommand method createHead.
private void createHead(PdfPTable table, VisionVO vision, Context context) throws Exception {
String bgColor = "#F2F2F2";
String fnColor = "#000000";
PdfPCell cell = new PdfPCell();
cell.addElement(new Phrase("Personal Balance SourceCard", this.getFont(fnColor, true)));
this.setCellBackgroundColor(cell, bgColor);
cell.setColspan(MAX_COLSPAN);
table.addCell(cell);
cell = new PdfPCell();
cell.addElement(new Phrase(vision.getTitle(), this.getFont(fnColor, true)));
this.setCellBackgroundColor(cell, bgColor);
cell.setColspan(MAX_COLSPAN);
table.addCell(cell);
String dateType = (String) context.get("dateType");
String year = (String) context.get("startYearDate");
String empId = (String) context.get("empId");
String account = (String) context.get("account");
String fullName = "";
String jobTitle = "";
String departmentName = "";
String dateTypeName = "Year";
if ("1".equals(dateType)) {
dateTypeName = "In the first half";
}
if ("2".equals(dateType)) {
dateTypeName = "In the second half";
}
EmployeeVO employee = new EmployeeVO();
employee.setEmpId(empId);
employee.setAccount(account);
DefaultResult<EmployeeVO> result = this.employeeService.findByUK(employee);
if (result.getValue() != null) {
fullName = result.getValue().getEmpId() + " - " + result.getValue().getFullName();
jobTitle = result.getValue().getEmpId() + " - " + result.getValue().getFullName();
List<String> appendIds = this.organizationService.findForAppendOrganizationOids(result.getValue().getEmpId());
List<String> appendNames = this.organizationService.findForAppendNames(appendIds);
StringBuilder sb = new StringBuilder();
for (int i = 0; appendNames != null && i < appendNames.size(); i++) {
sb.append(appendNames.get(i)).append(Constants.ID_DELIMITER);
}
departmentName = sb.toString();
}
cell = new PdfPCell();
cell.addElement(new Phrase("Job Title", this.getFont(fnColor, true)));
this.setCellBackgroundColor(cell, bgColor);
cell.setColspan(1);
table.addCell(cell);
cell = new PdfPCell();
cell.addElement(new Phrase(jobTitle, this.getFont(fnColor, true)));
this.setCellBackgroundColor(cell, bgColor);
cell.setColspan(1);
table.addCell(cell);
cell = new PdfPCell();
cell.addElement(new Phrase("Department", this.getFont(fnColor, true)));
this.setCellBackgroundColor(cell, bgColor);
cell.setColspan(1);
table.addCell(cell);
cell = new PdfPCell();
cell.addElement(new Phrase(departmentName, this.getFont(fnColor, true)));
this.setCellBackgroundColor(cell, bgColor);
cell.setColspan(1);
table.addCell(cell);
cell = new PdfPCell();
cell.addElement(new Phrase("name: " + fullName, this.getFont(fnColor, true)));
this.setCellBackgroundColor(cell, bgColor);
cell.setColspan(1);
table.addCell(cell);
cell = new PdfPCell();
cell.addElement(new Phrase("Annual assessment: " + year, this.getFont(fnColor, true)));
this.setCellBackgroundColor(cell, bgColor);
cell.setColspan(1);
table.addCell(cell);
cell = new PdfPCell();
cell.addElement(new Phrase(BscReportPropertyUtils.getObjectiveTitle(), this.getFont(fnColor, true)));
this.setCellBackgroundColor(cell, bgColor);
cell.setColspan(1);
cell.setRowspan(2);
table.addCell(cell);
cell = new PdfPCell();
cell.addElement(new Phrase(BscReportPropertyUtils.getKpiTitle(), this.getFont(fnColor, true)));
this.setCellBackgroundColor(cell, bgColor);
cell.setColspan(1);
cell.setRowspan(2);
table.addCell(cell);
cell = new PdfPCell();
cell.addElement(new Phrase("Maximum\nTarget\nMinimum", this.getFont(fnColor, true)));
this.setCellBackgroundColor(cell, bgColor);
cell.setColspan(1);
cell.setRowspan(2);
table.addCell(cell);
cell = new PdfPCell();
cell.addElement(new Phrase("Weight", this.getFont(fnColor, true)));
this.setCellBackgroundColor(cell, bgColor);
cell.setColspan(1);
cell.setRowspan(2);
table.addCell(cell);
cell = new PdfPCell();
cell.addElement(new Phrase("Formula", this.getFont(fnColor, true)));
this.setCellBackgroundColor(cell, bgColor);
cell.setColspan(1);
cell.setRowspan(2);
table.addCell(cell);
cell = new PdfPCell();
cell.addElement(new Phrase("Score", this.getFont(fnColor, true)));
this.setCellBackgroundColor(cell, bgColor);
cell.setColspan(1);
cell.setRowspan(1);
table.addCell(cell);
cell = new PdfPCell();
cell.addElement(new Phrase(dateTypeName, this.getFont(fnColor, true)));
this.setCellBackgroundColor(cell, bgColor);
cell.setColspan(1);
cell.setRowspan(1);
table.addCell(cell);
}
use of com.netsteadfast.greenstep.vo.EmployeeVO in project bamboobsc by billchen198318.
the class CommonOrgChartAction method createOrgChartDataForEmployee2.
private void createOrgChartDataForEmployee2() throws ControllerException, AuthorityException, ServiceException, Exception {
EmployeeVO employee = new EmployeeVO();
employee = this.transformFields2ValueObject(employee, "oid");
DefaultResult<Map<String, Object>> result = this.employeeLogicService.getOrgChartData(ApplicationSiteUtils.getBasePath(Constants.getMainSystem(), this.getHttpServletRequest()), employee);
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.EmployeeVO in project bamboobsc by billchen198318.
the class EmployeeSaveOrUpdateAction method save.
private void save() throws ControllerException, AuthorityException, ServiceException, Exception {
this.checkFields();
EmployeeVO employee = new EmployeeVO();
this.transformFields2ValueObject(employee, new String[] { "account", "password", "empId", "fullName", "jobTitle" });
DefaultResult<EmployeeVO> result = this.employeeLogicService.create(employee, this.transformAppendIds2List(this.getFields().get("appendId")));
this.message = result.getSystemMessage().getValue();
if (result.getValue() != null) {
this.success = IS_YES;
}
}
use of com.netsteadfast.greenstep.vo.EmployeeVO in project bamboobsc by billchen198318.
the class EmployeeSaveOrUpdateAction method delete.
private void delete() throws ControllerException, AuthorityException, ServiceException, Exception {
EmployeeVO employee = new EmployeeVO();
this.transformFields2ValueObject(employee, new String[] { "oid" });
DefaultResult<Boolean> result = this.employeeLogicService.delete(employee);
this.message = result.getSystemMessage().getValue();
if (result.getValue() != null && result.getValue()) {
this.success = IS_YES;
}
}
use of com.netsteadfast.greenstep.vo.EmployeeVO in project bamboobsc by billchen198318.
the class KpiLogicServiceImpl method createKpiEmployee.
private void createKpiEmployee(KpiVO kpi, List<String> employeeOids) throws ServiceException, Exception {
if (kpi == null || employeeOids == null || employeeOids.size() < 1) {
return;
}
for (String oid : employeeOids) {
EmployeeVO employee = this.findEmployeeData(oid);
KpiEmplVO kpiEmpl = new KpiEmplVO();
kpiEmpl.setKpiId(kpi.getId());
kpiEmpl.setEmpId(employee.getEmpId());
this.kpiEmplService.saveObject(kpiEmpl);
}
}
Aggregations