From 75c4ed0d3c640e66bc95dc170de52b753629e3ed Mon Sep 17 00:00:00 2001
From: 雷神教育集团 <2244205553@qq.com>
Date: 星期五, 06 三月 2026 09:09:14 +0800
Subject: [PATCH] 最新

---
 项目代码/WCS/WCSServices/WIDESEAWCS_PackInfoService/StationPackInfoService.cs |   68 ++++++++++++++++++++++++++++++++++
 1 files changed, 68 insertions(+), 0 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_PackInfoService/StationPackInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_PackInfoService/StationPackInfoService.cs"
index 9725881..23dd1b4 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_PackInfoService/StationPackInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_PackInfoService/StationPackInfoService.cs"
@@ -7,6 +7,7 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+<<<<<<< HEAD
 using WIDESEAWCS_Core.BaseRepository;
 using WIDESEAWCS_Core;
 using WIDESEAWCS_Core.BaseServices;
@@ -15,13 +16,80 @@
 using WIDESEAWCS_Model.Models;
 using WIDESEAWCS_Core.Helper;
 using WIDESEAWCS_IPackInfoService;
+=======
+using WIDESEAWCS_Common.Utilities;
+using WIDESEAWCS_Core;
+using WIDESEAWCS_Core.BaseRepository;
+using WIDESEAWCS_Core.BaseServices;
+using WIDESEAWCS_Core.Helper;
+using WIDESEAWCS_IPackInfoRepository;
+using WIDESEAWCS_IPackInfoService;
+using WIDESEAWCS_ITaskInfoRepository;
+using WIDESEAWCS_Model.Models;
+using WIDESEAWCS_PackInfoRepository;
+>>>>>>> main
 
 namespace WIDESEAWCS_PackInfoService
 {
     public class StationPackInfoService : ServiceBase<Dt_StationPackInfo, IStationPackInfoRepository>, IStationPackInfoService
     {
+<<<<<<< HEAD
         public StationPackInfoService(IStationPackInfoRepository BaseDal) : base(BaseDal)
         {
+=======
+        private readonly IStationPackDetailRepository _stationPackDetailRepository;
+        private readonly IPackinfoRepository _packInfoRepository;
+        private readonly IPackaxisTaskRepository _packaxisTaskRepository;
+        public StationPackInfoService(IStationPackInfoRepository BaseDal, IStationPackDetailRepository stationPackDetailRepository, IPackinfoRepository packInfoRepository, IPackaxisTaskRepository packaxisTaskRepository) : base(BaseDal)
+        {
+            _stationPackDetailRepository = stationPackDetailRepository;
+            _packInfoRepository = packInfoRepository;
+            _packaxisTaskRepository = packaxisTaskRepository;
+        }
+        /// <summary>
+        /// 鎵嬪姩娓呯┖鐮佸灈鎵ц宸ヤ綅鏁版嵁
+        /// </summary>
+        /// <param name="StationCode"></param>
+        /// <returns></returns>
+        public WebResponseContent ManualClearPalletStationData(string StationCode)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                Dt_StationPackInfo packInfo = BaseDal.QueryFirst(x => x.StationCode == StationCode);
+                if (packInfo.PackType != 0 )
+                {
+                    packInfo.PackType = 0;
+                    packInfo.OrderNo = "";
+                    packInfo.MakeCode = "";
+                    packInfo.MaterielCode = "";
+                    packInfo.PackNum = 0;
+                    packInfo.AssignNum = 0;
+                    packInfo.ExecutingNum = 0;
+                    packInfo.OverNum = 0;
+                    content.Status = BaseDal.UpdateData(packInfo);
+                    //鍚屾椂鍒犻櫎鐮佸灈寰呮墽琛屾槑缁嗚〃
+
+                    //鍒犻櫎鐮佸灈宸ヤ綅鎵ц鏄庣粏锛屼慨鏀瑰緟鐮佸灈淇℃伅绠辩爜鐘舵�佷负0
+                    List<Dt_StationPackDetail> stationPackDetails = _stationPackDetailRepository.QueryData(x => x.StationPackId == packInfo.id);
+                    List<string> barCodes = stationPackDetails.Select(x => x.BoxCode).ToList();
+                    List<Dt_Packinfo> packinfos = _packInfoRepository.QueryData(x => barCodes.Contains(x.BarCode)).ToList();
+                    packinfos.ForEach(x => x.PackStatus = 0);//鏀瑰彉鐘舵��
+                    _packInfoRepository.UpdateData(packinfos);
+                    _stationPackDetailRepository.DeleteData(stationPackDetails);
+                }
+                else
+                {
+                    return WebResponseContent.Instance.Error("娓呴櫎澶辫触锛岃宸ヤ綅娌℃湁鐮佸灈鏁版嵁锛�");
+                }
+                     
+            }
+            catch(Exception e)
+            {
+                WebResponseContent.Instance.Error(e.Message);
+            }
+            return content;
+>>>>>>> main
         }
     }
 }

--
Gitblit v1.9.3