Commit 40633759 by lal Committed by chenzg

提交

parent 1b8ebb82
......@@ -197,6 +197,14 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
double workinghours = 0,seriouslatetimes = 0,seriouslatehours = 0,absenlatetimes = 0;
// 迟到次数 迟到时长 早退次数 早退时长
int latenum = 0,latehours = 0,leanum = 0,leahours = 0;// 迟到次数
double workingturncompenleave = 0;//工作日(转调休)
double restturncompenleave = 0;//休息日(转调休)
double holidayturncompenleave = 0;//节假日(转调休)
double workingtransferovertime = 0;//工作日(转加班费)
double resttransferovertime = 0;//休息日(转加班费)
double holidaytransferovertime = 0;//节假日(转加班费)
if(attgro != null){//该员工是否加入到考勤组 排班方式 1:固定排班;2:自由排班;3:自由工时 计算出应出勤,实际出勤,休息天数
// KqglAssoBcsz shif = KqglAssoBcsz.builder().build();
// //休息天数,应出勤天数,实际出勤
......@@ -469,6 +477,7 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 5));
rowData.add("已补卡:"+lea.getStartTime());
}else if(Arrays.binarySearch(ClockInTool.replaceNull(overtimes), num) >= 0) {//加班
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 1));
String company = "未知",method = "无";//加班单位、加班补偿方式
//最小加班单位 1:按分钟加班、2:按半小时加班、3:按小时加班、4:按半天加班、5:按天加班
......@@ -483,6 +492,30 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
else if(lea.getCompensateId() == 2) { method="转加班费"; }
else {method="转调休或加班费";}
rowData.add(lea.getStartTime() +"到"+ lea.getEndTime()+"加班"+lea.getDuration()+company+"["+method+"]");
//加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费
//工作日
if(Arrays.binarySearch(ClockInTool.replaceNull(ycqts), num) >= 0) {
if(lea.getCompensateId() == 1) {
workingturncompenleave++;
}else if(lea.getCompensateId() == 2) {
workingtransferovertime++;
}
}
//休息日
if(Arrays.binarySearch(ClockInTool.replaceNull(xxts), num) >= 0) {
if(lea.getCompensateId() == 1) {
restturncompenleave++;
}else if(lea.getCompensateId() == 2) {
resttransferovertime++;
}
}
if(Arrays.binarySearch(ClockInTool.replaceNull(ycqts), num) < 0 && Arrays.binarySearch(ClockInTool.replaceNull(xxts), num) < 0) {
if(lea.getCompensateId() == 1) {
holidayturncompenleave++;
}else if(lea.getCompensateId() == 2) {
holidaytransferovertime++;
}
}
}else{
if(Arrays.binarySearch(ClockInTool.replaceNull(sblacks), num) >= 0) {
rowData.add("上班缺卡");
......@@ -503,6 +536,10 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
}
}
}
//未打最后一次卡的时候 判断最后一次打卡时间是否在请假范围内 相对应减少缺卡次数
}
}else {
for (String num2 : range) {
......@@ -525,21 +562,40 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
}
int answer = shif.getSxbcs();//1=2次 2=4次 3=6次
KqglAssoMonthPunchSummary summary = KqglAssoMonthPunchSummary.builder().name(user.getEmpname()).num(user.getEmpnum()).dept(user.getDepartment())
.post(user.getPosition()).attGroup(attgro.getId()).daysOnDuty(daysOnDuty).actualAttDays(Double.valueOf(dkjl)).daysOff(daysOff).workingHours(workinghours)
.lateTimes(Double.valueOf(latenum)).lateHours(Double.valueOf(latehours)).seriousLateTimes(seriouslatetimes).seriousLateHours(seriouslatehours)
.absenLateTimes(absenlatetimes).earlyLeaveTimes(Double.valueOf(leanum)).lengthEarlyLeave(Double.valueOf(leahours)).numberWorkCardShortage(Double.valueOf(sbqkcs))
.numberDutyCardShortage(Double.valueOf(xbqkcs)).lengthBusinessTrip(traveltotal).timeOut(egresstotal).totalOvertimeHours(overtimetotal)
.belongYear(ca.get(Calendar.YEAR)).belongMonth(ca.get(Calendar.MONTH)+1).orgCode(org_code).lastModified(new Date().getTime()).build();
.post(user.getPosition()).attGroup(attgro.getId()).build();
summary.setDaysOnDuty(daysOnDuty);//应出勤天数
summary.setActualAttDays(Double.valueOf(dkjl));//实际出勤天数
summary.setDaysOff(daysOff);//休息天数
summary.setWorkingHours(workinghours);
summary.setLateTimes(Double.valueOf(latenum));//迟到次数
summary.setLateHours(Double.valueOf(latehours));//迟到时长(分钟)
summary.setSeriousLateTimes(seriouslatetimes);//严重迟到次数
summary.setSeriousLateHours(seriouslatehours);//严重迟到时长(分钟)
summary.setAbsenLateTimes(absenlatetimes);//旷工迟到次数
summary.setEarlyLeaveTimes(Double.valueOf(leanum));//早退次数
summary.setLengthEarlyLeave(Double.valueOf(leahours));//早退时长(分钟)
summary.setNumberWorkCardShortage(Double.valueOf(sbqkcs));//上班缺卡次数
summary.setNumberDutyCardShortage(Double.valueOf(xbqkcs));//下班缺卡次数
summary.setLengthBusinessTrip(traveltotal);//出差时长
summary.setTimeOut(egresstotal);//外出时长
summary.setTotalOvertimeHours(overtimetotal);//加班总时长
summary.setBelongYear(ca.get(Calendar.YEAR));
summary.setBelongMonth(ca.get(Calendar.MONTH)+1);
summary.setOrgCode(org_code);
summary.setLastModified(new Date().getTime());
int absenteeismdays=0;
if(zjgzts-dkjl > 0) { absenteeismdays = zjgzts-dkjl; }
summary.setAbsenteeismDays(Double.valueOf(absenteeismdays));//旷工天数
//工作日(转调休)
//休息日(转调休)
//节假日(转调休)
//工作日(转加班费)
//休息日(转加班费)
//节假日(转加班费)
summary.setWorkingTurnCompenLeave(workingturncompenleave);//工作日(转调休)
summary.setRestTurnCompenLeave(restturncompenleave);//休息日(转调休)
summary.setHolidayTurnCompenLeave(holidayturncompenleave);//节假日(转调休)
summary.setWorkingTransferOvertime(workingtransferovertime);//工作日(转加班费)
summary.setRestTransferOvertime(resttransferovertime);//休息日(转加班费)
summary.setHolidayTransferOvertime(holidaytransferovertime);//节假日(转加班费)
summary.setDay1(noticesArray[0]);
summary.setDay2(noticesArray[1]);
summary.setDay3(noticesArray[2]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment