---
# System prepended metadata

title: 鎖控 刪除 api
tags: [鎖控]

---

# 鎖控 刪除 api
###### tags:  `鎖控`
刪除已設定好的鎖控，(刪除table block_mn、blockinv_mn、block_tr、rminv_tr 相關資料)
* 後端
1.檢查鎖控的庫存檔不可有小於滾房租日期的資料
2.檢查沒有任一訂房數及未用釋出的blockinv_mn資料才可刪除
* 前端
1.lock 資料
2.檢查鎖控的庫存檔不可有小於滾房租日期的資料
3.檢查沒有任一訂房數及未用釋出的blockinv_mn資料才可刪除
4.檢查沒過不能刪，且解lock
5.檢查通過詢問是否刪除
6.打鎖控 刪除 api
7.不論api成功或失敗，解lock
```json=
{
        "prg_id" : "PMS0120010",
        "socket_id" : "p6m5HF8u85NACf-0AAAO",
        "athena_id" : 25,
        "ins_usr" : "cio",
        "session_id" : 36729501,
        "func_id" : "0300",
        "params" : {},
        "locale" : "zh_TW",
        "trans_log_id" : "20200227185833585",
        "mac" : "",
        "comp_cod" : "ZZATHENA",
        "hotel_cod" : "01",
        "server_ip" : "",
        "reve_code" : "PMS0120010",
        "client_ip" : "",
        "upd_usr" : "cio",
        "user" : "cio",
        "table" : {
            "block_mn" : [ 
                {
                    "action_cod" : "D",
                    "condition" : [ 
                        {
                            "field" : "athena_id",
                            "value" : "1",
                            "operator" : "equal"
                        }, 
                        {
                            "field" : "hotel_cod",
                            "value" : "01",
                            "operator" : "equal"
                        }, 
                        {
                            "field" : "block_cod",
                            "value" : "SSS",
                            "operator" : "equal"
                        }
                    ]
                }
            ]
        },
        "event_time" : "2020-02-27T18:58:31+08:00"
}
```