服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2025-04-18 c3bb5047c194a0145caca7681f0df5a8feeaaa9b
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace Tiger.Model
{
    public class BaseInput
    {
        /// <summary>
        /// 数据库授权查询选项
        /// </summary>
        public AuthOption AuthOption { get; set; }
        /// <summary>
        /// 客户端显示的语言
        /// </summary>
        public string Locale { get; set; }
        /// <summary>
        /// 操作指令
        /// </summary>
        public string Command { get; set; }
        /// <summary>
        /// 条码
        /// </summary>
        public string SN { get; set; }
        /// <summary>
        /// 料号
        /// </summary>
        public string ItemCode { get; set; }
        /// <summary>
        /// 单据号
        /// </summary>
        public string OrderNo { get; set; }
        /// <summary>
        /// 当前操作需要提交的选项
        /// </summary>
        public Dictionary<string, string> Options { get; set; } = new Dictionary<string, string>();
        /// <summary>
        /// 当前操作需要提交的数据
        /// </summary>
        public string Data { get; set; }
    }
 
 
    public class BaseInput<T> : BaseInput
    {
        public BaseInput()
        {
        }
 
        public BaseInput(BaseInput input)
        {
            if (input != null)
            {
                AuthOption = input.AuthOption;
                Locale = input.Locale;
                Command = input.Command;
                SN = input.SN;
                ItemCode = input.ItemCode;
                OrderNo = input.OrderNo;
                Options = input.Options;
                Data = JsonConvert.DeserializeObject<T>(input.Data);
            }
        }
 
        /// <summary>
        /// 当前操作需要提交的数据
        /// </summary>
        public new T Data { get; set; }
    }
 
    public class BaseInputWithPage : BaseInput
    {
        public int pageIndex { get; set; }
        public int pageSize { get; set; }
        public int total { get; set; }
    }
 
    public class BasePageInput
    {
        public AuthOption AuthOption { get; set; }
        public int pageIndex { get; set; }
        public int pageSize { get; set; }
        public int total { get; set; }
        public string Code { get; set; }
    }
 
    public class BasePageOutput<T>
    {
        public List<T> data { get; set; }
        public int total { get; set; }
    }
 
    public class BaseCodeInput
    {
        public AuthOption AuthOption { get; set; }
        public string Code { get; set; }
    }
 
    public class OutOthDtlInput : BasePageInput
    {
        public bool IsItemCodeList { get; set; }
    }
 
    public class OutWoDtlInput : BasePageInput
    {
        public bool IsItemCodeList { get; set; }
    }
 
    public class RePrintLabelBase
    {
        public string BatchNo { get; set; }
        public double BatchQty { get; set; }
        public List<RePrintLabelEntity> SnList { get; set; }=new List<RePrintLabelEntity>();
    }
 
    public class RePrintLabelEntity
    {
        public string ID { get; set; }
        public string SN { get; set; }
        public double Qty { get; set; }
    }
}