服务端的TigerApi 框架,基于.NET6 2024 版本
Ben Lin
2024-08-18 e3e60e858b0d8d2196b6cbb6dff04f9fde65d3df
增加客户端条码验证方法
已修改1个文件
已重命名5个文件
已添加4个文件
129 ■■■■■ 文件已修改
Tiger.Api/Controllers/MES/MESController.CodeVerification.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.MES/BIZ/BIZ_MES_WO.cs 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.MES/BIZ/MES_WORKSHOP.cs 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.MES/Common/CodeVerification.cs 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.IBusiness/MES/BIZ/IMES_WO.cs 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.IBusiness/MES/BIZ/IMES_WORKSHOP.cs 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.IBusiness/MES/Common/ICodeVerification.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Model.Net/Entitys/MES/ParameterEntity/BizMesWoBatchParameter.cs 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Model.Net/Entitys/MES/ParameterEntity/CodeVerificationParameter.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Model.Net/Tiger.Model.Net.csproj 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Api/Controllers/MES/MESController.CodeVerification.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,36 @@
using 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);
        }
    }
}
Tiger.Business.MES/BIZ/BIZ_MES_WO.cs
Tiger.Business.MES/BIZ/MES_WORKSHOP.cs
Tiger.Business.MES/Common/CodeVerification.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,57 @@
using 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);
        }
    }
}
Tiger.IBusiness/MES/BIZ/IMES_WO.cs
Tiger.IBusiness/MES/BIZ/IMES_WORKSHOP.cs
Tiger.IBusiness/MES/Common/ICodeVerification.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
using 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);
    }
}
Tiger.Model.Net/Entitys/MES/ParameterEntity/BizMesWoBatchParameter.cs
Tiger.Model.Net/Entitys/MES/ParameterEntity/CodeVerificationParameter.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
using 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; }
    }
}
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" />