diff --git a/getdatadevicesbyip.php b/getdatadevicesbyip.php index ae56905..e5e85d3 100755 --- a/getdatadevicesbyip.php +++ b/getdatadevicesbyip.php @@ -82,8 +82,8 @@ class LogController public function index() { - $ip = "192.168.100.76"; //$row['deviceip']; - $qry="select * from tbl_deviceinfo where _idx=36 and isdeleted=0 order by _idx asc"; + $ip = "172.16.116.5"; //$row['deviceip']; + $qry="select * from tbl_deviceinfo where isreprocess=1 and isdeleted=0 order by _idx asc"; #echo $qry; $rs=$this->selectquerySP($qry); if($rs){ @@ -107,7 +107,7 @@ class LogController $data = []; foreach ($getData as $att) { // echo date("Y-m-d", strtotime($att['timestamp'])); - if (date("Y-m-d", strtotime($att['timestamp'])) == date("Y-m-d")) { + if (date("Y-m-d", strtotime($att['timestamp'])) == date("Y-m-d",strtotime($rw['reprocessdate']))) { // $data[] = [ // "idUser" => $att['id'], // "name" => isset($users[$att['id']]) ? $users[$att['id']]['name'] : $att['id'], @@ -117,12 +117,12 @@ class LogController // "deviceIP" => $ip // ]; // echo json_encode($att)."\n"; - $res=$this->fn_setattendance($att, $ip); + // $res=$this->fn_setattendance($att, $ip); $reslog=$this->fn_setattendancelogs($att, $ip); $data[] = [ "fingerid" => $att['id'], "time" => date("Y-m-d H:i:s", strtotime($att['timestamp'])), - "status" => $res + "status" => $reslog ]; } } diff --git a/getdatadevicesbylogs.php b/getdatadevicesbylogs.php index 5acd2ea..730631e 100755 --- a/getdatadevicesbylogs.php +++ b/getdatadevicesbylogs.php @@ -719,10 +719,22 @@ class LogController $rtn=true; return $rtn; } + + public function fn_idxdept(){ + + $qry="update tbl_attendanceemployee a, tbl_employee e set a.idxdept = e.idxdept + where e._idx=a.idxemployee and a.idxdept=0"; + $this->executeSP($qry); + $qry="update tbl_attendancelist a, tbl_employee e set a.idxdept = e.idxdept + where e._idx=a.idxemployee and a.idxdept=0"; + $this->executeSP($qry); + return true; + } } $cl = new LogController(); $rtn =$cl->index(); +$rtn =$cl->fn_idxdept(); #if(isset($_REQUEST['isgetdata'])){ # echo "indx";