Exemple #1
0
        public IActionResult GetItem([FromRoute] string rfid)
        {
            TerminalMessage result = new TerminalMessage();
            invp_data       m      = null;
            invp_tag        t      = null;

            t = _context.invp_tag.FirstOrDefault(z => z.RFID == rfid);
            if (t != null)
            {
                m = _context.invp_data.FirstOrDefault(z => z.invp_dataId == t.invp_dataId);
                if (m == null)
                {
                    result.message = "Ошибка. Запчасть не обнаружена";
                }
                else
                {
                    result.message = m.name;
                }
            }
            else
            {
                result.message = "Ошибка. Метка не зарегистрирована";
            }
            return(Ok(result));
        }
Exemple #2
0
        public async Task <IActionResult> OpStopInventory([FromRoute] Guid uid, [FromRoute] Guid invID)
        {
            TerminalMessage result = new TerminalMessage();

            result.message = await _terminalService.Operation_stopinventory(uid, invID);

            return(Ok(result));
        }
Exemple #3
0
        public async Task <IActionResult> OpInventory([FromRoute] Guid uid, [FromBody] invops_inventory varinvops_inv)
        {
            TerminalMessage result = new TerminalMessage();

            result.message = await _terminalService.Operation_inventory(uid, varinvops_inv);

            return(Ok(result));
        }
Exemple #4
0
        public async Task <IActionResult> OpMove([FromRoute] Guid uid, [FromBody] invops_move varinvops_move)
        {
            TerminalMessage result = new TerminalMessage();

            result.message = await _terminalService.Operaion_move(uid, varinvops_move);

            return(Ok(result));
        }
Exemple #5
0
        public IActionResult GetCell([FromRoute] string code)
        {
            TerminalMessage result = new TerminalMessage();
            invwh_cell      c      = null;

            c = _context.invwh_cell.FirstOrDefault(cc => cc.SHCODE == code);
            if (c == null)
            {
                result.message = "Ошибка. Ячейка не обнаружена";
            }
            else
            {
                result.message = c.name + " (" + c.SHCODE + ")";
            }

            return(Ok(result));
        }