Tiger.Api/Controllers/MES/MESController.BIZ_MES_WO.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Tiger.Business.MES/BIZ_MES_WO.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Tiger.IBusiness/MES/IMES_WO.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Tiger.Model.Net/Entitys/MES/ParameterEntity/BizMesWoParameter.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Tiger.Model.Net/Tiger.Model.Net.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Tiger.Api/Controllers/MES/MESController.BIZ_MES_WO.cs
@@ -3,6 +3,7 @@ using System.Threading.Tasks; using Tiger.IBusiness; using Tiger.Model; using Tiger.Model.Entitys.MES.BizMesWo; using Tiger.Model.Entitys.MES.BizMesWoBatch; namespace Tiger.Api.Controllers.MES @@ -72,5 +73,26 @@ } return Ok(response); } /// <summary> /// æ´æ°å·¥åç¶æ /// </summary> /// <param name="action"></param> /// <returns></returns> [HttpPost] [Route("api/[controller]/[action]")] public async Task<IActionResult> UpdateWoStatus([FromBody] ApiAction<BizMesWoInput> action) { ApiAction response = new(); try { response = response.GetResponse(await DI.Resolve<IBIZ_MES_WO>().UpdateWoStatus(action.Data)); } catch (System.Exception ex) { response = response.GetResponse().CatchExceptionWithLog(ex); } return Ok(response); } } } Tiger.Business.MES/BIZ_MES_WO.cs
@@ -12,6 +12,7 @@ using Tiger.IBusiness; using Microsoft.AspNetCore.Http; using Tiger.Model.Entitys.MES.BizMesWoBatch; using Tiger.Model.Entitys.MES.BizMesWo; namespace Tiger.Business.MES { @@ -156,5 +157,48 @@ } return result; } /// <summary> /// æ´æ°å·¥åç¶æ /// </summary> /// <param name="input"></param> /// <returns></returns> /// <exception cref="NotImplementedException"></exception> public async Task<ApiAction> UpdateWoStatus(BizMesWoInput input) { var result = new ApiAction(); try { //ä¿ååç夿,å¹¶çææ¹æ¬¡å· var _wo = await Biz.Db.Queryable<BIZ_MES_WO>().Where(x => x.ORDER_NO == input.WorkOrder).FirstAsync(); if (_wo != null) { _wo.STATUS = input.Status < 0 ? _wo.STATUS : input.Status; _wo.ROUTE_STATUS = input.RouteStatus; } else { result.IsSuccessed = false; result.LocaleMsg = new($"å·¥å[{input.WorkOrder}]ä¸åå¨"); return result; } var db = Biz.Db; var dbTran = db.UseTran(() => { db.Updateable(_wo, input.UserId).ExecuteCommand(); }); if (!dbTran.IsSuccess) { result.IsSuccessed = false; result.LocaleMsg = new($"æ´æ°å·¥åç¶æå¼å¸¸"); } } catch (Exception ex) { result.CatchExceptionWithLog(ex, "æ´æ°å·¥åç¶æå¼å¸¸"); } return result; } } } Tiger.IBusiness/MES/IMES_WO.cs
@@ -6,6 +6,7 @@ using System.Text; using System.Threading.Tasks; using Tiger.Model; using Tiger.Model.Entitys.MES.BizMesWo; using Tiger.Model.Entitys.MES.BizMesWoBatch; namespace Tiger.IBusiness @@ -15,5 +16,6 @@ public Task<ApiAction> SaveMesWo(BIZ_MES_WO wo); public Task<ApiAction> DeleteMesWo(string woId); public Task<ApiAction> SaveMesBatchWo(SaveWoBatchInput input); public Task<ApiAction> UpdateWoStatus(BizMesWoInput input); } } Tiger.Model.Net/Entitys/MES/ParameterEntity/BizMesWoParameter.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,16 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Tiger.Model.Entitys.MES.BizMesWo { public class BizMesWoInput { public string WorkOrder { get; set; } public string UserId { get; set; } public int Status { get; set; } public int RouteStatus { get; set; } } } Tiger.Model.Net/Tiger.Model.Net.csproj
@@ -149,6 +149,7 @@ <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\BizMesWoParameter.cs" /> <Compile Include="Entitys\MES\ParameterEntity\BizMesWoBatchParameter.cs" /> <Compile Include="Entitys\MES\ParameterEntity\SmtLoadingReturn.cs" /> <Compile Include="Entitys\MES\ParameterEntity\SmtLoadingInput.cs" />