ソースを参照

APEC赛事支持与客户拜访记录功能优化

- `Grp_GamesBudgetMaster` 增加 Type 字段,区分赛事类型(1.世运会 2.APEC)
- `WorldGamesData` 仅查询 Type=2(APEC)数据
- 注释掉 AirHotelPrice 的团回归30天编辑限制
- 新增 `Crm_NewClientVisitRecord` 实体类及相关字段
- 自动审核逻辑由世运会切换为 APEC,并增加 Type=2 条件
Lyyyi 5 日 前
コミット
75d99dd6c7

+ 23 - 23
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -14434,7 +14434,7 @@ FROM
         [HttpGet]
         [HttpGet]
         public IActionResult WorldGamesData()
         public IActionResult WorldGamesData()
         {
         {
-            var setData = _sqlSugar.Queryable<Grp_GamesBudgetMaster>().Where(x => x.IsDel == 0).ToList();
+            var setData = _sqlSugar.Queryable<Grp_GamesBudgetMaster>().Where(x => x.IsDel == 0 && x.Type == 2).ToList();
             var groupMenu = setData.GroupBy(x => x.T0);
             var groupMenu = setData.GroupBy(x => x.T0);
             var resultArr = new List<DecreasePaymentsWorldGamesDataView>();
             var resultArr = new List<DecreasePaymentsWorldGamesDataView>();
 
 
@@ -31844,29 +31844,29 @@ AirHotelPrice
             #endregion
             #endregion
 
 
             //验证:团回归30天后不能更改
             //验证:团回归30天后不能更改
-            if (_dto.Id > 0)
-            {
-                //// 审核、付款 验证
-                //(bool valid, string msg) = await GeneralMethod.FeeOpValid(_dto.Id, 76);
-                //if (!valid) return Ok(JsonView(false, msg));
-
-                var groupInfo = await _sqlSugar.Queryable<Grp_DelegationInfo>()
-                                        .Where(x => x.Id == _dto.DiId && x.IsDel == 0)
-                                        .FirstAsync();
-                if (groupInfo == null)
-                {
-                    return Ok(JsonView(false, "团组信息不存在"));
-                }
-                // 截止日期:团回归日期+30天
-                var deadline = groupInfo.VisitEndDate.AddDays(30).Date;
-                // 当前日期
-                var currDate = DateTime.Today;
+            //if (_dto.Id > 0)
+            //{
+            //    //// 审核、付款 验证
+            //    //(bool valid, string msg) = await GeneralMethod.FeeOpValid(_dto.Id, 76);
+            //    //if (!valid) return Ok(JsonView(false, msg));
+
+            //    var groupInfo = await _sqlSugar.Queryable<Grp_DelegationInfo>()
+            //                            .Where(x => x.Id == _dto.DiId && x.IsDel == 0)
+            //                            .FirstAsync();
+            //    if (groupInfo == null)
+            //    {
+            //        return Ok(JsonView(false, "团组信息不存在"));
+            //    }
+            //    // 截止日期:团回归日期+30天
+            //    var deadline = groupInfo.VisitEndDate.AddDays(30).Date;
+            //    // 当前日期
+            //    var currDate = DateTime.Today;
 
 
-                if (currDate > deadline)
-                {
-                    return Ok(JsonView(false, "当前日期已超过截止日期(团回归日期+30天),不可编辑。"));
-                }
-            }
+            //    if (currDate > deadline)
+            //    {
+            //        return Ok(JsonView(false, "当前日期已超过截止日期(团回归日期+30天),不可编辑。"));
+            //    }
+            //}
 
 
             JsonView _view = await _hotelPriceRep.AddOrEdit(_dto);
             JsonView _view = await _hotelPriceRep.AddOrEdit(_dto);
             if (_view.Code != 200)
             if (_view.Code != 200)

+ 28 - 0
OASystem/OASystem.Domain/Entities/Customer/Crm_NewClientVisitRecord.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Entities.Customer;
+
+/// <summary>
+/// 客户资料(新)拜访记录(客户信息回收标准)
+/// </summary>
+[SugarTable("Crm_NewClientVisitRecord", "客户资料(新)拜访记录(客户信息回收标准)")]
+public class Crm_NewClientVisitRecord : EntityBase
+{
+    /// <summary>
+    /// 客户资料Id
+    /// </summary>
+    [SugarColumn(ColumnName = "NewClientId", ColumnDescription = "客户资料Id", IsNullable = true, ColumnDataType = "int")]
+    public int NewClientId { get; set; }
+
+    /// <summary>
+    /// 是否有意向
+    /// </summary>
+    public bool HasIntention { get; set; }
+
+    /// <summary>近期是否客户维护</summary>
+    public bool RecentMaintain { get; set; }
+}

+ 11 - 3
OASystem/OASystem.Domain/Entities/Groups/Grp_GamesBudgetMaster.cs

@@ -7,7 +7,7 @@ using System.Threading.Tasks;
 namespace OASystem.Domain.Entities.Groups
 namespace OASystem.Domain.Entities.Groups
 {
 {
     /// <summary>
     /// <summary>
-    /// 世运会成本预算明细‌ Grp_GamesBudgetMaster
+    /// 世运会成本预算明细‌(赛事)
     /// </summary>
     /// </summary>
     [SugarTable(tableName: "Grp_GamesBudgetMaster", tableDescription: "世运会成本预算明细")]
     [SugarTable(tableName: "Grp_GamesBudgetMaster", tableDescription: "世运会成本预算明细")]
     public class Grp_GamesBudgetMaster : EntityBase
     public class Grp_GamesBudgetMaster : EntityBase
@@ -16,7 +16,14 @@ namespace OASystem.Domain.Entities.Groups
         /// 序号(分页查询使用)
         /// 序号(分页查询使用)
         /// </summary>
         /// </summary>
         [SugarColumn(IsIgnore = true)]
         [SugarColumn(IsIgnore = true)]
-        public int RowIndex { get; set; }  
+        public int RowIndex { get; set; }
+
+        /// <summary>
+        /// 赛事类型
+        /// 1.世运会 2.APEC
+        /// </summary>
+        [SugarColumn(ColumnName = "Type", ColumnDescription = "赛事类型", IsNullable = true, ColumnDataType = "int")]
+        public int Type { get; set; }
 
 
         /// <summary>
         /// <summary>
         /// 直属父级
         /// 直属父级
@@ -82,5 +89,6 @@ namespace OASystem.Domain.Entities.Groups
         /// </summary>
         /// </summary>
         [SugarColumn(ColumnName = "LastUpdateTime", ColumnDescription = "最后更新时间", IsNullable = true, ColumnDataType = "varchar(30)")]
         [SugarColumn(ColumnName = "LastUpdateTime", ColumnDescription = "最后更新时间", IsNullable = true, ColumnDataType = "varchar(30)")]
         public string LastUpdateTime { get; set; }
         public string LastUpdateTime { get; set; }
-    }
+    }  
+  
 }
 }

+ 12 - 8
OASystem/OASystem.Infrastructure/Repositories/Groups/DecreasePaymentsRepository.cs

@@ -419,13 +419,15 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
 
                     #endregion
                     #endregion
 
 
-                    #region 世运会自动审核处理
-                    if (dto.DiId == 2590)
+                    #region 由 世运会 切换为 APEC 自动审核处理
+                    // 世运会 2590  APEC 3136
+                    if (dto.DiId == 3136)
                     {
                     {
                         bool isAuto = false;
                         bool isAuto = false;
                         var spPriceName = dto.PriceName.Split('-').ToArray();
                         var spPriceName = dto.PriceName.Split('-').ToArray();
                         var expression = Expressionable.Create<Grp_GamesBudgetMaster>()
                         var expression = Expressionable.Create<Grp_GamesBudgetMaster>()
-                                                        .And(x => x.IsDel == 0);
+                            .And(x => x.IsDel == 0)
+                            .And(x => x.Type == 2);
 
 
                         if (spPriceName.Length >= 2)
                         if (spPriceName.Length >= 2)
                         {
                         {
@@ -495,7 +497,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                                     AuditGMOperate = 4,
                                     AuditGMOperate = 4,
                                     AuditGMDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")
                                     AuditGMDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")
                                 })
                                 })
-                                .Where(a => a.CId == id && a.CTable == 98 && a.DIId == 2590)
+                                .Where(a => a.CId == id && a.CTable == 98 && a.DIId == 3136)
                                 .ExecuteCommand();
                                 .ExecuteCommand();
                             recheck = false;
                             recheck = false;
                         }
                         }
@@ -793,13 +795,15 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
 
                         #endregion
                         #endregion
 
 
-                        #region 世运会自动审核处理
-                        if (dto.DiId == 2590)
+                        #region 由 世运会 切换为 APEC 自动审核处理
+                        // 世运会 2590  APEC 3136
+                        if (dto.DiId == 3136)
                         {
                         {
                             bool isAuto = false;
                             bool isAuto = false;
                             string[] spPriceName = dto.PriceName.Split('-').ToArray();
                             string[] spPriceName = dto.PriceName.Split('-').ToArray();
                             var expression = Expressionable.Create<Grp_GamesBudgetMaster>()
                             var expression = Expressionable.Create<Grp_GamesBudgetMaster>()
-                                                            .And(x => x.IsDel == 0);
+                                                            .And(x => x.IsDel == 0)
+                                                            .And(x => x.Type == 2);
 
 
                             if (spPriceName.Length >= 2)
                             if (spPriceName.Length >= 2)
                             {
                             {
@@ -868,7 +872,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                                         AuditGMOperate = 4,
                                         AuditGMOperate = 4,
                                         AuditGMDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")
                                         AuditGMDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")
                                     })
                                     })
-                                    .Where(a => a.CId == dto.Id && a.CTable == 98 && a.DIId == 2590)
+                                    .Where(a => a.CId == dto.Id && a.CTable == 98 && a.DIId == 3136)
                                     .ExecuteCommand();
                                     .ExecuteCommand();
                                 recheck = false;
                                 recheck = false;
                             }
                             }