服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2024-05-15 6f7b95e640f4539821e5456a27dcb8ddbd9e9c34
Merge branch 'master' of http://47.115.28.255:8110/r/TigerClouds-Tech/Server/TigerApi6_2024
已修改2个文件
108 ■■■■■ 文件已修改
Tiger.Business/MES/Transaction/LoadingMaterial.cs 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Model.Net/Entitys/WMS/Api/BaseInput.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business/MES/Transaction/LoadingMaterial.cs
@@ -10,6 +10,7 @@
using System.Threading.Tasks;
using Tiger.Model;
using Tiger.Model.Sharetronic.Shelf;
using System.ComponentModel;
namespace Tiger.Business.MES.Transaction
{
@@ -35,7 +36,32 @@
        public string OrgCode { get; set; }
        public bool his_isComplete { get; set; }
        public bool isManual { get; set; }
        public decimal cutQty { get; set; }
        /// <summary>
        /// 步骤类型
        /// </summary>
        public enum Step_Types
        {
            /// <summary>
            /// 扫描机器编码
            /// </summary>
            [Description("机器编码")]
            SmtCode,
            /// <summary>
            /// 扫描槽位
            /// </summary>
            [Description("槽位")]
            SlotNo,
            /// <summary>
            /// 扫描飞达
            /// </summary>
            [Description("Feeder")]
            Feeder,
            /// <summary>
            /// 扫描料盘SN
            /// </summary>
            [Description("料盘码")]
            SN,
        }
        #endregion Propertys & Variables
@@ -46,7 +72,7 @@
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task<ApiAction<ProdReqOutput>> ScanItem(BaseCodeInput input)
        public async Task<ApiAction<ProdReqOutput>> ScanItem(SmtLoadingInput input)
        {
            var action = new ApiAction<ProdReqOutput>();
            try
@@ -54,8 +80,24 @@
                if (input.Code.IsNullOrEmpty())
                {
                    action.IsSuccessed = false;
                    action.LocaleMsg = Biz.L("条码不能为空");
                    action.LocaleMsg = Biz.L($"{EnumHelper.GetEnum<Step_Types>(input.Step).GetDesc()}不能为空");
                    return action;
                }
                switch (EnumHelper.GetEnum<Step_Types>(input.Step))
                {
                    case Step_Types.SmtCode:
                        ExecuteSmtCode();
                        break;
                    case Step_Types.SlotNo:
                        ExecuteSlotNo();
                        break;
                    case Step_Types.Feeder:
                        ExecuteFeeder();
                        break;
                    case Step_Types.SN:
                        ExecuteSN();
                        break;
                }
                //action.Data = new ProdReqOutput()
@@ -78,6 +120,61 @@
            return action;
        }
        private ApiAction ExecuteSmtCode() {
            var action = new ApiAction();
            try
            {
            }
            catch (Exception ex)
            {
                action.CatchExceptionWithLog(ex, $"扫描机器编码异常");
            }
            return action;
        }
        private ApiAction ExecuteSlotNo()
        {
            var action = new ApiAction();
            try
            {
            }
            catch (Exception ex)
            {
                action.CatchExceptionWithLog(ex, $"扫描槽位异常");
            }
            return action;
        }
        private ApiAction ExecuteFeeder()
        {
            var action = new ApiAction();
            try
            {
            }
            catch (Exception ex)
            {
                action.CatchExceptionWithLog(ex, $"扫描Feeder异常");
            }
            return action;
        }
        private ApiAction ExecuteSN()
        {
            var action = new ApiAction();
            try
            {
            }
            catch (Exception ex)
            {
                action.CatchExceptionWithLog(ex, $"扫描料盘码异常");
            }
            return action;
        }
        /// <summary>
        /// 添加一个ApiAction的历史记录
        /// </summary>
Tiger.Model.Net/Entitys/WMS/Api/BaseInput.cs
@@ -50,4 +50,9 @@
    {
        public bool IsItemCodeList { get; set; }
    }
    public class SmtLoadingInput : BaseCodeInput
    {
        public int Step { get; set; }
    }
}