瀏覽代碼

Merge branch 'develop' of http://132.232.92.186:3000/XinXiBu/OA2023 into develop

yuanrf 9 月之前
父節點
當前提交
66007ab906
共有 55 個文件被更改,包括 3031 次插入241 次删除
  1. 37 3
      OASystem/OASystem.Api/Controllers/AuthController.cs
  2. 6 10
      OASystem/OASystem.Api/Controllers/BusinessController.cs
  3. 1530 103
      OASystem/OASystem.Api/Controllers/GroupsController.cs
  4. 17 13
      OASystem/OASystem.Api/Controllers/MarketCustomerResourcesController.cs
  5. 3 3
      OASystem/OASystem.Api/Controllers/StatisticsController.cs
  6. 32 1
      OASystem/OASystem.Api/Controllers/SystemController.cs
  7. 79 0
      OASystem/OASystem.Api/Filters/RecordAPIOperationFilter.cs
  8. 50 0
      OASystem/OASystem.Api/Middlewares/FixedPromptMiddleware.cs
  9. 114 0
      OASystem/OASystem.Api/Middlewares/RecordAPIOperationMiddleware.cs
  10. 62 0
      OASystem/OASystem.Api/Middlewares/TimeRestrictionMiddleware.cs
  11. 37 0
      OASystem/OASystem.Api/OAMethodLib/GeneralMethod.cs
  12. 8 0
      OASystem/OASystem.Api/OASystem.API.csproj
  13. 31 5
      OASystem/OASystem.Api/Program.cs
  14. 17 0
      OASystem/OASystem.Api/appsettings.json
  15. 16 0
      OASystem/OASystem.Domain/Attributes/ApiLogAttribute.cs
  16. 4 4
      OASystem/OASystem.Domain/Common/QiYeWeChatVerify/Cryptography.cs
  17. 1 1
      OASystem/OASystem.Domain/Common/QiYeWeChatVerify/Sample.cs
  18. 1 1
      OASystem/OASystem.Domain/Common/QiYeWeChatVerify/WXBizMsgCrypt.cs
  19. 1 1
      OASystem/OASystem.Domain/Dtos/Financial/PostPayRequestByDateRangeDto.cs
  20. 397 7
      OASystem/OASystem.Domain/Dtos/Groups/EnterExitCostDto.cs
  21. 4 0
      OASystem/OASystem.Domain/Dtos/Groups/GroupListDto.cs
  22. 4 5
      OASystem/OASystem.Domain/Dtos/Groups/TourClientListDto.cs
  23. 4 2
      OASystem/OASystem.Domain/Dtos/Groups/VisaCommissionDto.cs
  24. 3 3
      OASystem/OASystem.Domain/Dtos/PersonnelModule/TreeNode.cs
  25. 4 4
      OASystem/OASystem.Domain/Dtos/Resource/TicketBlackCodeDto.cs
  26. 0 2
      OASystem/OASystem.Domain/Dtos/Statistics/CorporateProfitDtos.cs
  27. 3 3
      OASystem/OASystem.Domain/Dtos/System/UserDto.cs
  28. 1 1
      OASystem/OASystem.Domain/Dtos/Tencent/OCRVerifyMethod.cs
  29. 66 0
      OASystem/OASystem.Domain/Entities/Customer/Crm_TableOperationRecord.cs
  30. 3 3
      OASystem/OASystem.Domain/Entities/Groups/Grp_CostTypeHotelNumber.cs
  31. 3 3
      OASystem/OASystem.Domain/Entities/Groups/Grp_ScheduleInfo.cs
  32. 4 4
      OASystem/OASystem.Domain/Entities/Resource/Air_TicketBlackCode.cs
  33. 6 2
      OASystem/OASystem.Domain/Enums/MonthEnum.cs
  34. 5 0
      OASystem/OASystem.Domain/Enums/OperationEnum.cs
  35. 8 0
      OASystem/OASystem.Domain/OASystem.Domain.csproj
  36. 19 15
      OASystem/OASystem.Domain/ViewModels/Financial/Fin_DailyFeePaymentView.cs
  37. 281 1
      OASystem/OASystem.Domain/ViewModels/Groups/EnterExitCostDraftView.cs
  38. 17 8
      OASystem/OASystem.Domain/ViewModels/Groups/EnterExitCostView.cs
  39. 1 1
      OASystem/OASystem.Domain/ViewModels/PersonnelModule/TaskAllocationView.cs
  40. 8 2
      OASystem/OASystem.Domain/ViewModels/PersonnelModule/WageSheetView.cs
  41. 1 1
      OASystem/OASystem.Domain/ViewModels/QiYeWeChat/Access_TokenView.cs
  42. 6 3
      OASystem/OASystem.Domain/ViewModels/QiYeWeChat/ApprovalDataView.cs
  43. 1 1
      OASystem/OASystem.Domain/ViewModels/Resource/InvitationOfficialActivityDataView.cs
  44. 21 3
      OASystem/OASystem.Domain/ViewModels/Statistics/CorporateProfitViews.cs
  45. 8 0
      OASystem/OASystem.Infrastructure/OASystem.Infrastructure.csproj
  46. 2 2
      OASystem/OASystem.Infrastructure/Repositories/CRM/NewClientDataRepository.cs
  47. 1 1
      OASystem/OASystem.Infrastructure/Repositories/Financial/DailyFeePaymentRepository.cs
  48. 2 2
      OASystem/OASystem.Infrastructure/Repositories/Groups/DelegationInfoRepository.cs
  49. 43 3
      OASystem/OASystem.Infrastructure/Repositories/Groups/EnterExitCostDraftRepository.cs
  50. 44 3
      OASystem/OASystem.Infrastructure/Repositories/Groups/EnterExitCostRepository.cs
  51. 2 2
      OASystem/OASystem.Infrastructure/Repositories/Groups/TourClientListRepository.cs
  52. 1 1
      OASystem/OASystem.Infrastructure/Repositories/Groups/VisaFeeInfoRepository.cs
  53. 1 1
      OASystem/OASystem.Infrastructure/Repositories/PersonnelModule/TaskAllocationRepository.cs
  54. 3 7
      OASystem/OASystem.Infrastructure/Tools/CommonFun.cs
  55. 8 0
      OASystem/OASystem.RedisRepository/OASystem.RedisRepository.csproj

+ 37 - 3
OASystem/OASystem.Api/Controllers/AuthController.cs

@@ -23,6 +23,9 @@ using OASystem.Domain.Entities.Groups;
 using OASystem.Domain.Entities.Customer;
 using static QRCoder.PayloadGenerator.SwissQrCode;
 using OASystem.Domain.AesEncryption;
+using XAct;
+using Microsoft.Extensions.Configuration;
+using OASystem.Domain.Attributes;
 
 namespace OASystem.API.Controllers
 {
@@ -42,7 +45,18 @@ namespace OASystem.API.Controllers
         private readonly IHubContext<ChatHub, IChatClient> _hubContext;
         private readonly DeviceTokenRepository _deviceTokenRepository;
 
-
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="config"></param>
+        /// <param name="loginRep"></param>
+        /// <param name="mapper"></param>
+        /// <param name="message"></param>
+        /// <param name="systemMenuPermissionRepository"></param>
+        /// <param name="qiYeWeChatApiService"></param>
+        /// <param name="messageRep"></param>
+        /// <param name="deviceRep"></param>
+        /// <param name="hubContext"></param>
         public AuthController(IConfiguration config, LoginRepository loginRep, IMapper mapper, MessageRepository message,
             SystemMenuPermissionRepository systemMenuPermissionRepository, IQiYeWeChatApiService qiYeWeChatApiService, MessageRepository messageRep,
             DeviceTokenRepository deviceRep,
@@ -66,6 +80,7 @@ namespace OASystem.API.Controllers
         /// <returns></returns>
         [Route("login")]
         [HttpPost]
+        //[ApiLog]
         [ProducesResponseType(typeof(LoginView), StatusCodes.Status200OK)]
         public async Task<IActionResult> LoginAsync(LoginDto dto)
         {
@@ -77,8 +92,29 @@ namespace OASystem.API.Controllers
             #region 校验用户信息 
             var userData = _loginRep.Login(dto).Result;
             if (userData.Code != 0) return Ok(JsonView(false, userData.Msg));
+            #endregion
+
+            #region 限制销售部门 除gyy外可登录
+            var userInfo = userData.Data as UserLoginInfoView;
+            if (userInfo == null) return Ok(JsonView(false, userData.Msg));
+
+            if (userInfo.DepName.Contains("市场部"))
+            {
+                var noLoginAuth = _config.GetSection("NoLoginAuth").Get<List<string>>();
+                if (noLoginAuth.Any())
+                {
+                    if (noLoginAuth.Contains(userInfo.CnName)) return Ok(JsonView(false, "NO ACCESS!!"));
+                }
+                
+                //其他市场部人员 限制登录时间段
+                var currentDateTime = DateTime.Now;
+                var startTime = DateTime.Parse(_config["ApiAccessTime:StartTime"]);
+                var endTime = DateTime.Parse(_config["ApiAccessTime:EndTime"]);
+                if (currentDateTime < startTime && currentDateTime > endTime) return Ok(JsonView(false, "NO ACCESS!!"));
+            }
 
             #endregion
+
             Result authData = null;
             string uName = string.Empty,
                    role = string.Empty,
@@ -264,7 +300,6 @@ namespace OASystem.API.Controllers
         /// <summary>
         /// 申请注册 数据Data
         /// </summary>
-        /// <param name="dto"></param>
         /// <returns></returns>
         //[Authorize]
         [HttpPost]
@@ -873,7 +908,6 @@ namespace OASystem.API.Controllers
         /// <summary>
         /// ClientTest
         /// </summary>
-        /// <param name="depId">部门Id</param>
         /// <returns></returns>
         [HttpPost("ClientTest")]
         [ProducesResponseType(typeof(LoginView), StatusCodes.Status200OK)]

+ 6 - 10
OASystem/OASystem.Api/Controllers/BusinessController.cs

@@ -321,7 +321,9 @@ namespace OASystem.API.Controllers
         /// <summary>
         /// 根据团组Id币种Id及类型Id查询团组汇率
         /// </summary>
-        /// <param name="dto"></param>
+        /// <param name="DiId"></param>
+        /// <param name="CId"></param>
+        /// <param name="CurrencyId"></param>
         /// <returns></returns>
         [HttpGet, HttpPost]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
@@ -359,19 +361,13 @@ namespace OASystem.API.Controllers
         /// <returns></returns>
         [HttpPost]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
-        public async Task<IActionResult> PostPageLinkCTable(PageLinkCTableDto dto)
+        public IActionResult PostPageLinkCTable(PageLinkCTableDto dto)
         {
             try
             {
-                if (dto == null)
-                {
-                    return Ok(JsonView(false, "请求参数不能为空!"));
-                }
+                if (dto == null) return Ok(JsonView(false, "请求参数不能为空!"));
 
-                if (dto.PageId == 0)
-                {
-                    return Ok(JsonView(false, "页面Id不能为0!"));
-                }
+                if (dto.PageId == 0) return Ok(JsonView(false, "页面Id不能为0!"));
 
                 List<CTableCorrelationPageDatas> data = AppSettingsHelper.Get<CTableCorrelationPageDatas>("CTableCorrelationPageDatas");
                 CTableCorrelationPageDatas correlationPageDatas = new CTableCorrelationPageDatas();

File diff suppressed because it is too large
+ 1530 - 103
OASystem/OASystem.Api/Controllers/GroupsController.cs


+ 17 - 13
OASystem/OASystem.Api/Controllers/MarketCustomerResourcesController.cs

@@ -857,22 +857,26 @@ namespace OASystem.API.Controllers
                 }).ToListAsync();
 
             var view = new List<dynamic>();
-            foreach (var item in datas)
+
+            if (datas.Any()) 
             {
-                var text = item.OperationItem.GetDescription();
+                datas = datas.OrderByDescending(x => x.CreateTime).ToList();
+                foreach (var item in datas)
+                {
+                    var text = item.OperationItem.GetDescription();
 
-                view.Add(new {
-                    Client = AesEncryptionHelper.Decrypt(item.Client),
-                    item.PortType,
-                    item.OperationItem,
-                    text = text,
-                    item.DataId,
-                    item.CnName,
-                    item.CreateTime
-                });
+                    view.Add(new
+                    {
+                        Client = AesEncryptionHelper.Decrypt(item.Client),
+                        item.PortType,
+                        item.OperationItem,
+                        text = text,
+                        item.DataId,
+                        item.CnName,
+                        item.CreateTime
+                    });
+                }
             }
-
-
             return Ok(JsonView(view));
 
         }

File diff suppressed because it is too large
+ 3 - 3
OASystem/OASystem.Api/Controllers/StatisticsController.cs


+ 32 - 1
OASystem/OASystem.Api/Controllers/SystemController.cs

@@ -16,6 +16,7 @@ using static OASystem.API.OAMethodLib.JWTHelper;
 using System.Runtime.Intrinsics.Arm;
 using OASystem.Domain.Dtos.Statistics;
 using OASystem.Domain.AesEncryption;
+using OASystem.Domain.Entities.System;
 
 namespace OASystem.API.Controllers
 {
@@ -30,6 +31,7 @@ namespace OASystem.API.Controllers
         private readonly DepartmentRepository _sysDepRep;
         private readonly UsersRepository _userRep;
         private readonly IMapper _mapper;
+        private readonly IConfiguration _config;
         private readonly SqlSugarClient _sqlSugar;
         private readonly MessageRepository _messageRep;
         private readonly SetDataRepository _setDataRepository;
@@ -50,7 +52,7 @@ namespace OASystem.API.Controllers
             CompanyRepository syscom,
             DepartmentRepository sysDepRep,
             UsersRepository userRep,
-            IMapper mapper,
+            IMapper mapper, IConfiguration config,
             SqlSugarClient sqlSugar,
             SetDataRepository setDataRepository,
             CompanyRepository companyRepository,
@@ -79,6 +81,7 @@ namespace OASystem.API.Controllers
             _UserAuthorityRepository = userAuthorityRepository;
             _jobRep = jobRep;
             _setDataTypeRep = setDataTypeRep;
+            _config = config;
         }
         #region 消息
 
@@ -255,6 +258,34 @@ namespace OASystem.API.Controllers
 
             try
             {
+
+                #region 限制人员登录
+                var userInfo = await _sqlSugar
+                    .Queryable<Sys_Users>()
+                    .LeftJoin<Sys_Department>((u, d) => u.DepId == d.Id)
+                    .Where((u, d) => u.Id == dto.UserId)
+                    .Select((u, d) => new {
+                        DepName = d.DepName,
+                        CnName = u.CnName
+                    })
+                    .FirstAsync();
+
+                var noLoginAuth = _config.GetSection("NoLoginAuth").Get<List<string>>();
+                if (noLoginAuth.Any())
+                {
+                    if (noLoginAuth.Contains(userInfo.CnName)) return Ok(JsonView(204, "NO ACCESS!!",""));
+                }
+
+                //其他市场部人员 限制登录时间段
+                var currentDateTime = DateTime.Now;
+                var startTime = DateTime.Parse(_config["ApiAccessTime:StartTime"]);
+                var endTime = DateTime.Parse(_config["ApiAccessTime:EndTime"]);
+                if (currentDateTime < startTime && currentDateTime > endTime) return Ok(JsonView(204, "NO ACCESS!!", ""));
+                #endregion
+
+
+
+
                 int messageUnReadCount = 0;
                 int announcementUnReadCount = 0;
                 var data = await _messageRep.GetUnReadCount(dto.UserId);

+ 79 - 0
OASystem/OASystem.Api/Filters/RecordAPIOperationFilter.cs

@@ -0,0 +1,79 @@
+using Microsoft.AspNetCore.Mvc.Filters;
+
+namespace OASystem.API.Filters
+{
+    public class RecordAPIOperationFilter : IActionFilter, IResultFilter
+    {
+       private string _requestParam { get; set; }
+       private string _requestMethod { get; set; }
+
+        public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
+        {
+            // 启用请求体缓冲
+            context.HttpContext.Request.EnableBuffering();
+
+            _requestMethod = context.HttpContext.Request.Method.ToUpper();
+
+            // 读取请求体
+            if (_requestMethod == "POST" && context.HttpContext.Request.ContentType?.Contains("application/json") == true)
+            {
+                using (var reader = new StreamReader(context.HttpContext.Request.Body))
+                {
+                    var body = await reader.ReadToEndAsync();
+                    // 重置请求体流的位置,以便后续处理
+                    context.HttpContext.Request.Body.Position = 0;
+
+                    if (!string.IsNullOrEmpty(body))
+                    {
+                        using (var jsonReader = new JsonTextReader(new StringReader(body)))
+                        {
+                            // 解析JSON内容
+                            var json = new JsonSerializer().Deserialize<Dictionary<string, object>>(jsonReader);
+                            if (json != null)
+                            {
+                                // 验证指定参数是否存在
+                                if (json.ContainsKey("specifiedKey"))
+                                {
+                                    var specifiedValue = json["specifiedKey"];
+                                    Console.WriteLine($"Specified Value: {specifiedValue}");
+                                }
+                                else
+                                {
+                                    Console.WriteLine("Specified Key does not exist in the request body.");
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            // 继续执行Action
+            await next();
+        }
+
+        public void OnResultExecuting(ResultExecutingContext context)
+        {
+            // 获取返回结果
+            if (context.Result is ObjectResult objectResult)
+            {
+                Console.WriteLine("Response Result: " +objectResult.Value);
+            }
+        }
+
+        public void OnResultExecuted(ResultExecutedContext context)
+        {
+            // 结果生成后的逻辑
+        }
+
+        public void OnActionExecuting(ActionExecutingContext context)
+        {
+            throw new NotImplementedException();
+        }
+
+        public void OnActionExecuted(ActionExecutedContext context)
+        {
+            throw new NotImplementedException();
+        }
+    }
+}
+

+ 50 - 0
OASystem/OASystem.Api/Middlewares/FixedPromptMiddleware.cs

@@ -0,0 +1,50 @@
+using NetTaste;
+using System.Text.Encodings.Web;
+using System.Text.Json;
+using System.Text.Unicode;
+
+namespace OASystem.API.Middlewares
+{
+    /// <summary>
+    /// api所有入口固定提示
+    /// </summary>
+    public class FixedPromptMiddleware
+    {
+        private readonly RequestDelegate _next;
+
+        public FixedPromptMiddleware(RequestDelegate next)
+        {
+            _next = next;
+        }
+
+        public async Task InvokeAsync(HttpContext context)
+        {
+            // 检查是否为 API 请求
+            if (context.Request.Path.StartsWithSegments("/api"))
+            {
+                // 设置响应内容类型
+                context.Response.ContentType = "text/plain";
+
+                //固定提示格式
+                var response = new JsonView()
+                {
+                    Code = 400,
+                    Msg = "紧急通知:因明年接入AI接口,需服务器框架升级及数据库数据备份,OA系统pc端及手机端将暂停使用,我们尽量在48小时内升级完成并恢复使用。"
+
+                };
+
+                // 写入固定的提示信息
+                await context.Response.WriteAsync(System.Text.Json.JsonSerializer.Serialize(response,new JsonSerializerOptions
+                {
+                    Encoder = JavaScriptEncoder.Create(UnicodeRanges.All)
+                }));
+
+                // 不再调用后续中间件
+                return;
+            }
+
+            // 调用后续中间件
+            await _next(context);
+        }
+    }
+}

+ 114 - 0
OASystem/OASystem.Api/Middlewares/RecordAPIOperationMiddleware.cs

@@ -0,0 +1,114 @@
+using Aspose.Words;
+using NPOI.HSSF.Record;
+using OASystem.Domain.Attributes;
+using OASystem.Domain.Entities.Customer;
+using OASystem.Infrastructure.Repositories.CRM;
+using System.ComponentModel.DataAnnotations;
+using System.Diagnostics;
+using XAct;
+using static Google.Protobuf.Reflection.SourceCodeInfo.Types;
+
+namespace OASystem.API.Middlewares
+{
+    /// <summary>
+    /// 指定API操作记录信息
+    /// </summary>
+    public class RecordAPIOperationMiddleware
+    {
+        private readonly RequestDelegate _next;
+        private readonly HttpClient _httpClient;
+        private readonly IConfiguration _config;
+        private readonly SqlSugarClient _sqlSugar;
+
+        public RecordAPIOperationMiddleware(RequestDelegate next, IConfiguration config, HttpClient httpClient, SqlSugarClient sqlSugar)
+        {
+            _next = next;
+            _httpClient = httpClient;
+            _config = config;
+            _sqlSugar = sqlSugar;
+        }
+
+        public async Task InvokeAsync(HttpContext context)
+        {
+            // 启用请求体流的缓冲,允许多次读取
+            context.Request.EnableBuffering();
+
+            // 读取请求体内容
+            var requestBodyText = await ReadRequestBody(context.Request);
+
+            // 检查控制器方法是否使用了自定义属性
+            var endpoint = context.GetEndpoint();
+            if (endpoint?.Metadata?.GetMetadata<ApiLogAttribute>() != null)
+            {
+                var logInfo = new Crm_TableOperationRecord();
+                logInfo.ActionName = context.Request.Path;
+                logInfo.UpdatePreData = requestBodyText;
+                // 保存原始响应体流
+                var originalResponseBody = context.Response.Body;
+
+                // 创建一个新的内存流来捕获响应体
+                using var responseMemoryStream = new MemoryStream();
+                context.Response.Body = responseMemoryStream;
+
+                // 调用下一个中间件
+                await _next(context);
+
+                // 重置响应体流的位置
+                responseMemoryStream.Position = 0;
+
+                // 读取响应体内容
+                var responseBodyText = await new StreamReader(responseMemoryStream).ReadToEndAsync();
+
+                // 将响应体内容写回原始响应体流
+                await responseMemoryStream.CopyToAsync(originalResponseBody);
+
+                logInfo.UpdateBefData = responseBodyText;
+
+               
+
+
+                // 存储到数据库
+                //_sqlSugar.ChangeDatabase(DBEnum.OA2023DB);
+                await  _sqlSugar.Insertable(logInfo).ExecuteCommandAsync();
+            }
+            else
+            {
+                // 调用下一个中间件
+                await _next(context);
+            }
+        }
+
+        private async Task<string> ReadRequestBody(HttpRequest request)
+        {
+            request.EnableBuffering();
+
+            // 读取请求体内容
+            using var reader = new StreamReader(request.Body, Encoding.UTF8, true, 1024, true);
+            var requestBodyText = await reader.ReadToEndAsync();
+
+            // 重置请求体流的位置
+            request.Body.Position = 0;
+
+            return requestBodyText;
+        }
+
+
+        private async Task<string> GetExternalIp()
+        {
+            var response = await _httpClient.GetAsync("https://ifconfig.me");
+            response.EnsureSuccessStatusCode();
+            return await response.Content.ReadAsStringAsync();
+        }
+
+        private async Task<string> GetIpLocation(string ip)
+        {
+            var response = await _httpClient.GetAsync($"https://ipinfo.io/{ip}/json");
+            response.EnsureSuccessStatusCode();
+            var json = await response.Content.ReadAsStringAsync();
+            var ipInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(json);
+            return $"{ipInfo.country}, {ipInfo.city}";
+        }
+
+       
+    }
+}

+ 62 - 0
OASystem/OASystem.Api/Middlewares/TimeRestrictionMiddleware.cs

@@ -0,0 +1,62 @@
+using Microsoft.AspNetCore.Http;
+using NPOI.SS.Formula.Functions;
+using System.Text.Encodings.Web;
+using System.Text.Json;
+using System.Text.Unicode;
+
+namespace OASystem.API.Middlewares
+{
+    /// <summary>
+    /// 设置时间端访问All接口
+    /// </summary>
+    public class TimeRestrictionMiddleware
+    {
+        private readonly RequestDelegate _next; 
+        private readonly DateTime _startDateTime;
+        private readonly DateTime _endDateTime;
+
+        public TimeRestrictionMiddleware(RequestDelegate next, DateTime startDateTime, DateTime endDateTime)
+        {
+            _next = next;
+            _startDateTime = startDateTime;
+            _endDateTime = endDateTime;
+        }
+
+        public async Task InvokeAsync(HttpContext context)
+        {
+            var currentDateTime = DateTime.Now;
+
+            if (currentDateTime >= _startDateTime && currentDateTime <= _endDateTime)
+            {
+                await _next(context);
+            }
+            else
+            {
+                if (context.Request.Method == "OPTIONS")
+                {
+                    context.Response.Headers.Add("Access-Control-Allow-Origin", "http://example.com");
+                    context.Response.Headers.Add("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS");
+                    context.Response.Headers.Add("Access-Control-Allow-Headers", "Content-Type, Accept, X-Requested-With");
+                    
+                }
+
+
+
+
+                context.Response.ContentType = "application/json";
+                context.Response.StatusCode = 201;
+                var response = context.Response;
+                var errorResponse = new 
+                {
+                    code = 201,
+                    msg = "NO ACCESS!",
+                    data = "",
+                    count = 0
+                };
+
+                await context.Response.WriteAsync(System.Text.Json.JsonSerializer.Serialize(errorResponse));
+
+            }
+        }
+    }
+}

+ 37 - 0
OASystem/OASystem.Api/OAMethodLib/GeneralMethod.cs

@@ -47,6 +47,43 @@ namespace OASystem.API.OAMethodLib
 
         private readonly static string[] weekdays = new string[] { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" };
 
+        #region 团组操作-->团组归属部门
+
+        /// <summary>
+        /// 团组操作-->团组归属部门
+        /// </summary>
+        /// <returns></returns>
+        public static async Task<List<GroupOpAffiliationBranchView>> GroupOpAffiliationBranchInit()
+        {
+            /*
+                * 1.sq 和 gyy 等显示 市场部
+                * 2.王鸽和主管及张总还有管理员号统一国交部
+                * 2-1.  4	管理员 ,21	张海麟
+                */
+
+            //List<int> userIds = new List<int>() { 4, 21 };
+            var userDepDatas = new List<GroupOpAffiliationBranchView>();
+            //userDepDatas = _sqlSugar.Queryable<Sys_Users>()
+            //    .LeftJoin<Sys_Department>((u, d) => u.DepId == d.Id)
+            //    .Where(u => u.IsDel == 0)
+            //    .Select((u, d) => new GroupOpAffiliationBranchView { value = userIds.Contains(u.Id) ? "国交部" : d.DepName, text = userIds.Contains(u.Id) ? "国交部" : d.DepName })
+            //    .ToList();
+            userDepDatas.Insert(0, new GroupOpAffiliationBranchView() { text = "全部", value = "全部" });
+            userDepDatas.Insert(0, new GroupOpAffiliationBranchView() { text = "管理员", value = "全部" });
+            userDepDatas.Insert(0, new GroupOpAffiliationBranchView() { text = "市场部", value = "市场部" });
+            userDepDatas.Insert(0, new GroupOpAffiliationBranchView() { text = "国交部", value = "国交部" });
+
+            return userDepDatas;
+        }
+
+        public class GroupOpAffiliationBranchView
+        {
+            public string value { get; set; }
+            public string text { get; set; }
+        }
+
+        #endregion
+
         #region 员工注册默认添加基础页面
 
         /// <summary>

+ 8 - 0
OASystem/OASystem.Api/OASystem.API.csproj

@@ -8,6 +8,14 @@
 <EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
   </PropertyGroup>
 
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
+    <NoWarn>1701;1702;1591;8618;1570;8603;8604;8602;8600;0168;8601;1998;</NoWarn>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
+    <NoWarn>1701;1702;1591;8618;1570;8603;8604;8602;8600;0168;8601;1998;</NoWarn>
+  </PropertyGroup>
+
   <ItemGroup>
     <Compile Remove="Include\**" />
     <Compile Remove="Logs\**" />

+ 31 - 5
OASystem/OASystem.Api/Program.cs

@@ -61,8 +61,20 @@ builder.Services.AddCors(policy =>
     //.WithExposedHeaders("X-Pagination"));
 
     policy.AddPolicy("Cors", opt => opt
-          .SetIsOriginAllowed(origin => true)
-                                             //.AllowAnyOrigin()
+            .SetIsOriginAllowed(origin =>
+            {
+                // 定义允许的来源列表
+                var allowedOrigins = new List<string>
+                    {
+                       "http://132.232.92.186:9002"
+                      
+                    };
+
+                // 检查请求的来源是否在允许的列表中
+                return allowedOrigins.Contains(origin);
+            })
+
+          //.AllowAnyOrigin()
           .AllowAnyHeader()
           .WithMethods("GET", "POST", "HEAD", "PUT", "DELETE", "OPTIONS")
           .AllowCredentials());
@@ -113,7 +125,8 @@ builder.Services.AddScoped(options =>
             ConfigId = DBEnum.OA2023DB,
             ConnectionString = _config.GetConnectionString("OA2023DB"),
             DbType = DbType.SqlServer,
-            IsAutoCloseConnection = true },
+            IsAutoCloseConnection = true
+        },
         new ConnectionConfig()
         {
             ConfigId = DBEnum.OA2014DB,
@@ -360,6 +373,8 @@ builder.Services.TryAddSingleton(typeof(CommonService));
 #endregion
 
 var app = builder.Build();
+
+
 AutofacIocManager.Instance.Container = app.UseHostFiltering().ApplicationServices.GetAutofacRoot();//AutofacIocManager
 
 // Configure the HTTP request pipeline.
@@ -367,13 +382,24 @@ if (!app.Environment.IsDevelopment())
 {
     app.UseExceptionHandler("/Home/Error");
 }
-app.UseStaticFiles();
 
-app.UseMiddleware<ExceptionHandlingMiddleware>();
+app.UseStaticFiles();
 
 app.UseRouting();
+
 app.UseCors("Cors");  //Cors
 
+//app.UseMiddleware<FixedPromptMiddleware>();
+app.UseMiddleware<ExceptionHandlingMiddleware>();
+
+// 定义允许API的访问时间段
+//var startTime = DateTime.Parse(_config["ApiAccessTime:StartTime"]);
+//var endTime = DateTime.Parse(_config["ApiAccessTime:EndTime"]);
+//app.UseMiddleware<TimeRestrictionMiddleware>(startTime, endTime);
+
+//指定API操作记录信息
+app.UseMiddleware<RecordAPIOperationMiddleware>();
+
 app.UseAuthentication(); // 认证
 app.UseAuthorization();  // 授权
 

+ 17 - 0
OASystem/OASystem.Api/appsettings.json

@@ -3,6 +3,23 @@
     "OA2023DB": "server=132.232.92.186;uid=sa;pwd=Yjx@158291;database=OA2023DB;MultipleActiveResultSets=True;",
     "OA2014DB": "server=132.232.92.186;uid=sa;pwd=Yjx@158291;database=OA2014;MultipleActiveResultSets=True;"
   },
+  "ApiAccessTime": {
+    "StartTime": "2025-01-09 15:00:00",
+    "EndTime": "2025-01-10 16:00:00"
+  },
+  "NoLoginAuth": [
+    "高媛媛",
+    "符志超",
+    "杨千莹",
+    "喻思霖",
+    "张倩",
+    "雷怡"
+  ],
+  //记录相关api接口
+  "RecordApiPathName": [
+    "/api/login",
+    "/api/MarketCustomerResources/NewClientOp"
+  ],
   "JwtSecurityKey": "48d3f4fe770940a1068052f581536b81", //jwt密钥
   "UseSwagger": "true", //启用Swagger
   "GroupsConfig": {

+ 16 - 0
OASystem/OASystem.Domain/Attributes/ApiLogAttribute.cs

@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Attributes
+{
+    /// <summary>
+    /// 指定接口增加操作日志
+    /// </summary>
+    [AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
+    public class ApiLogAttribute : Attribute
+    {
+    }
+}

+ 4 - 4
OASystem/OASystem.Domain/Common/QiYeWeChatVerify/Cryptography.cs

@@ -29,8 +29,8 @@ namespace Tencent
         /// </summary>
         /// <param name="Input">密文</param>
         /// <param name="EncodingAESKey"></param>
+        /// <param name="corpid"></param>
         /// <returns></returns>
-        /// 
         public static string AES_decrypt(String Input, string EncodingAESKey, ref string corpid)
         {
             byte[] Key;
@@ -107,7 +107,7 @@ namespace Tencent
             aes.Key = Key;
             aes.IV = Iv;
             var encrypt = aes.CreateEncryptor(aes.Key, aes.IV);
-            byte[] xBuff = null;
+            byte[]? xBuff = null;
 
             using (var ms = new MemoryStream())
             {
@@ -136,7 +136,7 @@ namespace Tencent
             aes.Key = Key;
             aes.IV = Iv;
             var encrypt = aes.CreateEncryptor(aes.Key, aes.IV);
-            byte[] xBuff = null;
+            byte[]? xBuff = null;
 
             #region 自己进行PKCS7补位,用系统自己带的不行
             byte[] msg = new byte[Input.Length + 32 - Input.Length % 32];
@@ -203,7 +203,7 @@ namespace Tencent
             aes.Key = Key;
             aes.IV = Iv;
             var decrypt = aes.CreateDecryptor(aes.Key, aes.IV);
-            byte[] xBuff = null;
+            byte[]? xBuff = null;
             using (var ms = new MemoryStream())
             {
                 using (var cs = new CryptoStream(ms, decrypt, CryptoStreamMode.Write))

+ 1 - 1
OASystem/OASystem.Domain/Common/QiYeWeChatVerify/Sample.cs

@@ -88,7 +88,7 @@ namespace MsgCryptTest
 			// For example:
 			XmlDocument doc = new XmlDocument();
             doc.LoadXml(sMsg);
-            XmlNode root = doc.FirstChild;
+            XmlNode? root = doc.FirstChild;
             string content = root["Content"].InnerText;
 			System.Console.WriteLine(content);
 			// ...

+ 1 - 1
OASystem/OASystem.Domain/Common/QiYeWeChatVerify/WXBizMsgCrypt.cs

@@ -101,7 +101,7 @@ namespace Tencent
 				return (int)WXBizMsgCryptErrorCode.WXBizMsgCrypt_IllegalAesKey;
 			}
             XmlDocument doc = new XmlDocument();
-            XmlNode root;
+            XmlNode? root;
             string sEncryptMsg;
             try
             {

+ 1 - 1
OASystem/OASystem.Domain/Dtos/Financial/PostPayRequestByDateRangeDto.cs

@@ -20,7 +20,7 @@ namespace OASystem.Domain.Dtos.Financial
 
     public class PayRequestRateChangeDto: PostPayRequestByDateRangeDto
     {
-        public int UserId { get; set; }
+        public new int UserId { get; set; }
         public int Id { get; set; }
 
         /// <summary>

+ 397 - 7
OASystem/OASystem.Domain/Dtos/Groups/EnterExitCostDto.cs

@@ -24,6 +24,10 @@ namespace OASystem.Domain.Dtos.Groups
         public int CurrUserId { get; set; }
     }
 
+    public class EnterExitCostMobileViewPermissionUsersDto : EnterExitCostInfobyDiIdDto
+    {
+    }
+
     public class PostEnterExitCostMobileSubInfoDto : EnterExitCostInfobyDiIdDto
     {
         /// <summary>
@@ -440,6 +444,7 @@ namespace OASystem.Domain.Dtos.Groups
     public class PostEnterExitCostMobileGroupDataDto : DtoBase
     {
 
+        public int CurrUserId { get; set; }
         public string GroupName { get; set; }
     }
 
@@ -486,6 +491,15 @@ namespace OASystem.Domain.Dtos.Groups
 
     #region op
 
+    public class EnterExitCostMobileSetViewPermissiionDto 
+    {
+        public int DiId { get; set; }
+
+        public int[] UserIds { get; set; }
+
+        public int CurrUserId { get; set; }
+    }
+
     public class PostEnterExitCostMobileUpdateDtoBase : PortDtoBase {
 
         public int Id { get; set; }
@@ -705,15 +719,15 @@ namespace OASystem.Domain.Dtos.Groups
 
         public int CurrUserId { get; set; }
 
-        /// <summary>
-        /// 数据主表Id
-        /// </summary>
+        ///// <summary>
+        ///// 数据主表Id
+        ///// </summary>
         //public int ParentId { get; set; }
 
-        /// <summary>
-        /// 复选框
-        /// 0 未选中 1 选中
-        /// </summary>
+        ///// <summary>
+        ///// 复选框
+        ///// 0 未选中 1 选中
+        ///// </summary>
         //public int IsSelect { get; set; }
 
         /// <summary>
@@ -810,5 +824,381 @@ namespace OASystem.Domain.Dtos.Groups
     }
     #endregion
 
+    #endregion
+
+
+    #region Draft Mobile Request Dto
+
+    public class PostEnterExitCostDraftMobileGroupDataDto : DtoBase
+    {
+
+        public string GroupName { get; set; }
+    }
+
+    public class PostEnterExitCostDraftMobileCurrencyDataDto : DtoBase
+    {
+        public string CurrencyName { get; set; }
+    }
+
+    public class PostEnterExitCostDraftMobileOtherItemCurrencyDataDto : PortDtoBase
+    {
+        public int DraftId { get; set; }
+    }
+
+    public class EnterExitCostDraftMobileFeeTipsDto : PortDtoBase
+    {
+
+        /// <summary>
+        /// 提示数据类型
+        /// 1 实时汇率
+        /// 2 签证费用
+        /// 3 机票费用
+        /// </summary>
+        public int TipsType { get; set; }
+    }
+
+    public class EnterExitCostDraftMobileParentInfoDto
+    {
+        public int DraftId { get; set; }
+
+        public int CurrUserId { get; set; }
+    }
+
+
+    #region op
+
+    public class PostEnterExitCostDraftMobileUpdateDtoBase : PortDtoBase
+    {
+
+        public int DraftId { get; set; }
+
+        public int CurrUserId { get; set; }
+
+    }
+
+    public class EnterExitCostDraftMobileSetViewPermissiionDto
+    {
+        public int DraftId { get; set; }
+
+        public int[] UserIds { get; set; }
+
+        public int CurrUserId { get; set; }
+    }
+
+    public class PostEnterExitCostDraftMobileFeeRateOpDto : PostEnterExitCostDraftMobileUpdateDtoBase
+    {
+        /// <summary>
+        ///  多个币种存储
+        ///  存储方式: 美元(USD):6.2350|.......|墨西哥比索(MXN):1.0000
+        /// </summary>
+        public CurrencyInfo[] Currencys { get; set; }
+    }
+
+    public class PostEnterExitCostDraftMobileFeeOpCheckboxDto : PostEnterExitCostDraftMobileUpdateDtoBase
+    {
+
+        /// <summary>
+        ///  境内费用(其他费用)选择框
+        /// </summary>
+        public int ChoiceOne { get; set; }
+
+        /// <summary>
+        ///  国际旅费合计选择框
+        /// </summary>
+        public int ChoiceTwo { get; set; }
+
+        /// <summary>
+        ///  经济舱小计选择框
+        /// </summary>
+        public int SumJJC { get; set; }
+
+        /// <summary>
+        ///  公务舱小计选择框
+        /// </summary>
+        public int SumGWC { get; set; }
+
+        /// <summary>
+        ///  公务舱小计选择框
+        /// </summary>
+        public int SumTDC { get; set; }
+
+        /// <summary>
+        ///  住宿费合计选择框
+        /// </summary>
+        public int ChoiceThree { get; set; }
+
+        /// <summary>
+        ///  伙食费合计选择框
+        /// </summary>
+        public int ChoiceFour { get; set; }
+
+        /// <summary>
+        ///  公杂费合计选择框
+        /// </summary>
+        public int ChoiceFive { get; set; }
+
+        /// <summary>
+        ///  培训费用选择框
+        /// </summary>
+        public int ChoiceSix { get; set; }
+
+        /// <summary>
+        ///  其他费用选择框
+        /// </summary>
+        public int OtherExpenses_Checked { get; set; }
+    }
+
+
+    public class EnterExitCostDarftMobileOpSingleCheckboxDto : PostEnterExitCostDraftMobileUpdateDtoBase
+    {
+        /// <summary>
+        /// 子项复选框类型
+        /// 3:住宿费; 4:伙食费; 5:公杂费; 6:培训费;7:其他;
+        /// </summary>
+        public int ItemType { get; set; }
+
+        /// <summary>
+        /// 是否选中
+        /// 0 未选择 1 选中
+        /// </summary>
+        public int IsSelected { get; set; }
+    }
+    public class PostEnterExitCostDraftMobileOpStep1Dto : PostEnterExitCostDraftMobileUpdateDtoBase
+    {
+        /// <summary>
+        /// 复选框选中
+        ///  0 未选中 1 选中
+        /// </summary>
+        public int ChoiceOne { get; set; }
+
+        /// <summary>
+        /// 签证费
+        /// </summary>
+        public decimal Visa { get; set; }
+
+        /// <summary>
+        /// 签证费描述
+        /// </summary>
+        public string? VisaRemark { get; set; }
+
+        /// <summary>
+        /// 疫苗费
+        /// </summary>
+        public decimal YiMiao { get; set; }
+
+        /// <summary>
+        /// 核酸检测费用
+        /// </summary>
+        public decimal HeSuan { get; set; }
+
+        /// <summary>
+        /// 服务费用
+        /// </summary>
+        public decimal Service { get; set; }
+
+        /// <summary>
+        /// 参展门票
+        /// </summary>
+        public decimal Ticket { get; set; }
+
+        /// <summary>
+        /// 保险费
+        /// </summary>
+        public decimal Safe { get; set; }
+
+        public string FirstItemRemark { get; set; }
+    }
+
+    public class PostEnterExitCostDraftMobileOpStep2Dto : PostEnterExitCostDraftMobileUpdateDtoBase
+    {
+        /// <summary>
+        /// 复选框选中(经济舱)
+        /// 0 未选中 1 选中
+        /// </summary>
+
+        public int ChoiceTwoJJ { get; set; }
+
+        /// <summary>
+        /// 国际旅费合计(经济舱)
+        /// </summary>
+        public decimal OutsideJJPay { get; set; }
+
+        /// <summary>
+        /// 复选框选中(公务舱)
+        /// 0 未选中 1 选中
+        /// </summary>
+
+        public int ChoiceTwoGW { get; set; }
+        /// <summary>
+        ///  国际旅费合计(公务舱)
+        /// </summary>
+        public decimal OutsideGWPay { get; set; }
+
+        /// <summary>
+        /// 复选框选中(头等舱)
+        /// 0 未选中 1 选中
+        /// </summary>
+
+        public int ChoiceTwoTD { get; set; }
+
+        /// <summary>
+        /// 国际旅费合计(头等舱)
+        /// </summary>
+        public decimal OutsideTDPay { get; set; }
+
+        /// <summary>
+        ///  国际机票(经济舱)
+        /// </summary>
+        public decimal AirJJ { get; set; }
+
+        /// <summary>
+        ///  国际机票(公务舱)
+        /// </summary>
+        public decimal AirGW { get; set; }
+
+        /// <summary>
+        ///  国际机票(头等舱)
+        /// </summary>
+        public decimal AirTD { get; set; }
+
+        /// <summary>
+        ///  国外城市间交通费
+        /// </summary>
+        public decimal CityTranffic { get; set; }
+        public string TwoItemRemark { get; set; }
+    }
+
+    public class PostEnterExitCostDraftMobileOpStep3To6Dto
+    {
+        public int PortType { get; set; }
+        public int DraftId { get; set; }
+
+        public int CurrUserId { get; set; }
+
+        /// <summary>
+        /// 费用类型
+        /// 1 住宿费;2 伙食费;3 公杂费;4 培训费
+        /// </summary>
+        public int FeeType { get; set; }
+
+        /// <summary>
+        /// 详情
+        /// </summary>
+        public DayAndCostMobileInfoDto[] Infos { get; set; }
+    }
+
+    public class PostEnterExitCostDraftMobileOpSingleStep3To6Dto : DayAndCostDraftMobileInfoDto
+    {
+        public int PortType { get; set; }
+        public int DraftId { get; set; }
+
+        public int CurrUserId { get; set; }
+
+        ///// <summary>
+        ///// 数据主表Id
+        ///// </summary>
+        //public int ParentId { get; set; }
+       
+        ///// <summary>
+        ///// 复选框
+        ///// 0 未选中 1 选中
+        ///// </summary>
+        //public int IsSelect { get; set; }
+
+        /// <summary>
+        /// 费用类型
+        /// 3 住宿费;4 伙食费;5 公杂费;6 培训费
+        /// </summary>
+        public int FeeType { get; set; }
+
+    }
+
+    public class DayAndCostDraftMobileInfoDto
+    {
+        /// <summary>
+        /// 数据子表Id
+        /// </summary>
+        public int SubId { get; set; }
+
+        /// <summary>
+        /// 天数
+        /// </summary>
+        public int Days { get; set; }
+
+        /// <summary>
+        /// 地名Id
+        /// </summary>
+        public int NationalTravelFeeId { get; set; }
+
+        /// <summary>
+        /// 费用标准
+        /// </summary>
+        public decimal Cost { get; set; }
+
+        /// <summary>
+        /// 币种
+        /// Sys_SetData STid = 66
+        /// </summary>
+        public int Currency { get; set; }
+
+        /// <summary>
+        /// 小计
+        /// </summary>
+        public decimal SubTotal { get; set; }
+    }
+
+    public class PostEnterExitCostDraftMobileOpStep7Dto
+    {
+        public int PortType { get; set; }
+        public int DraftId { get; set; }
+
+        public int CurrUserId { get; set; }
+
+        /// <summary>
+        /// 详情
+        /// </summary>
+        public DayOtherPriceMobileInfoDto[] Infos { get; set; }
+    }
+
+    public class PostEnterExitCostDraftMobileOpSingleStep7Dto : DayOtherPriceDraftMobileInfoDto
+    {
+        public int PortType { get; set; }
+        //public int DiId { get; set; }
+
+        public int CurrUserId { get; set; }
+
+        ///// <summary>
+        ///// 数据主表Id
+        ///// </summary>
+        //public int ParentId { get; set; }
+
+        ///// <summary>
+        ///// 复选框
+        ///// 0 未选中 1 选中
+        ///// </summary>
+        //public int IsSelect { get; set; }
+
+    }
+
+    public class DayOtherPriceDraftMobileInfoDto
+    {
+        public int SubId { get; set; }
+        public int DarftId { get; set; }
+
+        public int SetDataId { get; set; }
+
+        public int Index { get; set; }
+
+        public decimal Cost { get; set; }
+
+        public int Currency { get; set; }
+
+        public decimal SubTotal { get; set; }
+
+        public string Remark { get; set; }
+    }
+    #endregion
+
+
     #endregion
 }

+ 4 - 0
OASystem/OASystem.Domain/Dtos/Groups/GroupListDto.cs

@@ -35,6 +35,10 @@ namespace OASystem.Domain.Dtos.Groups
         /// 团组类型/团队名称/客户名称/客户单位/接团操作人
         /// </summary>
         public string? SearchCriteria { get; set; }
+
+        public string Department { get; set; }
+        public int Rank { get; set; }
+
     }
 
     /// <summary>

+ 4 - 5
OASystem/OASystem.Domain/Dtos/Groups/TourClientListDto.cs

@@ -48,9 +48,8 @@ namespace OASystem.Domain.Dtos.Groups
     {
         /// <summary>
         /// 数据Id
-        /// Id==0 Add 
-        /// Id>0 Update 
-        /// Id<0 无效
+        /// Id == 0 Add 
+        /// Id >= 1 Update 
         /// </summary>
         public int Id { get; set; }
 
@@ -345,11 +344,11 @@ namespace OASystem.Domain.Dtos.Groups
         /// <summary>
         /// 生日
         /// </summary>
-        public string Birthday { get; set; } = null;
+        public string Birthday { get; set; }
         /// <summary>
         /// 身份证
         /// </summary>
-        public string IDcard { get; set; } = null;
+        public string IDcard { get; set; } 
         /// <summary>
         /// 单位
         /// </summary>

+ 4 - 2
OASystem/OASystem.Domain/Dtos/Groups/VisaCommissionDto.cs

@@ -44,10 +44,12 @@ namespace OASystem.Domain.Dtos.Groups
     {
         /// <summary>
         /// ID
-        /// ID<1 添加
-        /// ID>0 修改
+        /// ID<=0 添加
+        /// ID>=1 修改
         /// </summary>
         public int Id { get; set; }
+
+        /// <summary>
         /// 用户ID
         /// </summary>
         public int CurrUserId { get; set; }

+ 3 - 3
OASystem/OASystem.Domain/Dtos/PersonnelModule/TreeNode.cs

@@ -105,9 +105,9 @@ namespace OASystem.Domain.Dtos.PersonnelModule
         /// </summary>
         public int HigherUpUserId { get; set; }
 
-        /// <summary>
-        /// 详细信息
-        /// </summary>
+        ///// <summary>
+        ///// 详细信息
+        ///// </summary>
         //public string Details { get; set; }
 
     }

+ 4 - 4
OASystem/OASystem.Domain/Dtos/Resource/TicketBlackCodeDto.cs

@@ -43,12 +43,12 @@ namespace OASystem.Domain.Dtos.Resource
         /// </summary>
         public string BlackCode { get; set; }
         /// <summary>
-        ///  报价
-        /// <summary>
+        /// 报价
+        /// </summary>
         public string Price { get; set; }
         /// <summary>
-        ///  最新报价
-        /// <summary>
+        /// 最新报价
+        /// </summary>
         public string NowPrice { get; set; }
         /// <summary>
         /// 公务舱单价

+ 0 - 2
OASystem/OASystem.Domain/Dtos/Statistics/CorporateProfitDtos.cs

@@ -60,8 +60,6 @@ namespace OASystem.Domain.Dtos.Statistics
         /// </summary>
         public int ExcelType { get; set; }
 
-        public string BeginDt { get; set; }
-        public string EndDt { get; set; }
     }
     public class CorporateProfitExcelDownloadDtoFoalidator : AbstractValidator<CorporateProfitExcelDownloadDto>
     {

+ 3 - 3
OASystem/OASystem.Domain/Dtos/System/UserDto.cs

@@ -65,9 +65,9 @@ namespace OASystem.Domain.Dtos.System
         /// 试用期
         /// </summary>
         public string UsePeriod { get; set; }
-        /// <summary>
-        /// 人事审核 0未审核(初始状态) 1 已通过(可用)2已拒绝
-        /// </summary>
+        ///// <summary>
+        ///// 人事审核 0未审核(初始状态) 1 已通过(可用)2已拒绝
+        ///// </summary>
         //public int HrAudit { get; set; }
     }
 

+ 1 - 1
OASystem/OASystem.Domain/Dtos/Tencent/OCRVerifyMethod.cs

@@ -31,7 +31,7 @@ namespace OASystem.Domain.Dtos.Tencent
         /// TencentOCR图片大小处理
         /// 不能大于7MB
         /// </summary>
-        /// <param name="type"></param>
+        /// <param name="picBase64"></param>
         /// <returns></returns>
         public static bool ImageSize(string picBase64)
         {

+ 66 - 0
OASystem/OASystem.Domain/Entities/Customer/Crm_TableOperationRecord.cs

@@ -38,5 +38,71 @@ namespace OASystem.Domain.Entities.Customer
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int DataId { get; set; } = 0;
+
+        /// <summary>
+        /// 模块名称
+        /// </summary>
+        public string? ControllerName { get; set; }
+
+        /// <summary>
+        /// 方法名称
+        ///</summary>
+        public string? ActionName { get; set; }
+
+
+        /// <summary>
+        /// 执行状态
+        /// </summary>
+        public string? Status { get; set; }
+
+        /// <summary>
+        /// IP地址
+        /// </summary>
+        public string? RemoteIp { get; set; }
+
+        /// <summary>
+        /// 登录地点
+        /// </summary>
+        public string? Location { get; set; }
+
+        /// <summary>
+        /// 浏览器
+        /// </summary>
+        public string? Browser { get; set; }
+
+        /// <summary>
+        /// 操作系统
+        /// </summary>
+        public string? Os { get; set; }
+
+        /// <summary>
+        /// 操作用时
+        /// </summary>
+        public long? Elapsed { get; set; }
+
+        ///// <summary>
+        ///// 请求地址
+        ///// </summary>
+        //public string? RequestUrl { get; set; }
+
+        /// <summary>
+        /// 请求参数
+        /// </summary>
+        public string? RequestParam { get; set; }
+
+        /// <summary>
+        /// 返回结果
+        /// </summary>
+        public string? ReturnResult { get; set; }
+
+        /// <summary>
+        /// 更新前数据
+        /// </summary>
+        public string UpdatePreData { get; set; }
+
+        /// <summary>
+        /// 更新后数据
+        /// </summary>
+        public string UpdateBefData { get; set; }
     }
 }

+ 3 - 3
OASystem/OASystem.Domain/Entities/Groups/Grp_CostTypeHotelNumber.cs

@@ -45,9 +45,9 @@ namespace OASystem.Domain.Entities.Groups
 
     }
 
-    /// <summary>
-    /// 分段类型枚举
-    /// </summary>
+    ///// <summary>
+    ///// 分段类型枚举
+    ///// </summary>
     //public enum GrouopCostType
     //{
     //    Default, A, B

+ 3 - 3
OASystem/OASystem.Domain/Entities/Groups/Grp_ScheduleInfo.cs

@@ -27,9 +27,9 @@ namespace OASystem.Domain.Entities.Groups
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public GrpSchedulePrimaryStepEnum PrimaryStep { get; set; }
 
-        /// <summary>
-        /// 当前子流程
-        /// </summary>
+        ///// <summary>
+        ///// 当前子流程
+        ///// </summary>
         //[SugarColumn(IsNullable = true, ColumnDataType = "int")]
         //public int DetailStep { get; set; }
 

+ 4 - 4
OASystem/OASystem.Domain/Entities/Resource/Air_TicketBlackCode.cs

@@ -33,13 +33,13 @@ namespace OASystem.Domain.Entities.Resource
         [SugarColumn(IsNullable = true, ColumnDataType = "varchar(800)")]
         public string ReturnCode { get; set; }
         /// <summary>
-        ///  报价
-        /// <summary>
+        /// 报价
+        /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "varchar(200)")]
         public string Price { get; set; }
         /// <summary>
-        ///  最新报价
-        /// <summary>
+        /// 最新报价
+        /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "varchar(200)")]
         public string NowPrice { get; set; }
         /// <summary>

+ 6 - 2
OASystem/OASystem.Domain/Enums/MonthEnum.cs

@@ -79,8 +79,12 @@ namespace OASystem.Domain.Enums
         public static string GetDescription(this Enum val)
         {
             var field = val.GetType().GetField(val.ToString());
-            var customAttribute = Attribute.GetCustomAttribute(field, typeof(DescriptionAttribute));
-            return customAttribute == null ? val.ToString() : ((DescriptionAttribute)customAttribute).Description;
+            if (field != null)
+            {
+                var customAttribute = Attribute.GetCustomAttribute(field, typeof(DescriptionAttribute));
+                return customAttribute == null ? val.ToString() : ((DescriptionAttribute)customAttribute).Description;
+            }
+            return string.Empty;
         }
     }
 }

+ 5 - 0
OASystem/OASystem.Domain/Enums/OperationEnum.cs

@@ -62,5 +62,10 @@ namespace OASystem.Domain.Enums
         /// </summary>
         [Description("批量指派")]
         BatchAssignment = 9,
+        /// <summary>
+        /// 登录
+        /// </summary>
+        [Description("登录")]
+        Login = 9,
     }
 }

+ 8 - 0
OASystem/OASystem.Domain/OASystem.Domain.csproj

@@ -7,6 +7,14 @@
     <GenerateDocumentationFile>True</GenerateDocumentationFile>
   </PropertyGroup>
 
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
+    <NoWarn>1701;1702;1591;8618;1570;8603;8604;8602;8600;0168;8601;1998;</NoWarn>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
+    <NoWarn>1701;1702;1591;8618;1570;8603;8604;8602;8600;0168;8601;1998;</NoWarn>
+  </PropertyGroup>
+
   <ItemGroup>
     <None Include="..\.editorconfig" Link=".editorconfig" />
   </ItemGroup>

+ 19 - 15
OASystem/OASystem.Domain/ViewModels/Financial/Fin_DailyFeePaymentView.cs

@@ -583,9 +583,9 @@ namespace OASystem.Domain.ViewModels.Financial
 
         //public int IsDel { get; set; }
 
-        /// <summary>
-        /// 示例:费用名称:[2024.07.11招商信用卡还款]   单价:[20000.00]   数量:[1.00]   小计:[20000.00]   备注:[]
-        /// </summary>
+        ///// <summary>
+        ///// 示例:费用名称:[2024.07.11招商信用卡还款]   单价:[20000.00]   数量:[1.00]   小计:[20000.00]   备注:[]
+        ///// </summary>
         //public string ViewStr
         //{
         //    get
@@ -771,6 +771,7 @@ namespace OASystem.Domain.ViewModels.Financial
         /// <param name="year"></param>
         /// <param name="month"></param>
         /// <param name="quantity"></param>
+        /// <param name="aitTicketInfos"></param>
         /// <param name="linkGroupIds"></param>
         public AirTicketReturnView(int year, int month, int quantity, List<AitTicketInfo> aitTicketInfos, List<int> linkGroupIds)
         {
@@ -806,6 +807,7 @@ namespace OASystem.Domain.ViewModels.Financial
         /// <param name="year"></param>
         /// <param name="month"></param>
         /// <param name="quantity"></param>
+        /// <param name="cityData"></param>
         /// <param name="linkGroupIds"></param>
         public AirTicketCityReturnView(int year, int month, int quantity, List<AirTicketCityInfo> cityData, List<int> linkGroupIds)
             : base(year, month, quantity, linkGroupIds)
@@ -1261,12 +1263,13 @@ namespace OASystem.Domain.ViewModels.Financial
         /// <summary>
         /// 构造函数
         /// </summary>
-        /// <param name="year"></param>
-        /// <param name="month"></param>
-        /// <param name="thisAmount"></param>
-        /// <param name="lastAmount"></param>
-        /// <param name="thisIds"></param>
-        /// <param name="lastIds"></param>
+        /// <param name="feeId"></param>
+        /// <param name="feeName"></param>
+        /// <param name="currPeriodFee"></param>
+        /// <param name="samePeriodFee"></param>
+        /// <param name="currPeriodGroupTotal"></param>
+        /// <param name="samePeriodGroupTotal"></param>
+        /// <param name="subFeeData"></param>
         public StatisticsOPYOY(int feeId, string feeName, decimal currPeriodFee, decimal samePeriodFee,
            int currPeriodGroupTotal ,int samePeriodGroupTotal, StatisticsOPSubFeeYOY[] subFeeData)
         {
@@ -1295,12 +1298,13 @@ namespace OASystem.Domain.ViewModels.Financial
         /// <summary>
         /// 构造函数
         /// </summary>
-        /// <param name="year"></param>
-        /// <param name="month"></param>
-        /// <param name="thisAmount"></param>
-        /// <param name="lastAmount"></param>
-        /// <param name="thisIds"></param>
-        /// <param name="lastIds"></param>
+        /// <param name="feeId"></param>
+        /// <param name="feeName"></param>
+        /// <param name="currPeriodFee"></param>
+        /// <param name="samePeriodFee"></param>
+        /// <param name="currPeriodGroupTotal"></param>
+        /// <param name="samePeriodGroupTotal"></param>
+        /// <param name="cityData"></param>
         public StatisticsOPSubFeeYOY(int feeId, string feeName, decimal currPeriodFee, decimal samePeriodFee,
            int currPeriodGroupTotal, int samePeriodGroupTotal, StatisticsOPCityYOY[] cityData)
         {

+ 281 - 1
OASystem/OASystem.Domain/ViewModels/Groups/EnterExitCostDraftView.cs

@@ -1,4 +1,5 @@
 using OASystem.Domain.Dtos;
+using OASystem.Domain.Dtos.Groups;
 using OASystem.Domain.Entities.Groups;
 using System;
 using System.Collections.Generic;
@@ -284,7 +285,7 @@ namespace OASystem.Domain.ViewModels.Groups
         /// <summary>
         /// 出入境国家费用标准 - 城市
         /// </summary>
-        public string? City { get; set; }
+        public string City { get; set; }
 
         ///// <summary>
         ///// 地名
@@ -436,4 +437,283 @@ namespace OASystem.Domain.ViewModels.Groups
     /// </summary>
     public class EnterExitCostDraftSubItemDelDto : DelBaseDto
     { }
+
+
+    #region 移动端 草稿
+
+    #region Info Parent View
+
+    public class DayAndCostDraftMobileInfoView
+    {
+        public int SubId { get; set; }
+
+        public int ParentId { get; set; }
+
+        public int Type { get; set; }
+
+        public int Days { get; set; }
+
+        public int NationalTravelFeeId { get; set; }
+
+        public string Arae { get; set; }
+
+        public decimal Cost { get; set; }
+
+        public int Currency { get; set; }
+
+        public string CurrencyName { get; set; }
+
+        public decimal SubTotal { get; set; }
+    }
+
+    public class DayOtherPriceDraftMobileInfoView
+    {
+        public int SubId { get; set; }
+
+        public int ParentId { get; set; }
+
+        public int Index { get; set; }
+
+        public int SetDataId { get; set; }
+
+        public string SetDataName { get; set; }
+
+        public decimal Cost { get; set; }
+
+        public int Currency { get; set; }
+
+        public string CurrencyName { get; set; }
+
+        public decimal SubTotal { get; set; }
+        public string Remark { get; set; }
+    }
+
+
+    public class EnterExitCostDraftMobileParentInfoView
+    {
+        public int Id { get; set; }
+
+
+        #region 汇率币种
+
+        /// <summary>
+        ///  多个币种存储
+        ///  存储方式: 美元(USD):6.2350|.......|墨西哥比索(MXN):1.0000
+        /// </summary>
+        public List<CurrencyInfo> Currencys { get; set; } = new List<CurrencyInfo> { };
+
+        #endregion
+
+        #region 1:境内费用(其他费用)
+        /// <summary>
+        ///  境内费用(其他费用)选择框
+        /// </summary>
+        public int ChoiceOne { get; set; }
+
+        /// <summary>
+        /// 境内费用(其他费用) 合计
+        /// </summary>
+        public decimal ChoiceOneTotalCost { get; set; }
+
+        #endregion
+
+        #region 2:国际旅费
+        /// <summary>
+        ///  国际旅费合计选择框 (经济舱)
+        /// </summary>
+        public int ChoiceTwoJJ { get; set; }
+
+        /// <summary>
+        /// 国际旅费合计(经济舱)
+        /// </summary>
+        public decimal OutsideJJPay { get; set; }
+
+        /// <summary>
+        ///  国际旅费合计选择框(公务舱)
+        /// </summary>
+        public int ChoiceTwoGW { get; set; }
+
+        /// <summary>
+        ///  国际旅费合计(公务舱)
+        /// </summary>
+        public decimal OutsideGWPay { get; set; }
+
+        /// <summary>
+        ///  国际旅费合计选择框(头等舱)
+        /// </summary>
+        public int ChoiceTwoTD { get; set; }
+
+        /// <summary>
+        /// 国际旅费合计(头等舱)
+        /// </summary>
+        public decimal OutsideTDPay { get; set; }
+
+        #endregion
+
+        #region 3:住宿费
+        /// <summary>
+        /// 住宿费合计 选择框
+        /// </summary>
+        public int ChoiceThree { get; set; }
+
+        /// <summary>
+        /// 住宿费合计
+        /// </summary>
+        public decimal ChoiceThreeTotalCost { get; set; }
+
+
+        #endregion
+
+        #region 4:伙食费
+        /// <summary>
+        ///  伙食费合计 选择框
+        /// </summary>
+        public int ChoiceFour { get; set; }
+
+        /// <summary>
+        /// 伙食费合计
+        /// </summary>
+        public decimal ChoiceFourTotalCost { get; set; }
+
+
+        #endregion
+
+        #region 5:公杂费
+        /// <summary>
+        ///  公杂费合计 选择框
+        /// </summary>
+        public int ChoiceFive { get; set; }
+
+        /// <summary>
+        /// 公杂费合计
+        /// </summary>
+        public decimal ChoiceFiveTotalCost { get; set; }
+
+
+        #endregion
+
+        #region 6:培训费
+
+        /// <summary>
+        ///  培训费用选择框
+        /// </summary>
+        public int ChoiceSix { get; set; }
+
+        /// <summary>
+        /// 公杂费合计
+        /// </summary>
+        public decimal ChoiceSixTotalCost { get; set; }
+
+        #endregion
+
+        #region 7:其他
+        /// <summary>
+        /// 其他款项 选择框
+        /// </summary>
+        public int OtherExpenses_Checked { get; set; }
+
+        /// <summary>
+        /// 其他款项 选择框
+        /// </summary>
+        public decimal OtherExpensesTotalCost { get; set; }
+
+        #endregion
+
+        /// <summary>
+        /// 经济舱费用总计
+        /// </summary>
+        public decimal TouristClassTotalCost
+        {
+            get
+            {
+                return OutsideJJPay <= 0 ? 0.00M : OutsideJJPay + ChoiceOneTotalCost + ChoiceThreeTotalCost + ChoiceFourTotalCost + ChoiceFiveTotalCost + ChoiceSixTotalCost + OtherExpensesTotalCost;
+            }
+        }
+
+        /// <summary>
+        /// 公务舱费用总计
+        /// </summary>
+        public decimal BusinessClassTotalCost
+        {
+            get
+            {
+                return OutsideGWPay <= 0 ? 0.00M : OutsideGWPay + ChoiceOneTotalCost + ChoiceThreeTotalCost + ChoiceFourTotalCost + ChoiceFiveTotalCost + ChoiceSixTotalCost + OtherExpensesTotalCost;
+            }
+        }
+
+        /// <summary>
+        /// 头等舱费用总计
+        /// </summary>
+        public decimal FirstClassTotalCost
+        {
+            get
+            {
+                return OutsideTDPay <= 0 ? 0.00M : OutsideTDPay + ChoiceOneTotalCost + ChoiceThreeTotalCost + ChoiceFourTotalCost + ChoiceFiveTotalCost + ChoiceSixTotalCost + OtherExpensesTotalCost;
+            }
+        }
+    }
+
+    /// <summary>
+    /// 出入境费用详情 Dto
+    /// </summary>
+    public class EnterExitCostDraftInfobyDiIdDto : PortDtoBase
+    {
+        /// <summary>
+        /// 团组Id
+        /// </summary>
+        public int DraftId { get; set; }
+
+        public int CurrUserId { get; set; }
+    }
+
+    public class PostEnterExitCostDraftMobileSubInfoDto : EnterExitCostDraftInfobyDiIdDto
+    {
+        /// <summary>
+        /// 费用项Type
+        /// 1:境内费用 2:国际旅费 3:住宿费 4:伙食费 5:公杂费 6:培训费 7:其他
+        /// </summary>
+        public int SubType { get; set; }
+    }
+
+    public class ChoiceDraftMobileSubInfo3To6View
+    {
+        /// <summary>
+        /// 主表Id
+        /// </summary>
+        public int ParentId { get; set; }
+        /// <summary>
+        /// 住宿费合计 选择框
+        /// </summary>
+        public int Choice { get; set; }
+
+        /// <summary>
+        /// 住宿费合计
+        /// </summary>
+        public decimal TotalCost { get; set; }
+
+        public DayAndCostDraftMobileInfoView[] Details { get; set; }
+    }
+    public class ChoiceSevenDraftMobileSubInfoView
+    {
+        /// <summary>
+        /// 主表Id
+        /// </summary>
+        public int ParentId { get; set; }
+
+        /// <summary>
+        /// 其他款项 选择框
+        /// </summary>
+        public int OtherExpenses_Checked { get; set; }
+
+        /// <summary>
+        /// 其他款项 选择框
+        /// </summary>
+        public decimal OtherExpensesTotalCost { get; set; }
+
+        public DayOtherPriceDraftMobileInfoView[] Details { get; set; }
+    }
+    #endregion
+
+    #endregion
+
 }

+ 17 - 8
OASystem/OASystem.Domain/ViewModels/Groups/EnterExitCostView.cs

@@ -471,6 +471,16 @@ namespace OASystem.Domain.ViewModels.Groups
 
     #region 移动端
 
+    public class EnterExitCostMobileGroupView
+    {
+        public int Id { get; set; }
+        public string GroupName { get; set; }
+        public bool IsNull { get; set; }
+        public bool IsEdit { get; set; }
+        public bool IsView { get; set; }
+    }
+
+
     #region info View
     public class EnterExitCostMobileInfoView
     {
@@ -546,7 +556,7 @@ namespace OASystem.Domain.ViewModels.Groups
         /// <summary>
         /// 住宿费子项 Data
         /// </summary>
-        public DayAndCostMobileInfoView[]? ChoiceThreeDetails { get; set; }
+        public DayAndCostMobileInfoView[] ChoiceThreeDetails { get; set; }
 
         #endregion
 
@@ -564,7 +574,7 @@ namespace OASystem.Domain.ViewModels.Groups
         /// <summary>
         /// 伙食费子项Data
         /// </summary>
-        public DayAndCostMobileInfoView[]? ChoiceFourDetails { get; set; }
+        public DayAndCostMobileInfoView[] ChoiceFourDetails { get; set; }
 
         #endregion
 
@@ -582,7 +592,7 @@ namespace OASystem.Domain.ViewModels.Groups
         /// <summary>
         /// 公杂费子项Data
         /// </summary>
-        public DayAndCostMobileInfoView[]? ChoiceFiveDetails { get; set; }
+        public DayAndCostMobileInfoView[] ChoiceFiveDetails { get; set; }
 
         #endregion
 
@@ -601,7 +611,7 @@ namespace OASystem.Domain.ViewModels.Groups
         /// <summary>
         /// 培训费子项Data
         /// </summary>
-        public DayAndCostMobileInfoView[]? ChoiceSixDetails { get; set; }
+        public DayAndCostMobileInfoView[] ChoiceSixDetails { get; set; }
         #endregion
 
         #region 7:其他
@@ -1025,11 +1035,10 @@ namespace OASystem.Domain.ViewModels.Groups
 
     #endregion
 
-    #endregion
-
-
 
+    #endregion
 
+   
     /// <summary>
     /// 出入境国家(城市)费用标准子项Info  View
     /// </summary>
@@ -1084,7 +1093,7 @@ namespace OASystem.Domain.ViewModels.Groups
         /// <summary>
         /// 出入境国家费用标准 - 城市
         /// </summary>
-        public string? City { get; set; }
+        public string City { get; set; }
 
         ///// <summary>
         ///// 地名

+ 1 - 1
OASystem/OASystem.Domain/ViewModels/PersonnelModule/TaskAllocationView.cs

@@ -28,7 +28,7 @@ namespace OASystem.Domain.ViewModels.PersonnelModule
         /// <summary>
         /// 任务名称 Items
         /// </summary>
-        public List<string>? TaskNameInfos { get; set; }
+        public List<string?>? TaskNameInfos { get; set; }
 
         /// <summary>
         /// 执行任务人员信息 Items

+ 8 - 2
OASystem/OASystem.Domain/ViewModels/PersonnelModule/WageSheetView.cs

@@ -364,13 +364,15 @@ namespace OASystem.Domain.ViewModels.PersonnelModule
         /// <summary>
         /// 
         /// </summary>
-        public int Id { get; set; }
+        public new int Id { get; set; }
 
         /// <summary>
         /// 年月
         /// </summary>
+#pragma warning disable CS0108 // 成员隐藏继承的成员;缺少关键字 new
         public string? YearMonth { get; set; }
 
+
         /// <summary>
         /// 工资日期 起
         /// </summary>
@@ -390,7 +392,7 @@ namespace OASystem.Domain.ViewModels.PersonnelModule
         /// 员工Id
         /// </summary>
         public int UserId { get; set; }
-
+#pragma warning restore CS0108 // 成员隐藏继承的成员;缺少关键字 new
         /// <summary>
         /// 员工Name
         /// </summary>
@@ -410,12 +412,14 @@ namespace OASystem.Domain.ViewModels.PersonnelModule
         /// <summary>
         /// 实发合计(税后工资)
         /// </summary>
+#pragma warning disable CS0108 // 成员隐藏继承的成员;缺少关键字 new
         public decimal TotalRealHair { get; set; }
 
         /// <summary>
         /// 最后操作人
         /// </summary>
         public int LastUpdateUserId { get; set; }
+#pragma warning restore CS0108 // 成员隐藏继承的成员;缺少关键字 new
 
         /// <summary>
         /// 员工Name
@@ -425,7 +429,9 @@ namespace OASystem.Domain.ViewModels.PersonnelModule
         /// <summary>
         /// 最后操作时间
         /// </summary>
+#pragma warning disable CS0108 // 成员隐藏继承的成员;缺少关键字 new
         public DateTime? LastUpdateDt { get; set; }
+#pragma warning restore CS0108 // 成员隐藏继承的成员;缺少关键字 new
     }
 
     /// <summary>

+ 1 - 1
OASystem/OASystem.Domain/ViewModels/QiYeWeChat/Access_TokenView.cs

@@ -14,7 +14,7 @@ namespace OASystem.Domain.ViewModels.QiYeWeChat
         /// <summary>
         /// 获取到的凭证,最长为512字节
         /// </summary>
-        public string access_token { get; set; } = null;
+        public string access_token { get; set; } 
 
         /// <summary>
         /// 凭证的有效时间(秒)

+ 6 - 3
OASystem/OASystem.Domain/ViewModels/QiYeWeChat/ApprovalDataView.cs

@@ -890,10 +890,13 @@ namespace OASystem.Domain.ViewModels.QiYeWeChat
         {
             get
             {
-                if (id == "checkin-time" && value != null)
+                if (id == "checkin-time")
                 {
-                    long timeSpan = long.Parse(value.ToString()) / 1000;
-                    return new DateTime(timeSpan * 10000000 + 621355968000000000L).ToLocalTime();
+                    if (value != null)
+                    {
+                        long timeSpan = long.Parse(value.ToString()) / 1000;
+                        return new DateTime(timeSpan * 10000000 + 621355968000000000L).ToLocalTime();
+                    }
                 }
 
                 return null;

+ 1 - 1
OASystem/OASystem.Domain/ViewModels/Resource/InvitationOfficialActivityDataView.cs

@@ -148,7 +148,7 @@ namespace OASystem.Domain.ViewModels.Resource
                         urls.Add(@$"{filePath}{str}");
                     }
                 }
-                catch (Exception ex)
+                catch (Exception)
                 {
                     urls.Add(@$"{filePath}{SndFileName}");
                 }

+ 21 - 3
OASystem/OASystem.Domain/ViewModels/Statistics/CorporateProfitViews.cs

@@ -98,15 +98,33 @@ namespace OASystem.Domain.ViewModels.Statistics
         /// <summary>
         /// 收款合计
         /// </summary>
-        public decimal CollectionTotal { get { return ReceivedAmount - RefundedAmount; } }
+        public decimal CollectionTotal
+        {
+            get
+            {
+                return ReceivedAmount - RefundedAmount; 
+            }
+        }
         /// <summary>
         /// 成本合计
         /// </summary>
-        public decimal CostTotal { get { return HotelAmount + LocalGuideAmount + AirTicketAmount + VisaAmount + OAAmount + InsureAmount + OtherAmount; } }
+        public decimal CostTotal
+        {
+            get
+            {
+                return HotelAmount + LocalGuideAmount + AirTicketAmount + VisaAmount + OAAmount + InsureAmount + OtherAmount;
+            }
+        }
         /// <summary>
         /// 利润合计
         /// </summary>
-        public decimal ProfitTotal { get { return CollectionTotal - CostTotal; } }
+        public decimal ProfitTotal
+        {
+            get
+            {
+                return CollectionTotal - CostTotal;
+            }
+        }
     }
 
     public class CorporateProfitItem

+ 8 - 0
OASystem/OASystem.Infrastructure/OASystem.Infrastructure.csproj

@@ -6,6 +6,14 @@
     <Nullable>enable</Nullable>
   </PropertyGroup>
 
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
+    <NoWarn>1701;1702;1591;8618;1570;8603;8604;8602;8600;0168;8601;1998;</NoWarn>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
+    <NoWarn>1701;1702;1591;8618;1570;8603;8604;8602;8600;0168;8601;1998;</NoWarn>
+  </PropertyGroup>
+
   <ItemGroup>
     <PackageReference Include="Autofac" Version="6.4.0" />
     <PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />

+ 2 - 2
OASystem/OASystem.Infrastructure/Repositories/CRM/NewClientDataRepository.cs

@@ -1005,7 +1005,7 @@ namespace OASystem.Infrastructure.Repositories.CRM
 
             if (string.IsNullOrWhiteSpace(dto.PassportDate))
             {
-                dto.PassportDate = null;
+                dto.PassportDate = string.Empty;
             }
 
             var newClientDataUnEncrypted = _mapper.Map<Crm_NewClientData>(dto);
@@ -1544,7 +1544,7 @@ namespace OASystem.Infrastructure.Repositories.CRM
                 #endregion
 
                 var NewClientDataView = new List<NewClientDataExcelDownloadView>();
-                var count = 0;
+                //var count = 0;
                 string contact = dto.Contact, location = dto.Location, clientDto = dto.Client;
 
                 var isSelectSearch = false;

+ 1 - 1
OASystem/OASystem.Infrastructure/Repositories/Financial/DailyFeePaymentRepository.cs

@@ -62,7 +62,7 @@ namespace OASystem.Infrastructure.Repositories.Financial
             var priceTypeData = setTypeData.Where(s => typeIds.Contains(s.Id)).ToList();
             var priceSubTypeData = setData.Where(s => typeIds.Contains(s.STid)).ToList();
 
-            var isEnable = false;
+            //var isEnable = false;
             //员工姓名列表
             var userData = _sqlSugar.Queryable<Sys_Users>()
                 .LeftJoin<Sys_Department>((u, d) => u.DepId == d.Id)

+ 2 - 2
OASystem/OASystem.Infrastructure/Repositories/Groups/DelegationInfoRepository.cs

@@ -178,7 +178,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
         /// </summary>
         /// <param name="teamName"></param>
         /// <returns></returns>
-        public string FormartTeamName(string teamName) 
+        public string FormartTeamName(string? teamName) 
         {
             string str = "";
             if (!string.IsNullOrEmpty(teamName))
@@ -236,7 +236,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 int startIndex = (dto.PageIndex - 1) * dto.PageSize + 1;
                 int endIndex = startIndex + dto.PageSize - 1;
 
-                int taskUserId = -1;
+                //int taskUserId = -1;
                 string taskGroupIds = string.Empty;
                 #region 处理用户团组操作权限
                 if (dto.UserId != -1)

+ 43 - 3
OASystem/OASystem.Infrastructure/Repositories/Groups/EnterExitCostDraftRepository.cs

@@ -50,21 +50,61 @@ namespace OASystem.Infrastructure.Repositories.Groups
         /// <param name="groupId">草稿Id</param>
         /// <param name="permission">操作权限 1:查看;2:新增;3:编辑;4:删除;5:下载; </param>
         /// <returns></returns>
-        public async Task<bool> PermissionValidationAsync(int groupId, int userId, int permission=1)
+        public async Task<bool> PermissionValidationAsync(int darftId, int userId, int permission=1)
         {
             //参数验证
-            if (groupId < 1) return false;
+            if (darftId < 1) return false;
             var permissionIds = new List<int>() { 1, 2, 3, 4, 5 };
             if (!permissionIds.Contains(permission)) return false;
 
             var info = await _sqlSugar.Queryable<Grp_EnterExitCostDraftPermission>()
-                     .Where(it => it.DraftId == groupId && it.UserId == userId && it.Permission == permission)
+                     .Where(it => it.DraftId == darftId && it.UserId == userId && it.Permission == permission)
                      .FirstAsync();
             if (info != null) return true;
 
             return false;
         }
 
+        /// <summary>
+        /// 移动端操作权限验证
+        /// </summary>
+        /// <param name="groupId"></param>
+        /// <param name="currUserId"></param>
+        /// <param name="permissionType">1 查看 2 编辑</param>
+        /// <returns></returns>
+        public async Task<(bool, string)> MobilePermissionsValidationAsync(int id, int currUserId, int permissionType = 1)
+        {
+            bool status = false;
+            string msg = string.Empty;
+
+            var enterExitCostData = await _sqlSugar.Queryable<Grp_EnterExitCostDraft>().OrderByDescending(x => x.CreateTime).FirstAsync(it => it.Id == id && it.IsDel == 0);
+            if (permissionType == 1)
+            {
+                status = await PermissionValidationAsync(id, currUserId);//查看权限
+                if (enterExitCostData.CreateUserId == currUserId) status = true; //查看权限
+                if (!status)
+                {
+                    var setUserName = await _sqlSugar.Queryable<Sys_Users>().Where(x => x.Id == enterExitCostData.CreateUserId).Select(x => x.CnName).FirstAsync();
+
+                    msg = $"{setUserName}设置了你不能查看当前团组的出入境费用明细数据,如要查看,请联系{setUserName}!";
+                }
+                return (status, msg);
+            }
+            else if (permissionType == 2)
+            {
+                if (enterExitCostData.CreateUserId == currUserId) status = true; //编辑权限
+                if (!status)
+                {
+                    var setUserName = await _sqlSugar.Queryable<Sys_Users>().Where(x => x.Id == enterExitCostData.CreateUserId).Select(x => x.CnName).FirstAsync();
+
+                    msg = $"您没有编辑权限,“{setUserName}”才可编辑!";
+                }
+                return (status, msg);
+
+            }
+            else msg = $"请传入正确的权限验证类型!";
+            return (status, msg);
+        }
 
         /// <summary>
         /// 查询 根据 Id 查询

+ 44 - 3
OASystem/OASystem.Infrastructure/Repositories/Groups/EnterExitCostRepository.cs

@@ -100,6 +100,48 @@ namespace OASystem.Infrastructure.Repositories.Groups
             return result;
         }
 
+        /// <summary>
+        /// 移动端操作权限验证
+        /// </summary>
+        /// <param name="groupId"></param>
+        /// <param name="currUserId"></param>
+        /// <param name="permissionType">1 查看 2 编辑</param>
+        /// <returns></returns>
+        public async Task<(bool, string)> MobilePermissionsValidationAsync(int groupId,int currUserId,int permissionType = 1)
+        {
+            bool status = false;
+            string msg = string.Empty;
+
+            var enterExitCostData = await _sqlSugar.Queryable<Grp_EnterExitCost>().OrderByDescending(x => x.CreateTime).FirstAsync(it => it.DiId == groupId && it.IsDel == 0);
+            if (permissionType == 1)
+            {
+                status = await PermissionValidationAsync(groupId, currUserId);//查看权限
+                if (enterExitCostData.CreateUserId == currUserId) status = true; //查看权限
+                if (!status)
+                {
+                    var setUserName = await _sqlSugar.Queryable<Sys_Users>().Where(x => x.Id == enterExitCostData.CreateUserId).Select(x => x.CnName).FirstAsync();
+
+                    msg = $"{setUserName}设置了你不能查看当前团组的出入境费用明细数据,如要查看,请联系{setUserName}!";
+                }
+                return (status, msg);
+            }
+            else if (permissionType == 2)
+            {
+                if (enterExitCostData.CreateUserId == currUserId) status = true; //编辑权限
+                if (!status)
+                {
+                    var setUserName = await _sqlSugar.Queryable<Sys_Users>().Where(x => x.Id == enterExitCostData.CreateUserId).Select(x => x.CnName).FirstAsync();
+
+                    msg = $"您没有编辑权限,“{setUserName}”才可编辑!";
+                }
+                return (status, msg);
+
+            }
+            else msg = $"请传入正确的权限验证类型!";
+            return (status, msg);
+        }
+
+
         /// <summary>
         /// 查询 根据 Diid 查询
         /// </summary>
@@ -488,7 +530,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
         /// </summary>
         /// <param name="dto"></param>
         /// <returns></returns>
-        public async Task<Result> PostEnterExitCostSubItemDel(EnterExitCostSubItemDelDto dto)
+        public Task<Result> PostEnterExitCostSubItemDel(EnterExitCostSubItemDelDto dto)
         {
             Result result = new Result();
 
@@ -505,7 +547,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
             if (del > 0) result.Code = 0;
             else result.Msg = string.Format("删除失败!");
 
-            return result;
+            return Task.FromResult(result);
         }
 
         /// <summary>
@@ -565,7 +607,6 @@ namespace OASystem.Infrastructure.Repositories.Groups
             return result;
         }
 
-
         /// <summary>
         /// 一键清空
         /// 删除主表数据 Update

+ 2 - 2
OASystem/OASystem.Infrastructure/Repositories/Groups/TourClientListRepository.cs

@@ -667,7 +667,7 @@ WHERE
                         Sex = item.Sex,
                         Phone = item.Phone
                     };
-                    string temp_birthDay = "";
+                    //string temp_birthDay = "";
                     DateTime tempDt_Birthday;
                     bool b_birth = DateTime.TryParse(item.BirthDay, out tempDt_Birthday);
                     _DeleClientInfo.BirthDay = b_birth ? tempDt_Birthday : null;
@@ -736,7 +736,7 @@ WHERE
                         Sex = item.Sex,
                         Phone = item.Phone
                     };
-                    string temp_birthDay = "";
+                    //string temp_birthDay = "";
                     DateTime tempDt_Birthday;
                     bool b_birth = DateTime.TryParse(item.BirthDay, out tempDt_Birthday);
                     _DeleClient.BirthDay = b_birth ? tempDt_Birthday : null;

+ 1 - 1
OASystem/OASystem.Infrastructure/Repositories/Groups/VisaFeeInfoRepository.cs

@@ -81,7 +81,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
                 if (countrys.Count > 0)
                 {
-                    int dataRow = 0;
+                    //int dataRow = 0;
 
                     foreach (var country in countrys)
                     {

+ 1 - 1
OASystem/OASystem.Infrastructure/Repositories/PersonnelModule/TaskAllocationRepository.cs

@@ -69,7 +69,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
                 }
 
                 //任务名称
-                List<string> _TaskNameInfos = new List<string>();
+                List<string?> _TaskNameInfos = new List<string?>();
                 _TaskNameInfos = _sqlSugar.Queryable<Pm_TaskAllocation, Pm_TaskRelevanceUser>((ta, tau) => new JoinQueryInfos(JoinType.Left, ta.Id == tau.TAId))
                                           .Where((ta, tau) => ta.IsDel == 0 && tau.IsDel == 0)
                                           .Where((ta, tau) => ta.CreateUserId == userId || tau.UserId == userId)

+ 3 - 7
OASystem/OASystem.Infrastructure/Tools/CommonFun.cs

@@ -164,10 +164,7 @@ public static class CommonFun
     }
     public static string GetIP(HttpRequest request)
     {
-        if (request == null)
-        {
-            return "";
-        }
+        if (request == null) return "";
 
         var ip = request.Headers["X-Real-IP"].FirstOrDefault();
         if (ip.IsNull())
@@ -366,11 +363,10 @@ public static class CommonFun
     /// </summary>
     /// <param name="rates"></param>
     /// <returns></returns>
-    public static string  GetCurrencyChinaToString(List<CurrencyInfo> rates)
+    public static string  GetCurrencyChinaToString(List<CurrencyInfo>? rates)
     {
-        
         string rateStr = string.Empty;
-
+        if (rates == null) return rateStr;
         if (rates.Count <= 0) return rateStr;
 
         if (rates.Count == 1 )

+ 8 - 0
OASystem/OASystem.RedisRepository/OASystem.RedisRepository.csproj

@@ -6,6 +6,14 @@
     <Nullable>enable</Nullable>
   </PropertyGroup>
 
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
+    <NoWarn>1701;1702;1591;8618;1570;8603;8604;8602;8600;</NoWarn>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
+    <NoWarn>1701;1702;1591;8618;1570;8603;8604;8602;8600;</NoWarn>
+  </PropertyGroup>
+
   <ItemGroup>
     <PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
     <PackageReference Include="StackExchange.Redis" Version="2.6.96" />