feat: 实现TCP Server

This commit is contained in:
zimoyin
2026-03-02 21:59:43 +08:00
parent 043306819b
commit a79dfae57d
144 changed files with 15785 additions and 140 deletions
+38
View File
@@ -0,0 +1,38 @@
<?php
namespace app\repository;
use app\model\EctMetaEndoscope;
/**
* 内镜数据仓库
* 封装 ect_meta_endoscope 表的查询操作
*/
class EndoscopeRepository extends BaseRepository
{
public function __construct()
{
$this->model = new EctMetaEndoscope();
}
public static function new(): static
{
return new self();
}
/**
* 通过 RFID 卡号查询内镜信息
* 同时匹配主卡号(endoscope_rfid)和备用卡号(rfid3
*
* @param string $cardNo RFID 卡号(大写)
* @return EctMetaEndoscope|null
*/
public function findByCardNo(string $cardNo): ?EctMetaEndoscope
{
$cardNo = strtoupper($cardNo);
/** @var EctMetaEndoscope|null */
return EctMetaEndoscope::where('endoscope_rfid', $cardNo)
->orWhere('rfid3', $cardNo)
->first();
}
}