📄 marchebizimple.java
字号:
package com.y2.hr.change.majorchange.biz.impl;
import java.util.List;
import com.y2.hr.base.commom.Page;
import com.y2.hr.change.majorchange.bean.MajorChange;
import com.y2.hr.change.majorchange.biz.MarCheBiz;
import com.y2.hr.change.majorchange.dao.MarCheDao;
import com.y2.hr.change.majorchange.web.form.Condition;
import com.y2.hr.human.file.bean.HumanFile;
import com.y2.hr.human.file.dao.HumanFileDAO;
public class MarCheBizImple implements MarCheBiz {
private MarCheDao dao;
public void setDao(MarCheDao dao) {
this.dao = dao;
}
private HumanFileDAO humanDao;
public void setHumanDao(HumanFileDAO humanDao) {
this.humanDao = humanDao;
}
/**
* 人事调动登记
*
* @param marChe(人事调动的具体信息)
* @return
*/
public boolean add(MajorChange marChe) {
return dao.add(marChe);
}
// 查询待复核的登记列表
public List<?> checkList(Page page) {
int rowCounts = dao.getMarCheSumPage();
page.setMaxPageCount(rowCounts);// 设置最大页数
return dao.checkList(page);
}
// 获取最后的编号
public String getLastMajorId() {
return dao.getLastMajorId();
}
// 修改人事调动的登记信息
public boolean updateMajorChe(MajorChange major) {
return dao.updateMajorChe(major);
}
// 按条件搜索符合条件的人事调动信息
public List<Object> getSearchList(Page page, Condition condition) {
int rowCounts = dao.getSearchListCounts(condition);
page.setMaxPageCount(rowCounts);// 设置最大页数
return dao.getSearchList(page, condition);
}
// 根据原机构获取新机构
public List<?> getNewKinds(int kind, String kindId) {
return dao.getNewKinds(kind, kindId);
}
// 获取指定的人事调动信息
public MajorChange getMarCheChange(short mchId) {
return dao.getMarCheChange(mchId);
}
// 获取指定的人事档案信息
public HumanFile getHumanFile(String hufId) {
String hql = "from HumanFile as h where h.hufId=? and h.humanFileStatus = 1";
Object o = humanDao.uniqueSearch(hql, Short.parseShort(hufId));
return o == null ? null : (HumanFile) o;
}
// 获取指定的人事档案信息列表
public List getHumanList(String first, String second, String third,
String time) {
StringBuilder hql = new StringBuilder("");
hql
.append("select h.hufId,h.humanName,h.firstKindName,"
+ "h.secondKindName,h.thirdKindName,h.registTime from HumanFile as h where h.humanFileStatus = 1");
if (first != null && !"".equals(first)) {
hql.append(" and h.firstKindId ='" + first + "'");
}
if (second != null && !"".equals(second)) {
hql.append(" and h.secondKindId ='" + second + "'");
}
if (third != null && !"".equals(third)) {
hql.append(" and h.thirdKindId ='" + third + "'");
}
if (time != null && !"".equals(time)) {
hql.append(" and h.registTime ='" + time + "%'");
}
return humanDao.search(hql.toString());
}
//根据状态 获取调动信息
public int getRowCounts(int status) {
return dao.getRowCounts(status);
}
//根据页数 获取调动的信息
public List<?> getCheckList(int curPage) {
return dao.getCheckList(curPage);
}
//根据条件 获得调动信息
public List<?> getSearchList(int curPage, Condition condition) {
return dao.getSearchList(curPage,condition);
}
//根据条件 获得调动信息的页数
public int getSearchListCounts(Condition condition) {
return dao.getSearchListCounts(condition);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -