From a0a0df2e824b6fe7e5a3c0afce78127fecf84fc9 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期一, 03 十一月 2025 08:23:05 +0800
Subject: [PATCH] ERP接口代码更新,WCS代码优化,出入库分配优化

---
 项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs |  160 ++++++++++++++++++++--------------------------------
 1 files changed, 62 insertions(+), 98 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
index e3ea19a..00d98e3 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
@@ -4,6 +4,7 @@
 using WIDESEA_Common.CommonEnum;
 using WIDESEA_Core;
 using WIDESEA_Core.BaseController;
+using WIDESEA_DTO.Outbound;
 using WIDESEA_DTO.Stock;
 using WIDESEA_DTO.Task;
 using WIDESEA_ITaskInfoService;
@@ -21,6 +22,7 @@
         public TaskController(ITaskService service) : base(service)
         {
         }
+
         /// <summary>
         /// WCS鐢宠鍏ュ簱浠诲姟(涓嶅垎閰嶈揣浣�)
         /// </summary>
@@ -46,18 +48,16 @@
         }
 
         /// <summary>
-        /// 
+        /// 鍚慦MS鐢宠鍑哄簱AGV缁堢偣
         /// </summary>
-        /// <param name="taskNum"></param>
-        /// <param name="roadwayNo"></param>
-        /// <param name="heightType"></param>
+        /// <param name="taskNum">浠诲姟鍙�</param>
         /// <returns></returns>
-        [HttpPost, HttpGet, Route("AssignInboundTaskLocationByHeight"), AllowAnonymous]
-        public WebResponseContent AssignInboundTaskLocationByHeight(int taskNum, string roadwayNo, int heightType)
+        [HttpPost, HttpGet, Route("AssignOutTargetAddress"), AllowAnonymous]
+        public WebResponseContent AssignOutTargetAddress(int taskNum)
         {
-            return Service.AssignInboundTaskLocationByHeight(taskNum, roadwayNo, heightType);
+            return Service.AssignOutTargetAddress(taskNum);
         }
-        
+
         /// <summary>
         /// 鎴愬搧绌烘鍥炲簱
         /// </summary>
@@ -71,13 +71,13 @@
         }
 
         /// <summary>
-        /// 杈呮枡鍏ュ簱
+        /// 杈呮枡/鎴愬搧涓存椂鍏ュ簱
         /// </summary>
         /// <returns></returns>
         [HttpPost, HttpGet, Route("InboundFLTask"), AllowAnonymous]
-        public WebResponseContent InboundFLOrCPTask(string barCode, string startPoint, string matCode, int matCount)
+        public WebResponseContent InboundFLOrCPTask(string barCode, string startPoint, string matCode, int matCount, int oneCount)
         {
-            return Service.InboundFLOrCPTask(barCode, startPoint, matCode, matCount);
+            return Service.InboundFLOrCPTask(barCode, startPoint, matCode, matCount,oneCount);
         }
 
         /// <summary>
@@ -86,11 +86,11 @@
         /// <param name="taskNum">浠诲姟鍙�</param>
         /// <param name="locationCode"></param>
         /// <returns></returns>
-        [HttpPost, HttpGet, Route("IsRelocation"), AllowAnonymous]
-        public WebResponseContent IsRelocation(int taskNum, string locationCode)
-        {
-            return Service.IsRelocation(taskNum, locationCode);
-        }
+        //[HttpPost, HttpGet, Route("IsRelocation"), AllowAnonymous]
+        //public WebResponseContent IsRelocation(int taskNum, string locationCode)
+        //{
+        //    return Service.IsRelocation(taskNum, locationCode);
+        //}
 
         /// <summary>
         /// 浠诲姟瀹屾垚
@@ -114,51 +114,15 @@
         {
             return Service.PushTasksToWCSSingle(taskNum, agvDescription);
         }
-        /// <summary>
-        /// 閫夋嫨搴撳瓨鐢熸垚鍑哄簱浠诲姟
-        /// </summary>
-        /// <param name="id"></param>
-        /// <returns></returns>
-        [HttpPost, Route("Outbound"), AllowAnonymous]
-        public WebResponseContent Outbound(int id)
-        {
-            return Service.Outbound(id);
-        }
 
         /// <summary>
-        /// 鍒嗛厤宸烽亾(甯︿换鍔″彿鍙婇珮搴�)
+        /// 閫夋嫨搴撳瓨鐢熸垚鑰佸巶鍑哄簱浠诲姟
         /// </summary>
-        /// <param name="roadwayNos"></param>
-        /// <param name="taskNum"></param>
-        /// <param name="heightType"></param>
         /// <returns></returns>
-        [HttpPost, Route("AssignRoadwayByHeight"), AllowAnonymous]
-        public WebResponseContent AssignRoadwayByHeight([FromBody] List<string> roadwayNos, int taskNum, int heightType = 0)
+        [HttpPost, Route("OldYLOutbound"), AllowAnonymous]
+        public WebResponseContent Outbound([FromBody] List<int> ids)
         {
-            return Service.AssignRoadwayByHeight(roadwayNos, taskNum, heightType);
-        }
-
-        /// <summary>
-        /// 鍒嗛厤宸烽亾(甯︿换鍔″彿)
-        /// </summary>
-        /// <param name="taskNum"></param>
-        /// <param name="roadwayNos"></param>
-        /// <returns></returns>
-        [HttpPost, Route("AssignRoadway"), AllowAnonymous]
-        public WebResponseContent AssignRoadway(int taskNum, [FromBody] List<string> roadwayNos,int heightType)
-        {
-            return Service.AssignRoadway(taskNum, roadwayNos, heightType);
-        }
-
-        /// <summary>
-        /// 鍒嗛厤宸烽亾
-        /// </summary>
-        /// <param name="roadwayNos"></param>
-        /// <returns></returns>
-        [HttpPost, Route("SingleAssignRoadway"), AllowAnonymous]
-        public WebResponseContent SingleAssignRoadway([FromBody] List<string> roadwayNos)
-        {
-            return Service.SingleAssignRoadway(roadwayNos);
+            return Service.Outbound(ids);
         }
 
         /// <summary>
@@ -171,6 +135,7 @@
         {
             return Service.UpdateTaskInfo(task);
         }
+
         /// <summary>
         /// 鍘熸枡鍏ュ簱浠诲姟璇锋眰
         /// </summary>
@@ -182,16 +147,29 @@
         {
             return Service.RequestYLWMSTaskSimple(stationCode,palletCode);
         }
+
         /// <summary>
-        /// 鍘熸枡鍏ュ簱鐢宠
+        /// 鍘熸枡鍏ュ簱鐢宠(骞冲彴/鑰佸巶鍖�)
         /// </summary>
         /// <param name="palletCode">鏉$爜</param>
         /// <returns></returns>
         [HttpPost, HttpGet, Route("YLPurchaseBoxing"), AllowAnonymous]
-        public WebResponseContent YLPurchaseBoxing(string palletCode)
+        public WebResponseContent YLPurchaseBoxing(string palletCode,decimal weight=0,decimal thickness = 0, decimal wide = 0, string stationCode = "")
         {
-            return Service.YLPurchaseBoxing(palletCode);
+            return Service.YLPurchaseBoxing(palletCode,weight,thickness,wide,stationCode);
         }
+
+        /// <summary>
+        /// 鍘熸枡閲囪喘缁戝畾RFID
+        /// </summary>
+        /// <param name="palletCode">绾稿嵎鏉$爜</param>
+        /// <returns></returns>
+        [HttpPost, HttpGet, Route("PurchaseBoxing"), AllowAnonymous]
+        public WebResponseContent PurchaseBoxing(string palletCode)
+        {
+            return Service.PurchaseBoxing(palletCode);
+        }
+
         /// <summary>
         /// 鍒嗛厤鍘熸枡鍏ュ簱宸烽亾
         /// </summary>
@@ -211,54 +189,45 @@
         /// <summary>
         /// 鎴愬搧鍑哄簱浠诲姟璇锋眰
         /// <param name="targetId">
-        /// 1 鏈堝彴鍖�<br/>
-        /// 2 鍏ュ簱鍖�<br/>
-        /// 3 缁囧竷鍖�<br/>
-        /// 4 娣嬭啘鍖�<br/>
-        /// 5 鏆傚瓨鍖�<br/>
-        /// 6 鍗板埛鍖�<br/>
-        /// 7 鍐插垏鍖�<br/>
-        /// 8 鍘熸枡鍖�<br/>
-        /// 9 绾歌鍖�<br/>
-        /// 10 甯冭鍖�<br/>
-        /// 11 绾告澂鍖�<br/>
-        /// 12 闆惧寲鍖�<br/>
+        ///涓�妤兼湀鍙扮爜澶� = 1,
+        ///涓�妤兼棤绾虹粐甯� = 2,
+        ///涓�妤兼棤绾烘穻鑶� = 3,
+        ///涓�妤兼棤绾虹紦瀛� = 4,
+        ///涓�妤肩焊寮犳穻鑶� = 5,
+        ///涓�妤煎嵃鍒� = 6,
+        ///涓�妤煎垎鍒� = 7,
+        ///涓�妤兼ā鍒� = 8,
+        ///涓�妤煎啿鍒� = 9,
+        ///涓�妤煎師鏂� = 10,
+        ///涓�妤兼垚鍝� = 11,
+        ///浜屾ゼ鍘熸枡 = 12,
+        ///浜屾ゼ鎴愬搧 = 13,
+        ///浜屾ゼ鏃犵汉甯冭 = 14,
+        ///浜屾ゼ绾歌 = 15,
+        ///浜屾ゼ绾告澂 = 16,
+        ///浜屾ゼ闆惧寲 = 17
         /// </param>
         /// </summary>
         /// <returns></returns>
         [HttpPost, HttpGet, Route("RequestCPWMSTaskOut"), AllowAnonymous]
-        public WebResponseContent RequestCPWMSTaskOut(string materialCode,int Count, int targetId)
+        public WebResponseContent RequestCPWMSTaskOut(string materialCode,int outCount, string targetId)
         {
-            return Service.RequestCPWMSTaskOut(materialCode, Count, targetId);
+            return Service.RequestCPWMSTaskOut(materialCode, outCount, targetId);
         }
-
-        ///// <summary>
-        ///// 鏃犵汉甯冨嚭搴�
-        ///// </summary>
-        ///// <returns></returns>
-        //[HttpPost, HttpGet, Route("RequestWFBWMSTaskOut"), AllowAnonymous]
-        //public WebResponseContent RequestWFBWMSTaskOut(int Count)
-        //{
-        //    return Service.RequestWFBWMSTaskOut(Count);
-        //}
 
         /// <summary>
         /// 鍘熸枡鍑哄簱浠诲姟
         /// </summary>
-        /// <param name="materielCode">鐗╂枡浠g爜</param>
-        /// <param name="materielWide">鐗╂枡骞呭</param>
         /// <returns></returns>
         [HttpPost, HttpGet, Route("RequestYLWMSTaskOut"), AllowAnonymous]
-        public WebResponseContent RequestYLWMSTaskOut(string materielCode,int materielWide, int count,string address="")
+        public WebResponseContent RequestYLWMSTaskOut([FromBody] YLWMSTaskOutDTO yLWMSTaskOutDTO)
         {
-            return Service.RequestYLWMSTaskOut(materielCode, materielWide, count, address);
+            return Service.RequestYLWMSTaskOut(yLWMSTaskOutDTO);
         }
+
         /// <summary>
         /// 鍘熸枡绉诲簱浠诲姟
         /// </summary>
-        /// <param name="startAddress"></param>
-        /// <param name="endAddress"></param>
-        /// <param name="roadWay"></param>
         /// <returns></returns>
         [HttpPost, HttpGet, Route("Relocation"), AllowAnonymous]
         public WebResponseContent IsRelocation(string startAddress, string endAddress, string roadWay)
@@ -274,6 +243,7 @@
         {
             return Service.RelocationRoadWay(roadWay, Count);
         }
+
         /// <summary>
         /// 鍒嗛厤鎴愬搧宸烽亾
         /// </summary>
@@ -283,6 +253,7 @@
         {
             return Service.AssignCPRoadwayNo();
         }
+
         /// <summary>
         /// 鍗板埛浣欐枡閫�鏂欎换鍔�
         /// </summary>
@@ -293,6 +264,7 @@
         {
             return Service.PrintBackInbound(saveModel);
         }
+
         /// <summary>
         /// 鍗板埛涓嬫枡浠诲姟
         /// </summary>
@@ -302,14 +274,6 @@
         public WebResponseContent PrintInbound([FromBody] SaveModel saveModel)
         {
             return Service.PrintInbound(saveModel);
-        }
-        /// <summary>
-        /// 鍒涘缓鍘熺焊鐢熶骇鎺掔▼鍑哄簱浠诲姟
-        /// </summary>
-        [HttpPost, HttpGet, Route("CreateBSTOutboundTasks"), AllowAnonymous]
-        public WebResponseContent CreateBSTOutboundTasks([FromBody] int[] keys)
-        {
-            return Service.CreateBSTOutboundTasks(keys);
         }
     }
 }

--
Gitblit v1.9.3