weaver-hrm-recruit/src/weaver/formmode/recruit/modeexpand/demandmanage/RecruitStartModeExpand.java

53 lines
2.1 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package weaver.formmode.recruit.modeexpand.demandmanage;
import com.engine.recruit.enums.RecruitStatusEnum;
import weaver.conn.RecordSet;
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
import weaver.general.BaseBean;
import weaver.general.Util;
import weaver.soa.workflow.request.RequestInfo;
import weaver.workflow.workflow.WorkflowBillComInfo;
import java.util.HashMap;
import java.util.Map;
/**
* <p>聚才林招聘</p>
* 开启需求
* <p>开启需求——状态为进行中,置空完成日期和结束日期</p>
*
* @author:dxfeng
* @createTime: 2023/09/13
* @version: 1.0
*/
public class RecruitStartModeExpand extends AbstractModeExpandJavaCodeNew {
@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) {
// 获取表单名称
String formId = Util.null2String(param.get("formid"));
String tableName = new WorkflowBillComInfo().getTablename(formId);
String sql = "update " + tableName + " set xqzt = ? ,jssj = ?,wcsj = ? where id = ?";
RecordSet rs = new RecordSet();
// 状态为进行中,置空完成日期和结束日期
rs.executeUpdate(sql, RecruitStatusEnum.RECRUITMENT_PROGRESS.getValue(), null, null, billId);
new BaseBean().writeLog("开启需求操作billId=[" + billId + "]操作完成");
}
}
} catch (Exception e) {
new BaseBean().writeLog(e);
result.put("errmsg", "开启需求操作失败");
result.put("flag", "false");
}
return result;
}
}