generated from dxfeng/secondev-chapanda-feishu
parent
fc87fa55b2
commit
861c5ee384
|
|
@ -78,4 +78,13 @@ public class RecruitMobileModeController {
|
|||
Map<String, Object> param = ParamUtil.request2Map(request);
|
||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getRecruitInterviewWrapper(user)::updateInterviewStatus, param);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/getInterviewEvaluateStatus")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getInterviewEvaluateStatus(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> param = ParamUtil.request2Map(request);
|
||||
return new ResponseResult<Map<String, Object>, String>(user).run(getRecruitInterviewWrapper(user)::getInterviewEvaluateStatus, param);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,4 +15,12 @@ public interface RecruitInterviewService {
|
|||
* @return
|
||||
*/
|
||||
Map<String, Object> updateInterviewStatus(Map<String, Object> param);
|
||||
|
||||
/**
|
||||
* 获取面试评价状态
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
String getInterviewEvaluateStatus(Map<String, Object> param);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,17 @@
|
|||
package com.engine.recruit.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.conn.ApplicantCommonInfo;
|
||||
import com.engine.recruit.conn.RecruitRecordSet;
|
||||
import com.engine.recruit.constant.RecruitConstant;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import com.engine.recruit.service.RecruitInterviewService;
|
||||
import com.weaver.formmodel.data.model.Formfield;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.resource.ResourceComInfo;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -86,4 +89,39 @@ public class RecruitInterviewServiceImpl extends Service implements RecruitInter
|
|||
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInterviewEvaluateStatus(Map<String, Object> param) {
|
||||
try {
|
||||
String id = Util.null2String(param.get("id"));
|
||||
String msg = Util.null2String(param.get("msg"));
|
||||
if (StringUtils.isBlank(msg)) {
|
||||
return "";
|
||||
}
|
||||
RecordSet rs = new RecordSet();
|
||||
int formId = ApplicantCommonInfo.getFormIdByTableName("uf_jcl_mspjfk");
|
||||
String[] split = msg.split(",");
|
||||
List<String> spanList = new ArrayList<>();
|
||||
ResourceComInfo resourceComInfo = new ResourceComInfo();
|
||||
for (String s : split) {
|
||||
rs.executeQuery("select fkzt from uf_jcl_mspjfk where msid = ? and msg = ?", id, s);
|
||||
String fkzt = "";
|
||||
if (rs.next()) {
|
||||
fkzt = Util.null2String(rs.getString("fkzt"));
|
||||
}
|
||||
fkzt = ApplicantCommonInfo.getSelectName(String.valueOf(formId), "fkzt", fkzt);
|
||||
if (StringUtils.isNotBlank(fkzt)) {
|
||||
spanList.add("<a href=javaScript:openhrm(" + s + ") onclick=pointerXY(event)>" + resourceComInfo.getLastname(s) + "(" + fkzt + ")</a>");
|
||||
} else {
|
||||
spanList.add("<a href=javaScript:openhrm(" + s + ") onclick=pointerXY(event)>" + resourceComInfo.getLastname(s) + "</a>");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return StringUtils.join(spanList, "<br/>");
|
||||
} catch (Exception e) {
|
||||
throw new CustomizeRunTimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,4 +21,10 @@ public class RecruitInterviewWrapper extends Service {
|
|||
public Map<String, Object> updateInterviewStatus(Map<String, Object> param) {
|
||||
return getRecruitInterviewService(user).updateInterviewStatus(param);
|
||||
}
|
||||
|
||||
public String getInterviewEvaluateStatus(Map<String, Object> param) {
|
||||
return getRecruitInterviewService(user).getInterviewEvaluateStatus(param);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,65 @@
|
|||
package weaver.formmode.recruit.modeexpand.interview;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
import weaver.soa.workflow.request.MainTableInfo;
|
||||
import weaver.soa.workflow.request.Property;
|
||||
import weaver.soa.workflow.request.RequestInfo;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/09/24
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class EditInterviewEvaluateExpand extends AbstractModeExpandJavaCodeNew {
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> params) {
|
||||
Map<String, String> result = new HashMap<>();
|
||||
RecordSet rs = new RecordSet();
|
||||
try {
|
||||
//数据id
|
||||
int billId;
|
||||
//模块id
|
||||
int modeId;
|
||||
RequestInfo requestInfo = (RequestInfo) params.get("RequestInfo");
|
||||
User user = (User) params.get("user");
|
||||
if (requestInfo != null) {
|
||||
billId = Util.getIntValue(requestInfo.getRequestid());
|
||||
modeId = Util.getIntValue(requestInfo.getWorkflowid());
|
||||
if (billId > 0 && modeId > 0) {
|
||||
MainTableInfo mainTableInfo = requestInfo.getMainTableInfo();
|
||||
Property[] properties = mainTableInfo.getProperty();
|
||||
Map<String, Object> mainDataMap = new HashMap<>(16);
|
||||
for (Property property : properties) {
|
||||
mainDataMap.put(property.getName(), property.getValue());
|
||||
}
|
||||
String msid = Util.null2String(mainDataMap.get("msid"));
|
||||
String jg = Util.null2String(mainDataMap.get("jg"));
|
||||
rs.executeQuery("select * from uf_jcl_mspjfk where msid = ? and id != ? and jg is not null", msid, billId);
|
||||
boolean hasEvaluate = rs.next() || StringUtils.isNotBlank(jg);
|
||||
|
||||
if (hasEvaluate) {
|
||||
// 更新为已反馈
|
||||
rs.executeUpdate("update uf_jcl_ms set zt = 2 where id = ? ", msid);
|
||||
} else {
|
||||
// 更新为未反馈
|
||||
rs.executeUpdate("update uf_jcl_ms set zt = 0 where id = ? ", msid);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
rs.writeLog(e);
|
||||
result.put("errmsg", e.getMessage());
|
||||
result.put("flag", "false");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue