From a1d526f1de490246a7b58460f5ca4f1fefbde45a Mon Sep 17 00:00:00 2001 From: hwh <332078369@qq.com> Date: 星期四, 13 六月 2024 08:33:00 +0800 Subject: [PATCH] 出库标签打印 --- Wms_09/WMS.BLL/SysServer/PrintTemplateServer.cs | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/Wms_09/WMS.BLL/SysServer/PrintTemplateServer.cs b/Wms_09/WMS.BLL/SysServer/PrintTemplateServer.cs index a69b49b..7cf7f17 100644 --- a/Wms_09/WMS.BLL/SysServer/PrintTemplateServer.cs +++ b/Wms_09/WMS.BLL/SysServer/PrintTemplateServer.cs @@ -29,6 +29,10 @@ /// <exception cref="NotImplementedException"></exception> public async Task AddPrintTemplate(SysPrintTemplate model, int userid) { + if (model.Status == "1") + { + await Db.Updateable<SysPrintTemplate>().SetColumns(s => s.Status == "0").Where(s => s.Type == model.Type && model.Status == "1").ExecuteCommandAsync(); + } model.CreateTime = DateTime.Now; model.CreateUser = userid; await Db.Insertable(model).ExecuteCommandAsync(); @@ -51,6 +55,10 @@ /// <exception cref="NotImplementedException"></exception> public async Task EditPrintTemplate(SysPrintTemplate model, int userid) { + if (model.Status == "1") + { + await Db.Updateable<SysPrintTemplate>().SetColumns(s => s.Status == "0").Where(s => s.Type == model.Type && model.Status == "1").ExecuteCommandAsync(); + } model.UpdateTime = DateTime.Now; model.UpdateUser = userid; await Db.Updateable(model).UpdateColumns(it => new { it.Name, it.Type, it.Status, it.PositionJson, it.UpdateTime, it.UpdateUser }).ExecuteCommandAsync(); -- Gitblit v1.8.0