generated from dxfeng/secondev-chapanda-feishu
移动建模接口调整,BUG修复
This commit is contained in:
parent
9dc5786e7b
commit
9c1e45a79e
|
|
@ -1,12 +0,0 @@
|
|||
package com.api.recruit.controller;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/30
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Path("/jcl/recruit/offer")
|
||||
public class OfferController extends com.engine.recruit.controller.OfferController{
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.api.recruit.controller;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/11/15
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Path("/jcl/recruit/mobile")
|
||||
public class RecruitMobileModeController extends com.engine.recruit.controller.RecruitMobileModeController{
|
||||
}
|
||||
|
|
@ -2,16 +2,16 @@ package com.engine.recruit.controller;
|
|||
|
||||
import com.engine.common.util.ParamUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.recruit.entity.workbench.OptionVO;
|
||||
import com.engine.recruit.util.ResponseResult;
|
||||
import com.engine.recruit.wrapper.InductionManageWrapper;
|
||||
import com.icbc.api.internal.apache.http.impl.cookie.S;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.*;
|
||||
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;
|
||||
|
|
@ -43,21 +43,4 @@ public class InductionManageController {
|
|||
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);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/infoSubmit")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String infoSubmit(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam("id") String id) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<String, Map<String, Object>>(user).run(getInductionManageWrapper(user) :: infoSubmit,id);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,29 +3,32 @@ 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 com.engine.recruit.wrapper.OfferWrapper;
|
||||
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.*;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/30
|
||||
* @createTime: 2023/11/15
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class OfferController {
|
||||
public class RecruitMobileModeController {
|
||||
public OfferWrapper getOfferWrapper(User user) {
|
||||
return ServiceUtil.getService(OfferWrapper.class, user);
|
||||
}
|
||||
|
||||
public InductionManageWrapper getInductionManageWrapper(User user) {
|
||||
return ServiceUtil.getService(InductionManageWrapper.class, user);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/getOfferContent")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
|
|
@ -43,4 +46,21 @@ public class OfferController {
|
|||
Map<String, Object> params = ParamUtil.request2Map(request);
|
||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getOfferWrapper(user)::updateOfferStatus, 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);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/infoSubmit")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String infoSubmit(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam("id") String id) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<String, Map<String, Object>>(user).run(getInductionManageWrapper(user)::infoSubmit, id);
|
||||
}
|
||||
}
|
||||
|
|
@ -31,9 +31,18 @@ public class OfferServiceImpl extends Service implements OfferService {
|
|||
String email = Util.null2String(param.get("dzyx"));
|
||||
RecordSet rs = new RecordSet();
|
||||
String offerContent = "";
|
||||
rs.executeQuery("select tznr from uf_jcl_offer where id = ? and dzyx = ?", billId, email);
|
||||
String sxrq = "";
|
||||
rs.executeQuery("select tznr,sxrq from uf_jcl_offer where id = ? and dzyx = ?", billId, email);
|
||||
if (rs.next()) {
|
||||
offerContent = rs.getString("tznr");
|
||||
sxrq = rs.getString("sxrq");
|
||||
}
|
||||
// 判断当前offer是否失效
|
||||
String currentDate = DateUtil.getCurrentDate();
|
||||
int compDate = DateUtil.compDate(currentDate, sxrq);
|
||||
// 当前日期>失效日期,更新状态为逾期未回复
|
||||
if (compDate < 0) {
|
||||
throw new CustomizeRunTimeException("offer已失效");
|
||||
}
|
||||
if (StringUtils.isAnyBlank(billId, email, offerContent)) {
|
||||
throw new CustomizeRunTimeException("非法访问");
|
||||
|
|
@ -60,7 +69,8 @@ public class OfferServiceImpl extends Service implements OfferService {
|
|||
}
|
||||
}
|
||||
|
||||
rs.executeUpdate("update uf_jcl_offer set zt = ? where id = ? and dzyx = ?", status, billId, email);
|
||||
// 更新反馈状态、反馈时间
|
||||
rs.executeUpdate("update uf_jcl_offer set zt = ?, fksj = ? where id = ? and dzyx = ?", status, DateUtil.getDateTime(), billId, email);
|
||||
|
||||
// 记录应聘过程
|
||||
ApplicantRecordPo recordPo = ApplicantRecordPo.builder()
|
||||
|
|
|
|||
|
|
@ -16,10 +16,6 @@ import java.util.Map;
|
|||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitPositionServiceImpl extends Service implements RecruitPositionService {
|
||||
/**
|
||||
* 招聘职位建模表
|
||||
*/
|
||||
private static final String MODE_TABLE_NAME = "uf_jcl_zp_zpzw";
|
||||
|
||||
@Override
|
||||
public Map<String, Object> updatePostInfo(Map<String, Object> param) {
|
||||
|
|
@ -31,7 +27,12 @@ public class RecruitPositionServiceImpl extends Service implements RecruitPositi
|
|||
throw new CustomizeRunTimeException("数据有误,请重试");
|
||||
}
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeUpdate(" update " + MODE_TABLE_NAME + " set zpzwfzr = ? ,zpxzr = ? where id in (" + ids + ")", zpzwfzr, zpxzr);
|
||||
if (StringUtils.isNotBlank(zpzwfzr)) {
|
||||
rs.executeUpdate(" update uf_jcl_zp_zpzw set zpzwfzr = ? where id in (" + ids + ")", zpzwfzr);
|
||||
}
|
||||
if (StringUtils.isNotBlank(zpxzr)) {
|
||||
rs.executeUpdate(" update uf_jcl_zp_zpzw set zpxzr = ? where id in (" + ids + ")", zpxzr);
|
||||
}
|
||||
return returnMap;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
package weaver.formmode.recruit.modeexpand.browser;
|
||||
|
||||
import weaver.formmode.customjavacode.AbstractCustomSqlConditionJavaCode;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/11/15
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class ApplicantBrowser extends AbstractCustomSqlConditionJavaCode {
|
||||
@Override
|
||||
public String generateSqlCondition(Map<String, Object> param) throws Exception {
|
||||
Object extensionParam = param.get("extensionParam");
|
||||
HashMap<String, Object> extensionMap = (HashMap<String, Object>) extensionParam;
|
||||
|
||||
String sqlCondition = "";
|
||||
String fromModule = (String) extensionMap.get("fromModule");
|
||||
if ("workflow".equals(fromModule)) {
|
||||
sqlCondition += " t1.zt = 1 ";
|
||||
}
|
||||
return sqlCondition;
|
||||
}
|
||||
}
|
||||
|
|
@ -21,17 +21,6 @@ import java.util.Map;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
public class CreateOfferModeExpand extends AbstractModeExpandJavaCodeNew {
|
||||
/**
|
||||
* 消息来源ID
|
||||
*/
|
||||
private String messageType;
|
||||
|
||||
/**
|
||||
* 消息提醒标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> params) {
|
||||
Map<String, String> result = new HashMap<>();
|
||||
|
|
@ -95,7 +84,7 @@ public class CreateOfferModeExpand extends AbstractModeExpandJavaCodeNew {
|
|||
}
|
||||
// 更新状态为已发送,更新通知内容,更新发送人、发送时间
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeUpdate("update uf_jcl_offer set zt = 1,tznr = ?,fsr=?,fssj=? where id = ? ", billId, tznr, user.getUID(), DateUtil.getDateTime());
|
||||
rs.executeUpdate("update uf_jcl_offer set zt = 1,tznr = ?,fsr=?,fssj=? where id = ? ", tznr, user.getUID(), DateUtil.getDateTime(), billId);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
package weaver.interfaces.recruit.cronjob;
|
||||
|
||||
import com.engine.recruit.conn.RecruitRecordSet;
|
||||
import weaver.common.DateUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.Util;
|
||||
import weaver.interfaces.schedule.BaseCronJob;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 若当前日期大于失效日期,状态变为“逾期未回复”
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/11/15
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitRefreshOfferJob extends BaseCronJob {
|
||||
@Override
|
||||
public void execute() {
|
||||
// 查询已发送待反馈的offer数据
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select id,zt,sxrq from uf_jcl_offer where zt =1");
|
||||
List<Map<String, Object>> dataList = RecruitRecordSet.getRecordMapList(rs);
|
||||
String currentDate = DateUtil.getCurrentDate();
|
||||
for (Map<String, Object> data : dataList) {
|
||||
String sxrq = Util.null2String(data.get("sxrq"));
|
||||
String id = Util.null2String(data.get("id"));
|
||||
int compDate = DateUtil.compDate(currentDate, sxrq);
|
||||
// 当前日期>失效日期,更新状态为逾期未回复
|
||||
if (compDate < 0) {
|
||||
rs.executeUpdate("update uf_jcl_offer set zt = 5 where id = ?", id);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue