HR代码2
来源:互联网 发布:锥套轮图纸数据 编辑:程序博客网 时间:2024/06/10 09:27
包
package org.better.hr.biz;
package org.better.hr.biz;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.better.hr.dao.ConfigFileFirstKindDao;
import org.better.hr.entity.ConfigFileFirstKind;
import org.better.hr.exception.HrException;
public class ConfigFileFirstKindBiz {
private static final Log logger = LogFactory.getLog(ConfigFileFirstKindBiz.class);
private ConfigFileFirstKindDao configfilefirstkindDao;
public ConfigFileFirstKindDao getConfigfilefirstkindDao() {
return configfilefirstkindDao;
}
public void setConfigfilefirstkindDao(
ConfigFileFirstKindDao configfilefirstkindDao) {
this.configfilefirstkindDao = configfilefirstkindDao;
}
/**
* 根据ID号返回对象
* @param id 主键id
* @return 对象
* @throws HrException
*/
public ConfigFileFirstKind getCFFKbyID(java.io.Serializable id) throws HrException
{
try
{
return this.getConfigfilefirstkindDao().load(id);
}
catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 新增
* @param cffk 新增的对象
* @return 新产生的一级机构编号
* @throws HrException
*/
public String add(ConfigFileFirstKind condition) throws HrException {
try {
condition.setFirstKindId(this.genCFFKId());
// 保存到数据库
this.getConfigfilefirstkindDao().add(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
return condition.getFirstKindId();
}
/**
* 查询显示列表
* @param condition 包含查询条件的对象
* @return 查询结果列表
* @throws HrException
*/
public List list(ConfigFileFirstKind condition) throws HrException {
try {
return this.getConfigfilefirstkindDao().find(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 更新对象到数据库
* @param condition 已更新的对象
* @throws HrException
*/
public void update(ConfigFileFirstKind condition) throws HrException {
try {
this.getConfigfilefirstkindDao().update(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 删除数据库对象
* @param id 对象的主键编号
* @throws HrException
*/
public void delete(java.io.Serializable id) throws HrException
{
try {
this.getConfigfilefirstkindDao().delete(id);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 生成一级机构编号
* @return 新产生的一级机构编号
*/
public String genCFFKId()
{
int num = 1;
List list = this.getConfigfilefirstkindDao().find();
if(list != null)
num = (Short)list.get(0) + 1;
return num>=10? (num+"") : ("0"+num);
}
}
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
package org.better.hr.biz;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.better.hr.dao.ConfigFileSecondKindDao;
import org.better.hr.entity.ConfigFileSecondKind;
import org.better.hr.exception.HrException;
public class ConfigFileSecondKindBiz {
private static final Log logger = LogFactory.getLog(ConfigFileSecondKindBiz.class);
private ConfigFileSecondKindDao configfilesecondkindDao;
public ConfigFileSecondKindDao getConfigfilesecondkindDao() {
return configfilesecondkindDao;
}
public void setConfigfilesecondkindDao(
ConfigFileSecondKindDao configfilesecondkindDao) {
this.configfilesecondkindDao = configfilesecondkindDao;
}
/**
* 根据ID号返回对象
* @param id 主键id
* @return 对象
* @throws HrException
*/
public ConfigFileSecondKind getCFFKbyID(java.io.Serializable id) throws HrException
{
try
{
return this.getConfigfilesecondkindDao().load(id);
}
catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 新增
* @param cfsk 新增的对象
* @return 新产生的二级机构编号
* @throws HrException
*/
public String add(ConfigFileSecondKind condition) throws HrException {
try {
condition.setFirstKindId(this.genCFSKId());
// 保存到数据库
this.getConfigfilesecondkindDao().add(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
return condition.getFirstKindId();
}
/**
* 查询显示列表
* @param condition 包含查询条件的对象
* @return 查询结果列表
* @throws HrException
*/
public List list(ConfigFileSecondKind condition) throws HrException {
try {
return this.getConfigfilesecondkindDao().find(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 更新对象到数据库
* @param condition 已更新的对象
* @throws HrException
*/
public void update(ConfigFileSecondKind condition) throws HrException {
try {
this.getConfigfilesecondkindDao().update(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 删除数据库对象
* @param id 对象的主键编号
* @throws HrException
*/
public void delete(java.io.Serializable id) throws HrException
{
try {
this.getConfigfilesecondkindDao().delete(id);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 生成二级机构编号
* @return 新产生的二级机构编号
*/
public String genCFSKId()
{
int num = this.getConfigfilesecondkindDao().find(null).size()+ 1;
return num>10? (num+"") : ("0"+num);
}
}
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
package org.better.hr.biz;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.better.hr.dao.ConfigFileThirdKindDao;
import org.better.hr.entity.ConfigFileThirdKind;
import org.better.hr.exception.HrException;
public class ConfigFileThirdKindBiz {
private static final Log logger = LogFactory.getLog(ConfigFileSecondKindBiz.class);
private ConfigFileThirdKindDao configfilethirdkindDao;
public ConfigFileThirdKindDao getConfigfilethirdkindDao() {
return configfilethirdkindDao;
}
public void setConfigfilethirdkindDao(
ConfigFileThirdKindDao configfilethirdkindDao) {
this.configfilethirdkindDao = configfilethirdkindDao;
}
/**
* 根据ID号返回对象
* @param id 主键id
* @return 对象
* @throws HrException
*/
public ConfigFileThirdKind getCFFKbyID(java.io.Serializable id) throws HrException
{
try
{
return this.getConfigfilethirdkindDao().load(id);
}
catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 新增
* @param cfsk 新增的对象
* @return 新产生的二级机构编号
* @throws HrException
*/
public String add(ConfigFileThirdKind condition) throws HrException {
try {
condition.setFirstKindId(this.genCFSKId());
// 保存到数据库
this.getConfigfilethirdkindDao().add(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
return condition.getFirstKindId();
}
/**
* 查询显示列表
* @param condition 包含查询条件的对象
* @return 查询结果列表
* @throws HrException
*/
public List list(ConfigFileThirdKind condition) throws HrException {
try {
return this.getConfigfilethirdkindDao().find(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 更新对象到数据库
* @param condition 已更新的对象
* @throws HrException
*/
public void update(ConfigFileThirdKind condition) throws HrException {
try {
this.getConfigfilethirdkindDao().update(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 删除数据库对象
* @param id 对象的主键编号
* @throws HrException
*/
public void delete(java.io.Serializable id) throws HrException
{
try {
this.getConfigfilethirdkindDao().delete(id);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 生成二级机构编号
* @return 新产生的二级机构编号
*/
public String genCFSKId()
{
int num = this.getConfigfilethirdkindDao().find(null).size()+ 1;
return num>10? (num+"") : ("0"+num);
}
}
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
package org.better.hr.biz;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.better.hr.dao.ConfigMajorDao;
import org.better.hr.entity.ConfigMajor;
import org.better.hr.entity.ConfigMajorKind;
import org.better.hr.exception.HrException;
public class ConfigMajorBiz {
private static final Log logger = LogFactory.getLog(ConfigMajorBiz.class);
private ConfigMajorDao configmajorDao;
public ConfigMajorDao getConfigmajorDao() {
return configmajorDao;
}
public void setConfigmajorDao(ConfigMajorDao configmajorDao) {
this.configmajorDao = configmajorDao;
}
/**
* 根据ID号返回对象
* @param id 主键id
* @return 对象
* @throws HrException
*/
public ConfigMajor getCMKbyID(java.io.Serializable id) throws HrException
{
try
{
return (ConfigMajor)this.getConfigmajorDao().load(ConfigMajor.class,id);
}
catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 新增
* @param cfsk 新增的对象
* @return 新产生的职位分类编号
* @throws HrException
*/
public String add(ConfigMajorKind condition) throws HrException {
return condition.getMajorKindId();
}
/**
* 查询显示列表
* @param condition 包含查询条件的对象
* @return 查询结果列表
* @throws HrException
*/
public List list(ConfigMajorKind condition) throws HrException {
try {
return this.getConfigmajorDao().find(null);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 删除数据库对象
* @param id 对象的主键编号
* @throws HrException
*/
public void delete(java.io.Serializable id) throws HrException
{
try {
this.getConfigmajorDao().delete(ConfigMajor.class,id);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 生成职位分类编号
* @return 新产生的职位分类编号
*/
public String genCMKId()
{
int num = this.getConfigmajorDao().find(null).size()+1;
return num>10? (num+"") : ("0"+num);
}
}
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
package org.better.hr.biz;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.better.hr.dao.ConfigMajorKindDao;
import org.better.hr.entity.ConfigMajorKind;
import org.better.hr.exception.HrException;
public class ConfigMajorKindBiz {
private static final Log logger = LogFactory.getLog(ConfigMajorKindBiz.class);
private ConfigMajorKindDao configmajorkindDao;
public ConfigMajorKindDao getConfigmajorkindDao() {
return configmajorkindDao;
}
public void setConfigmajorkindDao(ConfigMajorKindDao configmajorkindDao) {
this.configmajorkindDao = configmajorkindDao;
}
/**
* 根据ID号返回对象
* @param id 主键id
* @return 对象
* @throws HrException
*/
public ConfigMajorKind getCMKbyID(java.io.Serializable id) throws HrException
{
try
{
return this.getConfigmajorkindDao().load(id);
}
catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 新增
* @param cfsk 新增的对象
* @return 新产生的职位分类编号
* @throws HrException
*/
public String add(ConfigMajorKind condition) throws HrException {
try {
condition.setMajorKindId(this.genCMKId());
// 保存到数据库
this.getConfigmajorkindDao().add(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
return condition.getMajorKindId();
}
/**
* 查询显示列表
* @param condition 包含查询条件的对象
* @return 查询结果列表
* @throws HrException
*/
public List list(ConfigMajorKind condition) throws HrException {
try {
return this.getConfigmajorkindDao().find(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 删除数据库对象
* @param id 对象的主键编号
* @throws HrException
*/
public void delete(java.io.Serializable id) throws HrException
{
try {
this.getConfigmajorkindDao().delete(id);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 生成职位分类编号
* @return 新产生的职位分类编号
*/
public String genCMKId()
{
int num = this.getConfigmajorkindDao().find(null).size()+1;
return num>10? (num+"") : ("0"+num);
}
}
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
package org.better.hr.biz;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.better.hr.dao.ConfigPrimaryKeyDao;
import org.better.hr.entity.ConfigPrimaryKey;
import org.better.hr.exception.HrException;
public class ConfigPrimaryKeyBiz {
private static final Log logger = LogFactory.getLog(ConfigFileFirstKindBiz.class);
private ConfigPrimaryKeyDao configprimarykeyDao;
public ConfigPrimaryKeyDao getConfigprimarykeyDao() {
return configprimarykeyDao;
}
public void setConfigprimarykeyDao(ConfigPrimaryKeyDao configprimarykeyDao) {
this.configprimarykeyDao = configprimarykeyDao;
}
/**
* 根据ID号返回对象
* @param id 主键id
* @return 对象
* @throws HrException
*/
public ConfigPrimaryKey getbyID(java.io.Serializable id) throws HrException
{
try
{
return (ConfigPrimaryKey)this.getConfigprimarykeyDao().load(ConfigPrimaryKey.class,id);
}
catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 新增关键字
* @param condition
* @throws HrException
*/
public void add(ConfigPrimaryKey condition) throws HrException {
try {
//保存到数据库
this.getConfigprimarykeyDao().add(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 查询关键字
* @param condition
* @return
* @throws HrException
*/
public List list(ConfigPrimaryKey condition) throws HrException{
try{
return this.getConfigprimarykeyDao().find(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 变更
* @param condition
* @throws HrException
*/
public void update(ConfigPrimaryKey condition) throws HrException{
try{
this.getConfigprimarykeyDao().update(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
}
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
package org.better.hr.biz;
import java.util.HashMap;
import java.util.List;
import java.util.Vector;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.better.hr.dao.ConfigPublicCharDao;
import org.better.hr.entity.ConfigPublicChar;
import org.better.hr.exception.HrException;
public class ConfigPublicCharBiz {
private static final Log logger = LogFactory.getLog(ConfigPublicCharBiz.class);
private ConfigPublicCharDao configpubliccharDao;
public ConfigPublicCharDao getConfigpubliccharDao() {
return configpubliccharDao;
}
public void setConfigpubliccharDao(ConfigPublicCharDao configpubliccharDao) {
this.configpubliccharDao = configpubliccharDao;
}
/**
* 根据ID号返回对象
* @param id 主键id
* @return 对象
* @throws HrException
*/
public ConfigPublicChar getbyID(java.io.Serializable id) throws HrException
{
try
{
return (ConfigPublicChar)this.getConfigpubliccharDao().load(ConfigPublicChar.class,id);
}
catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 新增
* @param cfsk 新增的对象
* @return 新产生的职位分类编号
* @throws HrException
*/
public void add(ConfigPublicChar condition) throws HrException {
try {
// 保存到数据库
this.getConfigpubliccharDao().add(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 查询人力资源表中所需字段
* @param condition 包含查询条件的对象
* @return 查询结果列表
* @throws HrException
*/
public HashMap listForHumanFile(ConfigPublicChar condition) throws HrException {
ConfigPublicChar cpc;
HashMap hashmap = new HashMap();
Vector nationality = new Vector();
Vector race = new Vector();
Vector religion = new Vector();
Vector party = new Vector();
Vector educatedyears = new Vector();
Vector educateddegree = new Vector();
Vector major = new Vector();
Vector speciality = new Vector();
Vector hobby = new Vector();
Vector designation = new Vector();
try {
List list = this.getConfigpubliccharDao().find(condition);
for(int i = 0 ; i < list.size() ; i++)
{
cpc = (ConfigPublicChar)list.get(i);
if(cpc.getAttributeKind().equals("国籍"))
nationality.add(cpc.getAttributeName());
else if(cpc.getAttributeKind().equals("民族"))
race.add(cpc.getAttributeName());
else if(cpc.getAttributeKind().equals("宗教信仰"))
religion.add(cpc.getAttributeName());
else if(cpc.getAttributeKind().equals("政治面貌"))
party.add(cpc.getAttributeName());
else if(cpc.getAttributeKind().equals("教育年限"))
educatedyears.add(cpc.getAttributeName());
else if(cpc.getAttributeKind().equals("学历"))
educateddegree.add(cpc.getAttributeName());
else if(cpc.getAttributeKind().equals("专业"))
major.add(cpc.getAttributeName());
else if(cpc.getAttributeKind().equals("特长"))
speciality.add(cpc.getAttributeName());
else if(cpc.getAttributeKind().equals("爱好"))
hobby.add(cpc.getAttributeName());
else if(cpc.getAttributeKind().equals("职称"))
designation.add(cpc.getAttributeName());
}
hashmap.put("国籍", nationality);
hashmap.put("民族", race);
hashmap.put("宗教信仰", religion);
hashmap.put("政治面貌", party);
hashmap.put("教育年限", educatedyears);
hashmap.put("学历", educateddegree);
hashmap.put("专业", major);
hashmap.put("特长", speciality);
hashmap.put("爱好", hobby);
hashmap.put("职称", designation);
return hashmap;
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 查询所有总类为薪酬设置的值
* @param condition
* @return
* @throws HrException
*/
public List listForSalary(ConfigPublicChar condition) throws HrException {
try {
List list = this.getConfigpubliccharDao().find("from ConfigPublicChar c where c.attributeKind = ?",new String[]{"薪酬设置"});
return list;
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 查询所有总类为职称的值
* @param condition
* @return
* @throws HrException
*/
public List listForProfession(ConfigPublicChar condition) throws HrException {
try {
List list = this.getConfigpubliccharDao().find("from ConfigPublicChar c where c.attributeKind = ?",new String[]{"职称"});
return list;
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 查询所有记录,除薪酬设置和职称
* @return
* @throws HrException
*/
public List list() throws HrException{
try{
List list = this.getConfigpubliccharDao().find("from ConfigPublicChar c where c.attributeKind != ? and c.attributeKind != ? order by c.attributeKind",new String[]{"薪酬设置","职称"});
return list;
}catch(Exception ex)
{
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 查询所有符合条件的记录
* @return
* @throws HrException
*/
public List list(ConfigPublicChar condition) throws HrException{
try{
List list = this.getConfigpubliccharDao().find(condition);
return list;
}catch(Exception ex)
{
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 查询有关奖励属性的值
* @param condition
* @return
* @throws HrException
*/
public HashMap listForBouns(ConfigPublicChar condition) throws HrException {
ConfigPublicChar cpc;
HashMap hashmap = new HashMap();
Vector bounsitem = new Vector();
Vector bounsdegree = new Vector();
try {
List list = this.getConfigpubliccharDao().find("from ConfigPublicChar c where c.attributeKind = ? or c.attributeKind = ?",new String[]{"奖励项目","奖励等级"});
for(int i = 0 ; i < list.size() ; i++)
{
cpc = (ConfigPublicChar)list.get(i);
if(cpc.getAttributeKind().equals("奖励项目"))
bounsitem.add(cpc.getAttributeName());
else if(cpc.getAttributeKind().equals("奖励等级"))
bounsdegree.add(cpc.getAttributeName());
}
hashmap.put("奖励项目", bounsitem);
hashmap.put("奖励等级", bounsdegree);
return hashmap;
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 查询有关培训属性的值
* @param condition
* @return
* @throws HrException
*/
public HashMap listForTraining(ConfigPublicChar condition) throws HrException {
ConfigPublicChar cpc;
HashMap hashmap = new HashMap();
Vector trainingitem = new Vector();
Vector trainingdegree = new Vector();
try {
List list = this.getConfigpubliccharDao().find("from ConfigPublicChar c where c.attributeKind = ? or c.attributeKind = ?",new String[]{"培训项目","培训成绩"});
for(int i = 0 ; i < list.size() ; i++)
{
cpc = (ConfigPublicChar)list.get(i);
if(cpc.getAttributeName().equals("培训项目"))
trainingitem.add(cpc.getAttributeName());
else if(cpc.getAttributeName().equals("培训成绩"))
trainingdegree.add(cpc.getAttributeName());
}
hashmap.put("培训项目", trainingitem);
hashmap.put("培训成绩", trainingdegree);
return hashmap;
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 删除数据库对象
* @param id 对象的主键编号
* @throws HrException
*/
public void delete(java.io.Serializable id) throws HrException
{
try {
this.getConfigpubliccharDao().delete(ConfigPublicChar.class,id);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
}
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
package org.better.hr.biz;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.better.hr.dao.ConfigQuestionFirstKindDao;
import org.better.hr.entity.ConfigQuestionFirstKind;
import org.better.hr.exception.HrException;
public class ConfigQuestionFirstKindBiz {
private static final Log logger = LogFactory.getLog(ConfigFileFirstKindBiz.class);
private ConfigQuestionFirstKindDao configquestionfirstkindDao;
public ConfigQuestionFirstKindDao getConfigquestionfirstkindDao() {
return configquestionfirstkindDao;
}
public void setConfigquestionfirstkindDao(
ConfigQuestionFirstKindDao configquestionfirstkindDao) {
this.configquestionfirstkindDao = configquestionfirstkindDao;
}
/**
* 根据ID号返回对象
* @param id 主键id
* @return 对象
* @throws HrException
*/
public ConfigQuestionFirstKindBiz getCQFbyID(java.io.Serializable id) throws HrException
{
try
{
return (ConfigQuestionFirstKindBiz)this.getConfigquestionfirstkindDao().load(ConfigQuestionFirstKindBiz.class,id);
}
catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 新增
* @param cffk 新增的对象
* @return 新产生的一级机构编号
* @throws HrException
*/
public void add(ConfigQuestionFirstKindBiz condition) throws HrException {
try {
this.getConfigquestionfirstkindDao().add(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 查询显示列表
* @param condition 包含查询条件的对象
* @return 查询结果列表
* @throws HrException
*/
public List list(ConfigQuestionFirstKind condition) throws HrException {
try {
return this.getConfigquestionfirstkindDao().find(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 更新对象到数据库
* @param condition 已更新的对象
* @throws HrException
*/
public void update(ConfigQuestionFirstKindBiz condition) throws HrException {
try {
this.getConfigquestionfirstkindDao().update(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 删除数据库对象
* @param id 对象的主键编号
* @throws HrException
*/
public void delete(java.io.Serializable id) throws HrException
{
try {
this.getConfigquestionfirstkindDao().delete(id);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
}
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
package org.better.hr.biz;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.better.hr.dao.ConfigQuestionSecondKindDao;
import org.better.hr.entity.ConfigQuestionSecondKind;
import org.better.hr.exception.HrException;
public class ConfigQuestionSecondKindBiz {
private static final Log logger = LogFactory.getLog(ConfigFileFirstKindBiz.class);
private ConfigQuestionSecondKindDao configquestionsecondkindDao;
public ConfigQuestionSecondKindDao getConfigquestionsecondkindDao() {
return configquestionsecondkindDao;
}
public void setConfigquestionsecondkindDao(
ConfigQuestionSecondKindDao configquestionsecondkindDao) {
this.configquestionsecondkindDao = configquestionsecondkindDao;
}
/**
* 根据ID号返回对象
* @param id 主键id
* @return 对象
* @throws HrException
*/
public ConfigQuestionSecondKind getCQSbyID(java.io.Serializable id) throws HrException
{
try
{
return (ConfigQuestionSecondKind)this.getConfigquestionsecondkindDao().load(ConfigQuestionSecondKind.class,id);
}
catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 新增
* @param cffk 新增的对象
* @return 新产生的一级机构编号
* @throws HrException
*/
public void add(ConfigQuestionSecondKind condition) throws HrException {
try {
this.getConfigquestionsecondkindDao().add(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 查询显示列表
* @param condition 包含查询条件的对象
* @return 查询结果列表
* @throws HrException
*/
public List list(ConfigQuestionSecondKind condition) throws HrException {
try {
return this.getConfigquestionsecondkindDao().find(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 更新对象到数据库
* @param condition 已更新的对象
* @throws HrException
*/
public void update(ConfigQuestionSecondKindBiz condition) throws HrException {
try {
this.getConfigquestionsecondkindDao().update(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 删除数据库对象
* @param id 对象的主键编号
* @throws HrException
*/
public void delete(java.io.Serializable id) throws HrException
{
try {
this.getConfigquestionsecondkindDao().delete(id);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
}
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
package org.better.hr.biz;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.better.hr.comm.Util;
import org.better.hr.dao.EngageInterviewDao;
import org.better.hr.entity.EngageInterview;
import org.better.hr.exception.HrException;
public class EngageInterviewBiz {
private static final Log logger = LogFactory.getLog(ConfigFileFirstKindBiz.class);
private EngageInterviewDao engageinterviewDao;
public EngageInterviewDao getEngageinterviewDao() {
return engageinterviewDao;
}
public void setEngageinterviewDao(EngageInterviewDao engageinterviewDao) {
this.engageinterviewDao = engageinterviewDao;
}
/**
* 根据ID号返回对象
* @param id 主键id
* @return 对象
* @throws HrException
*/
public EngageInterview getEIbyID(java.io.Serializable id) throws HrException
{
try
{
return this.getEngageinterviewDao().load(id);
}
catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 新增
* @param cffk 新增的对象
* @return 新产生的一级机构编号
* @throws HrException
*/
public void add(EngageInterview condition) throws HrException {
try {
condition.setRegisteTime(Util.parseDate(condition.getStr_registeTime())); //把日期字符串转换为日期类型,以便入库时类型匹配
//执行面试结果登记后,需要将面试复核状态置为0(初始值),将面试状态设为1,表示该人已经面试过
condition.setCheckStatus(Short.valueOf("0"));
condition.setInterviewStatus(Short.valueOf("0"));
this.getEngageinterviewDao().add(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 查询显示列表
* @param condition 包含查询条件的对象
* @return 查询结果列表
* @throws HrException
*/
public List list(EngageInterview condition) throws HrException {
try {
return this.getEngageinterviewDao().find(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 更新对象到数据库
* @param condition 已更新的对象
* @throws HrException
*/
public void update(EngageInterview condition) throws HrException {
try {
condition.setCheckTime(Util.parseDate(condition.getStr_checkTime())); //把日期字符串转换为日期类型,以便入库时类型匹配
condition.setCheckStatus(Short.valueOf("1"));//面试筛选后,把面试筛选状态改为1
this.getEngageinterviewDao().update(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 删除数据库对象
* @param id 对象的主键编号
* @throws HrException
*/
public void delete(java.io.Serializable id) throws HrException
{
try {
this.getEngageinterviewDao().delete(id);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
}
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
package org.better.hr.biz;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.better.hr.comm.Util;
import org.better.hr.dao.EngageMajorReleaseDao;
import org.better.hr.entity.EngageMajorRelease;
import org.better.hr.exception.HrException;
public class EngageMajorReleaseBiz {
private static final Log logger = LogFactory.getLog(ConfigFileFirstKindBiz.class);
private EngageMajorReleaseDao engagemajorreleaseDao;
public EngageMajorReleaseDao getEngagemajorreleaseDao() {
return engagemajorreleaseDao;
}
public void setEngagemajorreleaseDao(EngageMajorReleaseDao engagemajorreleaseDao) {
this.engagemajorreleaseDao = engagemajorreleaseDao;
}
/**
* 根据ID号返回对象
* @param id 主键id
* @return 对象
* @throws HrException
*/
public EngageMajorRelease getEMRbyID(java.io.Serializable id) throws HrException
{
try
{
return this.getEngagemajorreleaseDao().load(id);
}
catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 新增
* @param cffk 新增的对象
* @return 新产生的一级机构编号
* @throws HrException
*/
public void add(EngageMajorRelease condition) throws HrException {
try {
condition.setDeadline(Util.parseDate(condition.getStr_deadline())); //将字符串类型转换为日期类型,以便和数据库字段类型对应
condition.setRegistTime(Util.parseDate(condition.getStr_registTime()));//将登记时间转换为日期类型
/**
* 得到下拉框中带有编号和名称的字符串数组,以"/"分开,然后再插入数据库中
* 为实体中的 firstkindid 和 firstkindname 赋值
*/
String[] args = Util.splitIdAndName(condition.getFirstKindName());
condition.setFirstKindId(args[0]);
condition.setFirstKindName(args[1]);
/**
* 得到下拉框中带有编号和名称的字符串数组,以"/"分开,然后再插入数据库中
* 为实体中的 secondkindid 和 secondkindname 赋值
*/
args = Util.splitIdAndName(condition.getSecondKindName());
condition.setSecondKindId(args[0]);
condition.setSecondKindName(args[1]);
/**
* 得到下拉框中带有编号和名称的字符串数组,以"/"分开,然后再插入数据库中
* 为实体中的 secondkindid 和 secondkindname 赋值
*/
args = Util.splitIdAndName(condition.getThirdKindName());
condition.setThirdKindId(args[0]);
condition.setThirdKindName(args[1]);
/**
* 得到下拉框中带有编号和名称的字符串数组,以"/"分开,然后再插入数据库中
* 为实体中的 majorkindid 和 majorkindname 赋值
*/
args = Util.splitIdAndName(condition.getMajorKindName());
condition.setMajorKindId(args[0]);
condition.setMajorKindName(args[1]);
/**
* 得到下拉框中带有编号和名称的字符串数组,以"/"分开,然后再插入数据库中
* 为实体中的 majorid 和 majorname 赋值
*/
args = Util.splitIdAndName(condition.getMajorName());
condition.setMajorId(args[0]);
condition.setMajorName(args[1]);
// 保存到数据库
this.getEngagemajorreleaseDao().add(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 查询显示列表
* @param condition 包含查询条件的对象
* @return 查询结果列表
* @throws HrException
*/
public List list(EngageMajorRelease condition) throws HrException {
try {
return this.getEngagemajorreleaseDao().find(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 更新对象到数据库
* @param condition 已更新的对象
* @throws HrException
*/
public void update(EngageMajorRelease condition) throws HrException {
try {
condition.setDeadline(Util.parseDate(condition.getStr_deadline())); //将字符串类型转换为日期类型,以便和数据库字段类型对应
condition.setRegistTime(Util.parseDate(condition.getStr_changeTime()));//将登记时间转换为日期类型
this.getEngagemajorreleaseDao().update(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 删除数据库对象
* @param id 对象的主键编号
* @throws HrException
*/
public void delete(java.io.Serializable id) throws HrException
{
try {
this.getEngagemajorreleaseDao().delete(id);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
}
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
package org.better.hr.biz;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.better.hr.comm.Util;
import org.better.hr.dao.EngageResumeDao;
import org.better.hr.entity.EngageResume;
import org.better.hr.exception.HrException;
public class EngageResumeBiz {
private static final Log logger = LogFactory.getLog(ConfigFileFirstKindBiz.class);
private EngageResumeDao engageresumeDao;
public EngageResumeDao getEngageresumeDao() {
return engageresumeDao;
}
public void setEngageresumeDao(EngageResumeDao engageresumeDao) {
this.engageresumeDao = engageresumeDao;
}
/**
* 根据ID号返回对象
* @param id 主键id
* @return 对象
* @throws HrException
*/
public EngageResume getERbyID(java.io.Serializable id) throws HrException
{
try
{
return this.getEngageresumeDao().load(id);
}
catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 新增
* @param cffk 新增的对象
* @return 新产生的一级机构编号
* @throws HrException
*/
public void add(EngageResume condition) throws HrException {
try {
condition.setHumanBirthday(Util.parseDate(condition.getStr_humanBirthday()));
condition.setRegistTime(Util.parseDate(condition.getStr_registTime()));//将登记时间转换为日期类型
/**
* 得到下拉框中带有编号和名称的字符串数组,以"/"分开,然后再插入数据库中
* 为实体中的 majorkindid 和 majorkindname 赋值
*/
String args[] = Util.splitIdAndName(condition.getHumanMajorKindName());
condition.setHumanMajorKindId(args[0]);
condition.setHumanMajorKindName(args[1]);
/**
* 得到下拉框中带有编号和名称的字符串数组,以"/"分开,然后再插入数据库中
* 为实体中的 majorid 和 majorname 赋值
*/
args = Util.splitIdAndName(condition.getHumanMajorName());
condition.setHumanMajorId(args[0]);
condition.setHumanMajorName(args[1]);
condition.setCheckStatus(Short.valueOf("0")); //设置简历筛选状态为0
condition.setInterviewStatus(Short.valueOf("0"));//设置面试状态为0
condition.setPassCheckStatus(Short.valueOf("0"));//设置录用状态为0
this.getEngageresumeDao().add(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 查询显示列表
* @param condition 包含查询条件的对象
* @return 查询结果列表
* @throws HrException
*/
public List list(EngageResume condition) throws HrException {
try {
return this.getEngageresumeDao().find(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 更新对象到数据库
* @param condition 已更新的对象
* @throws HrException
*/
public void update(EngageResume condition) throws HrException {
try {
this.getEngageresumeDao().update(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 删除数据库对象
* @param id 对象的主键编号
* @throws HrException
*/
public void delete(java.io.Serializable id) throws HrException
{
try {
this.getEngageresumeDao().delete(id);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
}
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
package org.better.hr.biz;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.better.hr.comm.Util;
import org.better.hr.dao.EngageSubjectsDao;
import org.better.hr.entity.EngageSubjects;
import org.better.hr.exception.HrException;
public class EngageSubjectsBiz {
private static final Log logger = LogFactory.getLog(ConfigFileFirstKindBiz.class);
private EngageSubjectsDao engagesubjectsDao;
public EngageSubjectsDao getEngagesubjectsDao() {
return engagesubjectsDao;
}
public void setEngagesubjectsDao(EngageSubjectsDao engagesubjectsDao) {
this.engagesubjectsDao = engagesubjectsDao;
}
/**
* 根据ID号返回对象
* @param id 主键id
* @return 对象
* @throws HrException
*/
public EngageSubjects getESbyID(java.io.Serializable id) throws HrException
{
try
{
return (EngageSubjects)this.getEngagesubjectsDao().load(EngageSubjects.class,id);
}
catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 新增
* @param cffk 新增的对象
* @return 新产生的一级机构编号
* @throws HrException
*/
public void add(EngageSubjects condition) throws HrException {
try {
condition.setRegistTime(Util.parseDate(condition.getStr_registTime()));
//拆分试题一级分类
String args[] = Util.splitIdAndName(condition.getFirstKindName());
condition.setFirstKindId(args[0]);
condition.setFirstKindName(args[1]);
//拆分试题二级分类
args = Util.splitIdAndName(condition.getSecondKindName());
condition.setSecondKindId(args[0]);
condition.setSecondKindName(args[1]);
this.getEngagesubjectsDao().add(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 查询显示列表
* @param condition 包含查询条件的对象
* @return 查询结果列表
* @throws HrException
*/
public List list(EngageSubjects condition) throws HrException {
try {
return this.getEngagesubjectsDao().find(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 更新对象到数据库
* @param condition 已更新的对象
* @throws HrException
*/
public void update(EngageSubjects condition) throws HrException {
try {
//拆分试题一级分类
String args[] = Util.splitIdAndName(condition.getFirstKindName());
condition.setFirstKindId(args[0]);
condition.setFirstKindName(args[1]);
//拆分试题二级分类
args = Util.splitIdAndName(condition.getSecondKindName());
condition.setSecondKindId(args[0]);
condition.setSecondKindName(args[1]);
condition.setChangeTime(Util.parseDate(condition.getStr_changeTime()));
this.getEngagesubjectsDao().update(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 删除数据库对象
* @param id 对象的主键编号
* @throws HrException
*/
public void delete(java.io.Serializable id) throws HrException
{
try {
this.getEngagesubjectsDao().delete(EngageSubjects.class,id);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
}
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
package org.better.hr.biz;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.better.hr.comm.export.Excel;
import org.better.hr.dao.ExportFileDao;
import org.better.hr.entity.ExportFile;
import org.better.hr.entity.ExportFileList;
import org.better.hr.entity.HumanFile;
import org.better.hr.exception.HrException;
public class ExportFileBiz {
private static final Log logger = LogFactory.getLog(ConfigFileFirstKindBiz.class);
private ExportFileDao exportfileDao;
public ExportFileDao getExportfileDao() {
return exportfileDao;
}
public void setExportfileDao(ExportFileDao exportfileDao) {
this.exportfileDao = exportfileDao;
}
/**
* 生成xml文件
* @param condition
* @return
* @throws HrException
*/
public void genXml(HumanFile condition,ExportFileList list,String filename) throws HrException{
try{
List res = this.getExportfileDao().find(condition,list); //得到数据库中的记录
String tagName[] = new String[list.size()];
Object tagValue[][] = new String[res.size()][];
for(int i=0;i<list.size();i++) //将列名的中文名字存放到数组中
{
ExportFile ef = (ExportFile)list.get(i);
tagName[i]= ef.getColumnCN();
}
Excel.createDoc(tagName, res, filename);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
}
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
package org.better.hr.biz;
import java.util.List;
import org.better.hr.comm.Util;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.better.hr.dao.HumanFileDao;
import org.better.hr.entity.HumanFile;
import org.better.hr.exception.HrException;
public class HumanFileBiz {
private static final Log logger = LogFactory.getLog(HumanFileBiz.class);
private HumanFileDao humanfileDao;
public HumanFileDao getHumanfileDao() {
return humanfileDao;
}
public void setHumanfileDao(HumanFileDao humanfileDao) {
this.humanfileDao = humanfileDao;
}
/**
* 根据ID号返回对象
* @param id 主键id
* @return 对象
* @throws HrException
*/
public HumanFile getbyID(java.io.Serializable id) throws HrException
{
try
{
return (HumanFile)this.getHumanfileDao().load(HumanFile.class,id);
}
catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 新增
* @param cfsk 新增的对象
* @return 新产生的职位分类编号
* @throws HrException
*/
public void add(HumanFile condition) throws HrException {
String args[];
condition.setRegistTime(Util.parseDate(condition.getStr_registTime())); //进行时间设置
condition.setHumanBirthday(Util.parseDate(condition.getStr_humanBirthday()));
//设置一级机构编号和名称
args = Util.splitIdAndName(condition.getFirstKindName());
condition.setFirstKindId(args[0]);
condition.setFirstKindName(args[1]);
//设置二级机构编号和名称
args = Util.splitIdAndName(condition.getSecondKindName());
condition.setSecondKindId(args[2]);
condition.setSecondKindName(args[3]);
//设置三级机构编号和名称
args = Util.splitIdAndName(condition.getThirdKindName());
condition.setThirdKindId(args[0]);
condition.setThirdKindName(args[1]);
//设置职位分类编号和名称
args = Util.splitIdAndName(condition.getHumanMajorKindName());
condition.setHumanMajorKindId(args[0]);
condition.setHumanMajorKindName(args[1]);
//设置职位编号名称
args = Util.splitIdAndName(condition.getHunmaMajorName());
condition.setHumanMajorId(args[0]);
condition.setHunmaMajorName(args[1]);
//设置薪酬
args = Util.splitIdAndName(condition.getSalaryStandardName());
condition.setSalaryStandardId(args[0]);
condition.setSalaryStandardName(args[1]);
condition.setCheckStatus((short)0); //设置复核状态为0
condition.setHumanFileStatus((byte)1); //设置删除状态为未删除
String hufileid = condition.getFirstKindId() + condition.getSecondKindId() //产生档案编号
+ condition.getThirdKindId() + this.genId();
condition.setBonusAmount((short)0); //设置激励次数为0
condition.setTrainingAmount((short)0); //设置培训次数为0
condition.setFileChangAmount((short)0); //设置档案变更次数为0
condition.setMajorChangeAmount((short)0); //设置调动次数为0
condition.setHumanId(hufileid);
try {
// 保存到数据库
this.getHumanfileDao().add(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 更新
* @param condition
* @throws HrException
*/
public void update(HumanFile condition) throws HrException {
try {
// 保存到数据库
this.getHumanfileDao().update(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 查询
* @param condition
* @return
* @throws HrException
*/
public List list(HumanFile condition) throws HrException {
try {
List list = this.getHumanfileDao().find(condition);
return list;
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 删除数据库对象
* @param id 对象的主键编号
* @throws HrException
*/
public void delete(java.io.Serializable id) throws HrException
{
try {
this.getHumanfileDao().delete(HumanFile.class,id);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 产生编号
* @return
*/
public String genId()
{
int num = 1;
List list = this.getHumanfileDao().find();
if(list != null)
num = (Short)list.get(0) + 1;
String id;
if(num < 10)
id = "000" + num;
else if(num < 100)
id = "00" + num;
else if(num < 1000)
id = "0" + num;
else
id = "" + num;
return id;
}
/**
* 根据关键字进行查询
* @param key
* @param del_status
* @return
*/
public List listByKey(String key,byte del_status,byte chk_status) throws HrException
{
try {
return this.getHumanfileDao().listByKey(key, del_status,chk_status);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
}
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
package org.better.hr.biz;
import java.util.List;
import org.better.hr.dao.HumanFileDigDao;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.better.hr.entity.HumanFileDig;
import org.better.hr.exception.HrException;
public class HumanFileDigBiz {
private static final Log logger = LogFactory.getLog(HumanFileDigBiz.class);
private HumanFileDigDao humanfiledigDao;
public HumanFileDigDao getHumanfiledigDao() {
return humanfiledigDao;
}
public void setHumanfiledigDao(HumanFileDigDao humanfiledigDao) {
this.humanfiledigDao = humanfiledigDao;
}
/**
* 根据ID号返回对象
* @param id 主键id
* @return 对象
* @throws HrException
*/
public HumanFileDig getbyID(java.io.Serializable id) throws HrException
{
try
{
return (HumanFileDig)this.getHumanfiledigDao().load(HumanFileDig.class,id);
}
catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 新增
* @param cfsk 新增的对象
* @return 新产生的职位分类编号
* @throws HrException
*/
public void add(HumanFileDig condition) throws HrException {
try {
// 保存到数据库
this.getHumanfiledigDao().add(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 变更操作
* @param condition
* @throws hrException
*/
public void update(HumanFileDig condition) throws HrException{
try {
// 保存到数据库
this.getHumanfiledigDao().update(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 查询
* @param condition
* @return
* @throws HrException
*/
public List list(HumanFileDig condition) throws HrException {
try {
List list = this.getHumanfiledigDao().find(condition);
return list;
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 删除数据库对象
* @param id 对象的主键编号
* @throws HrException
*/
public void delete(java.io.Serializable id) throws HrException
{
try {
this.getHumanfiledigDao().delete(id);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 删除数据库对象
* @param conditions 一组集合
* @throws HrException
*/
public void delete(List conditions) throws HrException
{
try {
this.getHumanfiledigDao().delete(conditions);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
}
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
package org.better.hr.biz;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.better.hr.comm.Util;
import org.better.hr.dao.SalaryStandardDao;
import org.better.hr.entity.SalaryStandard;
import org.better.hr.exception.HrException;
public class SalaryStandardBiz {
private static final Log logger = LogFactory.getLog(ConfigFileFirstKindBiz.class);
private SalaryStandardDao salarystandardDao;
public SalaryStandardDao getSalarystandardDao() {
return salarystandardDao;
}
public void setSalarystandardDao(SalaryStandardDao salarystandardDao) {
this.salarystandardDao = salarystandardDao;
}
/**
* 根据ID号返回对象
* @param id 主键id
* @return 对象
* @throws HrException
*/
public SalaryStandard getbyID(java.io.Serializable id) throws HrException
{
try
{
return this.getSalarystandardDao().load(id);
}
catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 新增标准薪酬
* @param condition
* @throws HrException
*/
public void add(SalaryStandard condition) throws HrException {
try {
condition.setCheckStatus((short)0); //设置复核状态为0
condition.setRegistTime(Util.parseDate(condition.getStr_registeTime())); //设置登记时间
//保存到数据库
this.getSalarystandardDao().add(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 查询显示列表
* @param condition 包含查询条件的对象
* @return 查询结果列表
* @throws HrException
*/
public List list(SalaryStandard condition) throws HrException {
try {
return this.getSalarystandardDao().find(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 查询最大主键值
* @return
*/
public String select()
{
List list = this.getSalarystandardDao().find();
int id = 1;
if(list.get(0) != null)
id= ((Short)list.get(0)).intValue() + 1;
return id<10?"0"+id:""+id;
}
/**
* 更新对象到数据库
* @param condition 已更新的对象
* @throws HrException
*/
public void update(SalaryStandard condition) throws HrException {
try {
this.getSalarystandardDao().update(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 删除数据库对象
* @param id 对象的主键编号
* @throws HrException
*/
public void delete(java.io.Serializable id) throws HrException
{
try {
this.getSalarystandardDao().delete(id);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
}
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
package org.better.hr.biz;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.better.hr.dao.SalaryStandardDetailsDao;
import org.better.hr.entity.SalaryStandardDetails;
import org.better.hr.exception.HrException;
public class SalaryStandardDetailsBiz {
private static final Log logger = LogFactory.getLog(ConfigFileFirstKindBiz.class);
private SalaryStandardDetailsDao salarystandarddetailsDao;
public SalaryStandardDetailsDao getSalarystandarddetailsDao() {
return salarystandarddetailsDao;
}
public void setSalarystandarddetailsDao(
SalaryStandardDetailsDao salarystandarddetailsDao) {
this.salarystandarddetailsDao = salarystandarddetailsDao;
}
/**
* 根据ID号返回对象
* @param id 主键id
* @return 对象
* @throws HrException
*/
public SalaryStandardDetails getCFFKbyID(java.io.Serializable id) throws HrException
{
try
{
return this.getSalarystandarddetailsDao().load(id);
}
catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 新增标准薪酬详细信息
* @param condition
* @throws HrException
*/
public void add(SalaryStandardDetails condition) throws HrException {
try {
// 保存到数据库
this.getSalarystandarddetailsDao().add(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 查询显示列表
* @param condition 包含查询条件的对象
* @return 查询结果列表
* @throws HrException
*/
public List list(SalaryStandardDetails condition) throws HrException {
try {
return this.getSalarystandarddetailsDao().find(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 更新对象到数据库
* @param condition 已更新的对象
* @throws HrException
*/
public void update(SalaryStandardDetails condition) throws HrException {
try {
this.getSalarystandarddetailsDao().update(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 删除数据库对象
* @param id 对象的主键编号
* @throws HrException
*/
public void delete(java.io.Serializable id) throws HrException
{
try {
this.getSalarystandarddetailsDao().delete(id);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
}
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
package org.better.hr.biz;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.better.hr.comm.Util;
import org.better.hr.dao.TrainingDao;
import org.better.hr.entity.Training;
import org.better.hr.exception.HrException;
public class TrainingBiz {
private static final Log logger = LogFactory.getLog(ConfigFileFirstKindBiz.class);
private TrainingDao trainingDao;
public TrainingDao getTrainingDao() {
return trainingDao;
}
public void setTrainingDao(TrainingDao trainingDao) {
this.trainingDao = trainingDao;
}
/**
* 根据ID号返回对象
* @param id 主键id
* @return 对象
* @throws HrException
*/
public Training getbyID(java.io.Serializable id) throws HrException
{
try
{
return (Training)this.getTrainingDao().load(Training.class,id);
}
catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 新增
* @param condition
* @throws HrException
*/
public void add(Training condition) throws HrException {
try {
//保存到数据库
this.getTrainingDao().add(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 查询显示列表
* @param condition 包含查询条件的对象
* @return 查询结果列表
* @throws HrException
*/
public List list(Training condition) throws HrException {
try {
return this.getTrainingDao().find(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 更新对象到数据库
* @param condition 已更新的对象
* @throws HrException
*/
public void update(Training condition) throws HrException {
try {
this.getTrainingDao().update(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 删除数据库对象
* @param id 对象的主键编号
* @throws HrException
*/
public void delete(java.io.Serializable id) throws HrException
{
try {
this.getTrainingDao().delete(Training.class,id);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
}
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
package org.better.hr.biz;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.better.hr.dao.UsersDao;
import org.better.hr.entity.Users;
import org.better.hr.exception.HrException;
public class UsersBiz {
private static final Log logger = LogFactory.getLog(ConfigFileFirstKindBiz.class);
private UsersDao usersDao;
public UsersDao getUsersDao() {
return usersDao;
}
public void setUsersDao(UsersDao usersDao) {
this.usersDao = usersDao;
}
/**
* 根据ID号返回对象
* @param id 主键id
* @return 对象
* @throws HrException
*/
public Users getbyID(java.io.Serializable id) throws HrException
{
try
{
return (Users)this.getUsersDao().load(Users.class,id);
}
catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 新增用户
* @param condition
* @throws HrException
*/
public void add(Users condition) throws HrException {
try {
//保存到数据库
this.getUsersDao().add(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 查询用户
* @param condition
* @return
* @throws HrException
*/
public List list(Users condition) throws HrException{
try{
return this.getUsersDao().find(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
/**
* 变更
* @param condition
* @throws HrException
*/
public void update(Users condition) throws HrException{
try{
this.getUsersDao().update(condition);
} catch (Exception ex) {
logger.error(ex);
throw new HrException(ex);
}
}
}
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
- HR代码2
- HR代码
- HR代码3
- HR事务代码 (转载)
- SAP HR 常用事务代码
- HR学习笔记2
- HR
- hr
- <hr>
- ABAP--HR的工资计算样例代码
- ABAP--HR的工资计算样例代码
- html代码编写:自定义hr标签的显示效果
- ABAP--HR的工资计算样例代码
- 简单而有效的html画线代码“hr”实例!
- ABAP--HR的工资计算样例代码
- 3736【HR】万花丛中2
- HTML 标签 <hr> <hr />
- BAPI--使用HR_INFOTYPE_OPERATION函数批量导入HR信息纪录代码样例(0759信息类型)
- 使用DarkIce中的aflibConverter进行音频重采样
- 难以捉摸的动态规划
- 更好的建立自然入站链接
- android 多媒体和相机详解十一(大结局)
- 解读C++调用约定
- HR代码2
- HR代码3
- 最先进的开源游戏引擎KlayGE 4.1发布
- 深入浅出Java三大框架SSH与MVC的设计模式
- 2012.7.26计划并7.25总结
- 被聘_高等职业院校计算机软件技术专业教师专业技能培训专家
- csdn新手 求教 学习
- 2012.7.26计划
- 代码大全学习-14-变量名的力量(Power of Variables Names)