From 6f7b95e640f4539821e5456a27dcb8ddbd9e9c34 Mon Sep 17 00:00:00 2001 From: Rodney Chen <rodney.chen@hotmail.com> Date: 星期三, 15 五月 2024 13:47:24 +0800 Subject: [PATCH] Merge branch 'master' of http://47.115.28.255:8110/r/TigerClouds-Tech/Server/TigerApi6_2024 --- Tiger.Business/MES/Transaction/LoadingMaterial.cs | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++- Tiger.Model.Net/Entitys/WMS/Api/BaseInput.cs | 5 ++ 2 files changed, 105 insertions(+), 3 deletions(-) diff --git a/Tiger.Business/MES/Transaction/LoadingMaterial.cs b/Tiger.Business/MES/Transaction/LoadingMaterial.cs index 7d83e1a..48331bf 100644 --- a/Tiger.Business/MES/Transaction/LoadingMaterial.cs +++ b/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> /// 娣诲姞涓�涓狝piAction鐨勫巻鍙茶褰� /// </summary> diff --git a/Tiger.Model.Net/Entitys/WMS/Api/BaseInput.cs b/Tiger.Model.Net/Entitys/WMS/Api/BaseInput.cs index 8742361..a3f62b8 100644 --- a/Tiger.Model.Net/Entitys/WMS/Api/BaseInput.cs +++ b/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; } + } } \ No newline at end of file -- Gitblit v1.9.3