From 16de8df813307d46a35f4816e5810350d26dd676 Mon Sep 17 00:00:00 2001
From: yangpeixing <yangpeixing@hnkhzn.com>
Date: 星期四, 22 一月 2026 16:17:06 +0800
Subject: [PATCH] 1
---
WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/PalletTypeInfoService.cs | 22 ++++++----------------
1 files changed, 6 insertions(+), 16 deletions(-)
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/PalletTypeInfoService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/PalletTypeInfoService.cs
index 87000a5..e414e9d 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/PalletTypeInfoService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/PalletTypeInfoService.cs
@@ -8,6 +8,7 @@
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Const;
+using WIDESEA_Core.Helper;
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
using WIDESEA_Model.Models;
@@ -35,11 +36,7 @@
{
PalletCodes.Add(GetOrderPintCode($"{palletCodeType}PalletCodes",palletCodeType));
}
- //content= PrintPallet(PalletCodes);
- foreach(var PalletCode in PalletCodes)
- {
- Console.WriteLine(PalletCode);
- }
+ content= PrintPallet(PalletCodes);
return content.OK();
}
catch (Exception ex)
@@ -60,14 +57,14 @@
if (PrintSetting.Spare1 == DateTime.Now.ToString("yyyyMMdd"))
{
- PrintCode = palletCodeType+PrintSetting.Spare1 + PrintSetting.PrintNo.ToString().PadLeft(PrintSetting.Spare2, '0');
+ PrintCode = palletCodeType+PrintSetting.PrintNo.ToString().PadLeft(PrintSetting.Spare2, '0')+PrintSetting.Spare1;
PrintSetting.PrintNo = PrintSetting.PrintNo + 1;
}
else
{
PrintSetting.Spare1 = DateTime.Now.ToString("yyyyMMdd");
PrintSetting.PrintNo = 2;
- PrintCode = palletCodeType+PrintSetting.Spare1 + 1.ToString().PadLeft(PrintSetting.Spare2, '0');
+ PrintCode = palletCodeType+1.ToString().PadLeft(PrintSetting.Spare2, '0')+PrintSetting.Spare1;
}
Db.Updateable(PrintSetting).ExecuteCommand();
return PrintCode;
@@ -81,15 +78,8 @@
/// <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>();
+ string url = "http://127.0.0.1:8098/Print/PrintPalletCode";
+ HttpHelper.Post(url, palletCodes.Serialize());
return WebResponseContent.Instance.OK();
}
}
--
Gitblit v1.9.3