新框架PDA后端(祈禧6月初版本)
南骏 池
3 天以前 fca0719af6948fe8fa1e4f094f8e7dba339c7428
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
65
66
67
68
69
70
71
72
using System.Dynamic;
using Microsoft.AspNetCore.Mvc;
using NewPdaSqlServer.Dto.service;
using NewPdaSqlServer.entity;
using NewPdaSqlServer.service.@base;
using NewPdaSqlServer.service.Wom;
using NewPdaSqlServer.util;
 
namespace NewPdaSqlServer.Controllers.@base;
 
/// <summary>
///     生产报工相关接口
/// </summary>
[Route("api/[controller]")]
[ApiController]
public class MesPrintController : ControllerBase
{
    private readonly MesPrintMangeer _manager = new();
 
    /// <summary>
    ///     扫描注塑码,获取工单和条码信息
    /// </summary>
    /// <returns></returns>
    [HttpPost("getPrintInfo")]
    public ResponseResult getPrintInfo([FromBody] dynamic query)
    {
        try
        {
            dynamic resultInfos = new ExpandoObject();
            // 先初始化tbBillList属性
            resultInfos.tbBillList = new ExpandoObject();
            resultInfos.tbBillList = _manager.getPrintInfo(query);
            return new ResponseResult
            {
                status = 0,
                message = "OK",
                data = resultInfos
            };
        }
        catch (Exception ex)
        {
            return ResponseResult.ResponseError(ex);
        }
    }
 
    /// <summary>
    ///     扫描注塑码,获取工单和条码信息
    /// </summary>
    /// <returns></returns>
    [HttpPost("getCfInfo")]
    public ResponseResult getCfInfo([FromBody] dynamic query)
    {
        try
        {
            dynamic resultInfos = new ExpandoObject();
            // 先初始化tbBillList属性
            resultInfos.tbBillList = new ExpandoObject();
            resultInfos.tbBillList = _manager.getCfInfo(query);
            return new ResponseResult
            {
                status = 0,
                message = "OK",
                data = resultInfos
            };
        }
        catch (Exception ex)
        {
            return ResponseResult.ResponseError(ex);
        }
    }
 
}