快乐的昕的电脑
2025-10-09 b58954795573ae066a2aebfafdac9c8b29b64ae2
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
using System.Dynamic;
using Microsoft.AspNetCore.Mvc;
using PadApplication.Entites.DbModels;
using PadApplication.Entites.Dto;
using PadApplication.Services;
using PadApplication.util;
 
namespace PadApplication.Controllers;
 
/// <summary>
/// 刀具台账控制器,提供刀具相关的接口
/// </summary>
[ApiController]
[Route("api/[controller]")]
public class MesCutterLedgerController : ControllerBase
{
    private readonly MesCutterLedgerManager m = new();
 
    /// <summary>
    /// 刀具查询(支持编号或名称模糊查询)MesCutterLedger
    /// </summary>
    /// <param name="searchKey">查询关键字</param>
    /// <returns>刀具列表</returns>
    [HttpPost("QueryTools")]
    public ResponseResult QueryTools([FromBody] string searchKey)
    {
        try
        {
            dynamic resultInfos = new ExpandoObject();
            resultInfos.tbBillList = m.QueryTools(searchKey);
            return new ResponseResult
            {
                status = 0,
                message = "OK",
                data = resultInfos
            };
        }
        catch (Exception ex)
        {
            return ResponseResult.ResponseError(ex);
        }
    }
}