⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dicthelp.java

📁 一个真实项目的源代码。有一个比较优秀的时间类
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
package com.zx.dict;

import com.work.util.SelectUtil;

/**
 * id cc_name 1 性别 2 政治面貌 3 职工类别 4 职务 5 职级 15 学历 16 考勤状态
 * 
 * @author wangmj
 * 
 */
public class DictHelp {

	/**
	 * 用来获取性别下拉框的字符串。name和value均使用的汉字。
	 * 
	 * @param selectName
	 *            保管期限下拉框的名字
	 * @param value
	 *            默认选中的选项值
	 * @param hasBlank
	 *            是否包含空选项
	 * @return 下拉框的html字符串
	 */
	// public static String getXbSelect(String selectName, String value,
	// boolean hasBlank) {
	// String sql = "select mc,mc from dict_xb";
	// return SelectUtil.getNameValue(sql, selectName, value, hasBlank);
	// }
	public static String getXbSelect(String selectName, String value,
			boolean hasBlank) {
		String sql = "select cd_name,cd_name from code_detail where related_cc_id=1 and is_use=1";
		return SelectUtil.getNameValue(sql, selectName, value, hasBlank);
	}

	/**
	 * 获取性别。name和value均使用的汉字。
	 * 
	 * @param selectName
	 * @param value
	 * @param hasBlank
	 * @param js
	 * @return 下拉框的html字符串
	 */
	// public static String getXbSelect(String selectName, String value,
	// boolean hasBlank, String js) {
	// String sql = "select mc,mc from dict_xb";
	// return SelectUtil.getNameValue(sql, selectName, value, hasBlank, js);
	// }
	public static String getXbSelect(String selectName, String value,
			boolean hasBlank, String js) {
		String sql = "select cd_name,cd_name from code_detail where related_cc_id=1 and is_use=1";
		return SelectUtil.getNameValue(sql, selectName, value, hasBlank, js);
	}

	/**
	 * 获取职工类别。value为id,name为汉字。
	 * 
	 * @param selectName
	 * @param value
	 * @param hasBlank
	 * @return 下拉框的html字符串
	 */
	// public static String getZglbSelect(String selectName, String value,
	// boolean hasBlank) {
	// String sql = "select bm,mc from dict_zglb order by bm";
	// return SelectUtil.getNameValue(sql, selectName, value, hasBlank);
	// }
	public static String getZglbSelect(String selectName, String value,
			boolean hasBlank) {
		String sql = "select id,cd_name from code_detail where related_cc_id=3 and is_use=1";
		return SelectUtil.getNameValue(sql, selectName, value, hasBlank);
	}

	/**
	 * 获取职工类别。
	 * 
	 * @param selectName
	 * @param value
	 * @param hasBlank
	 * @param js
	 * @return 下拉框的html字符串
	 */
	// public static String getZglbSelect(String selectName, String value,
	// boolean hasBlank, String js) {
	// String sql = "select bm,mc from dict_zglb order by bm";
	// return SelectUtil.getNameValue(sql, selectName, value, hasBlank, js);
	// }
	public static String getZglbSelect(String selectName, String value,
			boolean hasBlank, String js) {
		String sql = "select id,cd_name from code_detail where related_cc_id=3 and is_use=1";
		return SelectUtil.getNameValue(sql, selectName, value, hasBlank, js);
	}

	/**
	 * 获取政治面貌。name和value均使用的汉字。
	 * 
	 * @param selectName
	 * @param value
	 * @param hasBlank
	 * @return 下拉框的html字符串
	 */
	// public static String getZzmmSelect(String selectName, String value,
	// boolean hasBlank) {
	// String sql = "select mc,mc from dict_zzmm order by bm";
	// return SelectUtil.getNameValue(sql, selectName, value, hasBlank);
	// }
	public static String getZzmmSelect(String selectName, String value,
			boolean hasBlank) {
		String sql = "select cd_name,cd_name from code_detail where related_cc_id=2 and is_use=1";
		return SelectUtil.getNameValue(sql, selectName, value, hasBlank);
	}

	/**
	 * 获取政治面貌。name和value均使用的汉字。
	 * 
	 * @param selectName
	 * @param value
	 * @param hasBlank
	 * @param js
	 * @return 下拉框的html字符串
	 */
	// public static String getZzmmSelect(String selectName, String value,
	// boolean hasBlank, String js) {
	// String sql = "select mc,mc from dict_zzmm order by bm";
	// return SelectUtil.getNameValue(sql, selectName, value, hasBlank, js);
	// }
	public static String getZzmmSelect(String selectName, String value,
			boolean hasBlank, String js) {
		String sql = "select cd_name,cd_name from code_detail where related_cc_id=2 and is_use=1";
		return SelectUtil.getNameValue(sql, selectName, value, hasBlank, js);
	}

	/**
	 * 获取职级。value为id,name为汉字。
	 * 
	 * @param selectName
	 * @param value
	 * @param hasBlank
	 * @return 下拉框的html字符串
	 */
	// public static String getZhiJiSelect(String selectName, String value,
	// boolean hasBlank) {
	// String sql = "select bm,mc from dict_zhiji order by bm";
	// return SelectUtil.getNameValue(sql, selectName, value, hasBlank);
	// }
	public static String getZhiJiSelect(String selectName, String value,
			boolean hasBlank) {
		String sql = "select id,cd_name from code_detail where related_cc_id=5 and is_use=1";
		return SelectUtil.getNameValue(sql, selectName, value, hasBlank);
	}

	/**
	 * 获取职级。
	 * 
	 * @param selectName
	 * @param value
	 * @param hasBlank
	 * @param js
	 * @return 下拉框的html字符串
	 */
	// public static String getZhiJiSelect(String selectName, String value,
	// boolean hasBlank, String js) {
	// String sql = "select bm,mc from dict_zhiji order by bm";
	// return SelectUtil.getNameValue(sql, selectName, value, hasBlank, js);
	// }
	public static String getZhiJiSelect(String selectName, String value,
			boolean hasBlank, String js) {
		String sql = "select id,cd_name from code_detail where related_cc_id=5 and is_use=1";
		return SelectUtil.getNameValue(sql, selectName, value, hasBlank, js);
	}

	/**
	 * 获取职务。name和value均使用的汉字。
	 * 
	 * @param selectName
	 * @param value
	 * @param hasBlank
	 * @return 下拉框的html字符串
	 */
	// public static String getZhiWuSelect(String selectName, String value,
	// boolean hasBlank) {
	// String sql = "select mc,mc from dict_zhiwu order by bm";
	// return SelectUtil.getNameValue(sql, selectName, value, hasBlank);
	// }
	public static String getZhiWuSelect(String selectName, String value,
			boolean hasBlank) {
		String sql = "select cd_name,cd_name from code_detail where related_cc_id=4 and is_use=1";
		return SelectUtil.getNameValue(sql, selectName, value, hasBlank);
	}

	/**
	 * 获取职务。name和value均使用的汉字。
	 * 
	 * @param selectName
	 * @param value
	 * @param hasBlank
	 * @param js
	 * @return 下拉框的html字符串
	 */
	// public static String getZhiWuSelect(String selectName, String value,
	// boolean hasBlank, String js) {
	// String sql = "select mc,mc from dict_zhiwu order by bm";
	// return SelectUtil.getNameValue(sql, selectName, value, hasBlank, js);
	// }
	public static String getZhiWuSelect(String selectName, String value,
			boolean hasBlank, String js) {
		String sql = "select cd_name,cd_name from code_detail where related_cc_id=4 and is_use=1";
		return SelectUtil.getNameValue(sql, selectName, value, hasBlank, js);
	}

	/**
	 * 获取学历。name和value均使用的汉字。
	 * 
	 * @param selectName
	 * @param value
	 * @param hasBlank
	 * @return 下拉框的html字符串
	 */
	// public static String getXueLiSelect(String selectName, String value,
	// boolean hasBlank) {
	// String sql = "select mc,mc from dict_xueli order by bm";
	// return SelectUtil.getNameValue(sql, selectName, value, hasBlank);
	// }
	public static String getXueLiSelect(String selectName, String value,
			boolean hasBlank) {
		String sql = "select cd_name,cd_name from code_detail where related_cc_id=15 and is_use=1";
		return SelectUtil.getNameValue(sql, selectName, value, hasBlank);
	}

	/**
	 * 获取学历。name和value均使用的汉字。
	 * 
	 * @param selectName
	 * @param value
	 * @param hasBlank
	 * @param js
	 * @return 下拉框的html字符串
	 */
	// public static String getXueLiSelect(String selectName, String value,
	// boolean hasBlank, String js) {
	// String sql = "select mc,mc from dict_xueli order by bm";
	// return SelectUtil.getNameValue(sql, selectName, value, hasBlank, js);
	// }
	public static String getXueLiSelect(String selectName, String value,
			boolean hasBlank, String js) {
		String sql = "select cd_name,cd_name from code_detail where related_cc_id=15 and is_use=1";
		return SelectUtil.getNameValue(sql, selectName, value, hasBlank, js);
	}

	/**
	 * 获取代码组。id,代码组名称
	 * 
	 * @param selectName
	 * @param value
	 * @param hasBlank
	 * @return 下拉框的html字符串
	 */
	public static String getCodeGroupSelect(String selectName, String value,
			boolean hasBlank) {
		String sql = "select id,cg_name from code_group order by id";
		return SelectUtil.getNameValue(sql, selectName, value, hasBlank);
	}

	/**
	 * 获取代码组。id,代码组名称
	 * 
	 * @param selectName
	 * @param value
	 * @param hasBlank
	 * @param js
	 * @return 下拉框的html字符串
	 */
	public static String getCodeGroupSelect(String selectName, String value,
			boolean hasBlank, String js) {
		String sql = "select id,cg_name from code_group order by id";
		return SelectUtil.getNameValue(sql, selectName, value, hasBlank, js);
	}

	/**
	 * 获取代码类别。id,代码类别名称
	 * 
	 * @param selectName
	 * @param value
	 * @param hasBlank
	 * @return 下拉框的html字符串
	 */
	public static String getCodeClassSelect(String selectName, String value,
			boolean hasBlank) {
		String sql = "select id,cc_name from code_class order by id";
		return SelectUtil.getNameValue(sql, selectName, value, hasBlank);
	}

	/**
	 * 获取代码类别。id,代码类别名称
	 * 
	 * @param selectName
	 * @param value
	 * @param hasBlank
	 * @param js
	 * @return 下拉框的html字符串
	 */
	public static String getCodeClassSelect(String selectName, String value,
			boolean hasBlank, String js) {
		String sql = "select id,cc_name from code_class order by id";
		return SelectUtil.getNameValue(sql, selectName, value, hasBlank, js);
	}

	/**
	 * 获取车辆管理中的司机姓名信息。value和name均为姓名。
	 * 
	 * @param selectName
	 * @param value
	 * @param hasBlank
	 * @return 下拉框的html字符串
	 */
	public static String getSiJiSelect(String selectName, String value,
			boolean hasBlank) {
		String sql = "select xm,xm from zx_sjda ";
		return SelectUtil.getNameValue(sql, selectName, value, hasBlank);
	}

	/**
	 * 获取车辆管理中的司机姓名信息。value和name均为姓名。
	 * 
	 * @param selectName
	 * @param value
	 * @param hasBlank
	 * @param js
	 * @return 下拉框的html字符串
	 */
	public static String getSiJiSelect(String selectName, String value,
			boolean hasBlank, String js) {
		String sql = "select xm,xm from zx_sjda ";
		return SelectUtil.getNameValue(sql, selectName, value, hasBlank, js);
	}

	/**
	 * 获取车辆管理中的车牌号信息。value和name均为车牌号。
	 * 
	 * @param selectName
	 * @param value
	 * @param hasBlank
	 * @return 下拉框的html字符串
	 */
	public static String getChePaiHaoSelect(String selectName, String value,
			boolean hasBlank) {
		String sql = "select cph,cph from zx_clda order by cph";
		return SelectUtil.getNameValue(sql, selectName, value, hasBlank);
	}

	/**
	 * 获取车辆管理中的车牌号信息。value和name均为车牌号。
	 * 
	 * @param selectName
	 * @param value
	 * @param hasBlank
	 * @param js
	 * @return 下拉框的html字符串
	 */
	public static String getChePaiHaoSelect(String selectName, String value,
			boolean hasBlank, String js) {
		String sql = "select cph,cph from zx_clda order by cph";
		return SelectUtil.getNameValue(sql, selectName, value, hasBlank, js);
	}

	/**

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -