From 3989f167b217f60e6c52722a2726450e029c7800 Mon Sep 17 00:00:00 2001
From: hwh <332078369@qq.com>
Date: 星期二, 04 六月 2024 15:01:16 +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