Exemplo n.º 1
0
 /**
  * 判断是否存储指定id的工作职务
  *
  * @param id
  * @param onlyDisplayShow 是否仅显示可见的
  * @return
  */
 public static boolean existsJob(Long id, Boolean onlyDisplayShow) {
   Job job = SpringUtils.getBean(JobService.class).findOne(id);
   if (job == null) {
     return false;
   }
   if (Boolean.TRUE.equals(onlyDisplayShow) && Boolean.FALSE.equals(job.getShow())) {
     return false;
   }
   return true;
 }
Exemplo n.º 2
0
 /**
  * 判断是否存储指定id的资源
  *
  * @param id
  * @param onlyDisplayShow 是否仅显示可见的
  * @return
  */
 public static boolean existsResource(Long id, Boolean onlyDisplayShow) {
   Resource resource = SpringUtils.getBean(ResourceService.class).findOne(id);
   if (resource == null) {
     return false;
   }
   if (Boolean.TRUE.equals(onlyDisplayShow) && Boolean.FALSE.equals(resource.getShow())) {
     return false;
   }
   return true;
 }
Exemplo n.º 3
0
 /**
  * 判断是否存储指定id的组织机构
  *
  * @param id
  * @param onlyDisplayShow 是否仅显示可见的
  * @return
  */
 public static boolean existsOrganization(Long id, Boolean onlyDisplayShow) {
   Organization organization = SpringUtils.getBean(OrganizationService.class).findOne(id);
   if (organization == null) {
     return false;
   }
   if (Boolean.TRUE.equals(onlyDisplayShow) && Boolean.FALSE.equals(organization.getShow())) {
     return false;
   }
   return true;
 }