From 98c5fbdce57cf9f0914ca5fb2c659c9396d3aed6 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期三, 03 十二月 2025 22:53:01 +0800
Subject: [PATCH] 提交
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_BasicService/InvokeMESService.cs | 37 +++++++++++--------------------------
1 files changed, 11 insertions(+), 26 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_BasicService/InvokeMESService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_BasicService/InvokeMESService.cs"
index 8740fd8..3848d23 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_BasicService/InvokeMESService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_BasicService/InvokeMESService.cs"
@@ -27,31 +27,7 @@
using WIDESEA_Model.Models;
namespace WIDESEA_BasicService
-{
- public class TransferDataDto
- {
- public DateTime TransferTime { get; set; }
- public List<TransferItemDto> Items { get; set; }
- }
-
- public class TransferItemDto
- {
- public string MaterialCode { get; set; }
- public decimal TotalQuantity { get; set; }
- public List<LocationInfoDto> Locations { get; set; }
- }
- public class LocationInfoDto
- {
- public string LocationCode { get; set; }
- public decimal Quantity { get; set; }
- public List<BarcodeInfoDto> Barcodes { get; set; }
- }
-
- public class BarcodeInfoDto
- {
- public string Barcode { get; set; }
- public decimal Quantity { get; set; }
- }
+{
public class InvokeMESService : IInvokeMESService
{
private readonly IHttpClientFactory _httpClientFactory;
@@ -817,12 +793,21 @@
var now = DateTime.Now;
string datePart = now.ToString("MMdd");
long ticksPart = now.Ticks;
+ // 鎷兼帴锛氳鏁板櫒琛�0涓�3浣嶏紙閬垮厤浣嶆暟涓嶄竴鑷达級
+ return $"{datePart}{ticksPart}";
+ }
+
+ public static string GenerateCount()
+ {
+ var now = DateTime.Now;
+ string datePart = now.ToString("yyyyMMddHHmmss");
+
// 鍘熷瓙閫掑璁℃暟鍣紙鍙栨ā1000锛岀‘淇濊鏁板櫒浠�3浣嶏紝鎺у埗闀垮害锛�
long counterPart = Interlocked.Increment(ref _counter) % 1000;
// 鎷兼帴锛氳鏁板櫒琛�0涓�3浣嶏紙閬垮厤浣嶆暟涓嶄竴鑷达級
- return $"{datePart}{ticksPart}";
+ return $"{datePart}{counterPart:D3}";
}
}
}
--
Gitblit v1.9.3