Commit 429d0c76 by lal

提交BUG

parent 5cbf737c
......@@ -55,10 +55,10 @@ public class KqglAssoRelationSummary extends Model<KqglAssoRelationSummary> {
@ApiModelProperty(value = "假期类型id", example = "101")
private Integer leaveTypeId;
@ApiModelProperty(value = "加班类型id", example = "101")
@ApiModelProperty(value = "加班类型id 1:工作日加班;2:休息日加班;3:节假日加班", example = "101")
private Integer overtimeTypeId;
@ApiModelProperty(value = "加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费", example = "101")
@ApiModelProperty(value = "加班补偿方式 1:转调休;2:转加班费;(3:转调休 4:加班费)", example = "101")
private Integer compensateId;
@ApiModelProperty(value = "开始时间 ", example = "开始时间")
......
......@@ -107,8 +107,9 @@ public class AttendanceTaskTiming{
//3.添加定时任务 每四小时执行一次
// @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 0 19 * * ?")
public void AttendanceTask() throws ParseException {
// boolean implement = false;
......@@ -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)) {
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 = "未知";//请假类型
......@@ -516,25 +539,20 @@ public class AttendanceTaskTiming{
}
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)) {
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()+"天");
}
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(goouts), num) >= 0){//外出
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));
rowData.add(lea.getStartTime() +"到"+ lea.getEndTime()+"外出"+lea.getDuration()+"天");
}
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cards), num) >= 0){//补卡
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));
rowData.add("已补卡:"+lea.getStartTime());
}
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(overtimes), num) >= 0) {//加班
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 = "无";//加班单位、加班补偿方式
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{
rowData.add(lea.getStartTime() +"到"+ lea.getEndTime()+"加班"+lea.getDuration()+company+"["+method+"]");
//加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费
//工作日
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(ycqts), num) >= 0) {
if(ClockInTool.contains(ClockInTool.deleteArrayNull(ycqts),num)) {
if(lea.getCompensateId() == 1) {
workingturncompenleave++;
}else if(lea.getCompensateId() == 2) {
workingtransferovertime++;
if(lea.getOvertimeTypeId() == 1) {
if(lea.getCompensateId() == 1 || lea.getCompensateId() == 3) {
workingturncompenleave = workingturncompenleave + lea.getDuration();
}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(lea.getCompensateId() == 1) {
restturncompenleave++;
}else if(lea.getCompensateId() == 2) {
resttransferovertime++;
if(lea.getOvertimeTypeId() == 2) {
if(lea.getCompensateId() == 1 || lea.getCompensateId() == 3) {
restturncompenleave = restturncompenleave + lea.getDuration();
}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(lea.getCompensateId() == 1) {
holidayturncompenleave++;
}else if(lea.getCompensateId() == 2) {
holidaytransferovertime++;
if(lea.getOvertimeTypeId() == 3) {
if(lea.getCompensateId() == 1 || lea.getCompensateId() == 3) {
// holidayturncompenleave++;
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();
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