服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2025-03-22 6295e95e558ab6e9da2e7ff860b6918cc6b414b6
Tiger.Api/Controllers/Test/TestController.R.cs
@@ -25,6 +25,8 @@
using Microsoft.CodeAnalysis.Options;
using System.IO;
using System.Runtime.Loader;
using MailKit.Search;
using Tiger.Model.DigitalTwin;
namespace Tiger.Api.Controllers.Test
{
@@ -152,7 +154,7 @@
            //var data = 0;
            //try
            //{
            //     data = Biz.Db.Ado.UseStoredProcedure().ExecuteCommand("pkg_ImportItemFromSRM", new SugarParameter("dlvyNo", "BAD202308240443"));
            //     data = Biz.Db.Ado.UseStoredProcedure().ExecuteCommand("sp_ImportItemFromSRM", new SugarParameter("dlvyNo", "BAD202308240443"));
            //}
            //catch (System.Exception ex)
            //{
@@ -368,6 +370,67 @@
            return Ok(result?.ToJson());
        }
        [HttpPost]
        public async Task<IActionResult> InterfaceAsync([FromBody] ApiAction action)
        {
            var data = action.Data;
            //var json = new {
            //    SN = "V025720241120000161",
            //    ItemCode = "160305330",
            //    Qty = 1700,
            //    Unit = "PCS",
            //    Supplier = "V0381",
            //    DeliveryDate = DateTime.Now,
            //    ProdDate = DateTime.Now,
            //    BatchNo = "20241120",
            //    ValidityDays = 365,
            //    SerialNo = 161,
            //    ItemName = "L-CW1323GA 两个装彩盒 隔板 材质300g单粉裱YF加强过哑膜 105 mm 85 mm 3 mm 南泰 ",
            //    Warehouse = "W0001",
            //    ItemModel = "材料 零件 商品",
            //};
            //var result = action.GetResponse("GetSnInfo success.", json, true);
            //var json = new List<object>
            //{
            //    new {
            //        OrderNo = "RE202404308721",
            //        Warehouse = "",
            //        Details = new List<object>
            //        {
            //            new { ItemCode = "442500010", ItemName = "长椭圆形卡针 35 x7.3 x0.9mm SUS304H 斯络泰", Qty = 1000 },
            //            new { ItemCode = "442500011", ItemName = "短椭圆形卡针 35 x7.3 x0.9mm SUS304H 斯络泰", Qty = 500 }
            //        },
            //        SnDetails = new List<object>
            //        {
            //            new { SN = "V029720240427000069", ItemCode = "442500010", Qty = 500, Carton = "CV029720240427000001", Pallet = "PV029720240427000001" },
            //            new { SN = "V029720240427000070", ItemCode = "442500010", Qty = 500, Carton = "CV029720240427000001", Pallet = "PV029720240427000001" },
            //            new { SN = "V029720240427000071", ItemCode = "442500011", Qty = 500, Carton = "CV029720240427000002", Pallet = "PV029720240427000001" },
            //        },
            //    }
            //};
            //var result = action.GetResponse("GetInOrder success.", json, true);
            //var json = new List<object>
            //{
            //    new {
            //        OrderNo = "XC5406-231014306",
            //        Warehouse = "XC003",
            //        Details = new List<object>
            //        {
            //            new { ItemCode = "250100420", ItemName = "IC SMD DC-DC 0.6V 单路 1A 1.5MHZ SOT563 TLV62568DRL TI", Qty = 1000 },
            //            new { ItemCode = "200203670", ItemName = "CAP SMD X5R 0402 6.3V 4.7uF±20%", Qty = 1500 }
            //        },
            //    }
            //};
            //var result = action.GetResponse("GetOutOrder success.", json, true);
            var result = action.GetResponse("OutTask success.", true);
            return Ok(new { result.Timestamp, result.IsSuccessed, result.Message, result.Data });
        }
        [HttpGet]
        public async Task<IActionResult> RefreashPlugin(string path)
        {