1
hwh
2024-06-03 f03b5c7ea42074b0aa6f6836301f20deefb64813
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();