From b478031d19c13092dc5f86e6d4f7fc114ea9a85d Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@DESKTOP-5BIMHQ3>
Date: 星期一, 11 三月 2024 13:28:29 +0800
Subject: [PATCH] Merge branch 'wxw'

---
 Wms/WMS.IBLL/IBllCheckServer/IStockCheckServer.cs |   13 +
 Pda/View/AsnSetting/productEnterQuantity.html     |    4 
 HTML/views/HouseWithinSetting/CRLogTask.html      |   40 +++++
 Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs           |  126 +++++++++++++++--
 Wms/Wms/Controllers/BllCheckController.cs         |   63 +++++++++
 Wms/WMS.BLL/BllCheckServer/StockCheckServer.cs    |  127 ++++++++++++++++++
 6 files changed, 347 insertions(+), 26 deletions(-)

diff --git a/HTML/views/HouseWithinSetting/CRLogTask.html b/HTML/views/HouseWithinSetting/CRLogTask.html
index 349212a..26d6a65 100644
--- a/HTML/views/HouseWithinSetting/CRLogTask.html
+++ b/HTML/views/HouseWithinSetting/CRLogTask.html
@@ -130,7 +130,7 @@
 					}}
 					{{ GetBtn1(d) }}
 				</script>
-
+				
 				<!-- 浠诲姟绫诲瀷 -->
 				<script type="text/html" id="TypeButton">
 					{{# 
@@ -141,6 +141,26 @@
 							html = `<p>鍑哄簱</p>`; 
 						} else if(d.Type=='2') { 
 							html = `<p>绉诲簱</p>`; 
+						} else {
+							
+						}
+						return html;
+						
+					}}
+				</script>
+
+				<!-- 鍗曟嵁绫诲瀷 -->
+				<script type="text/html" id="OrderTypeButton">
+					{{# 
+						var html = ``;
+						if(d.OrderType=='0'){ 
+							html = `<p>鍏ュ簱鍗�</p>`; 
+						} else if(d.OrderType=='1') { 
+							html = `<p>鍑哄簱鍗�</p>`; 
+						} else if(d.OrderType=='2') { 
+							html = `<p>鐩樼偣鍗�</p>`; 
+						} else if(d.OrderType=='3') { 
+							html = `<p>绉诲簱鍗�</p>`; 
 						} else {
 							
 						}
@@ -271,6 +291,12 @@
 						width: 95,
 						align: 'center',
 						templet: '#TypeButton',
+					}, {
+						field: 'OrderType',
+						title: '鍗曟嵁绫诲瀷',
+						width: 95,
+						align: 'center',
+						templet: '#OrderTypeButton',
 					}, {
 						field: 'IsSuccess',
 						title: '鏄惁涓嬪彂鎴愬姛',
@@ -620,7 +646,11 @@
 						var param = {
 							taskNo: data.TaskNo
 						};
-						sendData(IP + "/BllCheck/CancelCheckTask", param, 'post', function (res) {
+						var postUrl="/BllCheck/CancelCheckTask"
+						if(data.OrderType=='3'){
+							postUrl='/BllCheck/CancelMoveTask'
+						}
+						sendData(IP + postUrl, param, 'post', function (res) {
 							console.log(res);
 							if (res.code == 0) { //鎴愬姛
 								layer.msg(res.msg, {
@@ -646,7 +676,11 @@
 						var param = {
 							taskNo: data.TaskNo,
 						};
-						sendData(IP + "/BllCheck/FinishCheckTask", param, 'post', function (res) {
+						var postUrl="/BllCheck/FinishCheckTask"
+						if(data.OrderType=='3'){
+							postUrl='/BllCheck/FinishMoveTask'
+						}
+						sendData(IP + postUrl, param, 'post', function (res) {
 							console.log(res);
 							if (res.code == 0) { //鎴愬姛
 								layer.msg(res.msg, {
diff --git a/Pda/View/AsnSetting/productEnterQuantity.html b/Pda/View/AsnSetting/productEnterQuantity.html
index d8d62b5..bf23974 100644
--- a/Pda/View/AsnSetting/productEnterQuantity.html
+++ b/Pda/View/AsnSetting/productEnterQuantity.html
@@ -1524,11 +1524,11 @@
             form.on('switch(IsLianXu)', function (obj) {
                 if (obj.elem.checked) {
                     $('#BOX2').attr("style", "display:block")
-                    $('#zongDiv').attr("style", "height: 285px;")
+                    $('#zongDiv').attr("style", "height: 315px;")
                     isContinue = "1";
                 } else {
                     $('#BOX2').attr("style", "display:none")
-                    $('#zongDiv').attr("style", "height: 255px;")
+                    $('#zongDiv').attr("style", "height: 285px;")
                     isContinue = "0";
                 }
                 $('#BOXCODE2').val("");
diff --git a/Wms/WMS.BLL/BllCheckServer/StockCheckServer.cs b/Wms/WMS.BLL/BllCheckServer/StockCheckServer.cs
index d65b27e..4875522 100644
--- a/Wms/WMS.BLL/BllCheckServer/StockCheckServer.cs
+++ b/Wms/WMS.BLL/BllCheckServer/StockCheckServer.cs
@@ -1294,6 +1294,71 @@
             }
         }
 
+        //AGV绉诲簱瀹屾垚
+        public void MoveSuccess(string taskNo, int userId)
+        {
+            try
+            {
+                //褰撳墠浠诲姟淇℃伅
+                var task = Db.Queryable<LogTask>().First(m => m.TaskNo == taskNo && m.IsDel == "0");
+                if (task == null)
+                {
+                    throw new Exception($"鏈煡璇㈠埌浠诲姟鍙蜂负锛氣�榹taskNo}鈥欑殑浠诲姟淇℃伅");
+                }
+                if (task.Status == "2")
+                {
+                    throw new Exception("褰撳墠浠诲姟宸插畬鎴�");
+                }
+                Db.BeginTran();
+                //搴撳瓨涓綋鍓嶆墭鐩樼殑淇℃伅
+                var stockDetail = Db.Queryable<DataStockDetail>().Where(m => m.PalletNo == task.PalletNo).ToList();
+                var locateNo = stockDetail.Select(m => m.LocatNo).Distinct().FirstOrDefault();
+               
+                //褰撳墠浠诲姟涓殑鍌ㄤ綅淇℃伅
+                var locate = Db.Queryable<SysStorageLocat>().First(m => m.LocatNo == locateNo);
+
+                //鏇存敼浠诲姟
+                task.Status = "2";//浠诲姟鐘舵��
+                task.IsSend = 0;
+                task.IsCancel = 0;
+                task.IsFinish = 0;
+                task.FinishDate = DateTime.Now;//瀹屾垚鏃堕棿
+                Db.Updateable(task).ExecuteCommand();
+                // 鏇存敼褰撳墠浠诲姟涓殑鍌ㄤ綅鐘舵�侊紙鏀逛负0绌哄偍浣嶏級
+                locate.Status = "0"; 
+                Db.Updateable(locate).ExecuteCommand();
+                //鏇存敼搴撳瓨鏄庣粏
+                foreach (var item in stockDetail)
+                {
+                    item.Status = "0";//寰呭垎閰�
+                    item.LockQty = 0;//閿佸畾鏁伴噺鏀逛负0
+                    item.LocatNo = "";//鍌ㄤ綅鏇存敼锛堟敼涓虹┖锛�
+                    item.WareHouseNo = "";//鎵�灞炰粨搴撴洿鏀癸紙鏀逛负绌猴級
+                    item.RoadwayNo = "";//鎵�灞炲贩閬撴洿鏀癸紙鏀逛负绌猴級
+                    item.AreaNo = "";//鎵�灞炲尯鍩熸洿鏀癸紙鏀逛负绌猴級
+                    Db.Updateable(item).ExecuteCommand();
+
+                    //鏇存敼搴撳瓨鎬昏〃
+                    var stock = Db.Queryable<DataStock>().First(w => w.IsDel == "0" && w.SkuNo == item.SkuNo && w.LotNo == item.LotNo);
+                    stock.LockQty -= (decimal)item.Qty;
+                    Db.Updateable(stock).ExecuteCommand();
+                }
+
+                if (userId != 0)
+                {
+                    //娣诲姞鎿嶄綔鏃ュ織璁板綍
+                    var k = new OperationCrServer().AddLogOperationCr("搴撳唴浣滀笟", "搴撳唴鏃ュ織", taskNo, "瀹屾垚", $"鐐瑰嚮瀹屾垚鎸夐挳銆佸畬鎴愪换鍔″彿涓猴細{taskNo}鐨勪换鍔�", userId);
+                }
+                Db.CommitTran();
+
+            }
+            catch (Exception ex)
+            {
+                Db.RollbackTran();
+                throw new Exception("瀹屾垚鍙嶉澶辫触锛�" + ex.Message);
+            }
+        }
+
         //閲嶆柊涓嬪彂鐩樼偣鍑哄簱浠诲姟
         public OutCommandDto AgainSendCheckTask(string taskNo, int userId, string url)
         {
@@ -1417,7 +1482,7 @@
                     checkLog.IsDel = "1";
                     Db.Updateable(checkLog).ExecuteCommand();
                     //淇敼鍌ㄤ綅淇℃伅
-                    var locat = Db.Queryable<SysStorageLocat>().First(a => a.IsDel == "0" && a.WareHouseNo == "W01" && a.LocatNo == task.StartLocat);
+                    var locat = Db.Queryable<SysStorageLocat>().First(a => a.IsDel == "0" && a.WareHouseNo == "W02" && a.LocatNo == task.StartLocat);
                     if (locat == null)
                     {
                         throw new Exception("鏈煡璇㈠埌鍌ㄤ綅淇℃伅锛岃鏍稿疄锛�");
@@ -1441,6 +1506,66 @@
             }
         }
 
+        //鍙栨秷AGV绉诲簱浠诲姟
+        public void CancelMoveTask(string taskNo, int userId)
+        {
+            try
+            {
+                Db.BeginTran();
+
+                var task = Db.Queryable<LogTask>().First(m => m.TaskNo == taskNo && m.IsDel == "0");
+                if (task == null)
+                {
+                    throw new Exception("鏈煡璇㈠埌浠诲姟淇℃伅");
+                }
+                //淇敼浠诲姟 
+                task.IsSuccess = 0;
+                task.IsSend = 0;
+                task.IsCancel = 0;
+                task.IsFinish = 0;
+                task.Status = "4";
+                task.CancelDate = DateTime.Now;
+                Db.Updateable(task).ExecuteCommand();
+
+                //淇敼鍌ㄤ綅淇℃伅
+                var locat = Db.Queryable<SysStorageLocat>().First(a => a.IsDel == "0" && a.WareHouseNo == "W02" && a.LocatNo == task.StartLocat);
+                if (locat == null)
+                {
+                    throw new Exception("鏈煡璇㈠埌鍌ㄤ綅淇℃伅锛岃鏍稿疄锛�");
+                }
+                locat.Status = "1"; //鏈夌墿鍝�
+                Db.Updateable(locat).ExecuteCommand();
+
+                //淇敼搴撳瓨鏄庣粏
+                var stockDetail = Db.Queryable<DataStockDetail>().First(w => w.IsDel == "0" && w.PalletNo == task.PalletNo);
+                if (stockDetail == null)
+                {
+                    throw new Exception("鎵樼洏涓婄墿鏂欏簱瀛樻槑缁嗕俊鎭笉瀛樺湪,璇锋鏌�!");
+                }
+                stockDetail.Status = "0";//寰呭垎閰�
+                stockDetail.LockQty = 0;//閿佸畾鏁伴噺
+                Db.Updateable(stockDetail).ExecuteCommand();
+
+                //淇敼搴撳瓨
+                var stock = Db.Queryable<DataStock>().First(w => w.IsDel == "0" && w.SkuNo == stockDetail.SkuNo && w.LotNo == stockDetail.LotNo);
+                if (stock == null)
+                {
+                    throw new Exception("鎵樼洏涓婄墿鏂欏簱瀛樹俊鎭笉瀛樺湪,璇锋鏌�!");
+                }
+                stock.LockQty -= (decimal)stockDetail.Qty;
+                Db.Updateable(stock).ExecuteCommand();
+
+                //娣诲姞鎿嶄綔鏃ュ織璁板綍
+                var k = new OperationCrServer().AddLogOperationCr("搴撳唴浣滀笟", "搴撳唴鏃ュ織", taskNo, "鍙栨秷", $"鐐瑰嚮鍙栨秷鎸夐挳銆佸彇娑堜簡浠诲姟鍙蜂负锛歿taskNo}鐨勪换鍔�", userId);
+                Db.CommitTran();
+            }
+            catch (Exception e)
+            {
+                Db.RollbackTran();
+                throw new Exception(e.Message);
+            }
+        }
+
         #region 涓婃父绯荤粺鎺ュ彛
 
         //鐩樼偣缁撴灉杩斿洖erp
diff --git a/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs
index 91da3f6..958d468 100644
--- a/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs
+++ b/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs
@@ -6,11 +6,13 @@
 using Model.ModelDto.PdaDto;
 using SqlSugar;
 using WMS.BLL.LogServer;
+using WMS.DAL;
 using WMS.Entity.BllAsnEntity;
 using WMS.Entity.BllCheckEntity;
 using WMS.Entity.BllSoEntity;
 using WMS.Entity.Context;
 using WMS.Entity.DataEntity;
+using WMS.Entity.LogEntity;
 using WMS.Entity.SysEntity;
 using WMS.IBLL.IPdaServer;
 
@@ -880,12 +882,30 @@
             {
                 throw new Exception("璇烽�夋嫨鐩爣鍖哄煙鎴栧叆搴撳彛锛�");
             }
+            if (!string.IsNullOrEmpty(areaNo) && !string.IsNullOrEmpty(ruku))
+            {
+                throw new Exception("鐩爣鍖哄煙鍜屽叆搴撳彛涓嶈兘鍚屾椂閫夋嫨锛�");
+            }
+            string EndLocat = string.Empty;//鐩爣浣嶇疆
+            if (!string.IsNullOrEmpty(areaNo))
+            {
+                EndLocat = areaNo;
+            }
+            else
+            {
+                EndLocat = ruku;
+            }
             try
             {
                 var stockDetail = Db.Queryable<DataStockDetail>().First(w => w.IsDel == "0" && w.PalletNo == palletNo);
                 if (stockDetail == null)
                 {
-                    throw new Exception("鎵樼洏搴撳瓨淇℃伅涓嶅瓨鍦�,璇锋鏌�!");
+                    throw new Exception("鎵樼洏涓婄墿鏂欏簱瀛樻槑缁嗕俊鎭笉瀛樺湪,璇锋鏌�!");
+                }
+                var stock = Db.Queryable<DataStock>().First(w => w.IsDel == "0" && w.SkuNo == stockDetail.SkuNo && w.LotNo == stockDetail.LotNo);
+                if (stock == null)
+                {
+                    throw new Exception("鎵樼洏涓婄墿鏂欏簱瀛樹俊鎭笉瀛樺湪,璇锋鏌�!");
                 }
                 if (string.IsNullOrEmpty(stockDetail.LocatNo))
                 {
@@ -902,23 +922,50 @@
                 }
                 //寮�鍚簨鍔�
                 Db.BeginTran();
+
+                //娣诲姞鍑哄簱浠诲姟
+                var taskNo = new Common().GetMaxNo("TK");
+                var exTask = new LogTask
+                {
+                    TaskNo = taskNo,
+                    Sender = "WMS",
+                    Receiver = "AGV",
+                    IsSuccess = 0, //鏄惁涓嬪彂鎴愬姛 0澶辫触 1鎴愬姛
+
+                    StartLocat = stockDetail.LocatNo,//璧峰浣嶇疆
+                    EndLocat = EndLocat,//鐩爣浣嶇疆
+                    PalletNo = palletNo,//鎵樼洏鐮�
+                    IsSend = 1,//鏄惁鍙啀娆′笅鍙�
+                    IsCancel = 1,//鏄惁鍙彇娑�
+                    IsFinish = 1,//鏄惁鍙畬鎴�
+                    Type = "2",//浠诲姟绫诲瀷 0 鍏ュ簱浠诲姟 1 鍑哄簱浠诲姟  2 绉诲簱浠诲姟
+                    Status = "0",//浠诲姟鐘舵��0锛氱瓑寰呮墽琛�1姝e湪鎵ц2鎵ц瀹屾垚
+                    OrderType = "3",//0 鍏ュ簱鍗� 1 鍑哄簱鍗�  2 鐩樼偣鍗�  3 绉诲簱鍗�
+
+                    CreateTime = DateTime.Now
+                };
+                Db.Insertable(exTask).ExecuteCommand();
+
                 //淇敼搴撳瓨鏄庣粏淇℃伅
-                stockDetail.WareHouseNo = "";
-                stockDetail.RoadwayNo = "";
-                stockDetail.AreaNo = "";
-                stockDetail.LocatNo = "";
-
+                stockDetail.Status = "4";//绉诲簱閿佸畾
+                stockDetail.LockQty = stockDetail.Qty;//閿佸畾搴撳瓨鏁伴噺
                 Db.Updateable(stockDetail).ExecuteCommand();
-                //淇敼鍌ㄤ綅鍦板潃鐘舵��
-                storageLocat.Status = "0";//绌哄偍浣�
+                //淇敼搴撳瓨淇℃伅
+                stock.LockQty += (decimal)stockDetail.Qty;
+                Db.Updateable(stock).ExecuteCommand();
 
+                //淇敼鍌ㄤ綅鍦板潃鐘舵��
+                storageLocat.Status = "3";//0锛氱┖鍌ㄤ綅 1锛氭湁鐗╁搧 2锛氬叆搴撲腑 3锛氬嚭搴撲腑 4锛氱Щ鍏ヤ腑 5锛氱Щ鍑轰腑 
                 Db.Updateable(storageLocat).ExecuteCommand();
+
+                //娣诲姞鎿嶄綔鏃ュ織璁板綍
+                var k = new OperationCrServer().AddLogOperationCr("PDA妯″潡", "AGV杞繍", palletNo, "绉诲簱", $"PDA鍛煎彨灏忚溅瀵规墭鐩樺彿锛歿palletNo}鍙戣捣杞繍", userId);
+                //鎻愪氦浜嬪姟
+                Db.CommitTran();
 
                 #region 鍛煎彨灏忚溅浠g爜
 
                 #endregion
-                //鎻愪氦浜嬪姟
-                Db.CommitTran();
             }
             catch (Exception ex)
             {
@@ -962,7 +1009,12 @@
                 var stockDetail = Db.Queryable<DataStockDetail>().First(w => w.IsDel == "0" && w.PalletNo == palletNo);
                 if (stockDetail == null)
                 {
-                    throw new Exception("鎵樼洏搴撳瓨淇℃伅涓嶅瓨鍦�,璇锋鏌�!");
+                    throw new Exception("鎵樼洏涓婄墿鏂欏簱瀛樹俊鎭笉瀛樺湪,璇锋鏌�!");
+                }
+                var stock = Db.Queryable<DataStock>().First(w => w.IsDel == "0" && w.SkuNo == stockDetail.SkuNo && w.LotNo == stockDetail.LotNo);
+                if (stock == null)
+                {
+                    throw new Exception("鎵樼洏涓婄墿鏂欏簱瀛樹俊鎭笉瀛樺湪,璇锋鏌�!");
                 }
                 if (string.IsNullOrEmpty(stockDetail.LocatNo))
                 {
@@ -977,25 +1029,59 @@
                 {
                     throw new Exception("鍌ㄤ綅淇℃伅涓嶅瓨鍦�,璇锋鏌�!");
                 }
+                var storageArea = Db.Queryable<SysStorageArea>().First(w => w.IsDel == "0" && w.AreaNo == areaNo);
+                if (storageArea == null)
+                {
+                    throw new Exception("鎵�閫夊尯鍩熶俊鎭笉瀛樺湪,璇锋鏌�!");
+                }
+                string EndLocat = string.Empty;//鐩爣浣嶇疆
+                EndLocat= Db.Queryable<SysStorageLocat>().Where(w => w.IsDel == "0" && w.AreaNo==storageArea.AreaNo && w.Status=="0" &&w.Flag=="0").Select(s=>s.LocatNo).First();
                 //寮�鍚簨鍔�
                 Db.BeginTran();
+
+                //娣诲姞鍑哄簱浠诲姟
+                var taskNo = new Common().GetMaxNo("TK");
+                var exTask = new LogTask
+                {
+                    TaskNo = taskNo,
+                    Sender = "WMS",
+                    Receiver = "AGV",
+                    IsSuccess = 0, //鏄惁涓嬪彂鎴愬姛 0澶辫触 1鎴愬姛
+
+                    StartLocat = stockDetail.LocatNo,//璧峰浣嶇疆
+                    EndLocat = EndLocat,//鐩爣浣嶇疆
+                    PalletNo = palletNo,//鎵樼洏鐮�
+                    IsSend = 1,//鏄惁鍙啀娆′笅鍙�
+                    IsCancel = 1,//鏄惁鍙彇娑�
+                    IsFinish = 1,//鏄惁鍙畬鎴�
+                    Type = "2",//浠诲姟绫诲瀷 0 鍏ュ簱浠诲姟 1 鍑哄簱浠诲姟  2 绉诲簱浠诲姟
+                    Status = "0",//浠诲姟鐘舵��0锛氱瓑寰呮墽琛�1姝e湪鎵ц2鎵ц瀹屾垚
+                    OrderType = "3",//0 鍏ュ簱鍗� 1 鍑哄簱鍗�  2 鐩樼偣鍗�  3 绉诲簱鍗�
+
+                    CreateTime = DateTime.Now
+                };
+                Db.Insertable(exTask).ExecuteCommand();
+
                 //淇敼搴撳瓨鏄庣粏淇℃伅
-                stockDetail.WareHouseNo = "";
-                stockDetail.RoadwayNo = "";
-                stockDetail.AreaNo = "";
-                stockDetail.LocatNo = "";
-
+                stockDetail.Status = "4";//绉诲簱閿佸畾
+                stockDetail.LockQty = stockDetail.Qty;//閿佸畾搴撳瓨鏁伴噺
                 Db.Updateable(stockDetail).ExecuteCommand();
-                //淇敼鍌ㄤ綅鍦板潃鐘舵��
-                storageLocat.Status = "0";//绌哄偍浣�
+                //淇敼搴撳瓨淇℃伅
+                stock.LockQty += (decimal)stockDetail.Qty;
+                Db.Updateable(stock).ExecuteCommand();
 
+                //淇敼鍌ㄤ綅鍦板潃鐘舵��
+                storageLocat.Status = "3";//0锛氱┖鍌ㄤ綅 1锛氭湁鐗╁搧 2锛氬叆搴撲腑 3锛氬嚭搴撲腑 4锛氱Щ鍏ヤ腑 5锛氱Щ鍑轰腑 
                 Db.Updateable(storageLocat).ExecuteCommand();
+
+                //娣诲姞鎿嶄綔鏃ュ織璁板綍
+                var k = new OperationCrServer().AddLogOperationCr("PDA妯″潡", "AGV杞繍", palletNo, "绉诲簱", $"PDA鍛煎彨灏忚溅瀵规墭鐩樺彿锛歿palletNo}鍙戣捣杞繍", userId);
+                //鎻愪氦浜嬪姟
+                Db.CommitTran();
 
                 #region 鍛煎彨灏忚溅浠g爜
 
                 #endregion
-                //鎻愪氦浜嬪姟
-                Db.CommitTran();
             }
             catch (Exception ex)
             {
diff --git a/Wms/WMS.IBLL/IBllCheckServer/IStockCheckServer.cs b/Wms/WMS.IBLL/IBllCheckServer/IStockCheckServer.cs
index d5cfa71..4649c24 100644
--- a/Wms/WMS.IBLL/IBllCheckServer/IStockCheckServer.cs
+++ b/Wms/WMS.IBLL/IBllCheckServer/IStockCheckServer.cs
@@ -123,5 +123,18 @@
         /// <param name="url">涓婁紶璺緞</param>
         /// <param name="userId">鎿嶄綔浜�</param>
         bool FinishCr(int id, string url, int userId);
+
+        /// <summary>
+        /// AGV绉诲簱瀹屾垚
+        /// </summary>
+        /// <param name="taskNo"></param>
+        /// <param name="userId"></param>
+        void MoveSuccess(string taskNo, int userId);
+        /// <summary>
+        /// 鍙栨秷AGV绉诲簱浠诲姟
+        /// </summary>
+        /// <param name="taskNo"></param>
+        /// <param name="userId"></param>
+        void CancelMoveTask(string taskNo, int userId);
     }
 }
diff --git a/Wms/Wms/Controllers/BllCheckController.cs b/Wms/Wms/Controllers/BllCheckController.cs
index 9a1220f..0791db7 100644
--- a/Wms/Wms/Controllers/BllCheckController.cs
+++ b/Wms/Wms/Controllers/BllCheckController.cs
@@ -405,5 +405,68 @@
 
         #endregion
 
+
+        #region AGV杞繍
+        /// <summary>
+        /// AGV绉诲簱瀹屾垚
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult FinishMoveTask(CheckTaskVm model)
+        {
+            try
+            {
+                //鑾峰彇褰撳墠鐧诲綍鐨勭敤鎴稩D
+                var claimsIdentity = this.User.Identity as ClaimsIdentity;
+                if (claimsIdentity == null)
+                {
+                    return Ok(new { code = 1, msg = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" });
+                }
+                var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
+                if (string.IsNullOrWhiteSpace(userId))
+                {
+                    return Ok(new { code = 1, msg = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" });
+                }
+                _stockCheckSvc.MoveSuccess(model.taskNo, int.Parse(userId));
+
+                return Ok(new { code = 0, msg = "鎴愬姛瀹屾垚浠诲姟", data = "" });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { code = 1, msg = e.Message });
+            }
+        }
+        /// <summary>
+        /// 鍙栨秷AGV绉诲簱浠诲姟
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult CancelMoveTask(CheckTaskVm model)
+        {
+            try
+            {
+                //鑾峰彇褰撳墠鐧诲綍鐨勭敤鎴稩D
+                var claimsIdentity = this.User.Identity as ClaimsIdentity;
+                if (claimsIdentity == null)
+                {
+                    return Ok(new { code = 1, msg = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" });
+                }
+                var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
+                if (string.IsNullOrWhiteSpace(userId))
+                {
+                    return Ok(new { code = 1, msg = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" });
+                }
+                _stockCheckSvc.CancelMoveTask(model.taskNo, int.Parse(userId));
+
+                return Ok(new { code = 0, msg = "鎴愬姛鍙栨秷浠诲姟", data = "" });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { code = 1, msg = e.Message });
+            }
+        }
+        #endregion
     }
 }

--
Gitblit v1.8.0