钉钉考勤

This commit is contained in:
张松
2025-12-04 09:50:30 +08:00
parent 46a9385621
commit d388b75c8a

View File

@@ -177,16 +177,31 @@ public class DingService {
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;
String timeResult = jsonObject.getString("time_result");
String checkType = jsonObject.getString("check_type");
if ("NotSigned".equals(timeResult)) {
notSignedCount++;
}
if (notSignedCount >= 2) {
status = "旷工";
break;
}
if (i > 1 && !"正常".equals(status)) {
break;
}
status = STATUS_MAP.get(timeResult);
if (!"正常".equals(status)) {
status = STATUS_MAP.get(timeResult);
if(!"正常".equals(status)) {
status = ("OnDuty".equals(checkType) ? "上班" : "下班") + status;
break;
}
status = ("OnDuty".equals(checkType) ? "上班" : "下班") + status;
}
}