From 9d75314e88f8aac494d57715e3231fe3540cb867 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期二, 23 九月 2025 03:03:03 +0800
Subject: [PATCH] 优化更新

---
 代码管理/WMS/WIDESEA_WMSClient/src/extension/taskinfo/extend/relocationTask.vue                       |  195 +++++++++++++++++
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs                               |   16 +
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs                            |    5 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs |   20 -
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs                                 |    6 
 代码管理/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js                                         |   10 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs               |   11 +
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_PP.cs  |   10 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs                         |  127 ++++++-----
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs                      |   82 +++++++
 代码管理/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue                                          |    2 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/干膜仓/StackerCraneJob_GM.cs                             |    5 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/RelocationDTO.cs                                     |   31 ++
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/StackerCraneJob_BC.cs                             |    5 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/阻焊仓/StackerCraneJob_ZH.cs                             |    5 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_GM.cs  |   13 -
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/成品仓/AGV_CPExtend.cs                                   |    9 
 代码管理/WMS/WIDESEA_WMSClient/config/buttons.js                                                      |    9 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/测试架仓/StackerCraneJob_CSJ.cs                           |    5 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs          |   14 +
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs                               |    7 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs                              |   21 +
 22 files changed, 501 insertions(+), 107 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
index e90eadd..6d440fb 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
@@ -144,6 +144,11 @@
         Dt_Task QueryStackerCraneInTask(string deviceNo, string currentAddress = "");
 
         /// <summary>
+        /// 鏍规嵁璁惧缂栧彿鍒涘缓鏃堕棿鎺掑簭鏌ヨ浠诲姟姹犵Щ搴撲换鍔�
+        /// </summary>
+        Dt_Task QueryStackerCraneRelocationTask(string deviceNo);
+
+        /// <summary>
         /// 鏍规嵁璁惧缂栧彿銆佸綋鍓嶅湴鍧�鎸夌収浼樺厛绾т互鍙婂垱寤烘椂闂存帓搴忔煡璇换鍔℃睜鍑哄簱绫诲瀷鐨勬柊澧炵殑浠诲姟
         /// </summary>
         /// <param name="deviceNo">璁惧缂栧彿</param>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
index 575691f..a87eda0 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -78,6 +78,8 @@
 
         public List<int> TaskOutboundTypes => typeof(TaskTypeEnum).GetEnumIndexList().Where(x => x >= 100 && x < 500).ToList();
 
+        public List<int> TaskRelocationTypes => typeof(TaskTypeEnum).GetEnumIndexList().Where(x => x >= 900 && x < 100).ToList();
+
         public TaskService(ITaskRepository BaseDal, IMapper mapper, ICacheService cacheService, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IApiInfoRepository apiInfoRepository) : base(BaseDal)
         {
             _mapper = mapper;
@@ -207,6 +209,17 @@
                         continue;
                     }
                     Dt_Task task = _mapper.Map<Dt_Task>(item);
+                    if (task.TaskType == TaskTypeEnum.Relocation.ObjToInt())
+                    {
+                        task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
+                        task.CurrentAddress = item.SourceAddress;
+                        task.NextAddress = item.TargetAddress;
+                        task.DeviceCode = task.Roadway;
+                        task.TaskType = TaskTypeEnum.Relocation.ObjToInt();
+                        task.Creater = "WMS";
+                        tasks.Add(task);
+                        continue;
+                    }
                     task.Creater = "WMS";
                     task.TaskState = (int)TaskStatusEnum.New;
                     task.CurrentAddress = item.SourceAddress;
@@ -817,6 +830,14 @@
         }
 
         /// <summary>
+        /// 鏍规嵁璁惧缂栧彿鍒涘缓鏃堕棿鎺掑簭鏌ヨ浠诲姟姹犵Щ搴撲换鍔�
+        /// </summary>
+        public Dt_Task QueryStackerCraneRelocationTask(string deviceNo)
+        {
+            return BaseDal.QueryFirst(x => x.DeviceCode == deviceNo && TaskRelocationTypes.Contains(x.TaskType) && x.TaskState == (int)TaskStatusEnum.SC_Execute, TaskOrderBy);
+        }
+
+        /// <summary>
         /// 鏍规嵁璁惧缂栧彿銆佸綋鍓嶅湴鍧�鎸夌収浼樺厛绾т互鍙婂垱寤烘椂闂存帓搴忔煡璇换鍔℃睜鍑哄簱绫诲瀷鐨勬柊澧炵殑浠诲姟
         /// </summary>
         /// <param name="deviceNo">璁惧缂栧彿</param>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs"
index bdc3052..d90867c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs"
@@ -326,7 +326,10 @@
 
                 }
             }
-
+            if (task == null)
+            {
+                task = _taskService.QueryStackerCraneRelocationTask(commonStackerCrane.DeviceCode);
+            }
             return task;
         }
 
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs"
index ba1d8e3..2ad1a7e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs"
@@ -99,7 +99,7 @@
                 #endregion
                 #region 鍑哄簱鎺ㄩ�佷换鍔�1绾�
                 {
-                    var newTasksOut1 = AllTasks.Where(x => (x.TaskState == TaskStatusEnum.New.ObjToInt()) && x.TaskType < TaskTypeEnum.Inbound.ObjToInt() && x.NextAddress=="5236").OrderBy(x => x.Grade).ThenBy(x => x.GroupId).Take(5).ToList();
+                    var newTasksOut1 = AllTasks.Where(x => (x.TaskState == TaskStatusEnum.New.ObjToInt()) && x.TaskType < TaskTypeEnum.Inbound.ObjToInt() && x.NextAddress=="5236").OrderByDescending(x => x.Grade).ThenBy(x => x.GroupId).Take(5).ToList();
                     var downTasksOut1 = AllTasks.Where(x => (x.TaskState > TaskStatusEnum.New.ObjToInt()) && x.TaskType < TaskTypeEnum.Inbound.ObjToInt() && x.NextAddress == "5236").ToList();
                     Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.AGVStationCode == "5236");
                     IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
@@ -174,6 +174,7 @@
                             {
                                 _taskService.UpdateData(newTasksOut1);
                             }
+                            WriteInfo("5236", $"1绾�5236鏃犱换鍔★紝鐘舵�亄stationCurrentStatus}鍙笅鍙戯紝涓嬪彂浠诲姟锛歿newTasksOut1.Select(x => x.TaskNum)}");
                         }
                     }
                     
@@ -181,7 +182,7 @@
                 #endregion
                 #region 鍑哄簱鎺ㄩ�佷换鍔�2绾�
                 {
-                    var newTasksOut2 = AllTasks.Where(x => (x.TaskState == TaskStatusEnum.New.ObjToInt()) && x.TaskType < TaskTypeEnum.Inbound.ObjToInt() && x.NextAddress == "5243").OrderBy(x => x.Grade).ThenBy(x => x.GroupId).Take(5).ToList();
+                    var newTasksOut2 = AllTasks.Where(x => (x.TaskState == TaskStatusEnum.New.ObjToInt()) && x.TaskType < TaskTypeEnum.Inbound.ObjToInt() && x.NextAddress == "5243").OrderByDescending(x => x.Grade).ThenBy(x => x.GroupId).Take(5).ToList();
                     var downTasksOut2 = AllTasks.Where(x => (x.TaskState > TaskStatusEnum.New.ObjToInt()) && x.TaskType < TaskTypeEnum.Inbound.ObjToInt() && x.NextAddress == "5243").ToList();
                     Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.AGVStationCode == "5243");
                     IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
@@ -256,6 +257,7 @@
                             {
                                 _taskService.UpdateData(newTasksOut2);
                             }
+                            WriteInfo("5243", $"2绾�5243鏃犱换鍔★紝鐘舵�亄stationCurrentStatus}鍙笅鍙戯紝涓嬪彂浠诲姟锛歿newTasksOut2.Select(x => x.TaskNum)}");
                         }
                         //else
                         //{
@@ -267,7 +269,7 @@
                 #endregion
                 #region 鍑哄簱鎺ㄩ�佷换鍔�3绾�
                 {
-                    var newTasksOut3 = AllTasks.Where(x => (x.TaskState == TaskStatusEnum.New.ObjToInt()) && x.TaskType < TaskTypeEnum.Inbound.ObjToInt() && x.NextAddress == "5250").OrderBy(x => x.Grade).ThenBy(x => x.GroupId).Take(5).ToList();
+                    var newTasksOut3 = AllTasks.Where(x => (x.TaskState == TaskStatusEnum.New.ObjToInt()) && x.TaskType < TaskTypeEnum.Inbound.ObjToInt() && x.NextAddress == "5250").OrderByDescending(x => x.Grade).ThenBy(x => x.GroupId).Take(5).ToList();
                     var downTasksOut3 = AllTasks.Where(x => (x.TaskState > TaskStatusEnum.New.ObjToInt()) && x.TaskType < TaskTypeEnum.Inbound.ObjToInt() && x.NextAddress == "5250").ToList();
                     Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.AGVStationCode == "5250");
                     IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
@@ -342,6 +344,7 @@
                             {
                                 _taskService.UpdateData(newTasksOut3);
                             }
+                            WriteInfo("5250", $"3绾�5250鏃犱换鍔★紝鐘舵�亄stationCurrentStatus}鍙笅鍙戯紝涓嬪彂浠诲姟锛歿newTasksOut3.Select(x => x.TaskNum)}");
                         }
                         //else
                         //{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/StackerCraneJob_BC.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/StackerCraneJob_BC.cs"
index 5574504..657d112 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/StackerCraneJob_BC.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/StackerCraneJob_BC.cs"
@@ -379,7 +379,10 @@
 
                 }
             }
-
+            if (task==null)
+            {
+                task = _taskService.QueryStackerCraneRelocationTask(commonStackerCrane.DeviceCode);
+            }
             return task;
         }
 
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\265\213\350\257\225\346\236\266\344\273\223/StackerCraneJob_CSJ.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\265\213\350\257\225\346\236\266\344\273\223/StackerCraneJob_CSJ.cs"
index 1672eaf..63fb296 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\265\213\350\257\225\346\236\266\344\273\223/StackerCraneJob_CSJ.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\265\213\350\257\225\346\236\266\344\273\223/StackerCraneJob_CSJ.cs"
@@ -296,7 +296,10 @@
 
                 }
             }
-
+            if (task == null)
+            {
+                task = _taskService.QueryStackerCraneRelocationTask(commonStackerCrane.DeviceCode);
+            }
             return task;
         }
 
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs"
index d5785a0..7450280 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs"
@@ -307,7 +307,10 @@
 
                 }
             }
-
+            if (task == null)
+            {
+                task = _taskService.QueryStackerCraneRelocationTask(commonStackerCrane.DeviceCode);
+            }
             return task;
         }
 
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/config/buttons.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/config/buttons.js"
index fa55ca9..f141048 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/config/buttons.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/config/buttons.js"
@@ -210,6 +210,15 @@
     onClick: function () {
     }
 },
+{
+    name: "鎵嬪姩绉诲簱",
+    icon: '',
+    class: '',
+    value: 'Relocation',
+    type: 'success',
+    onClick: function () {
+    }
+},
 ]
 
 export default buttons
\ No newline at end of file
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/taskinfo/extend/relocationTask.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/taskinfo/extend/relocationTask.vue"
new file mode 100644
index 0000000..24adf36
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/taskinfo/extend/relocationTask.vue"
@@ -0,0 +1,195 @@
+<template>
+    <div>
+      <vol-box
+        v-model="showDetialBox"
+        :lazy="true"
+        width="600px"
+        :padding="15"
+        title="鎵撳嵃"
+      >
+        <div>
+          <el-form>
+            <el-form-item required label="璇烽�夋嫨浠撳簱锛�">
+              <el-select
+                v-model="warehouseId"
+                filterable
+                placeholder="璇烽�夋嫨"
+                @change="getPalletType"
+              >
+                <el-option
+                  v-for="item in warehouses"
+                  :key="item.key"
+                  :label="item.value"
+                  :value="item.key"
+                >
+                  <span style="float: left">{{ item.value }}</span>
+                  <span style="float: right; color: #8492a6; font-size: 13px">{{
+                    item.key
+                  }}</span>
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item required label="璇疯緭鍏ヨ捣鐐癸細"
+              ><el-input
+                v-model="start"
+                style="width: 180px"
+                label="璇疯緭鍏ヨ捣鐐�"
+              ></el-input>
+            </el-form-item>
+            <el-form-item required label="璇疯緭鍏ョ粓鐐癸細"
+              ><el-input
+                v-model="end"
+                style="width: 180px"
+                label="璇疯緭鍏ョ粓鐐�"
+              ></el-input>
+            </el-form-item>
+            <el-form-item
+              required
+              label="璇烽�夋嫨宸烽亾锛�"
+              v-show="warehouseId != ''"
+            >
+              <el-radio-group v-model="palletType">
+                <el-radio
+                  v-for="item in palletTypes"
+                  :key="item.key"
+                  :label="item"
+                  >{{ item.value }}</el-radio
+                >
+              </el-radio-group>
+            </el-form-item>
+          </el-form>
+        </div>
+        <template #footer>
+          <el-button type="primary" size="small" @click="submit">纭</el-button>
+          <el-button type="danger" size="small" @click="close">鍏抽棴</el-button>
+        </template>
+      </vol-box>
+    </div>
+  </template>
+      
+      <script>
+  import VolBox from "@/components/basic/VolBox.vue";
+  export default {
+    components: { VolBox },
+    data() {
+      return {
+        showDetialBox: false,
+        warehouses: [],
+        warehouseId: "",
+        palletType: "",
+        palletTypes: [],
+        start:"",
+        end:"",
+      };
+    },
+    methods: {
+      open() {
+        if (this.warehouses.length == 0) {
+          this.getWarehouseInfos();
+        }
+        if (this.warehouses.length == 1) {
+              this.warehouseId = this.warehouses[0].key;
+              this.getPalletType();
+            }
+        this.showDetialBox = true;
+      },
+      getWarehouseInfos() {
+        this.http
+          .post("api/Warehouse/GetWarehouseDicByUser", null, "鏁版嵁澶勭悊涓�")
+          .then((x) => {
+            if (!x.status) return this.$message.error(x.message);
+            this.warehouses = x.data;
+            if (this.warehouses.length == 1) {
+              this.warehouseId = this.warehouses[0].key;
+            }
+          });
+      },
+      getPalletType() {
+        this.http
+          .post("api/LocationInfo/GetLocationRoadway", null, "鏁版嵁澶勭悊涓�")
+          .then((x) => {
+            if (!x.status) return this.$message.error(x.message);
+            console.log(x.data)
+            //this.palletTypes绛涢�墄.data涓瓀arehouseId绛変簬this.warehouseId鐨勯」
+            console.log(this.warehouseId)
+            this.palletTypes = x.data.filter(item => item.key == this.warehouseId);
+                
+          });
+        
+      },
+      close() {
+        this.showDetialBox = false;
+        if (this.warehouses.length > 1) {
+          this.warehouseId = "";
+        }
+        this.palletType = "";
+      },
+      submit() {
+        if (this.warehouseId == "") return this.$message.error("璇烽�夋嫨浠撳簱");
+        if (this.palletType == "") return this.$message.error("璇烽�夋嫨宸烽亾");
+        if (this.start == "") return this.$message.error("璇疯緭鍏ヨ捣鐐�");
+        if (this.end == "") return this.$message.error("璇疯緭鍏ョ粓鐐�");
+        var request = {
+                "warehouseId": this.warehouseId,
+                "locationStart": this.start,
+                "locationEnd": this.end,
+                "locationRoadway": this.palletType.key
+            }
+        this.http
+          .post(
+            `api/Task/ManualRelocation`,
+            request,
+            "鏁版嵁澶勭悊涓�"
+          )
+          .then((x) => {
+            if (!x.status) return this.$message.error(x.message);
+            this.$message.success("鎿嶄綔鎴愬姛");
+            this.$parent.refresh();
+            this.close();
+          });
+      },
+    },
+    created() {},
+  };
+  </script>
+      
+      <style scoped>
+  .el-col {
+    border-radius: 4px;
+  }
+  
+  .grid-content {
+    border-radius: 4px;
+    min-height: 36px;
+  }
+  
+  .content-text {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+  
+  .right-text {
+    display: flex;
+    align-items: center;
+    justify-content: flex-end;
+  }
+  </style>
+      <style>
+  .el-table .warning-row {
+    background: #e6a23c;
+  }
+  
+  .el-table .success-row {
+    background: #f0f9eb;
+  }
+  
+  .el-table .error-row {
+    background: #f56c6c;
+  }
+  
+  canvas {
+    display: block;
+    margin: auto;
+  }
+  </style>
\ No newline at end of file
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js"
index 451917f..12f6346 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js"
@@ -1,10 +1,10 @@
 
 //姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
-
+import gridHeader from './extend/relocationTask.vue'
 let extension = {
     components: {
       //鏌ヨ鐣岄潰鎵╁睍缁勪欢
-      gridHeader: '',
+      gridHeader: gridHeader,
       gridBody: '',
       gridFooter: '',
       //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
@@ -71,6 +71,12 @@
               });
         }
       }
+      let relocationBtn = this.buttons.find(x => x.value == 'Relocation');
+      if (relocationBtn) {
+        relocationBtn.onClick = function () {
+          this.$refs.gridHeader.open();
+        }
+      }
       },
       onInited() {
         //妗嗘灦鍒濆鍖栭厤缃悗
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue"
index 7303955..c7dada0 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue"
@@ -56,6 +56,8 @@
       [
         { title: "鏈夋晥鏈熸煡璇�",field: "effectiveDate",type: "date"},
         {title: "鐗╂枡鏈夋晥鏈�",field: "expirationlabel",type: "selectList",dataKey:"expirationlabelEnum",data:[]},
+        { title: "搴撻緞(灏忎簬)", field: "inventoryage",type: "string"},
+        { title: "搴撻緞(澶т簬)", field: "inventoryage1",type: "string"},
       ],
     ]);
     const columns = ref([
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs"
index 6333c29..f2b0917 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs"
@@ -75,12 +75,12 @@
                     if (beRelocation.Row <= maxDepth)
                     {
                         //杩囨护褰撳墠绉诲簱鐨勫悓鍒楀悓灞�
-                        locationInfos = locationInfos.Where(x => x.Row <= maxDepth && x.Column!= beRelocation.Column && x.Layer!=beRelocation.Layer).ToList();
+                        locationInfos = locationInfos.Where(x => x.Row <= maxDepth).ToList();
                     }
                     else if (beRelocation.Row > maxDepth)
                     {
                         //杩囨护褰撳墠绉诲簱鐨勫悓鍒楀悓灞�
-                        locationInfos = locationInfos.Where(x => x.Row > maxDepth && x.Column != beRelocation.Column && x.Layer != beRelocation.Layer).ToList();
+                        locationInfos = locationInfos.Where(x => x.Row > maxDepth).ToList();
                     }
                 }
 
@@ -315,16 +315,6 @@
                             List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList();
                             littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())) == null; //鏌ヨ灏忎簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓虹┖锛屼笖绂佺敤鐘舵�佷笉涓虹鐢ㄤ互鍙婂彧鍏ョ殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娴呰揣浣嶈浣跨敤鎴栬�呰绂佺敤鐨勬儏鍐�
                         }
-                        //if (moreDepthFlag && littleDepthFlag)
-                        //{
-                        //    return emptyLocation;
-                        //}
-
-                        //List<Dt_LocationInfo> moreDepth = locations.Where(x => x.Depth > emptyLocation.Depth).ToList();
-                        //moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && x.LocationStatus != LocationStatusEnum.PalletLock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())) == null;//鏌ヨ澶т簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓烘湁璐х殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娣辫揣浣嶆湁鏈浣跨敤鐨勬儏鍐�
-
-                        //List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList();
-                        //littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())) == null; //鏌ヨ灏忎簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓虹┖锛屼笖绂佺敤鐘舵�佷笉涓虹鐢ㄤ互鍙婂彧鍏ョ殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娴呰揣浣嶈浣跨敤鎴栬�呰绂佺敤鐨勬儏鍐�
                     }
                     break;
                 case 1:
@@ -346,12 +336,6 @@
                             List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList();
                             littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())) == null; //鏌ヨ灏忎簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓虹┖锛屼笖绂佺敤鐘舵�佷笉涓虹鐢ㄤ互鍙婂彧鍏ョ殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娴呰揣浣嶈浣跨敤鎴栬�呰绂佺敤鐨勬儏鍐�
                         }
-
-                        //List<Dt_LocationInfo> moreDepth = locations.Where(x => x.Depth > emptyLocation.Depth).ToList();
-                        //moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())) == null;//鏌ヨ澶т簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓烘湁璐х殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娣辫揣浣嶆湁鏈浣跨敤鐨勬儏鍐�
-
-                        //List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList();
-                        //littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())) == null; //鏌ヨ灏忎簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓虹┖锛屼笖绂佺敤鐘舵�佷笉涓虹鐢ㄤ互鍙婂彧鍏ョ殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娴呰揣浣嶈浣跨敤鎴栬�呰绂佺敤鐨勬儏鍐�
                     }
 
                     break;
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_GM.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_GM.cs"
index a115707..d9d428e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_GM.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_GM.cs"
@@ -57,18 +57,9 @@
                     {
                         throw new Exception($"鏈壘鍒拌揣浣嶄俊鎭�");
                     }
+                    //鏈�澶ф繁浣嶅��
                     int maxDepth = locationInfos.Max(x => x.Depth);
-                    //int mathCurrentRow = beRelocation.Row - Convert.ToInt32(Math.Ceiling(beRelocation.Row / maxDepth / 2.0)) * maxDepth * 2;
-                    //if (mathCurrentRow <= maxDepth)
-                    //{
-                    //    locationInfos = locationInfos.Where(x => x.Row - Convert.ToInt32(Math.Ceiling(x.Row / maxDepth / 2.0)) * maxDepth * 2 <= maxDepth).ToList();
-                        
-                    //}
-                    //else
-                    //{
-                    //    locationInfos = locationInfos.Where(x => x.Row - Convert.ToInt32(Math.Ceiling(x.Row / maxDepth / 2.0)) * maxDepth * 2 > maxDepth).ToList();
-                        
-                    //}
+                    //绉诲簱涓哄悓渚�
                     if (beRelocation.Row <= maxDepth)
                     {
                         locationInfos = locationInfos.Where(x => x.Row <= maxDepth).ToList();
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_PP.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_PP.cs"
index 8338d9b..92d8dad 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_PP.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_PP.cs"
@@ -59,12 +59,12 @@
                     if (beRelocation.Row <= maxDepth)
                     {
                         //杩囨护褰撳墠绉诲簱鐨勫悓鍒楀悓灞�
-                        locationInfos = locationInfos.Where(x => x.Row <= maxDepth && x.Column != beRelocation.Column && x.Layer != beRelocation.Layer).ToList();
+                        locationInfos = locationInfos.Where(x => x.Row <= maxDepth).ToList();
                     }
                     else if (beRelocation.Row > maxDepth)
                     {
                         //杩囨护褰撳墠绉诲簱鐨勫悓鍒楀悓灞�
-                        locationInfos = locationInfos.Where(x => x.Row > maxDepth && x.Column != beRelocation.Column && x.Layer != beRelocation.Layer).ToList();
+                        locationInfos = locationInfos.Where(x => x.Row > maxDepth).ToList();
                     }
                 }
 
@@ -141,15 +141,15 @@
                 moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && x.LocationType != 0) == null;//鏌ヨ澶т簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓烘湁璐х殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娣辫揣浣嶆湁鏈浣跨敤鐨勬儏鍐�
 
                 List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList();
-                littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && x.LocationType != 0) == null; //鏌ヨ灏忎簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓虹┖锛屼笖绂佺敤鐘舵�佷笉涓虹鐢ㄤ互鍙婂彧鍏ョ殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娴呰揣浣嶈浣跨敤鎴栬�呰绂佺敤鐨勬儏鍐�
+                littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())) == null; //鏌ヨ灏忎簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓虹┖锛屼笖绂佺敤鐘舵�佷笉涓虹鐢ㄤ互鍙婂彧鍏ョ殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娴呰揣浣嶈浣跨敤鎴栬�呰绂佺敤鐨勬儏鍐�
             }
             else
             {
                 List<Dt_LocationInfo> moreDepth = locations.Where(x => x.Depth > emptyLocation.Depth).ToList();
-                moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && x.LocationType != emptyLocation.LocationType) == null;//鏌ヨ澶т簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓烘湁璐х殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娣辫揣浣嶆湁鏈浣跨敤鐨勬儏鍐�
+                moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) ) == null;//鏌ヨ澶т簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓烘湁璐х殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娣辫揣浣嶆湁鏈浣跨敤鐨勬儏鍐�
 
                 List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList();
-                littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && x.LocationType != emptyLocation.LocationType) == null; //鏌ヨ灏忎簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓虹┖锛屼笖绂佺敤鐘舵�佷笉涓虹鐢ㄤ互鍙婂彧鍏ョ殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娴呰揣浣嶈浣跨敤鎴栬�呰绂佺敤鐨勬儏鍐�
+                littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) ) == null; //鏌ヨ灏忎簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓虹┖锛屼笖绂佺敤鐘舵�佷笉涓虹鐢ㄤ互鍙婂彧鍏ョ殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娴呰揣浣嶈浣跨敤鎴栬�呰绂佺敤鐨勬儏鍐�
             }
             if (moreDepthFlag && littleDepthFlag)
             {
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/RelocationDTO.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/RelocationDTO.cs"
new file mode 100644
index 0000000..55f3ee2
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/RelocationDTO.cs"
@@ -0,0 +1,31 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEA_DTO.Basic
+{
+    /// <summary>
+    /// 鎵嬪姩绉诲簱瀹炰綋
+    /// </summary>
+    public class RelocationDTO
+    {
+        /// <summary>
+        /// 绉诲簱浠撳簱Id
+        /// </summary>
+        public int warehouseId { get; set; }
+        /// <summary>
+        /// 绉诲簱璧风偣
+        /// </summary>
+        public string locationStart { get; set; }
+        /// <summary>
+        /// 绉诲簱缁堢偣
+        /// </summary>
+        public string locationEnd { get; set; }
+        /// <summary>
+        /// 绉诲簱宸烽亾鍙�
+        /// </summary>
+        public string locationRoadway { get; set; }
+    }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
index 02de6cb..c2eef48 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
@@ -28,6 +28,7 @@
 using WIDESEA_Core.BaseServices;
 using WIDESEA_Core.Enums;
 using WIDESEA_DTO;
+using WIDESEA_DTO.Basic;
 using WIDESEA_DTO.ERP;
 using WIDESEA_DTO.MES;
 using WIDESEA_DTO.Stock;
@@ -199,6 +200,12 @@
         /// <param name="locationCode"></param>
         /// <returns></returns>
         WebResponseContent IsRelocation(int taskNum, string locationCode);
+        /// <summary>
+        /// 鎵嬪姩绉诲簱
+        /// </summary>
+        /// <param name="relocationDTO"></param>
+        /// <returns></returns>
+        WebResponseContent ManualRelocation(RelocationDTO relocationDTO);
 
         /// <summary>
         /// 
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs"
index 0bcc37b..37e02d8 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs"
@@ -115,6 +115,22 @@
                                             }
                                         }
                                         break;
+                                    case "inventoryage":
+                                        int inventoryage = param.Value.ObjToInt();
+                                        if (inventoryage > 0)
+                                        {
+                                            DateTime dateTime = DateTime.Now.AddDays(-inventoryage);
+                                            sugarQueryable1 = sugarQueryable1.Where(x => x.CreateDate >= dateTime);
+                                        }
+                                        break;
+                                    case "inventoryage1":
+                                        int inventoryage1 = param.Value.ObjToInt();
+                                        if (inventoryage1 > 0)
+                                        {
+                                            DateTime dateTime = DateTime.Now.AddDays(-inventoryage1);
+                                            sugarQueryable1 = sugarQueryable1.Where(x => x.CreateDate <= dateTime);
+                                        }
+                                        break;
                                 }
                             }
                         }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
index 8b82537..3c56706 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
@@ -358,7 +358,7 @@
                 });
                 //鏇存柊浠诲姟鐘舵��
                 task.TaskStatus = TaskStatusEnum.Finish.ObjToInt();
-                FeedBackWCSTaskCompleted(taskNum);
+                
                 _unitOfWorkManage.BeginTran();
                 BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? OperateTypeEnum.浜哄伐瀹屾垚 : OperateTypeEnum.鑷姩瀹屾垚);
                 _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, stockInfo.PalletType, LocationStatusEnum.InStock, stockInfo.WarehouseId);
@@ -389,6 +389,7 @@
                         _inboundOrderService.FeedbackInboundOrder(inboundOrder.Id);
                     }
                 }
+                FeedBackWCSTaskCompleted(taskNum);
                 return WebResponseContent.Instance.OK();
             }
             catch (Exception ex)
@@ -699,7 +700,7 @@
                 }
 
                 task.TaskStatus = TaskStatusEnum.Finish.ObjToInt();
-                FeedBackWCSTaskCompleted(taskNum);
+                
                 _unitOfWorkManage.BeginTran();
 
                 if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt() || task.TaskType == TaskTypeEnum.OutQuality.ObjToInt() || task.TaskType == TaskTypeEnum.OutAllocate.ObjToInt() || task.TaskType == TaskTypeEnum.MesHandPickOutbound.ObjToInt() || task.TaskType == TaskTypeEnum.MesHandOutbound.ObjToInt())
@@ -785,6 +786,7 @@
                     MesMaterialLotaAceptModel model = GetMesMaterialLotaAceptModel(stockInfo, stockInfo.Details.FirstOrDefault(), mesOutboundOrders.FirstOrDefault().TaskNo, warehouse.WarehouseCode, stockInfo.Details.Where(x => x.MaterielCode == mesOutboundOrders.FirstOrDefault().MaterialCode).Sum(x => x.StockQuantity));
                     UploadMesMaterialLotaAcept(model);
                 }
+                FeedBackWCSTaskCompleted(taskNum);
                 return WebResponseContent.Instance.OK();
             }
             catch (Exception ex)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
index 9780a13..25714e7 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
@@ -1064,78 +1064,83 @@
             }
             return content;
         }
+        private static object emptyBack_inbound = new object();
         /// <summary>
         /// 绌烘鍥炲簱
         /// </summary>
         public WebResponseContent EmptyBackTask(string barCode, string startPoint)
         {
-            WebResponseContent content = new WebResponseContent();
-            try
+            lock (emptyBack_inbound)
             {
-                string palletCode = @"^C\d{5}$";  // 姝e垯琛ㄨ揪寮�
-                bool isValid = Regex.IsMatch(barCode, palletCode);
-                if (!isValid)
+                WebResponseContent content = new WebResponseContent();
+                try
                 {
-                    return content.Error($"妗嗙爜鏍煎紡閿欒{barCode}");
+                    string palletCode = @"^C\d{5}$";  // 姝e垯琛ㄨ揪寮�
+                    bool isValid = Regex.IsMatch(barCode, palletCode);
+                    if (!isValid)
+                    {
+                        return content.Error($"妗嗙爜鏍煎紡閿欒{barCode}");
+                    }
+                    if (!OutStartPonits.Contains(startPoint))
+                    {
+                        return content.Error($"璧风偣閿欒{startPoint}");
+                    }
+                    //鍒ゆ柇褰撳墠鐐逛綅鏄惁閲嶅
+                    Dt_Task taskOldPoint = BaseDal.QueryFirst(x => x.SourceAddress == startPoint && (x.TaskStatus == TaskStatusEnum.New.ObjToInt() || x.TaskStatus == TaskStatusEnum.Line_Execute.ObjToInt() || x.TaskStatus == TaskStatusEnum.Line_Executing.ObjToInt()));
+                    //if (taskOldPoint != null)
+                    //{
+                    //    return content.Error($"绔欑偣{startPoint}宸插瓨鍦ㄤ换鍔�");
+                    //}
+                    Dt_Task taskOld = BaseDal.QueryFirst(x => x.PalletCode == barCode);
+                    if (taskOld != null)
+                    {
+                        return content.Error($"鑳舵{barCode}浠诲姟宸插瓨鍦�");
+                    }
+                    //if (_stockRepository.ProStockInfoRepository.QueryFirst(x => x.PalletCode == barCode) != null)
+                    //{
+                    //    return content.Error($"鑳舵{barCode}搴撳瓨淇℃伅宸插瓨鍦�");
+                    //}
+                    //todo:涓存椂瑙g粦
+                    Dt_ProStockInfo proStockInfo = _stockRepository.ProStockInfoRepository.QueryFirst(x => x.PalletCode == barCode && x.StockStatus == StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt());
+                    if (_stockRepository.ProStockInfoRepository.QueryFirst(x => x.PalletCode == barCode) != null)
+                    {
+                        proStockInfo.PalletCode = proStockInfo.PalletCode + ":" + DateTime.Now.ToString("MM/dd");
+                    }
+                    //鑾峰彇鎴愬搧骞冲簱
+                    Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA101.ToString());
+                    Dt_Task newTask = new Dt_Task()
+                    {
+                        CurrentAddress = startPoint,
+                        Grade = 0,
+                        NextAddress = "",
+                        PalletCode = barCode,
+                        Roadway = "CL01_CP",
+                        SourceAddress = startPoint,
+                        TargetAddress = "",
+                        TaskType = TaskTypeEnum.EmptyProductBack.ObjToInt(),
+                        TaskStatus = TaskStatusEnum.New.ObjToInt(),
+                        WarehouseId = warehouse.WarehouseId,
+                        PalletType = 1
+                    };
+                    _unitOfWorkManage.BeginTran();
+                    int taskId = BaseDal.AddData(newTask);
+                    if (proStockInfo != null)
+                    {
+                        _stockRepository.ProStockInfoRepository.UpdateData(proStockInfo);
+                    }
+                    newTask.TaskId = taskId;
+                    _unitOfWorkManage.CommitTran();
+                    //鎺ㄩ�佷换鍔�
+                    PushTasksToWCS(new List<Dt_Task> { newTask });
+                    content.OK("鍙戦�佹垚鍔�");
                 }
-                if (!OutStartPonits.Contains(startPoint))
+                catch (Exception ex)
                 {
-                    return content.Error($"璧风偣閿欒{startPoint}");
+                    content.Error(ex.Message);
                 }
-                //鍒ゆ柇褰撳墠鐐逛綅鏄惁閲嶅
-                Dt_Task taskOldPoint = BaseDal.QueryFirst(x => x.SourceAddress == startPoint && (x.TaskStatus == TaskStatusEnum.New.ObjToInt() || x.TaskStatus == TaskStatusEnum.Line_Execute.ObjToInt() || x.TaskStatus == TaskStatusEnum.Line_Executing.ObjToInt()));
-                //if (taskOldPoint != null)
-                //{
-                //    return content.Error($"绔欑偣{startPoint}宸插瓨鍦ㄤ换鍔�");
-                //}
-                Dt_Task taskOld = BaseDal.QueryFirst(x => x.PalletCode == barCode);
-                if (taskOld != null)
-                {
-                    return content.Error($"鑳舵{barCode}浠诲姟宸插瓨鍦�");
-                }
-                //if (_stockRepository.ProStockInfoRepository.QueryFirst(x => x.PalletCode == barCode) != null)
-                //{
-                //    return content.Error($"鑳舵{barCode}搴撳瓨淇℃伅宸插瓨鍦�");
-                //}
-                //todo:涓存椂瑙g粦
-                Dt_ProStockInfo proStockInfo = _stockRepository.ProStockInfoRepository.QueryFirst(x => x.PalletCode == barCode);
-                if (_stockRepository.ProStockInfoRepository.QueryFirst(x => x.PalletCode == barCode) != null)
-                {
-                    proStockInfo.PalletCode = proStockInfo.PalletCode + ":" + DateTime.Now.ToString("MM/dd");
-                }
-                //鑾峰彇鎴愬搧骞冲簱
-                Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA101.ToString());
-                Dt_Task newTask = new Dt_Task()
-                {
-                    CurrentAddress = startPoint,
-                    Grade = 0,
-                    NextAddress = "",
-                    PalletCode = barCode,
-                    Roadway = "CL01_CP",
-                    SourceAddress = startPoint,
-                    TargetAddress = "",
-                    TaskType = TaskTypeEnum.EmptyProductBack.ObjToInt(),
-                    TaskStatus = TaskStatusEnum.New.ObjToInt(),
-                    WarehouseId = warehouse.WarehouseId,
-                    PalletType = 1
-                };
-                _unitOfWorkManage.BeginTran();
-                int taskId = BaseDal.AddData(newTask);
-                if (proStockInfo!=null)
-                {
-                    _stockRepository.ProStockInfoRepository.UpdateData(proStockInfo);
-                }
-                newTask.TaskId = taskId;
-                _unitOfWorkManage.CommitTran();
-                //鎺ㄩ�佷换鍔�
-                PushTasksToWCS(new List<Dt_Task> { newTask });
-                content.OK("鍙戦�佹垚鍔�");
+                return content;
             }
-            catch (Exception ex)
-            {
-                content.Error(ex.Message);
-            }
-            return content;
+            
         }
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs"
index 4cbe66d..fc3bdcf 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs"
@@ -10,6 +10,7 @@
 using WIDESEA_Common.TaskEnum;
 using WIDESEA_Core;
 using WIDESEA_Core.Helper;
+using WIDESEA_DTO.Basic;
 using WIDESEA_DTO.Task;
 using WIDESEA_Model.Models;
 
@@ -130,6 +131,84 @@
                 return WebResponseContent.Instance.Error(ex.Message);
             }
         }
+        /// <summary>
+        /// 鎵嬪姩绉诲簱
+        /// </summary>
+        /// <returns></returns>
+        public WebResponseContent ManualRelocation(RelocationDTO relocationDTO)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == relocationDTO.warehouseId);
+                if (warehouse == null)
+                {
+                    return content.Error($"鏈壘鍒板搴旂殑{relocationDTO.warehouseId}浠撳簱淇℃伅");
+                }
+                Dt_LocationInfo locationInfoStart = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == relocationDTO.locationStart && x.WarehouseId== warehouse.WarehouseId && x.RoadwayNo == relocationDTO.locationRoadway && x.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt());
+                Dt_LocationInfo locationInfoEnd = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == relocationDTO.locationEnd && x.WarehouseId == warehouse.WarehouseId && x.RoadwayNo== relocationDTO.locationRoadway && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus==EnableStatusEnum.Normal.ObjToInt());
+                if (locationInfoStart == null || locationInfoEnd==null)
+                {
+                    return content.Error($"鏈壘鍒板搴旂殑璐т綅淇℃伅鎴栬捣鐐瑰強缁堢偣璐т綅鏉′欢涓嶆弧瓒�");
+                }
+                if (locationInfoStart.Column!= locationInfoEnd.Column || locationInfoStart.Layer != locationInfoEnd.Layer || locationInfoStart.Depth>= locationInfoEnd.Depth)
+                {
+                    return content.Error($"璧风偣鍜岀粓鐐圭Щ搴撹揣浣嶉渶瑕佹弧瓒冲悓鍒楀悓灞傜粓鐐硅揣浣嶆繁浣嶉渶瑕佸ぇ浜庤捣鐐硅揣浣�");
+                }
+                Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.LocationCode == locationInfoStart.LocationCode);
+                if (stockInfo == null)
+                {
+                    return content.Error($"鏈壘鍒板搴旇揣浣嶇殑搴撳瓨淇℃伅");
+                }
+
+                Dt_Task taskTemp = Repository.QueryFirst(x => x.PalletCode == stockInfo.PalletCode);
+                if (taskTemp != null)
+                {
+                    return content.Error($"鎵樼洏{stockInfo.PalletCode}浠诲姟宸插瓨鍦�");
+                }
+                Dt_Task newTask = new Dt_Task()
+                {
+                    Roadway = locationInfoStart.RoadwayNo,
+                    WarehouseId = locationInfoStart.WarehouseId,
+                    CurrentAddress = locationInfoStart.LocationCode,
+                    Grade = 99,
+                    NextAddress = locationInfoEnd.LocationCode,
+                    OrderNo = "",
+                    PalletCode = stockInfo.PalletCode,
+                    PalletType = stockInfo.PalletType,
+                    SourceAddress = locationInfoStart.LocationCode,
+                    TargetAddress = locationInfoEnd.LocationCode,
+                    TaskNum = Repository.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
+                    TaskStatus = TaskStatusEnum.SC_Execute.ObjToInt(),
+                    TaskType = TaskTypeEnum.Relocation.ObjToInt()
+                };
+
+                if (stockInfo.StockLength > 0)
+                {
+                    newTask.TaskLength = stockInfo.StockLength;
+                }
+                _unitOfWorkManage.BeginTran();
+                Repository.AddData(newTask);
+                LocationStatusEnum lastStatusEnd = (LocationStatusEnum)locationInfoEnd.LocationStatus;
+                _basicService.LocationInfoService.UpdateLocationStatus(locationInfoEnd, newTask.PalletType, LocationStatusEnum.Lock, stockInfo.WarehouseId);
+                _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfoEnd, lastStatusEnd, LocationStatusEnum.Lock, LocationChangeType.RelocationAssignLocation, taskNum: newTask.TaskNum);
+
+                LocationStatusEnum lastStatusStart = (LocationStatusEnum)locationInfoStart.LocationStatus;
+                _basicService.LocationInfoService.UpdateLocationStatus(locationInfoStart, newTask.PalletType, LocationStatusEnum.Lock, stockInfo.WarehouseId);
+                _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfoStart, lastStatusStart, LocationStatusEnum.Lock, LocationChangeType.RelocationAssignLocation, taskNum: newTask.TaskNum);
+                stockInfo.StockStatus = StockStatusEmun.绉诲簱閿佸畾.ObjToInt();
+                _stockRepository.StockInfoRepository.UpdateData(stockInfo);
+                _unitOfWorkManage.CommitTran();
+                //鎺ㄩ�佷换鍔�
+                PushTasksToWCS(new List<Dt_Task> { newTask });
+                return content.OK(data: _mapper.Map<WMSTaskDTO>(newTask));
+            }
+            catch (Exception ex)
+            {
+                _unitOfWorkManage.RollbackTran();
+                return content.Error(ex.Message);
+            }
+        }
 
         public WebResponseContent RelocationTaskCompleted(Dt_Task task)
         {
@@ -153,7 +232,7 @@
                     return WebResponseContent.Instance.Error($"鏈壘鍒板搴旂殑缁堢偣璐т綅淇℃伅");
                 }
                 task.TaskStatus = TaskStatusEnum.Finish.ObjToInt();
-                FeedBackWCSTaskCompleted(task.TaskNum);
+                
                 _unitOfWorkManage.BeginTran();
                 stockInfo.LocationCode = locationInfoEnd.LocationCode;
                 stockInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt();
@@ -162,6 +241,7 @@
                 _basicService.LocationInfoService.UpdateLocationStatus(locationInfoEnd, stockInfo.PalletType, LocationStatusEnum.InStock, stockInfo.WarehouseId);
                 BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? WIDESEA_Core.Enums.OperateTypeEnum.浜哄伐瀹屾垚 : WIDESEA_Core.Enums.OperateTypeEnum.鑷姩瀹屾垚);
                 _unitOfWorkManage.CommitTran();
+                FeedBackWCSTaskCompleted(task.TaskNum);
                 return WebResponseContent.Instance.OK();
             }
             catch (Exception ex)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs"
index 22b2310..978f082 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs"
@@ -9,6 +9,7 @@
 using WIDESEA_Core.BaseController;
 using WIDESEA_Core.Enums;
 using WIDESEA_DTO.Basic;
+using WIDESEA_DTO.System;
 using WIDESEA_IBasicRepository;
 using WIDESEA_IBasicService;
 using WIDESEA_Model.Models;
@@ -96,5 +97,18 @@
                 return WebResponseContent.Instance.Error(e.Message);
             }
         }
+        [HttpPost, Route("GetLocationRoadway"), AllowAnonymous]
+        public WebResponseContent GetLocationRoadway()
+        {
+            try
+            {
+                List<DictionaryDTO> dictionaryDTOs = Service.Repository.QueryData().GroupBy(x => new { x.RoadwayNo, x.WarehouseId }).Select(x => new DictionaryDTO { Key = x.Key.WarehouseId, Value = x.Key.RoadwayNo }).ToList() ;
+                return WebResponseContent.Instance.OK(data: dictionaryDTOs);
+            }
+            catch (Exception e)
+            {
+                return WebResponseContent.Instance.Error(e.Message);
+            }
+        }
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
index 7b10097..65620e1 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
@@ -4,6 +4,7 @@
 using WIDESEA_Common.CommonEnum;
 using WIDESEA_Core;
 using WIDESEA_Core.BaseController;
+using WIDESEA_DTO.Basic;
 using WIDESEA_DTO.Stock;
 using WIDESEA_DTO.Task;
 using WIDESEA_ITaskInfoService;
@@ -270,6 +271,16 @@
         }
 
         /// <summary>
+        /// 鎵嬪姩绉诲簱
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost, HttpGet, Route("ManualRelocation"), AllowAnonymous]
+        public WebResponseContent ManualRelocation([FromBody] RelocationDTO relocationDTO)
+        {
+            return Service.ManualRelocation(relocationDTO);
+        }
+
+        /// <summary>
         /// 浠诲姟瀹屾垚
         /// </summary>
         /// <param name="taskNum">浠诲姟鍙�</param>

--
Gitblit v1.9.3