using System.Dynamic; using Microsoft.AspNetCore.Mvc; using NewPdaSqlServer.entity; using NewPdaSqlServer.util; using MES.Service.service.Kingdee; namespace NewPdaSqlServer.Controllers.Kingdee; [ApiController] [Route("api/[controller]")] public class ErpKcController : ControllerBase { 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); } } }