Beispiel #1
0
  // 已经去面试的信息
  public String getAlreadyGoInterviewPerson() throws Exception {

    HashMap<String, Object> pMap = new HashMap<String, Object>();
    pMap.put("qtype", "two");
    pMap.put("hunterGotoInterviewStatus", RecommendFlowType.HUNTER_ALREAD_GOTO_INTERVIEW.getCode());
    pMap.put("endTime", new Date());
    pMap.put("startTime", DateUtil.addDays(new Date(), -1));
    List<HashMap<String, Object>> list = this.zpJlInfoDao.statisticsJlInfo(pMap);
    String emailContent = "";
    if (list != null && list.size() > 0) {
      List<ZpDictionaryInfo> dicList = zpDictionaryInfoDao.queryZpDictionaryInfoList();
      for (HashMap<String, Object> map : list) {
        String realName = String.valueOf(map.get("realName"));
        String jlName = String.valueOf(map.get("name"));
        Long jobPositionId = Long.parseLong(String.valueOf(map.get("jobPositionId")));
        if (emailContent.length() == 0) {
          emailContent =
              ApplicationConst.getMessage(
                  "10105", realName, jlName + " (" + getDicName(jobPositionId, dicList) + ")");
        } else {
          emailContent =
              emailContent
                  + " \n <br> "
                  + ApplicationConst.getMessage(
                      "10105", realName, jlName + " (" + getDicName(jobPositionId, dicList) + ")");
        }
      }
    }

    // System.out.println(emailContent);
    return emailContent;
  }
Beispiel #2
0
  // 通知薪水管理员发薪水
  public void nodifyFinanceJob() throws Exception {
    String emailMessage = "";
    String auditPassMessage = getAuditPassPerson();
    String goInterviewMessage = getAlreadyGoInterviewPerson();
    if (auditPassMessage.length() > 0) {
      emailMessage = auditPassMessage;
    }
    if (goInterviewMessage.length() > 0) {
      if (emailMessage.length() == 0) {
        emailMessage = auditPassMessage;
      } else {
        emailMessage = emailMessage + "\n" + goInterviewMessage;
      }
    }
    // 没有薪水发放
    if (emailMessage.length() == 0) {
      emailMessage = ApplicationConst.getMessage("10106");
    }
    System.out.println("emailContent:" + emailMessage);

    Account account = this.getSalaryManager();
    // 向薪水管理员发送邮件
    if (account != null && account.getEmail() != null && StringUtil.isEmail(account.getEmail())) {
      SimpleEmailVo vo = new SimpleEmailVo();
      vo.addEmail(account.getEmail(), "*****@*****.**");
      vo.setTitle("憬仪[红包]发放通知");
      vo.setContent(emailMessage);
      emailClient.send(vo);
      log.info("发送时间:" + DateUtil.toString(DateUtil.getNow(), DateUtil.DEFAULT_LONG_FORMAT));
    }
  }
Beispiel #3
0
 public void nodifyTechnologyAuditJob() throws Exception {
   HashMap<String, Object> pMap = new HashMap<String, Object>();
   pMap.put("auditTypeId", JlAuditType.WAIT_AUDIT.getCode());
   List<HashMap<String, Object>> list = zpJlExpandInfoDao.queryNotAuditJl(pMap);
   if (list != null && list.size() > 0) {
     for (HashMap<String, Object> map : list) {
       int jlcount = Integer.parseInt(String.valueOf(map.get("jlcount")));
       String nickname = String.valueOf(map.get("nickname"));
       String email = String.valueOf(map.get("email"));
       if (email != null && StringUtil.isEmail(email)) {
         SimpleEmailVo vo = new SimpleEmailVo();
         vo.addEmail(email);
         vo.setTitle("憬仪评审通知");
         vo.setContent(ApplicationConst.getMessage("10101", nickname, String.valueOf(jlcount)));
         emailClient.send(vo);
         Thread.sleep(10000);
         log.info("发送时间:" + DateUtil.toString(DateUtil.getNow(), DateUtil.DEFAULT_LONG_FORMAT));
       }
     }
   }
 }
Beispiel #4
0
  // 获得技术评审通过的信息
  public String getAuditPassPerson() throws Exception {

    HashMap<String, Object> pMap = new HashMap<String, Object>();
    pMap.put("auditTypeId", JlAuditType.AUDIT_OK.getCode());
    pMap.put("qtype", "one");
    pMap.put("endTime", new Date());
    pMap.put("startTime", DateUtil.addDays(new Date(), -1));

    List<HashMap<String, Object>> list = this.zpJlInfoDao.statisticsJlInfo(pMap);
    String emailContent = "";
    if (list != null && list.size() > 0) {

      List<ZpDictionaryInfo> dicList = zpDictionaryInfoDao.queryZpDictionaryInfoList();
      for (HashMap<String, Object> map : list) {

        String realName = String.valueOf(map.get("realName"));
        int jlcount = Integer.parseInt(String.valueOf(map.get("jlcount")));
        String names = String.valueOf(map.get("names"));
        String positions = String.valueOf(map.get("positions"));
        String name[] = names.split(",");
        String position[] = positions.split(",");
        String nameStr = "";
        for (int i = 0; i < name.length; i++) {
          if (i == 0) {
            nameStr = name[i] + " " + getDicName(Long.parseLong(position[i]), dicList);
          } else {
            nameStr =
                nameStr + " 、" + name[i] + " " + getDicName(Long.parseLong(position[i]), dicList);
          }
        }
        emailContent =
            emailContent
                + " \n <br> "
                + ApplicationConst.getMessage("10104", realName, String.valueOf(jlcount), nameStr);

        // emailContent=emailContent+emailContent;
      }
    }
    return emailContent;
  }