庫存盤點明細區間查詢 /DayM/DetailQueryBetween

Request 請求內容

根節點
參數 名稱 型態 必要性 說明
QueryType 查詢類別 INT O 0:查詢全部 1:查詢盤盈 2:查詢盤虧 預設為0
DCODE_S 盤點單號-起始 S(11) M
DCODE_E 盤點單號-結束 S(11) M
DDATE_S 盤點日期-起始 S(20) M 可輸入民國年或是西元年
DDATE_E 盤點日期-結束 S(11) M 可輸入民國年或是西元年

回傳參數說明


主檔

參數 名稱 型態 說明
DCODE 盤點單號 S(11) TMS內紀錄的盤點單號
DDATE 盤點日期 S(10) TMS內紀錄的盤點日期
DTYPE 盤盈虧類別 INT 1:盤盈 2:盤虧
DTNAM 盤盈虧名稱 S(4) 1:盤盈 2:盤虧
DTOTA 成本總價 Decimal TMS內紀錄的成本總價
DSOUR 傳票編號 S(11) TMS內紀錄的傳票編號
DNAME 製單人 S(8) TMS內紀錄的製單人
DDENO 部門代號 S(6) TMS內紀錄的部門代號
DDENA 部門名稱 S(24) TMS內紀錄的部門名稱
DBACK 備註 S(50) TMS內紀錄的備註
DTIME 異動時間 DATETIME TMS內紀錄的異動時間
DCOD1 借貨單號 S(11) TMS內紀錄的借貨單號

明細

參數 名稱 型態 說明
PSEQ 盤點序號 INT TMS內紀錄的庫存盤點序號
PICOD 產品代號 S(17) TMS內紀錄的產品代號
PINAM 產品名稱 S(40) TMS內紀錄的產品名稱
PSCOD 倉庫代號 S(4) TMS內紀錄的倉庫代號
PSNAM 倉庫名稱 S(12) TMS內紀錄的倉庫名稱
PNUMB 盤點數量 DECIMAL TMS內紀錄的盤點數量
PSOUR 成本 DECIMAL TMS內紀錄的成本
PLTOT 剩餘數量 DECIMAL TMS內紀錄的剩餘數量
PCOD1SEQ 批號 S(20) TMS內紀錄的批號
ATTR1 規格1 S(40) TMS內紀錄的規格1
ATTR2 規格2 S(40) TMS內紀錄的規格2
Request範例
            
                //請求Header內容
                api-pno:TMSDEMOWEB
                api-timestamp:1717770166
                api-ClientSign:2F6EF0202E42DD0A4F19DC6D547782B7D6397632B4D03C48A2090F53FEDD03786A5FDEF5145D7F739FBED1719AD90E9DF75180826134B0AAFB2DE99DA1B5E456

                //請求Body內容
                {
                "QueryType":0,
                "DDATE_S" : "2024/06/01",
                "DDATE_E" : "2024/06/30",
                "DCODE_S" : "",
                "DCODE_E" : ""
                }
            
        

Response 回覆結果

Response範例
        
        成功
        {
            "Status":"S",
            "ErrorCode":"0000",
            "ErrorMessage":"",
            "Details":[
            {
            "DCODE":"11306010001",
            "DDATE":"113.06.01",
            "DTYPE":1,
            "DTNAM":"盤盈",
            "DTOTA":421.9891,
            "DSOUR":"11306010001",
            "DNAME":"RU",
            "DDENO":"",
            "DDENA":"",
            "DBACK":"",
            "DTIME":"2024-06-05T15:01:52.577",
            "DCOD1":"",
            "Items":[
                {
                    "PSEQ":1,
                    "PICOD":"0000004111",
                    "PINAM":"彩色觸控螢幕 藍芽手A",
                    "PSCOD":"A001",
                    "PSNAM":"主要使用倉庫",
                    "PNUMB":950.000000000,
                    "PSOUR":0.4442,
                    "PLTOT":-9025.000000000,
                    "PCOD1SEQ":"",
                    "ATTR1":"",
                    "ATTR2":""
                }]
            }],"ErrorDetail":[]
        }
        
        
        
        失敗
        {
            "Status": "E",
            "ErrorCode": "9003",
            "ErrorMessage": "Timestamp已過期",
            "ErrorDetail": []
        }
    
        
        
        失敗
        {
            "Status": "E",
            "ErrorCode": "2006",
            "ErrorMessage": "查無客戶資料",
            "ErrorDetail": []
        }
    
        
        
        失敗
        {
            "Status":"E",
            "ErrorCode":"9999",
            "ErrorMessage":"查無訂單資料",
            "Details":[],
            "ErrorDetail":[]
        }
    
        
        
        失敗
        {
            "Status":"S",
            "ErrorCode":"0001",
            "ErrorMessage":"全部查詢完成,有部分查詢出現錯誤",
            "Details":[
            {
                "OCOD1":"10803060038",
                "ODATE":"108.03.06",
                "ODAT2":"108.03.07",
                "OCOD3":"10803070011",
                "OCOD4":"TM190305Z01516",
                "OCCOD":"91APP",
                "OCNAM":"91APP-BABY",
                "OPNAM":"",
                "OTOT1":171.0000,
                "OTAXM":9.0000,
                "OTOT2":180.0000,
                "OBAK1":"91mai/物流:宅配/實際金額:148",
                "OBAK2":"姓名:林OO 手機:0912345679 ",
                "OBAK3":"地址:408台中市南屯區文心南六路181號 ",
                "OADD1":"",
                "OWAY":"宅配",
                "OPAY":"",
                "OTONO":"00",
                "OTONA":"月結",
                "OTax":"9",
                "ReceiveName":"91APP-BABY",
                "ReceiveTEL":"",
                "ReceiveMobile":"",
                "ReceiveZIPCode":"",
                "ReceiveAddr":"408台中市南屯區文心南六路181號",
                "ReceiveCTCOD":"",
                "ReceiveComName":"91APP",
                "ReceiveEmail":"",
                "CarrierType":"",
                "CarrierId2":"",
                "NPOBAN":"",
                "RETOLL":0,
                "RETOLL_PRICE":0.0000,
                "Items":[
                            {
                                "OSEQ":1,
                                "ICODE":"LLBOX-W",
                                "INAME":"LitterBox貓砂籃-灰色",
                                "Unit":"個",
                                "Qty":1.000000000,
                                "Price":180.0,
                                "Total":180.0,
                                "DTaxType":"1",
                                "Stock":"01 ",
                                "Remark":"白色"
                            }
                        ]
            }
            ],
            "ErrorDetail":[
                {
                    "Status":"",
                    "OCOD1":"10803070112",
                    "OSEQ":0,
                    "OCOD4":"TM190305Z01518",
                    "ErrorCode":"",
                    "ErrorMessage":"查無訂單明細資料"
                },
                {
                    "Status":"",
                    "OCOD1":"10803080013",
                    "OSEQ":0,
                    "OCOD4":"TM190305Z01522",
                    "ErrorCode":"",
                    "ErrorMessage":"查無訂單明細資料"
                },
                {
                    "Status":"",
                    "OCOD1":"10803080014",
                    "OSEQ":0,
                    "OCOD4":"TM190305Z01522",
                    "ErrorCode":"",
                    "ErrorMessage":"查無訂單明細資料"
                }
            ]
        }