From ed0b898d7f0c05516e83133c8bc5b45e14876a28 Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期一, 17 二月 2025 14:43:52 +0800 Subject: [PATCH] 1.采购订单时间调整 2.采购订单接口新增route --- MES.Service/service/WomcabManager.cs | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/MES.Service/service/WomcabManager.cs b/MES.Service/service/WomcabManager.cs index 5275176..c4903fd 100644 --- a/MES.Service/service/WomcabManager.cs +++ b/MES.Service/service/WomcabManager.cs @@ -34,7 +34,7 @@ it => SqlFunc.GetRandom()); // 鍒嗛〉鏌ヨ鍔犳帓搴� Console.Write(p.TotalCount); //杩斿洖鎬绘暟 - var conModels = new List<IConditionalModel>(); //缁勮鏉′欢鏌ヨ浣滀负鏉′欢瀹炵幇 鍒嗛〉鏌ヨ鍔犳帓搴� + List<IConditionalModel> conModels = new(); //缁勮鏉′欢鏌ヨ浣滀负鏉′欢瀹炵幇 鍒嗛〉鏌ヨ鍔犳帓搴� conModels.Add(new ConditionalModel { FieldName = typeof(Womcab).GetProperties()[0].Name, @@ -42,7 +42,7 @@ }); //id=1 var data7 = base.GetPageList(conModels, p, it => SqlFunc.GetRandom()); - AsQueryable().Where(x => 1 == 1) + base.AsQueryable().Where(x => 1 == 1) .ToList(); //鏀寔浜嗚浆鎹㈡垚queryable,鎴戜滑鍙互鐢╭ueryable瀹炵幇澶嶆潅鍔熻兘 @@ -52,7 +52,8 @@ base.Insert(insertData); //鎻掑叆 base.InsertRange(insertArray); //鎵归噺鎻掑叆 var id = base.InsertReturnIdentity(insertData); //鎻掑叆杩斿洖鑷鍒� - AsInsertable(insertData).ExecuteCommand(); //鎴戜滑鍙互杞垚 Insertable瀹炵幇澶嶆潅鎻掑叆 + base.AsInsertable(insertData) + .ExecuteCommand(); //鎴戜滑鍙互杞垚 Insertable瀹炵幇澶嶆潅鎻掑叆 /*********鏇存柊*********/ @@ -61,7 +62,7 @@ base.Update(updateData); //鏍规嵁瀹炰綋鏇存柊 base.UpdateRange(updateArray); //鎵归噺鏇存柊 //base.Update(it => new Womcab() { ClassName = "a", CreateTime = DateTime.Now }, it => it.id==1);// 鍙洿鏂癈lassName鍒楀拰CreateTime鍒楋紝鍏跺畠鍒椾笉鏇存柊锛屾潯浠秈d=1 - AsUpdateable(updateData).ExecuteCommand(); //杞垚Updateable鍙互瀹炵幇澶嶆潅鐨勬彃鍏� + base.AsUpdateable(updateData).ExecuteCommand(); //杞垚Updateable鍙互瀹炵幇澶嶆潅鐨勬彃鍏� /*********鍒犻櫎*********/ @@ -70,7 +71,7 @@ base.DeleteById(1); //鏍规嵁涓婚敭鍒犻櫎 base.DeleteById(new[] { 1, 2 }); //鏍规嵁涓婚敭鏁扮粍鍒犻櫎 base.Delete(it => 1 == 2); //鏍规嵁鏉′欢鍒犻櫎 - AsDeleteable().Where(it => 1 == 2) + base.AsDeleteable().Where(it => 1 == 2) .ExecuteCommand(); //杞垚Deleteable瀹炵幇澶嶆潅鐨勬搷浣� } -- Gitblit v1.9.3