|
|
|
@ -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<abnormalClockInList.size();i++){
|
|
|
|
|
int time = Integer.valueOf(abnormalClockInList.get(i).get("betweenMinutes").toString());
|
|
|
|
|
String bdlx = Util.null2String(abnormalClockInList.get(i).get("bdlx"));
|
|
|
|
|
if (zysd.contains(Utils.getWorkFor(bdlx)) || zysd.contains(WorkForTimeEnum.ALL_TIME.getKey())){
|
|
|
|
|
if (ccsc >= 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<String,Object> resultMap = Maps.newHashMap();
|
|
|
|
|
resultMap.put("abnormalClockInList",abnormalClockInList);
|
|
|
|
|