|
@@ -188,6 +188,24 @@ class Api extends CatchController
|
|
|
$received_state=$redis->hget('api_receiver_asset_state', 'accessClassReport');
|
|
|
$mac=$list['mac'];
|
|
|
foreach($list['data'] as $val){
|
|
|
+ if ($received_state == '1') {
|
|
|
+ # code...
|
|
|
+ $antData = json_decode( $redis->hGet('lab_ant_tmp',$val['label']) );
|
|
|
+ if (!$antData) {
|
|
|
+ # code...
|
|
|
+ $antData = [
|
|
|
+ $val['ant'] => 1
|
|
|
+ ];
|
|
|
+ }elseif(!$antData[$val['ant']]){
|
|
|
+ $antData[$val['ant']] = 1;
|
|
|
+ }else {
|
|
|
+ # code...
|
|
|
+ $antData[$val['ant']] += 1;
|
|
|
+ }
|
|
|
+ $redis->hset('lab_ant_tmp',$val['label'], json_encode($antData) );
|
|
|
+ }else{
|
|
|
+ $redis->del('lab_ant_tmp');
|
|
|
+ }
|
|
|
//1 3外 2 4内
|
|
|
if($val['ant']=='3'){
|
|
|
$val['ant']='1';
|