use of com.netsteadfast.greenstep.po.hbm.BbOrganization in project bamboobsc by billchen198318.
the class OrganizationServiceImpl method findForInKpiOrga.
@Override
public DefaultResult<List<BbOrganization>> findForInKpiOrga(String kpiId) throws ServiceException, Exception {
if (StringUtils.isBlank(kpiId)) {
throw new ServiceException(SysMessageUtil.get(GreenStepSysMsgConstants.PARAMS_BLANK));
}
DefaultResult<List<BbOrganization>> result = new DefaultResult<List<BbOrganization>>();
List<BbOrganization> searchList = this.organizationDAO.findForInKpiOrga(kpiId);
if (searchList != null && searchList.size() > 0) {
result.setValue(searchList);
} else {
result.setSystemMessage(new SystemMessage(SysMessageUtil.get(GreenStepSysMsgConstants.SEARCH_NO_DATA)));
}
return result;
}
use of com.netsteadfast.greenstep.po.hbm.BbOrganization in project bamboobsc by billchen198318.
the class OrganizationServiceImpl method findForMap.
@Override
public Map<String, String> findForMap(boolean pleaseSelect) throws ServiceException, Exception {
Map<String, String> dataMap = this.providedSelectZeroDataMap(pleaseSelect);
Map<String, String> orderParams = new HashMap<String, String>();
orderParams.put("orgId", "asc");
List<BbOrganization> organizationList = this.findListByParams(null, null, orderParams);
for (BbOrganization organization : organizationList) {
dataMap.put(organization.getOid(), organization.getName());
}
return dataMap;
}
use of com.netsteadfast.greenstep.po.hbm.BbOrganization in project bamboobsc by billchen198318.
the class ReportRoleViewLogicServiceImpl method findForOrganization.
@ServiceMethodAuthority(type = { ServiceMethodType.SELECT })
@Override
public List<BbOrganization> findForOrganization(String accountId) throws ServiceException, Exception {
if (super.isBlank(accountId)) {
throw new ServiceException(SysMessageUtil.get(GreenStepSysMsgConstants.PARAMS_BLANK));
}
List<BbOrganization> searchList = new ArrayList<BbOrganization>();
List<TbUserRole> roles = this.getUserRoles(accountId);
for (int i = 0; roles != null && i < roles.size(); i++) {
Map<String, Object> paramMap = new HashMap<String, Object>();
paramMap.put("role", roles.get(i).getRole());
paramMap.put("type", ReportRoleViewTypes.IS_ORGANIZATION);
List<BbReportRoleView> views = this.reportRoleViewService.findListByParams(paramMap);
for (int j = 0; views != null && j < views.size(); j++) {
BbOrganization organization = new BbOrganization();
organization.setOrgId(views.get(j).getIdName());
organization = this.getOrganizationService().findByEntityUK(organization);
if (organization == null) {
continue;
}
boolean isFound = false;
for (BbOrganization entity : searchList) {
if (entity.getOid().equals(organization.getOid())) {
isFound = true;
}
}
if (!isFound) {
searchList.add(organization);
}
}
}
return searchList;
}
use of com.netsteadfast.greenstep.po.hbm.BbOrganization in project bamboobsc by billchen198318.
the class ReportRoleViewLogicServiceImpl method findForOrganizationMap.
@ServiceMethodAuthority(type = { ServiceMethodType.SELECT })
@Override
public Map<String, String> findForOrganizationMap(boolean pleaseSelect, String accountId) throws ServiceException, Exception {
if (super.isBlank(accountId)) {
throw new ServiceException(SysMessageUtil.get(GreenStepSysMsgConstants.PARAMS_BLANK));
}
Map<String, String> dataMap = new LinkedHashMap<String, String>();
if (pleaseSelect) {
dataMap.put(Constants.HTML_SELECT_NO_SELECT_ID, Constants.HTML_SELECT_NO_SELECT_NAME);
}
/*
List<TbUserRole> roles = this.getUserRoles(accountId);
for (int i=0; roles!=null && i<roles.size(); i++) {
Map<String, Object> paramMap = new HashMap<String, Object>();
paramMap.put("role", roles.get(i).getRole());
paramMap.put("type", ReportRoleViewTypes.IS_ORGANIZATION);
List<BbReportRoleView> views = this.reportRoleViewService.findListByParams(paramMap);
for (int j=0; views!=null && j<views.size(); j++) {
BbOrganization organization = new BbOrganization();
organization.setOrgId(views.get(j).getIdName());
organization = this.organizationService.findByEntityUK(organization);
if ( organization == null ) {
continue;
}
if ( dataMap.get(organization.getOid()) != null ) {
continue;
}
dataMap.put(organization.getOid(), organization.getName());
}
}
*/
List<BbOrganization> organizations = this.findForOrganization(accountId);
for (BbOrganization entity : organizations) {
if (dataMap.get(entity.getOid()) != null) {
continue;
}
dataMap.put(entity.getOid(), entity.getName());
}
return dataMap;
}
use of com.netsteadfast.greenstep.po.hbm.BbOrganization 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