use of com.netsteadfast.greenstep.vo.EmployeeVO in project bamboobsc by billchen198318.
the class EmployeeSaveOrUpdateAction method updateSupervisor.
private void updateSupervisor() throws ControllerException, AuthorityException, ServiceException, Exception {
EmployeeVO employee = new EmployeeVO();
this.transformFields2ValueObject(employee, new String[] { "oid" });
DefaultResult<Boolean> result = this.employeeLogicService.updateSupervisor(employee, this.getFields().get("supOid"));
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 EmployeeSaveOrUpdateAction method updatePassword.
private void updatePassword() throws ControllerException, AuthorityException, ServiceException, Exception {
this.checkFieldsForUpdatePassword();
EmployeeVO employee = new EmployeeVO();
this.transformFields2ValueObject(employee, new String[] { "oid", "password" });
DefaultResult<AccountVO> result = this.employeeLogicService.updatePassword(employee, this.getFields().get("password2"));
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 update.
private void update() throws ControllerException, AuthorityException, ServiceException, Exception {
this.checkFieldsForUpdate();
EmployeeVO employee = new EmployeeVO();
this.transformFields2ValueObject(employee, new String[] { "oid", "fullName", "jobTitle" });
DefaultResult<EmployeeVO> result = this.employeeLogicService.update(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 KpiReportContentQueryAction method getChainContext.
@SuppressWarnings("unchecked")
private Context getChainContext() throws Exception {
Context context = new ContextBase();
context.put("visionOid", this.getFields().get("visionOid"));
context.put("startDate", this.getFields().get("startDate"));
context.put("endDate", this.getFields().get("endDate"));
context.put("startYearDate", this.getFields().get("startYearDate"));
context.put("endYearDate", this.getFields().get("endYearDate"));
context.put("frequency", this.getFields().get("frequency"));
context.put("dataFor", this.getFields().get("dataFor"));
context.put("orgId", BscConstants.MEASURE_DATA_ORGANIZATION_FULL);
context.put("empId", BscConstants.MEASURE_DATA_EMPLOYEE_FULL);
context.put("account", "");
context.put("pieCanvasToData", SimpleUtils.deHex(this.defaultString(this.getFields().get("pieCanvasToData"))));
context.put("barCanvasToData", SimpleUtils.deHex(this.defaultString(this.getFields().get("barCanvasToData"))));
context.put("uploadSignatureOid", this.getFields().get("uploadSignatureOid"));
context.put("ngVer", YesNo.NO);
if ("Y".equals(this.getFields().get("ngVer"))) {
// 有 javascript click 事件 kpi-report-body-ng.ftl 版本
context.put("ngVer", YesNo.YES);
}
if (!this.isNoSelectId(this.getFields().get("measureDataOrganizationOid"))) {
OrganizationVO organization = new OrganizationVO();
organization.setOid(this.getFields().get("measureDataOrganizationOid"));
DefaultResult<OrganizationVO> result = this.organizationService.findObjectByOid(organization);
if (result.getValue() == null) {
throw new ServiceException(result.getSystemMessage().getValue());
}
organization = result.getValue();
context.put("orgId", organization.getOrgId());
}
if (!this.isNoSelectId(this.getFields().get("measureDataEmployeeOid"))) {
EmployeeVO employee = new EmployeeVO();
employee.setOid(this.getFields().get("measureDataEmployeeOid"));
DefaultResult<EmployeeVO> result = this.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());
}
this.setContextForSingleObject(context);
return context;
}
use of com.netsteadfast.greenstep.vo.EmployeeVO in project bamboobsc by billchen198318.
the class PdcaManagementAction method loadPdcaData.
private void loadPdcaData() throws ServiceException, Exception {
// ------------------------------------------------------------------------------
// PDCA main
this.loadPdcaDataSimple("oid");
// ------------------------------------------------------------------------------
// ------------------------------------------------------------------------------
// measure frequency
this.measureFreq.setPdcaOid(pdca.getOid());
DefaultResult<PdcaMeasureFreqVO> measureFreqResult = this.pdcaMeasureFreqService.findByUK(measureFreq);
if (measureFreqResult.getValue() == null) {
throw new ServiceException(measureFreqResult.getSystemMessage().getValue());
}
this.measureFreq = measureFreqResult.getValue();
this.measureFreq.setEmployeeOid("");
if (!BscConstants.MEASURE_DATA_EMPLOYEE_FULL.equals(this.measureFreq.getEmpId()) && !StringUtils.isBlank(this.measureFreq.getEmpId())) {
EmployeeVO employee = BscBaseLogicServiceCommonSupport.findEmployeeDataByEmpId(this.employeeService, this.measureFreq.getEmpId());
this.measureFreq.setEmployeeOid(employee.getOid());
}
this.measureFreq.setOrganizationOid("");
if (!BscConstants.MEASURE_DATA_ORGANIZATION_FULL.equals(this.measureFreq.getOrgId()) && !StringUtils.isBlank(this.measureFreq.getOrgId())) {
OrganizationVO organization = new OrganizationVO();
organization.setOrgId(this.measureFreq.getOrgId());
DefaultResult<OrganizationVO> orgResult = this.organizationService.findByUK(organization);
if (orgResult.getValue() != null) {
this.measureFreq.setOrganizationOid(orgResult.getValue().getOid());
}
}
this.getFields().put("measureFreqStartDate", "");
this.getFields().put("measureFreqEndDate", "");
this.getFields().put("measureFreqStartYearDate", this.measureFreq.getStartDateTextBoxValue());
this.getFields().put("measureFreqEndYearDate", this.measureFreq.getEndDateTextBoxValue());
if (BscMeasureDataFrequency.FREQUENCY_DAY.equals(measureFreq.getFreq()) || BscMeasureDataFrequency.FREQUENCY_WEEK.equals(measureFreq.getFreq()) || BscMeasureDataFrequency.FREQUENCY_MONTH.equals(measureFreq.getFreq())) {
this.getFields().put("measureFreqStartDate", this.measureFreq.getStartDateTextBoxValue());
this.getFields().put("measureFreqEndDate", this.measureFreq.getEndDateTextBoxValue());
this.getFields().put("measureFreqStartYearDate", "");
this.getFields().put("measureFreqEndYearDate", "");
}
//1-DEPT,2-EMP,3-Both
this.getFields().put("measureFreqDataFor", "all");
if ("1".equals(this.measureFreq.getDataType())) {
this.getFields().put("measureFreqDataFor", "organization");
}
if ("2".equals(this.measureFreq.getDataType())) {
this.getFields().put("measureFreqDataFor", "employee");
}
// ------------------------------------------------------------------------------
// ------------------------------------------------------------------------------
// PDCA organization, Owner, KPIs, DOC
List<String> appendOrgaOidsPdcaOrga = this.organizationService.findForAppendOrganizationOidsByPdcaOrga(this.pdca.getOid());
List<String> appendOrgaNamesPdcaOrga = this.organizationService.findForAppendNames(appendOrgaOidsPdcaOrga);
this.getFields().put("appendOrgaOidsForPdcaOrga", this.joinAppend2String(appendOrgaOidsPdcaOrga));
this.getFields().put("appendOrgaNamesForPdcaOrga", this.joinAppend2String(appendOrgaNamesPdcaOrga));
List<String> appendEmplOidsPdcaOwner = this.employeeService.findForAppendEmployeeOidsByPdcaOwner(pdca.getOid());
List<String> appendEmplNamesPdcaOwner = this.employeeService.findForAppendNames(appendEmplOidsPdcaOwner);
this.getFields().put("appendOwnerOidsForPdcaOwner", this.joinAppend2String(appendEmplOidsPdcaOwner));
this.getFields().put("appendOwnerNamesForPdcaOwner", this.joinAppend2String(appendEmplNamesPdcaOwner));
List<String> appendKpiOidsPdcaKpis = this.kpiService.findForAppendOidsByPdcaKpis(pdca.getOid());
List<String> appendKpiNamesPdcaKpis = this.kpiService.findForAppendNames(appendKpiOidsPdcaKpis);
this.getFields().put("appendKpiOidsForPdcaKpis", this.joinAppend2String(appendKpiOidsPdcaKpis));
this.getFields().put("appendKpiNamesForPdcaKpis", this.joinAppend2String(appendKpiNamesPdcaKpis));
Map<String, Object> paramMap = new HashMap<String, Object>();
paramMap.put("pdcaOid", pdca.getOid());
this.pdcaDocs = this.pdcaDocService.findListVOByParams(paramMap);
for (int i = 0; this.pdcaDocs != null && i < this.pdcaDocs.size(); i++) {
PdcaDocVO pdcaDoc = this.pdcaDocs.get(i);
pdcaDoc.setShowName("unknown-" + pdcaDoc.getUploadOid());
DefaultResult<SysUploadVO> upResult = this.sysUploadService.findForNoByteContent(pdcaDoc.getUploadOid());
if (upResult.getValue() != null) {
pdcaDoc.setShowName(upResult.getValue().getShowName());
}
}
// ------------------------------------------------------------------------------
// ------------------------------------------------------------------------------
// PDCA Items
this.loadPdcaItemsData();
// ------------------------------------------------------------------------------
}
Aggregations