From e83c793bebdb1b9ecdcd79fab8d83fd167baa817 Mon Sep 17 00:00:00 2001
From: wankeda <Administrator@DESKTOP-HAU3ST3>
Date: 星期一, 19 一月 2026 15:51:56 +0800
Subject: [PATCH] 盘点流程

---
 WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/PalletTypeInfoService.cs |   75 +++++++++++++++++++++++++++++++++++++
 1 files changed, 74 insertions(+), 1 deletions(-)

diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/PalletTypeInfoService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/PalletTypeInfoService.cs
index 0a5bb15..52f4b6f 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/PalletTypeInfoService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/PalletTypeInfoService.cs
@@ -1,9 +1,13 @@
-锘縰sing System;
+锘縰sing Newtonsoft.Json;
+using System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Net.Http;
 using System.Text;
 using System.Threading.Tasks;
+using WIDESEA_Core;
 using WIDESEA_Core.BaseServices;
+using WIDESEA_Core.Const;
 using WIDESEA_IBasicRepository;
 using WIDESEA_IBasicService;
 using WIDESEA_Model.Models;
@@ -15,5 +19,74 @@
         public PalletTypeInfoService(IPalletTypeInfoRepository BaseDal) : base(BaseDal)
         {
         }
+
+        /// <summary>
+        /// 鎵撳嵃鎵樼洏鐮�
+        /// </summary>
+        /// <param name="num"></param>
+        /// <returns></returns>
+        public WebResponseContent PrintPalletCode(int num, string palletCodeType)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                List<string> PalletCodes = new List<string>();
+                for (int i = 0; i < num; i++)
+                {
+                    //PalletCodes.Add(GetOrderPintCode("PalletCodes"),palletCodeType);
+                }
+                content= PrintPallet(PalletCodes);
+                return content.OK();
+            }
+            catch (Exception ex)
+            {
+                return content.Error("鏈煡閿欒锛岃鑱旂郴绠$悊鍛�");
+            }
+        }
+
+        /// <summary>
+        /// 鑾峰彇璁㈠崟缂栧彿
+        /// </summary>
+        /// <param name="printCode"></param>
+        /// <returns></returns>
+        public string GetOrderPintCode(string printCode,string palletCodeType)
+        {
+            string PrintCode = "";
+            //var PrintSetting = SqlSugarHelper.DbWMS.Queryable<Dt_PrintSetting>().Where(x => x.PrintCode == printCode).ToList().FirstOrDefault();
+
+            //if (PrintSetting.Spare1 == DateTime.Now.ToString("yyyyMMdd"))
+            //{
+            //    PrintCode = PrintSetting.Spare1 + PrintSetting.PrintNo.ToString().PadLeft(PrintSetting.Spare2, '0');
+            //    PrintSetting.PrintNo = PrintSetting.PrintNo + 1;
+            //}
+            //else
+            //{
+            //    PrintSetting.Spare1 = DateTime.Now.ToString("yyyyMMdd");
+            //    PrintSetting.PrintNo = 2;
+            //    PrintCode = PrintSetting.Spare1 + 1.ToString().PadLeft(PrintSetting.Spare2, '0');
+            //}
+            //SqlSugarHelper.DbWMS.Updateable(PrintSetting).ExecuteCommand();
+            return PrintCode;
+        }
+
+        /// <summary>
+        /// 璋冪敤鎵撳嵃鎵樼洏鐮佹帴鍙�
+        /// </summary>
+        /// <param name="palletCodes"></param>
+        /// <returns></returns>
+        /// <exception cref="InvalidOperationException"></exception>
+        public WebResponseContent PrintPallet(List<string> palletCodes)
+        {
+            var Base = "";
+            var ipAddress = "";
+            if (Base == null || ipAddress == null)
+            {
+                throw new InvalidOperationException("WMS IP 鏈厤缃�");
+            }
+            var IpAddress = Base + ipAddress;
+            //var result = HttpsClient.PostAsync(palletCodes.ToJsonString()).Result; 
+            //return JsonConvert.DeserializeObject<WebResponseContent>();
+            return WebResponseContent.Instance.OK();
+        }
     }
 }

--
Gitblit v1.9.3