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);
|
}
|
}
|
}
|