diff --git a/DM_Weight/ReportTemp/account_book_new.grf b/DM_Weight/ReportTemp/account_book_new.grf index ea1f591..c5aedbe 100644 --- a/DM_Weight/ReportTemp/account_book_new.grf +++ b/DM_Weight/ReportTemp/account_book_new.grf @@ -23,7 +23,7 @@ }, { "Name":"日期", - "DBFieldName":"YearMD" + "DBFieldName":"oldYearMD" }, { "Name":"批号", diff --git a/DM_Weight/ViewModels/CheckOrderNewWindowNewViewModel.cs b/DM_Weight/ViewModels/CheckOrderNewWindowNewViewModel.cs index 5dc0941..7c7f27a 100644 --- a/DM_Weight/ViewModels/CheckOrderNewWindowNewViewModel.cs +++ b/DM_Weight/ViewModels/CheckOrderNewWindowNewViewModel.cs @@ -613,7 +613,7 @@ namespace DM_Weight.ViewModels accountBookG2Day.UseDose =!string.IsNullOrEmpty(accountBookG2Day.UseDose)?(Convert.ToInt32(accountBookG2Day.UseDose) + Convert.ToInt32(oi.UseDose)).ToString(): oi.UseDose; accountBookG2Day.ResidualDose = !string.IsNullOrEmpty(accountBookG2Day.ResidualDose) ? (Convert.ToInt32(accountBookG2Day.ResidualDose) + Convert.ToInt32(oi.ResidualDose)).ToString(): oi.ResidualDose; accountBookG2Day.TotalStock = (accountBookEmpty != null ? (accountBookEmpty.TotalStock > 0 ? accountBookEmpty.TotalStock : 0) : 0) + oi.Quantity; - accountBookG2Day.CreateTime = DateTime.Now; + accountBookG2Day.CreateTime =new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59); SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand(); manuStock = accountBookG2Day.ManuStock; } @@ -633,7 +633,7 @@ namespace DM_Weight.ViewModels UserId2 = HomeWindowViewModel.Reviewer?.Id, MachineId = ConfigurationManager.AppSettings["dm_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 = oi.Quantity, UseDose=oi.UseDose, diff --git a/DM_Weight/ViewModels/CheckOrderNewWindowViewModel.cs b/DM_Weight/ViewModels/CheckOrderNewWindowViewModel.cs index ebb4e1b..f3b0826 100644 --- a/DM_Weight/ViewModels/CheckOrderNewWindowViewModel.cs +++ b/DM_Weight/ViewModels/CheckOrderNewWindowViewModel.cs @@ -580,6 +580,7 @@ namespace DM_Weight.ViewModels accountBookG2Day.UseDose = (Convert.ToSingle(accountBookG2Day.UseDose!=null? accountBookG2Day.UseDose:0) + Convert.ToSingle(oi._OrderDetail.surgicalResidual.UseDose!=null? oi._OrderDetail.surgicalResidual.UseDose:0)).ToString(); accountBookG2Day.ResidualDose = (Convert.ToSingle(accountBookG2Day.ResidualDose!=null? accountBookG2Day.ResidualDose:0) + Convert.ToSingle(oi._OrderDetail.surgicalResidual.ResidualDose!=null? oi._OrderDetail.surgicalResidual.ResidualDose:0)).ToString(); accountBookG2Day.TotalStock = (accountBookEmpty != null ? (accountBookEmpty.TotalStock > 0 ? accountBookEmpty.TotalStock : 0) : 0) + oi._OrderDetail.Quantity; + accountBookG2Day.CreateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59); SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand(); manuStock = accountBookG2Day.ManuStock; } @@ -599,7 +600,7 @@ namespace DM_Weight.ViewModels UserId2 = HomeWindowViewModel.Reviewer?.Id, MachineId = ConfigurationManager.AppSettings["dm_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 = oi._OrderDetail.Quantity, UseDose = oi._OrderDetail.surgicalResidual.UseDose, diff --git a/DM_Weight/ViewModels/CheckStockWindowViewModel.cs b/DM_Weight/ViewModels/CheckStockWindowViewModel.cs index f4ce4ad..b9c4ba8 100644 --- a/DM_Weight/ViewModels/CheckStockWindowViewModel.cs +++ b/DM_Weight/ViewModels/CheckStockWindowViewModel.cs @@ -228,6 +228,7 @@ namespace DM_Weight.ViewModels //负数直接记0 accountBookG2Day.TotalStock = (accountBookEmpty != null ? (accountBookEmpty.TotalStock > 0 && accountBookEmpty.TotalStock > (it.CheckQuantity - it.Quantity) ? accountBookEmpty.TotalStock - (it.CheckQuantity - it.Quantity) : 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; } @@ -247,7 +248,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.CheckQuantity - it.Quantity) }).ExecuteCommand(); @@ -305,7 +306,7 @@ namespace DM_Weight.ViewModels UserId2 = HomeWindowViewModel.Reviewer?.Id, MachineId = ConfigurationManager.AppSettings["dm_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.Quantity - it.CheckQuantity), //UseDose = oi._OrderDetail.surgicalResidual.UseDose,