Merge branch 'development' of https://git.dlhis.com/liguoyang/jinko.yikatong into development

This commit is contained in:
cheche
2024-01-12 16:06:14 +08:00
4 changed files with 25 additions and 20 deletions

View File

@@ -18,21 +18,21 @@ public class SqlSugarPack : BaseAppPack
public override void Configure(IApplicationBuilder app, IWebHostEnvironment env) public override void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{ {
#if DEBUG #if DEBUG
using var scope = app.ApplicationServices.CreateScope(); //using var scope = app.ApplicationServices.CreateScope();
var db = scope.ServiceProvider.GetService<ISqlSugarClient>(); //var db = scope.ServiceProvider.GetService<ISqlSugarClient>();
var tables = App.ActiveTyps.Where(x => x.IsDefined(typeof(SugarTable), false)) //var tables = App.ActiveTyps.Where(x => x.IsDefined(typeof(SugarTable), false))
.Where(x => !x.IsDefined(typeof(SkipScanAttribute), false)) // .Where(x => !x.IsDefined(typeof(SkipScanAttribute), false))
.ToArray(); // .ToArray();
db.DbMaintenance.CreateDatabase(); //db.DbMaintenance.CreateDatabase();
db.CodeFirst.InitTables(tables); //db.CodeFirst.InitTables(tables);
using var scopeFace = app.ApplicationServices.CreateScope(); //using var scopeFace = app.ApplicationServices.CreateScope();
var dbFace = scopeFace.ServiceProvider.GetService<ISqlSugarClient>(); //var dbFace = scopeFace.ServiceProvider.GetService<ISqlSugarClient>();
var faceConnectionString = Configuration.GetSection("SqlSugarOptions:FaceConnectionString").Value; //var faceConnectionString = Configuration.GetSection("SqlSugarOptions:FaceConnectionString").Value;
dbFace.CurrentConnectionConfig.ConnectionString = faceConnectionString; //dbFace.CurrentConnectionConfig.ConnectionString = faceConnectionString;
dbFace.DbMaintenance.CreateDatabase(); //dbFace.DbMaintenance.CreateDatabase();
dbFace.CodeFirst.InitTables<GainfoFaceEntity>(); //dbFace.CodeFirst.InitTables<GainfoFaceEntity>();
#endif #endif
} }

View File

@@ -60,12 +60,6 @@ public class CanteenUserEntity : SugarBaseEntity, IVersion, ITenantId
[SugarColumn(ColumnDescription = "余额(餐补)")] [SugarColumn(ColumnDescription = "余额(餐补)")]
public decimal BalanceOfSubsidies { get; set; } public decimal BalanceOfSubsidies { get; set; }
/// <summary>
/// 成本中心
/// </summary>
public string CostId { get; set; }
/// <summary> /// <summary>
/// 版本号 /// 版本号
/// </summary> /// </summary>

View File

@@ -143,6 +143,11 @@ public class GainfoEntity : SugarBaseEntity
[SugarColumn(ColumnDescription = "人事范围")] [SugarColumn(ColumnDescription = "人事范围")]
public string Werks { get; set; } public string Werks { get; set; }
/// <summary>
/// 成本中心
/// </summary>
public string CostId { get; set; }
/// <summary> /// <summary>
/// 在职状态 /// 在职状态
/// </summary> /// </summary>

View File

@@ -76,7 +76,7 @@ public class BalanceRecordEntity : SugarBaseEntity, ITenantId
/// <summary> /// <summary>
/// 所属成本日期 /// 所属成本日期
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "所属成本日期")] [SugarColumn(ColumnDataType = "date", ColumnDescription = "所属成本日期")]
public DateTime CostDate { get; set; } public DateTime CostDate { get; set; }
/// <summary> /// <summary>
@@ -121,5 +121,11 @@ public class BalanceRecordEntity : SugarBaseEntity, ITenantId
[SugarColumn(ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), ColumnDescription = "数据状态")] [SugarColumn(ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), ColumnDescription = "数据状态")]
public BalanceRecordStatusEnumType Status { get; set; } public BalanceRecordStatusEnumType Status { get; set; }
/// <summary>
/// 消费时间
/// </summary>
[SugarColumn(ColumnDescription = "消费时间")]
public DateTime CostDateTime { get; set; }
public string TenantId { get; set; } public string TenantId { get; set; }
} }