|
@@ -1,10 +1,15 @@
|
|
package com.jpsoft.employment.modules.job.service.impl;
|
|
package com.jpsoft.employment.modules.job.service.impl;
|
|
|
|
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
import java.util.UUID;
|
|
import java.util.UUID;
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
+import com.jpsoft.employment.modules.base.dao.CompanyDAO;
|
|
|
|
+import com.jpsoft.employment.modules.base.dao.MessageNoticeDAO;
|
|
|
|
+import com.jpsoft.employment.modules.base.entity.Company;
|
|
|
|
+import com.jpsoft.employment.modules.base.entity.MessageNotice;
|
|
import com.jpsoft.employment.modules.common.utils.StringUtils;
|
|
import com.jpsoft.employment.modules.common.utils.StringUtils;
|
|
import com.jpsoft.employment.modules.job.dao.*;
|
|
import com.jpsoft.employment.modules.job.dao.*;
|
|
import com.jpsoft.employment.modules.job.entity.*;
|
|
import com.jpsoft.employment.modules.job.entity.*;
|
|
@@ -32,7 +37,16 @@ public class ResumeDeliverRecordServiceImpl implements ResumeDeliverRecordServic
|
|
private RecruitmentDAO recruitmentDAO;
|
|
private RecruitmentDAO recruitmentDAO;
|
|
|
|
|
|
@Resource(name="resumeDAO")
|
|
@Resource(name="resumeDAO")
|
|
- private ResumeDAO resumeDAO;
|
|
|
|
|
|
+ private ResumeDAO resumeDAO;
|
|
|
|
+
|
|
|
|
+ @Resource(name="messageNoticeDAO")
|
|
|
|
+ private MessageNoticeDAO messageNoticeDAO;
|
|
|
|
+
|
|
|
|
+ @Resource(name="jobUserDAO")
|
|
|
|
+ private JobUserDAO jobUserDAO;
|
|
|
|
+
|
|
|
|
+ @Resource(name="companyDAO")
|
|
|
|
+ private CompanyDAO companyDAO;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResumeDeliverRecord get(String id) {
|
|
public ResumeDeliverRecord get(String id) {
|
|
@@ -55,6 +69,8 @@ public class ResumeDeliverRecordServiceImpl implements ResumeDeliverRecordServic
|
|
|
|
|
|
ResumeDeliver resumeDeliver;
|
|
ResumeDeliver resumeDeliver;
|
|
|
|
|
|
|
|
+ SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
+
|
|
if(StringUtils.isEmpty(model.getResumeDeliverId())){
|
|
if(StringUtils.isEmpty(model.getResumeDeliverId())){
|
|
resumeDeliver = new ResumeDeliver();
|
|
resumeDeliver = new ResumeDeliver();
|
|
resumeDeliver.setId(UUID.randomUUID().toString());
|
|
resumeDeliver.setId(UUID.randomUUID().toString());
|
|
@@ -91,12 +107,39 @@ public class ResumeDeliverRecordServiceImpl implements ResumeDeliverRecordServic
|
|
|
|
|
|
Resume resume = resumeDAO.get(resumeDeliver.getJobResumeId());
|
|
Resume resume = resumeDAO.get(resumeDeliver.getJobResumeId());
|
|
|
|
|
|
|
|
+ String jobUserName="";
|
|
|
|
+ String companyName="";
|
|
|
|
+ String userName="";
|
|
|
|
+ String dateTime = model.getChatDateStr()+ " " + model.getBeginTime() + "-" + model.getEndTime();
|
|
|
|
+ String sendDate = sdf.format(model.getCreateTime());
|
|
|
|
+ String tel="";
|
|
|
|
+ String department="人力资源部";
|
|
|
|
+ String idCard="";
|
|
|
|
+ String position="";
|
|
|
|
+ String positionDep="";
|
|
|
|
+ String workAddress="";
|
|
|
|
+
|
|
|
|
+
|
|
resumeDeliverContent.setJobUserId(model.getJobUserId());
|
|
resumeDeliverContent.setJobUserId(model.getJobUserId());
|
|
if(recruitment!=null){
|
|
if(recruitment!=null){
|
|
resumeDeliverContent.setJobResumeId(recruitment.getId());
|
|
resumeDeliverContent.setJobResumeId(recruitment.getId());
|
|
|
|
+
|
|
|
|
+ Company company = companyDAO.get(recruitment.getCompanyId());
|
|
|
|
+
|
|
|
|
+ if(company!=null){
|
|
|
|
+ companyName = company.getName();
|
|
|
|
+ userName = company.getContactPerson();
|
|
|
|
+ tel = company.getTel();
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
if(resume!=null){
|
|
if(resume!=null){
|
|
resumeDeliverContent.setJobResumeId(resume.getId());
|
|
resumeDeliverContent.setJobResumeId(resume.getId());
|
|
|
|
+ JobUser jobUser = jobUserDAO.get(resume.getJobUserId());
|
|
|
|
+ if(jobUser!=null){
|
|
|
|
+ jobUserName = jobUser.getRealName();
|
|
|
|
+ idCard = jobUser.getIdCard();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
resumeDeliverContent.setChatStatus(chatType);
|
|
resumeDeliverContent.setChatStatus(chatType);
|
|
@@ -105,13 +148,23 @@ public class ResumeDeliverRecordServiceImpl implements ResumeDeliverRecordServic
|
|
resumeDeliverContent.setTodoTime(model.getChatDateStr());
|
|
resumeDeliverContent.setTodoTime(model.getChatDateStr());
|
|
resumeDeliverContent.setTodoMinuteStart(model.getBeginTime());
|
|
resumeDeliverContent.setTodoMinuteStart(model.getBeginTime());
|
|
resumeDeliverContent.setTodoMinuteEnd(model.getEndTime());
|
|
resumeDeliverContent.setTodoMinuteEnd(model.getEndTime());
|
|
|
|
+// sendMessage(model,chatType,jobUserName,companyName,userName,dateTime,tel,recruitment.getAddress(),sendDate,department,
|
|
|
|
+// idCard,position,positionDep,workAddress);
|
|
}
|
|
}
|
|
else if(chatType.equals("3")){
|
|
else if(chatType.equals("3")){
|
|
resumeDeliverContent.setAddress(model.getRemark());
|
|
resumeDeliverContent.setAddress(model.getRemark());
|
|
|
|
+// sendMessage(model,chatType,jobUserName,companyName,userName,dateTime,tel,recruitment.getAddress(),sendDate,department,
|
|
|
|
+// idCard,position,positionDep,workAddress);
|
|
|
|
+
|
|
}
|
|
}
|
|
else if(chatType.equals("4")){
|
|
else if(chatType.equals("4")){
|
|
resumeDeliverContent.setEntryPost(model.getEntryPosition());
|
|
resumeDeliverContent.setEntryPost(model.getEntryPosition());
|
|
resumeDeliverContent.setEntryDepartment(model.getEntryDepartment());
|
|
resumeDeliverContent.setEntryDepartment(model.getEntryDepartment());
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+// sendMessage(model,chatType,jobUserName,companyName,userName,dateTime,tel,recruitment.getAddress(),sendDate,department,
|
|
|
|
+// idCard,position,positionDep,workAddress);
|
|
}
|
|
}
|
|
else if(chatType.equals("6")){
|
|
else if(chatType.equals("6")){
|
|
resumeDeliverContent.setRemark(model.getRemark());
|
|
resumeDeliverContent.setRemark(model.getRemark());
|
|
@@ -124,6 +177,98 @@ public class ResumeDeliverRecordServiceImpl implements ResumeDeliverRecordServic
|
|
return affectCount;
|
|
return affectCount;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// private int sendMessage(ResumeDeliverRecord model,String chatType,String jobUserName,String companyName,
|
|
|
|
+// String userName,String dateTime,String tel,String address,String sendDate,String department,
|
|
|
|
+// String idCard,String position,String positionDep,String workAddress
|
|
|
|
+// ){
|
|
|
|
+// int affectCount = 0;
|
|
|
|
+//
|
|
|
|
+// MessageNotice messageNotice = new MessageNotice();
|
|
|
|
+// messageNotice.setId(UUID.randomUUID().toString());
|
|
|
|
+// messageNotice.setDelFlag(false);
|
|
|
|
+// messageNotice.setCreateBy(model.getCreateBy());
|
|
|
|
+// messageNotice.setCreateTime(model.getCreateTime());
|
|
|
|
+// messageNotice.setRecipientId(model.getJobUserId());
|
|
|
|
+// messageNotice.setClassify("2");//求职消息
|
|
|
|
+// messageNotice.setType("1");//站内消息
|
|
|
|
+// messageNotice.setDeliverId(model.getResumeDeliverId());
|
|
|
|
+// messageNotice.setIsNeedAgree(true);
|
|
|
|
+//
|
|
|
|
+// messageNotice.setStatus(true);//审核状态是否
|
|
|
|
+//
|
|
|
|
+// if(chatType.equals("3")){
|
|
|
|
+// //沟通消息
|
|
|
|
+// messageNotice.setTitle("沟通邀请通知");
|
|
|
|
+//
|
|
|
|
+// MessageNotice templateMessageNotice = messageNoticeDAO.get("8d977cbb-2751-4ca1-8ed6-7ab97cfc47e1");//沟通邀请模版
|
|
|
|
+//
|
|
|
|
+// String templateContent = templateMessageNotice.getContent();
|
|
|
|
+//
|
|
|
|
+// templateContent.replace("{jobUserName}",jobUserName);
|
|
|
|
+// templateContent.replace("{companyName}",companyName);
|
|
|
|
+// templateContent.replace("{userName}",userName);
|
|
|
|
+// templateContent.replace("{dateTime}",dateTime);
|
|
|
|
+// templateContent.replace("{tel}",tel);
|
|
|
|
+// templateContent.replace("{address}",address);
|
|
|
|
+// templateContent.replace("{sendDate}",sendDate);
|
|
|
|
+// templateContent.replace("{department}",department);
|
|
|
|
+//
|
|
|
|
+// messageNotice.setContent(templateContent);
|
|
|
|
+//
|
|
|
|
+// affectCount = messageNoticeDAO.insert(messageNotice);
|
|
|
|
+//
|
|
|
|
+// }
|
|
|
|
+// else if(chatType.equals("4")){
|
|
|
|
+// //面试消息
|
|
|
|
+// messageNotice.setTitle("面试邀请通知");
|
|
|
|
+//
|
|
|
|
+// MessageNotice templateMessageNotice = messageNoticeDAO.get("4f12400a-7ec7-4dc8-bb30-14e7afcff134");
|
|
|
|
+//
|
|
|
|
+// String templateContent = templateMessageNotice.getContent();
|
|
|
|
+//
|
|
|
|
+// templateContent.replace("{jobUserName}",jobUserName);
|
|
|
|
+// templateContent.replace("{companyName}",companyName);
|
|
|
|
+// templateContent.replace("{userName}",userName);
|
|
|
|
+// templateContent.replace("{dateTime}",dateTime);
|
|
|
|
+// templateContent.replace("{tel}",tel);
|
|
|
|
+// templateContent.replace("{address}",address);
|
|
|
|
+// templateContent.replace("{sendDate}",sendDate);
|
|
|
|
+// templateContent.replace("{department}",department);
|
|
|
|
+//
|
|
|
|
+// messageNotice.setContent(templateContent);
|
|
|
|
+//
|
|
|
|
+// affectCount = messageNoticeDAO.insert(messageNotice);
|
|
|
|
+//
|
|
|
|
+// }
|
|
|
|
+// else if(chatType.equals("6")){
|
|
|
|
+// //入职消息
|
|
|
|
+// messageNotice.setTitle("录用意向书");
|
|
|
|
+//
|
|
|
|
+// MessageNotice templateMessageNotice = messageNoticeDAO.get("1c0bc8f4-e318-4e89-8745-13605be669c5");
|
|
|
|
+//
|
|
|
|
+// String templateContent = templateMessageNotice.getContent();
|
|
|
|
+//
|
|
|
|
+// templateContent.replace("{jobUserName}",jobUserName);
|
|
|
|
+// templateContent.replace("{companyName}",companyName);
|
|
|
|
+// templateContent.replace("{idCard}",idCard);
|
|
|
|
+// templateContent.replace("{position}",position);
|
|
|
|
+// templateContent.replace("{positionDep}",positionDep);
|
|
|
|
+// templateContent.replace("{workAddress}",workAddress);
|
|
|
|
+//
|
|
|
|
+// templateContent.replace("{tel}",tel);
|
|
|
|
+// templateContent.replace("{address}",address);
|
|
|
|
+// templateContent.replace("{sendDate}",sendDate);
|
|
|
|
+// templateContent.replace("{department}",department);
|
|
|
|
+//
|
|
|
|
+// messageNotice.setContent(templateContent);
|
|
|
|
+//
|
|
|
|
+// affectCount = messageNoticeDAO.insert(messageNotice);
|
|
|
|
+//
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// return affectCount;
|
|
|
|
+// }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public int update(ResumeDeliverRecord model) {
|
|
public int update(ResumeDeliverRecord model) {
|
|
// TODO Auto-generated method stub
|
|
// TODO Auto-generated method stub
|