52 lines
1.2 KiB
PHP
52 lines
1.2 KiB
PHP
<?php
|
|
/**
|
|
* Author: ykxiao
|
|
* Date: 2025/6/5
|
|
* Time: 下午5:35
|
|
* Description:
|
|
*
|
|
* (c) ykxiao <yk_9001@hotmail.com>
|
|
*
|
|
* This source file is subject to the MIT license that is bundled
|
|
* with this source code in the file LICENSE.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Controller;
|
|
|
|
use App\Repository\Purchase\PurchaseRepository;
|
|
use App\Request\PurchaseRequest;
|
|
use Hyperf\Di\Annotation\Inject;
|
|
use Hyperf\HttpMessage\Server\Response;
|
|
use Hyperf\Validation\Annotation\Scene;
|
|
|
|
/**
|
|
* Author: ykxiao
|
|
* Date: 2025/6/5
|
|
* Time: 下午5:42
|
|
* Description: 采购单入库管理.
|
|
*
|
|
* (c) ykxiao <yk_9001@hotmail.com>
|
|
*
|
|
* This source file is subject to the MIT license that is bundled
|
|
* with this source code in the file LICENSE.
|
|
*/
|
|
class PurchaseController extends AbstractController
|
|
{
|
|
#[Inject]
|
|
protected PurchaseRepository $purchaseRepository;
|
|
|
|
/**
|
|
* 新增采购单入库单
|
|
* @param PurchaseRequest $request
|
|
* @return Response
|
|
*/
|
|
#[Scene(scene: 'addPurchase', argument: '')]
|
|
public function addPurchase(PurchaseRequest $request): Response
|
|
{
|
|
$this->purchaseRepository->addPurchase($request->all());
|
|
|
|
return $this->apiResponse->success();
|
|
}
|
|
} |