服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
5 天以前 beca28ecb3a730ffb33c21e0c55c729774725faf
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
47
48
49
50
51
52
53
54
55
56
57
58
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Rhea.Common;
using Tiger.Model;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Tiger.Model.Minsun;
using Tiger.IBusiness;
 
namespace Tiger.Api.Controllers.WMS
{
    public partial class WMSController : ControllerBase
    {
        /// <summary>
        /// T100调用WMS返回收货单信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost]
        [Route("api/[controller]/[action]")]
        public IActionResult GetReceiptInfoAsync([FromBody] iReceiptParam input)
        {
            ApiAction response = new();
            try
            {
                response = response.GetResponse(_IReceiptInfo.GetReceiptInfo(input));
            }
            catch (System.Exception ex)
            {
                response = response.GetResponse().CatchExceptionWithLog(ex);
            }
            return Ok(response);
        }
 
        /// <summary>
        /// 到货单生成接口    清点系统 --> wms, 生成到新框架
        /// </summary>
        /// <param name="dtls"></param>
        /// <returns></returns>
        [HttpPost]
        [Route("api/[controller]/[action]")]
        public async Task<IActionResult> GenerateReceiptNewAsync(iReceiptInput dtls)
        {
            ApiAction response = new();
            try
            {
                response = response.GetResponse(_IReceiptInfo.GenerateReceipt(dtls));
            }
            catch (System.Exception ex)
            {
                response = response.GetResponse().CatchExceptionWithLog(ex);
            }
            return Ok(response);
        }
    }
}