You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
weaver-develop/src/com/engine/mzg/conn/RecruitCommon.java

84 lines
2.1 KiB
Java

package com.engine.mzg.conn;
import com.engine.mzg.util.RecruitUtil;
import com.weaver.formmodel.data.model.Formfield;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2024/09/05
* @version: 1.0
*/
public class RecruitCommon {
/**
*
*
* @param key
* @return
*/
public static String getSettingValue(String key) {
RecordSet rs = new RecordSet();
rs.executeQuery("select pzz from uf_recruit_setting where pzx = ? ", key);
if (rs.next()) {
return rs.getString("pzz");
}
return "";
}
/**
*
*
* @param key
* @return
*/
public static String getSettingValue(String key, Map<String, Formfield> fieldMap, Map<String, Object> paramsData) {
RecordSet rs = new RecordSet();
rs.executeQuery("select pzz from uf_recruit_setting where pzx = ? ", key);
String content= "";
if (rs.next()) {
content = rs.getString("pzz");
}
if(StringUtils.isNotBlank(content)){
content = RecruitUtil.getMsgReplaceStr(content, fieldMap, paramsData);
}
return content;
}
/**
* ID
*
* @param modeTable
* @return
*/
public static int getFormIdByTableName(String modeTable) {
int formId = -1;
RecordSet rs = new RecordSet();
rs.executeQuery("select id from workflow_bill where tablename = ? ", modeTable);
if (rs.next()) {
formId = rs.getInt("id");
}
return formId;
}
/**
* ,ID
*
* @param modeTable
* @return
*/
public static int getModeIdByTableName(String modeTable) {
int formModeId = -1;
RecordSet rs = new RecordSet();
rs.executeQuery("select id from modeinfo where formid =( select id from workflow_bill where tablename = ? ) and isdelete = 0 order by id", modeTable);
if (rs.next()) {
formModeId = rs.getInt("id");
}
return formModeId;
}
}