Ejemplo n.º 1
0
 public String sendInterviewNotice() {
   LoginUserInfoDto userInfo = getLoginUserInfo();
   if (userInfo == null) {
     sendInterviewNoticeStatus = ApplicationConstant.COMMON_UNLOGON;
     return "sendInterviewNotice";
   } else {
     String userType = userInfo.getUserType();
     if (userType == null || "".equalsIgnoreCase(userType)) {
       sendInterviewNoticeStatus = "permissionDenied";
       return "sendInterviewNotice";
     } else {
       if (ApplicationConstant.USER_TYPE_PERSONAL.equalsIgnoreCase(userType)) {
         sendInterviewNoticeStatus = "userTypeError";
         return "sendInterviewNotice";
       }
     }
   }
   ApplyJobInfoVo applyJobInfoVo = applyJobService.getApplyJobInfoById(new Long(jobId));
   Long receiverId = new Long(applyJobInfoVo.getUserId());
   Long senderId = userInfo.getId();
   Date currentDate = new Date();
   InterviewNoticeDto interviewNoticeDto = new InterviewNoticeDto();
   interviewNoticeDto.setSenderId(senderId);
   interviewNoticeDto.setReceiverId(receiverId);
   interviewNoticeDto.setTitle(ApplicationConstant.INTERVIEW_NOTICE_TITLE);
   interviewNoticeDto.setMessage(ApplicationConstant.INTERVIEW_NOTICE_MESSAGE);
   interviewNoticeDto.setNoticeDate(currentDate);
   interviewNoticeDto.setStatus("0");
   interviewNoticeDto.setJobName(applyJobInfoVo.getExpectedPosition());
   if (applyJobService.saveInterviewNotice(interviewNoticeDto, userInfo))
     sendInterviewNoticeStatus = SUCCESS;
   else sendInterviewNoticeStatus = "serviceOutOfDate";
   return "sendInterviewNotice";
 }
Ejemplo n.º 2
0
  /** @return */
  @SuppressWarnings("unchecked")
  public String toApplyRecommendation() {
    if (!verifyPersonalUser()) {
      return "closeWindow";
    }
    if (pageInfo == null) {
      pageInfo = new PageInfo();
    }
    pageInfo.setPageSize(ApplicationConstant.APPLYJOBCTR_PAGE_SIZE);
    competencyList =
        (List<ClassMasterDto>) CacheManager.getInstanceMemcachedClient().get("competencyList");
    provinceList =
        (List<ProvinceDto>) CacheManager.getInstanceMemcachedClient().get("provinceList");
    salaryList = (List<ClassMasterDto>) CacheManager.getInstanceMemcachedClient().get("salaryList");
    jobTypeList =
        (List<ClassMasterDto>) CacheManager.getInstanceMemcachedClient().get("jobNatureList");

    /*
     * 获取用户ID
     */
    LoginUserInfoDto loginUserInfo = getLoginUserInfo();
    Long userId = loginUserInfo.getId();
    RecommendationDto recommendationDto = new RecommendationDto();
    recommendationDto.setUserId(userId);
    List<RecommendationVo> recommendationList =
        applyJobService.queryRecommendationList(pageInfo, recommendationDto);
    if (recommendationList != null && !recommendationList.isEmpty()) {
      request = ServletActionContext.getRequest();
      String scripts =
          "<script laguage='JavaScript'> alert('你已经是线下推荐对象!');window.opener=null;window.open('','_self');window.close(); </script>";
      request.setAttribute("failMessage", scripts);
    }

    return "toApplyRecommendation";
  }
Ejemplo n.º 3
0
  /**
   * 人才中心:进入求职页面
   *
   * @return
   */
  @SuppressWarnings("unchecked")
  public String toApplyJob() {
    if (!verifyPersonalUser()) {
      return "closeWindow";
    }
    if (pageInfo == null) {
      pageInfo = new PageInfo();
    }
    pageInfo.setPageSize(ApplicationConstant.APPLYJOBCTR_PAGE_SIZE);
    competencyList =
        (List<ClassMasterDto>) CacheManager.getInstanceMemcachedClient().get("competencyList");
    provinceList =
        (List<ProvinceDto>) CacheManager.getInstanceMemcachedClient().get("provinceList");
    salaryList = (List<ClassMasterDto>) CacheManager.getInstanceMemcachedClient().get("salaryList");
    jobTypeList =
        (List<ClassMasterDto>) CacheManager.getInstanceMemcachedClient().get("jobNatureList");

    // 判断用户是否已经是线下推荐对象
    LoginUserInfoDto loginUserInfo = getLoginUserInfo();
    Long userId = loginUserInfo.getId();
    RecommendationDto recommendationDto = new RecommendationDto();
    recommendationDto.setUserId(userId);
    List<RecommendationVo> recommendationList =
        applyJobService.queryRecommendationList(pageInfo, recommendationDto);
    if (recommendationList != null && !recommendationList.isEmpty()) {
      request = ServletActionContext.getRequest();
      request.setAttribute("readOnly", ApplicationConstant.COMMON_Y_EN);
    }
    return "toApplyJob";
  }
Ejemplo n.º 4
0
  public String submitRecommendationInfo() {
    if (!verifyPersonalUser()) {
      return "closeWindow";
    }

    LoginUserInfoDto loginUserInfo = getLoginUserInfo();
    Long userId = loginUserInfo.getId();

    // 判断用户是否已经是线下推荐对象
    if (pageInfo == null) {
      pageInfo = new PageInfo();
    }
    pageInfo.setPageSize(10);
    RecommendationDto dto = new RecommendationDto();
    dto.setUserId(userId);
    List<RecommendationVo> recommendationList =
        applyJobService.queryRecommendationList(pageInfo, dto);
    if (recommendationList != null && !recommendationList.isEmpty()) {
      actionMessage = "你已经是线下推荐对象";
      return "closeWindow";
    }

    // 判断用户是否具有重复的求职意向
    ApplyJobInfoDto tempDto = new ApplyJobInfoDto();
    tempDto.setUserId(userId);
    tempDto.setExpectedPosition(recommendationDto.getExpectedPosition());
    tempDto.setIsAdvisor(recommendationDto.getIsAdvisor());
    tempDto.setJobTypeCode(recommendationDto.getJobTypeCode());
    tempDto.setFunctionCode(recommendationDto.getFunctionCode());
    int size = applyJobService.queryDuplicatedIntentionCount(tempDto);

    // 求职意向重复
    if (size > 0) {
      isApplyJob = null;
    }

    Date currentDate = new Date();
    recommendationDto.setLastEditDate(currentDate);
    recommendationDto.setRecommendationType("0");
    recommendationDto.setSubmitDate(currentDate);
    recommendationDto.setUserId(userId);
    recommendationDto.setVerifyStatus("0");
    recommendationDto.setInterviewStatus("0");
    applyJobService.saveRecommendation(recommendationDto, isApplyJob);
    HtmlGeneration htmlGeneration = HtmlGeneration.getInstance();
    htmlGeneration.refreshApplyJobPage();
    isApplyJob = null; // 重置
    return "submitRecommendationInfo";
  }
Ejemplo n.º 5
0
  public boolean saveInterviewNotice(
      InterviewNoticeDto interviewNoticeDto, LoginUserInfoDto loginUserInfo) {

    // 扣除相应服务次数
    SysOrderDto dto = new SysOrderDto();
    dto.setService3Remains(new Long(1));
    boolean result =
        sysOrderService.verifyAuthority(
            dto, loginUserInfo, ApplicationConstant.SERVICE_ITEM_NAME_RECRUIT_CODE, "3", 1);

    if (result) {
      // 分别在发件箱、收件箱保存站内信
      saveInterviewSendNotice(interviewNoticeDto);
      saveInterviewReceiveNotice(interviewNoticeDto);

      // 如果个人用户设置了自动回复站内信,给企业用户回复站内信息
      Long personalUserId = interviewNoticeDto.getReceiverId();
      AutoShortMsgConfigDto autoShortMsgConfigDto =
          shortMessageService.getAutoShortMsgConfigByUserId(personalUserId);
      if (autoShortMsgConfigDto != null) {
        ShortMessageDto shortMessageDto = new ShortMessageDto();
        shortMessageDto.setSenderId(personalUserId);
        shortMessageDto.setReceiverId(loginUserInfo.getId());
        shortMessageDto.setReceiveDate(new Date());
        shortMessageDto.setTitle(autoShortMsgConfigDto.getTitle());
        shortMessageDto.setType("1");
        shortMessageDto.setStatus(ApplicationConstant.NOTICE_UNREAD);
        shortMessageDto.setMessage(autoShortMsgConfigDto.getMsg());
        shortMessageService.saveReceiveMsg(shortMessageDto);
      }
    }
    return result;
  }
Ejemplo n.º 6
0
  public String submitApplyJobInfo() {
    if (!verifyPersonalUser()) {
      return "closeWindow";
    }
    LoginUserInfoDto loginUserInfo = getLoginUserInfo();
    Long userId = loginUserInfo.getId();
    applyJobInfoDto.setActStatus("A");
    applyJobInfoDto.setLastEditDate(new Date());
    applyJobInfoDto.setSubmitDate(new Date());
    applyJobInfoDto.setUserId(userId);
    ApplyJobInfoDto tempDto = new ApplyJobInfoDto();
    tempDto.setUserId(userId);
    tempDto.setExpectedPosition(applyJobInfoDto.getExpectedPosition());
    tempDto.setIsAdvisor(applyJobInfoDto.getIsAdvisor());
    tempDto.setJobTypeCode(applyJobInfoDto.getJobTypeCode());
    tempDto.setFunctionCode(applyJobInfoDto.getFunctionCode());
    int size = applyJobService.queryDuplicatedIntentionCount(tempDto);

    // 求职意向重复
    if (size > 0) {
      actionMessage = "求职意向重复,请重新输入求职信息!";
      return toApplyJob();
    }

    // 判断用户是否已经是线下推荐对象
    if (pageInfo == null) {
      pageInfo = new PageInfo();
    }
    pageInfo.setPageSize(10);
    if (ApplicationConstant.COMMON_Y_EN.equalsIgnoreCase(isApplyRecommendation)) {
      RecommendationDto recommendationDto = new RecommendationDto();
      recommendationDto.setUserId(userId);
      List<RecommendationVo> recommendationList =
          applyJobService.queryRecommendationList(pageInfo, recommendationDto);

      // 用户已经是线下推荐对象
      if (recommendationList != null && !recommendationList.isEmpty()) {
        isApplyRecommendation = null;
      }
    }
    applyJobService.saveApplyJobInfo(applyJobInfoDto, isApplyRecommendation);
    HtmlGeneration htmlGeneration = HtmlGeneration.getInstance();
    htmlGeneration.refreshApplyJobPage();
    isApplyRecommendation = null; // 重置
    return "submitApplyJobInfo";
  }
Ejemplo n.º 7
0
  /**
   * 判断当前登陆用户是否为个人用户
   *
   * @return
   */
  private boolean verifyPersonalUser() {
    LoginUserInfoDto loginUserInfo = getLoginUserInfo();
    String userType = loginUserInfo.getUserType();

    // 如果用户类型为空,返回错误
    if (userType == null || "".equalsIgnoreCase(userType)) {
      actionMessage = ApplicationConstant.FUNCTION_LIMITED;
      return false;
    }

    // 如果用户类型为企业用户,返回错误
    else {
      if (ApplicationConstant.USER_TYPE_ENTERPRISE.equalsIgnoreCase(userType)) {
        actionMessage = ApplicationConstant.USERTYPE_ERROR_ENTERPRISE;
        return false;
      }
    }
    return true;
  }