Commit 429d0c76 by lal

提交BUG

parent 5cbf737c
...@@ -55,10 +55,10 @@ public class KqglAssoRelationSummary extends Model<KqglAssoRelationSummary> { ...@@ -55,10 +55,10 @@ public class KqglAssoRelationSummary extends Model<KqglAssoRelationSummary> {
@ApiModelProperty(value = "假期类型id", example = "101") @ApiModelProperty(value = "假期类型id", example = "101")
private Integer leaveTypeId; private Integer leaveTypeId;
@ApiModelProperty(value = "加班类型id", example = "101") @ApiModelProperty(value = "加班类型id 1:工作日加班;2:休息日加班;3:节假日加班", example = "101")
private Integer overtimeTypeId; private Integer overtimeTypeId;
@ApiModelProperty(value = "加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费", example = "101") @ApiModelProperty(value = "加班补偿方式 1:转调休;2:转加班费;(3:转调休 4:加班费)", example = "101")
private Integer compensateId; private Integer compensateId;
@ApiModelProperty(value = "开始时间 ", example = "开始时间") @ApiModelProperty(value = "开始时间 ", example = "开始时间")
......
...@@ -107,8 +107,9 @@ public class AttendanceTaskTiming{ ...@@ -107,8 +107,9 @@ public class AttendanceTaskTiming{
//3.添加定时任务 每四小时执行一次 //3.添加定时任务 每四小时执行一次
// @Scheduled(cron = "0 0 */4 * * ?") // @Scheduled(cron = "0 0 */4 * * ?")
// @Scheduled(cron = "0 02 12 * * ?") // 测试:5秒执行一次 0 0 19 * * ? // @Scheduled(cron = "0 22 15 * * ?") // 测试:5秒执行一次 0 0 19 * * ?
// @Scheduled(cron = "0 */5 * * * ?") // @Scheduled(cron = "0 */5 * * * ?")
@Scheduled(cron = "0 0 19 * * ?")
public void AttendanceTask() throws ParseException { public void AttendanceTask() throws ParseException {
// boolean implement = false; // boolean implement = false;
...@@ -499,7 +500,29 @@ public class AttendanceTaskTiming{ ...@@ -499,7 +500,29 @@ public class AttendanceTaskTiming{
} }
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(leaves), num) >= 0) {//请假
/*
* else{ if(Arrays.binarySearch(ClockInTool.deleteArrayNull(sblacks), num) >= 0)
* { rowData.add("上班缺卡"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(sblacks), num) >= 0 &&
* Arrays.binarySearch(ClockInTool.deleteArrayNull(ztts), num) >= 0) {
* rowData.add("上班缺卡,下班早退"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cdts), num) >= 0) {
* rowData.add("上班迟到"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cdts), num) >= 0 &&
* Arrays.binarySearch(ClockInTool.deleteArrayNull(xblacks), num) >= 0) {
* rowData.add("上班迟到,下班缺卡"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cdts), num) >= 0 &&
* Arrays.binarySearch(ClockInTool.deleteArrayNull(ztts), num) >= 0) {
* rowData.add("上班迟到,下班早退"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(xblacks), num) >= 0) {
* rowData.add("下班缺卡"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(ztts), num) >= 0) {
* rowData.add("下班早退"); }else { rowData.add("正常"); } }
*/
}
if(ClockInTool.contains(ClockInTool.deleteArrayNull(leaves),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(leaves),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 2)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 2));
String leavetype = "未知";//请假类型 String leavetype = "未知";//请假类型
...@@ -516,25 +539,20 @@ public class AttendanceTaskTiming{ ...@@ -516,25 +539,20 @@ public class AttendanceTaskTiming{
} }
rowData.add(lea.getStartTime() +"到"+ lea.getEndTime()+"请"+leavetype+lea.getDuration()+company); rowData.add(lea.getStartTime() +"到"+ lea.getEndTime()+"请"+leavetype+lea.getDuration()+company);
} }
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(travels), num) >= 0) {//出差
if(ClockInTool.contains(ClockInTool.deleteArrayNull(travels),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(travels),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 3)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 3));
rowData.add(lea.getStartTime() +"到"+ lea.getEndTime()+"出差"+lea.getDuration()+"天"); rowData.add(lea.getStartTime() +"到"+ lea.getEndTime()+"出差"+lea.getDuration()+"天");
} }
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(goouts), num) >= 0){//外出
if(ClockInTool.contains(ClockInTool.deleteArrayNull(goouts),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(goouts),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 4)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 4));
rowData.add(lea.getStartTime() +"到"+ lea.getEndTime()+"外出"+lea.getDuration()+"天"); rowData.add(lea.getStartTime() +"到"+ lea.getEndTime()+"外出"+lea.getDuration()+"天");
} }
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cards), num) >= 0){//补卡
if(ClockInTool.contains(ClockInTool.deleteArrayNull(cards),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(cards),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 5)); 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()); rowData.add("已补卡:"+lea.getStartTime());
} }
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(overtimes), num) >= 0) {//加班
if(ClockInTool.contains(ClockInTool.deleteArrayNull(overtimes),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(overtimes),num)) {
// 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 = "无";//加班单位、加班补偿方式 String company = "未知",method = "无";//加班单位、加班补偿方式
List<KqglAssoRelationSummary> leas = KqglAssoRelationSummary.builder().build().selectList(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 1)); List<KqglAssoRelationSummary> leas = KqglAssoRelationSummary.builder().build().selectList(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 1));
...@@ -553,55 +571,42 @@ public class AttendanceTaskTiming{ ...@@ -553,55 +571,42 @@ public class AttendanceTaskTiming{
rowData.add(lea.getStartTime() +"到"+ lea.getEndTime()+"加班"+lea.getDuration()+company+"["+method+"]"); rowData.add(lea.getStartTime() +"到"+ lea.getEndTime()+"加班"+lea.getDuration()+company+"["+method+"]");
//加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费 //加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费
//工作日 //工作日
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(ycqts), num) >= 0) {
if(ClockInTool.contains(ClockInTool.deleteArrayNull(ycqts),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(ycqts),num)) {
if(lea.getCompensateId() == 1) { if(lea.getOvertimeTypeId() == 1) {
workingturncompenleave++; if(lea.getCompensateId() == 1 || lea.getCompensateId() == 3) {
}else if(lea.getCompensateId() == 2) { workingturncompenleave = workingturncompenleave + lea.getDuration();
workingtransferovertime++; }else if(lea.getCompensateId() == 2 || lea.getCompensateId() == 4) {
workingtransferovertime = workingtransferovertime + + lea.getDuration();
}
} }
} }
//休息日 //休息日
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(xxts), num) >= 0) {
if(ClockInTool.contains(ClockInTool.deleteArrayNull(xxts),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(xxts),num)) {
if(lea.getCompensateId() == 1) { if(lea.getOvertimeTypeId() == 2) {
restturncompenleave++; if(lea.getCompensateId() == 1 || lea.getCompensateId() == 3) {
}else if(lea.getCompensateId() == 2) { restturncompenleave = restturncompenleave + lea.getDuration();
resttransferovertime++; }else if(lea.getCompensateId() == 2 || lea.getCompensateId() == 4) {
resttransferovertime = resttransferovertime + lea.getDuration();
}
} }
} }
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(ycqts), num) < 0 && Arrays.binarySearch(ClockInTool.deleteArrayNull(xxts), num) < 0) {
if(!ClockInTool.contains(ClockInTool.deleteArrayNull(ycqts),num) && !ClockInTool.contains(ClockInTool.deleteArrayNull(xxts),num)) { if(!ClockInTool.contains(ClockInTool.deleteArrayNull(ycqts),num) && !ClockInTool.contains(ClockInTool.deleteArrayNull(xxts),num)) {
if(lea.getCompensateId() == 1) { if(lea.getOvertimeTypeId() == 3) {
holidayturncompenleave++; if(lea.getCompensateId() == 1 || lea.getCompensateId() == 3) {
}else if(lea.getCompensateId() == 2) { // holidayturncompenleave++;
holidaytransferovertime++; holidayturncompenleave = holidayturncompenleave + lea.getDuration();
}else if(lea.getCompensateId() == 2 || lea.getCompensateId() == 4) {
// holidaytransferovertime++;
holidaytransferovertime = holidaytransferovertime + lea.getDuration();
} }
} }
} }
} }
/*
* else{ if(Arrays.binarySearch(ClockInTool.deleteArrayNull(sblacks), num) >= 0)
* { rowData.add("上班缺卡"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(sblacks), num) >= 0 &&
* Arrays.binarySearch(ClockInTool.deleteArrayNull(ztts), num) >= 0) {
* rowData.add("上班缺卡,下班早退"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cdts), num) >= 0) {
* rowData.add("上班迟到"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cdts), num) >= 0 &&
* Arrays.binarySearch(ClockInTool.deleteArrayNull(xblacks), num) >= 0) {
* rowData.add("上班迟到,下班缺卡"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cdts), num) >= 0 &&
* Arrays.binarySearch(ClockInTool.deleteArrayNull(ztts), num) >= 0) {
* rowData.add("上班迟到,下班早退"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(xblacks), num) >= 0) {
* rowData.add("下班缺卡"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(ztts), num) >= 0) {
* rowData.add("下班早退"); }else { rowData.add("正常"); } }
*/
} }
////////
KqglAssoBcsz shif = KqglAssoBcsz.builder().build(); KqglAssoBcsz shif = KqglAssoBcsz.builder().build();
if(attgro.getPbfs() == 1){ if(attgro.getPbfs() == 1){
......
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