| | |
| | | using CMS.Plugin.PipeLineLems.Application.Contracts.Dtos.WorkPlan; |
| | | using CMS.Plugin.PipeLineLems.Application.Contracts.Services; |
| | | using CMS.Plugin.PipeLineLems.Application.Implements; |
| | | using CmsQueryExtensions; |
| | | using CmsQueryExtensions.Entitys; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Mvc; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 下发法兰冲码 |
| | | /// </summary> |
| | | /// <param name="input">标识符.</param> |
| | | /// <returns></returns> |
| | | [Authorize] |
| | | [HttpPost] |
| | | [Route("SendFlangeCode")] |
| | | public virtual async Task<MesOrderResponse> SendFlangeCode([FromBody] SendFlangeCodeInput input) |
| | | { |
| | | try |
| | | { |
| | | MyCurrentUser myCurrentUser = new MyCurrentUser() |
| | | { |
| | | UserAccount = _currentUser.UserAccount, |
| | | UserId = _currentUser.UserId |
| | | }; |
| | | return await sharedService.SendFlangeCode_StartProduction(input, _serviceProvider, myCurrentUser); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return new MesOrderResponse() |
| | | { |
| | | Code = "400", |
| | | Message = ex.Message |
| | | }; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 法兰冲码完工 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [Authorize] |
| | | [HttpPost] |
| | | [Route("SendFlangeCode_FinishProduction")] |
| | | public virtual async Task<MesOrderResponse> SendFlangeCode_FinishProduction([FromBody] CompleteAssemblyProcessInput input) |
| | | { |
| | | try |
| | | { |
| | | MyCurrentUser myCurrentUser = new MyCurrentUser() |
| | | { |
| | | UserAccount = _currentUser.UserAccount, |
| | | UserId = _currentUser.UserId |
| | | }; |
| | | return await sharedService.SendFlangeCode_CompleteAssemblyProcess(_serviceProvider, input, myCurrentUser); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return new MesOrderResponse() |
| | | { |
| | | Code = "400", |
| | | Message = ex.Message |
| | | }; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 开工 |
| | | /// </summary> |
| | | /// <param name="input"></param> |