Compare commits
25 Commits
Author | SHA1 | Date |
---|---|---|
|
a2c89084b3 | 5 months ago |
|
bf77e5f386 | 9 months ago |
|
8d23a515d8 | 9 months ago |
|
5cd47c7ae3 | 10 months ago |
|
dc2164c49a | 10 months ago |
|
6302d7d9e0 | 10 months ago |
|
37ccf7888d | 10 months ago |
|
40660cc55b | 10 months ago |
|
f2798f8c1f | 10 months ago |
|
76712bfe64 | 10 months ago |
|
71908802ba | 11 months ago |
|
e19a2add59 | 11 months ago |
|
641587f8db | 11 months ago |
|
f9ca65f925 | 11 months ago |
|
ce15e0b780 | 11 months ago |
|
113543f0ef | 11 months ago |
|
f127eef41b | 11 months ago |
|
8c57c92434 | 11 months ago |
|
34fb245ed0 | 11 months ago |
|
9fe4786fdd | 12 months ago |
|
1f7070c611 | 2 years ago |
|
884052dc1d | 2 years ago |
|
cf8841a775 | 2 years ago |
|
dee3855003 | 2 years ago |
|
bc855b294b | 2 years ago |
@ -1,13 +0,0 @@
|
||||
package com.api.jygf.web;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description:
|
||||
* @Date 2022/10/9
|
||||
* @Version V1.0
|
||||
**/
|
||||
@Path("/mobile/permission")
|
||||
public class MobilePermissionsAction extends com.engine.jygf.web.MobilePermissionsAction {
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.api.mzg.web;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/08/29
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Path("/jcl/mzg/demand")
|
||||
public class RecruitDemandController extends com.engine.mzg.web.RecruitDemandController{
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.api.mzg.web;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/09/05
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Path("/jcl/mzg/mobile")
|
||||
public class RecruitMobileController extends com.engine.mzg.web.RecruitMobileController{
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
package com.engine.jygf.cmd;
|
||||
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.hrm.User;
|
||||
import weaver.wechat.util.Utils;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description:
|
||||
* @Date 2022/10/9
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class MobilePermissionsCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||
|
||||
private static final String FIELDID = "field100026"; //移动电话自定义字段
|
||||
|
||||
private static final String SCOPE = "HrmCustomFieldByInfoType";
|
||||
|
||||
private static final String SCOPEID = "-1";
|
||||
|
||||
public MobilePermissionsCmd(Map<String, Object> params, User user) {
|
||||
this.user = user;
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizLogContext getLogContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Object> execute(CommandContext commandContext) {
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
String uid = Utils.null2String(user.getUID());
|
||||
RecordSet rs = new RecordSet();
|
||||
HashSet<String> ids = new HashSet<>();
|
||||
ids.add(uid);
|
||||
rs.executeQuery("select ckr,bckr from uf_yddhqx_dt1");
|
||||
while (rs.next()) {
|
||||
String ckr = Utils.null2String(rs.getString("ckr"));
|
||||
String bckr = Utils.null2String(rs.getString("bckr"));
|
||||
if (Arrays.asList(ckr.split(",")).contains(uid)) {
|
||||
ids.addAll(Arrays.asList(bckr.split(",")));
|
||||
}
|
||||
}
|
||||
|
||||
Map<String,String> mobileInfo = new HashMap<>();
|
||||
String value = StringUtils.join(ids,",");
|
||||
rs.executeQuery("select id,"+FIELDID+" from cus_fielddata where scope = ? and scopeid = ?" +
|
||||
" and id in ("+value+")",SCOPE,SCOPEID);
|
||||
while (rs.next()){
|
||||
mobileInfo.put(Utils.null2String(rs.getString("id")),rs.getString(FIELDID));
|
||||
}
|
||||
|
||||
data.put("ids",ids);
|
||||
data.put("mobileInfo",mobileInfo);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
package com.engine.jygf.service;
|
||||
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description:
|
||||
* @Date 2022/10/9
|
||||
* @Version V1.0
|
||||
**/
|
||||
public interface MobilePermissionsService {
|
||||
|
||||
Map<String, Object> getPermissionInfo(Map<String, Object> params, User user);
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
package com.engine.jygf.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.jygf.cmd.MobilePermissionsCmd;
|
||||
import com.engine.jygf.service.MobilePermissionsService;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description:
|
||||
* @Date 2022/10/9
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class MobilePermissionsServiceImpl extends Service implements MobilePermissionsService {
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getPermissionInfo(Map<String, Object> params, User user) {
|
||||
return commandExecutor.execute(new MobilePermissionsCmd(params,user));
|
||||
}
|
||||
}
|
@ -1,57 +0,0 @@
|
||||
package com.engine.jygf.web;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.engine.common.util.ParamUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.jygf.service.MobilePermissionsService;
|
||||
import com.engine.jygf.service.impl.MobilePermissionsServiceImpl;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.GET;
|
||||
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.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description:
|
||||
* @Date 2022/10/9
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class MobilePermissionsAction {
|
||||
|
||||
public MobilePermissionsService getMobilePermissionsService(User user) {
|
||||
return ServiceUtil.getService(MobilePermissionsServiceImpl.class,user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 晶优光伏 移动电话通过建模控制权限 通讯录显示
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/controller")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getPermissionInfo(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
Map<String, Object> apidatas = new HashMap<>();
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
//实例化Service 并调用业务类处理
|
||||
apidatas = getMobilePermissionsService(user).getPermissionInfo(ParamUtil.request2Map(request), user);
|
||||
} catch (Exception e) {
|
||||
//异常处理
|
||||
apidatas.put("api_status", false);
|
||||
}
|
||||
return JSONObject.toJSONString(apidatas);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,168 @@
|
||||
package com.engine.mzg.conn;
|
||||
|
||||
import com.engine.mzg.exception.CustomizeRunTimeException;
|
||||
import com.engine.mzg.util.RecruitUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.common.DateUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.IgnoreCaseHashMap;
|
||||
import weaver.formmode.setup.ModeRightInfo;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/19
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitRecordSet {
|
||||
|
||||
/**
|
||||
* 获取单个记录映射
|
||||
*
|
||||
* @param rs RecordSet
|
||||
* @return
|
||||
*/
|
||||
public static IgnoreCaseHashMap<String, Object> getSingleRecordMap(RecordSet rs) {
|
||||
IgnoreCaseHashMap<String, Object> dataMap = new IgnoreCaseHashMap<>();
|
||||
if (rs.next()) {
|
||||
String[] columnNames = rs.getColumnName();
|
||||
for (String columnName : columnNames) {
|
||||
dataMap.put(columnName, RecruitUtil.parseBlankToNull(rs.getString(columnName)));
|
||||
}
|
||||
}
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
public static List<Map<String, Object>> getRecordMapList(RecordSet rs) {
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
while (rs.next()) {
|
||||
String[] columnNames = rs.getColumnName();
|
||||
Map<String, Object> dataMap = new IgnoreCaseHashMap<>();
|
||||
for (String columnName : columnNames) {
|
||||
dataMap.put(columnName.toLowerCase(), RecruitUtil.parseBlankToNull(rs.getString(columnName)));
|
||||
}
|
||||
list.add(dataMap);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 插入数据
|
||||
*
|
||||
* @param dataMap 数据集合
|
||||
* @param tableName 表名
|
||||
*/
|
||||
public static void insertData(Map<String, Object> dataMap, String tableName) {
|
||||
List<String> fieldList = new ArrayList<>();
|
||||
List<String> dataList = new ArrayList<>();
|
||||
List<String> paramList = new ArrayList<>();
|
||||
|
||||
dataMap.forEach((key, value) -> {
|
||||
if (null != value) {
|
||||
String valueStr = String.valueOf(value);
|
||||
if (StringUtils.isNotBlank(valueStr)) {
|
||||
fieldList.add(key);
|
||||
dataList.add(valueStr);
|
||||
paramList.add("?");
|
||||
}
|
||||
}
|
||||
});
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID更新数据
|
||||
*
|
||||
* @param dataMap
|
||||
* @param tableName
|
||||
*/
|
||||
public static void updateDataById(Map<String, Object> dataMap, String tableName) {
|
||||
List<String> fieldList = new ArrayList<>();
|
||||
List<Object> dataList = new ArrayList<>();
|
||||
String id = Util.null2String(dataMap.get("id"));
|
||||
dataMap.remove("id");
|
||||
|
||||
dataMap.forEach((key, value) -> {
|
||||
fieldList.add(key + " = ? ");
|
||||
dataList.add(value);
|
||||
});
|
||||
dataList.add(id);
|
||||
String updateSql = "update " + tableName + " set " + StringUtils.join(fieldList, ",") + " where id = ? ";
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeUpdate(updateSql, dataList);
|
||||
if (StringUtils.isNotBlank(rs.getExceptionMsg())) {
|
||||
throw new CustomizeRunTimeException(rs.getExceptionMsg());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param deleteSql
|
||||
*/
|
||||
public static void deleteData(String deleteSql) {
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeUpdate(deleteSql);
|
||||
if (StringUtils.isNotBlank(rs.getExceptionMsg())) {
|
||||
throw new CustomizeRunTimeException(rs.getExceptionMsg());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 构建建模表基本数据
|
||||
*
|
||||
* @param mainDataMap 参数集合
|
||||
*/
|
||||
public static void buildModeInsertFields(Map<String, Object> mainDataMap, int userId) {
|
||||
String dateTime = DateUtil.getFullDate();
|
||||
String[] dateSplit = dateTime.split(" ");
|
||||
mainDataMap.put("modedatacreater", userId);
|
||||
mainDataMap.put("modedatacreatedate", dateSplit[0]);
|
||||
mainDataMap.put("modedatacreatetime", dateSplit[1]);
|
||||
mainDataMap.put("modedatacreatertype", "0");
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建建模表基本数据
|
||||
*
|
||||
* @param mainDataMap 参数集合
|
||||
*/
|
||||
public static void buildModeUpdateFields(Map<String, Object> mainDataMap, int userId) {
|
||||
String dateTime = DateUtil.getFullDate();
|
||||
mainDataMap.put("modedatamodifier", userId);
|
||||
mainDataMap.put("modedatamodifydatetime", dateTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* 建模表数据权限重构
|
||||
*
|
||||
* @param uuid
|
||||
* @param modeTable
|
||||
* @param formModeId
|
||||
*/
|
||||
public static int refreshRight(String uuid, String modeTable, int formModeId, int creator) {
|
||||
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(creator, formModeId, bid);
|
||||
return bid;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.engine.mzg.entity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/09/09
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class SyncTableField {
|
||||
private String sourceField;
|
||||
private String targetField;
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.engine.mzg.entity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class WorkPlanCreateParams {
|
||||
|
||||
private String operateType;
|
||||
|
||||
private String billId;
|
||||
|
||||
private String workPlanType;
|
||||
|
||||
private String planName;
|
||||
|
||||
private String memberIds;
|
||||
|
||||
private String urgentLevel;
|
||||
|
||||
private String beginDateTime;
|
||||
|
||||
private String endDateTime;
|
||||
|
||||
private String workId;
|
||||
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.engine.mzg.enums;
|
||||
|
||||
/**
|
||||
* 邮件模板类型
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
public enum EmailTemplateEnum {
|
||||
/**
|
||||
* 性格测评
|
||||
*/
|
||||
DISC(0, "性格测评"),
|
||||
/**
|
||||
* 应聘登记
|
||||
*/
|
||||
REGIST(1, "应聘登记"),
|
||||
/**
|
||||
* 面试
|
||||
*/
|
||||
INTERVIEW_FIRST(2, "第一轮面试"),
|
||||
INTERVIEW_SECOND(3, "第二轮面试"),
|
||||
INTERVIEW_THIRD(4, "第三轮面试"),
|
||||
/**
|
||||
* offer
|
||||
*/
|
||||
OFFER(5, "offer"),
|
||||
INTERVIEW_ADJUST(6, "面试调整"),
|
||||
INTERVIEW_CANCEL(7, "面试取消");
|
||||
|
||||
EmailTemplateEnum(Integer value, String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
|
||||
private Integer value;
|
||||
|
||||
|
||||
private String desc;
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(Integer value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.engine.mzg.exception;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description:
|
||||
* @Date 2023/2/21
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class CustomizeRunTimeException extends RuntimeException{
|
||||
|
||||
public CustomizeRunTimeException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public CustomizeRunTimeException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
public CustomizeRunTimeException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.engine.mzg.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/08/29
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface RecruitDemandService {
|
||||
|
||||
Map<String, Object> getStaffNum(Map<String, Object> param);
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.engine.mzg.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.mzg.service.RecruitDemandService;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/08/29
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitDemandServiceImpl extends Service implements RecruitDemandService {
|
||||
@Override
|
||||
public Map<String, Object> getStaffNum(Map<String, Object> param) {
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
RecordSet rs = new RecordSet();
|
||||
String sqbm = Util.null2String(param.get("sqbm"));
|
||||
String xqgw = Util.null2String(param.get("xqgw"));
|
||||
|
||||
|
||||
rs.executeQuery("select a.staff_num, a.permanent_num from jcl_org_staff a inner join JCL_ORG_STAFFPLAN b on a.plan_id = b.id and b.forbidden_tag = 0 and b.delete_type = 0 where a.delete_type = 0 and a.ec_department = ? and a.job_id = ? order by a.id desc", sqbm, xqgw);
|
||||
if(rs.next()) {
|
||||
String staffNum = rs.getString("staff_num");
|
||||
String permanentNum = rs.getString("permanent_num");
|
||||
returnMap.put("staffNum", staffNum);
|
||||
returnMap.put("permanentNum", permanentNum);
|
||||
}
|
||||
|
||||
return returnMap;
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.engine.mzg.util;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description:
|
||||
* @Date 2023/2/21
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class ExceptionUtil {
|
||||
public static String getRealMessage(Throwable e) {
|
||||
while (e != null) {
|
||||
Throwable cause = e.getCause();
|
||||
if (cause == null) {
|
||||
return e.getMessage();
|
||||
}
|
||||
e = cause;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.engine.mzg.web;
|
||||
|
||||
import com.engine.common.util.ParamUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.mzg.service.RecruitDemandService;
|
||||
import com.engine.mzg.service.impl.RecruitDemandServiceImpl;
|
||||
import com.engine.mzg.util.ResponseResult;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.GET;
|
||||
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: 2024/08/29
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitDemandController {
|
||||
public RecruitDemandService getService(User user) {
|
||||
return ServiceUtil.getService(RecruitDemandServiceImpl.class, user);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/getStaffNum")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getStaffNum(@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(getService(user)::getStaffNum, params);
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package com.engine.mzg.web;
|
||||
|
||||
import com.engine.common.util.ParamUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.mzg.service.RecruitMobileService;
|
||||
import com.engine.mzg.service.impl.RecruitMobileServiceImpl;
|
||||
import com.engine.mzg.util.ResponseResult;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.GET;
|
||||
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: 2024/09/05
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitMobileController {
|
||||
|
||||
public RecruitMobileService getService(User user) {
|
||||
return ServiceUtil.getService(RecruitMobileServiceImpl.class, user);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/submitDiscTest")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String submitDiscTest(@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(getService(user)::submitDiscTest, params);
|
||||
|
||||
}
|
||||
@GET
|
||||
@Path("/submitRegist")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String submitRegist(@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(getService(user)::submitRegist, params);
|
||||
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/updateOfferStatus")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String updateOfferStatus(@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(getService(user)::updateOfferStatus, params);
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
package weaver.formmode.mzg.modeexpand.disc;
|
||||
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
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;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/09/02
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class AddDiscExpand extends AbstractModeExpandJavaCodeNew {
|
||||
public static final Pattern PATTERN = Pattern.compile("^q([1-9]|[1-3][0-9]|40)$");
|
||||
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> param) {
|
||||
Map<String, String> result = new HashMap<>();
|
||||
try {
|
||||
int billId;
|
||||
int modeId;
|
||||
RequestInfo requestInfo = (RequestInfo) param.get("RequestInfo");
|
||||
if (requestInfo != null) {
|
||||
billId = Util.getIntValue(requestInfo.getRequestid());
|
||||
modeId = Util.getIntValue(requestInfo.getWorkflowid());
|
||||
if (billId > 0 && modeId > 0) {
|
||||
// 计算各个选项的值
|
||||
int countD = 0;
|
||||
int countI = 0;
|
||||
int countS = 0;
|
||||
int countC = 0;
|
||||
RecordSet rs = new RecordSet();
|
||||
MainTableInfo mainTableInfo = requestInfo.getMainTableInfo();
|
||||
Property[] properties = mainTableInfo.getProperty();
|
||||
for (Property property : properties) {
|
||||
String name = property.getName();
|
||||
Matcher matcher = PATTERN.matcher(name);
|
||||
if (!matcher.matches()) {
|
||||
continue;
|
||||
}
|
||||
if ("0".equals(property.getValue())) {
|
||||
countD++;
|
||||
} else if ("1".equals(property.getValue())) {
|
||||
countI++;
|
||||
} else if ("2".equals(property.getValue())) {
|
||||
countS++;
|
||||
} else if ("3".equals(property.getValue())) {
|
||||
countC++;
|
||||
}
|
||||
}
|
||||
|
||||
// 更新各个选项的个数
|
||||
rs.executeUpdate("update uf_recruit_disc set dxhj = ? ,ixhj = ?, sxhj = ?, cxhj = ? where id = ? ", countD, countI, countS, countC, billId);
|
||||
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
new BaseBean().writeLog(e);
|
||||
result.put("errmsg", "DISC数据统计异常");
|
||||
result.put("flag", "false");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package weaver.formmode.mzg.modeexpand.interview;
|
||||
|
||||
import com.engine.mzg.conn.RecruitCommon;
|
||||
import com.engine.mzg.enums.EmailTemplateEnum;
|
||||
import com.engine.mzg.exception.CustomizeRunTimeException;
|
||||
import com.engine.mzg.util.RecruitUtil;
|
||||
import com.weaver.formmodel.data.model.Formfield;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.IgnoreCaseHashMap;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
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.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/09/10
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class AdjustmentInterviewFlowExpand extends AbstractModeExpandJavaCodeNew {
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> param) {
|
||||
// 取消面试
|
||||
Map<String, String> result = new HashMap<>();
|
||||
try {
|
||||
String billId;
|
||||
String recruitType = Util.null2String(param.get("recruitType"));
|
||||
if (!"adjustmentInterview".equals(recruitType)) {
|
||||
return result;
|
||||
}
|
||||
RequestInfo requestInfo = (RequestInfo) param.get("RequestInfo");
|
||||
if (requestInfo != null) {
|
||||
billId = requestInfo.getRequestid();
|
||||
RecordSet rs = new RecordSet();
|
||||
IgnoreCaseHashMap<String, String> mainDataMap = new IgnoreCaseHashMap<>();
|
||||
MainTableInfo mainTableInfo = requestInfo.getMainTableInfo();
|
||||
Property[] properties = mainTableInfo.getProperty();
|
||||
for (Property property : properties) {
|
||||
mainDataMap.put(property.getName(), property.getValue());
|
||||
}
|
||||
String mslx = Util.null2String(mainDataMap.get("mslx"));
|
||||
String mslc = "";
|
||||
String msrq = "";
|
||||
String msfs = "";
|
||||
String msdz = "";
|
||||
Integer emailTemplateId;
|
||||
if ("0".equals(mslx)) {
|
||||
mslc = "dyl";
|
||||
emailTemplateId = EmailTemplateEnum.INTERVIEW_FIRST.getValue();
|
||||
} else if ("1".equals(mslx)) {
|
||||
mslc = "del";
|
||||
emailTemplateId = EmailTemplateEnum.INTERVIEW_SECOND.getValue();
|
||||
} else if ("2".equals(mslx)) {
|
||||
mslc = "dsl";
|
||||
emailTemplateId = EmailTemplateEnum.INTERVIEW_THIRD.getValue();
|
||||
} else {
|
||||
result.put("errmsg", "面试类型匹配异常");
|
||||
result.put("flag", "false");
|
||||
return result;
|
||||
}
|
||||
msrq = Util.null2String(mainDataMap.get(mslc + "msrq"));
|
||||
msfs = Util.null2String(mainDataMap.get(mslc + "msfs"));
|
||||
msdz = Util.null2String(mainDataMap.get(mslc + "msdz"));
|
||||
|
||||
// 更新流程中的字段
|
||||
String flowTableInterview = RecruitCommon.getSettingValue("FLOW_TABLE_INTERVIEW");
|
||||
String requestId = Util.null2String(mainDataMap.get("mslcid"));
|
||||
String sql = "update " + flowTableInterview + " set " + mslc + "msrq = ?," + mslc + "msfs=?," + mslc + "msdz=? where requestId = ? ";
|
||||
rs.executeUpdate(sql, msrq, msfs, msdz, requestId);
|
||||
|
||||
// 发送调整面试邮件
|
||||
String emailTitle = "";
|
||||
String emailContent = "";
|
||||
rs.executeQuery("select yjzt ,yjnr from uf_recruit_email where mblx =? ", emailTemplateId);
|
||||
if (rs.next()) {
|
||||
emailTitle = rs.getString("yjzt");
|
||||
emailContent = rs.getString("yjnr");
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(emailTitle) || StringUtils.isBlank(emailContent)) {
|
||||
throw new CustomizeRunTimeException("请检查邮件模板设置");
|
||||
}
|
||||
List<Formfield> fieldList = RecruitUtil.getFieldList("uf_recruit_ms");
|
||||
Map<String, List<Formfield>> fieldMapList = fieldList.stream().collect(Collectors.groupingBy(Formfield::getFieldname));
|
||||
emailContent = RecruitUtil.getReplaceContent(emailContent, fieldMapList, mainDataMap);
|
||||
String sendTo = Util.null2String(mainDataMap.get("dzyx"));
|
||||
RecruitUtil.sendEmail(sendTo, emailTitle, emailContent);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
new BaseBean().writeLog(e);
|
||||
result.put("errmsg", e.getMessage());
|
||||
result.put("flag", "false");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
package weaver.formmode.mzg.modeexpand.interview;
|
||||
|
||||
import com.engine.mzg.conn.RecruitCommon;
|
||||
import com.engine.mzg.enums.EmailTemplateEnum;
|
||||
import com.engine.mzg.exception.CustomizeRunTimeException;
|
||||
import com.engine.mzg.util.RecruitUtil;
|
||||
import com.weaver.formmodel.data.model.Formfield;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.IgnoreCaseHashMap;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
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.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/09/10
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class CancelInterviewFlowExpand extends AbstractModeExpandJavaCodeNew {
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> param) {
|
||||
|
||||
// 取消面试
|
||||
Map<String, String> result = new HashMap<>();
|
||||
try {
|
||||
String billId;
|
||||
RequestInfo requestInfo = (RequestInfo) param.get("RequestInfo");
|
||||
if (requestInfo != null) {
|
||||
billId = requestInfo.getRequestid();
|
||||
RecordSet rs = new RecordSet();
|
||||
IgnoreCaseHashMap<String, String> mainDataMap = new IgnoreCaseHashMap<>();
|
||||
MainTableInfo mainTableInfo = requestInfo.getMainTableInfo();
|
||||
Property[] properties = mainTableInfo.getProperty();
|
||||
for (Property property : properties) {
|
||||
mainDataMap.put(property.getName(), property.getValue());
|
||||
}
|
||||
// 发送取消面试邮件
|
||||
String emailTitle = "";
|
||||
String emailContent = "";
|
||||
rs.executeQuery("select yjzt ,yjnr from uf_recruit_email where mblx =? ", EmailTemplateEnum.INTERVIEW_CANCEL.getValue());
|
||||
if (rs.next()) {
|
||||
emailTitle = rs.getString("yjzt");
|
||||
emailContent = rs.getString("yjnr");
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(emailTitle) || StringUtils.isBlank(emailContent)) {
|
||||
throw new CustomizeRunTimeException("请检查邮件模板设置");
|
||||
}
|
||||
List<Formfield> fieldList = RecruitUtil.getFieldList("uf_recruit_ms");
|
||||
Map<String, List<Formfield>> fieldMapList = fieldList.stream().collect(Collectors.groupingBy(Formfield::getFieldname));
|
||||
emailContent = RecruitUtil.getReplaceContent(emailContent, fieldMapList, mainDataMap);
|
||||
String sendTo = Util.null2String(mainDataMap.get("dzyx"));
|
||||
RecruitUtil.sendEmail(sendTo, emailTitle, emailContent);
|
||||
|
||||
// 更新流程、建模状态
|
||||
rs.executeUpdate("update uf_recruit_ms set mszt = ? where id = ?", "2", billId);
|
||||
// 获取流程表名
|
||||
String flowTableInterview = RecruitCommon.getSettingValue("FLOW_TABLE_INTERVIEW");
|
||||
String requestId = Util.null2String(mainDataMap.get("mslcid"));
|
||||
rs.executeUpdate("update " + flowTableInterview + " set mszt = ? where requestId = ? ", "2", requestId);
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
new BaseBean().writeLog(e);
|
||||
result.put("errmsg", e.getMessage());
|
||||
result.put("flag", "false");
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package weaver.formmode.mzg.modeexpand.resume;
|
||||
|
||||
import com.engine.mzg.conn.RecruitCommon;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import weaver.hrm.User;
|
||||
import weaver.soa.workflow.request.RequestInfo;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/10/11
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class ArchiveTalentPoolExpand extends AbstractModeExpandJavaCodeNew {
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> param) {
|
||||
Map<String, String> result = new HashMap<>();
|
||||
RecordSet rs = new RecordSet();
|
||||
try {
|
||||
String billId;
|
||||
RequestInfo requestInfo = (RequestInfo) param.get("RequestInfo");
|
||||
if (requestInfo != null) {
|
||||
User user = (User) param.get("user");
|
||||
billId = requestInfo.getRequestid();
|
||||
// 查询人才库中是否有该数据
|
||||
rs.executeQuery("select id from uf_recruit_rck where jlkid = ?", billId);
|
||||
String rckId = "";
|
||||
if (rs.next()) {
|
||||
rckId = rs.getString("id");
|
||||
// 更新人才库
|
||||
RecruitCommon.updateTablesData("uf_recruit_rck", "uf_recruit_resume", billId, rckId, "jlkid", user.getUID());
|
||||
} else {
|
||||
// 插入人才库
|
||||
RecruitCommon.insertTablesData("uf_recruit_rck", "uf_recruit_resume",billId,"jlkid",user.getUID());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
rs.writeLog(e);
|
||||
result.put("errmsg", e.getMessage());
|
||||
result.put("flag", "false");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
package weaver.formmode.mzg.modeexpand.resume;
|
||||
|
||||
import com.engine.mzg.conn.RecruitCommon;
|
||||
import com.engine.mzg.conn.RecruitRecordSet;
|
||||
import com.engine.mzg.enums.EmailTemplateEnum;
|
||||
import com.engine.mzg.exception.CustomizeRunTimeException;
|
||||
import com.engine.mzg.util.RecruitUtil;
|
||||
import com.weaver.formmodel.data.model.Formfield;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.IgnoreCaseHashMap;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
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.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 发送DISC性格测评
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/09/05
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class SendDiscExpand extends AbstractModeExpandJavaCodeNew {
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> param) {
|
||||
Map<String, String> result = new HashMap<>();
|
||||
try {
|
||||
int billId;
|
||||
RequestInfo requestInfo = (RequestInfo) param.get("RequestInfo");
|
||||
if (requestInfo != null) {
|
||||
billId = Util.getIntValue(requestInfo.getRequestid());
|
||||
IgnoreCaseHashMap<String, String> mainDataMap = new IgnoreCaseHashMap<>();
|
||||
MainTableInfo mainTableInfo = requestInfo.getMainTableInfo();
|
||||
Property[] properties = mainTableInfo.getProperty();
|
||||
for (Property property : properties) {
|
||||
mainDataMap.put(property.getName(), property.getValue());
|
||||
}
|
||||
|
||||
RecordSet rs = new RecordSet();
|
||||
String mobileAppidDisc = RecruitCommon.getSettingValue("MOBILE_APPID_DISC");
|
||||
String mobileUrlDisc = RecruitCommon.getSettingValue("MOBILE_URL_DISC");
|
||||
String httpUrl = RecruitCommon.getSettingValue("HTTP_URL");
|
||||
rs.executeQuery("select noLoginUser from mobileappbaseinfo where id = ?", mobileAppidDisc);
|
||||
int creator = -1;
|
||||
if (rs.next()) {
|
||||
creator = rs.getInt("noLoginUser");
|
||||
}
|
||||
if (-1 == creator) {
|
||||
throw new CustomizeRunTimeException("未配置免登陆访问用户,请检查移动建模应用配置");
|
||||
}
|
||||
|
||||
String sendTo = Util.null2String(mainDataMap.get("dzyx"));
|
||||
if (StringUtils.isBlank(sendTo)) {
|
||||
throw new CustomizeRunTimeException("电子邮箱为空,邮件发送失败");
|
||||
}
|
||||
String emailTitle = "";
|
||||
String emailContent = "";
|
||||
rs.executeQuery("select yjzt ,yjnr from uf_recruit_email where mblx =? ", EmailTemplateEnum.DISC.getValue());
|
||||
if (rs.next()) {
|
||||
emailTitle = rs.getString("yjzt");
|
||||
emailContent = rs.getString("yjnr");
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(emailTitle) || StringUtils.isBlank(emailContent)) {
|
||||
throw new CustomizeRunTimeException("请检查邮件模板设置");
|
||||
}
|
||||
|
||||
|
||||
// 插入DISC测评表数据
|
||||
IgnoreCaseHashMap<String, Object> dataMap = new IgnoreCaseHashMap<>();
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
dataMap.put("modeuuid", uuid);
|
||||
int formModeId = RecruitCommon.getModeIdByTableName("uf_recruit_disc");
|
||||
dataMap.put("formmodeid", formModeId);
|
||||
// 构建建模表基本数据
|
||||
RecruitRecordSet.buildModeInsertFields(dataMap, creator);
|
||||
dataMap.put("xm", billId);
|
||||
dataMap.put("sqzw", mainDataMap.get("sqzw"));
|
||||
dataMap.put("lxfs", mainDataMap.get("lxfs"));
|
||||
|
||||
dataMap.put("modedatastatus", "0");
|
||||
// 插入数据
|
||||
RecruitRecordSet.insertData(dataMap, "uf_recruit_disc");
|
||||
|
||||
int id = RecruitRecordSet.refreshRight(uuid, "uf_recruit_disc", formModeId, creator);
|
||||
|
||||
// 测评ID反写简历中心表,更新状态
|
||||
rs.executeUpdate("update uf_recruit_resume set cpzt = ? ,cpglid = ? where id = ? ", 1, id, billId);
|
||||
|
||||
// 发送邮件
|
||||
// 查询字段信息
|
||||
List<Formfield> fieldList = RecruitUtil.getFieldList("uf_recruit_resume");
|
||||
Map<String, List<Formfield>> fieldMapList = fieldList.stream().collect(Collectors.groupingBy(Formfield::getFieldname));
|
||||
String url = httpUrl + mobileUrlDisc + "&billid=" + id;
|
||||
if (StringUtils.isNotBlank(url)) {
|
||||
url = "<span><a href='" + url + "' target='_blank'>链接地址</a></span>";
|
||||
}
|
||||
emailContent = emailContent.replace("{链接地址}", url);
|
||||
emailContent = RecruitUtil.getReplaceContent(emailContent, fieldMapList, mainDataMap);
|
||||
RecruitUtil.sendEmail(sendTo, emailTitle, emailContent);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
new BaseBean().writeLog(e);
|
||||
result.put("errmsg", e.getMessage());
|
||||
result.put("flag", "false");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
@ -0,0 +1,119 @@
|
||||
package weaver.formmode.mzg.modeexpand.resume;
|
||||
|
||||
import com.engine.mzg.conn.RecruitCommon;
|
||||
import com.engine.mzg.conn.RecruitRecordSet;
|
||||
import com.engine.mzg.enums.EmailTemplateEnum;
|
||||
import com.engine.mzg.exception.CustomizeRunTimeException;
|
||||
import com.engine.mzg.util.RecruitUtil;
|
||||
import com.weaver.formmodel.data.model.Formfield;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.IgnoreCaseHashMap;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
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.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 发送应聘登记
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/09/05
|
||||
* @version: 1.0
|
||||
*/
|
||||
|
||||
public class SendRegistExpand extends AbstractModeExpandJavaCodeNew {
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> param) {
|
||||
Map<String, String> result = new HashMap<>();
|
||||
try {
|
||||
int billId;
|
||||
RequestInfo requestInfo = (RequestInfo) param.get("RequestInfo");
|
||||
if (requestInfo != null) {
|
||||
billId = Util.getIntValue(requestInfo.getRequestid());
|
||||
IgnoreCaseHashMap<String, String> mainDataMap = new IgnoreCaseHashMap<>();
|
||||
MainTableInfo mainTableInfo = requestInfo.getMainTableInfo();
|
||||
Property[] properties = mainTableInfo.getProperty();
|
||||
for (Property property : properties) {
|
||||
mainDataMap.put(property.getName(), property.getValue());
|
||||
}
|
||||
|
||||
RecordSet rs = new RecordSet();
|
||||
String mobileAppidRegist = RecruitCommon.getSettingValue("MOBILE_APPID_REGIST");
|
||||
String mobileUrlRegist = RecruitCommon.getSettingValue("MOBILE_URL_REGIST");
|
||||
String httpUrl = RecruitCommon.getSettingValue("HTTP_URL");
|
||||
rs.executeQuery("select noLoginUser from mobileappbaseinfo where id = ?", mobileAppidRegist);
|
||||
int creator = -1;
|
||||
if (rs.next()) {
|
||||
creator = rs.getInt("noLoginUser");
|
||||
}
|
||||
if (-1 == creator) {
|
||||
throw new CustomizeRunTimeException("未配置免登陆访问用户,请检查移动建模应用配置");
|
||||
}
|
||||
|
||||
String sendTo = Util.null2String(mainDataMap.get("dzyx"));
|
||||
if (StringUtils.isBlank(sendTo)) {
|
||||
throw new CustomizeRunTimeException("电子邮箱为空,邮件发送失败");
|
||||
}
|
||||
String emailTitle = "";
|
||||
String emailContent = "";
|
||||
rs.executeQuery("select yjzt ,yjnr from uf_recruit_email where mblx =? ", EmailTemplateEnum.REGIST.getValue());
|
||||
if (rs.next()) {
|
||||
emailTitle = rs.getString("yjzt");
|
||||
emailContent = rs.getString("yjnr");
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(emailTitle) || StringUtils.isBlank(emailContent)) {
|
||||
throw new CustomizeRunTimeException("请检查邮件模板设置");
|
||||
}
|
||||
|
||||
|
||||
// 插入应聘登记数据
|
||||
IgnoreCaseHashMap<String, Object> dataMap = new IgnoreCaseHashMap<>();
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
dataMap.put("modeuuid", uuid);
|
||||
int formModeId = RecruitCommon.getModeIdByTableName("uf_recruit_regist");
|
||||
dataMap.put("formmodeid", formModeId);
|
||||
// 构建建模表基本数据
|
||||
RecruitRecordSet.buildModeInsertFields(dataMap, creator);
|
||||
dataMap.put("xmzw", mainDataMap.get("xm"));
|
||||
dataMap.put("sqzw", mainDataMap.get("sqzw"));
|
||||
dataMap.put("lldh", mainDataMap.get("lxfs"));
|
||||
|
||||
//dataMap.put("modedatastatus", "0");
|
||||
// 插入数据
|
||||
RecruitRecordSet.insertData(dataMap, "uf_recruit_regist");
|
||||
|
||||
int id = RecruitRecordSet.refreshRight(uuid, "uf_recruit_regist", formModeId, creator);
|
||||
|
||||
// 测评ID反写简历中心表,更新状态
|
||||
rs.executeUpdate("update uf_recruit_resume set xxcjzt = ? ,ypdjid = ? where id = ? ", 1, id, billId);
|
||||
|
||||
// 发送邮件
|
||||
// 查询字段信息
|
||||
List<Formfield> fieldList = RecruitUtil.getFieldList("uf_recruit_resume");
|
||||
Map<String, List<Formfield>> fieldMapList = fieldList.stream().collect(Collectors.groupingBy(Formfield::getFieldname));
|
||||
String url = httpUrl + mobileUrlRegist + "&billid=" + id;
|
||||
if (StringUtils.isNotBlank(url)) {
|
||||
url = "<span><a href='" + url + "' target='_blank'>链接地址</a></span>";
|
||||
}
|
||||
emailContent = emailContent.replace("{链接地址}", url);
|
||||
emailContent = RecruitUtil.getReplaceContent(emailContent, fieldMapList, mainDataMap);
|
||||
RecruitUtil.sendEmail(sendTo, emailTitle, emailContent);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
new BaseBean().writeLog(e);
|
||||
result.put("errmsg", e.getMessage());
|
||||
result.put("flag", "false");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
@ -0,0 +1,228 @@
|
||||
package weaver.interfaces.mzg.action.interview;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.mzg.conn.RecruitCommon;
|
||||
import com.engine.mzg.enums.EmailTemplateEnum;
|
||||
import com.engine.mzg.util.RecruitUtil;
|
||||
import com.engine.workflowDesign.biz.AutoForecastBiz;
|
||||
import com.engine.workplan.service.impl.WorkPlanBaseServiceImpl;
|
||||
import com.weaver.formmodel.data.manager.FormInfoManager;
|
||||
import com.weaver.formmodel.data.model.Formfield;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.IgnoreCaseHashMap;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
import weaver.interfaces.workflow.action.Action;
|
||||
import weaver.soa.workflow.request.MainTableInfo;
|
||||
import weaver.soa.workflow.request.Property;
|
||||
import weaver.soa.workflow.request.RequestInfo;
|
||||
import weaver.workflow.request.RequestNodeFlow;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/09/11
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class SubmitInterviewAction implements Action {
|
||||
private String interviewStep;
|
||||
|
||||
@Override
|
||||
public String execute(RequestInfo requestInfo) {
|
||||
|
||||
RecordSet rs = new RecordSet();
|
||||
try {
|
||||
if (StringUtils.isBlank(interviewStep)) {
|
||||
requestInfo.getRequestManager().setMessagecontent("面试流程配置异常,请检查");
|
||||
return FAILURE_AND_CONTINUE;
|
||||
}
|
||||
MainTableInfo mainTableInfo = requestInfo.getMainTableInfo();
|
||||
int billId = requestInfo.getRequestManager().getBillid();
|
||||
String billTableName = requestInfo.getRequestManager().getBillTableName();
|
||||
int formId = requestInfo.getRequestManager().getFormid();
|
||||
User user = requestInfo.getRequestManager().getUser();
|
||||
int requestId = requestInfo.getRequestManager().getRequestid();
|
||||
int nodeId = requestInfo.getRequestManager().getNodeid();
|
||||
rs.executeQuery("select mszt from " + billTableName + " where id = ?", billId);
|
||||
if (rs.next()) {
|
||||
String mszt = rs.getString("mszt");
|
||||
if ("2".equals(mszt)) {
|
||||
requestInfo.getRequestManager().setMessagecontent("该面试已取消");
|
||||
return FAILURE_AND_CONTINUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Set<String> userIdSet = new HashSet<>();
|
||||
|
||||
RequestNodeFlow flow = new AutoForecastBiz().getRequestNodeFlow(requestId, Util.getIntValue(nodeId), user);
|
||||
flow.getNextNodes();
|
||||
ArrayList operatorshts = flow.getOperatorshts();
|
||||
if (CollectionUtils.isNotEmpty(operatorshts)) {
|
||||
for (Object obj : operatorshts) {
|
||||
JSONObject jsonObject = (JSONObject) JSON.toJSON(obj);
|
||||
// 使用流式处理遍历 JSONObject 的所有键
|
||||
jsonObject.keySet().stream().forEach(key -> {
|
||||
JSONArray jsonArrayForKey = jsonObject.getJSONArray((String) key);
|
||||
if (jsonArrayForKey.size() > 0) {
|
||||
String stringValue = jsonArrayForKey.getString(0);
|
||||
// 分割字符串并提取数字
|
||||
String[] parts = stringValue.split("_");
|
||||
if (parts.length > 0) {
|
||||
userIdSet.add(parts[0]);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 去除创建者
|
||||
userIdSet.remove(String.valueOf(user.getUID()));
|
||||
|
||||
IgnoreCaseHashMap<String, String> mainDataMap = new IgnoreCaseHashMap<>();
|
||||
Property[] propertyArray = mainTableInfo.getProperty();
|
||||
for (Property property : propertyArray) {
|
||||
mainDataMap.put(property.getName(), property.getValue());
|
||||
}
|
||||
|
||||
Optional<String> userIdOptional = userIdSet.stream().findFirst();
|
||||
String msg = null;
|
||||
if (userIdOptional.isPresent()) {
|
||||
msg = userIdOptional.get();
|
||||
}
|
||||
|
||||
// 根据轮次
|
||||
String msgKey;
|
||||
String msgField;
|
||||
String msrqField;
|
||||
Integer emailTemplate;
|
||||
if ("0".equals(interviewStep)) {
|
||||
msgKey = "MSG_INTERVIEEW_FIRST";
|
||||
msgField = "dylmsg";
|
||||
msrqField = "dylmsrq";
|
||||
emailTemplate = EmailTemplateEnum.INTERVIEW_FIRST.getValue();
|
||||
} else if ("1".equals(interviewStep)) {
|
||||
msgKey = "MSG_INTERVIEW_SECOND";
|
||||
msgField = "delmsg";
|
||||
msrqField = "delmsrq";
|
||||
emailTemplate = EmailTemplateEnum.INTERVIEW_SECOND.getValue();
|
||||
} else if ("2".equals(interviewStep)) {
|
||||
msgKey = "MSG_INTERVIEW_THIRD";
|
||||
msgField = "dslmsg";
|
||||
msrqField = "dslmsrq";
|
||||
emailTemplate = EmailTemplateEnum.INTERVIEW_THIRD.getValue();
|
||||
} else {
|
||||
return SUCCESS;
|
||||
}
|
||||
mainDataMap.put(msgField, msg);
|
||||
// 更新表单字段
|
||||
rs.executeUpdate("update " + billTableName + " set " + msgField + " = ? where id = ?", msg, billId);
|
||||
|
||||
|
||||
List<Formfield> fieldList = FormInfoManager.getInstance().getAllField(formId);
|
||||
Map<String, Formfield> fieldMap = fieldList.stream().collect(Collectors.toMap(Formfield::getFieldname, item -> item, (k1, k2) -> k1));
|
||||
|
||||
|
||||
//userIdSet.add(Util.null2String(mainDataMap.get(msgField)));
|
||||
String interviewDate = Util.null2String(mainDataMap.get(msrqField));
|
||||
String msgContent = RecruitCommon.getSettingValue(msgKey, fieldMap, mainDataMap);
|
||||
String msgCenterId = RecruitCommon.getSettingValue("MSG_CENTER_ID");
|
||||
String planTitleInterview = RecruitCommon.getSettingValue("PLAN_TITLE_INTERVIEW", fieldMap, mainDataMap);
|
||||
String planContentInterview = RecruitCommon.getSettingValue("PLAN_CONTENT_INTERVIEW", fieldMap, mainDataMap);
|
||||
String msgTitleInterview = RecruitCommon.getSettingValue("MSG_TITLE_INTERVIEW", fieldMap, mainDataMap);
|
||||
|
||||
|
||||
// 消息不为空,发送消息
|
||||
RecruitUtil.messagePush(msgCenterId, msgTitleInterview, msgContent, userIdSet, user.getUID());
|
||||
|
||||
|
||||
// 创建日程
|
||||
Map<String, Object> maps = new HashMap<>(16);
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
|
||||
LocalDateTime dateTime = LocalDateTime.parse(interviewDate, formatter);
|
||||
LocalDateTime newDateTime = dateTime.plusHours(1);
|
||||
// 日程类型
|
||||
maps.put("workPlanType", "0");
|
||||
// 工作计划名称
|
||||
maps.put("planName", planTitleInterview);
|
||||
// 系统参与人
|
||||
maps.put("memberIDs", StringUtils.join(userIdSet, ","));
|
||||
// 紧急程度
|
||||
maps.put("urgentLevel", "1");
|
||||
// 开始时间
|
||||
maps.put("beginDateTime", interviewDate);
|
||||
// 结束时间
|
||||
maps.put("endDateTime", newDateTime.format(formatter));
|
||||
// 内容
|
||||
maps.put("description", planContentInterview);
|
||||
// 相关文档
|
||||
maps.put("docIDs", mainDataMap.get("zp"));
|
||||
maps.put("requestIDs", requestId);
|
||||
String workId = getPlanIdByRequestId(rs, requestId);
|
||||
maps.put("workid", workId);
|
||||
|
||||
Map<String, Object> result = ServiceUtil.getService(WorkPlanBaseServiceImpl.class, user).addWorkPlan(maps);
|
||||
Integer workplanId = (Integer) result.get("workplanid");
|
||||
rs.executeUpdate("update " + billTableName + " set msrc = ? where id = ?", workplanId, billId);
|
||||
|
||||
|
||||
// 发送邮件
|
||||
|
||||
//Map<String, List<Formfield>> fieldMapList = fieldList.stream().collect(Collectors.groupingBy(Formfield::getFieldname));
|
||||
//String emailTitle = "";
|
||||
//String emailContent = "";
|
||||
//rs.executeQuery("select yjzt ,yjnr from uf_recruit_email where mblx =? ", emailTemplate);
|
||||
//if (rs.next()) {
|
||||
// emailTitle = rs.getString("yjzt");
|
||||
// emailContent = rs.getString("yjnr");
|
||||
//}
|
||||
//emailContent = RecruitUtil.getReplaceContent(emailContent, fieldMapList, mainDataMap);
|
||||
//RecruitUtil.sendEmail(Util.null2String(mainDataMap.get("dzyx")), emailTitle, emailContent);
|
||||
|
||||
return SUCCESS;
|
||||
} catch (Exception e) {
|
||||
rs.writeLog("InterviewAction error: ", e);
|
||||
requestInfo.getRequestManager().setMessagecontent(e.getMessage());
|
||||
return FAILURE_AND_CONTINUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取关联该流程的日程ID
|
||||
*
|
||||
* @param rs
|
||||
* @param requestId
|
||||
* @return
|
||||
*/
|
||||
private String getPlanIdByRequestId(RecordSet rs, int requestId) {
|
||||
if (requestId < 0) {
|
||||
return "";
|
||||
}
|
||||
rs.executeQuery("select id from WorkPlan where requestid = ? ", requestId);
|
||||
if (rs.next()) {
|
||||
return rs.getString("id");
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
public String getInterviewStep() {
|
||||
return interviewStep;
|
||||
}
|
||||
|
||||
public void setInterviewStep(String interviewStep) {
|
||||
this.interviewStep = interviewStep;
|
||||
}
|
||||
}
|
@ -0,0 +1,301 @@
|
||||
package weaver.interfaces.mzg.cronjob;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.engine.mzg.conn.RecruitCommon;
|
||||
import com.engine.mzg.conn.RecruitRecordSet;
|
||||
import com.engine.mzg.exception.CustomizeRunTimeException;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.IgnoreCaseHashMap;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.company.DepartmentComInfo;
|
||||
import weaver.interfaces.schedule.BaseCronJob;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 招聘报表计划任务
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/10/14
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitReportJob extends BaseCronJob {
|
||||
DepartmentComInfo departmentComInfo = new DepartmentComInfo();
|
||||
/**
|
||||
* 面试流程表名
|
||||
*/
|
||||
String flowTableInterview;
|
||||
/**
|
||||
* 面试流程ID
|
||||
*/
|
||||
String interviewFlowId;
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
// 查询招聘需求建模表
|
||||
RecordSet rs = new RecordSet();
|
||||
try {
|
||||
rs.writeLog("RecruitReportJob开始执行");
|
||||
flowTableInterview = RecruitCommon.getSettingValue("FLOW_TABLE_INTERVIEW");
|
||||
interviewFlowId = getWorkflowId();
|
||||
if (StringUtils.isBlank(flowTableInterview) || StringUtils.isBlank(interviewFlowId)) {
|
||||
throw new CustomizeRunTimeException("FLOW_TABLE_INTERVIEW或INTERVIEW_FLOW_ID为空,flowTableInterview=" + flowTableInterview + ",INTERVIEW_FLOW_ID=" + interviewFlowId);
|
||||
}
|
||||
// TODO 是否做时间或其他条件限制
|
||||
rs.executeQuery("select * from uf_recruit_zpxqglb");
|
||||
// 遍历所有岗位岗位
|
||||
while (rs.next()) {
|
||||
IgnoreCaseHashMap<String, Object> dataMap = combinationData(rs);
|
||||
updateData(dataMap);
|
||||
}
|
||||
rs.writeLog("RecruitReportJob执行结束");
|
||||
|
||||
} catch (Exception e) {
|
||||
rs.writeLog("RecruitReportJob执行异常", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 组装数据
|
||||
*
|
||||
* @param rs
|
||||
*/
|
||||
private IgnoreCaseHashMap<String, Object> combinationData(RecordSet rs) {
|
||||
// 中心
|
||||
String zx = "";
|
||||
String sqbm = rs.getString("sqbm");
|
||||
if (StringUtils.isNotBlank(sqbm)) {
|
||||
zx = departmentComInfo.getSubcompanyid1(sqbm);
|
||||
}
|
||||
// 招聘岗位名称
|
||||
String zpgwmc = rs.getString("id");
|
||||
// 招聘数量
|
||||
String zpsl = rs.getString("sqzprs");
|
||||
// 责任人
|
||||
String zrr = rs.getString("zrr");
|
||||
// 招聘紧急程度
|
||||
String zpjjcd = rs.getString("zpjjcd");
|
||||
// 需求提出时间
|
||||
String xqtcsj = rs.getString("sqrq");
|
||||
// 预计招聘完成时间
|
||||
String yjzpwcsj = rs.getString("xydgrq");
|
||||
// 到岗时间
|
||||
String dgsj = "";
|
||||
// 简历推荐数(简历中心该岗位的份数)
|
||||
int jltjs = countResumeNum(zpgwmc);
|
||||
// 预约面试数
|
||||
int yymss = countInterviewNum(interviewFlowId, zpgwmc);
|
||||
// 初试通过数
|
||||
int cstgs = countFirstNum(interviewFlowId, zpgwmc);
|
||||
// 复试通过数
|
||||
int fstgs = countSecondNum(interviewFlowId, zpgwmc);
|
||||
// 终试通过数
|
||||
int zstgs = countThirdNum(interviewFlowId, zpgwmc);
|
||||
// 尽调通过数
|
||||
int jdtgs = countBackPassNum(zpgwmc);
|
||||
// 候选人数
|
||||
int hxrs = countAcceptOfferNum(zpgwmc);
|
||||
// 岗位类别
|
||||
String gwlb = rs.getString("gwlb");
|
||||
|
||||
|
||||
IgnoreCaseHashMap<String, Object> dataMap = new IgnoreCaseHashMap<>();
|
||||
dataMap.put("zx", zx);
|
||||
dataMap.put("zpgwmc", zpgwmc);
|
||||
dataMap.put("zpsl", zpsl);
|
||||
dataMap.put("zpjjcd", zpjjcd);
|
||||
dataMap.put("xqtcsj", xqtcsj);
|
||||
dataMap.put("yjzpwcsj", yjzpwcsj);
|
||||
dataMap.put("dgsj", dgsj);
|
||||
dataMap.put("jltjs", jltjs);
|
||||
dataMap.put("yymss", yymss);
|
||||
dataMap.put("cstgs", cstgs);
|
||||
dataMap.put("fstgs", fstgs);
|
||||
dataMap.put("zstgs", zstgs);
|
||||
dataMap.put("jdtgs", jdtgs);
|
||||
dataMap.put("hxrs", hxrs);
|
||||
dataMap.put("gwlb", gwlb);
|
||||
dataMap.put("zrr", zrr);
|
||||
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新数据
|
||||
*
|
||||
* @param dataMap
|
||||
* @return
|
||||
*/
|
||||
private int updateData(IgnoreCaseHashMap<String, Object> dataMap) {
|
||||
RecordSet recordSet = new RecordSet();
|
||||
String zpgwmc = Util.null2String(dataMap.get("zpgwmc"));
|
||||
// 查询台账中是否有该职位,有则更新,没有则插入
|
||||
int id = -1;
|
||||
recordSet.executeQuery("select id from uf_recruit_report where zpgwmc = ?", zpgwmc);
|
||||
if (recordSet.next()) {
|
||||
id = recordSet.getInt("id");
|
||||
}
|
||||
if (id > 0) {
|
||||
dataMap.put("id", id);
|
||||
// 责任人不更新
|
||||
dataMap.remove("zrr");
|
||||
RecruitRecordSet.buildModeUpdateFields(dataMap, 1);
|
||||
RecruitRecordSet.updateDataById(dataMap, "uf_recruit_report");
|
||||
} else {
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
dataMap.put("modeuuid", uuid);
|
||||
int formModeId = RecruitCommon.getModeIdByTableName("uf_recruit_report");
|
||||
dataMap.put("formmodeid", formModeId);
|
||||
RecruitRecordSet.buildModeInsertFields(dataMap, 1);
|
||||
RecruitRecordSet.insertData(dataMap, "uf_recruit_report");
|
||||
id = RecruitRecordSet.refreshRight(uuid, "uf_recruit_report", formModeId, 1);
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取该职位的简历数量
|
||||
*
|
||||
* @param sqzwId
|
||||
* @return
|
||||
*/
|
||||
private int countResumeNum(String sqzwId) {
|
||||
RecordSet recordSet = new RecordSet();
|
||||
String num = "";
|
||||
recordSet.executeQuery("select count(id) as total_count from uf_recruit_resume where sqzw = ?", sqzwId);
|
||||
if (recordSet.next()) {
|
||||
num = recordSet.getString("total_count");
|
||||
}
|
||||
return Convert.toInt(num, 0);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取该职位的背调通过数量
|
||||
*
|
||||
* @param sqzwId
|
||||
* @return
|
||||
*/
|
||||
private int countBackPassNum(String sqzwId) {
|
||||
RecordSet recordSet = new RecordSet();
|
||||
String num = "";
|
||||
recordSet.executeQuery("select count(a.id) as total_count from uf_recruit_bd a inner join uf_recruit_ms b on a.bbdr = b.id where a.bdjg = 0 and b.sqzw = ?", sqzwId);
|
||||
if (recordSet.next()) {
|
||||
num = recordSet.getString("total_count");
|
||||
}
|
||||
return Convert.toInt(num, 0);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取该职位的接受offer的数量
|
||||
*
|
||||
* @param sqzwId
|
||||
* @return
|
||||
*/
|
||||
private int countAcceptOfferNum(String sqzwId) {
|
||||
RecordSet recordSet = new RecordSet();
|
||||
String num = "";
|
||||
recordSet.executeQuery("select count(a.id) as total_count from uf_recruit_lytzs a inner join uf_recruit_ms b on a.xm = b.id where a.fkjg = 1 and b.sqzw = ?", sqzwId);
|
||||
if (recordSet.next()) {
|
||||
num = recordSet.getString("total_count");
|
||||
}
|
||||
return Convert.toInt(num, 0);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计初试通过的数据
|
||||
*
|
||||
* @param workflowId
|
||||
* @param sqzwId
|
||||
* @return
|
||||
*/
|
||||
private int countInterviewNum(String workflowId, String sqzwId) {
|
||||
RecordSet recordSet = new RecordSet();
|
||||
String num = "";
|
||||
recordSet.executeQuery("select count(distinct a.requestid) as total_count from workflow_currentoperator a inner join workflow_nodebase b on a.nodeid = b.id inner join " + flowTableInterview + " c on a.requestid = c.requestid inner join uf_recruit_ms d on c.requestId = d.mslcid where a.workflowid = ? and b.nodename = ? and c.sqzw =?", workflowId, "第一轮面试", sqzwId);
|
||||
if (recordSet.next()) {
|
||||
num = recordSet.getString("total_count");
|
||||
}
|
||||
return Convert.toInt(num, 0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 统计初试通过的数据
|
||||
*
|
||||
* @param workflowId
|
||||
* @param sqzwId
|
||||
* @return
|
||||
*/
|
||||
private int countFirstNum(String workflowId, String sqzwId) {
|
||||
RecordSet recordSet = new RecordSet();
|
||||
String num = "";
|
||||
recordSet.executeQuery("select count(distinct a.requestid) as total_count from workflow_currentoperator a inner join workflow_nodebase b on a.nodeid = b.id inner join " + flowTableInterview + " c on a.requestid = c.requestid inner join uf_recruit_ms d on c.requestId = d.mslcid where a.workflowid = ? and b.nodename = ? and c.sqzw =?", workflowId, "hr面试安排1", sqzwId);
|
||||
if (recordSet.next()) {
|
||||
num = recordSet.getString("total_count");
|
||||
}
|
||||
return Convert.toInt(num, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计复试通过的数据
|
||||
*
|
||||
* @param workflowId
|
||||
* @param sqzwId
|
||||
* @return
|
||||
*/
|
||||
private int countSecondNum(String workflowId, String sqzwId) {
|
||||
RecordSet recordSet = new RecordSet();
|
||||
String num = "";
|
||||
recordSet.executeQuery("select count(distinct a.requestid) as total_count from workflow_currentoperator a inner join workflow_nodebase b on a.nodeid = b.id inner join " + flowTableInterview + " c on a.requestid = c.requestid inner join uf_recruit_ms d on c.requestId = d.mslcid where a.workflowid = ? and b.nodename = ? and c.sqzw =?", workflowId, "hr面试安排2", sqzwId);
|
||||
if (recordSet.next()) {
|
||||
num = recordSet.getString("total_count");
|
||||
}
|
||||
// 统计两轮面试的数据
|
||||
recordSet.executeQuery("select count(*) as total_count from workflow_currentoperator a inner join workflow_nodebase b on a.nodeid = b.id inner join " + flowTableInterview + " c on a.requestid = c.requestid and c.mslc =0 inner join uf_recruit_ms d on c.requestId = d.mslcid where a.workflowid = ? and b.nodename = ? and c.sqzw =?", workflowId, "hr面试安排3", sqzwId);
|
||||
if (recordSet.next()) {
|
||||
num += Convert.toInt(recordSet.getString("total_count"), 0);
|
||||
}
|
||||
|
||||
return Convert.toInt(num, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计终试通过的数据
|
||||
*
|
||||
* @param workflowId
|
||||
* @param sqzwId
|
||||
* @return
|
||||
*/
|
||||
private int countThirdNum(String workflowId, String sqzwId) {
|
||||
RecordSet recordSet = new RecordSet();
|
||||
String num = "";
|
||||
recordSet.executeQuery("select count(distinct a.requestid) as total_count from workflow_currentoperator a inner join workflow_nodebase b on a.nodeid = b.id inner join " + flowTableInterview + " c on a.requestid = c.requestid and c.mslc =1 inner join uf_recruit_ms d on c.requestId = d.mslcid where a.workflowid = ? and b.nodename = ? and c.sqzw =?", workflowId, "hr面试安排3", sqzwId);
|
||||
if (recordSet.next()) {
|
||||
num = recordSet.getString("total_count");
|
||||
}
|
||||
return Convert.toInt(num, 0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取面试流程ID
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private String getWorkflowId() {
|
||||
RecordSet recordSet = new RecordSet();
|
||||
String workflowId = "";
|
||||
recordSet.executeQuery("SELECT a.id AS workflowid FROM workflow_base a WHERE a.formid = (SELECT id FROM workflow_bill WHERE tablename = ?)", flowTableInterview);
|
||||
if (recordSet.next()) {
|
||||
workflowId = recordSet.getString("workflowid");
|
||||
}
|
||||
return workflowId;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue