📄 grantbizimple.java
字号:
package com.y2.hr.salary.grant.biz.impl;
import java.util.Date;
import java.util.List;
import com.y2.hr.base.commom.Page;
import com.y2.hr.human.file.dao.HumanFileDAO;
import com.y2.hr.salary.grant.bean.SalaryGrant;
import com.y2.hr.salary.grant.bean.SalaryGrantDetails;
import com.y2.hr.salary.grant.biz.GrantBiz;
import com.y2.hr.salary.grant.dao.GrantDao;
import com.y2.hr.salary.standard.dao.StandardDao;
public class GrantBizImple implements GrantBiz {
private GrantDao grantDao;
public void setGrantDao(GrantDao grantDao) {
this.grantDao = grantDao;
}
private HumanFileDAO humanDao;
public void setHumanDao(HumanFileDAO humanDao) {
this.humanDao = humanDao;
}
private StandardDao standDao;
public void setStandDao(StandardDao standDao) {
this.standDao = standDao;
}
// 根据发放方式获取机构的总人数,总薪酬标准额,及机构信息
public List getHumanCountsByKind(int kindId) {
String hql = "";
if (kindId == 1) {
hql = "select h.firstKindId,h.firstKindName,h.secondKindId,h.secondKindName,count(h.hufId),sum(h.salarySum) from HumanFile as h"
+ " where h.humanFileStatus = 1 and h.secondKindId is null group by h.firstKindId";
} else {
hql = "select h.firstKindId,h.firstKindName,h.secondKindId,h.secondKindName,count(h.hufId),sum(h.salarySum) from HumanFile as h"
+ " where h.humanFileStatus = 1 and h.secondKindId is not null group by h.secondKindId";
}
return humanDao.search(hql);
}
public List<Object> getKindAllHuman(String firstKindId,
String secondKindId, Page page) {
String hql = "select h.humanId,h.humanName,h.salaryStandardId from HumanFile as h"
+ " where h.firstKindId='"
+ firstKindId
+ "' and h.secondKindId='" + secondKindId + "'";
// humanDao.paginationSearch(page.getPageSize(), page.getCurrentPage(),
// hql)
return humanDao.search(hql);
}
/**
* 获得最后一次薪酬发放的信息
*
* @return String
*/
public String getLastGrantId() {
return grantDao.getLastGrantId();
}
/**
* 保存薪酬发放信息和对应的详细信息
*
* @param sagrant
* @param grantDateList
* @return boolean
*/
public boolean savaGrantAndDate(SalaryGrant sagrant,
List<SalaryGrantDetails> grantDateList) {
return grantDao.savaGrantAndDate(sagrant, grantDateList);
}
/**
* 获取最后一次薪酬发放的时间
*
* @return String
*/
public List<?> getLastGrant() {
return grantDao.getLastGrant();
}
/**
* 获取需要审核的薪酬发放集合
*
* @return List<Object>
*/
public List<?> getCkGrantList() {
return grantDao.getCkGrantList();
}
/**
* 获得审核的信息
*
* @return List<Object>
*/
public List<?> getCkGrantInfo() {
return grantDao.getCkGrantInfo();
}
// 根据薪酬标准的编号获取详细薪酬
public List getAllSalaryById(String salaryStandId) {
String hql = "select s.salary from SalaryStandardDetails as s where s.standardId = '"
+ salaryStandId + "'";
return grantDao.get(hql);
}
public SalaryGrant getGrantById(String salaryGrantId) {
return grantDao.getGrantById(salaryGrantId);
}
public List<?> getGrantDetaById(String salaryGrantId) {
return grantDao.getGrantDetaById(salaryGrantId);
}
public boolean updateGrantAndDate(SalaryGrant sagrant,
List<SalaryGrantDetails> grantDateList) {
return grantDao.updateGrantAndDate(sagrant, grantDateList);
}
// 统计 最后一次的薪酬发放的次数
public int getLastGrantCount() {
return grantDao.getLastGrantCount();
}
// 获取最后一次薪酬发放时间
public Date getLastGrantLastTime() {
return grantDao.getLastGrantLastTime();
}
// 根据发放方式获取机构的总人数
public int getHumRowCounts(String firstKindId, String secondKindId) {
String hql = "select count(h.hufId) from HumanFile as h"
+ " where h.humanFileStatus = 1 and h.firstKindId='"
+ firstKindId + "' and h.secondKindId='" + secondKindId + "'";
Object obj = humanDao.uniqueSearch(hql, null);
return obj == null ? null : Integer.parseInt(obj.toString());
}
// 分页查询指定机构的人员 的相应信息
public List<?> getKindAllHuman(String firstKindId, String secondKindId,
int curPage) {
String hql = "select h.humanId,h.humanName,h.salaryStandardId from HumanFile as h"
+ " where h.humanFileStatus = 1 and h.firstKindId='"
+ firstKindId + "' and h.secondKindId='" + secondKindId + "'";
return humanDao.paginationSearch(10, curPage, hql);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -