diff --git a/DM_Weight/ViewModels/ApplyInStockWindowViewModel.cs b/DM_Weight/ViewModels/ApplyInStockWindowViewModel.cs index 8e14bfe..deaf3f1 100644 --- a/DM_Weight/ViewModels/ApplyInStockWindowViewModel.cs +++ b/DM_Weight/ViewModels/ApplyInStockWindowViewModel.cs @@ -671,6 +671,7 @@ namespace DM_Weight.ViewModels if (accountBookG2Day != null) { accountBookG2Day.ManuStock = accountBookG2Day.ManuStock + it.AddQuantity; + accountBookG2Day.CreateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59); SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand(); } else @@ -688,7 +689,7 @@ namespace DM_Weight.ViewModels UserId2 = HomeWindowViewModel.Reviewer?.Id, MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), - CreateTime = DateTime.Now, + CreateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59), InvoiceNo = "日结存" }).ExecuteCommand(); if (iDayResult <= 0) diff --git a/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs b/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs index 9b68f36..bd8bd95 100644 --- a/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs +++ b/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs @@ -251,6 +251,7 @@ namespace DM_Weight.ViewModels { accountBookG2Day.ManuStock = accountBookG2Day.ManuStock + it.AddQuantity; accountBookG2Day.AddQuantity = accountBookG2Day.AddQuantity + it.AddQuantity; + accountBookG2Day.CreateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59); SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand(); manuStock = accountBookG2Day.ManuStock; } @@ -270,7 +271,7 @@ namespace DM_Weight.ViewModels UserId2 = HomeWindowViewModel.Reviewer?.Id, MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), - CreateTime=DateTime.Now, + CreateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59), InvoiceNo = "日结存", AddQuantity=it.AddQuantity }).ExecuteCommand(); diff --git a/DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs b/DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs index 62c4048..681550a 100644 --- a/DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs +++ b/DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs @@ -249,6 +249,7 @@ namespace DM_Weight.ViewModels { accountBookG2Day.ManuStock = accountBookG2Day.ManuStock - it.TakeQuantity; accountBookG2Day.OutQuantity = accountBookG2Day.OutQuantity + accountBookG2Day.OutQuantity; + accountBookG2Day.CreateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59); SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand(); manuStock = accountBookG2Day.ManuStock; } @@ -267,8 +268,8 @@ namespace DM_Weight.ViewModels UserId1 = HomeWindowViewModel.Operator?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id, MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), - CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), - CreateTime = DateTime.Now, + CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), + CreateTime =new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59), InvoiceNo = "日结存", OutQuantity=it.TakeQuantity }).ExecuteCommand(); diff --git a/DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs b/DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs index 6d72fa3..6eae7a0 100644 --- a/DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs +++ b/DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs @@ -304,7 +304,8 @@ namespace DM_Weight.ViewModels accountBookG2Day.AddQuantity = accountBookG2Day.AddQuantity + it.AddQuantity; //负数直接记0 accountBookG2Day.TotalStock = (accountBookEmpty != null ? (accountBookEmpty.TotalStock > 0 && accountBookEmpty.TotalStock > it.AddQuantity ? accountBookEmpty.TotalStock - it.AddQuantity : 0) : 0); - + + accountBookG2Day.CreateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59); SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand(); manuStock= accountBookG2Day.ManuStock; } @@ -324,7 +325,7 @@ namespace DM_Weight.ViewModels UserId2 = HomeWindowViewModel.Reviewer?.Id, MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), - CreateTime=DateTime.Now, + CreateTime=new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59), InvoiceNo = "日结存", AddQuantity=it.AddQuantity }).ExecuteCommand(); diff --git a/DM_Weight/ViewModels/InvoiceTakeDialogViewModel.cs b/DM_Weight/ViewModels/InvoiceTakeDialogViewModel.cs index 19569b2..e9e235a 100644 --- a/DM_Weight/ViewModels/InvoiceTakeDialogViewModel.cs +++ b/DM_Weight/ViewModels/InvoiceTakeDialogViewModel.cs @@ -373,6 +373,7 @@ namespace DM_Weight.ViewModels { accountBookG2Day.ManuStock = accountBookG2Day.ManuStock - it.TakeQuantity; accountBookG2Day.OutQuantity = accountBookG2Day.OutQuantity + it.TakeQuantity; + accountBookG2Day.CreateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59); SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand(); } else @@ -391,7 +392,7 @@ namespace DM_Weight.ViewModels UserId2 = HomeWindowViewModel.Reviewer?.Id, MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), - CreateTime = DateTime.Now, + CreateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59), InvoiceNo = "日结存", OutQuantity=it.TakeQuantity }).ExecuteCommand(); diff --git a/DM_Weight/ViewModels/OrderReturnDialogViewModel.cs b/DM_Weight/ViewModels/OrderReturnDialogViewModel.cs index cfaea85..2f1e39a 100644 --- a/DM_Weight/ViewModels/OrderReturnDialogViewModel.cs +++ b/DM_Weight/ViewModels/OrderReturnDialogViewModel.cs @@ -350,6 +350,7 @@ namespace DM_Weight.ViewModels { accountBookG2Day.ManuStock = accountBookG2Day.ManuStock + it.ReturnQuantity; accountBookG2Day.AddQuantity = accountBookG2Day.AddQuantity + it.ReturnQuantity; + accountBookG2Day.CreateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59); SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand(); manuStock = accountBookG2Day.ManuStock; } @@ -369,7 +370,7 @@ namespace DM_Weight.ViewModels UserId2 = HomeWindowViewModel.Reviewer?.Id, MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), - CreateTime = DateTime.Now, + CreateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59), InvoiceNo = "日结存", AddQuantity= it.ReturnQuantity }).ExecuteCommand(); diff --git a/DM_Weight/ViewModels/OrderTakeDialogViewModel.cs b/DM_Weight/ViewModels/OrderTakeDialogViewModel.cs index 8c5e157..511eb7c 100644 --- a/DM_Weight/ViewModels/OrderTakeDialogViewModel.cs +++ b/DM_Weight/ViewModels/OrderTakeDialogViewModel.cs @@ -392,6 +392,7 @@ namespace DM_Weight.ViewModels { accountBookG2Day.ManuStock = accountBookG2Day.ManuStock - it.TakeQuantity; accountBookG2Day.OutQuantity = accountBookG2Day.OutQuantity + it.TakeQuantity; + accountBookG2Day.CreateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59); SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand(); } else @@ -410,7 +411,7 @@ namespace DM_Weight.ViewModels UserId2 = HomeWindowViewModel.Reviewer?.Id, MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), - CreateTime = DateTime.Now, + CreateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59), InvoiceNo = "日结存", OutQuantity=it.TakeQuantity }).ExecuteCommand(); diff --git a/DM_Weight/ViewModels/ReturnDrugDialogViewModel.cs b/DM_Weight/ViewModels/ReturnDrugDialogViewModel.cs index 45c0db4..11422b9 100644 --- a/DM_Weight/ViewModels/ReturnDrugDialogViewModel.cs +++ b/DM_Weight/ViewModels/ReturnDrugDialogViewModel.cs @@ -281,6 +281,7 @@ namespace DM_Weight.ViewModels { accountBookG2Day.ManuStock = accountBookG2Day.ManuStock + ChannelStock.ReturnQuantity; accountBookG2Day.AddQuantity = accountBookG2Day.AddQuantity + ChannelStock.ReturnQuantity; + accountBookG2Day.CreateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59); SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand(); manuStock = accountBookG2Day.ManuStock; } @@ -300,7 +301,7 @@ namespace DM_Weight.ViewModels UserId2 = HomeWindowViewModel.Reviewer?.Id, MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), - CreateTime = DateTime.Now, + CreateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59), InvoiceNo = "日结存", AddQuantity=ChannelStock.ReturnQuantity }).ExecuteCommand(); diff --git a/DM_Weight/ViewModels/SelfAddDialogViewModel.cs b/DM_Weight/ViewModels/SelfAddDialogViewModel.cs index 3c9cc6f..8e302a9 100644 --- a/DM_Weight/ViewModels/SelfAddDialogViewModel.cs +++ b/DM_Weight/ViewModels/SelfAddDialogViewModel.cs @@ -285,6 +285,7 @@ namespace DM_Weight.ViewModels { accountBookG2Day.ManuStock = accountBookG2Day.ManuStock + it.AddQuantity; accountBookG2Day.AddQuantity = accountBookG2Day.AddQuantity + it.AddQuantity; + accountBookG2Day.CreateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59); SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand(); manuStock = accountBookG2Day.ManuStock; } @@ -304,7 +305,7 @@ namespace DM_Weight.ViewModels UserId2 = HomeWindowViewModel.Reviewer?.Id, MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), - CreateTime = DateTime.Now, + CreateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59), InvoiceNo = "日结存", AddQuantity=it.AddQuantity }).ExecuteCommand(); diff --git a/DM_Weight/ViewModels/SelfTakeDialogViewModel.cs b/DM_Weight/ViewModels/SelfTakeDialogViewModel.cs index c037f87..90e6a9d 100644 --- a/DM_Weight/ViewModels/SelfTakeDialogViewModel.cs +++ b/DM_Weight/ViewModels/SelfTakeDialogViewModel.cs @@ -258,6 +258,7 @@ namespace DM_Weight.ViewModels { accountBookG2Day.ManuStock = accountBookG2Day.ManuStock - it.TakeQuantity; accountBookG2Day.OutQuantity = accountBookG2Day.OutQuantity + it.TakeQuantity; + accountBookG2Day.CreateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59); SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand(); manuStock = accountBookG2Day.ManuStock; } @@ -277,7 +278,7 @@ namespace DM_Weight.ViewModels UserId2 = HomeWindowViewModel.Reviewer?.Id, MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), - CreateTime = DateTime.Now, + CreateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59), InvoiceNo = "日结存", OutQuantity=it.TakeQuantity }).ExecuteCommand();