fixing idxdept
This commit is contained in:
@ -82,8 +82,8 @@ class LogController
|
|||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$ip = "192.168.100.76"; //$row['deviceip'];
|
$ip = "172.16.116.5"; //$row['deviceip'];
|
||||||
$qry="select * from tbl_deviceinfo where _idx=36 and isdeleted=0 order by _idx asc";
|
$qry="select * from tbl_deviceinfo where isreprocess=1 and isdeleted=0 order by _idx asc";
|
||||||
#echo $qry;
|
#echo $qry;
|
||||||
$rs=$this->selectquerySP($qry);
|
$rs=$this->selectquerySP($qry);
|
||||||
if($rs){
|
if($rs){
|
||||||
@ -107,7 +107,7 @@ class LogController
|
|||||||
$data = [];
|
$data = [];
|
||||||
foreach ($getData as $att) {
|
foreach ($getData as $att) {
|
||||||
// echo date("Y-m-d", strtotime($att['timestamp']));
|
// 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[] = [
|
// $data[] = [
|
||||||
// "idUser" => $att['id'],
|
// "idUser" => $att['id'],
|
||||||
// "name" => isset($users[$att['id']]) ? $users[$att['id']]['name'] : $att['id'],
|
// "name" => isset($users[$att['id']]) ? $users[$att['id']]['name'] : $att['id'],
|
||||||
@ -117,12 +117,12 @@ 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'],
|
||||||
"time" => date("Y-m-d H:i:s", strtotime($att['timestamp'])),
|
"time" => date("Y-m-d H:i:s", strtotime($att['timestamp'])),
|
||||||
"status" => $res
|
"status" => $reslog
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -719,10 +719,22 @@ class LogController
|
|||||||
$rtn=true;
|
$rtn=true;
|
||||||
return $rtn;
|
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();
|
$cl = new LogController();
|
||||||
$rtn =$cl->index();
|
$rtn =$cl->index();
|
||||||
|
$rtn =$cl->fn_idxdept();
|
||||||
|
|
||||||
#if(isset($_REQUEST['isgetdata'])){
|
#if(isset($_REQUEST['isgetdata'])){
|
||||||
# echo "indx";
|
# echo "indx";
|
||||||
|
|||||||
Reference in New Issue
Block a user