Refactor attendance logging: comment out attendance function calls and add timestamps for debugging

This commit is contained in:
2025-06-25 20:47:06 +07:00
parent 8955aa5701
commit b6cdc09849
3 changed files with 9 additions and 5 deletions

View File

@ -98,7 +98,7 @@ class LogController
// "deviceIP" => $ip // "deviceIP" => $ip
// ]; // ];
// echo json_encode($att)."\n"; // echo json_encode($att)."\n";
$res=$this->fn_setattendance($att, $ip); // $res=$this->fn_setattendance($att, $ip);
$reslog=$this->fn_setattendancelogs($att, $ip); $reslog=$this->fn_setattendancelogs($att, $ip);
$data[] = [ $data[] = [
"fingerid" => $att['id'], "fingerid" => $att['id'],

View File

@ -84,9 +84,11 @@ class LogController
if($rs){ if($rs){
$d=array(); $d=array();
while($rw=$rs->fetch()){ while($rw=$rs->fetch()){
echo "start time : ".date("Y-m-d H:i:s")."\n";
$d['timestamp']=date("Y-m-d H:i:s", strtotime($rw['dates'].' '.$rw['times'])); $d['timestamp']=date("Y-m-d H:i:s", strtotime($rw['dates'].' '.$rw['times']));
$d['id']=$rw['fingerid']; $d['id']=$rw['fingerid'];
$res=$this->fn_setattendance($d, $rw['deviceip']); $res=$this->fn_setattendance($d, $rw['deviceip']);
echo "End time : ".date("Y-m-d H:i:s")."\n\n";
} }
} }
@ -533,7 +535,7 @@ class LogController
$qryduration=""; $qryduration="";
$rs=$this->selectquerySP($qry); $rs=$this->selectquerySP($qry);
if($rs){ if($rs){
echo "start time : ".date("Y-m-d H:i:s")."\n";
while($rw=$rs->fetch()){ while($rw=$rs->fetch()){
$swhereshiftcode=""; $swhereshiftcode="";
if($rw['shiftcode']&&$rw['idxdept']==22){ if($rw['shiftcode']&&$rw['idxdept']==22){

View File

@ -84,9 +84,11 @@ class LogController
if($rs){ if($rs){
$d=array(); $d=array();
while($rw=$rs->fetch()){ while($rw=$rs->fetch()){
echo "start time : ".date("Y-m-d H:i:s")."\n";
$d['timestamp']=date("Y-m-d H:i:s", strtotime($rw['dates'].' '.$rw['times'])); $d['timestamp']=date("Y-m-d H:i:s", strtotime($rw['dates'].' '.$rw['times']));
$d['id']=$rw['fingerid']; $d['id']=$rw['fingerid'];
$res=$this->fn_setattendance($d, $rw['deviceip']); $res=$this->fn_setattendance($d, $rw['deviceip']);
echo "End time : ".date("Y-m-d H:i:s")."\n\n";
} }
} }
@ -533,7 +535,7 @@ class LogController
$qryduration=""; $qryduration="";
$rs=$this->selectquerySP($qry); $rs=$this->selectquerySP($qry);
if($rs){ if($rs){
echo "start time : ".date("Y-m-d H:i:s")."\n"; // echo "start time : ".date("Y-m-d H:i:s")."\n";
while($rw=$rs->fetch()){ while($rw=$rs->fetch()){
$swhereshiftcode=""; $swhereshiftcode="";
if($rw['shiftcode']&&$rw['idxdept']==22){ if($rw['shiftcode']&&$rw['idxdept']==22){
@ -697,7 +699,7 @@ class LogController
} }
} }
echo "end time : ".date("Y-m-d H:i:s")."\n"; // echo "end time : ".date("Y-m-d H:i:s")."\n";
} }
$rtn=true; $rtn=true;
return $rtn; return $rtn;