| | |
| | | using DocumentServiceAPI.Application.UserAndLogin.Services; |
| | | using DocumentServiceAPI.Application.UserAndLogin.ViewMode; |
| | | using DocumentServiceAPI.Model.cyDocumentModel; |
| | | using DocumentServiceAPI.Model.UserInfoModel; |
| | | using DocumentServiceAPI.Utility; |
| | | using Furion.DynamicApiController; |
| | | using Furion.JsonSerialization; |
| | |
| | | case 0: |
| | | throw Oops.Oh($"账户或者密码错误"); |
| | | case 1: |
| | | if (!needtoken) |
| | | if (!IsTokenPass) |
| | | { |
| | | needtoken = await _userService.CheckPsw(Tender[0].TenderId, Tender[0].EmployeeID, Parma.PassWord); |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取公司列表 |
| | | /// 是否是用户租户,或者是员工 |
| | | /// </summary> |
| | | /// <returns>登录信息</returns> |
| | | public bool GetUnitList() |
| | | /// <param name="ITCode">账号</param> |
| | | /// <returns> 返回true 代表是, false代表不是</returns> |
| | | [HttpGet("IDIsEmployee")] |
| | | public async Task<bool> IDIsEmployee(string ITCode, [FromServices] ISqlSugarClient db) |
| | | { |
| | | var ad= ITCode.TryValidate(ValidationTypes.PhoneNumber); |
| | | if(!ad.IsValid) |
| | | { |
| | | throw Oops.Oh("请输入正确的账号"); |
| | | } |
| | | |
| | | var count= await db.Queryable<TenantInfo>().Where(x=>x.ItCode==ITCode&&x.IsEn==true&&x.IsDel==false).WithCache(600).CountAsync(); |
| | | if (count > 0) |
| | | return true; |
| | | count=await db.Queryable<Document_EmployeeInfo>().Where(x=>x.UserName==ITCode).WithCache(600).CountAsync(); |
| | | if (count > 0) |
| | | return true; |
| | | return false; |
| | | |
| | | return true; |
| | | } |
| | | /// <summary> |
| | | /// 获取公司列表 |
| | | /// </summary> |
| | | /// <returns>登录信息</returns> |
| | | public bool GetTenantInfoList() |
| | | { |
| | | |
| | | return true; |
| | | } |
| | | public string Get() |
| | | { |
| | | return $"Hello {nameof(Furion)}"; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |