xwt
7 天以前 65438b8c1f9ec323c3c2ae265561dae4ff536379
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
using MES.Service.Dto.service;
using MES.Service.Dto.webApi;
using MES.Service.Modes;
using MES.Service.service;
using MES.Service.service.Kingdee;
using MES.Service.util;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using System.Dynamic;
 
namespace MESApplication.Controllers.Kingdee;
 
 
[ApiController]
[Route("api/[controller]")]
public class ErpKcController : ControllerBase 
{
    private readonly MessageCenterManager _manager = new();
    private readonly ErpKcManager kc = new();
    private readonly string METHOD = "POST";
    private readonly string TableName = "ERPKC";
    private readonly string URL = "http://localhost:10054/api/ErpKc/";
 
 
    //
    [HttpPost("Save")]
    public ResponseResult Save(Inventory inventory)
    {
        try
        {
            dynamic resultInfos = new ExpandoObject();
            resultInfos = kc.QueryStocks(inventory);
 
            return new ResponseResult
            {
                status = 0,
                message = "OK",
                data = resultInfos
            };
        }
        catch (Exception ex)
        {
            return ResponseResult.ResponseError(ex);
        }
    }
}