钉钉考勤
This commit is contained in:
@@ -177,16 +177,31 @@ public class DingService {
|
|||||||
status = "休息日";
|
status = "休息日";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (Object item : resultList) {
|
int notSignedCount = 0;
|
||||||
|
|
||||||
|
for (int i = 0, resultListSize = resultList.size(); i < resultListSize; i++) {
|
||||||
|
Object item = resultList.get(i);
|
||||||
|
|
||||||
JSONObject jsonObject = (JSONObject) item;
|
JSONObject jsonObject = (JSONObject) item;
|
||||||
String timeResult = jsonObject.getString("time_result");
|
String timeResult = jsonObject.getString("time_result");
|
||||||
String checkType = jsonObject.getString("check_type");
|
String checkType = jsonObject.getString("check_type");
|
||||||
if (!"正常".equals(status)) {
|
|
||||||
|
if ("NotSigned".equals(timeResult)) {
|
||||||
|
notSignedCount++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (notSignedCount >= 2) {
|
||||||
|
status = "旷工";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i > 1 && !"正常".equals(status)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
status = STATUS_MAP.get(timeResult);
|
status = STATUS_MAP.get(timeResult);
|
||||||
if (!"正常".equals(status)) {
|
if (!"正常".equals(status)) {
|
||||||
status = ("OnDuty".equals(checkType) ? "上班" : "下班") + status;
|
status = ("OnDuty".equals(checkType) ? "上班" : "下班") + status;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user