From 69f2d2a5b14ee9edc242c3fc9c69dd8180941823 Mon Sep 17 00:00:00 2001
From: liulijun <liulijun@hnkhzn.com>
Date: 星期二, 03 二月 2026 17:37:36 +0800
Subject: [PATCH] 1
---
代码管理/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Reloaction.cs | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 101 insertions(+), 1 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Reloaction.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Reloaction.cs"
index f018f52..f990f5f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Reloaction.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Reloaction.cs"
@@ -1,4 +1,4 @@
-锘縰sing OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
+锘匡豢using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -274,5 +274,105 @@
}
return content;
}
+
+ /// <summary>
+ /// 鏂欐璇锋眰鍏ュ簱
+ /// </summary>
+ /// <param name="contaionerNo">鏂欐缂栧彿</param>
+ /// <param name="originalArea">褰撳墠鎵爜鎵�鍦ㄥ尯鍩�</param>
+ /// <param name="originalLocation">褰撳墠鎵弿鎵�鍦ㄧ偣浣�</param>
+ /// <returns></returns>
+ public WebResponseContent qwe(string contaionerNo, string originalArea, string originalLocation)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ _unitOfWorkManage.BeginTran();
+
+ if (string.IsNullOrEmpty(contaionerNo) || string.IsNullOrEmpty(originalArea) || string.IsNullOrEmpty(originalLocation))
+ {
+ content.Error("鍙傛暟涓嶈兘涓虹┖");
+ return content;
+ }
+
+ // 1. 鏍规嵁瀹瑰櫒缂栧彿鏌ヨ搴撳瓨淇℃伅
+ Dt_BlankStockInfo balnkstockInfo = BaseDal.Db.Queryable<Dt_BlankStockInfo>().Where(x => x.ContainerCode == contaionerNo).FirstOrDefault();
+ if (balnkstockInfo != null)
+ {
+ content.Error($"{contaionerNo}搴撳瓨宸插瓨鍦�");
+ return content;
+ }
+
+ // 2. 鏍规嵁鏂欐缂栧彿鏌ヨ浠诲姟淇℃伅
+ Dt_Task task = BaseDal.QueryFirst(x => x.ContainerNo == contaionerNo);
+ if (task != null)
+ {
+ content.Error($"{contaionerNo}浠诲姟宸插瓨鍦�");
+ return content;
+ }
+
+ // 3. 鏍规嵁褰撳墠鎵爜鎵�鍦ㄥ尯鍩熷拰鐐逛綅鏌ヨ浣嶇疆淇℃伅
+ Dt_LocationInfo originalLocationInfo = _basicRepository.LocationInfoRepository.QueryFirst(x => x.AreaCode == originalArea && x.LocationCode == originalLocation);
+ if (originalLocationInfo == null)
+ {
+ content.Error("鏈壘鍒板綋鍓嶆壂鐮佹墍鍦ㄤ綅缃俊鎭�");
+ return content;
+ }
+
+ // 4. 鍒涘缓缁勭洏淇℃伅
+ Dt_BlankStockInfo info = new Dt_BlankStockInfo()
+ {
+ ContainerCode = contaionerNo,
+ LocationCode = "",
+ StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt(),
+ ContainerType = 1,
+ WarehouseId = WarehouseEnum.FLPL.ObjToInt(),
+ OrderNo = ""
+ };
+ BaseDal.Db.Insertable(info).ExecuteReturnIdentity();
+
+ // 5. 鍒涘缓鍏ュ簱浠诲姟
+ Dt_Task newTask = new Dt_Task()
+ {
+ Roadway = originalLocationInfo.RoadwayNo,
+ WarehouseId = WarehouseEnum.FLPL.ObjToInt(),
+ CurrentAddress = originalLocationInfo.LocationCode,
+ Grade = 99,
+ NextAddress = originalLocationInfo.LocationCode,
+ OrderNo = "",
+ ContainerNo = contaionerNo,
+ SourceAddress = originalLocationInfo.LocationCode,
+ TargetAddress = originalLocationInfo.LocationCode,
+ TaskNum = Repository.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
+ TaskStatus = TaskStatusEnum.TaskCreated.ObjToInt(),
+ TaskType = (int)TaskTypeEnum.Inbound
+ };
+ Repository.AddData(newTask);
+
+ // 6. 鎻愪氦浜嬪姟
+ _unitOfWorkManage.CommitTran();
+
+ // 7. 杩斿洖鎴愬姛鍝嶅簲
+ content.OK("鍏ュ簱璇锋眰鎴愬姛", new
+ {
+ warehouseId = WarehouseEnum.FLPL.ObjToInt().ToString(),
+ roadway = originalLocationInfo.RoadwayNo,
+ orderNo = "",
+ containerNo = contaionerNo,
+ containerType = "1",
+ taskNo = newTask.TaskNum.ToString(),
+ station = originalLocation,
+ locationCode = "",
+ stockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt().ToString(),
+ orderCode = ""
+ });
+ }
+ catch (Exception ex)
+ {
+ _unitOfWorkManage.RollbackTran();
+ content.Error(ex.Message);
+ }
+ return content;
+ }
}
}
--
Gitblit v1.9.3