mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-04 08:17:04 +00:00
同上
This commit is contained in:
parent
6532382f43
commit
6f4945ac05
@ -879,12 +879,10 @@ class SystemController extends AbstractController
|
||||
$lastRecord = $records->whereBetween("created_at", $lastBetween)->last();
|
||||
$firstTimestamp = $firstRecord ? Carbon::parse($firstRecord->created_at)->timestamp : 0;
|
||||
$lastTimestamp = $lastRecord ? Carbon::parse($lastRecord->created_at)->timestamp : 0;
|
||||
if (Base::time() < $startT) {
|
||||
if (Base::time() < $startT + $secondStart) {
|
||||
$firstResult = "-";
|
||||
$lastResult = "-";
|
||||
} else {
|
||||
$firstResult = "正常";
|
||||
$lastResult = "正常";
|
||||
if (empty($firstTimestamp)) {
|
||||
$firstResult = "缺卡";
|
||||
$styles["E{$index}"] = ["font" => ["color" => ["rgb" => "ff0000"]]];
|
||||
@ -892,11 +890,14 @@ class SystemController extends AbstractController
|
||||
$firstResult = "迟到";
|
||||
$styles["E{$index}"] = ["font" => ["color" => ["rgb" => "436FF6"]]];
|
||||
}
|
||||
if (empty($lastTimestamp)) {
|
||||
}
|
||||
if (Base::time() < $startT + $secondEnd) {
|
||||
$lastResult = "-";
|
||||
} else {
|
||||
$lastResult = "正常";
|
||||
if (empty($lastTimestamp) || $lastTimestamp === $firstTimestamp) {
|
||||
$lastResult = "缺卡";
|
||||
$styles["G{$index}"] = ["font" => ["color" => ["rgb" => "ff0000"]]];
|
||||
} elseif ($lastTimestamp === $firstTimestamp) {
|
||||
$lastResult = "-";
|
||||
} elseif ($lastTimestamp < $startT + $secondEnd) {
|
||||
$lastResult = "早退";
|
||||
$styles["G{$index}"] = ["font" => ["color" => ["rgb" => "436FF6"]]];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user