Merge branch 'master' of http://47.108.235.38:8080/r/DocumentService
# Conflicts:
# DocumentServiceAPI.sln
19个文件已修改
5个文件已删除
19个文件已添加
| | |
| | | /DocumentServiceAPI.Web.Entry/appsettings.json |
| | | /DocumentFile.Service/bin |
| | | /DocumentFile.Service/obj |
| | | /DocumentServiceAPI.Services/bin |
| | | /DocumentServiceAPI.Services/obj |
| | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\DocumentServiceAPI.Core\DocumentServiceAPI.Core.csproj" /> |
| | | <ProjectReference Include="..\DocumentServiceAPI.Model\DocumentServiceAPI.Model.csproj" /> |
| | | <ProjectReference Include="..\DocumentServiceAPI.Services\DocumentServiceAPI.Services.csproj" /> |
| | | <ProjectReference Include="..\DocumentServiceAPI.Utility\DocumentServiceAPI.Utility.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <Folder Include="UserInfo\" /> |
| | | <Folder Include="GlobalServices\" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| | |
| | | ç³»ç»æå¡æ¥å£ |
| | | </summary> |
| | | </member> |
| | | <member name="T:DocumentServiceAPI.Application.UserAndLogin.LogInController"> |
| | | <summary> |
| | | ç»å½æ§å¶å¨ |
| | | </summary> |
| | | </member> |
| | | <member name="M:DocumentServiceAPI.Application.UserAndLogin.LogInController.LogoIn(DocumentServiceAPI.Application.UserAndLogin.ViewMode.LoginPsWordIN)"> |
| | | <summary> |
| | | ç»å½ 1 è¾å
¥åå·¥è´¦æ·æè
ç§æ·è´¦æ·ï¼2 éæ©ç§æ·è´¦æ·ï¼3 éæ©å
¬å¸ |
| | | </summary> |
| | | <returns>ç»å½ä¿¡æ¯</returns> |
| | | </member> |
| | | <member name="M:DocumentServiceAPI.Application.UserAndLogin.LogInController.GetUnitList"> |
| | | <summary> |
| | | è·åå
¬å¸å表 |
| | | </summary> |
| | | <returns>ç»å½ä¿¡æ¯</returns> |
| | | </member> |
| | | <member name="M:DocumentServiceAPI.Application.UserAndLogin.LogInController.GetTenantInfoList"> |
| | | <summary> |
| | | è·åå
¬å¸å表 |
| | | </summary> |
| | | <returns>ç»å½ä¿¡æ¯</returns> |
| | | </member> |
| | | <member name="T:DocumentServiceAPI.Application.UserAndLogin.Services.TokenService"> |
| | | <summary> |
| | | tokenæå¡ç±» |
| | | </summary> |
| | | </member> |
| | | <member name="F:DocumentServiceAPI.Application.UserAndLogin.Services.TokenService.TokenKeys"> |
| | | <summary> |
| | | Tokenæ¯å¥ |
| | | </summary> |
| | | </member> |
| | | <member name="M:DocumentServiceAPI.Application.UserAndLogin.Services.TokenService.CreateToken(DocumentServiceAPI.Model.JwtInfo)"> |
| | | <summary> |
| | | æ°å»ºä¸ä¸ªTOken |
| | | </summary> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="M:DocumentServiceAPI.Application.UserAndLogin.Services.TokenService.CheckToken"> |
| | | <summary> |
| | | æ ¡éªjwtä¿¡æ¯æ¯å¦ææï¼å¤å³å端ç»å½éªè¯ |
| | | </summary> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="M:DocumentServiceAPI.Application.UserAndLogin.Services.TokenService.getTokenKey(DocumentServiceAPI.Model.JwtInfo)"> |
| | | <summary> |
| | | è·åTokenKey |
| | | </summary> |
| | | <param name="jwt"></param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="T:DocumentServiceAPI.Application.UserAndLogin.Services.UserService"> |
| | | <summary> |
| | | ç»å½éªè¯æå¡ |
| | | </summary> |
| | | </member> |
| | | <member name="M:DocumentServiceAPI.Application.UserAndLogin.Services.UserService.GetEmployeeInfo(System.Int32,System.Int32)"> |
| | | <summary> |
| | | å工详æ
|
| | | </summary> |
| | | <param name="ID"></param> |
| | | <param name="TenantID"></param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="M:DocumentServiceAPI.Application.UserAndLogin.Services.UserService.GetJwtInfo"> |
| | | <summary> |
| | | è·åJwtç¸å
³ä¿¡æ¯ |
| | | </summary> |
| | | </member> |
| | | <member name="M:DocumentServiceAPI.Application.UserAndLogin.Services.UserService.GetUserUnitInfo(System.Int32)"> |
| | | <summary> |
| | | è·ååä½å表 |
| | | </summary> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="M:DocumentServiceAPI.Application.UserAndLogin.Services.UserService.GetUserTenderList(System.String)"> |
| | | <summary> |
| | | æ ¹æ®è´¦å·è·å Tender å表 |
| | | </summary> |
| | | <param name="ItCode"></param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="M:DocumentServiceAPI.Application.UserAndLogin.Services.UserService.CheckPsw(System.Int32,System.Nullable{System.Int32},System.String)"> |
| | | <summary> |
| | | æ£æ¥å¯ç æ¯å¦ç»å½ |
| | | </summary> |
| | | <param name="TenantID"> ç§æ·ID</param> |
| | | <param name="employeeID">åå·¥ID</param> |
| | | <param name="PsW">å¯ç </param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="T:DocumentServiceAPI.Application.UserAndLogin.UserInfoController"> |
| | | <summary> |
| | | ç»å½æ§å¶å¨ |
| | | </summary> |
| | | </member> |
| | | <member name="M:DocumentServiceAPI.Application.UserAndLogin.UserInfoController.GetUserInfo"> |
| | | <summary> |
| | | |
| | | </summary> |
| | | </member> |
| | | <member name="T:DocumentServiceAPI.Application.UserAndLogin.ViewMode.LoginPsWordIN"> |
| | | <summary> |
| | | è´¦æ·å¯ç ç»å½ |
| | | </summary> |
| | | </member> |
| | | <member name="P:DocumentServiceAPI.Application.UserAndLogin.ViewMode.LoginPsWordIN.ITCode"> |
| | | <summary> |
| | | ç»å½è´¦å· |
| | | </summary> |
| | | </member> |
| | | <member name="P:DocumentServiceAPI.Application.UserAndLogin.ViewMode.LoginPsWordIN.PassWord"> |
| | | <summary> |
| | | å¯ç |
| | | </summary> |
| | | </member> |
| | | <member name="P:DocumentServiceAPI.Application.UserAndLogin.ViewMode.LoginPsWordIN.Key"> |
| | | <summary> |
| | | éªè¯ç key |
| | | </summary> |
| | | </member> |
| | | <member name="P:DocumentServiceAPI.Application.UserAndLogin.ViewMode.LoginPsWordIN.VerifyCoed"> |
| | | <summary> |
| | | éªè¯ç 代ç |
| | | </summary> |
| | | </member> |
| | | <member name="P:DocumentServiceAPI.Application.UserAndLogin.ViewMode.LoginPsWordIN.TenantId"> |
| | | <summary> |
| | | TenantITCode ç§æ·ITCode |
| | | </summary> |
| | | </member> |
| | | <member name="P:DocumentServiceAPI.Application.UserAndLogin.ViewMode.LoginPsWordIN.employeeID"> |
| | | <summary> |
| | | åå·¥ç»å½ 注æ 妿䏿¯é¦æ¬¡ç»å½ï¼è¿ä¸ªç«å¥½éè¦æ ¹æ®æéçç§æ·ç»å½è¿åç»ææ¥ç¡®å®æ¯å¦æ¯ç¨å工账å·ç»å½ï¼å¦æä¸ºç©ºï¼é»è®¤æªéæ©ç§æ·è´¦å·ç»å½ |
| | | </summary> |
| | | </member> |
| | | <member name="P:DocumentServiceAPI.Application.UserAndLogin.ViewMode.LoginPsWordIN.UnitID"> |
| | | <summary> |
| | | åä½ID |
| | | </summary> |
| | | </member> |
| | | <member name="P:DocumentServiceAPI.Application.UserAndLogin.ViewMode.LoginPsWordIN.Form"> |
| | | <summary> |
| | | æ¥æº |
| | | </summary> |
| | | </member> |
| | | <member name="T:DocumentServiceAPI.Application.UserAndLogin.ViewMode.EmployeeTenantInfo"> |
| | | <summary> |
| | | ç§æ·è¯¦æ
模å |
| | | </summary> |
| | | </member> |
| | | <member name="F:DocumentServiceAPI.Application.UserAndLogin.ViewMode.EmployeeTenantInfo._employeeInfo"> |
| | | <summary> |
| | | åå·¥Info |
| | | </summary> |
| | | </member> |
| | | <member name="F:DocumentServiceAPI.Application.UserAndLogin.ViewMode.EmployeeTenantInfo._tenantInfo"> |
| | | <summary> |
| | | ç¥ç¦ Info |
| | | </summary> |
| | | </member> |
| | | <member name="T:DocumentServiceAPI.Application.UserAndLogin.ViewMode.UnitVM"> |
| | | <summary> |
| | | åä½è¯¦æ
|
| | | </summary> |
| | | </member> |
| | | <member name="P:DocumentServiceAPI.Application.UserAndLogin.ViewMode.UnitVM.UnitID"> |
| | | <summary> |
| | | ID |
| | | </summary> |
| | | </member> |
| | | <member name="P:DocumentServiceAPI.Application.UserAndLogin.ViewMode.UnitVM.UnitName"> |
| | | <summary> |
| | | åä½åç§° |
| | | </summary> |
| | | </member> |
| | | <member name="P:DocumentServiceAPI.Application.UserAndLogin.ViewMode.UnitVM.Remark"> |
| | | <summary> |
| | | æ æ³¨ |
| | | </summary> |
| | | </member> |
| | | <member name="P:DocumentServiceAPI.Application.UserAndLogin.ViewMode.UnitVM.UnitLogo"> |
| | | <summary> |
| | | logo |
| | | </summary> |
| | | </member> |
| | | <member name="T:DocumentServiceAPI.Application.UserAndLogin.ViewMode.TenderVM"> |
| | | <summary> |
| | | ç§æ·è¯¦æ
|
| | | </summary> |
| | | </member> |
| | | <member name="P:DocumentServiceAPI.Application.UserAndLogin.ViewMode.TenderVM.TenderId"> |
| | | <summary> |
| | | ID |
| | | </summary> |
| | | </member> |
| | | <member name="P:DocumentServiceAPI.Application.UserAndLogin.ViewMode.TenderVM.ItCode"> |
| | | <summary> |
| | | ç§æ·å |
| | | </summary> |
| | | </member> |
| | | <member name="P:DocumentServiceAPI.Application.UserAndLogin.ViewMode.TenderVM.Name"> |
| | | <summary> |
| | | åç§° |
| | | </summary> |
| | | </member> |
| | | <member name="P:DocumentServiceAPI.Application.UserAndLogin.ViewMode.TenderVM.Description"> |
| | | <summary> |
| | | æè¿° |
| | | </summary> |
| | | </member> |
| | | <member name="P:DocumentServiceAPI.Application.UserAndLogin.ViewMode.TenderVM.EmployeeID"> |
| | | <summary> |
| | | åå·¥ID |
| | | </summary> |
| | | </member> |
| | | <member name="P:DocumentServiceAPI.Application.UserAndLogin.ViewMode.TenderVM.IsTender"> |
| | | <summary> |
| | | æ¯å¦æ¯ä¸»è´¦å· |
| | | </summary> |
| | | </member> |
| | | <member name="T:DocumentServiceAPI.Application.UserAndLogin.ViewMode.RetLoginVM"> |
| | | <summary> |
| | | ç»å½è¿å |
| | | </summary> |
| | | </member> |
| | | <member name="P:DocumentServiceAPI.Application.UserAndLogin.ViewMode.RetLoginVM.NeedNext"> |
| | | <summary> |
| | | éè¦éæ°ç»å½ |
| | | </summary> |
| | | </member> |
| | | <member name="P:DocumentServiceAPI.Application.UserAndLogin.ViewMode.RetLoginVM.Units"> |
| | | <summary> |
| | | å
¬å¸å表 |
| | | </summary> |
| | | </member> |
| | | <member name="P:DocumentServiceAPI.Application.UserAndLogin.ViewMode.RetLoginVM.Tenders"> |
| | | <summary> |
| | | ç§æ·å表 |
| | | </summary> |
| | | </member> |
| | | </members> |
| | | </doc> |
New file |
| | |
| | | using DocumentServiceAPI.Application.UserAndLogin.Services; |
| | | using DocumentServiceAPI.Application.UserAndLogin.ViewMode; |
| | | using DocumentServiceAPI.Utility; |
| | | using Furion.DynamicApiController; |
| | | using Furion.JsonSerialization; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace DocumentServiceAPI.Application.UserAndLogin |
| | | { |
| | | /// <summary> |
| | | /// ç»å½æ§å¶å¨ |
| | | /// </summary> |
| | | [ApiDescriptionSettings("LogInAndUser")] |
| | | [DynamicApiController] |
| | | public class LogInController |
| | | { |
| | | private TokenService _tokenService; |
| | | private UserService _userService; |
| | | public LogInController(TokenService tokenService,UserService userService) { |
| | | _tokenService = tokenService; |
| | | _userService = userService; |
| | | } |
| | | /// <summary> |
| | | /// ç»å½ 1 è¾å
¥åå·¥è´¦æ·æè
ç§æ·è´¦æ·ï¼2 éæ©ç§æ·è´¦æ·ï¼3 éæ©å
¬å¸ |
| | | /// </summary> |
| | | /// <returns>ç»å½ä¿¡æ¯</returns> |
| | | [HttpPost("LogoIn")] |
| | | public async Task<RetLoginVM> LogoIn (LoginPsWordIN Parma) |
| | | { |
| | | bool needtoken=false; |
| | | if (Parma.TenantId==null) |
| | | { |
| | | //å¦æè¿æ²¡ç¡®å®ç§æ·ID éè¦å
ç¡®å®ç§æ·ID |
| | | List<TenderVM>Tender = await _userService.GetUserTenderList(Parma.ITCode); |
| | | |
| | | switch (Tender.Count) |
| | | { |
| | | case 0: |
| | | throw Oops.Oh($"è´¦æ·æè
å¯ç é误"); |
| | | case 1: |
| | | needtoken = await _userService.CheckPsw(Tender[0].TenderId, Tender[0].EmployeeID,Parma.PassWord); |
| | | |
| | | if(!needtoken) |
| | | throw Oops.Oh($"è´¦æ·æè
å¯ç é误"); |
| | | if (Parma.UnitID == null) |
| | | { |
| | | var Units = await _userService.GetUserUnitInfo(Parma.TenantId ?? 0); |
| | | if (Units.Count == 0) |
| | | { |
| | | //没æå
¬å¸ |
| | | needtoken = true; |
| | | } |
| | | else if (Units.Count == 1) |
| | | { |
| | | Parma.UnitID = Units[0].UnitID; |
| | | needtoken = true; |
| | | } |
| | | else |
| | | { |
| | | //å
¶ä»éè¦ç¨æ·éæ©ç§æ· |
| | | return new RetLoginVM |
| | | { |
| | | NeedNext = true, |
| | | Units = Units, |
| | | |
| | | }; |
| | | } |
| | | } |
| | | Parma.TenantId = Tender[0].TenderId; |
| | | break; |
| | | |
| | | default: |
| | | //å
¶ä»éè¦ç¨æ·éæ©ç§æ· |
| | | return new RetLoginVM |
| | | { |
| | | NeedNext = true, |
| | | Tenders = Tender, |
| | | |
| | | }; |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | else if(Parma.UnitID==null) |
| | | { |
| | | |
| | | var Units = await _userService.GetUserUnitInfo(Parma.TenantId??0); |
| | | if(Units.Count==0) |
| | | { |
| | | //没æå
¬å¸ |
| | | needtoken = true; |
| | | } |
| | | else if (Units.Count==1) { |
| | | Parma.UnitID= Units[0].UnitID; |
| | | needtoken = true; |
| | | } |
| | | else |
| | | { |
| | | //å
¶ä»éè¦ç¨æ·éæ©ç§æ· |
| | | return new RetLoginVM |
| | | { |
| | | NeedNext = true, |
| | | Units = Units, |
| | | |
| | | }; |
| | | } |
| | | |
| | | } |
| | | |
| | | if(needtoken|| Parma.UnitID!=null) |
| | | { |
| | | TenderVM Tender = (await _userService.GetUserTenderList(Parma.ITCode)).Where(x=>x.TenderId==Parma.TenantId&&x.EmployeeID==Parma.employeeID).SingleOrDefault(); |
| | | if(Tender==null) |
| | | { |
| | | throw Oops.Oh($"è´¦æ·å¯ç æè
ç§æ·éæ©é误"); |
| | | } |
| | | needtoken = await _userService.CheckPsw(Tender. TenderId, Tender.EmployeeID, Parma.PassWord); |
| | | |
| | | if (!needtoken) |
| | | throw Oops.Oh($"è´¦æ·æè
å¯ç é误"); |
| | | var token= _tokenService.CreateToken(new Model.JwtInfo |
| | | { |
| | | EID = Tender.EmployeeID, |
| | | LogInSource = Parma.Form, |
| | | TID = Tender.TenderId, |
| | | UID = Parma.UnitID, |
| | | }); |
| | | return new RetLoginVM |
| | | { |
| | | NeedNext = false, |
| | | Token = token, |
| | | |
| | | }; |
| | | } |
| | | throw Oops.Oh($"åæ°é误"); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·åå
¬å¸å表 |
| | | /// </summary> |
| | | /// <returns>ç»å½ä¿¡æ¯</returns> |
| | | public bool GetUnitList() |
| | | { |
| | | |
| | | return true; |
| | | } |
| | | /// <summary> |
| | | /// è·åå
¬å¸å表 |
| | | /// </summary> |
| | | /// <returns>ç»å½ä¿¡æ¯</returns> |
| | | public bool GetTenantInfoList() |
| | | { |
| | | |
| | | return true; |
| | | } |
| | | public string Get() |
| | | { |
| | | return $"Hello {nameof(Furion)}"; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace DocumentServiceAPI.Application.UserAndLogin.Services.Interfaces |
| | | { |
| | | public interface ILoginVerifyService |
| | | { |
| | | } |
| | | } |
New file |
| | |
| | | using DocumentServiceAPI.Model; |
| | | using DocumentServiceAPI.Services.IService; |
| | | using Furion.Authorization; |
| | | using Furion.DistributedIDGenerator; |
| | | using Furion.JsonSerialization; |
| | | using NetTaste; |
| | | using SqlSugar.Extensions; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Reflection; |
| | | using System.Security.Claims; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace DocumentServiceAPI.Application.UserAndLogin.Services |
| | | { |
| | | /// <summary> |
| | | /// tokenæå¡ç±» |
| | | /// </summary> |
| | | public class TokenService: IScoped |
| | | { |
| | | /// <summary> |
| | | /// Tokenæ¯å¥ |
| | | /// </summary> |
| | | static string TokenKeys = "TokenKeys:"; |
| | | private ISqlSugarClient _db; |
| | | private UserService _UserService; |
| | | private IRedisCacheService _RedisCase; |
| | | public TokenService(ISqlSugarClient db, UserService UserInfoService, IRedisCacheService RedisCase ) { |
| | | _db = db; |
| | | _UserService = UserInfoService; |
| | | _RedisCase = RedisCase; |
| | | } |
| | | /// <summary> |
| | | /// æ°å»ºä¸ä¸ªTOken |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public string CreateToken(JwtInfo jwt) |
| | | { |
| | | string TokenKey=TokenKeys+ getTokenKey(jwt); |
| | | IDictionary<string, object> propertyDictionary = new Dictionary<string, object>(); |
| | | |
| | | PropertyInfo[] properties = jwt.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance); |
| | | |
| | | foreach (PropertyInfo property in properties) |
| | | { |
| | | string propertyName = property.Name; |
| | | object propertyValue = property.GetValue(jwt); |
| | | |
| | | propertyDictionary.Add(propertyName.ToLower(), propertyValue); |
| | | } |
| | | var ID = IDGen.NextID(); |
| | | jwt.JID = ID; |
| | | var token= JWTEncryption.Encrypt(propertyDictionary, App.GetConfig<JWTSettingsOptions>("JWTSettings").ExpiredTime ?? 3600); |
| | | if(jwt.LogInSource==LogInFrom.PC) |
| | | _RedisCase.Add<string>(TokenKey, ID.ToString(), expireSeconds: (int )(App.GetConfig<JWTSettingsOptions>("JWTSettings").ExpiredTime??3600)); |
| | | return token; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ ¡éªjwtä¿¡æ¯æ¯å¦ææï¼å¤å³å端ç»å½éªè¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public bool CheckToken() |
| | | { |
| | | |
| | | var Jwtinfo= _UserService.GetJwtInfo(); |
| | | |
| | | var Key= getTokenKey(Jwtinfo); |
| | | |
| | | string T = _RedisCase.Get<string>(Key); |
| | | if (T == null) |
| | | return true; |
| | | if (T != Jwtinfo.JID.ToString()) |
| | | return false; |
| | | return true; |
| | | |
| | | |
| | | } |
| | | /// <summary> |
| | | /// è·åTokenKey |
| | | /// </summary> |
| | | /// <param name="jwt"></param> |
| | | /// <returns></returns> |
| | | private string getTokenKey(JwtInfo jwt) |
| | | { |
| | | string TokenKey = TokenKeys + jwt.EID?.ToString() + jwt.UID?.ToString() + jwt.TID?.ToString(); |
| | | return TokenKey; |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using DocumentServiceAPI.Application.UserAndLogin.Services.Interfaces; |
| | | using DocumentServiceAPI.Application.UserAndLogin.ViewMode; |
| | | using DocumentServiceAPI.Model; |
| | | using DocumentServiceAPI.Model.cyDocumentModel; |
| | | using DocumentServiceAPI.Model.UserInfoModel; |
| | | using SqlSugar.Extensions; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Security.Claims; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace DocumentServiceAPI.Application.UserAndLogin.Services |
| | | { |
| | | /// <summary> |
| | | /// ç»å½éªè¯æå¡ |
| | | /// </summary> |
| | | public class UserService : ILoginVerifyService, IScoped |
| | | { |
| | | private ISqlSugarClient _db { get; set; } |
| | | public UserService(ISqlSugarClient db) |
| | | { |
| | | _db = db; |
| | | } |
| | | /// <summary> |
| | | /// å工详æ
|
| | | /// </summary> |
| | | /// <param name="ID"></param> |
| | | /// <param name="TenantID"></param> |
| | | /// <returns></returns> |
| | | public async Task<EmployeeTenantInfo> GetEmployeeInfo(int ID, int TenantID) |
| | | { |
| | | var ret = await _db.Queryable<EmployeeInfo, EmployeeAtTenant, TenantInfo>((ei, eiat, ti) => |
| | | new JoinQueryInfos( |
| | | JoinType.Right, ei.Id == eiat.EmployeeID, //å·¦è¿æ¥ 左龿¥ å·¦è |
| | | JoinType.Right, ti.Id == eiat.TenantID |
| | | )).Where((ei, eiat, ti) => ei.Id == ID && TenantID == ti.Id) |
| | | .Select(expression: (ei, eiat, ti) => new EmployeeTenantInfo |
| | | { |
| | | _employeeInfo = ei, |
| | | _tenantInfo = ti |
| | | |
| | | }).SingleAsync(); |
| | | |
| | | return ret; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åJwtç¸å
³ä¿¡æ¯ |
| | | /// </summary> |
| | | public JwtInfo GetJwtInfo() |
| | | { |
| | | JwtInfo jwtInfo = new JwtInfo(); |
| | | jwtInfo.LogInSource = (LogInFrom)(App.User?.FindFirstValue("loginfrom")?.ObjToInt() ?? 0); |
| | | jwtInfo.EID = App.User?.FindFirstValue("eid")?.ObjToInt(); |
| | | jwtInfo.UID = App.User?.FindFirstValue("uid")?.ObjToInt(); |
| | | jwtInfo.TID = App.User?.FindFirstValue("tid")?.ObjToInt(); |
| | | var guid = App.User?.FindFirstValue("jid"); |
| | | jwtInfo.JID = string.IsNullOrEmpty(guid) ? new Guid(guid) : null; |
| | | return jwtInfo; |
| | | } |
| | | /// <summary> |
| | | /// è·ååä½å表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public async Task<List<UnitVM>> GetUserUnitInfo(int tid ) |
| | | { |
| | | |
| | | var list = await _db.Queryable<DocumentServiceAPI.Model.cyDocumentModel.Document_TenderUnit>() |
| | | .Where((tu) => tu.TenantId == tid && tu.IsEn == true && tu.IsDeled != true) |
| | | .Select((tu) => new UnitVM |
| | | { |
| | | UnitID = tu.UnitId, |
| | | UnitName = tu.UnitName, |
| | | Remark = tu.Remark, |
| | | UnitLogo = tu.UnitLogo, |
| | | }) |
| | | .ToListAsync(); |
| | | return list; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®è´¦å·è·å Tender å表 |
| | | /// </summary> |
| | | /// <param name="ItCode"></param> |
| | | /// <returns></returns> |
| | | public async Task<List<TenderVM>> GetUserTenderList(string ItCode) |
| | | |
| | | { |
| | | |
| | | var tentlist= await _db.Queryable<TenantInfo, EmployeeAtTenant, Document_EmployeeInfo>((ti, et, ei) => |
| | | |
| | | new JoinQueryInfos |
| | | ( |
| | | JoinType.Right, ti.Id == et.TenantID, //å·¦è¿æ¥ 左龿¥ å·¦è |
| | | JoinType.Right, ei.EmployeeId == et.EmployeeID |
| | | ) |
| | | ) |
| | | .Where((ti, et, ei) => |
| | | ( ei.UserName == ItCode) && (ti.IsEn == true) && (ti.IsDel != true) && (ei.IsWork == null || ei.IsWork == 1)) |
| | | |
| | | .Select((ti, et, ei) => new TenderVM |
| | | { |
| | | EmployeeID = ei.EmployeeId, |
| | | Description = ti.Description, |
| | | ItCode = ItCode, |
| | | Name = ti.Name, |
| | | TenderId = ti.Id |
| | | |
| | | } |
| | | ).ToListAsync(); |
| | | |
| | | 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 |
| | | |
| | | } |
| | | ).ToListAsync() ; |
| | | ten.AddRange(tentlist); |
| | | return ten; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ£æ¥å¯ç æ¯å¦ç»å½ |
| | | /// </summary> |
| | | /// <param name="TenantID"> ç§æ·ID</param> |
| | | /// <param name="employeeID">åå·¥ID</param> |
| | | /// <param name="PsW">å¯ç </param> |
| | | /// <returns></returns> |
| | | public async Task<bool> CheckPsw(int TenantID, int? employeeID, string PsW) |
| | | { |
| | | if (employeeID == null) |
| | | { |
| | | var psw = await _db.Queryable<TenantInfo>().Where(x => x.Id == TenantID).Select(x => x.PsW).SingleAsync(); |
| | | if (PsW == psw) |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | var psw = await _db.Queryable<Document_EmployeeInfo, EmployeeAtTenant, TenantInfo>((ei, et, ti) => |
| | | |
| | | new JoinQueryInfos |
| | | ( |
| | | JoinType.Left, ei.EmployeeId == et.EmployeeID, //å·¦è¿æ¥ 左龿¥ å·¦è |
| | | JoinType.Left, ti.Id == et.TenantID |
| | | ) |
| | | ).Where((ei, et, ti) => |
| | | |
| | | ei.EmployeeId == employeeID && ti.Id == TenantID |
| | | ) |
| | | .Select((ei, et, ti) => ei.UserPassWord) |
| | | .SingleAsync(); |
| | | if (PsW == psw) |
| | | return true; |
| | | } |
| | | return false; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace DocumentServiceAPI.Application.UserAndLogin |
| | | { |
| | | |
| | | /// <summary> |
| | | /// ç»å½æ§å¶å¨ |
| | | /// </summary> |
| | | [ApiDescriptionSettings("LogInAndUser")] |
| | | [DynamicApiController] |
| | | public class UserInfoController |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public void GetUserInfo() |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | using DocumentServiceAPI.Model; |
| | | using DocumentServiceAPI.Model.UserInfoModel; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace DocumentServiceAPI.Application.UserAndLogin.ViewMode |
| | | { |
| | | /// <summary> |
| | | /// è´¦æ·å¯ç ç»å½ |
| | | /// </summary> |
| | | public class LoginPsWordIN |
| | | { |
| | | /// <summary> |
| | | /// ç»å½è´¦å· |
| | | /// </summary> |
| | | public string ITCode{ get; set; } |
| | | /// <summary> |
| | | /// å¯ç |
| | | /// </summary> |
| | | public string? PassWord { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// éªè¯ç key |
| | | /// </summary> |
| | | public string? Key { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// éªè¯ç 代ç |
| | | /// </summary> |
| | | public string? VerifyCoed { get; set; } |
| | | |
| | | /// <summary> |
| | | /// TenantITCode ç§æ·ITCode |
| | | /// </summary> |
| | | public int ? TenantId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åå·¥ç»å½ 注æ 妿䏿¯é¦æ¬¡ç»å½ï¼è¿ä¸ªç«å¥½éè¦æ ¹æ®æéçç§æ·ç»å½è¿åç»ææ¥ç¡®å®æ¯å¦æ¯ç¨å工账å·ç»å½ï¼å¦æä¸ºç©ºï¼é»è®¤æªéæ©ç§æ·è´¦å·ç»å½ |
| | | /// </summary> |
| | | public int? employeeID { get; set; } |
| | | /// <summary> |
| | | /// åä½ID |
| | | /// </summary> |
| | | public int ? UnitID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¥æº |
| | | /// </summary> |
| | | public LogInFrom Form { get; set; } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// ç§æ·è¯¦æ
模å |
| | | /// </summary> |
| | | public class EmployeeTenantInfo |
| | | { |
| | | /// <summary> |
| | | /// åå·¥Info |
| | | /// </summary> |
| | | public EmployeeInfo _employeeInfo; |
| | | /// <summary> |
| | | /// ç¥ç¦ Info |
| | | /// </summary> |
| | | public TenantInfo _tenantInfo; |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åä½è¯¦æ
|
| | | /// </summary> |
| | | public class UnitVM |
| | | { |
| | | /// <summary> |
| | | /// ID |
| | | /// </summary> |
| | | public int UnitID { get; set; } |
| | | /// <summary> |
| | | /// åä½åç§° |
| | | /// </summary> |
| | | public string UnitName { get; set; } |
| | | /// <summary> |
| | | /// æ æ³¨ |
| | | /// </summary> |
| | | public string Remark { get; set; } |
| | | /// <summary> |
| | | /// logo |
| | | /// </summary> |
| | | public string UnitLogo { get; set; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç§æ·è¯¦æ
|
| | | /// </summary> |
| | | public class TenderVM |
| | | { |
| | | /// <summary> |
| | | /// ID |
| | | /// </summary> |
| | | |
| | | |
| | | public int TenderId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç§æ·å |
| | | /// </summary> |
| | | |
| | | |
| | | public string ItCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åç§° |
| | | /// </summary> |
| | | |
| | | |
| | | public string Name { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æè¿° |
| | | /// </summary> |
| | | |
| | | public string Description { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åå·¥ID |
| | | /// </summary> |
| | | public int? EmployeeID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦æ¯ä¸»è´¦å· |
| | | /// </summary> |
| | | public bool IsTender { get; set; } = false; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç»å½è¿å |
| | | /// </summary> |
| | | public class RetLoginVM |
| | | { |
| | | /// <summary> |
| | | /// éè¦éæ°ç»å½ |
| | | /// </summary> |
| | | |
| | | public bool NeedNext { get; set; }=true; |
| | | /// <summary> |
| | | /// å
¬å¸å表 |
| | | /// </summary> |
| | | #nullable enable |
| | | public List<UnitVM>? Units { get; set; } |
| | | /// <summary> |
| | | /// ç§æ·å表 |
| | | /// </summary> |
| | | #nullable enable |
| | | public List<TenderVM>? Tenders { get; set; } |
| | | |
| | | #nullable enable |
| | | public string? Token { get; set; } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace DocumentServiceAPI.Application.UserAndLogin.dto |
| | | { |
| | | public class Mapper : IRegister |
| | | { |
| | | public void Register(TypeAdapterConfig config) |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | "SpecificationDocumentSettings": { |
| | | "DocumentTitle": "Furion | è§è忥å£", |
| | | "GroupOpenApiInfos": [ |
| | | |
| | | |
| | | { |
| | | "Group": "Default", |
| | | "Title": "æ 书管çç³»ç»æå¡", |
| | | "Description": "è¿ä¸ªä¸ä¸ªå¾å¥½ç¨æ 书管çç³»ç»æå¡è½¯ä»¶", |
| | | "Version": "1.0.0", |
| | | "Contact": { |
| | | "Name": "æ¿éå¨è¯¢æéå
¬å¸", |
| | | "Url": "http://www.51zhengcai.com" |
| | | |
| | | }, |
| | | "License": { |
| | | "Name": "æ¿éå¨è¯¢æéå
¬å¸", |
| | | "Url": "http://www.51zhengcai.com" |
| | | } |
| | | { |
| | | "Group": "Default", |
| | | "Title": "æ 书管çç³»ç»æå¡", |
| | | "Description": "è¿ä¸ªä¸ä¸ªå¾å¥½ç¨æ 书管çç³»ç»æå¡è½¯ä»¶", |
| | | "Version": "1.0.0", |
| | | "Contact": { |
| | | "Name": "æ¿éå¨è¯¢æéå
¬å¸", |
| | | "Url": "http://www.51zhengcai.com" |
| | | |
| | | }, |
| | | "License": { |
| | | "Name": "æ¿éå¨è¯¢æéå
¬å¸", |
| | | "Url": "http://www.51zhengcai.com" |
| | | } |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | //swags åç§°é
ç½® é»è®¤åç» |
| | | "[openapi:LogInAndUser]": { |
| | | "Title": "ç»å½åç¨æ·", |
| | | "Order": 0, |
| | | "Description": "ç¨æ·åç»å½ç¸å
³", |
| | | "Version": "1.0.0", |
| | | "Contact": { |
| | | "Name": "æ¿éå¨è¯¢æéå
¬å¸", |
| | | "Url": "http://www.51zhengcai.com" |
| | | |
| | | }, |
| | | "License": { |
| | | "Name": "æ¿éå¨è¯¢æéå
¬å¸", |
| | | "Url": "http://www.51zhengcai.com" |
| | | } |
| | | }, |
| | | |
| | | //é
置路ç±é£æ ¼ |
| | | "DynamicApiControllerSettings": { |
| | | "KeepName": true,//ä¿æè·¯ç±ä¸è´ |
| | | "KeepVerb": true,//ä¿æçæ¬å·ä¸è´ |
| | | "LowercaseRoute": false |
| | | }, |
| | | |
| | | "CorsAccessorSettings": { |
| | | "WithExposedHeaders": [ |
| | | "access-token", |
| | |
| | | /// <param name="ModeProjectName"></param> |
| | | public static void DbCodeFirst(this IApplicationBuilder app, string ModeProjectName, string? Modenamespace = null, string? ConfigId = null) |
| | | { |
| | | var ddb= App.GetService<ISqlSugarClient>(); |
| | | |
| | | var _db = app.ApplicationServices.GetService<ISqlSugarClient>(); |
| | | //åæ¢æ°æ®åº |
| | | if (!string.IsNullOrEmpty(ConfigId)) |
| | | _db.AsTenant().ChangeDatabase(ConfigId); |
| | | |
| | | //å»ºåº |
| | | _db.DbMaintenance.CreateDatabase(); |
| | | Type[]? types = UtilityFun.GetAllAssembly().Where(x => x.FullName.Contains(ModeProjectName + ",")).FirstOrDefault()?.GetTypes().WhereIF(!string.IsNullOrEmpty(Modenamespace), name => name.FullName.Contains(Modenamespace + ".")).ToArray().Where(x => x.IsSubclassOf(typeof(BaseModel))).ToArray(); |
| | |
| | | _db.CodeFirst.InitTables(types);//æ ¹æ®typeså建表 |
| | | |
| | | } |
| | | public static void DbCodeFirst(this IApplicationBuilder app, Type Obj, string? ConfigId = null) |
| | | { |
| | | var _db = app.ApplicationServices.GetService<ISqlSugarClient>(); |
| | | //åæ¢æ°æ®åº |
| | | if (!string.IsNullOrEmpty(ConfigId)) |
| | | _db.AsTenant().ChangeDatabase(ConfigId); |
| | | //å»ºåº |
| | | _db.DbMaintenance.CreateDatabase(); |
| | | _db.CodeFirst.InitTables(Obj);//æ ¹æ®typeså建表 |
| | | } |
| | | } |
New file |
| | |
| | |  |
| | | namespace DocumentServiceAPI.Model |
| | | { |
| | | /// <summary> |
| | | /// ç»ä¸è¿åç±»åæ¨¡åå®ä¹ |
| | | /// </summary> |
| | | /// <typeparam name="T"></typeparam> |
| | | public class DSFulResult<T> |
| | | { |
| | | /// <summary> |
| | | /// ç¶æç |
| | | /// </summary> |
| | | public int? StatusCode { get; set; } |
| | | /// <summary> |
| | | /// ç¶æç |
| | | /// </summary> |
| | | public int? Code { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ°æ® |
| | | /// </summary> |
| | | public T? Data { get; set; } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// éè¯¯ä¿¡æ¯ |
| | | /// </summary> |
| | | public object? Error { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éå æ°æ® |
| | | /// </summary> |
| | | public object? Extras { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¶é´æ³ |
| | | /// </summary> |
| | | public long? Timestamp { get; set; } |
| | | /// <summary> |
| | | /// å
¶ä»æ¶æ¯ |
| | | /// </summary> |
| | | public string? Message { get; set; } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace DocumentServiceAPI.Model |
| | | { |
| | | /// <summary> |
| | | /// Jwtä¿¡æ¯ |
| | | /// </summary> |
| | | public class JwtInfo |
| | | { |
| | | /// <summary> |
| | | /// åå·¥ITCODE |
| | | /// </summary> |
| | | public int? EID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç§æ·ID |
| | | /// </summary> |
| | | public int ?TID { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// å
¬å¸ID |
| | | /// </summary> |
| | | public int? UID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Idè¯å«å·ï¼ä¸»è¦ç¨äºå¤æå端ç»å½ |
| | | /// </summary> |
| | | public Guid? JID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç»å½æº |
| | | /// </summary> |
| | | public LogInFrom LogInSource { get; set; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç»å½æº ç±»å |
| | | /// </summary> |
| | | public enum LogInFrom |
| | | { |
| | | /// <summary> |
| | | /// PCAPPç»å½ |
| | | /// </summary> |
| | | [Description( "PCAPPç»å½")] |
| | | PC, |
| | | /// <summary> |
| | | /// APP端ç»å½ |
| | | /// </summary> |
| | | [Description("APP端ç»å½")] |
| | | APP, |
| | | /// <summary> |
| | | /// 微信å°ç¨åºç»å½ |
| | | /// </summary> |
| | | [Description("微信å°ç¨åºç»å½")] |
| | | WeChat, |
| | | /// <summary> |
| | | /// 页é¢ç«¯ç»å½ |
| | | /// </summary> |
| | | [Description("页é¢ç«¯ç»å½")] |
| | | Web |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | using DocumentServiceAPI.Enum; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace DocumentServiceAPI.Model.UserInfoModel |
| | | { |
| | | /// <summary> |
| | | /// åå·¥ç§æ· å
³ç³»è¡¨ |
| | | /// </summary> |
| | | public class EmployeeAtTenant:BaseModel |
| | | { |
| | | /// <summary> |
| | | /// ID |
| | | /// </summary> |
| | | [Display(Name = "ID ")] |
| | | [SugarColumn(ColumnDescription = "ID ",IsPrimaryKey =true,IsIdentity =true)] |
| | | public int ID { get; set; } |
| | | /// <summary> |
| | | /// åå·¥ID |
| | | /// </summary> |
| | | [Display(Name = "åå·¥ID ")] |
| | | [SugarColumn(ColumnDescription = "åå·¥ID ")] |
| | | public int EmployeeID { get; set; } |
| | | /// <summary> |
| | | /// ç§æ·ID |
| | | /// </summary> |
| | | [Display(Name = "ç§æ·ID ")] |
| | | [SugarColumn(ColumnDescription = "ç§æ·ID ")] |
| | | public int TenantID { get; set; } |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | using DocumentServiceAPI.Enum; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace DocumentServiceAPI.Model.UserInfoModel |
| | | { |
| | | |
| | | |
| | | /// <summary> |
| | | /// åå·¥ |
| | | /// </summary> |
| | | [Display(Name = "åå·¥ ")] |
| | | [SugarTable(TableName = "EmployeeInfo", TableDescription = "åå·¥")] |
| | | public class EmployeeInfo |
| | | { |
| | | /// <summary> |
| | | /// åå·¥ID |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] |
| | | public int Id { get; set; } |
| | | /// <summary> |
| | | /// åå·¥åç§° |
| | | /// </summary> |
| | | public string EmployeeName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// çµè¯ |
| | | /// </summary> |
| | | public string? Phone { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç¦»å¼æ¶é´ |
| | | /// </summary> |
| | | public DateTime? LeaveTime { get; set; } |
| | | /// <summary> |
| | | /// è¯ä»¶æ£é¢ |
| | | /// </summary> |
| | | public string CardPositive { get; set; } |
| | | /// <summary> |
| | | /// è¯ä»¶æ£é¢çæ¬å· |
| | | /// </summary> |
| | | public string? CardPositiveVersionNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç¨æ·å |
| | | /// </summary> |
| | | public string ITCode { get; set; } |
| | | /// <summary> |
| | | /// ç¨æ·å¯ç |
| | | /// </summary> |
| | | public string UserPassWord { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 建议æ å¿ |
| | | /// </summary> |
| | | public int? AdviseFlag { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æè¿° |
| | | /// </summary> |
| | | public string? Description { get; set; } |
| | | |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | using DocumentServiceAPI.Enum; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace DocumentServiceAPI.Model.UserInfoModel |
| | | { |
| | | |
| | | /// <summary> |
| | | /// ç§æ·è¡¨ |
| | | /// </summary> |
| | | [Display(Name = "ç§æ·è¡¨ ")] |
| | | [SugarTable(TableName = "TenantInfo", TableDescription = "ç§æ·è¡¨")] |
| | | public class TenantInfo : BaseModel |
| | | { |
| | | /// <summary> |
| | | /// ID |
| | | /// </summary> |
| | | [Display(Name = "ID ")] |
| | | [SugarColumn(ColumnDescription = "ID ",IsPrimaryKey =true,IsIdentity =true)] |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç§æ·å |
| | | /// </summary> |
| | | [Display(Name = "ç§æ·å ")] |
| | | [SugarColumn(ColumnDescription = "ç§æ·å ",Length =20)] |
| | | public string ItCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åç§° |
| | | /// </summary> |
| | | [Display(Name = "åç§° ")] |
| | | [SugarColumn(ColumnDescription = "åç§° ", Length = 200)] |
| | | public string? Name { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æè¿° |
| | | /// </summary> |
| | | [Display(Name = "æè¿° ")] |
| | | [SugarColumn(ColumnDescription = "æè¿° ")] |
| | | public string? Description { get; set; } |
| | | /// <summary> |
| | | /// æ æ³¨ |
| | | /// </summary> |
| | | [Display(Name = "æ æ³¨")] |
| | | [SugarColumn(ColumnDescription = "æ æ³¨")] |
| | | public string? ReMark { get; set; } |
| | | /// <summary> |
| | | /// æ°æ®åºé¾æ¥å符串 å¤ç¨ |
| | | /// </summary> |
| | | [Display(Name = "æ°æ®åºé¾æ¥å符串")] |
| | | [SugarColumn(ColumnDescription = "æ°æ®åºé¾æ¥å符串")] |
| | | public string? ConnectionString { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ°æ®åºç±»å å¤ç¨ |
| | | /// </summary> |
| | | [Display(Name = "æ°æ®åºç±»å")] |
| | | [SugarColumn(ColumnDescription = "æ°æ®åºç±»å")] |
| | | public string? DbType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¯ç |
| | | /// </summary> |
| | | [SugarColumn(Length =30)] |
| | | public string? PsW { get; set; } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | namespace DocumentServiceAPI.Model.cyDocumentModel |
| | | { |
| | | ///<summary> |
| | | /// |
| | | ///</summary> |
| | | /// <summary> |
| | | /// ææ¡£åå·¥ä¿¡æ¯ |
| | | /// </summary> |
| | | [SugarTable("Document_EmployeeInfo")] |
| | | public partial class Document_EmployeeInfo |
| | | { |
| | | public Document_EmployeeInfo(){ |
| | | |
| | | |
| | | } |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:False |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey=true,IsIdentity=true)] |
| | | public int EmployeeId {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string EmployeeName {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string Job {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string Phone {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public int? IsWork {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public DateTime? LeaveTime {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string CardPositive {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string CardPositiveVersionNo {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public int? CardPositiveSize {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public DateTime? LastUpdateTime {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string LastUpdateName {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string UserName {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string UserPassWord {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public DateTime? LoginTime {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public bool? IsLogin {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public int? AdviseFlag {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public int? UserId {get;set;} |
| | | |
| | | /// <summary> |
| | | /// åå·¥ID |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] |
| | | public int EmployeeId { get; set; } |
| | | /// <summary> |
| | | /// åå·¥åç§° |
| | | /// </summary> |
| | | public string EmployeeName { get; set; } |
| | | /// <summary> |
| | | /// å·¥ä½èä½ |
| | | /// </summary> |
| | | public string Job { get; set; } |
| | | /// <summary> |
| | | /// çµè¯ |
| | | /// </summary> |
| | | public string Phone { get; set; } |
| | | /// <summary> |
| | | /// æ¯å¦å¨å·¥ä½ |
| | | /// </summary> |
| | | public int? IsWork { get; set; } |
| | | /// <summary> |
| | | /// ç¦»å¼æ¶é´ |
| | | /// </summary> |
| | | public DateTime? LeaveTime { get; set; } |
| | | /// <summary> |
| | | /// è¯ä»¶æ£é¢ |
| | | /// </summary> |
| | | public string CardPositive { get; set; } |
| | | /// <summary> |
| | | /// è¯ä»¶æ£é¢çæ¬å· |
| | | /// </summary> |
| | | public string CardPositiveVersionNo { get; set; } |
| | | /// <summary> |
| | | /// è¯ä»¶æ£é¢å¤§å° |
| | | /// </summary> |
| | | public int? CardPositiveSize { get; set; } |
| | | /// <summary> |
| | | /// æåæ´æ°æ¶é´ |
| | | /// </summary> |
| | | public DateTime? LastUpdateTime { get; set; } |
| | | /// <summary> |
| | | /// æåæ´æ°äºº |
| | | /// </summary> |
| | | public string LastUpdateName { get; set; } |
| | | /// <summary> |
| | | /// ç¨æ·å |
| | | /// </summary> |
| | | public string UserName { get; set; } |
| | | /// <summary> |
| | | /// ç¨æ·å¯ç |
| | | /// </summary> |
| | | public string UserPassWord { get; set; } |
| | | /// <summary> |
| | | /// ç»å½æ¶é´ |
| | | /// </summary> |
| | | public DateTime? LoginTime { get; set; } |
| | | /// <summary> |
| | | /// æ¯å¦ç»å½ |
| | | /// </summary> |
| | | public bool? IsLogin { get; set; } |
| | | /// <summary> |
| | | /// 建议æ å¿ |
| | | /// </summary> |
| | | public int? AdviseFlag { get; set; } |
| | | /// <summary> |
| | | /// ç¨æ·ID |
| | | /// </summary> |
| | | public int? UserId { get; set; } |
| | | } |
| | | } |
| | |
| | | namespace DocumentServiceAPI.Model.cyDocumentModel |
| | | { |
| | | ///<summary> |
| | | /// |
| | | ///ææ¡£åå·¥è§è² |
| | | ///</summary> |
| | | [SugarTable("Document_EmployeeRole")] |
| | | public partial class Document_EmployeeRole |
| | | { |
| | | public Document_EmployeeRole(){ |
| | | |
| | | |
| | | } |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:False |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey=true,IsIdentity=true)] |
| | | public int ID {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:False |
| | | /// </summary> |
| | | public int EmployeeId {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:False |
| | | /// </summary> |
| | | public int RoleType {get;set;} |
| | | |
| | | |
| | | /// <summary> |
| | | /// ID |
| | | /// é»è®¤å¼ï¼ |
| | | /// å¯ç©ºï¼False |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] |
| | | public int ID { get; set; } |
| | | /// <summary> |
| | | /// åå·¥ID |
| | | /// </summary> |
| | | public int? EmployeeId { get; set; } |
| | | /// <summary> |
| | | /// è§è²ç±»å |
| | | /// </summary> |
| | | public int? RoleType { get; set; } |
| | | } |
| | | } |
| | |
| | | [SugarTable("Document_PerformanceInfo")] |
| | | public partial class Document_PerformanceInfo |
| | | { |
| | | public Document_PerformanceInfo(){ |
| | | |
| | | |
| | | } |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:False |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey=true,IsIdentity=true)] |
| | | public int Id {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public int? EmployeeId {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string ProjectName {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string WorkItem {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public decimal? Price {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public DateTime? WorkTime {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string EmployeeName {get;set;} |
| | | |
| | | /// <summary> |
| | | /// ID |
| | | /// é»è®¤å¼ï¼ |
| | | /// å¯ç©ºï¼False |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] |
| | | public int Id { get; set; } |
| | | /// <summary> |
| | | /// åå·¥ID |
| | | /// é»è®¤å¼ï¼ |
| | | /// å¯ç©ºï¼True |
| | | /// </summary> |
| | | public int? EmployeeId { get; set; } |
| | | /// <summary> |
| | | /// 项ç®åç§° |
| | | /// é»è®¤å¼ï¼ |
| | | /// å¯ç©ºï¼True |
| | | /// </summary> |
| | | public string ProjectName { get; set; } |
| | | /// <summary> |
| | | /// å·¥ä½é¡¹ |
| | | /// é»è®¤å¼ï¼ |
| | | /// å¯ç©ºï¼True |
| | | /// </summary> |
| | | public string WorkItem { get; set; } |
| | | /// <summary> |
| | | /// ä»·æ ¼ |
| | | /// é»è®¤å¼ï¼ |
| | | /// å¯ç©ºï¼True |
| | | /// </summary> |
| | | public decimal? Price { get; set; } |
| | | /// <summary> |
| | | /// 工使¶é´ |
| | | /// é»è®¤å¼ï¼ |
| | | /// å¯ç©ºï¼True |
| | | /// </summary> |
| | | public DateTime? WorkTime { get; set; } |
| | | /// <summary> |
| | | /// åå·¥å§å |
| | | /// é»è®¤å¼ï¼ |
| | | /// å¯ç©ºï¼True |
| | | /// </summary> |
| | | public string EmployeeName { get; set; } |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | namespace DocumentServiceAPI.Model.cyDocumentModel |
| | | { |
| | | ///<summary> |
| | | /// |
| | | ///</summary> |
| | | /// <summary> |
| | | /// åä½ |
| | | /// </summary> |
| | | [SugarTable("Document_TenderUnit")] |
| | | public partial class Document_TenderUnit |
| | | { |
| | | public Document_TenderUnit(){ |
| | | |
| | | |
| | | } |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:False |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey=true,IsIdentity=true)] |
| | | public int UnitId {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:False |
| | | /// </summary> |
| | | public string UnitName {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string UnitType {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string Address {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string ZipCode {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string ContactPerson {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string ContactPhone {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string Fax {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string WebUrl {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string OrgStructure {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string Corporater {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string CorporaterPost {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string CorporaterTechnicalPost {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string CorporatePhone {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string TechnicalLeader {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string TechnicalPost {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string TechnicalPhone {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string CreatTime {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string StaffCount {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string FirmQualificationLevel {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string BusinessLicense {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string RegMoney {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string OpenBank {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string BankNum {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string ProjectManager {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string SeniorStaff {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string MiddleStaff {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string PrimaryStaff {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string Mechanicer {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string BusinessContent {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string Remark {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string UnitLogo {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string UnitLogoVersionNo {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public int? UnitLogoSize {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string CardPositive {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string CardPositiveVersionNo {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public int? CardPositiveSize {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default:1 |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public int? IsUsed {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public DateTime? LastUpdateTime {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string LastUpdateName {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public int? AdviseFlag {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public int? UserId {get;set;} |
| | | |
| | | /// <summary> |
| | | /// ID |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] |
| | | public int UnitId { get; set; } |
| | | ///<summary> |
| | | ///åä½åç§° |
| | | ///</summary> |
| | | public string UnitName { get; set; } |
| | | ///<summary> |
| | | ///åä½ç±»å |
| | | ///</summary> |
| | | public string? UnitType { get; set; } |
| | | ///<summary> |
| | | ///å°å |
| | | ///</summary> |
| | | public string? Address { get; set; } |
| | | ///<summary> |
| | | ///鮿¿ç¼ç |
| | | ///</summary> |
| | | public string? ZipCode { get; set; } |
| | | ///<summary> |
| | | ///è系人 |
| | | ///</summary> |
| | | public string? ContactPerson { get; set; } |
| | | ///<summary> |
| | | ///èç³»çµè¯ |
| | | ///</summary> |
| | | public string? ContactPhone { get; set; } |
| | | ///<summary> |
| | | ///ä¼ ç |
| | | ///</summary> |
| | | public string? Fax { get; set; } |
| | | ///<summary> |
| | | ///ç½å |
| | | ///</summary> |
| | | public string? WebUrl { get; set; } |
| | | ///<summary> |
| | | ///ç»ç»ç»æ |
| | | ///</summary> |
| | | public string? OrgStructure { get; set; } |
| | | ///<summary> |
| | | ///æ³äººä»£è¡¨ |
| | | ///</summary> |
| | | public string? Corporater { get; set; } |
| | | ///<summary> |
| | | ///æ³äººèå¡ |
| | | ///</summary> |
| | | public string? CorporaterPost { get; set; } |
| | | ///<summary> |
| | | ///æ³äººææ¯èå¡ |
| | | ///</summary> |
| | | public string? CorporaterTechnicalPost { get; set; } |
| | | ///<summary> |
| | | ///æ³äººèç³»çµè¯ |
| | | ///</summary> |
| | | public string? CorporatePhone { get; set; } |
| | | ///<summary> |
| | | ///ææ¯è´è´£äºº |
| | | ///</summary> |
| | | public string? TechnicalLeader { get; set; } |
| | | ///<summary> |
| | | ///ææ¯èå¡ |
| | | ///</summary> |
| | | public string? TechnicalPost { get; set; } |
| | | ///<summary> |
| | | ///ææ¯èç³»çµè¯ |
| | | ///</summary> |
| | | public string? TechnicalPhone { get; set; } |
| | | ///<summary> |
| | | ///å建æ¶é´ |
| | | ///</summary> |
| | | public string? CreatTime { get; set; } |
| | | ///<summary> |
| | | ///åå·¥æ°é |
| | | ///</summary> |
| | | public string? StaffCount { get; set; } |
| | | ///<summary> |
| | | ///ä¼ä¸èµè´¨ç级 |
| | | ///</summary> |
| | | public string? FirmQualificationLevel { get; set; } |
| | | ///<summary> |
| | | ///è¥ä¸æ§ç
§ |
| | | ///</summary> |
| | | public string? BusinessLicense { get; set; } |
| | | ///<summary> |
| | | ///注åèµé |
| | | ///</summary> |
| | | public string? RegMoney { get; set; } |
| | | ///<summary> |
| | | ///弿·é¶è¡ |
| | | ///</summary> |
| | | public string? OpenBank { get; set; } |
| | | ///<summary> |
| | | ///é¶è¡è´¦å· |
| | | ///</summary> |
| | | public string? BankNum { get; set; } |
| | | ///<summary> |
| | | ///项ç®ç»ç |
| | | ///</summary> |
| | | public string? ProjectManager { get; set; } |
| | | ///<summary> |
| | | ///é«çº§èå·¥ |
| | | ///</summary> |
| | | public string? SeniorStaff { get; set; } |
| | | ///<summary> |
| | | ///ä¸çº§èå·¥ |
| | | ///</summary> |
| | | public string? MiddleStaff { get; set; } |
| | | ///<summary> |
| | | ///å级èå·¥ |
| | | ///</summary> |
| | | public string ?PrimaryStaff { get; set; } |
| | | ///<summary> |
| | | ///é«çº§å·¥ |
| | | ///</summary> |
| | | public string ?Mechanicer { get; set; } |
| | | ///<summary> |
| | | ///ç»è¥å
容 |
| | | ///</summary> |
| | | public string ?BusinessContent { get; set; } |
| | | ///<summary> |
| | | ///夿³¨ |
| | | ///</summary> |
| | | public string ?Remark { get; set; } |
| | | ///<summary> |
| | | ///åä½Logo |
| | | ///</summary> |
| | | public string? UnitLogo { get; set; } |
| | | ///<summary> |
| | | ///åä½Logoçæ¬å· |
| | | ///</summary> |
| | | public string? UnitLogoVersionNo { get; set; } |
| | | ///<summary> |
| | | ///åä½Logoå¤§å° |
| | | ///</summary> |
| | | public int? UnitLogoSize { get; set; } |
| | | ///<summary> |
| | | ///èº«ä»½è¯æ£é¢ |
| | | ///</summary> |
| | | public string ?CardPositive { get; set; } |
| | | ///<summary> |
| | | ///èº«ä»½è¯æ£é¢çæ¬å· |
| | | ///</summary> |
| | | public string ?CardPositiveVersionNo { get; set; } |
| | | ///<summary> |
| | | ///èº«ä»½è¯æ£é¢å¤§å° |
| | | ///</summary> |
| | | public int? CardPositiveSize { get; set; } |
| | | ///<summary> |
| | | ///æ¯å¦ä½¿ç¨ |
| | | ///</summary> |
| | | public int? IsUsed { get; set; } |
| | | ///<summary> |
| | | ///æåæ´æ°æ¶é´ |
| | | ///</summary> |
| | | public DateTime? LastUpdateTime { get; set; } |
| | | ///<summary> |
| | | ///æåæ´æ°äºº |
| | | ///</summary> |
| | | public string? LastUpdateName { get; set; } |
| | | ///<summary> |
| | | ///建议æ å¿ |
| | | ///</summary> |
| | | public int? AdviseFlag { get; set; } |
| | | ///<summary> |
| | | ///ç§æ·ID |
| | | ///</summary> |
| | | [SugarColumn(DefaultValue ="0")] |
| | | public int TenantId { get; set; } |
| | | /// <summary> |
| | | /// UserId |
| | | /// </summary> |
| | | public int? UserId { get; set; } |
| | | /// <summary> |
| | | /// æ¯å¦ææ |
| | | /// </summary> |
| | | public bool? IsEn { get; set; } |
| | | /// <summary> |
| | | /// æ¯å¦å é¤ |
| | | /// </summary> |
| | | public bool ? IsDeled { get; set; } |
| | | } |
| | | } |
| | |
| | | |
| | | namespace DocumentServiceAPI.Model.cyDocumentModel |
| | | { |
| | | ///<summary> |
| | | /// |
| | | ///</summary> |
| | | /// <summary> |
| | | /// ææ¡£ç¨æ· |
| | | /// </summary> |
| | | [SugarTable("Document_UserInfo")] |
| | | public partial class Document_UserInfo |
| | | { |
| | | public Document_UserInfo(){ |
| | | /// <summary> |
| | | /// Desc: ç¨æ·ID |
| | | /// Default: |
| | | /// Nullable: False |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] |
| | | public int UserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Desc: ç¨æ·å |
| | | /// Default: |
| | | /// Nullable: True |
| | | /// </summary> |
| | | public string UserName { get; set; } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:False |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey=true,IsIdentity=true)] |
| | | public int UserId {get;set;} |
| | | /// <summary> |
| | | /// Desc: æ¯å¦ç»ç |
| | | /// Default: 0 |
| | | /// Nullable: True |
| | | /// </summary> |
| | | public int? IsManager { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string UserName {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default:0 |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public int? IsManager {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: |
| | | /// Default:1 |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public int? IsUsed {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc: æ¯å¦å·²ä½¿ç¨ |
| | | /// Default: 1 |
| | | /// Nullable: True |
| | | /// </summary> |
| | | public int? IsUsed { get; set; } |
| | | } |
| | | } |
New file |
| | |
| | |  |
| | | Document_Adviselnfo.cs - ææ¡£å¨è¯¢ä¿¡æ¯ |
| | | Document_AptitudelMG.cs - ææ¡£èµè´¨ç®¡ç |
| | | Document_Aptitudelnfo.cs - ææ¡£èµè´¨ä¿¡æ¯ |
| | | Document_AptitudeType.cs - ææ¡£èµè´¨ç±»å |
| | | Document_CommonFile.cs - ææ¡£éç¨æä»¶ |
| | | Document_DelegatePersonlnfo.cs - ææ¡£å§æäººä¿¡æ¯ |
| | | Document_Dictionary.cs - ææ¡£åå
¸ |
| | | Document_DocumentTempletlnfo.cs - ææ¡£æ¨¡æ¿ä¿¡æ¯ |
| | | Document_Employeelnfo.cs - ææ¡£åå·¥ä¿¡æ¯ |
| | | Document_EmployeeRole.cs - ææ¡£åå·¥è§è² |
| | | Document_LayInfo.cs - ææ¡£å¸å±ä¿¡æ¯ |
| | | Document_OtherCompanyTenderInfo.cs - ææ¡£å
¶ä»å
¬å¸ææ ä¿¡æ¯ |
| | | Document_Performancelnfo.cs - ææ¡£ç»©æä¿¡æ¯ |
| | | Document_ProjectComplainlnfo.cs - ææ¡£é¡¹ç®æè¯ä¿¡æ¯ |
| | | Document_ProjectDocumentInfo.cs - ææ¡£é¡¹ç®ææ¡£ä¿¡æ¯ |
| | | Document_ProjectExpand.cs - ææ¡£é¡¹ç®æ©å± |
| | | Document_ProjectInfo.cs - ææ¡£é¡¹ç®ä¿¡æ¯ |
| | | Document_ProjectLitigationlnfo.cs - ææ¡£é¡¹ç®è¯è®¼ä¿¡æ¯ |
| | | Document_ProjectOppugninfo.cs - ææ¡£é¡¹ç®è´¨çä¿¡æ¯ |
| | | Document_ProjectReviewInfo.cs - ææ¡£é¡¹ç®è¯å®¡ä¿¡æ¯ |
| | | Document_Synchrolnfo.cs - ææ¡£åæ¥ä¿¡æ¯ |
| | | Document_TenderUnit.cs - ææ¡£ææ åä½ |
| | | Document_Userlnfo.cs - ææ¡£ç¨æ·ä¿¡æ¯ |
| | | Document_WinInfo.cs - ææ¡£ä¸æ ä¿¡æ¯ |
| | | Document_WorkRemind.cs - ææ¡£å·¥ä½æé |
New file |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | <Nullable>enable</Nullable> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="CSRedisCore" Version="3.8.670" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\DocumentServiceAPI.Core\DocumentServiceAPI.Core.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace DocumentServiceAPI.Services.IService |
| | | { |
| | | /// <summary> |
| | | /// ç¼åæå¡ |
| | | /// ç®ååªåäºå¯¹redisçæ¯æ ï¼å¦éè¦å
¶ä»çï¼èªè¡å®å 该æ¥å£ä¸ºææ åæå¡æ³¨å
¥ï¼å¨æ³¨å
¥æ¶å¤å³äºå¯¹redisçé
ç½®ãå¦ææ²¡æå¶é
ç½®ï¼è
䏿³¨å
¥æå¡ |
| | | /// </summary> |
| | | public interface IRedisCacheService |
| | | { |
| | | /// <summary> |
| | | /// 设置ä¸ä¸ªé®å¼ |
| | | /// </summary> |
| | | /// <typeparam name="T"></typeparam> |
| | | /// <param name="key"></param> |
| | | /// <param name="value"></param> |
| | | /// <param name="expireSeconds"></param> |
| | | /// <returns></returns> |
| | | bool Add<T>(string key, T value, int expireSeconds); |
| | | /// <summary> |
| | | /// è·åä¸ä¸ªé®å¼ |
| | | /// </summary> |
| | | /// <typeparam name="T"></typeparam> |
| | | /// <param name="key"></param> |
| | | /// <returns></returns> |
| | | T? Get<T>(string key); |
| | | /// <summary> |
| | | /// è·åé®å¼å©ä½è¿æ¶é´ ç§çº§ |
| | | /// </summary> |
| | | /// <param name="key"></param> |
| | | /// <returns></returns> |
| | | public long GetTtl(string key); |
| | | } |
| | | } |
New file |
| | |
| | | using DocumentServiceAPI.Services.IService; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Furion.DependencyInjection; |
| | | |
| | | namespace DocumentServiceAPI.Services |
| | | { |
| | | /// <summary> |
| | | /// redisç¼åæå¡ |
| | | /// </summary> |
| | | public class RedisCacheScService: IRedisCacheService, IScoped |
| | | { |
| | | /// <summary> |
| | | /// 设置ä¸ä¸ªé®å¼ |
| | | /// </summary> |
| | | /// <typeparam name="T"></typeparam> |
| | | /// <param name="key"></param> |
| | | /// <param name="value"></param> |
| | | /// <returns></returns> |
| | | public bool Add<T>(string key, T value, int expireSeconds = -1) |
| | | { |
| | | return RedisHelper.Set(key, value, expireSeconds); |
| | | } |
| | | |
| | | public T? Get<T>(string key) |
| | | { |
| | | return RedisHelper.Get<T>(key); |
| | | } |
| | | /// <summary> |
| | | /// è·åç§çº§è¿ææ¶é´ |
| | | /// </summary> |
| | | /// <param name="key"></param> |
| | | /// <returns></returns> |
| | | public long GetTtl(string key) |
| | | { |
| | | return RedisHelper.Ttl(key); |
| | | } |
| | | } |
| | | } |
| | |
| | | <GenerateDocumentationFile>True</GenerateDocumentationFile> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| | |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\DocumentServiceAPI.Application\DocumentServiceAPI.Application.csproj" /> |
| | | <ProjectReference Include="..\DocumentServiceAPI.Model\DocumentServiceAPI.Model.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| | |
| | | <name>DocumentServiceAPI.Web.Core</name> |
| | | </assembly> |
| | | <members> |
| | | <member name="T:DocumentServiceAPI.Web.Core.DSRESTFulResultProvider"> |
| | | <summary> |
| | | ç»ä¸è¿å |
| | | </summary> |
| | | </member> |
| | | <member name="M:DocumentServiceAPI.Web.Core.DSRESTFulResultProvider.OnException(Microsoft.AspNetCore.Mvc.Filters.ExceptionContext,Furion.FriendlyException.ExceptionMetadata)"> |
| | | <summary> |
| | | å¼å¸¸è¿åå¼ |
| | | </summary> |
| | | <param name="context"></param> |
| | | <param name="metadata"></param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="M:DocumentServiceAPI.Web.Core.DSRESTFulResultProvider.OnSucceeded(Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext,System.Object)"> |
| | | <summary> |
| | | æåè¿åå¼ |
| | | </summary> |
| | | <param name="context"></param> |
| | | <param name="data"></param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="M:DocumentServiceAPI.Web.Core.DSRESTFulResultProvider.OnValidateFailed(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext,Furion.DataValidation.ValidationMetadata)"> |
| | | <summary> |
| | | éªè¯å¤±è´¥è¿åå¼ |
| | | </summary> |
| | | <param name="context"></param> |
| | | <param name="metadata"></param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="M:DocumentServiceAPI.Web.Core.DSRESTFulResultProvider.OnResponseStatusCodes(Microsoft.AspNetCore.Http.HttpContext,System.Int32,Furion.UnifyResult.UnifyResultSettingsOptions)"> |
| | | <summary> |
| | | ç¹å®ç¶æç è¿åå¼ |
| | | </summary> |
| | | <param name="context"></param> |
| | | <param name="statusCode"></param> |
| | | <param name="unifyResultSettings"></param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="M:DocumentServiceAPI.Web.Core.DSRESTFulResultProvider.DsFulResult(System.Int32,System.Int32,System.Object,System.Object)"> |
| | | <summary> |
| | | è¿å RESTful 飿 ¼ç»æé |
| | | </summary> |
| | | <param name="statusCode"></param> |
| | | <param name="Code">æåç¶æç </param> |
| | | <param name="data"></param> |
| | | <param name="errors"></param> |
| | | <returns></returns> |
| | | </member> |
| | | </members> |
| | | </doc> |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace DocumentServiceAPI.Web.Core.Filter |
| | | { |
| | | internal class EnumSchemaFilter |
| | | { |
| | | } |
| | | } |
New file |
| | |
| | | using DocumentServiceAPI.Model; |
| | | using Furion; |
| | | using Furion.DataValidation; |
| | | using Furion.FriendlyException; |
| | | using Furion.UnifyResult; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Microsoft.AspNetCore.Mvc.Filters; |
| | | using System; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace DocumentServiceAPI.Web.Core |
| | | { |
| | | /// <summary> |
| | | /// ç»ä¸è¿å |
| | | /// </summary> |
| | | [UnifyModel(typeof(DSFulResult<>))] |
| | | public class DSRESTFulResultProvider : IUnifyResultProvider |
| | | { |
| | | /// <summary> |
| | | /// å¼å¸¸è¿åå¼ |
| | | /// </summary> |
| | | /// <param name="context"></param> |
| | | /// <param name="metadata"></param> |
| | | /// <returns></returns> |
| | | public IActionResult OnException(ExceptionContext context, ExceptionMetadata metadata) |
| | | { |
| | | |
| | | return new JsonResult(DsFulResult(metadata.StatusCode, Code:0, data: metadata.Data, errors: metadata.Errors) |
| | | , UnifyContext.GetSerializerSettings(context)); // å½åè¡ä»
é Furion 4.6.6+ ä½¿ç¨ |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æåè¿åå¼ |
| | | /// </summary> |
| | | /// <param name="context"></param> |
| | | /// <param name="data"></param> |
| | | /// <returns></returns> |
| | | public IActionResult OnSucceeded(ActionExecutedContext context, object data) |
| | | { |
| | | return new JsonResult(DsFulResult(StatusCodes.Status200OK, 1, data) |
| | | , UnifyContext.GetSerializerSettings(context)); // å½åè¡ä»
é Furion 4.6.6+ ä½¿ç¨ |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éªè¯å¤±è´¥è¿åå¼ |
| | | /// </summary> |
| | | /// <param name="context"></param> |
| | | /// <param name="metadata"></param> |
| | | /// <returns></returns> |
| | | public IActionResult OnValidateFailed(ActionExecutingContext context, ValidationMetadata metadata) |
| | | { |
| | | //设置è¿åç¶æç |
| | | |
| | | return new JsonResult(DsFulResult(metadata.StatusCode ?? StatusCodes.Status400BadRequest, Code: 0, data: metadata.Data, errors: metadata.ValidationResult) |
| | | , UnifyContext.GetSerializerSettings(context)); // å½åè¡ä»
é Furion 4.6.6+ ä½¿ç¨ |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç¹å®ç¶æç è¿åå¼ |
| | | /// </summary> |
| | | /// <param name="context"></param> |
| | | /// <param name="statusCode"></param> |
| | | /// <param name="unifyResultSettings"></param> |
| | | /// <returns></returns> |
| | | public async Task OnResponseStatusCodes(HttpContext context, int statusCode, UnifyResultSettingsOptions unifyResultSettings) |
| | | { |
| | | // 设置ååºç¶æç |
| | | UnifyContext.SetResponseStatusCodes(context, statusCode, unifyResultSettings); |
| | | |
| | | switch (statusCode) |
| | | { |
| | | // å¤ç 401 ç¶æç |
| | | case StatusCodes.Status401Unauthorized: |
| | | await context.Response.WriteAsJsonAsync(DsFulResult(statusCode,Code:0, errors: "401 Unauthorized") |
| | | , App.GetOptions<JsonOptions>()?.JsonSerializerOptions); |
| | | break; |
| | | // å¤ç 403 ç¶æç |
| | | case StatusCodes.Status403Forbidden: |
| | | await context.Response.WriteAsJsonAsync(DsFulResult(statusCode, Code: 0, errors: "403 Forbidden") |
| | | , App.GetOptions<JsonOptions>()?.JsonSerializerOptions); |
| | | break; |
| | | |
| | | default: break; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è¿å RESTful 飿 ¼ç»æé |
| | | /// </summary> |
| | | /// <param name="statusCode"></param> |
| | | /// <param name="Code">æåç¶æç </param> |
| | | /// <param name="data"></param> |
| | | /// <param name="errors"></param> |
| | | /// <returns></returns> |
| | | private static DSFulResult<object> DsFulResult(int statusCode, int Code = 1, object data = default, object errors = default) |
| | | { |
| | | return new DSFulResult<object> |
| | | { |
| | | Code = Code, |
| | | StatusCode= statusCode, |
| | | Data = data, |
| | | Error = errors, |
| | | Extras = UnifyContext.Take(), |
| | | Timestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() |
| | | }; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | using Furion.Authorization; |
| | | using DocumentServiceAPI.Application.UserAndLogin.Services; |
| | | using Furion; |
| | | using Furion.Authorization; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using System.Threading.Tasks; |
| | |
| | | public override Task<bool> PipelineAsync(AuthorizationHandlerContext context, DefaultHttpContext httpContext) |
| | | { |
| | | // è¿éåæ¨çææå¤æé»è¾ï¼ææéè¿è¿å trueï¼å¦åè¿å false |
| | | bool ret= App.GetService<TokenService>().CheckToken(); |
| | | |
| | | return Task.FromResult(true); |
| | | return Task.FromResult(ret); |
| | | } |
| | | } |
| | |
| | | using DocumentServiceAPI.Core; |
| | | using DocumentServiceAPI.Model; |
| | | using Furion; |
| | | using Microsoft.AspNetCore.Builder; |
| | | using Microsoft.AspNetCore.Hosting; |
| | | using Microsoft.Extensions.DependencyInjection; |
| | | using Microsoft.Extensions.Hosting; |
| | | using System.Text.Json.Serialization; |
| | | |
| | | namespace DocumentServiceAPI.Web.Core; |
| | | |
| | |
| | | |
| | | services.AddCorsAccessor(); |
| | | |
| | | services.AddControllers() |
| | | .AddInjectWithUnifyResult(); |
| | | services.AddControllers().AddJsonOptions(options => |
| | | options.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter())); ; |
| | | services.AddInjectWithUnifyResult<DSRESTFulResultProvider>(); |
| | | |
| | | } |
| | | |
| | | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) |
New file |
| | |
| | | using Furion.Authorization; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | |
| | | namespace DocumentServiceAPI.Web.Entry |
| | | { |
| | | /// <summary> |
| | | /// é´æ |
| | | /// </summary> |
| | | public class AuthorizeHandler:AppAuthorizeHandler |
| | | { |
| | | /// <summary> |
| | | /// 请æ±ç®¡é |
| | | /// </summary> |
| | | /// <param name="context"></param> |
| | | /// <param name="httpContext"></param> |
| | | /// <returns></returns> |
| | | public override Task<bool> PipelineAsync(AuthorizationHandlerContext context, DefaultHttpContext httpContext) |
| | | { |
| | | // æ¤å¤å·²ç»èªå¨éªè¯ Jwt tokençæææ§äºï¼æ éæå¨éªè¯ |
| | | |
| | | // æ£æ¥æéï¼å¦ææ¹æ³æ¯å¼æ¥çå°±ä¸ç¨ Task.FromResult å
裹ï¼ç´æ¥ä½¿ç¨ async/await å³å¯ |
| | | return Task.FromResult(CheckAuthorzie(httpContext)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ£æ¥æé |
| | | /// </summary> |
| | | /// <param name="httpContext"></param> |
| | | /// <returns></returns> |
| | | private static bool CheckAuthorzie(DefaultHttpContext httpContext) |
| | | { |
| | | // è·åæéç¹æ§ |
| | | var securityDefineAttribute = httpContext.GetMetadata<SecurityDefineAttribute>(); |
| | | if (securityDefineAttribute == null) return true; |
| | | |
| | | return false;// "æ¥è¯¢æ°æ®åºè¿åæ¯å¦ææé"; |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | using DocumentServiceAPI.Core; |
| | | using CSRedis; |
| | | using DocumentServiceAPI.Core; |
| | | using DocumentServiceAPI.Model; |
| | | using DocumentServiceAPI.Services; |
| | | using DocumentServiceAPI.Services.IService; |
| | | using Furion; |
| | | using Mapster; |
| | | using System.Configuration; |
| | | |
| | | namespace DocumentServiceAPI.Web.Entry |
| | | { |
| | |
| | | { |
| | | public void ConfigureServices(IServiceCollection services) |
| | | { |
| | | |
| | | services.AddSqlsugarSetup(); |
| | | var readisconnectionstring = App.Configuration["RedisConfig:ConnectionString"]; |
| | | if (readisconnectionstring != null) |
| | | //åå§åredié
ç½® |
| | | { |
| | | //æé
ç½®ææ³¨å
¥ |
| | | RedisHelper.Initialization(new CSRedisClient(readisconnectionstring)); |
| | | //注å
¥æå¡ |
| | | services.AddScoped<IRedisCacheService, RedisCacheScService>(); |
| | | } |
| | | |
| | | } |
| | | |
| | | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) |
| | | { |
| | | |
| | | |
| | | app.DbCodeFirst("DocumentServiceAPI.Model"); |
| | | var IsCodeFirst = App.GetConfig<bool>("isCodeFirst"); |
| | | |
| | | if (IsCodeFirst) |
| | | { |
| | | //codefirst è¿å¾æ°æ®åºè®¾ç½® |
| | | app.DbCodeFirst("DocumentServiceAPI.Model"); |
| | | app.DbCodeFirst(typeof(DocumentServiceAPI.Model.cyDocumentModel.Document_TenderUnit)); |
| | | } |
| | | //å¯å¨å
¨å±é»è®¤æ å°é
ç½® |
| | | TypeAdapterConfig.GlobalSettings.Default.PreserveReference(true); |
| | | app.UseStaticFiles(new StaticFileOptions |
| | | { |
| | | OnPrepareResponse = (stf) => |
| | |
| | | stf.Context.Response.Headers["Access-Control-Allow-Headers"] = "*"; |
| | | } |
| | | }); |
| | | App.Configuration.Get<WebHostBuilder>().ConfigureKestrel(x => |
| | | { |
| | | x.Limits.KeepAliveTimeout = TimeSpan.FromMinutes(20); |
| | | x.Limits.RequestHeadersTimeout = TimeSpan.FromMinutes(20); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | |
| | | <ProjectReference Include="..\DocumentServiceAPI.Core\DocumentServiceAPI.Core.csproj" /> |
| | | <ProjectReference Include="..\DocumentServiceAPI.Enum\DocumentServiceAPI.Enum.csproj" /> |
| | | <ProjectReference Include="..\DocumentServiceAPI.Model\DocumentServiceAPI.Model.csproj" /> |
| | | <ProjectReference Include="..\DocumentServiceAPI.Services\DocumentServiceAPI.Services.csproj" /> |
| | | <ProjectReference Include="..\DocumentServiceAPI.Utility\DocumentServiceAPI.Utility.csproj" /> |
| | | <ProjectReference Include="..\DocumentServiceAPI.Web.Core\DocumentServiceAPI.Web.Core.csproj" /> |
| | | </ItemGroup> |
| | |
| | | <ItemGroup> |
| | | <Folder Include="æ°æä»¶å¤¹\" /> |
| | | </ItemGroup> |
| | | |
| | | |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="CSRedisCore" Version="3.8.670" /> |
| | | </ItemGroup> |
| | | <ProjectExtensions> |
| | | <VisualStudio> |
| | | <UserProperties properties_4launchsettings_1json__JsonSchema="" /> |
| | |
| | | "DbType": "SqlServer", |
| | | "IsAutoCloseConnection": true |
| | | |
| | | |
| | | } |
| | | ], |
| | | //swags åç§°é
ç½® é»è®¤åç» |
| | | "[openapi:Default]": { |
| | | "Title": "æ 书管çç³»ç»æå¡", |
| | | "Order": 0, |
| | | "Description": "è¿ä¸ªä¸ä¸ªå¾å¥½ç¨æ 书管çç³»ç»æå¡è½¯ä»¶", |
| | | "Version": "1.0.0", |
| | | "TermsOfService": "http://www.51zhengcai.com", |
| | | "Contact": { |
| | | "Name": "æ¿éå¨è¯¢æéå
¬å¸", |
| | | "Url": "http://www.51zhengcai.com" |
| | | |
| | | }, |
| | | "License": { |
| | | "Name": "æ¿éå¨è¯¢æéå
¬å¸", |
| | | "Url": "http://www.51zhengcai.com" |
| | | } |
| | | "isCodeFirst": false, //æ¯å¦æ§è¡codefirst 注æè¿ä¸ªå¨è¿å¾å®æååºè¯¥è®¾ç½®ä¸ºfalse 鲿¢æ´æ¹æ°æ®åº |
| | | //è¯·ä¿æredis为æ£å¸¸å¯ç¨ |
| | | "RedisConfig": { |
| | | // 妿éç¨å®¹å¨åé¨ç½²Service è¦åæredisçæå¡åï¼å¦ååå°å |
| | | "ConnectionString": "127.0.0.1:6379,password=,connectTimeout=30000,responseTimeout=30000,abortConnect=false,connectRetry=1,syncTimeout=10000,DefaultDatabase=10" //redisæ°æ®åºè¿æ¥å符串 |
| | | |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | "JWTSettings": { |
| | | "ValidateIssuerSigningKey": true, // æ¯å¦éªè¯å¯é¥ï¼bool ç±»åï¼é»è®¤true |
| | | "IssuerSigningKey": "129(*dasd09213)*(*jKDl", // å¯é¥ï¼string ç±»åï¼å¿
é¡»æ¯å¤æå¯é¥ï¼é¿åº¦å¤§äº16 |
| | |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DocumentFile.Service", "DocumentFile.Service\DocumentFile.Service.csproj", "{F3449EF6-8E3F-492F-832F-F5F2E1F2503C}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DocumentServiceAPI.Services", "DocumentServiceAPI.Services\DocumentServiceAPI.Services.csproj", "{3369F102-ABB2-42A4-B216-58D530AEE8BE}" |
| | | EndProject |
| | | Global |
| | | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
| | | Debug|Any CPU = Debug|Any CPU |
| | |
| | | {F3449EF6-8E3F-492F-832F-F5F2E1F2503C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {F3449EF6-8E3F-492F-832F-F5F2E1F2503C}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {F3449EF6-8E3F-492F-832F-F5F2E1F2503C}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {F3449EF6-8E3F-492F-832F-F5F2E1F2503C}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {3369F102-ABB2-42A4-B216-58D530AEE8BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {3369F102-ABB2-42A4-B216-58D530AEE8BE}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {3369F102-ABB2-42A4-B216-58D530AEE8BE}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {3369F102-ABB2-42A4-B216-58D530AEE8BE}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | EndGlobalSection |
| | | GlobalSection(SolutionProperties) = preSolution |
| | | HideSolutionNode = FALSE |