Exemplo n.º 1
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";
  }
Exemplo n.º 2
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";
  }