From 4820d874c4b163b1fc62ce3e17f85372232f81ff Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期一, 22 七月 2024 18:37:56 +0800 Subject: [PATCH] 添加客户工单工艺路线 --- Tiger.Model.Net/Entitys/MES/V_MES_WO_PTREE.cs | 89 ++++++++++++++++++++++++++++++++++++++++++++ Tiger.Api/Controllers/MES/MESController.Route.cs | 29 ++++++++++++++ Tiger.Model.Net/Tiger.Model.Net.csproj | 1 3 files changed, 118 insertions(+), 1 deletions(-) diff --git a/Tiger.Api/Controllers/MES/MESController.Route.cs b/Tiger.Api/Controllers/MES/MESController.Route.cs index 63c004f..1b0f289 100644 --- a/Tiger.Api/Controllers/MES/MESController.Route.cs +++ b/Tiger.Api/Controllers/MES/MESController.Route.cs @@ -157,7 +157,7 @@ public async Task<IActionResult> GetWoPTreeAsync(string wo) { SugarParameter[] pars = Biz.Db.Ado.GetParameters(new { WO = wo }); - var data = Biz.Db.Ado.UseStoredProcedure().SqlQuery<V_MES_ROUTE_PTREE>("SP_MES_GET_WO_PTREE", pars);//杩斿洖List + var data = Biz.Db.Ado.UseStoredProcedure().SqlQuery<V_MES_WO_PTREE>("SP_MES_GET_WO_PTREE", pars);//杩斿洖List return Ok(data); } @@ -245,5 +245,32 @@ } return Ok(response); } + + /// <summary> + /// 娣诲姞宸ュ崟鐨勫鎴风殑宸ヨ壓璺嚎 + /// </summary> + /// <param name="wo"></param> + /// <returns></returns> + [HttpGet] + [Route("api/[controller]/[action]")] + public async Task<IActionResult> SP_MES_WO2CUST(string wo) + { + ApiAction response = new(); + try + { + SugarParameter[] pars = Biz.Db.Ado.GetParameters(new { WO = wo, ERR_CODE = 0, ERR_MSG = "" }); + pars[1].Direction = System.Data.ParameterDirection.Output; + pars[2].Direction = System.Data.ParameterDirection.Output; + Biz.Db.Ado.UseStoredProcedure().ExecuteCommand("SP_MES_WO2CUST", pars); + response.Data = pars[1].Value; + response.IsSuccessed = pars[1].Value.ToInt32() == 0 ? true : false; + response.LocaleMsg = new(pars[2].Value.ToString()); + } + catch (System.Exception ex) + { + response = response.GetResponse().CatchExceptionWithLog(ex); + } + return Ok(response); + } } } diff --git a/Tiger.Model.Net/Entitys/MES/V_MES_WO_PTREE.cs b/Tiger.Model.Net/Entitys/MES/V_MES_WO_PTREE.cs new file mode 100644 index 0000000..a27b405 --- /dev/null +++ b/Tiger.Model.Net/Entitys/MES/V_MES_WO_PTREE.cs @@ -0,0 +1,89 @@ +using System; +using SqlSugar; +using System.Linq; +using System.ComponentModel; +using System.Collections.Generic; +using Tiger.Model; + +namespace Tiger.Model +{ + /// <summary> + /// 实体:V_MES_WO_PTREE + /// </summary> + [Serializable] + [SugarTable("V_MES_WO_PTREE")] + public class V_MES_WO_PTREE : iViewEntity + { + #region 构造函数 + /// <summary> + /// 实体:V_MES_WO_PTREE + /// </summary> + public V_MES_WO_PTREE() {} + #endregion + + #region 公共属性 + /// <summary> + /// + /// </summary> + public string pid { get; set; } + /// <summary> + /// + /// </summary> + public string id { get; set; } + /// <summary> + /// + /// </summary> + public string wo { get; set; } + /// <summary> + /// + /// </summary> + public string prod { get; set; } + /// <summary> + /// + /// </summary> + public string cust { get; set; } + /// <summary> + /// + /// </summary> + public string code { get; set; } + /// <summary> + /// + /// </summary> + public string name { get; set; } + /// <summary> + /// + /// </summary> + public string type { get; set; } + /// <summary> + /// + /// </summary> + public int seq { get; set; } + #endregion + + #region 虚拟属性 + /*例子 + [SugarColumn(IsIgnore = true)] + public string FieldName { get; set; } + */ + [SugarColumn(IsIgnore = true)] + public string tid { get; set; } + #endregion + + #region 枚举变量 + /*例子 + public enum FieldNames + { + [Description("枚举描述0")] + Enum0, + [Description("枚举描述1")] + Enum1, + } + */ + #endregion + + #region 公共方法 + + #endregion + + }//endClass +} \ No newline at end of file diff --git a/Tiger.Model.Net/Tiger.Model.Net.csproj b/Tiger.Model.Net/Tiger.Model.Net.csproj index 62abdfc..296c265 100644 --- a/Tiger.Model.Net/Tiger.Model.Net.csproj +++ b/Tiger.Model.Net/Tiger.Model.Net.csproj @@ -167,6 +167,7 @@ <Compile Include="Entitys\MES\V_MES_ROUTE_NOE_POST.cs" /> <Compile Include="Entitys\MES\V_MES_ROUTE_PTREE.cs" /> <Compile Include="Entitys\MES\V_MES_WO_BATCH.cs" /> + <Compile Include="Entitys\MES\V_MES_WO_PTREE.cs" /> <Compile Include="Entitys\MES\V_SMT_TOOL.cs" /> <Compile Include="Entitys\MES\SMT_TOOL.cs" /> <Compile Include="Entitys\MES\SMT_TOOL_HIS.cs" /> -- Gitblit v1.9.3