Search in sources :

Example 1 with BbPdcaAudit

use of com.netsteadfast.greenstep.po.hbm.BbPdcaAudit 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;
}
Also used : PdcaItemDocVO(com.netsteadfast.greenstep.vo.PdcaItemDocVO) PdcaDocVO(com.netsteadfast.greenstep.vo.PdcaDocVO) BbPdcaItemDoc(com.netsteadfast.greenstep.po.hbm.BbPdcaItemDoc) KpiVO(com.netsteadfast.greenstep.vo.KpiVO) BbPdcaDoc(com.netsteadfast.greenstep.po.hbm.BbPdcaDoc) OrganizationVO(com.netsteadfast.greenstep.vo.OrganizationVO) BbKpi(com.netsteadfast.greenstep.po.hbm.BbKpi) BbPdcaAudit(com.netsteadfast.greenstep.po.hbm.BbPdcaAudit) BbEmployee(com.netsteadfast.greenstep.po.hbm.BbEmployee) EmployeeVO(com.netsteadfast.greenstep.vo.EmployeeVO) BbOrganization(com.netsteadfast.greenstep.po.hbm.BbOrganization) PdcaVO(com.netsteadfast.greenstep.vo.PdcaVO) BbPdca(com.netsteadfast.greenstep.po.hbm.BbPdca) PdcaItemVO(com.netsteadfast.greenstep.vo.PdcaItemVO) BbPdcaItem(com.netsteadfast.greenstep.po.hbm.BbPdcaItem) PdcaAuditVO(com.netsteadfast.greenstep.vo.PdcaAuditVO)

Example 2 with BbPdcaAudit

use of com.netsteadfast.greenstep.po.hbm.BbPdcaAudit in project bamboobsc by billchen198318.

the class LoadPdcaDataCommand method findMaxConfirmSeqPdcaAuditData.

private PdcaAuditVO findMaxConfirmSeqPdcaAuditData(PdcaVO pdca, String type) throws ServiceException, Exception {
    /*
		Map<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("pdcaOid", pdca.getOid());	
		
		Map<String, String> orderParam = new HashMap<String, String>();
		orderParam.put("confirmSeq", "DESC");
		
		Map<String, CustomeOperational> operParam1 = new HashMap<String, CustomeOperational>();
		CustomeOperational op1 = new CustomeOperational();
		op1.setField("type");
		op1.setOp("=");
		op1.setValue(type);
		operParam1.put("op1", op1);
		List<BbPdcaAudit> planAuditList = this.pdcaAuditService.findListByParams2(paramMap, null, operParam1, orderParam);
		if (planAuditList == null || planAuditList.size() < 1) {
			return null;
		}
		*/
    BbPdcaAudit pdcaAudit = this.pdcaAuditService.findForLast(pdca.getOid(), type);
    if (null == pdcaAudit) {
        return null;
    }
    PdcaAuditVO audit = new PdcaAuditVO();
    pdcaAuditService.doMapper(pdcaAudit, audit, IPdcaAuditService.MAPPER_ID_PO2VO);
    return audit;
}
Also used : BbPdcaAudit(com.netsteadfast.greenstep.po.hbm.BbPdcaAudit) PdcaAuditVO(com.netsteadfast.greenstep.vo.PdcaAuditVO)

Aggregations

BbPdcaAudit (com.netsteadfast.greenstep.po.hbm.BbPdcaAudit)2 PdcaAuditVO (com.netsteadfast.greenstep.vo.PdcaAuditVO)2 BbEmployee (com.netsteadfast.greenstep.po.hbm.BbEmployee)1 BbKpi (com.netsteadfast.greenstep.po.hbm.BbKpi)1 BbOrganization (com.netsteadfast.greenstep.po.hbm.BbOrganization)1 BbPdca (com.netsteadfast.greenstep.po.hbm.BbPdca)1 BbPdcaDoc (com.netsteadfast.greenstep.po.hbm.BbPdcaDoc)1 BbPdcaItem (com.netsteadfast.greenstep.po.hbm.BbPdcaItem)1 BbPdcaItemDoc (com.netsteadfast.greenstep.po.hbm.BbPdcaItemDoc)1 EmployeeVO (com.netsteadfast.greenstep.vo.EmployeeVO)1 KpiVO (com.netsteadfast.greenstep.vo.KpiVO)1 OrganizationVO (com.netsteadfast.greenstep.vo.OrganizationVO)1 PdcaDocVO (com.netsteadfast.greenstep.vo.PdcaDocVO)1 PdcaItemDocVO (com.netsteadfast.greenstep.vo.PdcaItemDocVO)1 PdcaItemVO (com.netsteadfast.greenstep.vo.PdcaItemVO)1 PdcaVO (com.netsteadfast.greenstep.vo.PdcaVO)1