From b87e36e250805816f519919b454f6cdf47b9f29a Mon Sep 17 00:00:00 2001 From: liuliang <401809302@qq.com> Date: Mon, 5 May 2025 15:59:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E5=8B=A4-=E5=87=BA=E5=B7=AE=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=EF=BC=8C=E6=98=8E=E7=BB=86=E6=95=B0=E6=8D=AE=E7=94=9F?= =?UTF-8?q?=E6=88=90=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/AskForLeaveServiceImpl.java | 51 ++++++++++++------- .../service/impl/EvectionServiceImpl.java | 51 ++++++++++++------- 2 files changed, 68 insertions(+), 34 deletions(-) diff --git a/src/com/engine/jucailinkq/attendance/attendanceanalysis/service/impl/AskForLeaveServiceImpl.java b/src/com/engine/jucailinkq/attendance/attendanceanalysis/service/impl/AskForLeaveServiceImpl.java index 0869ffb..66228d6 100644 --- a/src/com/engine/jucailinkq/attendance/attendanceanalysis/service/impl/AskForLeaveServiceImpl.java +++ b/src/com/engine/jucailinkq/attendance/attendanceanalysis/service/impl/AskForLeaveServiceImpl.java @@ -250,27 +250,44 @@ public class AskForLeaveServiceImpl extends Service implements AskForLeaveServic //作用时段 String zysd = Util.null2String(param.get("zysd")); - if (CheckBoxEnum.CHECKED.getKey().equals(tybcndbjlhbjs)){ - for (int i=abnormalClockInList.size() -1;i>=0;i--){ - int time = Integer.valueOf(abnormalClockInList.get(i).get("betweenMinutes").toString()); - String bdlx = Util.null2String(abnormalClockInList.get(i).get("bdlx")); - if (qjsc >= time && (zysd.contains(Utils.getWorkFor(bdlx)) || zysd.contains(WorkForTimeEnum.ALL_TIME.getKey()))){ - qjsc = qjsc-time; - offsetAskForLeaveAnomaly.add(abnormalClockInList.get(i)); - } - } - abnormalClockInList.removeAll(offsetAskForLeaveAnomaly); - }else{ - for (int i=abnormalClockInList.size() -1;i>=0;i--){ - int time = Integer.valueOf(abnormalClockInList.get(i).get("betweenMinutes").toString()); - String bdlx = Util.null2String(abnormalClockInList.get(i).get("bdlx")); - if (qjsc >= time && (zysd.contains(Utils.getWorkFor(bdlx)) || zysd.contains(WorkForTimeEnum.ALL_TIME.getKey()))){ + for (int i=0;i= time){ + offsetAskForLeaveAnomaly.add(abnormalClockInList.get(i)); - abnormalClockInList.remove(i); - break; + qjsc = qjsc-time; + }else { + qjsc = 0; + time = time-qjsc; + abnormalClockInList.get(i).put("betweenMinutes",time); } } } + abnormalClockInList.removeAll(offsetAskForLeaveAnomaly); + +// if (CheckBoxEnum.CHECKED.getKey().equals(tybcndbjlhbjs)){ +// for (int i=abnormalClockInList.size() -1;i>=0;i--){ +// int time = Integer.valueOf(abnormalClockInList.get(i).get("betweenMinutes").toString()); +// String bdlx = Util.null2String(abnormalClockInList.get(i).get("bdlx")); +// if (qjsc >= time && (zysd.contains(Utils.getWorkFor(bdlx)) || zysd.contains(WorkForTimeEnum.ALL_TIME.getKey()))){ +// qjsc = qjsc-time; +// offsetAskForLeaveAnomaly.add(abnormalClockInList.get(i)); +// } +// } +// abnormalClockInList.removeAll(offsetAskForLeaveAnomaly); +// }else{ +// for (int i=abnormalClockInList.size() -1;i>=0;i--){ +// int time = Integer.valueOf(abnormalClockInList.get(i).get("betweenMinutes").toString()); +// String bdlx = Util.null2String(abnormalClockInList.get(i).get("bdlx")); +// if (qjsc >= time && (zysd.contains(Utils.getWorkFor(bdlx)) || zysd.contains(WorkForTimeEnum.ALL_TIME.getKey()))){ +// offsetAskForLeaveAnomaly.add(abnormalClockInList.get(i)); +// abnormalClockInList.remove(i); +// break; +// } +// } +// } abnormalClockInList.addAll(forgetClockList); Map map = Maps.newHashMap(); map.put("abnormalClockInList",abnormalClockInList); diff --git a/src/com/engine/jucailinkq/attendance/attendanceanalysis/service/impl/EvectionServiceImpl.java b/src/com/engine/jucailinkq/attendance/attendanceanalysis/service/impl/EvectionServiceImpl.java index dbc1c92..bc47d41 100644 --- a/src/com/engine/jucailinkq/attendance/attendanceanalysis/service/impl/EvectionServiceImpl.java +++ b/src/com/engine/jucailinkq/attendance/attendanceanalysis/service/impl/EvectionServiceImpl.java @@ -80,27 +80,44 @@ public class EvectionServiceImpl extends Service implements EvectionService { String zysd = Util.null2String(param.get("zysd")); String tybcndbjlhbjs = Util.null2String(param.get("tybcndbjlhbjs")); - if (CheckBoxEnum.CHECKED.getKey().equals(tybcndbjlhbjs)){ - for (int i=abnormalClockInList.size() -1;i>=0;i--){ - int time = Integer.valueOf(abnormalClockInList.get(i).get("betweenMinutes").toString()); - String bdlx = Util.null2String(abnormalClockInList.get(i).get("bdlx")); - if (ccsc > time && (zysd.contains(Utils.getWorkFor(bdlx)) || zysd.contains(WorkForTimeEnum.ALL_TIME.getKey()))){ - ccsc = ccsc-time; - offsetEvectionAnomaly.add(abnormalClockInList.get(i)); - } - } - abnormalClockInList.removeAll(offsetEvectionAnomaly); - }else{ - for (int i=abnormalClockInList.size() -1;i>=0;i--){ - int time = Integer.valueOf(abnormalClockInList.get(i).get("betweenMinutes").toString()); - String bdlx = Util.null2String(abnormalClockInList.get(i).get("bdlx")); - if (ccsc > time && (zysd.contains(Utils.getWorkFor(bdlx)) || zysd.contains(WorkForTimeEnum.ALL_TIME.getKey()))){ + + for (int i=0;i= time){ offsetEvectionAnomaly.add(abnormalClockInList.get(i)); - abnormalClockInList.remove(i); - break; + ccsc = ccsc-time; + }else { + ccsc = 0; + time = time-ccsc; + abnormalClockInList.get(i).put("betweenMinutes",time); } } } + abnormalClockInList.removeAll(offsetEvectionAnomaly); + +// if (CheckBoxEnum.CHECKED.getKey().equals(tybcndbjlhbjs)){ +// for (int i=abnormalClockInList.size() -1;i>=0;i--){ +// int time = Integer.valueOf(abnormalClockInList.get(i).get("betweenMinutes").toString()); +// String bdlx = Util.null2String(abnormalClockInList.get(i).get("bdlx")); +// if (ccsc > time && (zysd.contains(Utils.getWorkFor(bdlx)) || zysd.contains(WorkForTimeEnum.ALL_TIME.getKey()))){ +// ccsc = ccsc-time; +// offsetEvectionAnomaly.add(abnormalClockInList.get(i)); +// } +// } +// abnormalClockInList.removeAll(offsetEvectionAnomaly); +// }else{ +// for (int i=abnormalClockInList.size() -1;i>=0;i--){ +// int time = Integer.valueOf(abnormalClockInList.get(i).get("betweenMinutes").toString()); +// String bdlx = Util.null2String(abnormalClockInList.get(i).get("bdlx")); +// if (ccsc > time && (zysd.contains(Utils.getWorkFor(bdlx)) || zysd.contains(WorkForTimeEnum.ALL_TIME.getKey()))){ +// offsetEvectionAnomaly.add(abnormalClockInList.get(i)); +// abnormalClockInList.remove(i); +// break; +// } +// } +// } abnormalClockInList.addAll(forgetClockList); Map resultMap = Maps.newHashMap(); resultMap.put("abnormalClockInList",abnormalClockInList);