generated from dxfeng/secondev-chapanda-feishu
Merge branch 'develop' of http://221.226.25.34:3000/dxfeng/weaver-hrm-recruit into liangcheng
This commit is contained in:
commit
ff1f68e864
|
|
@ -1,5 +1,7 @@
|
|||
#\u805A\u624D\u6797\u62DB\u8058\u6D88\u606F\u63D0\u9192\uFF0C\u6D88\u606F\u6765\u6E90
|
||||
RECRUIT_MESSAGE_TYPE=2022061063
|
||||
|
||||
|
||||
#\u9762\u8BD5\u76F8\u5173\u6D88\u606F\u63D0\u9192\uFF0C\u6D88\u606F\u6765\u6E90
|
||||
INTERVIEW_MESSAGE_TYPE=2022061063
|
||||
#\u6DFB\u52A0\u9762\u8BD5\u6D88\u606F\u63D0\u9192\u6807\u9898
|
||||
|
|
@ -8,8 +10,15 @@ INTERVIEW_ADD_MESSAGE_TITLE=\u9762\u8BD5\u5B89\u6392\u63D0\u9192
|
|||
INTERVIEW_CANCEL_MESSAGE_TITLE=\u53D6\u6D88\u9762\u8BD5\u63D0\u9192
|
||||
#\u9762\u8BD5\u8BC4\u4EF7\u6D88\u606F\u63D0\u9192\u6807\u9898
|
||||
INTERVIEW_EVALUATE_MESSAGE_TITLE=\u9762\u8BD5\u8BC4\u4EF7\u63D0\u9192
|
||||
|
||||
|
||||
#\u4EBA\u624D\u9ED1\u540D\u5355\u901A\u77E5
|
||||
JOIN_BLACKLIST_MESSAGE_TITLE=\u4EBA\u624D\u9ED1\u540D\u5355\u901A\u77E5
|
||||
|
||||
#\u7B5B\u9009\u53CD\u9988
|
||||
SCREENING_MESSAGE_TYPE=2022061063
|
||||
SCREENING_MESSAGE_TITLE=\u7B80\u5386\u7B5B\u9009
|
||||
SCREENING_MESSAGE_URL=/wui/index.html#/main/cube/search?customid=65
|
||||
|
||||
#\u5E94\u8058\u8005\u7B80\u5386\u5B58\u653E\u76EE\u5F55ID
|
||||
APPLICANTS_RESUMES_CATEGORY=110
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.api.recruit.controller;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/23
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Path("/jcl/recruit/induction")
|
||||
public class InductionManageController extends com.engine.recruit.controller.InductionManageController{
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.api.recruit.controller;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/20
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Path("/jcl/recruit/talentpool")
|
||||
public class TalentPoolController extends com.engine.recruit.controller.TalentPoolController{
|
||||
}
|
||||
|
|
@ -1,9 +1,12 @@
|
|||
package com.engine.recruit.conn;
|
||||
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.common.DateUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||
import weaver.formmode.setup.ModeRightInfo;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -52,6 +55,9 @@ public class RecruitRecordSet {
|
|||
String insertSql = " insert into " + tableName + "(" + StringUtils.join(fieldList, ",") + ") values (" + StringUtils.join(paramList, ",") + ")";
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeUpdate(insertSql, dataList);
|
||||
if (StringUtils.isNotBlank(rs.getExceptionMsg())) {
|
||||
throw new CustomizeRunTimeException(rs.getExceptionMsg());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -70,4 +76,26 @@ public class RecruitRecordSet {
|
|||
mainDataMap.put("modedatacreatertype", "0");
|
||||
}
|
||||
|
||||
/**
|
||||
* 建模表数据权限重构
|
||||
*
|
||||
* @param uuid
|
||||
* @param modeTable
|
||||
* @param formModeId
|
||||
*/
|
||||
public static int refreshRight(String uuid, String modeTable, int formModeId) {
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select id from " + modeTable + " where modeuuid='" + uuid + "'");
|
||||
if (rs.next()) {
|
||||
//建模数据的id
|
||||
int bid = Util.getIntValue(rs.getString("id"));
|
||||
ModeRightInfo modeRightInfo = new ModeRightInfo();
|
||||
modeRightInfo.setNewRight(true);
|
||||
//新建的时候添加共享
|
||||
modeRightInfo.editModeDataShare(1, formModeId, bid);
|
||||
return bid;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
package com.engine.recruit.constant;
|
||||
|
||||
/**
|
||||
* 聚才林招聘,建模表
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/17
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class ModeTable {
|
||||
/**
|
||||
* JCL_应聘批次简历
|
||||
*/
|
||||
public static final String UF_JCL_YPPC = "uf_jcl_yppc";
|
||||
|
||||
/**
|
||||
* JCL_招聘阶段设置
|
||||
*/
|
||||
public static final String UF_JCL_ZPJDSZ = "uf_jcl_zpjdsz";
|
||||
/**
|
||||
* JCL_招聘流程
|
||||
*/
|
||||
public static final String UF_JCL_ZPLC = "uf_jcl_zplc";
|
||||
|
||||
|
||||
/**
|
||||
* 获取明细表表名
|
||||
*
|
||||
* @param mainTableName 主表表名
|
||||
* @param detailNum 明细表序号
|
||||
* @return 明细表表名
|
||||
*/
|
||||
public static String getDetailTableName(String mainTableName, int detailNum) {
|
||||
return mainTableName + "_dt" + detailNum;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package com.engine.recruit.controller;
|
||||
|
||||
import com.engine.common.util.ParamUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.recruit.util.ResponseResult;
|
||||
import com.engine.recruit.wrapper.InductionManageWrapper;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/23
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class InductionManageController {
|
||||
public InductionManageWrapper getInductionManageWrapper(User user) {
|
||||
return ServiceUtil.getService(InductionManageWrapper.class, user);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/updateInductionManageInfo")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String updateInductionManageInfo(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> params = ParamUtil.request2Map(request);
|
||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getInductionManageWrapper(user)::updateInductionManageInfo, params);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/sendCollectInfo")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String sendCollectInfo(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> params = ParamUtil.request2Map(request);
|
||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getInductionManageWrapper(user)::sendCollectInfo, params);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/checkLoginInfo")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String checkLoginInfo(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> params = ParamUtil.request2Map(request);
|
||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getInductionManageWrapper(user)::checkLoginInfo, params);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.engine.recruit.controller;
|
||||
|
||||
import com.engine.common.util.ParamUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.recruit.util.ResponseResult;
|
||||
import com.engine.recruit.wrapper.TalentPoolWrapper;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/20
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class TalentPoolController {
|
||||
public TalentPoolWrapper getTalentPoolWrapper(User user) {
|
||||
return ServiceUtil.getService(TalentPoolWrapper.class, user);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/removeBlacklist")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String removeBlacklist(@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>, Map<String, Object>>(user).run(getTalentPoolWrapper(user)::removeBlacklist, param);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.engine.recruit.enums;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/24
|
||||
* @version: 1.0
|
||||
*/
|
||||
public enum InfoCollectEnum {
|
||||
/**
|
||||
* 信息采集状态
|
||||
*/
|
||||
NOT_SENT(0, "未发送"),
|
||||
HAS_SENT(1, "已发送"),
|
||||
NOT_SUBMITTED(2, "未提交"),
|
||||
SUBMITTED(3, "已提交");
|
||||
|
||||
InfoCollectEnum(Integer id, String name) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
private Integer id;
|
||||
private String name;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.engine.recruit.enums;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/23
|
||||
* @version: 1.0
|
||||
*/
|
||||
public enum PositionOperateEnum {
|
||||
/**
|
||||
* 入职管理相关操作
|
||||
*/
|
||||
PREPARE("prepare", "入职准备"),
|
||||
HANDLE("prepare", "办理入职"),
|
||||
;
|
||||
|
||||
PositionOperateEnum(String operateType, String operateDesc) {
|
||||
this.operateType = operateType;
|
||||
this.operateDesc = operateDesc;
|
||||
}
|
||||
|
||||
private String operateType;
|
||||
private String operateDesc;
|
||||
|
||||
public String getOperateType() {
|
||||
return operateType;
|
||||
}
|
||||
|
||||
public void setOperateType(String operateType) {
|
||||
this.operateType = operateType;
|
||||
}
|
||||
|
||||
public String getOperateDesc() {
|
||||
return operateDesc;
|
||||
}
|
||||
|
||||
public void setOperateDesc(String operateDesc) {
|
||||
this.operateDesc = operateDesc;
|
||||
}
|
||||
|
||||
public static PositionOperateEnum getOperateType(String operateType) {
|
||||
for (PositionOperateEnum item : PositionOperateEnum.values()) {
|
||||
if (item.operateType.equalsIgnoreCase(operateType)) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
throw new RuntimeException("不支持的操作类型");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.engine.recruit.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/23
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface InductionManageService {
|
||||
/**
|
||||
* 更新入职管理信息
|
||||
*
|
||||
* @param param 参数
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> updateInductionManageInfo(Map<String, Object> param);
|
||||
|
||||
|
||||
/**
|
||||
* 发送信息采集
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> sendCollectInfo(Map<String, Object> param);
|
||||
|
||||
/**
|
||||
* 校验登录信息
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> checkLoginInfo(Map<String, Object> param);
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.engine.recruit.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/20
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface TalentPoolService {
|
||||
|
||||
/**
|
||||
* 移出黑名单
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> removeBlacklist(Map<String, Object> param);
|
||||
}
|
||||
|
|
@ -0,0 +1,147 @@
|
|||
package com.engine.recruit.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.conn.RecruitDataMap;
|
||||
import com.engine.recruit.conn.RecruitRecordSet;
|
||||
import com.engine.recruit.enums.InfoCollectEnum;
|
||||
import com.engine.recruit.enums.PositionOperateEnum;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import com.engine.recruit.service.InductionManageService;
|
||||
import com.engine.recruit.util.RecruitMessageUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/23
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class InductionManageServiceImpl extends Service implements InductionManageService {
|
||||
@Override
|
||||
public Map<String, Object> updateInductionManageInfo(Map<String, Object> param) {
|
||||
String operateType = Util.null2String(param.get("operateType"));
|
||||
|
||||
if (PositionOperateEnum.PREPARE.getOperateType().equals(operateType)) {
|
||||
// 发起入职准备
|
||||
|
||||
// 反填流程信息到建模表
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> sendCollectInfo(Map<String, Object> param) {
|
||||
String ids = Util.null2String(param.get("ids"));
|
||||
String[] split = ids.split(",");
|
||||
|
||||
RecordSet rs = new RecordSet();
|
||||
for (String billId : split) {
|
||||
// 判断是否已发送信息采集,已发送的不重复发送
|
||||
rs.executeQuery("select a.id from uf_jcl_xxcj a inner join uf_jcl_rzgl b on a.xm = b.xm and a.sjh = b.sjhm where b.id = ? ", billId);
|
||||
if (rs.next()) {
|
||||
if (StringUtils.isNotBlank(rs.getString("id"))) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 根据入职管理信息完善信息采集表单
|
||||
Map<String, Object> dataMap = new RecruitDataMap<>();
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
dataMap.put("modeuuid", uuid);
|
||||
int formModeId = -1;
|
||||
rs.executeQuery("select id from modeinfo where formid =( select id from workflow_bill where tablename = 'uf_jcl_xxcj' )");
|
||||
if (rs.next()) {
|
||||
formModeId = rs.getInt("id");
|
||||
}
|
||||
dataMap.put("formmodeid", formModeId);
|
||||
// 构建建模表基本数据
|
||||
RecruitRecordSet.buildModeBaseFields(dataMap, user.getUID());
|
||||
|
||||
rs.executeQuery("select * from uf_jcl_rzgl where id = ? ", billId);
|
||||
if (rs.next()) {
|
||||
dataMap.put("xm", RecruitModeUtil.parseBlankToNull(rs.getString("xm")));
|
||||
dataMap.put("sfzh", RecruitModeUtil.parseBlankToNull(rs.getString("sfzh")));
|
||||
dataMap.put("nl", RecruitModeUtil.parseBlankToNull(rs.getString("nl")));
|
||||
dataMap.put("xb", RecruitModeUtil.parseBlankToNull(rs.getString("xb")));
|
||||
dataMap.put("sjh", RecruitModeUtil.parseBlankToNull(rs.getString("sjhm")));
|
||||
dataMap.put("yx", RecruitModeUtil.parseBlankToNull(rs.getString("dzyx")));
|
||||
}
|
||||
|
||||
|
||||
// 生成登录密码
|
||||
String password = generatePassword();
|
||||
dataMap.put("mm", password);
|
||||
|
||||
|
||||
// 发送短信
|
||||
String mobile = Util.null2String(dataMap.get("sjh"));
|
||||
String messageContent = RecruitModeUtil.getRecruitPropValue("COLLECT_MESSAGE_CONTENT");
|
||||
if (StringUtils.isBlank(messageContent)) {
|
||||
throw new CustomizeRunTimeException("未获取到短信内容,请检查配置");
|
||||
} else {
|
||||
RecruitMessageUtils.sendSMS(mobile, messageContent);
|
||||
}
|
||||
// 插入数据
|
||||
RecruitRecordSet.insertData(dataMap, "uf_jcl_xxcj");
|
||||
int id = RecruitRecordSet.refreshRight(uuid, "uf_jcl_xxcj", formModeId);
|
||||
|
||||
// 更新状态为已发送,反填信息采集ID
|
||||
rs.executeUpdate("update uf_jcl_rzgl set xxcj = ? ,xxcjid = ? where id = ? ", InfoCollectEnum.HAS_SENT.getId(), id, billId);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> checkLoginInfo(Map<String, Object> param) {
|
||||
RecordSet rs = new RecordSet();
|
||||
String mobile = Util.null2String(param.get("mobile"));
|
||||
String pwd = Util.null2String(param.get("pwd"));
|
||||
rs.executeQuery("select id from uf_jcl_xxcj where sjh = ? and mm = ?", mobile, pwd);
|
||||
rs.next();
|
||||
return new HashMap<String, Object>() {{
|
||||
put("id", Util.getIntValue(rs.getString("id")));
|
||||
}};
|
||||
}
|
||||
|
||||
/**
|
||||
* 随机八位不重复登录密码,含数字、字母
|
||||
*
|
||||
* @return 登录密码
|
||||
*/
|
||||
private String generatePassword() {
|
||||
String letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
String numbers = "0123456789";
|
||||
String characters = letters + numbers;
|
||||
|
||||
List<Character> randomChars = new ArrayList<>();
|
||||
Random random = new Random();
|
||||
|
||||
// 随机取得一个字母
|
||||
randomChars.add(letters.charAt(random.nextInt(letters.length())));
|
||||
|
||||
// 随机取得一个数字
|
||||
randomChars.add(numbers.charAt(random.nextInt(numbers.length())));
|
||||
|
||||
// 随机取得六个字符(字母或数字)
|
||||
for (int i = 0; i < 6; i++) {
|
||||
randomChars.add(characters.charAt(random.nextInt(characters.length())));
|
||||
}
|
||||
|
||||
// 打乱字符的顺序
|
||||
Collections.shuffle(randomChars);
|
||||
|
||||
// 将字符列表转为字符串
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (char c : randomChars) {
|
||||
sb.append(c);
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.engine.recruit.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import com.engine.recruit.service.TalentPoolService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/20
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class TalentPoolServiceImpl extends Service implements TalentPoolService {
|
||||
@Override
|
||||
public Map<String, Object> removeBlacklist(Map<String, Object> param) {
|
||||
String ids = Util.null2String(param.get("ids"));
|
||||
if (StringUtils.isBlank(ids)) {
|
||||
throw new CustomizeRunTimeException("");
|
||||
}
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeUpdate("update uf_jcl_rck set sfjrhmd = 1 where id in (" + ids + ")");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -15,13 +15,20 @@ public class RecruitMessageUtils {
|
|||
String sendTo = Util.null2String(param.get("sendTo"));
|
||||
String emailTitle = Util.null2String(param.get("emailTitle"));
|
||||
String emailContent = Util.null2String(param.get("emailContent"));
|
||||
//EmailWorkRunnable.threadModeReminder(sendTo, emailTitle, emailContent);
|
||||
return MessageUtil.sendEmail(sendTo, emailTitle, emailContent);
|
||||
return SendEmail(sendTo, emailTitle, emailContent);
|
||||
}
|
||||
|
||||
public static boolean sendSMS(Map<String, Object> param) {
|
||||
String receiver = Util.null2String(param.get("receiver"));
|
||||
String content = Util.null2String(param.get("content"));
|
||||
return sendSMS(receiver, content);
|
||||
}
|
||||
|
||||
public static boolean SendEmail(String sendTo, String emailTitle, String emailContent) {
|
||||
return MessageUtil.sendEmail(sendTo, emailTitle, emailContent);
|
||||
}
|
||||
|
||||
public static boolean sendSMS(String receiver, String content) {
|
||||
return MessageUtil.sendSMS(receiver, content);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ package com.engine.recruit.util;
|
|||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import com.engine.core.exception.ECException;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -142,7 +142,7 @@ public class ResponseResult<T, R> {
|
|||
*/
|
||||
private String Ok() {
|
||||
Map<String, Object> apidatas = new HashMap<>();
|
||||
apidatas.put("status", true);
|
||||
apidatas.put("api_status", true);
|
||||
return JSONObject.toJSONString(apidatas, SerializerFeature.DisableCircularReferenceDetect);
|
||||
}
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ public class ResponseResult<T, R> {
|
|||
*/
|
||||
private String Ok(R r) {
|
||||
Map<String, Object> apidatas = new HashMap<>();
|
||||
apidatas.put("status", true);
|
||||
apidatas.put("api_status", true);
|
||||
apidatas.put("data", r);
|
||||
String success = getJsonString(apidatas);
|
||||
if (isLog) {
|
||||
|
|
@ -167,7 +167,7 @@ public class ResponseResult<T, R> {
|
|||
*/
|
||||
private static String Error(String message) {
|
||||
Map<String, Object> apidatas = new HashMap<>();
|
||||
apidatas.put("status", false);
|
||||
apidatas.put("api_status", false);
|
||||
apidatas.put("errormsg", message);
|
||||
return JSONObject.toJSONString(apidatas, SerializerFeature.DisableCircularReferenceDetect);
|
||||
}
|
||||
|
|
@ -178,7 +178,7 @@ public class ResponseResult<T, R> {
|
|||
*/
|
||||
private static String Error(String message, Exception e) {
|
||||
Map<String, Object> apidatas = new HashMap<>();
|
||||
apidatas.put("status", false);
|
||||
apidatas.put("api_status", false);
|
||||
apidatas.put("errormsg", message);
|
||||
apidatas.put("error", e.getMessage());
|
||||
return JSONObject.toJSONString(apidatas, SerializerFeature.DisableCircularReferenceDetect);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
package com.engine.recruit.wrapper;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.service.InductionManageService;
|
||||
import com.engine.recruit.service.impl.InductionManageServiceImpl;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/23
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class InductionManageWrapper extends Service {
|
||||
private InductionManageService getInductionManageService(User user) {
|
||||
return ServiceUtil.getService(InductionManageServiceImpl.class, user);
|
||||
}
|
||||
|
||||
public Map<String, Object> updateInductionManageInfo(Map<String, Object> param) {
|
||||
return getInductionManageService(user).updateInductionManageInfo(param);
|
||||
}
|
||||
|
||||
public Map<String, Object> sendCollectInfo(Map<String, Object> param) {
|
||||
return getInductionManageService(user).sendCollectInfo(param);
|
||||
}
|
||||
|
||||
public Map<String, Object> checkLoginInfo(Map<String, Object> param) {
|
||||
return getInductionManageService(user).checkLoginInfo(param);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.engine.recruit.wrapper;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.service.TalentPoolService;
|
||||
import com.engine.recruit.service.impl.TalentPoolServiceImpl;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/20
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class TalentPoolWrapper extends Service {
|
||||
private TalentPoolService getTalentPoolService(User user) {
|
||||
return ServiceUtil.getService(TalentPoolServiceImpl.class, user);
|
||||
}
|
||||
|
||||
public Map<String, Object> removeBlacklist(Map<String, Object> param) {
|
||||
return getTalentPoolService(user).removeBlacklist(param);
|
||||
}
|
||||
}
|
||||
|
|
@ -5,6 +5,8 @@ import org.apache.commons.lang3.StringUtils;
|
|||
import weaver.common.DateUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import weaver.formmode.recruit.modeexpand.util.ApplicantCommonInfo;
|
||||
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||
import weaver.formmode.setup.ModeRightInfo;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
|
|
@ -75,6 +77,8 @@ public class BatchAddDeptScreeningModeExpand extends AbstractModeExpandJavaCodeN
|
|||
detailMapList.add(detailDataMap);
|
||||
}
|
||||
|
||||
StringBuilder msgBuilder = new StringBuilder();
|
||||
msgBuilder.append(user.getLastname()).append("给你发来简历进行筛选,请查看。<br/>");
|
||||
for (Map<String, Object> detailDataMap : detailMapList) {
|
||||
List<List<Object>> paramList = new ArrayList<>();
|
||||
buildParamList(detailDataMap, paramList);
|
||||
|
|
@ -87,7 +91,18 @@ public class BatchAddDeptScreeningModeExpand extends AbstractModeExpandJavaCodeN
|
|||
refreshRight(rs, uuid, formModeId);
|
||||
}
|
||||
}
|
||||
String applicantName = ApplicantCommonInfo.getApplicantName(Util.null2String(detailDataMap.get("ypz")));
|
||||
String applicantPosition = ApplicantCommonInfo.getApplicantPosition(Util.null2String(detailDataMap.get("ypzw")));
|
||||
msgBuilder.append("【应聘者:").append(applicantName).append(",应聘职位:").append(applicantPosition).append("】").append("<br/>");
|
||||
}
|
||||
|
||||
// 发送待办消息
|
||||
String messageType = RecruitModeUtil.getRecruitPropValue("SCREENING_MESSAGE_TYPE");
|
||||
String messageTitle = RecruitModeUtil.getRecruitPropValue("SCREENING_MESSAGE_TITLE");
|
||||
String linkUrl = RecruitModeUtil.getRecruitPropValue("SCREENING_MESSAGE_URL");
|
||||
String fkr = Util.null2String(mainDataMap.get("fkr"));
|
||||
Set<String> userIdSet = new HashSet<>(Arrays.asList(fkr.split(",")));
|
||||
RecruitModeUtil.messagePush(messageType, messageTitle, msgBuilder.toString(), userIdSet, user.getUID(), linkUrl, "");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
new BaseBean().writeLog(e);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import org.apache.commons.lang3.StringUtils;
|
|||
import weaver.common.DateUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import weaver.formmode.recruit.modeexpand.util.ApplicantCommonInfo;
|
||||
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||
import weaver.formmode.setup.ModeRightInfo;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
|
|
@ -76,6 +78,18 @@ public class SingleAddDeptScreeningModeExpand extends AbstractModeExpandJavaCode
|
|||
refreshRight(rs, uuid, formModeId);
|
||||
}
|
||||
}
|
||||
// 发送待办消息
|
||||
String messageType = RecruitModeUtil.getRecruitPropValue("SCREENING_MESSAGE_TYPE");
|
||||
String messageTitle = RecruitModeUtil.getRecruitPropValue("SCREENING_MESSAGE_TITLE");
|
||||
String linkUrl = RecruitModeUtil.getRecruitPropValue("SCREENING_MESSAGE_URL");
|
||||
String fkr = Util.null2String(dataMap.get("fkr"));
|
||||
String applicantName = ApplicantCommonInfo.getApplicantName(Util.null2String(param.get("ypz")));
|
||||
String applicantPosition = ApplicantCommonInfo.getApplicantPosition(Util.null2String(param.get("ypzw")));
|
||||
String messageContent = user.getLastname() + "给你发来简历进行筛选,请查看。<br/>" +
|
||||
"【应聘者:" + applicantName + ",应聘职位:" + applicantPosition + "】";
|
||||
|
||||
Set<String> userIdSet = new HashSet<>(Arrays.asList(fkr.split(",")));
|
||||
RecruitModeUtil.messagePush(messageType, messageTitle, messageContent, userIdSet, user.getUID(), linkUrl, "");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
new BaseBean().writeLog(e);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import weaver.general.Util;
|
|||
import weaver.hrm.User;
|
||||
import weaver.soa.workflow.request.*;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
|
@ -36,9 +35,9 @@ public class BatchAddInterviewResultModeExpand extends AbstractModeExpandJavaCod
|
|||
*/
|
||||
private final String title;
|
||||
|
||||
public BatchAddInterviewResultModeExpand() throws UnsupportedEncodingException {
|
||||
public BatchAddInterviewResultModeExpand() {
|
||||
super();
|
||||
messageType = RecruitModeUtil.getRecruitPropValue("RECRUIT_MESSAGE_TYPE");
|
||||
messageType = RecruitModeUtil.getRecruitPropValue("INTERVIEW_MESSAGE_TYPE");
|
||||
title = RecruitModeUtil.getRecruitPropValue("INTERVIEW_ADD_MESSAGE_TITLE");
|
||||
}
|
||||
|
||||
|
|
@ -188,7 +187,6 @@ public class BatchAddInterviewResultModeExpand extends AbstractModeExpandJavaCod
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取应聘者信息
|
||||
*
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public class CreateInterviewModeExpand extends AbstractModeExpandJavaCodeNew {
|
|||
InterviewOperateTypeEnum operateTypeEnum = InterviewOperateTypeEnum.getOperateType(operateType);
|
||||
switch (operateTypeEnum) {
|
||||
case ARRANGE:
|
||||
messageType = RecruitModeUtil.getRecruitPropValue("RECRUIT_MESSAGE_TYPE");
|
||||
messageType = RecruitModeUtil.getRecruitPropValue("INTERVIEW_MESSAGE_TYPE");
|
||||
title = RecruitModeUtil.getRecruitPropValue("INTERVIEW_ADD_MESSAGE_TITLE");
|
||||
arrangeInterview(user, mainDataMap);
|
||||
sendMessage(billId);
|
||||
|
|
@ -131,22 +131,25 @@ public class CreateInterviewModeExpand extends AbstractModeExpandJavaCodeNew {
|
|||
}
|
||||
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
switch (tzypz) {
|
||||
case "0":
|
||||
// 邮件
|
||||
params.put("sendTo",dzyx);
|
||||
params.put("emailTitle",getEmailTitle(yjtzmb));
|
||||
params.put("emailContent",yjnr);
|
||||
RecruitMessageUtils.SendEmail(params);
|
||||
break;
|
||||
case "1":
|
||||
// 短信
|
||||
params.put("receiver",sjhm);
|
||||
params.put("content",yjnr);
|
||||
RecruitMessageUtils.sendSMS(params);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
String[] ways = tzypz.split(",");
|
||||
for (String way : ways) {
|
||||
switch (way) {
|
||||
case "0":
|
||||
// 邮件
|
||||
params.put("sendTo", dzyx);
|
||||
params.put("emailTitle", getEmailTitle(yjtzmb));
|
||||
params.put("emailContent", yjnr);
|
||||
RecruitMessageUtils.SendEmail(params);
|
||||
break;
|
||||
case "1":
|
||||
// 短信
|
||||
params.put("receiver", sjhm);
|
||||
params.put("content", yjnr);
|
||||
RecruitMessageUtils.sendSMS(params);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -156,7 +159,7 @@ public class CreateInterviewModeExpand extends AbstractModeExpandJavaCodeNew {
|
|||
*/
|
||||
private String getEmailTitle (String id) {
|
||||
String emailTitle = "";
|
||||
recordSet.executeQuery("select yjzt from uf_jcl_yjtzmb where id = "+ id);
|
||||
recordSet.executeQuery("select yjzt from uf_jcl_yjtzmb where id = ?", id);
|
||||
if (recordSet.next()) {
|
||||
emailTitle = recordSet.getString("yjzt");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,13 +63,13 @@ public class UpdateInterviewModeExpand extends AbstractModeExpandJavaCodeNew {
|
|||
switch (operateTypeEnum) {
|
||||
case EVALUATE:
|
||||
// 面试评价
|
||||
messageType = RecruitModeUtil.getRecruitPropValue("RECRUIT_MESSAGE_TYPE");
|
||||
messageType = RecruitModeUtil.getRecruitPropValue("INTERVIEW_MESSAGE_TYPE");
|
||||
title = RecruitModeUtil.getRecruitPropValue("INTERVIEW_EVALUATE_MESSAGE_TITLE");
|
||||
evaluateInterview(params, requestInfo.getCreatorid(), mainDataMap);
|
||||
break;
|
||||
case CANCEL:
|
||||
// 面试取消
|
||||
messageType = RecruitModeUtil.getRecruitPropValue("RECRUIT_MESSAGE_TYPE");
|
||||
messageType = RecruitModeUtil.getRecruitPropValue("INTERVIEW_MESSAGE_TYPE");
|
||||
title = RecruitModeUtil.getRecruitPropValue("INTERVIEW_CANCEL_MESSAGE_TITLE");
|
||||
cancelInterView(params, requestInfo, billId, mainDataMap);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,112 @@
|
|||
package weaver.formmode.recruit.modeexpand.offer;
|
||||
|
||||
import com.engine.recruit.util.RecruitMessageUtils;
|
||||
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;
|
||||
|
||||
public class CreateOfferModeExpand extends AbstractModeExpandJavaCodeNew {
|
||||
/**
|
||||
* 消息来源ID
|
||||
*/
|
||||
private String messageType;
|
||||
|
||||
/**
|
||||
* 消息提醒标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
private final RecordSet recordSet = new RecordSet();
|
||||
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> params) {
|
||||
Map<String, String> result = new HashMap<>();
|
||||
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) {
|
||||
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());
|
||||
}
|
||||
// 发送信息
|
||||
sendMessage(billId);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
result.put("errmsg", "自定义出错信息");
|
||||
result.put("flag", "false");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private void sendMessage(int billId) {
|
||||
String querySql = "select sjhm,dzyx,yjtzmb,tznr,tzypz from uf_jcl_offer where id = ?";
|
||||
recordSet.executeQuery(querySql,billId);
|
||||
String sjhm = "";
|
||||
String dzyx = "";
|
||||
String yjtzmb = "";
|
||||
String tznr = "";
|
||||
String tzypz = "";
|
||||
while (recordSet.next()) {
|
||||
sjhm = Util.null2String(recordSet.getString("sjhm"));
|
||||
dzyx = Util.null2String(recordSet.getString("dzyx"));
|
||||
yjtzmb = Util.null2String(recordSet.getString("yjtzmb"));
|
||||
tznr = Util.null2String(recordSet.getString("tznr"));
|
||||
tzypz = Util.null2String(recordSet.getString("tzypz"));
|
||||
}
|
||||
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
String[] ways = tzypz.split(",");
|
||||
for (String way : ways) {
|
||||
switch (way) {
|
||||
case "0":
|
||||
// 邮件
|
||||
params.put("sendTo", dzyx);
|
||||
params.put("emailTitle", getEmailTitle(yjtzmb));
|
||||
params.put("emailContent", tznr);
|
||||
RecruitMessageUtils.SendEmail(params);
|
||||
break;
|
||||
case "1":
|
||||
// 短信
|
||||
params.put("receiver", sjhm);
|
||||
params.put("content", tznr);
|
||||
RecruitMessageUtils.sendSMS(params);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取邮件模板主题
|
||||
* @param id
|
||||
*/
|
||||
private String getEmailTitle (String id) {
|
||||
String emailTitle = "";
|
||||
recordSet.executeQuery("select yjzt from uf_jcl_yjtzmb where id = ?", id);
|
||||
if (recordSet.next()) {
|
||||
emailTitle = recordSet.getString("yjzt");
|
||||
}
|
||||
return emailTitle;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
package weaver.formmode.recruit.modeexpand.position;
|
||||
|
||||
import com.engine.recruit.constant.ModeTable;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
|
|
@ -45,7 +44,7 @@ public class PositionRelatedStageExpand extends AbstractModeExpandJavaCodeNew {
|
|||
}
|
||||
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select ksjd, gcjd, jsjd from " + ModeTable.UF_JCL_ZPLC + " where id = ? ", zplc);
|
||||
rs.executeQuery("select ksjd, gcjd, jsjd from uf_jcl_zplc where id = ? ", zplc);
|
||||
if (rs.next()) {
|
||||
// 开始阶段
|
||||
String ksjd = mainDataMap.get("ksjd");
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package weaver.formmode.recruit.modeexpand.position;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.engine.recruit.constant.ModeTable;
|
||||
import com.engine.recruit.enums.ApplicationStatusEnum;
|
||||
import com.engine.recruit.enums.CommonBrowserTypeEnum;
|
||||
import com.engine.recruit.enums.HighestDegreeEnum;
|
||||
|
|
@ -82,7 +81,7 @@ public class ResumeSavedThread extends LocalRunnable {
|
|||
params.put("zt", ApplicationStatusEnum.DISTRIBUTION.getValue());
|
||||
|
||||
// 填充建模数据基本信息
|
||||
int formModeId = ApplicantCommonInfo.getModeIdByTableName(ModeTable.UF_JCL_YPPC);
|
||||
int formModeId = ApplicantCommonInfo.getModeIdByTableName("uf_jcl_yppc");
|
||||
params.put("formmodeid", formModeId);
|
||||
params.put("modedatacreater", user.getUID());
|
||||
String dateTime = DateUtil.getFullDate();
|
||||
|
|
@ -102,13 +101,13 @@ public class ResumeSavedThread extends LocalRunnable {
|
|||
fieldList.add(key);
|
||||
fieldValueList.add(RecruitModeUtil.parseBlankToNull(value));
|
||||
});
|
||||
rs.executeUpdate("insert into " + ModeTable.UF_JCL_YPPC + " (" + StringUtils.join(fieldList, ",") + ") values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
|
||||
rs.executeUpdate("insert into uf_jcl_yppc (" + StringUtils.join(fieldList, ",") + ") values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
|
||||
Thread.sleep(1000);
|
||||
int mainId = ApplicantCommonInfo.refreshRight(rs, uuid, ModeTable.UF_JCL_YPPC, formModeId);
|
||||
int mainId = ApplicantCommonInfo.refreshRight(rs, uuid, "uf_jcl_yppc", formModeId);
|
||||
|
||||
// 插入明细表数据
|
||||
List<ResumeInfoEducationExperienceDto> educationExperience = resumeInfoDto.getEducationExperience();
|
||||
String sql = "insert into " + ModeTable.getDetailTableName(ModeTable.UF_JCL_YPPC, 1) + " (mainId,xxmc,xl,zy,kssj,jssj) values (?,?,?,?,?,?) ";
|
||||
String sql = "insert into uf_jcl_yppc_dt1 (mainId,xxmc,xl,zy,kssj,jssj) values (?,?,?,?,?,?) ";
|
||||
for (ResumeInfoEducationExperienceDto educationExperienceDto : educationExperience) {
|
||||
List<Object> data = new ArrayList<>();
|
||||
data.add(mainId);
|
||||
|
|
@ -119,7 +118,7 @@ public class ResumeSavedThread extends LocalRunnable {
|
|||
data.add(DateUtil.getDate(educationExperienceDto.getEndTime()));
|
||||
rs.executeUpdate(sql, data);
|
||||
}
|
||||
sql = "insert into " + ModeTable.getDetailTableName(ModeTable.UF_JCL_YPPC, 2) + " (mainId,gsmc,gw,gzzz,kssj,jssj) values (?,?,?,?,?,?) ";
|
||||
sql = "insert into uf_jcl_yppc_dt2 (mainId,gsmc,gw,gzzz,kssj,jssj) values (?,?,?,?,?,?) ";
|
||||
List<ResumeInfoWorkExperienceDto> workExperience = resumeInfoDto.getWorkExperience();
|
||||
for (ResumeInfoWorkExperienceDto workExperienceDto : workExperience) {
|
||||
List<Object> data = new ArrayList<>();
|
||||
|
|
@ -131,7 +130,7 @@ public class ResumeSavedThread extends LocalRunnable {
|
|||
data.add(DateUtil.getDate(workExperienceDto.getEndTime()));
|
||||
rs.executeUpdate(sql, data);
|
||||
}
|
||||
sql = "insert into " + ModeTable.getDetailTableName(ModeTable.UF_JCL_YPPC, 3) + " (mainId,xmmc,xmms,kssj,jssj) values (?,?,?,?,?) ";
|
||||
sql = "insert into uf_jcl_yppc_dt3 (mainId,xmmc,xmms,kssj,jssj) values (?,?,?,?,?) ";
|
||||
List<ResumeInfoProjectExperienceDto> projectExperience = resumeInfoDto.getProjectExperience();
|
||||
for (ResumeInfoProjectExperienceDto projectExperienceDto : projectExperience) {
|
||||
List<Object> data = new ArrayList<>();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package weaver.formmode.recruit.modeexpand.process;
|
||||
|
||||
import com.engine.recruit.constant.ModeTable;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.common.DateUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
|
|
@ -45,7 +44,7 @@ public class StageDataInsert {
|
|||
paramsList.add("0");
|
||||
|
||||
String processIdsStr = StringUtils.join(Arrays.asList(processIds), ",");
|
||||
String insertSql = "insert into " + ModeTable.UF_JCL_ZPJDSZ + " (modeuuid, modedatacreater, modedatacreatedate, modedatacreatetime, modedatamodifier, modedatamodifydatetime, modedatacreatertype, formmodeid, jdmc, jdms, jdlx, hj, sfqy, zssx, zpjd, " + relateField + ") values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
||||
String insertSql = "insert into uf_jcl_zpjdsz (modeuuid, modedatacreater, modedatacreatedate, modedatacreatetime, modedatamodifier, modedatamodifydatetime, modedatacreatertype, formmodeid, jdmc, jdms, jdlx, hj, sfqy, zssx, zpjd, " + relateField + ") values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
||||
if (StringUtils.isNotBlank(processIdsStr)) {
|
||||
insertMainTableData(billId, processIdsStr, insertSql, paramsList);
|
||||
}
|
||||
|
|
@ -92,7 +91,7 @@ public class StageDataInsert {
|
|||
*/
|
||||
private static void refreshRight(String uuid, String formModeId, String processId) {
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select id from " + ModeTable.UF_JCL_ZPJDSZ + " where modeuuid='" + uuid + "'");
|
||||
rs.executeQuery("select id from uf_jcl_zpjdsz where modeuuid='" + uuid + "'");
|
||||
if (rs.next()) {
|
||||
//建模数据的id
|
||||
String bid = rs.getString("id");
|
||||
|
|
@ -102,7 +101,7 @@ public class StageDataInsert {
|
|||
modeRightInfo.editModeDataShare(1, Util.getIntValue(formModeId), Util.getIntValue(bid));
|
||||
|
||||
// 插入明细表数据
|
||||
rs.executeQuery("select * from " + ModeTable.getDetailTableName(ModeTable.UF_JCL_ZPJDSZ, 1) + " where mainid = ? ", processId);
|
||||
rs.executeQuery("select * from uf_jcl_zpjdsz_dt1 where mainid = ? ", processId);
|
||||
List<List<Object>> insertList = new ArrayList<>();
|
||||
while (rs.next()) {
|
||||
List<Object> paramList = new ArrayList<>();
|
||||
|
|
@ -117,11 +116,11 @@ public class StageDataInsert {
|
|||
insertList.add(paramList);
|
||||
}
|
||||
for (List<Object> list : insertList) {
|
||||
rs.executeUpdate("insert into " + ModeTable.getDetailTableName(ModeTable.UF_JCL_ZPJDSZ, 1) + " (mainid, czan, zdyxsmc, sfqy, tzymbt, tzymdz, zssx) values (?, ?, ?, ?, ?, ?, ?)", list);
|
||||
rs.executeUpdate("insert into uf_jcl_zpjdsz_dt1 (mainid, czan, zdyxsmc, sfqy, tzymbt, tzymdz, zssx) values (?, ?, ?, ?, ?, ?, ?)", list);
|
||||
}
|
||||
|
||||
insertList = new ArrayList<>();
|
||||
rs.executeQuery("select * from " + ModeTable.getDetailTableName(ModeTable.UF_JCL_ZPJDSZ, 2) + " where mainid = ? ", processId);
|
||||
rs.executeQuery("select * from uf_jcl_zpjdsz_dt2 where mainid = ? ", processId);
|
||||
while (rs.next()) {
|
||||
List<Object> paramList = new ArrayList<>();
|
||||
// mainid
|
||||
|
|
@ -132,7 +131,7 @@ public class StageDataInsert {
|
|||
insertList.add(paramList);
|
||||
}
|
||||
for (List<Object> list : insertList) {
|
||||
rs.executeUpdate("insert into " + ModeTable.getDetailTableName(ModeTable.UF_JCL_ZPJDSZ, 2) + " (mainid, ymbt, ymdz, zssx) values (?, ?, ?, ?)", list);
|
||||
rs.executeUpdate("insert into uf_jcl_zpjdsz_dt2 (mainid, ymbt, ymdz, zssx) values (?, ?, ?, ?)", list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,9 +38,22 @@ public class RecruitModeUtil {
|
|||
* @param creater 消息创建者
|
||||
*/
|
||||
public static void messagePush(String messageType, String title, String context, Set<String> userIdList, Integer creater) {
|
||||
messagePush(messageType, title, context, userIdList, creater, "", "");
|
||||
}
|
||||
|
||||
/**
|
||||
* @param messageType 消息来源
|
||||
* @param title 消息标题
|
||||
* @param context 消息内容
|
||||
* @param userIdList 接收人ID集合
|
||||
* @param creater 消息创建者
|
||||
* @param linkUrl 待办跳转地址
|
||||
* @param linkMobileUrl 移动端跳转地址
|
||||
*/
|
||||
public static void messagePush(String messageType, String title, String context, Set<String> userIdList, Integer creater, String linkUrl, String linkMobileUrl) {
|
||||
MessageType message = MessageType.newInstance(Integer.parseInt(messageType));
|
||||
try {
|
||||
MessageBean messageBean = Util_Message.createMessage(message, userIdList, title, context, "", "");
|
||||
MessageBean messageBean = Util_Message.createMessage(message, userIdList, title, context, linkUrl, linkMobileUrl);
|
||||
messageBean.setCreater(creater);
|
||||
Util_Message.store(messageBean);
|
||||
} catch (IOException e) {
|
||||
|
|
|
|||
|
|
@ -1,19 +1,24 @@
|
|||
package weaver.formmode.recruit.modeexpand.written;
|
||||
|
||||
import com.engine.recruit.enums.InterviewOperateTypeEnum;
|
||||
import com.engine.recruit.util.RecruitMessageUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* @Author ml
|
||||
|
|
@ -55,7 +60,7 @@ public class CreateWrittenModeExpand extends AbstractModeExpandJavaCodeNew {
|
|||
mainDataMap.put(property.getName(), property.getValue());
|
||||
}
|
||||
// 发送信息
|
||||
|
||||
sendMessage(billId);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -69,39 +74,60 @@ public class CreateWrittenModeExpand extends AbstractModeExpandJavaCodeNew {
|
|||
|
||||
|
||||
private void sendMessage(int billId) {
|
||||
String querySql = "select sjhm,dzyx,tzypz,yjnr from uf_jcl_apbs a left join uf_jcl_apbs_dt1 b on a.id = b.mainid where id = ?";
|
||||
String querySql = "select b.ypz,b.ypzw,b.sjh,b.yx,a.yjtzmb ,a.bssj ,a.bsdd,a.yjnr from uf_jcl_apbs a \n" +
|
||||
"left join uf_jcl_apbs_dt1 b on a.id = b.mainid where id = ?";
|
||||
recordSet.executeQuery(querySql,billId);
|
||||
String tzypz = "";
|
||||
String sjhm = "";
|
||||
String yjnr = "";
|
||||
String dzyx = "";
|
||||
String yjnr;
|
||||
String yjtzmb = "";
|
||||
List<WrittenPerson> writtenPersonList = new ArrayList<>();
|
||||
while (recordSet.next()) {
|
||||
tzypz = Util.null2String(recordSet.getString("tzypz"));
|
||||
sjhm = Util.null2String(recordSet.getString("sjhm"));
|
||||
yjnr = Util.null2String(recordSet.getString("yjnr"));
|
||||
dzyx = Util.null2String(recordSet.getString("dzyx"));
|
||||
yjtzmb = Util.null2String(recordSet.getString("yjtzmb"));
|
||||
yjnr = recordSet.getString("yjnr");
|
||||
|
||||
Pattern patten = Pattern.compile("\\$(.*?)\\$");//编译正则表达式
|
||||
Matcher matcher = patten.matcher(yjnr);// 指定要匹配的字符串
|
||||
StringBuffer sb = new StringBuffer();
|
||||
while (matcher.find()) { //此处find()每次被调用后,会偏移到下一个匹配
|
||||
matcher.appendReplacement(sb,Util.null2String(recordSet.getString(matcher.group().replace("$",""))));
|
||||
}
|
||||
matcher.appendTail(sb);
|
||||
|
||||
writtenPersonList.add(WrittenPerson.builder()
|
||||
.name(Util.null2String(recordSet.getString("ypz")))
|
||||
.jobName(Util.null2String(recordSet.getString("ypzw")))
|
||||
.time(Util.null2String(recordSet.getString("bssj")))
|
||||
.phone(Util.null2String(recordSet.getString("sjh")))
|
||||
.email(Util.null2String(recordSet.getString("yx")))
|
||||
.address(Util.null2String(recordSet.getString("bsdd")))
|
||||
.content(Util.null2String(sb)).build());
|
||||
}
|
||||
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
switch (tzypz) {
|
||||
case "0":
|
||||
// 邮件
|
||||
params.put("sendTo",dzyx);
|
||||
params.put("emailTitle",getEmailTitle(yjtzmb));
|
||||
params.put("emailContent",yjnr);
|
||||
RecruitMessageUtils.SendEmail(params);
|
||||
break;
|
||||
case "1":
|
||||
// 短信
|
||||
params.put("receiver",sjhm);
|
||||
params.put("content",yjnr);
|
||||
RecruitMessageUtils.sendSMS(params);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
for (WrittenPerson writtenPerson : writtenPersonList) {
|
||||
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
String[] strings = yjtzmb.split(",");
|
||||
for (String s : strings) {
|
||||
switch (s) {
|
||||
case "0":
|
||||
// 邮件
|
||||
params.put("sendTo", writtenPerson.getEmail());
|
||||
params.put("emailTitle", getEmailTitle(s));
|
||||
params.put("emailContent", writtenPerson.getContent());
|
||||
RecruitMessageUtils.SendEmail(params);
|
||||
break;
|
||||
case "1":
|
||||
// 短信
|
||||
params.put("receiver", writtenPerson.getPhone());
|
||||
params.put("content", writtenPerson.getContent());
|
||||
RecruitMessageUtils.sendSMS(params);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -116,4 +142,19 @@ public class CreateWrittenModeExpand extends AbstractModeExpandJavaCodeNew {
|
|||
}
|
||||
return emailTitle;
|
||||
}
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
private static class WrittenPerson {
|
||||
String name;
|
||||
String jobName;
|
||||
String time;
|
||||
String address;
|
||||
String phone;
|
||||
String email;
|
||||
String content;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue