人员标识11.01AM
This commit is contained in:
parent
faec3f5be9
commit
f74b992523
|
|
@ -0,0 +1,15 @@
|
|||
package com.api.bjcj220907.web;
|
||||
|
||||
import com.engine.bjcj220907.web.EmployeeIdentifiedController;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @description 人员标识
|
||||
* @return null
|
||||
* @author Harryxzy
|
||||
* @date 2022/11/1 10:12
|
||||
*/
|
||||
@Path("/bs/EmployeeIdentifiedWeb")
|
||||
public class EmployeeIdentifiedWeb extends EmployeeIdentifiedController {
|
||||
}
|
||||
|
|
@ -1,14 +1,10 @@
|
|||
package com.api.bjcj220907.web;
|
||||
|
||||
import com.engine.bjcj220907.web.OverseasAllowanceCountController;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @author Harryxzy
|
||||
* @date 2022/09/26 13:41
|
||||
* @description
|
||||
*/
|
||||
@Path("/bs/OverseasAllowanceCount")
|
||||
public class OverseasAllowanceWeb extends OverseasAllowanceCountController {
|
||||
}
|
||||
//@Path("/bs/OverseasAllowanceCount")
|
||||
//public class OverseasAllowanceWeb extends OverseasAllowanceCountController {
|
||||
//}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
package com.engine.bjcj220907.dao;
|
||||
|
||||
/**
|
||||
* @author Harryxzy
|
||||
* @date 2022/11/01 13:37
|
||||
* @description 人员标识
|
||||
*/
|
||||
public class EmployeeIdentifiedDAO {
|
||||
|
||||
/**
|
||||
* @description 获取所有人员标识信息
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/11/1 13:39
|
||||
*/
|
||||
public void getList() {
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.engine.bjcj220907.service;
|
||||
|
||||
import java.util.Calendar;
|
||||
|
||||
/**
|
||||
* @author Harryxzy
|
||||
* @date 2022/11/01 10:13
|
||||
* @description
|
||||
*/
|
||||
public interface EmployeeIdentifiedService {
|
||||
|
||||
/**
|
||||
* 更新员工标识
|
||||
* @param cal
|
||||
*/
|
||||
void updateIdentified(Calendar cal);
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.engine.bjcj220907.service.impl;
|
||||
|
||||
import com.engine.bjcj220907.dao.EmployeeIdentifiedDAO;
|
||||
import com.engine.bjcj220907.service.EmployeeIdentifiedService;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.weaver.general.BaseBean;
|
||||
|
||||
import java.util.Calendar;
|
||||
|
||||
/**
|
||||
* @author Harryxzy
|
||||
* @date 2022/11/01 10:14
|
||||
* @description
|
||||
*/
|
||||
public class EmployeeIdentifiedServiceImpl extends Service implements EmployeeIdentifiedService {
|
||||
|
||||
BaseBean baseBean = new BaseBean();
|
||||
|
||||
public EmployeeIdentifiedDAO getEmployeeIdentifiedDAO(){
|
||||
return new EmployeeIdentifiedDAO();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 更新员工标识
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/11/1 13:36
|
||||
*/
|
||||
@Override
|
||||
public void updateIdentified(Calendar cal) {
|
||||
// 获取所有人员标识信息
|
||||
getEmployeeIdentifiedDAO().getList();
|
||||
}
|
||||
}
|
||||
|
|
@ -75,15 +75,26 @@ public class GetKQ4OverseasAllowanceCountServiceImpl extends Service implements
|
|||
countEndCal.add(Calendar.DATE,-1);
|
||||
}
|
||||
baseBean.writeLog("获取缺勤日期为:"+attDateList);
|
||||
baseBean.writeLog("dataList:"+dataList);
|
||||
dataList.stream().forEach(i->{
|
||||
if(users.contains(i.get("resourceId"))){
|
||||
List<Date> qqDate = new ArrayList<>();
|
||||
attDateList.stream().forEach(a -> {
|
||||
Map attCalMap =(Map) i.get(sdf.format(a));
|
||||
String attCal = (String)attCalMap.get("text");
|
||||
Object o = i.get(sdf.format(a));
|
||||
baseBean.writeLog("i.get(sdf.format(a)) o:"+o);
|
||||
String attCal = "";
|
||||
try{
|
||||
Map attCalMap =(Map) o;
|
||||
attCal = (String)attCalMap.get("text");
|
||||
}catch (Exception e){
|
||||
attCal="休息";
|
||||
}
|
||||
if( (attCal.contains("旷工")) || ( (!attCal.equals("√")) && (!attCal.contains("休息")) && (!attCal.equals("")) && (!attCal.contains("境内年假")) && (!attCal.contains("境外年假")) && (!attCal.contains("工伤")) && (!attCal.contains("奖励假")) ) ){
|
||||
// 存在缺勤
|
||||
qqDate.add(a);
|
||||
baseBean.writeLog(attCal+"缺勤");
|
||||
}else{
|
||||
baseBean.writeLog(attCal+"不缺勤");
|
||||
}
|
||||
});
|
||||
String qqStr = i.get("resourceId") +"-qq";
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public class MonthBonusCountServiceImpl extends Service implements MonthBonusCou
|
|||
bonusCal.setTime(bonusMonth);
|
||||
int bonusYear = bonusCal.get(Calendar.YEAR);
|
||||
int bonusSeason =bonusCal.get(Calendar.MONTH)/3+1;
|
||||
// 获取已经离职并且已经发放过绩效的人员信息
|
||||
// 获取已经tr并且已经发放过绩效的人员信息
|
||||
baseBean.writeLog("获取已经离职并且已经发放过绩效的人员信息");
|
||||
List<Integer> haveSendDepartureInfo = getMonthBonusDAO().getHaveSendDepartureInfo().stream().map(i->i.getXm()).collect(Collectors.toList());
|
||||
baseBean.writeLog("获取已经离职并且已经发放过绩效的人员信息"+haveSendDepartureInfo+" 共:"+haveSendDepartureInfo.size());
|
||||
|
|
@ -118,6 +118,10 @@ public class MonthBonusCountServiceImpl extends Service implements MonthBonusCou
|
|||
if(qqDatas.containsKey( (item.getXm()+"-"+sdf.format(item.getKqyf())) )){
|
||||
qq = qqDatas.get((item.getXm()+"-"+sdf.format(item.getKqyf())));
|
||||
}
|
||||
if(qq>21.75){
|
||||
// 境内员工,并且缺勤天数大于21.75,可能导致负数因此修正缺勤天数为21.75
|
||||
qq = 21.75;
|
||||
}
|
||||
item.setQq(qq);
|
||||
// 实出勤天数 =应出勤天数-缺勤天数
|
||||
double scqTemp = 21.75-qq;
|
||||
|
|
@ -206,6 +210,10 @@ public class MonthBonusCountServiceImpl extends Service implements MonthBonusCou
|
|||
if(qqDatas.containsKey( (item.getXm()+"-"+sdf.format(item.getKqyf())) )){
|
||||
qq = qqDatas.get((item.getXm()+"-"+sdf.format(item.getKqyf())));
|
||||
}
|
||||
if(ycq[0]==21.75 && qq>21.75){
|
||||
// 没有境外常驻信息,并且缺勤天数大于21.75,可能导致负数因此修正缺勤天数为21.75
|
||||
qq = 21.75;
|
||||
}
|
||||
item.setQq(qq);
|
||||
// 实出勤天数 =应出勤天数-缺勤天数
|
||||
double scqTemp =ycq[0]-qq;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,46 @@
|
|||
package com.engine.bjcj220907.web;
|
||||
|
||||
import com.engine.bjcj220907.service.EmployeeIdentifiedService;
|
||||
import com.engine.bjcj220907.service.impl.EmployeeIdentifiedServiceImpl;
|
||||
import com.engine.bjcj220907.utils.BjcjCommonUtils;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import java.util.Calendar;
|
||||
|
||||
/**
|
||||
* @author Harryxzy
|
||||
* @date 2022/11/01 10:15
|
||||
* @description 员工标识
|
||||
*/
|
||||
public class EmployeeIdentifiedController {
|
||||
|
||||
private EmployeeIdentifiedService getEmployeeIdentifiedService(User user) {
|
||||
return ServiceUtil.getService(EmployeeIdentifiedServiceImpl.class,user);
|
||||
}
|
||||
|
||||
BaseBean baseBean = new BaseBean();
|
||||
|
||||
@GET
|
||||
@Path("/updateEmployeeIdentified")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public void updateEmployeeIdentified(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user1 = new User();
|
||||
user1.setUid(1);
|
||||
user1.setLoginid("sysadmin");
|
||||
user1.setSeclevel("30");
|
||||
user1.setLanguage(7);
|
||||
Calendar cal = BjcjCommonUtils.getNowCalendar();
|
||||
baseBean.writeLog("开始更新:"+cal.getTime()+"的人员标识");
|
||||
getEmployeeIdentifiedService(user1).updateIdentified(cal);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue