.gitignore | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DocumentServiceAPI.Application/ProjectInfo/ViewMode/DocumentEmployeeInfoDTO.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DocumentServiceAPI.Application/UserAndLogin/Services/UserService.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DocumentServiceAPI.Application/UserAndLogin/ViewMode/UserInfo.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DocumentServiceAPI.Model/Oder/Oder.cs | 补丁 | 查看 | 原始文档 | blame | 历史 | |
DocumentServiceAPI.Model/cyDocumentModel/Document_EmployeeInfo.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DocumentServiceAPI.Web.Entry/DocumentServiceAPI.Web.Entry.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DocumentServiceAPI.Web.Entry/appsettings.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DocumentServiceApi.InitQMessage/INITQSetups.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DocumentServiceApi.InitQMessage/MessageReceive.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DocumentServiceApi.InitQMessage/TenantOderInfo.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
.gitignore
@@ -32,3 +32,4 @@ ZcPayCore/obj/ DocumentServiceApi.InitQMessage/obj/ DocumentServiceAPI.Application/DocumentServiceAPI.Application.xml DocumentServiceApi.InitQMessage/bin/ DocumentServiceAPI.Application/ProjectInfo/ViewMode/DocumentEmployeeInfoDTO.cs
@@ -55,6 +55,11 @@ /// <summary> /// 用户名 /// </summary> /// <summary> /// 用户名 手机号验证 必填 /// </summary> [Required] [DataValidation(ValidationTypes.PhoneNumber,ErrorMessage ="员工账户请输入有效的电话号码")] public string UserName { get; set; } /// <summary> /// 用户密码 DocumentServiceAPI.Application/UserAndLogin/Services/UserService.cs
@@ -120,21 +120,21 @@ } ).WithCache( 10).ToListAsync(); //不再选择租户 //var ten = await _db.Queryable<TenantInfo>().Where(x => x.IsEn == true && x.IsDel != true && x.ItCode == ItCode) // .Select(x => new TenderVM // { var ten = await _db.Queryable<TenantInfo>().Where(x => x.IsEn == true && x.IsDel != true && x.ItCode == ItCode) .Select(x => new TenderVM { // Description = x.Description, // ItCode = ItCode, // Name = x.Name, // TenderId = x.Id, // IsTender = true Description = x.Description, ItCode = ItCode, Name = x.Name, TenderId = x.Id, IsTender = true } ).WithCache(10).ToListAsync() ; ten.AddRange(tentlist); return ten; // } // ).WithCache(10).ToListAsync() ; //ten.AddRange(tentlist); return tentlist; } DocumentServiceAPI.Application/UserAndLogin/ViewMode/UserInfo.cs
@@ -133,7 +133,7 @@ /// 用户名 手机号验证 必填 /// </summary> [Required] [RegularExpression("/^(?:(?:\\+|00)86)?1\\d{10}$/")] [DataValidation(ValidationTypes.PhoneNumber, ErrorMessage = "员工账户请输入有效的电话号码")] public string UserName { get; set; } /// <summary> /// 用户密码 DocumentServiceAPI.Model/Oder/Oder.cs
DocumentServiceAPI.Model/cyDocumentModel/Document_EmployeeInfo.cs
@@ -69,7 +69,7 @@ /// </summary> public DateTime? LoginTime { get; set; } /// <summary> /// 是否登录 /// 是否时管理员 /// </summary> public bool? IsLogin { get; set; } /// <summary> DocumentServiceAPI.Web.Entry/DocumentServiceAPI.Web.Entry.csproj
@@ -12,9 +12,11 @@ <ItemGroup> <ProjectReference Include="..\DocumentFile.Service\DocumentFile.Service.csproj" /> <ProjectReference Include="..\DocumentServiceAPI.Application\DocumentServiceAPI.Application.csproj" /> <ProjectReference Include="..\DocumentServiceAPI.Core\DocumentServiceAPI.Core.csproj" /> <ProjectReference Include="..\DocumentServiceAPI.Enum\DocumentServiceAPI.Enum.csproj" /> <ProjectReference Include="..\DocumentServiceApi.InitQMessage\DocumentServiceApi.InitQMessage.csproj" /> <ProjectReference Include="..\DocumentServiceAPI.Model\DocumentServiceAPI.Model.csproj" /> <ProjectReference Include="..\DocumentServiceAPI.Services\DocumentServiceAPI.Services.csproj" /> <ProjectReference Include="..\DocumentServiceAPI.Utility\DocumentServiceAPI.Utility.csproj" /> DocumentServiceAPI.Web.Entry/appsettings.json
@@ -12,7 +12,7 @@ { "ConfigId": "default", //多库配置ID "ConnectionString": "Server=.;Database=CY_DocumentSystemOnline;User ID=sa;Password=123456;", "ConnectionString": "Server=localhost\\SQLEXPRESS;Database=CY_DocumentSystemOnline;User ID=sa;Password=123456;", "DbType": "SqlServer", "IsAutoCloseConnection": true @@ -21,7 +21,7 @@ { "ConfigId": "zhengcaioa", //多库配置ID "ConnectionString": "Server=.;Database=zhengcaioa55;User ID=sa;Password=123456;", "ConnectionString": "Server=localhost\\SQLEXPRESS;Database=zhengcaioa55;User ID=sa;Password=123456;", "DbType": "SqlServer", "IsAutoCloseConnection": true @@ -29,7 +29,7 @@ } ], "isCodeFirst": false, //是否执行codefirst 注意这个在迁徙完成后应该设置为false 防止更改数据库 "isCodeFirst": true, //是否执行codefirst 注意这个在迁徙完成后应该设置为false 防止更改数据库 //请保持redis为正常可用 "RedisConfig": { // 如果采用容器化部署Service 要写成redis的服务名,否则写地址 DocumentServiceApi.InitQMessage/INITQSetups.cs
@@ -18,7 +18,8 @@ /// <summary> /// 注册 INITQ /// </summary> public class DocServiceApiStartup : AppStartup public class DocServiceINITQStartup : AppStartup { public void ConfigureServices(IServiceCollection services) { DocumentServiceApi.InitQMessage/MessageReceive.cs
@@ -1,9 +1,11 @@ using DocumentServiceAPI.Model.Oder; using DocumentServiceAPI.Model.cyDocumentModel; using DocumentServiceAPI.Model.Oder; using DocumentServiceAPI.Model.Permissions; using DocumentServiceAPI.Model.UserInfoModel; using Furion; using Furion.JsonSerialization; using Furion.Logging.Extensions; using Furion.Schedule; using InitQ.Abstractions; using InitQ.Attributes; using Microsoft.Extensions.Options; @@ -64,7 +66,7 @@ CreatBy = "消息队列 InitTenantOder", CreatTime = DateTime.Now, Description = obj.Description, Name = obj.ITCode, Name = obj.Name??obj.ITCode+"集团账号", PsW = obj.ITCode.Substring(obj.ITCode.Length - 4), @@ -81,12 +83,54 @@ }; //新建租户员工 Document_EmployeeInfo employeeInfo = new Document_EmployeeInfo() { EmployeeName = "集团账号", UserName = Tinfo.ItCode, AdviseFlag = 2, UserId = 0, IsWork = 1, UserPassWord = Tinfo.ItCode.Substring(Tinfo.ItCode.Length - 6), Job = "集团用户", IsLogin = true, LastUpdateName = "消息队列 InitTenantOder", LastUpdateTime = DateTime.Now, }; EmployeeAtTenant employeeAtTenant = new EmployeeAtTenant() { CreatBy = "消息队列 InitTenantOder", CreatTime = DateTime.Now, }; Document_TenderUnit tenderUnit = new Document_TenderUnit() { UnitName = obj.Name ?? "集团公司", AdviseFlag = 2, UserId = 0, CreatTime = DateTime.Now.ToString("yyyy MM dd"), LastUpdateName = "消息队列 InitTenantOder", LastUpdateTime = DateTime.Now, IsDeled = false, IsEn = true, }; try { await _db.AsTenant().BeginTranAsync(); var id= await _db.Insertable(Tinfo).ExecuteReturnIdentityAsync(); var eid = await _db.Insertable(employeeInfo).ExecuteReturnIdentityAsync(); permissions.TenantId = id; employeeAtTenant.TenantID = id; employeeAtTenant.EmployeeID = eid; tenderUnit.TenantId = id; await _db.Insertable(tenderUnit).ExecuteCommandAsync(); await _db.Insertable(employeeAtTenant).ExecuteCommandAsync(); await _db.Insertable(permissions).ExecuteCommandAsync (); await _db.Insertable(oder).ExecuteCommandAsync(); await _db.AsTenant().CommitTranAsync(); @@ -102,11 +146,17 @@ } else { var Employee = await _db.Queryable<EmployeeAtTenant,Document_EmployeeInfo>((EAT, E) => new JoinQueryInfos( JoinType.Left, EAT.EmployeeID == E.EmployeeId )).Where((EAT, E) => EAT.TenantID==Tinfo.Id).Select((EAT,E)=>E).FirstAsync(); Tinfo.ItCode = obj.ITCode; Tinfo.UpdataBy = "消息队列 InitTenantOder"; Tinfo.UpdataTime = DateTime.Now; Tinfo.IsDel = false; Tinfo.IsEn = true; var tp= await _db.Queryable<TenantPermissions>().Where(x=>x.TenantId==Tinfo.Id).FirstAsync(); try @@ -148,6 +198,14 @@ await _db.Updateable(tp).ExecuteCommandAsync(); } if (obj.ITCode != Employee.UserName) { //如果发现用户名已经更改,则该集团员工用户名跟随更改 Employee.UserName = obj.ITCode; Employee.LastUpdateName= "消息队列 InitTenantOder"; Employee.LastUpdateTime = DateTime.Now; await _db.Updateable(Employee).ExecuteCommandAsync(); } await _db.Insertable(oder).ExecuteCommandAsync(); await _db.AsTenant().CommitTranAsync(); DocumentServiceApi.InitQMessage/TenantOderInfo.cs
@@ -54,6 +54,10 @@ /// 描述 /// </summary> public string? Description { get; set; } /// <summary> /// 名称 /// </summary> public string? Name { get; set; } }