Commit 91dedef5 authored by 冯超鹏's avatar 冯超鹏

tcp 返回信息模块

parent 745e0445
Pipeline #210 failed with stages
......@@ -36,7 +36,7 @@ class ZehongTcpController extends Controller
if($this->getPrc($isdata) == $devicecrc){
$data = ['id'=>$deviceId,'status'=>$status,'np'=>$devicenp,'famen'=>$devicefamen,'chongqi'=>$devicechongqi,'zijian'=>$devicezijian];
$totcp = json_decode($this->mysqldb($data),true);
if ($totcp == "暂无设备"){
if ($totcp == "No equipment"){
return $totcp;
}
$totcpdata = $totcp['devicenum'] . $totcp['device_control'] . $devicechongqi . $devicezijian;
......@@ -44,7 +44,7 @@ class ZehongTcpController extends Controller
return $totcpdata .$crcdata ;
}
} else {
return "数据格式错误";
return "Data format error";
}
}
......@@ -94,7 +94,7 @@ class ZehongTcpController extends Controller
if ($todata){
return json_encode($todata);
}else{
return json_encode("暂无设备");
return json_encode("No equipment");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment