schangxiang@126.com
2025-05-21 0e42f871905f207658d822fcbe29aeb57b2156af
PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Controller/WorkPlanPublicController.cs
@@ -3,6 +3,7 @@
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;
@@ -112,6 +113,64 @@
        }
        /// <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>