From c5f01e9a882b16f534166d033312c5c8ba8d94dd Mon Sep 17 00:00:00 2001
From: xiaojiao <xiaojiao@kaokeziliao.com>
Date: 星期六, 24 一月 2026 14:35:21 +0800
Subject: [PATCH] 离开北京前最后的版本,包含打印机程序

---
 项目代码/WMS/WIDESEA_WMSServer/WIDESEA.Services/Services/BasicInfo/Partial/Dt_EmptyPalletService.cs |   63 +++++++++++++++++++++++--------
 1 files changed, 46 insertions(+), 17 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA.Services/Services/BasicInfo/Partial/Dt_EmptyPalletService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA.Services/Services/BasicInfo/Partial/Dt_EmptyPalletService.cs"
index a4bef02..288408b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA.Services/Services/BasicInfo/Partial/Dt_EmptyPalletService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA.Services/Services/BasicInfo/Partial/Dt_EmptyPalletService.cs"
@@ -6,25 +6,28 @@
 *鐢ㄦ埛淇℃伅銆佹潈闄愩�佽鑹茬瓑浣跨敤UserContext.Current鎿嶄綔
 *Dt_materielinfoService瀵瑰銆佸垹銆佹敼鏌ャ�佸鍏ャ�佸鍑恒�佸鏍镐笟鍔′唬鐮佹墿灞曞弬鐓erviceFunFilter
 */
-using WIDESEA.Core.BaseProvider;
-using WIDESEA.Core.Extensions.AutofacManager;
-using WIDESEA.Entity.DomainModels;
-using System.Linq;
-using WIDESEA.Core.Utilities;
-using System.Linq.Expressions;
-using WIDESEA.Core.Extensions;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.Extensions.DependencyInjection;
+using Google.Protobuf.WellKnownTypes;
 using Microsoft.AspNetCore.Http;
-using WIDESEA.Services.IRepositories;
-using System;
-using WIDESEA.Core.ManageUser;
-using WIDESEA.Core.Enums;
-using WIDESEA.Core.Services;
-using System.Threading.Tasks;
-using Newtonsoft.Json;
-using System.Collections.Generic;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.EntityFrameworkCore;
 using Microsoft.Extensions.Caching.Memory;
+using Microsoft.Extensions.DependencyInjection;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Linq.Expressions;
+using System.Threading.Tasks;
+using WIDESEA.Core.BaseProvider;
+using WIDESEA.Core.Enums;
+using WIDESEA.Core.Extensions;
+using WIDESEA.Core.Extensions.AutofacManager;
+using WIDESEA.Core.Filters;
+using WIDESEA.Core.ManageUser;
+using WIDESEA.Core.Services;
+using WIDESEA.Core.Utilities;
+using WIDESEA.Entity.DomainModels;
+using WIDESEA.Services.IRepositories;
 using WIDESEA.Services.Repositories;
 using WIDESEA_Common.LogEnum;
 
@@ -48,6 +51,21 @@
             //base.Init(dbRepository);
         }
 
+        // 閲嶅啓涓�涓鍏ョ殑鍔熻兘
+
+        ///// <summary>
+        ///// 瀵煎叆琛ㄦ暟鎹瓻xcel
+        ///// </summary>
+        ///// <param name="fileInput"></param>
+        ///// <returns></returns>
+        //[HttpPost, Route("Import")]
+        ////[ApiExplorerSettings(IgnoreApi = true)]
+        //public override WebResponseContent Import(List<IFormFile> fileInput)
+        //{
+        //    WebResponseContent content = new WebResponseContent();
+        //    return content.OK("鎴愬姛");
+        //}
+
         public override WebResponseContent Add(SaveModel saveDataModel)
         {
             WebResponseContent content = new WebResponseContent();
@@ -58,6 +76,10 @@
                 saveDataModel.MainData["EmptyPallet_modifier"] = UserContext.Current.UserTrueName;
                 saveDataModel.MainData["EmptyPallet_modifiertime"] = DateTime.Now;
                 string materiel_pallet_code = saveDataModel.MainData["EmptyPallet_name"].ToString();
+                if (materiel_pallet_code.Length != 6)
+                {
+                    return content.Error("鎵樼洏鏉$爜鍙兘鏄叚浣嶆暟");
+                }
                 if (repository.Exists(x => x.EmptyPallet_name == materiel_pallet_code))
                     return content.Error("褰撳墠鎵樼洏鏉$爜宸插瓨鍦�,璇峰嬁閲嶅娣诲姞.");
 
@@ -85,13 +107,20 @@
                 saveModel.MainData["EmptyPallet_modifier"] = UserContext.Current.UserTrueName;
                 saveModel.MainData["EmptyPallet_modifiertime"] = DateTime.Now;
                 content = base.Update(saveModel);
+                //LogRecord.WriteLog((int)LogEnum.OutBound, $"{UserContext.Current.UserTrueName}杞存壙閫夐厤鍑哄簱锛氬弬鏁�:{saveModel.Serialize()},杩斿洖鍙傛暟:{content.Serialize()}");
             }
             finally
             {
                 if (content.Status)
+                {
                     content.OK("淇敼鎵樼洏淇℃伅鎴愬姛.");
+                    Logger.AddLog(LoggerType.Add, saveModel, $"{DateTime.Now}淇敼鎵樼洏绠$悊鐨勪俊鎭褰�-鎴愬姛", content);
+                }
                 else
+                {
                     content.Error("淇敼鎵樼洏淇℃伅澶辫触:" + content.Message);
+                    Logger.AddLog(LoggerType.Add, saveModel, $"{DateTime.Now}淇敼鎵樼洏绠$悊鐨勪俊鎭褰�-澶辫触", content);
+                }
             }
             return content;
         }

--
Gitblit v1.9.3