提交代码

This commit is contained in:
hehaibing-1996
2024-07-16 16:45:18 +08:00
parent ed3673db03
commit 7b8a885669
64 changed files with 1389 additions and 176 deletions

View File

@ -61,10 +61,12 @@ namespace WCS.BLL.Manager
Logs.Write("【初始化数据库】MX", LogsType.StartBoot);
}
//手动修改后台配置后再进行CodeFirst 数据库的生成、表的生成
//如果不配置此参数 每次启动都会持续几十秒才能成功启动后端
if (LocalFile.Config.IsResetDBOrTable)
{
#region
DbHelp.db.DbMaintenance.CreateDatabase();
//新部署时 日志需要建表 不然没得接口记录
DbHelp.dbLog.DbMaintenance.CreateDatabase();
Logs.Write("【初始化数据库】创建数据库", LogsType.StartBoot);
@ -72,12 +74,13 @@ namespace WCS.BLL.Manager
, typeof(InventoryDetail), typeof(OutOrder), typeof(OutOrderDetail), typeof(OutOrderMatDetail)
, typeof(ShelfTypeInfo), typeof(MatBaseInfo), typeof(MatInfo)
, typeof(StockTakingOrder), typeof(StockTakingOrderMatDetail), typeof(InOutRecord)
, typeof(DocumentSerialNumber),typeof(OrderLight),typeof(MatInfoLog)
, typeof(DocumentSerialNumber), typeof(OrderLight), typeof(MatInfoLog)
, typeof(AppVersion)
);
Logs.Write("【初始化数据库】db建表", LogsType.StartBoot);
Logs.Write("【初始化数据库】db业务数据库建表", LogsType.StartBoot);
DbHelp.dbLog.CodeFirst.InitTables(typeof(SystemApiLogRecord));
Logs.Write("【初始化数据库】logdb建表", LogsType.StartBoot);
Logs.Write("【初始化数据库】dblog(日志数据库)建表", LogsType.StartBoot);
//初始化单据序列号数据
if (!DbHelp.db.Queryable<DocumentSerialNumber>().Any())
@ -88,14 +91,12 @@ namespace WCS.BLL.Manager
UpdateDate = DateTime.Now,
CurrentSerialNumber = 0
};
var stockTakingDocumentSerialNumber = new DocumentSerialNumber()
{
DocumentType = DocumentTypeEnum.,
UpdateDate = DateTime.Now,
CurrentSerialNumber = 0
};
DbHelp.db.Insertable(outDocumentSerialNumber).ExecuteCommand();
DbHelp.db.Insertable(stockTakingDocumentSerialNumber).ExecuteCommand();
}