Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel2
outlinefalse
typelist
printablefalse

...

Info

在实现HTTP服务时,每个请求的 HttpHeaders 需要设置为以下格式:

Code Block
headers: new HttpHeaders({
    'Content-Type': 'application/json'
}),
responseType: 'arraybuffer' as 'json' 


获取库存明细

...

POST /smartfin/api/v1/stockmgmt/select

...

JSON主体:

Code Block
{
   "s_date":"2023-01-01",
   "e_date":"2023-12-15",
   "phy_trade_ids":[],
   "stock_lvls": ["EX"], // all the stock lvl in stock details are EX所有库存级别(stock_lvl)在库存明细中均为EX
   "is_ap": false //since stock lvl is EX由于库存级别为EX, this will be false
这个参数就等于false
}

请求架构

...

Code Block
s_date, e_date - string

...

  • wh_id - 与库存关联的仓储ID。

  • wh_add, wh_entity, wh_name - 仓储的相关细节。

更新 / 输入库存明细

...

更新URL:
POST/smartfin/api/v1/stockmgmt/execution_update

输入URL:
POST/smartfin/api/v1/stockmgmt/execution_insert

...

JSON 主体:

Code Block
{
   "phy_trade_ids":[
      60667
   ],
   "insert_list":[
      {
         "stock_id":"",
         "stock_date":"2023-12-01",
         "stock_type":1,
         "phy_trade_id":60667,
         "stock_wh_id":183,
         "stock_action":2,
         "trans_supplier":"",
         "slot_no":"",
         "stock_qty":1000,
         "match_id":"",
         "stock_s_date":"",
         "stock_e_date":"",
         "eta_note":"",
         "cod_date":"",
         "cost_name":"",
         "cost_amt":"",
         "cost_ccy":"",
         "ticket_ref_no":"",
         "remarks":"",
         "bl_no":"",
         "l_port":"",
         "etd":"",
         "d_port":"",
         "d_nor":"",
         "cc_date":"",
         "do_date":"",
         "stock_brand":"",
         "stock_spec":"",
         "cargo_ops_id":39833,
         "delivery_rule":"",
         "link_phy_trade_id":"",
         "stock_contract_qty":1000
      }
   ],
   "s_date":"2023-01-01",
   "e_date":"2023-12-15",
   "phy_products":[
      
   ]
}

Schema请求架构

...

Code Block
s_date, e_date - string

...

Code Block
insert_list - array[object]

Code Block
update_list - array[object]

响应:

删除库存明细

...

DELETE/smartfin/api/v1/stockmgmt/delete

...

  • 将被更新的合同ID(当传递有效合同ID时,将更新合同的库存明细,如出入库数量、未出入库数量等)。

响应: