获取患者进行中的检测订单
This commit is contained in:
@@ -76,13 +76,29 @@ class DetectionController extends AbstractController
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function getDetectionDoctorOrderFirst(): ResponseInterface
|
||||
public function getDetectionOrderFirst(): ResponseInterface
|
||||
{
|
||||
$request = $this->container->get(DetectionRequest::class);
|
||||
$request->scene('getDetectionDoctorOrderFirst')->validateResolved();
|
||||
$request->scene('getDetectionOrderFirst')->validateResolved();
|
||||
|
||||
$detectionService = new DetectionService();
|
||||
$data = $detectionService->getDetectionDoctorOrderFirst();
|
||||
$data = $detectionService->getDetectionOrderFirst();
|
||||
return $this->response->json($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定检测管
|
||||
* @return ResponseInterface
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function bindDetectionTube(): ResponseInterface
|
||||
{
|
||||
$request = $this->container->get(DetectionRequest::class);
|
||||
$request->scene('bindDetectionTube')->validateResolved();
|
||||
|
||||
$detectionService = new DetectionService();
|
||||
$data = $detectionService->bindDetectionTube();
|
||||
return $this->response->json($data);
|
||||
}
|
||||
}
|
||||
@@ -396,4 +396,32 @@ class TestController extends AbstractController
|
||||
$result = $Wechat->getUrlLink($options);
|
||||
dump($result);
|
||||
}
|
||||
|
||||
// 设置坐班医生
|
||||
public function setDoctor(){
|
||||
$timestamp = time(); // 当前时间戳
|
||||
$weekNumber = date('W', $timestamp); // 获取当前年份的周数
|
||||
|
||||
// 计算本周一的时间戳
|
||||
$weekStartTimestamp = strtotime("Monday this week", $timestamp);
|
||||
|
||||
// 计算本周一所在周的奇数或偶数周
|
||||
if ($weekNumber % 2 === 1) {
|
||||
$startOfWeek = $weekStartTimestamp; // 奇数周的本周一
|
||||
$endOfWeek = strtotime('+6 days', $startOfWeek); // 奇数周的本周日
|
||||
} else {
|
||||
$endOfWeek = $weekStartTimestamp; // 偶数周的本周一
|
||||
$startOfWeek = strtotime('-6 days', $endOfWeek); // 偶数周的本周日
|
||||
}
|
||||
|
||||
// 获取每日日期
|
||||
$dates = [];
|
||||
for ($i = 0; $i < 7; $i++) {
|
||||
$dates[] = date('Y-m-d', strtotime("+$i days", $startOfWeek));
|
||||
}
|
||||
|
||||
echo "Start of the week: " . date('Y-m-d', $startOfWeek) . "\n";
|
||||
echo "End of the week: " . date('Y-m-d', $endOfWeek) . "\n";
|
||||
echo "Dates of the week: " . implode(', ', $dates);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user