use of com.netsteadfast.greenstep.vo.PdcaAuditVO in project bamboobsc by billchen198318.
the class PdcaLogicServiceImpl method createAudit.
private void createAudit(PdcaVO pdca, Map<String, Object> flowDataMap) throws ServiceException, Exception {
PdcaAuditVO audit = new PdcaAuditVO();
audit.setPdcaOid(pdca.getOid());
audit.setEmpId(this.getEmployeeService().findByAccountId((String) flowDataMap.get("cuserid")).getEmpId());
audit.setType((String) flowDataMap.get("pdcaType"));
audit.setConfirmDate((String) flowDataMap.get("date"));
audit.setConfirmSeq((this.pdcaAuditService.findForMaxConfirmSeq(pdca.getOid()) + 1));
this.pdcaAuditService.saveObject(audit);
}
use of com.netsteadfast.greenstep.vo.PdcaAuditVO 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;
}
use of com.netsteadfast.greenstep.vo.PdcaAuditVO 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;
}
Aggregations