weaver-hrm-recruit/src/com/engine/recruit/service/impl/RecruitFlowServiceImpl.java

62 lines
2.4 KiB
Java
Raw Normal View History

2023-09-25 16:35:58 +08:00
package com.engine.recruit.service.impl;
import com.engine.core.impl.Service;
import com.engine.recruit.entity.recruitflow.po.RecruitButton;
import com.engine.recruit.service.RecruitFlowService;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import weaver.general.Util;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/09/22
* @version: 1.0
*/
public class RecruitFlowServiceImpl extends Service implements RecruitFlowService {
@Override
public Map<String, Object> getButtonList(Map<String, Object> params) {
Map<String, Object> returnMap = new HashMap<>();
String modeId = Util.null2String(params.get("modeId"));
String formId = Util.null2String(params.get("formId"));
String billId = Util.null2String(params.get("billId"));
// 当前阶段
String stageId = Util.null2String(params.get("stageId"));
//TODO 查询对应的招聘流程
2023-09-26 18:50:30 +08:00
int zplcId = 3;
2023-09-25 16:35:58 +08:00
List<RecruitButton> buttonList = new ArrayList<>();
RecordSet rs = new RecordSet();
if (StringUtils.isBlank(stageId)) {
// 查询开始环节
rs.executeQuery("select id from uf_jcl_zpjdsz where zplc = ? and hj = 0", zplcId);
if (rs.next()) {
stageId = rs.getString("id");
}
if (StringUtils.isBlank(stageId)) {
throw new RuntimeException("未找到对应招聘阶段");
}
}
rs.executeQuery("select a.zdyxsmc as buttonName, a.tzymbt as tabName, a.tzymdz as tabLink, a.zssx as orderNum, b.anbs as buttonKey, b.andz as buttonAction from uf_jcl_zpjdsz_dt1 a inner join uf_jcl_lcczan b on a.czan = b.id where a.sfqy = 0 and mainid = ? order by zssx", stageId);
while (rs.next()) {
buttonList.add(RecruitButton.builder()
.buttonName(rs.getString("buttonName"))
.tabName(rs.getString("tabName"))
.tabLink(rs.getString("tabLink"))
.buttonKey(rs.getString("buttonKey"))
.buttonAction(rs.getString("buttonAction"))
.orderNum(rs.getInt("orderNum"))
.build());
}
// 当前阶段所有按钮信息
returnMap.put("buttonList", buttonList);
return returnMap;
}
}