---
# System prepended metadata

title: 房價試算api
tags: [進階房價]

---

# 房價試算api
###### tags:  `進階房價`
* 後端流程
    1. 要將房價的服務項目"外加"的資料 入至 tmp_service_tr 
    2. 將 加人加價入至tmp_service_tr 
    3. 執行兩段store procedure   pg_hd1_cal_appraise2.pp_ren_dt_order_appraise、pg_hd1_cal_appraise2.pp_ren_tr_order_appraise
    4. 回傳前端  tmp_order_appraise的 key_nos、ikey、ikey_seq_nos 
* 前端打api後會取得 key_nos、ikey、ikey_seq_nos，再從tmp_order_appraise抓出資料顯示
## 範例
```jsonld=
{
  "prg_id": "PMS0810230",
  "socket_id": "uAW3dsoeyF-kRoksAAAM",
  "athena_id": 1,
  "ins_usr": "cio",
  "session_id": 3284131,
  "func_id": "1020",
  "params": {},
  "locale": "zh_TW",
  "trans_log_id": "20200213083959413",
  "mac": "",
  "comp_cod": "ZZATHENA",
  "hotel_cod": "01",
  "server_ip": "",
  "reve_code": "PMS0810230",
  "client_ip": "",
  "upd_usr": "cio",
  "user": "cio",
  "table": {
    "tmp_service_tr" :
    [
      {
        "action_cod": "C",
        "athena_id": 1,
        "hotel_cod": "01",
        "rate_cod": "NBA",
        "add_man_qnt" : 1,
        "add_child_qnt" : 1,
        "room_cod" :"DDR",
        "stay_night" : "1",
        "ci_dat" : "2019/11/04",
        "ins_usr": "cio",
        "upd_usr": "cio"
      }
    ]
  },
  "event_time": "2020-02-13T08:39:59+08:00"
}
```