Selaa lähdekoodia

发送站内消息,沟通邀请,面试通知,邀请入职等消息

yanliming 3 vuotta sitten
vanhempi
commit
62f61a1419

+ 1 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/impl/LabourServicesServiceImpl.java

@@ -47,6 +47,7 @@ public class LabourServicesServiceImpl implements LabourServicesService {
 			labourServicesApprove.setCreateTime(model.getCreateTime());
 			labourServicesApprove.setCreateTime(model.getCreateTime());
 			labourServicesApprove.setDelFlag(false);
 			labourServicesApprove.setDelFlag(false);
 			labourServicesApprove.setLabourServicesId(model.getId());
 			labourServicesApprove.setLabourServicesId(model.getId());
+			labourServicesApprove.setApprovalStatus(model.getApprovalStatus());
 
 
 
 
 			affectCount = labourServicesApproveDAO.insert(labourServicesApprove);
 			affectCount = labourServicesApproveDAO.insert(labourServicesApprove);

+ 5 - 0
common/src/main/java/com/jpsoft/employment/modules/job/dto/ResumeDeliverRecordDTO.java

@@ -17,4 +17,9 @@ public class ResumeDeliverRecordDTO {
     private String resumeId;
     private String resumeId;
     private String recruitmentId;
     private String recruitmentId;
 
 
+    @ApiModelProperty(value = "联系人")
+    private String realName;
+    @ApiModelProperty(value = "联系方式")
+    private String companyPhone;
+
 }
 }

+ 6 - 0
common/src/main/java/com/jpsoft/employment/modules/job/entity/ResumeDeliverRecord.java

@@ -76,4 +76,10 @@ public class ResumeDeliverRecord {
 
 
 	@ApiModelProperty(value = "招聘ID,用于显示,不保存数据库")
 	@ApiModelProperty(value = "招聘ID,用于显示,不保存数据库")
 	private String recruitmentId;
 	private String recruitmentId;
+
+
+	@ApiModelProperty(value = "联系人")
+	private String realName;
+	@ApiModelProperty(value = "联系方式")
+	private String companyPhone;
 }
 }

+ 1 - 0
common/src/main/java/com/jpsoft/employment/modules/job/service/impl/RecruitmentServiceImpl.java

@@ -51,6 +51,7 @@ public class RecruitmentServiceImpl implements RecruitmentService {
 			recruitmentApprove.setCreateTime(model.getCreateTime());
 			recruitmentApprove.setCreateTime(model.getCreateTime());
 			recruitmentApprove.setDelFlag(false);
 			recruitmentApprove.setDelFlag(false);
 			recruitmentApprove.setRecruitmentId(model.getId());
 			recruitmentApprove.setRecruitmentId(model.getId());
+			recruitmentApprove.setApproveStatus(model.getApproveStatus());
 
 
 
 
 			affectCount = recruitmentApproveDAO.insert(recruitmentApprove);
 			affectCount = recruitmentApproveDAO.insert(recruitmentApprove);

+ 112 - 104
common/src/main/java/com/jpsoft/employment/modules/job/service/impl/ResumeDeliverRecordServiceImpl.java

@@ -115,9 +115,9 @@ public class ResumeDeliverRecordServiceImpl implements ResumeDeliverRecordServic
 			String tel="";
 			String tel="";
 			String department="人力资源部";
 			String department="人力资源部";
 			String idCard="";
 			String idCard="";
-			String position="";
-			String positionDep="";
-			String workAddress="";
+			String position="";//工作岗位
+			String positionDep="";//入职部门
+			String workAddress="";//工作地
 
 
 
 
 			resumeDeliverContent.setJobUserId(model.getJobUserId());
 			resumeDeliverContent.setJobUserId(model.getJobUserId());
@@ -128,10 +128,11 @@ public class ResumeDeliverRecordServiceImpl implements ResumeDeliverRecordServic
 
 
 				if(company!=null){
 				if(company!=null){
 					companyName = company.getName();
 					companyName = company.getName();
-					userName = company.getContactPerson();
-					tel = company.getTel();
 				}
 				}
 
 
+				position = resumeDeliverContent.getEntryPost();
+				positionDep = resumeDeliverContent.getEntryDepartment();
+				workAddress = recruitment.getAddress();
 			}
 			}
 			if(resume!=null){
 			if(resume!=null){
 				resumeDeliverContent.setJobResumeId(resume.getId());
 				resumeDeliverContent.setJobResumeId(resume.getId());
@@ -148,23 +149,29 @@ 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);
+
+				userName = model.getRealName();
+				tel = model.getCompanyPhone();
+
+				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);
+
+				userName = model.getRealName();
+				tel = model.getCompanyPhone();
+
+				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);
+				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());
@@ -177,97 +184,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;
-//	}
+	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("2")){
+			//沟通消息
+			messageNotice.setTitle("沟通邀请通知");
+
+			MessageNotice templateMessageNotice = messageNoticeDAO.get("8d977cbb-2751-4ca1-8ed6-7ab97cfc47e1");//沟通邀请模版
+
+			String templateContent = templateMessageNotice.getContent();
+
+			templateContent = templateContent.replace("{jobUserName}",jobUserName);
+			templateContent =  templateContent.replace("{companyName}",companyName);
+			templateContent = templateContent.replace("{userName}",userName);
+			templateContent = templateContent.replace("{dateTime}",dateTime);
+			templateContent = templateContent.replace("{tel}",tel);
+			templateContent = templateContent.replace("{address}",address);
+			templateContent = templateContent.replace("{sendDate}",sendDate);
+			templateContent = templateContent.replace("{department}",department);
+
+
+			messageNotice.setContent(templateContent);
+
+			affectCount = messageNoticeDAO.insert(messageNotice);
+
+		}
+		else if(chatType.equals("3")){
+			//面试消息
+			messageNotice.setTitle("面试邀请通知");
+
+			MessageNotice templateMessageNotice = messageNoticeDAO.get("4f12400a-7ec7-4dc8-bb30-14e7afcff134");
+
+			String templateContent = templateMessageNotice.getContent();
+
+			templateContent = templateContent.replace("{jobUserName}",jobUserName);
+			templateContent = templateContent.replace("{companyName}",companyName);
+			templateContent = templateContent.replace("{userName}",userName);
+			templateContent = templateContent.replace("{dateTime}",dateTime);
+			templateContent = templateContent.replace("{tel}",tel);
+			templateContent = templateContent.replace("{address}",address);
+			templateContent = templateContent.replace("{sendDate}",sendDate);
+			templateContent = templateContent.replace("{department}",department);
+
+			messageNotice.setContent(templateContent);
+
+			affectCount = messageNoticeDAO.insert(messageNotice);
+
+		}
+		else if(chatType.equals("4")){
+			//入职消息
+			messageNotice.setTitle("录用意向书");
+
+			MessageNotice templateMessageNotice = messageNoticeDAO.get("1c0bc8f4-e318-4e89-8745-13605be669c5");
+
+			String templateContent = templateMessageNotice.getContent();
+
+			templateContent = templateContent.replace("{jobUserName}",jobUserName);
+			templateContent = templateContent.replace("{companyName}",companyName);
+			templateContent = templateContent.replace("{idCard}",idCard);
+			templateContent = templateContent.replace("{position}",position);
+			templateContent = templateContent.replace("{positionDep}",positionDep);
+			templateContent = templateContent.replace("{workAddress}",workAddress);
+
+			templateContent = templateContent.replace("{tel}",tel);
+			templateContent = templateContent.replace("{address}",address);
+			templateContent = templateContent.replace("{sendDate}",sendDate);
+			templateContent = 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) {

+ 8 - 2
web/src/main/java/com/jpsoft/employment/modules/job/controller/ResumeDeliverController.java

@@ -84,9 +84,9 @@ public class ResumeDeliverController {
     @ApiOperation(value="添加信息")
     @ApiOperation(value="添加信息")
     @PostMapping("add")
     @PostMapping("add")
     public MessageResult<ResumeDeliverRecord> add(@RequestBody ResumeDeliverRecordDTO resumeDeliverRecordDTO,@RequestAttribute String subject){
     public MessageResult<ResumeDeliverRecord> add(@RequestBody ResumeDeliverRecordDTO resumeDeliverRecordDTO,@RequestAttribute String subject){
-        MessageResult<ResumeDeliverRecord> msgResult = new MessageResult<>();
+            MessageResult<ResumeDeliverRecord> msgResult = new MessageResult<>();
 
 
-        try {
+            try {
 
 
             ResumeDeliverRecord resumeDeliverRecord=new ResumeDeliverRecord();
             ResumeDeliverRecord resumeDeliverRecord=new ResumeDeliverRecord();
             resumeDeliverRecord.setId(UUID.randomUUID().toString());
             resumeDeliverRecord.setId(UUID.randomUUID().toString());
@@ -131,6 +131,9 @@ public class ResumeDeliverController {
                 resumeDeliverRecord.setChatDateStr(ChatDateStr);
                 resumeDeliverRecord.setChatDateStr(ChatDateStr);
                 resumeDeliverRecord.setBeginTime(beginTime);
                 resumeDeliverRecord.setBeginTime(beginTime);
                 resumeDeliverRecord.setEndTime(endTime);
                 resumeDeliverRecord.setEndTime(endTime);
+
+                resumeDeliverRecord.setRealName(resumeDeliverRecordDTO.getRealName());
+                resumeDeliverRecord.setCompanyPhone(resumeDeliverRecordDTO.getCompanyPhone());
             }
             }
             else if(resumeDeliverRecordDTO.getChatType().equals("3")){
             else if(resumeDeliverRecordDTO.getChatType().equals("3")){
                 //邀请面试
                 //邀请面试
@@ -147,6 +150,9 @@ public class ResumeDeliverController {
                     ChatDateStr = sdf.format(resumeDeliverRecordDTO.getChatDate());
                     ChatDateStr = sdf.format(resumeDeliverRecordDTO.getChatDate());
                 }
                 }
                 resumeDeliverRecord.setRemark("面试时间:" + ChatDateStr + " " + resumeDeliverRecordDTO.getChatTime());
                 resumeDeliverRecord.setRemark("面试时间:" + ChatDateStr + " " + resumeDeliverRecordDTO.getChatTime());
+
+                resumeDeliverRecord.setRealName(resumeDeliverRecordDTO.getRealName());
+                resumeDeliverRecord.setCompanyPhone(resumeDeliverRecordDTO.getCompanyPhone());
             }
             }
             else if(resumeDeliverRecordDTO.getChatType().equals("4")){
             else if(resumeDeliverRecordDTO.getChatType().equals("4")){
                 //邀请入职
                 //邀请入职