ODBC Driver for Smaregi

Build 23.0.8839

Shippings

出庫情報:出庫

Select

本製品 は Smaregi API を使用して、WHERE 句条件と選択されたカラムを処理します。LIKE(date およびdateTime データ型のカラムの場合)およびIN 演算子は、クライアント側で処理されます。 =、!=、<>、>、<、>=、<=、AND、LIKE、ORDER BY 演算子は、サーバー側で処理されます。 例えば、次のクエリはサーバー側で処理されます。

SELECT * FROM Shippings WHERE Status != 0

SELECT ShippingId, ShippingStoreId, StorageStoreId FROM Shippings WHERE ShippingId <= 4

Insert

Shipping を追加するには、StorageStoreId、ShippingStoreId、Status、ShippingDate、StorageDesiredDate およびDetailAggregate フィールドを指定します。

テンポラリテーブルの使用:

INSERT INTO ShippingDetails#TEMP (productId, requestQuantity) VALUES (8, 3)
INSERT INTO Shippings (StorageStoreId, ShippingStoreId, Status, ShippingDate, StorageDesiredDate, DetailAggregate) VALUES (1, 2, 0, '2019/10/10', '2019/10/10', 'ShippingDetails#TEMP')

集計の使用:

INSERT INTO Shippings (StorageStoreId, ShippingStoreId, Status, Memo, ShippingDate, StorageExpectedDateFrom, StorageDesiredDate, DetailAggregate) VALUES (1, 2, 0, 'Changed', '2019/10/10', '2019/10/10', '2019/10/10', '    {
      "table_name": "ShippingDetail",
      "rows": [
        {
          "productId": "8",
          "productName": "ProdName",
          "quantity": "3",
          "requestQuantity": "1"
        }
      ]
    }')

Upsert

アップサートは、このテーブルではサポートされていません。

Update

スマレジはShippingStoreId、StorageStoreId、StorageExpectedDateFrom、StorageExpectedDateTo、ShippingDate StorageDesiredDate、Memo、Status、ModificationRequestStatus、ModificationRequestDateTime、ModificationRequestCheckedDateTime、IdentificationNo、Token およびDetailAggregate カラムの更新を許容します。

UPDATE Shippings SET Memo = 'UpdatedMemo', status = 1, storageExpectedDateFrom = '2019/02/02', modificationRequestStatus = 1, storageExpectedDateTo = '2019/02/02' WHERE ShippingId = 9

Delete

Shippings は、ShippingId を指定することで削除できます。

DELETE FROM Shippings WHERE ShippingId = 6

Bulk Delete


INSERT INTO Shippings#TEMP (ShippingId) VALUES (3)
INSERT INTO Shippings#TEMP (ShippingId) VALUES (4)
INSERT INTO Shippings#TEMP (ShippingId) VALUES (5)
DELETE FROM Shippings WHERE EXISTS SELECT ShippingId FROM Shippings#TEMP

Columns

Name Type ReadOnly References Description
ShippingId [KEY] Integer False

出庫ID (PK) : 出庫毎に付与するID。【自動更新】自動採番状態が未出庫、未入庫のもののみ削除可。状態が未出庫、未入庫のもの以外を削除しようとした場合エラー。※更新は、未出庫、未入庫、出庫修正依頼ありのもののみ可能。

ShippingStoreId Integer False

出庫店舗ID : 数字9文字以内。登録時必須。存在しない店舗IDを指定するとエラー。変更不可のため、更新時に登録内容と異なる日時が指定するとエラー。

ReceivingStoreId Integer False

ReceivingExpectedDateFrom Date False

ReceivingExpectedDateTo Date False

ShippingDate Date False

出庫日 : 出庫日を設定。(YYYY-MM-DD形式)

ReceivingDesiredDate Date False

Memo String False

入庫/出庫メモ : 1000文字以内。

Status Integer False

状態 : 状況を指定する。0:未出庫、1:未入庫、2:入庫検品中、3:入庫完了登録時は未出庫、未入庫のみ指定可能。更新時は未出庫のものにかぎり、未出庫、未入庫のみ指定可能。上記以外の状況の場合は更新不可。

ApprovalStatus Integer False

ApprovalDateTime Datetime True

ModificationRequestStatus Integer False

ModificationRequestDateTime Datetime False

ModificationRequestCheckedDateTime Datetime False

IdentificationNo String False

識別番号 : 出庫/入庫情報を管理するための任意の文字列を設定出来る項目。

Modified Datetime True

更新日時 : 出庫の更新日時。 (YYYY-MM-DD HH:MM:SS形式)

Token String False

トークン : リクエストを一意に識別するためのトークン文字列を設定。重複するトークン文字列が指定された場合、スルーします。設定例:リクエスト日時(YYYYMMDDHHMMSS)+2桁の連番

DetailAggregate String False

A JSON aggregate of details associated with the shipping.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839