From daf2a4075e8ce949cda132de6a03b7ea86597b37 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周日, 18 5月 2025 14:30:56 +0800
Subject: [PATCH] 33

---
 PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Controller/WorkPlanPublicController.cs |   98 ++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 88 insertions(+), 10 deletions(-)

diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Controller/WorkPlanPublicController.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Controller/WorkPlanPublicController.cs
index 0ad0a16..c2ecf7d 100644
--- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Controller/WorkPlanPublicController.cs
+++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Controller/WorkPlanPublicController.cs
@@ -60,12 +60,23 @@
         [Route("Pick")]
         public virtual async Task<MesOrderResponse> Pick([FromBody] PickInput input)
         {
-            MyCurrentUser myCurrentUser = new MyCurrentUser()
+            try
             {
-                UserAccount = _currentUser.UserAccount,
-                UserId = _currentUser.UserId
-            };
-            return await sharedService.CommonPick(_serviceProvider, input, myCurrentUser);
+                MyCurrentUser myCurrentUser = new MyCurrentUser()
+                {
+                    UserAccount = _currentUser.UserAccount,
+                    UserId = _currentUser.UserId
+                };
+                return await sharedService.CommonPick(_serviceProvider, input, myCurrentUser);
+            }
+            catch (Exception ex)
+            {
+                return new MesOrderResponse()
+                {
+                    Code = "400",
+                    Message = ex.Message
+                };
+            }
         }
 
 
@@ -79,14 +90,81 @@
         [Route("CallMaterial")]
         public virtual async Task<MesOrderResponse> CallMaterial([FromBody] CallMaterialByDataIdentifierInput input)
         {
-            MyCurrentUser myCurrentUser = new MyCurrentUser()
+            try
             {
-                UserAccount = _currentUser.UserAccount,
-                UserId = _currentUser.UserId
-            };
-            return await sharedService.CallMaterial(input, _serviceProvider, myCurrentUser);
+                MyCurrentUser myCurrentUser = new MyCurrentUser()
+                {
+                    UserAccount = _currentUser.UserAccount,
+                    UserId = _currentUser.UserId
+                };
+                return await sharedService.CallMaterial(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("StartProduction")]
+        public virtual async Task<MesOrderResponse> StartProduction([FromBody] StartProductionInput input)
+        {
+            try
+            {
+                MyCurrentUser myCurrentUser = new MyCurrentUser()
+                {
+                    UserAccount = _currentUser.UserAccount,
+                    UserId = _currentUser.UserId
+                };
+                return await sharedService.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("FinishProduction")]
+        public virtual async Task<MesOrderResponse> FinishProduction([FromBody] CompleteAssemblyProcessInput input)
+        {
+            try
+            {
+                MyCurrentUser myCurrentUser = new MyCurrentUser()
+                {
+                    UserAccount = _currentUser.UserAccount,
+                    UserId = _currentUser.UserId
+                };
+                return await sharedService.CompleteAssemblyProcess(_serviceProvider, input, myCurrentUser);
+            }
+            catch (Exception ex)
+            {
+                return new MesOrderResponse()
+                {
+                    Code = "400",
+                    Message = ex.Message
+                };
+            }
+        }
     }
 }

--
Gitblit v1.9.3