use of com.netsteadfast.greenstep.vo.OrganizationVO 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.OrganizationVO in project bamboobsc by billchen198318.
the class OrganizationSaveOrUpdateAction method updateParent.
private void updateParent() throws ControllerException, AuthorityException, ServiceException, Exception {
OrganizationVO organization = new OrganizationVO();
this.transformFields2ValueObject(organization, new String[] { "oid" });
DefaultResult<Boolean> result = this.organizationLogicService.updateParent(organization, this.getFields().get("parentOid"));
this.message = result.getSystemMessage().getValue();
if (result.getValue() != null && result.getValue()) {
this.success = IS_YES;
}
}
use of com.netsteadfast.greenstep.vo.OrganizationVO in project bamboobsc by billchen198318.
the class OrganizationSaveOrUpdateAction method update.
private void update() throws ControllerException, AuthorityException, ServiceException, Exception {
this.checkFields();
OrganizationVO organization = new OrganizationVO();
this.transformFields2ValueObject(organization, new String[] { "oid", "orgId", "name", "address", "lat", "lng", "description" });
DefaultResult<OrganizationVO> result = this.organizationLogicService.update(organization);
this.message = result.getSystemMessage().getValue();
if (result.getValue() != null) {
this.success = IS_YES;
}
}
use of com.netsteadfast.greenstep.vo.OrganizationVO in project bamboobsc by billchen198318.
the class OrganizationSaveOrUpdateAction method save.
private void save() throws ControllerException, AuthorityException, ServiceException, Exception {
this.checkFields();
OrganizationVO organization = new OrganizationVO();
this.transformFields2ValueObject(organization, new String[] { "orgId", "name", "address", "lat", "lng", "description" });
DefaultResult<OrganizationVO> result = this.organizationLogicService.create(organization);
this.message = result.getSystemMessage().getValue();
if (result.getValue() != null) {
this.success = IS_YES;
}
}
use of com.netsteadfast.greenstep.vo.OrganizationVO 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