南骏 池
2025-02-07 8dd9fc1a302394e1511f44ec35127e42fd20c1ea
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
using System.Dynamic;
using Microsoft.AspNetCore.Mvc;
using NewPdaSqlServer.Dto.service;
using NewPdaSqlServer.entity;
using NewPdaSqlServer.service.Warehouse;
using NewPdaSqlServer.util;
 
namespace NewPdaSqlServer.Controllers.Warehouse;
 
[ApiController]
[Route("api/[controller]")]
public class MesBarCFController : ControllerBase
{
    private readonly MesBarCFManager m = new();
 
    /// <summary>
    ///     获取条码信息和物料信息
    /// </summary>
    /// <returns></returns>
    [HttpPost("GetBarInfo")]
    public ResponseResult GetBarInfo(WarehouseQuery unity)
    {
        try
        {
            dynamic resultInfos = new ExpandoObject();
            resultInfos.tbBillList = m.GetBarInfo(unity);
            resultInfos.tbMesItems = m.GetItemNo(resultInfos.tbBillList.ItemId);
            return new ResponseResult
            {
                status = 0,
                message = "OK",
                data = resultInfos
            };
        }
        catch (Exception ex)
        {
            return ResponseResult.ResponseError(ex);
        }
    }
 
    /// <summary>
    ///     获取条码信息和物料信息
    /// </summary>
    /// <returns></returns>
    [HttpPost("BarCF")]
    public ResponseResult BarCF(WarehouseQuery unity)
    {
        try
        {
            dynamic resultInfos = new ExpandoObject();
            resultInfos.tbBillList = m.BarCF(unity);
            return new ResponseResult
            {
                status = 0,
                message = resultInfos.tbBillList,
                data = resultInfos
            };
        }
        catch (Exception ex)
        {
            return ResponseResult.ResponseError(ex);
        }
    }
}