From e3e60e858b0d8d2196b6cbb6dff04f9fde65d3df Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期日, 18 八月 2024 18:01:04 +0800
Subject: [PATCH] 增加客户端条码验证方法

---
 Tiger.IBusiness/MES/Common/ICodeVerification.cs                          |   19 ++++++
 Tiger.IBusiness/MES/BIZ/IMES_WO.cs                                       |    0 
 Tiger.Model.Net/Entitys/MES/ParameterEntity/BizMesWoBatchParameter.cs    |    0 
 Tiger.Model.Net/Tiger.Model.Net.csproj                                   |    3 
 Tiger.Business.MES/BIZ/BIZ_MES_WO.cs                                     |    0 
 Tiger.Business.MES/Common/CodeVerification.cs                            |   57 +++++++++++++++++++
 Tiger.Business.MES/BIZ/MES_WORKSHOP.cs                                   |    0 
 Tiger.IBusiness/MES/BIZ/IMES_WORKSHOP.cs                                 |    0 
 Tiger.Api/Controllers/MES/MESController.CodeVerification.cs              |   36 ++++++++++++
 Tiger.Model.Net/Entitys/MES/ParameterEntity/CodeVerificationParameter.cs |   14 ++++
 10 files changed, 128 insertions(+), 1 deletions(-)

diff --git a/Tiger.Api/Controllers/MES/MESController.CodeVerification.cs b/Tiger.Api/Controllers/MES/MESController.CodeVerification.cs
new file mode 100644
index 0000000..1a73378
--- /dev/null
+++ b/Tiger.Api/Controllers/MES/MESController.CodeVerification.cs
@@ -0,0 +1,36 @@
+锘縰sing Microsoft.AspNetCore.Mvc;
+using Rhea.Common;
+using System.Threading.Tasks;
+using Tiger.IBusiness;
+using Tiger.Model;
+using Tiger.Model.Entitys.MES.BizMesWo;
+using Tiger.Model.Entitys.MES.BizMesWoBatch;
+using Tiger.Model.Entitys.MES.CodeVerification;
+
+namespace Tiger.Api.Controllers.MES
+{
+    public partial class MESController : ControllerBase
+    {
+
+        /// <summary>
+        /// 鏉$爜楠岃瘉
+        /// </summary>
+        /// <param name="action"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [Route("api/[controller]/CodeVerification/[action]")]
+        public async Task<IActionResult> CodeVerification_Verify([FromBody] ApiAction<CodeVerificationInput> action)
+        {
+            ApiAction response = new();
+            try
+            {
+                response = response.GetResponse(await DI.Resolve<ICodeVerification>().Verify(action.Data));
+            }
+            catch (System.Exception ex)
+            {
+                response = response.GetResponse().CatchExceptionWithLog(ex);
+            }
+            return Ok(response);
+        }
+    }
+}
diff --git a/Tiger.Business.MES/BIZ_MES_WO.cs b/Tiger.Business.MES/BIZ/BIZ_MES_WO.cs
similarity index 100%
rename from Tiger.Business.MES/BIZ_MES_WO.cs
rename to Tiger.Business.MES/BIZ/BIZ_MES_WO.cs
diff --git a/Tiger.Business.MES/MES_WORKSHOP.cs b/Tiger.Business.MES/BIZ/MES_WORKSHOP.cs
similarity index 100%
rename from Tiger.Business.MES/MES_WORKSHOP.cs
rename to Tiger.Business.MES/BIZ/MES_WORKSHOP.cs
diff --git a/Tiger.Business.MES/Common/CodeVerification.cs b/Tiger.Business.MES/Common/CodeVerification.cs
new file mode 100644
index 0000000..88e85e7
--- /dev/null
+++ b/Tiger.Business.MES/Common/CodeVerification.cs
@@ -0,0 +1,57 @@
+锘縰sing Tiger.Model;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text;
+using System.Threading.Tasks;
+using Rhea.Common;
+using System.Net;
+using System.Linq;
+using Newtonsoft.Json;
+using Tiger.IBusiness;
+using Microsoft.AspNetCore.Http;
+using Tiger.Model.Entitys.MES.BizMesWoBatch;
+using Tiger.Model.Entitys.MES.BizMesWo;
+using Tiger.Model.Entitys.MES.CodeVerification;
+
+namespace Tiger.Business.MES
+{
+    public partial class CodeVerification : ICodeVerification
+    {
+        /// <summary>
+        /// 鏉$爜楠岃瘉
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        public async Task<ApiAction> Verify(CodeVerificationInput input)
+        {
+            var result = new ApiAction();
+            try
+            {
+                //01妫�鏌ユ槸鍝釜瀹㈡埛鐨�
+
+                //02妫�鏌ョ墿鏂�
+
+                //03妫�鏌ュ伐鍗曟壒娆�
+
+
+                var db = Biz.Db;
+                var dbTran = db.UseTran(() =>
+                {
+                    
+                });
+                if (!dbTran.IsSuccess)
+                {
+                    result.IsSuccessed = false;
+                    result.Message = $"鏉$爜楠岃瘉寮傚父";
+                }
+            }
+            catch (Exception ex)
+            {
+                result.CatchExceptionWithLog(ex, "鏉$爜楠岃瘉寮傚父");
+            }
+            return await Task.FromResult(result);
+        }
+    }
+}
diff --git a/Tiger.IBusiness/MES/IMES_WO.cs b/Tiger.IBusiness/MES/BIZ/IMES_WO.cs
similarity index 100%
rename from Tiger.IBusiness/MES/IMES_WO.cs
rename to Tiger.IBusiness/MES/BIZ/IMES_WO.cs
diff --git a/Tiger.IBusiness/MES/IMES_WORKSHOP.cs b/Tiger.IBusiness/MES/BIZ/IMES_WORKSHOP.cs
similarity index 100%
rename from Tiger.IBusiness/MES/IMES_WORKSHOP.cs
rename to Tiger.IBusiness/MES/BIZ/IMES_WORKSHOP.cs
diff --git a/Tiger.IBusiness/MES/Common/ICodeVerification.cs b/Tiger.IBusiness/MES/Common/ICodeVerification.cs
new file mode 100644
index 0000000..fa5bf8e
--- /dev/null
+++ b/Tiger.IBusiness/MES/Common/ICodeVerification.cs
@@ -0,0 +1,19 @@
+锘縰sing Rhea.Common;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tiger.Model;
+using Tiger.Model.Entitys.MES.BizMesWo;
+using Tiger.Model.Entitys.MES.BizMesWoBatch;
+using Tiger.Model.Entitys.MES.CodeVerification;
+
+namespace Tiger.IBusiness
+{
+    public interface ICodeVerification
+    {
+        public Task<ApiAction> Verify(CodeVerificationInput input);
+    }
+}
diff --git "a/Tiger.Model.Net/Entitys/MES/ParameterEntity/BizMesWoBatchParameter - \345\244\215\345\210\266.cs" b/Tiger.Model.Net/Entitys/MES/ParameterEntity/BizMesWoBatchParameter.cs
similarity index 100%
rename from "Tiger.Model.Net/Entitys/MES/ParameterEntity/BizMesWoBatchParameter - \345\244\215\345\210\266.cs"
rename to Tiger.Model.Net/Entitys/MES/ParameterEntity/BizMesWoBatchParameter.cs
diff --git a/Tiger.Model.Net/Entitys/MES/ParameterEntity/CodeVerificationParameter.cs b/Tiger.Model.Net/Entitys/MES/ParameterEntity/CodeVerificationParameter.cs
new file mode 100644
index 0000000..51d4d8b
--- /dev/null
+++ b/Tiger.Model.Net/Entitys/MES/ParameterEntity/CodeVerificationParameter.cs
@@ -0,0 +1,14 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tiger.Model.Entitys.MES.CodeVerification
+{
+    public class CodeVerificationInput
+    {
+        public BIZ_MES_WO Wo { get; set; }
+        public string SN { get; set; }
+    }
+}
diff --git a/Tiger.Model.Net/Tiger.Model.Net.csproj b/Tiger.Model.Net/Tiger.Model.Net.csproj
index 9022cd3..ac99b90 100644
--- a/Tiger.Model.Net/Tiger.Model.Net.csproj
+++ b/Tiger.Model.Net/Tiger.Model.Net.csproj
@@ -153,7 +153,8 @@
     <Compile Include="Entitys\MES\MES_WO_NODE_POST.cs" />
     <Compile Include="Entitys\MES\MES_WO_OPER.cs" />
     <Compile Include="Entitys\MES\node.cs" />
-    <Compile Include="Entitys\MES\ParameterEntity\BizMesWoBatchParameter - 澶嶅埗.cs" />
+    <Compile Include="Entitys\MES\ParameterEntity\BizMesWoBatchParameter.cs" />
+    <Compile Include="Entitys\MES\ParameterEntity\CodeVerificationParameter.cs" />
     <Compile Include="Entitys\MES\ParameterEntity\BizMesWoParameter.cs" />
     <Compile Include="Entitys\MES\ParameterEntity\BasLabelTempParameter.cs" />
     <Compile Include="Entitys\MES\ParameterEntity\SmtLoadingReturn.cs" />

--
Gitblit v1.9.3