use of com.netsteadfast.greenstep.po.hbm.BbPdca 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;
}
Aggregations