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 | 111 +++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 94 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 3508954..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;
@@ -47,5 +50,79 @@
//澶氱鎴蜂細鐢ㄥ埌杩檌nit浠g爜锛屽叾浠栨儏鍐靛彲浠ヤ笉鐢�
//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();
+ try
+ {
+ saveDataModel.MainData["EmptyPallet_creator"] = UserContext.Current.UserTrueName;
+ saveDataModel.MainData["EmptyPallet_createtime"] = DateTime.Now;
+ 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("褰撳墠鎵樼洏鏉$爜宸插瓨鍦�,璇峰嬁閲嶅娣诲姞.");
+
+ content = base.Add(saveDataModel);
+ }
+ catch (Exception ex)
+ {
+ content.Error("娣诲姞杞﹀瀷澶辫触:" + ex.Message);
+ }
+ finally
+ {
+ if (content.Status)
+ content.OK("娣诲姞鎵樼洏淇℃伅鎴愬姛.");
+ else
+ content.Error("娣诲姞鎵樼洏淇℃伅澶辫触:" + content.Message);
+ }
+ return content;
+ }
+
+ public override WebResponseContent Update(SaveModel saveModel)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ 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