generated from dxfeng/secondev-chapanda-feishu
面试评价
This commit is contained in:
parent
be80417429
commit
af0d00095a
|
|
@ -25,12 +25,12 @@ public class RecruitRecordSet {
|
|||
* @param rs RecordSet
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, Object> getSingleRecordMap(RecordSet rs) {
|
||||
Map<String, Object> dataMap = new RecruitDataMap<>();
|
||||
public static RecruitDataMap<Object> getSingleRecordMap(RecordSet rs) {
|
||||
RecruitDataMap<Object> dataMap = new RecruitDataMap<>();
|
||||
if (rs.next()) {
|
||||
String[] columnNames = rs.getColumnName();
|
||||
for (String columnName : columnNames) {
|
||||
dataMap.put(columnName.toLowerCase(), RecruitModeUtil.parseBlankToNull(rs.getString(columnName)));
|
||||
dataMap.put(columnName, RecruitModeUtil.parseBlankToNull(rs.getString(columnName)));
|
||||
}
|
||||
}
|
||||
return dataMap;
|
||||
|
|
@ -103,6 +103,28 @@ public class RecruitRecordSet {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新数据
|
||||
*
|
||||
* @param dataMap
|
||||
* @param tableName
|
||||
* @param whereSql
|
||||
*/
|
||||
public static void updateData(Map<String, Object> dataMap, String tableName, String whereSql) {
|
||||
List<String> fieldList = new ArrayList<>();
|
||||
List<Object> dataList = new ArrayList<>();
|
||||
dataMap.forEach((key, value) -> {
|
||||
fieldList.add(key + " = ? ");
|
||||
dataList.add(value);
|
||||
});
|
||||
String updateSql = "update " + tableName + " set " + StringUtils.join(fieldList, ",") + whereSql;
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeUpdate(updateSql, dataList);
|
||||
if (StringUtils.isNotBlank(rs.getExceptionMsg())) {
|
||||
throw new CustomizeRunTimeException(rs.getExceptionMsg());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
|
|
|
|||
|
|
@ -78,4 +78,13 @@ public class RecruitMobileModeController {
|
|||
Map<String, Object> param = ParamUtil.request2Map(request);
|
||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getRecruitInterviewWrapper(user)::updateInterviewStatus, param);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/getInterviewEvaluateStatus")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getInterviewEvaluateStatus(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> param = ParamUtil.request2Map(request);
|
||||
return new ResponseResult<Map<String, Object>, String>(user).run(getRecruitInterviewWrapper(user)::getInterviewEvaluateStatus, param);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,4 +15,12 @@ public interface RecruitInterviewService {
|
|||
* @return
|
||||
*/
|
||||
Map<String, Object> updateInterviewStatus(Map<String, Object> param);
|
||||
|
||||
/**
|
||||
* 获取面试评价状态
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
String getInterviewEvaluateStatus(Map<String, Object> param);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,17 @@
|
|||
package com.engine.recruit.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.conn.ApplicantCommonInfo;
|
||||
import com.engine.recruit.conn.RecruitRecordSet;
|
||||
import com.engine.recruit.constant.RecruitConstant;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import com.engine.recruit.service.RecruitInterviewService;
|
||||
import com.weaver.formmodel.data.model.Formfield;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.resource.ResourceComInfo;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -86,4 +89,48 @@ public class RecruitInterviewServiceImpl extends Service implements RecruitInter
|
|||
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInterviewEvaluateStatus(Map<String, Object> param) {
|
||||
try {
|
||||
String id = Util.null2String(param.get("id"));
|
||||
String msg = Util.null2String(param.get("msg"));
|
||||
if (StringUtils.isBlank(msg)) {
|
||||
return "";
|
||||
}
|
||||
RecordSet rs = new RecordSet();
|
||||
int formId = ApplicantCommonInfo.getFormIdByTableName("uf_jcl_mspjfk");
|
||||
String[] split = msg.split(",");
|
||||
List<String> spanList = new ArrayList<>();
|
||||
ResourceComInfo resourceComInfo = new ResourceComInfo();
|
||||
for (String s : split) {
|
||||
rs.executeQuery("select jg,zt from uf_jcl_mspjfk where msid = ? and msg = ?", id, s);
|
||||
String jg = "";
|
||||
String zt = "";
|
||||
if (rs.next()) {
|
||||
jg = Util.null2String(rs.getString("jg"));
|
||||
zt = Util.null2String(rs.getString("zt"));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(jg)) {
|
||||
jg = ApplicantCommonInfo.getSelectName(String.valueOf(formId), "jg", jg);
|
||||
spanList.add("<a href=javaScript:openhrm(" + s + ") onclick=pointerXY(event)>" + resourceComInfo.getLastname(s) + "(" + jg + ")</a>");
|
||||
} else {
|
||||
String span = "<a href=javaScript:openhrm(" + s + ") onclick=pointerXY(event)>" + resourceComInfo.getLastname(s);
|
||||
if (StringUtils.isNotBlank(zt)) {
|
||||
zt = ApplicantCommonInfo.getSelectName(String.valueOf(formId), "zt", zt);
|
||||
span += "(" + zt + ")";
|
||||
}
|
||||
span += "</a>";
|
||||
spanList.add(span);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return StringUtils.join(spanList, "<br/>");
|
||||
} catch (Exception e) {
|
||||
throw new CustomizeRunTimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,4 +21,10 @@ public class RecruitInterviewWrapper extends Service {
|
|||
public Map<String, Object> updateInterviewStatus(Map<String, Object> param) {
|
||||
return getRecruitInterviewService(user).updateInterviewStatus(param);
|
||||
}
|
||||
|
||||
public String getInterviewEvaluateStatus(Map<String, Object> param) {
|
||||
return getRecruitInterviewService(user).getInterviewEvaluateStatus(param);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,6 +102,8 @@ public class BatchAddInterviewResultModeExpand extends AbstractModeExpandJavaCod
|
|||
modeRightInfo.setNewRight(true);
|
||||
modeRightInfo.editModeDataShare(user.getUID(), formModeId, bid);
|
||||
getApplicantsInfo(msgBuilder, Util.null2String(detailDataMap.get("ypz")), Util.null2String(detailDataMap.get("ypzw")));
|
||||
// 创建面试评价反馈数据
|
||||
InterviewEvaluate.createEvaluate(detailDataMap, bid, user);
|
||||
}
|
||||
|
||||
// 发送邮件
|
||||
|
|
@ -145,7 +147,7 @@ public class BatchAddInterviewResultModeExpand extends AbstractModeExpandJavaCod
|
|||
}
|
||||
} catch (Exception e) {
|
||||
new BaseBean().writeLog(e);
|
||||
result.put("errmsg", "自定义出错信息");
|
||||
result.put("errmsg", e.getMessage());
|
||||
result.put("flag", "false");
|
||||
}
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ public class CreateInterviewModeExpand extends AbstractModeExpandJavaCodeNew {
|
|||
*/
|
||||
private String title;
|
||||
|
||||
private final BaseBean baseBean = new BaseBean();
|
||||
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> params) {
|
||||
Map<String, String> result = new HashMap<>();
|
||||
|
|
@ -63,6 +65,8 @@ public class CreateInterviewModeExpand extends AbstractModeExpandJavaCodeNew {
|
|||
}
|
||||
InterviewOperateTypeEnum operateTypeEnum = InterviewOperateTypeEnum.getOperateType(operateType);
|
||||
if (operateTypeEnum == InterviewOperateTypeEnum.ARRANGE) {
|
||||
// 创建面试评价反馈数据
|
||||
InterviewEvaluate.createEvaluate(mainDataMap, billId, user);
|
||||
messageType = RecruitConstant.INTERVIEW_MESSAGE_TYPE;
|
||||
title = RecruitConstant.INTERVIEW_ADD_MESSAGE_TITLE;
|
||||
// 消息提醒
|
||||
|
|
@ -76,8 +80,8 @@ public class CreateInterviewModeExpand extends AbstractModeExpandJavaCodeNew {
|
|||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
new BaseBean().writeLog(e);
|
||||
result.put("errmsg", "自定义出错信息");
|
||||
baseBean.writeLog(e);
|
||||
result.put("errmsg", e.getMessage());
|
||||
result.put("flag", "false");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
package weaver.formmode.recruit.modeexpand.interview;
|
||||
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
import weaver.soa.workflow.request.RequestInfo;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/10/14
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class DeleteInterviewExpand extends AbstractModeExpandJavaCodeNew {
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> params) {
|
||||
Map<String, String> result = new HashMap<>();
|
||||
RecordSet rs = new RecordSet();
|
||||
try {
|
||||
//数据id
|
||||
int billId;
|
||||
//模块id
|
||||
int modeId;
|
||||
RequestInfo requestInfo = (RequestInfo) params.get("RequestInfo");
|
||||
User user = (User) params.get("user");
|
||||
if (requestInfo != null) {
|
||||
billId = Util.getIntValue(requestInfo.getRequestid());
|
||||
modeId = Util.getIntValue(requestInfo.getWorkflowid());
|
||||
if (billId > 0 && modeId > 0) {
|
||||
rs.executeUpdate("delete from uf_jcl_mspjfk where msid = ? ", billId);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
rs.writeLog(e);
|
||||
result.put("errmsg", e.getMessage());
|
||||
result.put("flag", "false");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
package weaver.formmode.recruit.modeexpand.interview;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
import weaver.soa.workflow.request.MainTableInfo;
|
||||
import weaver.soa.workflow.request.Property;
|
||||
import weaver.soa.workflow.request.RequestInfo;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/09/24
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class EditInterviewEvaluateExpand extends AbstractModeExpandJavaCodeNew {
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> params) {
|
||||
Map<String, String> result = new HashMap<>();
|
||||
RecordSet rs = new RecordSet();
|
||||
try {
|
||||
//数据id
|
||||
int billId;
|
||||
//模块id
|
||||
int modeId;
|
||||
RequestInfo requestInfo = (RequestInfo) params.get("RequestInfo");
|
||||
User user = (User) params.get("user");
|
||||
if (requestInfo != null) {
|
||||
billId = Util.getIntValue(requestInfo.getRequestid());
|
||||
modeId = Util.getIntValue(requestInfo.getWorkflowid());
|
||||
if (billId > 0 && modeId > 0) {
|
||||
String creater = requestInfo.getCreatorid();
|
||||
MainTableInfo mainTableInfo = requestInfo.getMainTableInfo();
|
||||
Property[] properties = mainTableInfo.getProperty();
|
||||
Map<String, Object> mainDataMap = new HashMap<>(16);
|
||||
for (Property property : properties) {
|
||||
mainDataMap.put(property.getName(), property.getValue());
|
||||
}
|
||||
String msid = Util.null2String(mainDataMap.get("msid"));
|
||||
String jg = Util.null2String(mainDataMap.get("jg"));
|
||||
rs.executeQuery("select * from uf_jcl_mspjfk where msid = ? and id != ? and jg is not null", msid, billId);
|
||||
boolean hasEvaluate = rs.next() || StringUtils.isNotBlank(jg);
|
||||
|
||||
if (hasEvaluate) {
|
||||
// 更新为已反馈
|
||||
rs.executeUpdate("update uf_jcl_ms set zt = 2 where id = ? ", msid);
|
||||
} else {
|
||||
// 更新为未反馈
|
||||
rs.executeUpdate("update uf_jcl_ms set zt = 0 where id = ? ", msid);
|
||||
}
|
||||
|
||||
//// 发送消息
|
||||
//String messageType = RecruitConstant.INTERVIEW_MESSAGE_TYPE;
|
||||
//String title = RecruitConstant.INTERVIEW_EVALUATE_MESSAGE_TITLE;
|
||||
//
|
||||
//
|
||||
//String ypz = Util.null2String(mainDataMap.get("ypz"));
|
||||
//String ypzw = Util.null2String(mainDataMap.get("ypzw"));
|
||||
//String msfkr = Util.null2String(mainDataMap.get("msfktxr"));
|
||||
//String msrq = Util.null2String(mainDataMap.get("msrq"));
|
||||
//String msg = Util.null2String(mainDataMap.get("msg"));
|
||||
//String ptmsg = Util.null2String(mainDataMap.get("ptmsg"));
|
||||
//String formId = Util.null2String(params.get("formId"));
|
||||
//
|
||||
//StringBuilder msgBuilder = new StringBuilder();
|
||||
//msgBuilder.append(RecruitModeUtil.getResourceNames(msfkr)).append("已经提交了面试评价");
|
||||
//msgBuilder.append("<br/>");
|
||||
//msgBuilder.append("应聘者:").append(ApplicantCommonInfo.getApplicantName(ypz)).append(";应聘职位:").append(ApplicantCommonInfo.getApplicantPosition(ypzw));
|
||||
//msgBuilder.append("<br/>");
|
||||
//msgBuilder.append("面试时间:").append(msrq).append(";面试官:").append(RecruitModeUtil.getResourceNames(msg)).append(",").append(RecruitModeUtil.getResourceNames(ptmsg));
|
||||
//msgBuilder.append("<br/>");
|
||||
//msgBuilder.append("面试结果:").append(ApplicantCommonInfo.getSelectName(formId, "jg", jg));
|
||||
//
|
||||
//
|
||||
//// 消息发送,通知创建人
|
||||
//Set<String> userIdSet = new HashSet<>();
|
||||
//userIdSet.add(creater);
|
||||
//String linkUrl = "spa/cube/index.html#/main/cube/card?billid=" + billId + "&type=0&modeId=" + modeId;
|
||||
//RecruitModeUtil.messagePush(messageType, title, msgBuilder.toString(), userIdSet, user.getUID(), linkUrl, "");
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
rs.writeLog(e);
|
||||
result.put("errmsg", e.getMessage());
|
||||
result.put("flag", "false");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
package weaver.formmode.recruit.modeexpand.interview;
|
||||
|
||||
import com.engine.recruit.conn.ApplicantCommonInfo;
|
||||
import com.engine.recruit.conn.RecruitDataMap;
|
||||
import com.engine.recruit.conn.RecruitRecordSet;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/09/23
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class InterviewEvaluate {
|
||||
private static final String TABLE_NAME = "uf_jcl_mspjfk";
|
||||
|
||||
/**
|
||||
* 创建面试,针对面试官创建面试反馈记录,同步批次ID,面试ID
|
||||
*
|
||||
* @param mainDataMap
|
||||
* @param msId
|
||||
* @param user
|
||||
*/
|
||||
public static void createEvaluate(Map<String, Object> mainDataMap, int msId, User user) {
|
||||
int formModeId = ApplicantCommonInfo.getModeIdByTableName(TABLE_NAME);
|
||||
if (formModeId < 0) {
|
||||
new BaseBean().writeLog("uf_jcl_mspjfk,未查询到对应模板");
|
||||
}
|
||||
String msg = Util.null2String(mainDataMap.get("msg"));
|
||||
if (StringUtils.isBlank(msg)) {
|
||||
throw new CustomizeRunTimeException("面试官为空,请检查面试官设置");
|
||||
}
|
||||
String[] split = msg.split(",");
|
||||
for (String msgId : split) {
|
||||
insertData(mainDataMap, msId, user, TABLE_NAME, formModeId, msgId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 调整面试,同步调整面试反馈记录,若删除面试官则删除对应的面试反馈记录,若增加面试官,则创建增加面试的面试反馈记录
|
||||
*
|
||||
* @param mainDataMap
|
||||
* @param msId
|
||||
* @param user
|
||||
*/
|
||||
public static void updateEvaluate(Map<String, Object> mainDataMap, int msId, User user) {
|
||||
RecordSet rs = new RecordSet();
|
||||
int formModeId = ApplicantCommonInfo.getModeIdByTableName(TABLE_NAME);
|
||||
if (formModeId < 0) {
|
||||
rs.writeLog("uf_jcl_mspjfk,未查询到对应模板");
|
||||
}
|
||||
String msg = Util.null2String(mainDataMap.get("msg"));
|
||||
if (StringUtils.isBlank(msg)) {
|
||||
throw new CustomizeRunTimeException("面试官为空,请检查面试官设置");
|
||||
}
|
||||
|
||||
// 删除非面试官数据
|
||||
rs.executeUpdate("delete from " + TABLE_NAME + " where msid=" + msId + " and msg not in (" + msg + ")");
|
||||
|
||||
String[] split = msg.split(",");
|
||||
String selectSql = "select id from " + TABLE_NAME + " where msid = ? and msg = ?";
|
||||
for (String msgId : split) {
|
||||
String billId = "";
|
||||
rs.executeQuery(selectSql, msId, msgId);
|
||||
if (rs.next()) {
|
||||
billId = rs.getString("id");
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(billId)) {
|
||||
// 新增数据
|
||||
insertData(mainDataMap, msId, user, TABLE_NAME, formModeId, msgId);
|
||||
} else {
|
||||
// 更新数据
|
||||
RecruitDataMap<Object> dataMap = new RecruitDataMap<>();
|
||||
// id
|
||||
dataMap.put("id", billId);
|
||||
// 应聘者
|
||||
dataMap.put("ypz", mainDataMap.get("ypz"));
|
||||
// 应聘职位
|
||||
dataMap.put("ypzw", mainDataMap.get("ypzw"));
|
||||
// 面试方式
|
||||
dataMap.put("msfs", mainDataMap.get("msfs"));
|
||||
// 面试环节
|
||||
dataMap.put("mshj", mainDataMap.get("mshj"));
|
||||
// 面试轮次
|
||||
dataMap.put("msc", mainDataMap.get("msc"));
|
||||
// 面试日期
|
||||
dataMap.put("msrq", mainDataMap.get("msrq"));
|
||||
// 面试地址
|
||||
dataMap.put("msdd", mainDataMap.get("msdd"));
|
||||
|
||||
// 更新数据
|
||||
RecruitRecordSet.updateDataById(dataMap, TABLE_NAME);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 取消面试,同步取消对应的面试反馈记录的面试状态为已取消
|
||||
*
|
||||
* @param msId
|
||||
*/
|
||||
public static void cancelEvaluate(int msId) {
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeUpdate("update " + TABLE_NAME + " set zt = 4 where msid=" + msId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 插入面试评价数据
|
||||
*
|
||||
* @param mainDataMap
|
||||
* @param msId
|
||||
* @param user
|
||||
* @param tableName
|
||||
* @param formModeId
|
||||
* @param msgId
|
||||
*/
|
||||
private static void insertData(Map<String, Object> mainDataMap, int msId, User user, String tableName, int formModeId, String msgId) {
|
||||
RecruitDataMap<Object> dataMap = new RecruitDataMap<>();
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
dataMap.put("modeuuid", uuid);
|
||||
dataMap.put("formmodeid", formModeId);
|
||||
RecruitRecordSet.buildModeInsertFields(dataMap, user.getUID());
|
||||
// 面试状态(设置为待面试)
|
||||
dataMap.put("zt", "0");
|
||||
// 批次ID
|
||||
dataMap.put("pcid", mainDataMap.get("pcid"));
|
||||
// 面试ID
|
||||
dataMap.put("msid", msId);
|
||||
// 应聘者
|
||||
dataMap.put("ypz", mainDataMap.get("ypz"));
|
||||
// 应聘职位
|
||||
dataMap.put("ypzw", mainDataMap.get("ypzw"));
|
||||
// 面试方式
|
||||
dataMap.put("msfs", mainDataMap.get("msfs"));
|
||||
// 面试环节
|
||||
dataMap.put("mshj", mainDataMap.get("mshj"));
|
||||
// 面试轮次
|
||||
dataMap.put("msc", mainDataMap.get("msc"));
|
||||
// 面试日期
|
||||
dataMap.put("msrq", mainDataMap.get("msrq"));
|
||||
// 面试地址
|
||||
dataMap.put("msdd", mainDataMap.get("msdd"));
|
||||
// 面试官
|
||||
dataMap.put("msg", msgId);
|
||||
|
||||
// 创建数据
|
||||
RecruitRecordSet.insertData(dataMap, tableName);
|
||||
// 刷新权限
|
||||
RecruitRecordSet.refreshRight(uuid, tableName, formModeId, user.getUID());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -76,10 +76,15 @@ public class UpdateInterviewModeExpand extends AbstractModeExpandJavaCodeNew {
|
|||
messageType = RecruitConstant.INTERVIEW_MESSAGE_TYPE;
|
||||
title = RecruitConstant.INTERVIEW_CANCEL_MESSAGE_TITLE;
|
||||
cancelInterView(params, requestInfo, billId, mainDataMap);
|
||||
// 更新面试评价状态为已取消
|
||||
InterviewEvaluate.cancelEvaluate(billId);
|
||||
// 发送邮件
|
||||
InterviewMsgUtil.sendEmailAndMsg(mainDataMap, billId, false);
|
||||
break;
|
||||
case ADJUSTMENT:
|
||||
// 更新面试评价
|
||||
InterviewEvaluate.updateEvaluate(mainDataMap, billId, user);
|
||||
|
||||
messageType = RecruitConstant.INTERVIEW_MESSAGE_TYPE;
|
||||
title = RecruitConstant.INTERVIEW_ADJUSTMENT_MESSAGE_TITLE;
|
||||
// 发送消息提醒
|
||||
|
|
|
|||
|
|
@ -0,0 +1,77 @@
|
|||
package weaver.formmode.recruit.modeexpand.interview;
|
||||
|
||||
import com.engine.recruit.constant.RecruitConstant;
|
||||
import com.weaver.formmodel.data.model.Formfield;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
import weaver.soa.workflow.request.MainTableInfo;
|
||||
import weaver.soa.workflow.request.Property;
|
||||
import weaver.soa.workflow.request.RequestInfo;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/10/12
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class UrgeInterviewEvaluationExpand extends AbstractModeExpandJavaCodeNew {
|
||||
private static final String MODE_TABLE_NAME = "uf_jcl_ms";
|
||||
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> params) {
|
||||
Map<String, String> result = new HashMap<>();
|
||||
RecordSet rs = new RecordSet();
|
||||
try {
|
||||
//数据id
|
||||
int billId;
|
||||
//模块id
|
||||
int modeId;
|
||||
RequestInfo requestInfo = (RequestInfo) params.get("RequestInfo");
|
||||
if (requestInfo != null) {
|
||||
billId = Util.getIntValue(requestInfo.getRequestid());
|
||||
modeId = Util.getIntValue(requestInfo.getWorkflowid());
|
||||
if (billId > 0 && modeId > 0) {
|
||||
User user = (User) params.get("user");
|
||||
MainTableInfo mainTableInfo = requestInfo.getMainTableInfo();
|
||||
Property[] properties = mainTableInfo.getProperty();
|
||||
Map<String, Object> mainDataMap = new HashMap<>();
|
||||
for (Property property : properties) {
|
||||
mainDataMap.put(property.getName(), property.getValue());
|
||||
}
|
||||
|
||||
// 发送消息
|
||||
|
||||
String msgContent = "您有一个面试还未评价,请尽快填写评价<br/>" +
|
||||
"应聘者:$ypz$ ;应聘职位:$ypzw$;面试时间:$msrq$";
|
||||
Set<String> userIdSet = new HashSet<>();
|
||||
|
||||
// 查询未反馈面试评价的面试官
|
||||
rs.executeQuery("select msg from uf_jcl_mspjfk where zt = 0 and msid = ?", billId);
|
||||
while (rs.next()) {
|
||||
userIdSet.add(rs.getString("msg"));
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(userIdSet)) {
|
||||
// 消息发送
|
||||
List<Formfield> fieldList = RecruitModeUtil.getFieldList(MODE_TABLE_NAME);
|
||||
Map<String, Formfield> fieldMap = fieldList.stream().collect(Collectors.toMap(Formfield::getFieldname, item -> item, (k1, k2) -> k1));
|
||||
String msgStr = RecruitModeUtil.getMsgReplaceStr(msgContent, fieldMap, mainDataMap);
|
||||
RecruitModeUtil.messagePush(RecruitConstant.INTERVIEW_MESSAGE_TYPE, RecruitConstant.INTERVIEW_EVALUATE_MESSAGE_TITLE, msgStr, userIdSet, user.getUID());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
rs.writeLog(e);
|
||||
result.put("errmsg", e.getMessage());
|
||||
result.put("flag", "false");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue