考勤-出差流程,明细数据生成接口

main
liuliang 4 weeks ago
parent 0244020c5f
commit b87e36e250

@ -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<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 (qjsc >= 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<String,Object> map = Maps.newHashMap();
map.put("abnormalClockInList",abnormalClockInList);

@ -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);

Loading…
Cancel
Save