Merge branch 'develop' of http://114.203.209.83:3000/SamProject/sam-api into develop

This commit is contained in:
2026-03-17 12:47:50 +09:00
10 changed files with 307 additions and 121 deletions

View File

@@ -30,10 +30,10 @@ public function index(Request $request)
/**
* 통계 조회
*/
public function stats()
public function stats(Request $request)
{
return ApiResponse::handle(function () {
return $this->service->stats();
return ApiResponse::handle(function () use ($request) {
return $this->service->stats($request->input('order_type'));
}, __('message.order.fetched'));
}

View File

@@ -18,7 +18,7 @@ public function rules(): array
return [
// 기본 정보
'quote_id' => 'nullable|integer|exists:quotes,id',
'order_type_code' => ['nullable', Rule::in([Order::TYPE_ORDER, Order::TYPE_PURCHASE])],
'order_type_code' => ['nullable', Rule::in([Order::TYPE_ORDER, Order::TYPE_PURCHASE, Order::TYPE_STOCK])],
'status_code' => ['nullable', Rule::in([
Order::STATUS_DRAFT,
Order::STATUS_CONFIRMED,
@@ -55,6 +55,8 @@ public function rules(): array
'options.shipping_address' => 'nullable|string|max:500',
'options.shipping_address_detail' => 'nullable|string|max:500',
'options.manager_name' => 'nullable|string|max:100',
'options.production_reason' => 'nullable|string|max:500',
'options.target_stock_qty' => 'nullable|numeric|min:0',
// 품목 배열
'items' => 'nullable|array',

View File

@@ -17,7 +17,7 @@ public function rules(): array
{
return [
// 기본 정보 (order_no는 수정 불가)
'order_type_code' => ['nullable', Rule::in([Order::TYPE_ORDER, Order::TYPE_PURCHASE])],
'order_type_code' => ['nullable', Rule::in([Order::TYPE_ORDER, Order::TYPE_PURCHASE, Order::TYPE_STOCK])],
'category_code' => 'nullable|string|max:50',
// 거래처 정보
@@ -49,6 +49,8 @@ public function rules(): array
'options.shipping_address' => 'nullable|string|max:500',
'options.shipping_address_detail' => 'nullable|string|max:500',
'options.manager_name' => 'nullable|string|max:100',
'options.production_reason' => 'nullable|string|max:500',
'options.target_stock_qty' => 'nullable|numeric|min:0',
// 품목 배열 (전체 교체)
'items' => 'nullable|array',