From a07e4702be045efa9b04b49a561463875dd28e0a Mon Sep 17 00:00:00 2001
From: 肖洋 <cathay_xy@163.com>
Date: 星期六, 04 一月 2025 16:18:33 +0800
Subject: [PATCH] 更新配置文件和事件总线逻辑,修复任务处理逻辑

---
 Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Volume.vue                                          |   20 ++--
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs                               |    5 
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs                          |    6 +
 .gitignore                                                                                                                    |    1 
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs                                      |   28 +++-
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/WIDESEA_WMSServer.MvcApplicationPartsAssemblyInfo.cs |    7 
 Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/roomtemperature.vue                                 |    4 
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs                         |    2 
 Code Management/WCS/WIDESEAWCS_Client/src/api/http.js                                                                         |    4 
 Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/AgingLibrary.vue                                    |  200 ++++++++++++++++++++--------------------
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs                                 |   15 +++
 11 files changed, 162 insertions(+), 130 deletions(-)

diff --git a/.gitignore b/.gitignore
index 0f5b1e7..bb69d43 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1595,3 +1595,4 @@
 /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
 /Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
 /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Properties/PublishProfiles/FolderProfile.pubxml
+*.targets
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/api/http.js b/Code Management/WCS/WIDESEAWCS_Client/src/api/http.js
index de9cdc7..77e3a74 100644
--- a/Code Management/WCS/WIDESEAWCS_Client/src/api/http.js
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/api/http.js
@@ -12,8 +12,8 @@
 let loadingInstance;
 let loadingStatus = false;
 if (process.env.NODE_ENV == 'development') {
-     axios.defaults.baseURL = 'http://127.0.0.1:9291/';
-    //axios.defaults.baseURL = 'http://192.168.5.251:9291/';
+    //  axios.defaults.baseURL = 'http://127.0.0.1:9291/';
+    axios.defaults.baseURL = 'http://192.168.20.251:9291/';
 }
 else if (process.env.NODE_ENV == 'debug') {
     axios.defaults.baseURL = 'http://127.0.0.1:8098/';
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/AgingLibrary.vue b/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/AgingLibrary.vue
index e5de6b4..efcfdd9 100644
--- a/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/AgingLibrary.vue
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/AgingLibrary.vue
@@ -1,102 +1,102 @@
 <template>
   <el-row>
-     <el-col :span="3">
-      
-       <device-stacker v-for="stacker in Stackers" :key="stacker.deviceName" :Stacker="stacker"></device-stacker>
-     </el-col>
-     <el-col :span="21">
-       <device-line v-for="device in devices" :key="device.deviceName" :device="device" />
-     </el-col>
-   </el-row>
- </template>
- 
- <script setup>
- import { onMounted, reactive, toRefs } from "vue";
- import eventBus from "@/uitils/eventBus";
- import DeviceLine from "@/components/DeviceLine.vue";
- import DeviceStacker from "@/components/DeviceStacker.vue";
- 
- // 鍫嗗灈鏈�
- const Stackers = reactive([]);
- 
- // 璁惧鍒楄〃锛堜慨鏀归噸澶嶈澶囧悕绉帮級
- const devices = reactive([]);
- 
- const intToBitArrayFromBinaryString = (num, numBits) => {
-   let binaryString = num.toString(2).padStart(numBits, '0');
-   return Array.from({ length: numBits }, (_, index) => binaryString[index] === '1');
- };
- 
- // 鐩戝惉璁惧鏁版嵁鍙樺寲
- onMounted(() => {
-   eventBus.on('locationData', eventData => {
-     console.log(eventData)
-     if (eventData.deviceName === "闄堝寲鍏ュ簱杈撻�佺嚎"||eventData.deviceName === "闄堝寲鍏ュ簱杈撻�佺嚎") {
- 
-       if (devices.length <= 0) {
-         devices.push({ deviceName: eventData.deviceName, data: eventData.data, childDeviceCode: eventData.childDeviceCode });
-       }
-       else {
-         const device = devices.find(c => c.childDeviceCode == eventData.childDeviceCode)
-         if (device) {
-           const number = eventData.data.commandWrite.writeInteractiveSignal;
-           const writeInteractiveSignal = intToBitArrayFromBinaryString(number, 8)
-           eventData.data.writeInteractiveSignal = writeInteractiveSignal;
-           device.data = eventData.data
-         }
-         else {
-           const number = eventData.data.commandWrite.writeInteractiveSignal;
-           const writeInteractiveSignal = intToBitArrayFromBinaryString(number, 8)
-           eventData.data.writeInteractiveSignal = writeInteractiveSignal;
-           devices.push({ deviceName: eventData.deviceName, data: eventData.data, childDeviceCode: eventData.childDeviceCode });
-         }
-       }
-     }
-   });
-   eventBus.on('stackerData', eventData => {
-     if (eventData.deviceName == "闄堝寲1鍙峰爢鍨涙満"||eventData.deviceName == "闄堝寲2鍙峰爢鍨涙満") {
-       if (Stackers.length == 0) {
-         Stackers.push({ deviceName: eventData.deviceName, data: eventData.data });
-       }
-       else {
-         const Stacker = Stackers.find(c => c.deviceName == eventData.deviceName);
-         if (Stacker) {
-           Stacker.data = eventData.data
-         }
-         else {
-           Stackers.push({ deviceName: eventData.deviceName, data: eventData.data });
-         }
-       }
-     }
-   })
- });
- </script>
- <style scoped>
- .Stackerbox {
-   width: 220px;
-   float: left;
- }
- 
- .Linebox {
-   width: 500px;
-   float: left;
- }
- 
- .box1 {
-   float: left;
- }
- 
- .card-body {
-   text-align: center;
-   border-radius: 6%;
- }
- 
- .Stacker {
-   background-color: burlywood;
- }
- 
- .lis {
-   float: left;
-   width: 233px;
- }
- </style>
\ No newline at end of file
+    <el-col :span="3">
+
+      <device-stacker v-for="stacker in Stackers" :key="stacker.deviceName" :Stacker="stacker"></device-stacker>
+    </el-col>
+    <el-col :span="21">
+      <device-line v-for="device in devices" :key="device.deviceName" :device="device" />
+    </el-col>
+  </el-row>
+</template>
+
+<script setup>
+import { onMounted, reactive, toRefs } from "vue";
+import eventBus from "@/uitils/eventBus";
+import DeviceLine from "@/components/DeviceLine.vue";
+import DeviceStacker from "@/components/DeviceStacker.vue";
+
+// 鍫嗗灈鏈�
+const Stackers = reactive([]);
+
+// 璁惧鍒楄〃锛堜慨鏀归噸澶嶈澶囧悕绉帮級
+const devices = reactive([]);
+
+const intToBitArrayFromBinaryString = (num, numBits) => {
+  let binaryString = num.toString(2).padStart(numBits, '0');
+  return Array.from({ length: numBits }, (_, index) => binaryString[index] === '1');
+};
+
+// 鐩戝惉璁惧鏁版嵁鍙樺寲
+onMounted(() => {
+  eventBus.on('locationData', eventData => {
+    console.log(eventData)
+    if (eventData.deviceName === "闄堝寲鍏ュ簱杈撻�佺嚎" || eventData.deviceName === "闄堝寲鍏ュ簱杈撻�佺嚎") {
+
+      if (devices.length <= 0) {
+        devices.push({ deviceName: eventData.deviceName, data: eventData.data, childDeviceCode: eventData.childDeviceCode });
+      }
+      else {
+        const device = devices.find(c => c.childDeviceCode == eventData.childDeviceCode)
+        if (device) {
+          const number = eventData.data.commandWrite.writeInteractiveSignal;
+          const writeInteractiveSignal = intToBitArrayFromBinaryString(number, 8)
+          eventData.data.writeInteractiveSignal = writeInteractiveSignal;
+          device.data = eventData.data
+        }
+        else {
+          const number = eventData.data.commandWrite.writeInteractiveSignal;
+          const writeInteractiveSignal = intToBitArrayFromBinaryString(number, 8)
+          eventData.data.writeInteractiveSignal = writeInteractiveSignal;
+          devices.push({ deviceName: eventData.deviceName, data: eventData.data, childDeviceCode: eventData.childDeviceCode });
+        }
+      }
+    }
+  });
+  eventBus.on('stackerData', eventData => {
+    if (eventData.deviceName.indexOf("闄堝寲") != -1) {
+      if (Stackers.length == 0) {
+        Stackers.push({ deviceName: eventData.deviceName, data: eventData.data });
+      }
+      else {
+        const Stacker = Stackers.find(c => c.deviceName == eventData.deviceName);
+        if (Stacker) {
+          Stacker.data = eventData.data
+        }
+        else {
+          Stackers.push({ deviceName: eventData.deviceName, data: eventData.data });
+        }
+      }
+    }
+  })
+});
+</script>
+<style scoped>
+.Stackerbox {
+  width: 220px;
+  float: left;
+}
+
+.Linebox {
+  width: 500px;
+  float: left;
+}
+
+.box1 {
+  float: left;
+}
+
+.card-body {
+  text-align: center;
+  border-radius: 6%;
+}
+
+.Stacker {
+  background-color: burlywood;
+}
+
+.lis {
+  float: left;
+  width: 233px;
+}
+</style>
\ No newline at end of file
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Volume.vue b/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Volume.vue
index cf2b85a..9cd227d 100644
--- a/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Volume.vue
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Volume.vue
@@ -15,28 +15,30 @@
 import DeviceStacker from "@/components/DeviceStacker.vue";
 // 鍫嗗灈鏈�
 const Stackers = reactive([]);
-var  i=0;
+var i = 0;
 // 璁惧鍒楄〃锛堜慨鏀归噸澶嶈澶囧悕绉帮級
 const devices = reactive([]);
 const num = reactive([])
 onMounted(() => {
-  eventBus.on('stackerData', eventData => { 
-    if (eventData.deviceName === "鍒嗗3绾垮叆搴撹緭閫佺嚎"||eventData.deviceName === "鍒嗗鍑哄簱杈撻�佺嚎") {
-    if (devices.length <= 0) {
+  eventBus.on('locationData', eventData => {
+    if (eventData.deviceName === "鍒嗗3绾垮叆搴撹緭閫佺嚎" || eventData.deviceName === "鍒嗗鍑哄簱杈撻�佺嚎") {
+      if (devices.length <= 0) {
         devices.push({ deviceName: eventData.deviceName, data: eventData.data, childDeviceCode: eventData.data.childDeviceCode });
       }
       else {
         const device = devices.find(c => c.childDeviceCode == eventData.data.childDeviceCode)
-        if(device){
+        if (device) {
           device.data = eventData.data
-        }else{
+        } else {
           devices.push({ deviceName: eventData.deviceName, data: eventData.data, childDeviceCode: eventData.data.childDeviceCode });
         }
       }
     }
   })
   eventBus.on('stackerData', eventData => {
-    if (eventData.deviceName == "鍒嗗3鍙峰爢鍨涙満"||eventData.deviceName == "鍒嗗2鍙峰爢鍨涙満") {
+    // if (eventData.deviceName == "鍒嗗3鍙峰爢鍨涙満"||eventData.deviceName == "鍒嗗2鍙峰爢鍨涙満") {
+    console.log(eventData.deviceName)
+    if (eventData.deviceName.indexOf("鍒嗗") != -1) {
       if (Stackers.length == 0) {
         Stackers.push({ deviceName: eventData.deviceName, data: eventData.data });
       }
@@ -53,6 +55,4 @@
   })
 })
 </script>
-<style scoped>
-
-</style>
\ No newline at end of file
+<style scoped></style>
\ No newline at end of file
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/roomtemperature.vue b/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/roomtemperature.vue
index 07cab63..66c4a4b 100644
--- a/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/roomtemperature.vue
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/roomtemperature.vue
@@ -20,7 +20,7 @@
 const devices = reactive([]);
 const num = reactive([])
 onMounted(() => {
-  eventBus.on('stackerData', eventData => {
+  eventBus.on('locationData', eventData => {
     // console.log(eventData)
    
       console.log(eventData)
@@ -41,7 +41,7 @@
     }
   })
   eventBus.on('stackerData', eventData => {
-    if (eventData.deviceName == "甯告俯1鍙峰爢鍨涙満"||eventData.deviceName == "甯告俯2鍙峰爢鍨涙満"||eventData.deviceName == "甯告俯3鍙峰爢鍨涙満"||eventData.deviceName == "甯告俯4鍙峰爢鍨涙満") {
+    if (eventData.deviceName.indexOf("甯告俯")) {
       if (Stackers.length == 0) {
         Stackers.push({ deviceName: eventData.deviceName, data: eventData.data });
       }
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
index c445821..95f92d0 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -16,6 +16,7 @@
 using WIDESEAWCS_DTO.TaskInfo;
 using WIDESEAWCS_IProcessRepository;
 using WIDESEAWCS_ISystemServices;
+using WIDESEAWCS_ITaskInfo_HtyRepository;
 using WIDESEAWCS_ITaskInfoRepository;
 using WIDESEAWCS_ITaskInfoService;
 using WIDESEAWCS_Model.Models;
@@ -35,6 +36,7 @@
     {
         private readonly ITaskService _taskService;
         private readonly ITaskRepository _taskRepository;
+        private readonly ITask_HtyRepository _task_HtyRepository;
         private readonly ITaskExecuteDetailService _taskExecuteDetailService;
         private readonly IRouterService _routerService;
         private readonly IPlatFormRepository _platFormRepository;
@@ -50,7 +52,7 @@
         private static List<int>? userIds;
 
 
-        public CommonConveyorLineJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper, ITaskRepository taskRepository, IPlatFormRepository platFormRepository, ISys_ConfigService sys_ConfigService, IDt_StationManagerService stationManagerService, IDt_StationManagerRepository stationManagerRepository, ICacheService cacheService, INoticeService noticeService, IDeviceInfoRepository deviceInfoRepository)
+        public CommonConveyorLineJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper, ITaskRepository taskRepository, IPlatFormRepository platFormRepository, ISys_ConfigService sys_ConfigService, IDt_StationManagerService stationManagerService, IDt_StationManagerRepository stationManagerRepository, ICacheService cacheService, INoticeService noticeService, IDeviceInfoRepository deviceInfoRepository,ITask_HtyRepository task_HtyRepository)
         {
             _taskService = taskService;
             _taskExecuteDetailService = taskExecuteDetailService;
@@ -64,6 +66,7 @@
             _cacheService = cacheService;
             _noticeService = noticeService;
             _deviceInfoRepository = deviceInfoRepository;
+            _task_HtyRepository = task_HtyRepository;
         }
 
         public async Task Execute(IJobExecutionContext context)
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs
index 67de370..6c709ad 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs
@@ -1,4 +1,5 @@
 锘縰sing HslCommunication;
+using Mapster;
 using Newtonsoft.Json;
 using System.Text.RegularExpressions;
 using System.Threading.Tasks;
@@ -215,6 +216,20 @@
                         ConsoleHelper.WriteWarningLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵task.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵task.PalletCode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣姹傛壂鐮佸叆搴�(瀹炵洏),涓嬩竴鐩爣鍦板潃銆恵1000}銆�");
                         ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
                     }
+                    else if(task.TargetAddress == "1020-1")
+                    {
+                        var next = task.NextAddress;
+                        var taskCommand = MapTaskCommand(task, command);
+                        task.NextAddress = next;
+                        ConsoleHelper.WriteWarningLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣姹傛壂鐮佸叆搴�(瀹炵洏),涓嬩竴鐩爣鍦板潃銆恵taskCommand.TargetAddress}銆�");
+
+                        conveyorLine.SendCommand(taskCommand, childDeviceCode);
+                        ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
+
+                        var taskHty = task.Adapt<Dt_Task_Hty>();
+                        _task_HtyRepository.AddData(taskHty);
+                        _taskService.DeleteData(task);
+                    }
                     else
                     {
                         var next = task.NextAddress;
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
index 305be2d..208374c 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
@@ -163,7 +163,7 @@
                             childDeviceCode,
                             commandAfter = command,
                         };
-                        _noticeService.StackerData(userIds?.FirstOrDefault(), userTokenIds, new { conveyorLine.DeviceName, data = obj });
+                        _noticeService.LineData(userIds?.FirstOrDefault(), userTokenIds, new { conveyorLine.DeviceName, data = obj });
 
                         #endregion 璋冪敤浜嬩欢鎬荤嚎閫氱煡鍓嶇
                     }
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
index a6e2d45..3b6a326 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -283,7 +283,7 @@
         //task.CurrentAddress = task.NextAddress;
         //task.NextAddress = task.TargetAddress;
 
-        _locationStatusChangeRecordRepository.AddLocationStatusChangeRecord(location, lastStatus, (int)StatusChangeTypeEnum.AutomaticDelivery,task.TaskNum);
+        _locationStatusChangeRecordRepository.AddLocationStatusChangeRecord(location, lastStatus, (int)StatusChangeTypeEnum.AutomaticDelivery, task.TaskNum);
 
         LogFactory.GetLog("浠诲姟瀹屾垚").Info(true, "鏇存柊搴撳瓨鐘舵�佷笌浠诲姟鐘舵��");
         return (location, task);
@@ -359,7 +359,7 @@
         try
         {
             // 鏇存柊璐т綅鍜屽簱瀛樹俊鎭�
-           (DtStockInfo updateStock, DtLocationInfo locationInForm, DtLocationInfo locationInfoTo) = UpdateStockLocation(stock, task);
+            (DtStockInfo updateStock, DtLocationInfo locationInForm, DtLocationInfo locationInfoTo) = UpdateStockLocation(stock, task);
             var taskHty = CreateHistoricalTask(task);
             LogFactory.GetLog("浠诲姟瀹屾垚").InfoFormat(true, "绉诲簱浠诲姟瀹屾垚", $"璐т綅鍦板潃锛歿task.TargetAddress},淇敼鍚庡簱瀛樻暟鎹細{JsonConvert.SerializeObject(updateStock)}锛屽師鍏堣揣浣嶆暟鎹細{locationInForm}");
 
@@ -994,17 +994,27 @@
                     return content.Error(result.MOMMessage);
             }
 
-            // 澶勭悊寮傚父鐢佃姱鎯呭喌
-            var serialNosError = result.SerialNos.Where(x => x.SerialNoStatus != 1 && x.SerialNoStatus != 4).ToList();
-            if (serialNosError.Count > 0)
+
+            if (result.SerialNos.Count <= 0)
             {
-                return await HandleErrorCells(input, area, serialNosError);
+                return await RequestTrayInTaskAsync(input);
             }
+            else
+            {
 
-            var boxing = CreateBoxingInfo(result, input.PalletCode);
-            if (boxing == null) return content.Error("缁勭洏澶辫触");
 
-            return await ProcessBasedOnProcessCode(boxing, area, input, result);
+                // 澶勭悊寮傚父鐢佃姱鎯呭喌
+                var serialNosError = result.SerialNos.Where(x => x.SerialNoStatus != 1 && x.SerialNoStatus != 4).ToList();
+                if (serialNosError.Count > 0)
+                {
+                    return await HandleErrorCells(input, area, serialNosError);
+                }
+
+                var boxing = CreateBoxingInfo(result, input.PalletCode);
+                if (boxing == null) return content.Error("缁勭洏澶辫触");
+
+                return await ProcessBasedOnProcessCode(boxing, area, input, result);
+            }
         }
         catch (Exception err)
         {
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
index ecc7227..ad48b3d 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
@@ -101,7 +101,11 @@
         if (!content.Status) return content.Error("宸ヨ壓鐢宠澶辫触");
 
         var resultProcessApply = JsonConvert.DeserializeObject<ResultProcessApply>(content.Data.ToString());
-        if (!resultProcessApply.Success) return content.Error("宸ヨ壓鐢宠澶辫触");
+        if (!resultProcessApply.Success)
+        {
+            return await HandleErrorCells(input, area);
+            //return content.Error("宸ヨ壓鐢宠澶辫触");
+        }
 
         var number = resultProcessApply.ProcessInfo.Where(x => x.ProcessCode.Contains(boxing.ProcessCode)).FirstOrDefault().Number.ToInt32();
         foreach (var item in resultProcessApply.ProcessInfo)
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/WIDESEA_WMSServer.MvcApplicationPartsAssemblyInfo.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/WIDESEA_WMSServer.MvcApplicationPartsAssemblyInfo.cs
index c85e30c..1cf4236 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/WIDESEA_WMSServer.MvcApplicationPartsAssemblyInfo.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/WIDESEA_WMSServer.MvcApplicationPartsAssemblyInfo.cs
@@ -1,10 +1,9 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
-//     姝や唬鐮佺敱宸ュ叿鐢熸垚銆�
-//     杩愯鏃剁増鏈�:4.0.30319.42000
+//     This code was generated by a tool.
 //
-//     瀵规鏂囦欢鐨勬洿鏀瑰彲鑳戒細瀵艰嚧涓嶆纭殑琛屼负锛屽苟涓斿鏋�
-//     閲嶆柊鐢熸垚浠g爜锛岃繖浜涙洿鏀瑰皢浼氫涪澶便��
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
 // </auto-generated>
 //------------------------------------------------------------------------------
 

--
Gitblit v1.9.3