浏览代码

更新多个文件,优化方法和注释,新增字段和类

在 `MarketCustomerResourcesController.cs` 文件中:
  * 修改 `InsertDataChen` 方法为 `InsertDataGu`,并更新 SQL 查询条件。
  * 更新 `usersId` 值,从 `359` 改为 `364`。
  * 更新 `toUserList.Count` 判断条件,从 `259` 改为 `327`。
  * 新增 `CloneUserClient` 方法,用于克隆用户客户数据。

在 `NewClientDataQueryDto.cs` 文件中:
  * 新增 `CloneUserClientDto` 类,包含 `UserId` 和 `ToUserId` 属性。

在 `Air_TicketBlackCode.cs` 文件中:
  * 修改多个字段的注释:
    * `Price` 字段从“报价”改为“经济舱现价”。
    * `NowPrice` 字段从“最新报价”改为“公务舱现价”。
    * `BCPrice` 字段从“公务舱单价”改为“公务舱全价”。
    * `ECPrice` 字段从“经济舱单价”改为“经济舱全价”。
  * 新增 `FCPrice` 和 `FCNowPrice` 字段,分别表示头等舱全价和头等舱现价。

在 `NewClientDataRepository.cs` 文件中:
  * 更新 `dic` 字典,增加新的用户 ID:`368`, `364`, `366`, `369`。

在 `TicketBlackCodeRepository.cs` 文件中:
  * 修改 `if` 条件判断,从 `dto.Id != 0 && !string.IsNullOrWhiteSpace(dto.Id.ToString())` 改为 `dto.Id > 0`。
yuanrf 3 月之前
父节点
当前提交
a0eebfb775

+ 24 - 4
OASystem/OASystem.Api/Controllers/MarketCustomerResourcesController.cs

@@ -1018,12 +1018,12 @@ namespace OASystem.API.Controllers
         }
 
         [HttpPost]
-        public IActionResult InsertDataChen()
+        public IActionResult InsertDataGu()
         {
             string sql = @"SELECT  *  FROM  Crm_NewClientData cncd  WHERE  IsDel  = 0 
 	                      AND  Lvlid in (
 		                      select Id  from Sys_SetData where STid = 33 and isdel = 0 
-		                      and (Name like '%重庆%')
+		                      and (Name like '%云%南%' or Name like '%昆%明%')
 	                      )";
 
             var list =  _sqlSugar.SqlQueryable<Crm_NewClientData>(sql).Select(x => x.Id).ToList();
@@ -1037,13 +1037,13 @@ namespace OASystem.API.Controllers
                     CreateTime = DateTime.Now,
                     CreateUserId = 235,
                     NewClientDataId = item,
-                    usersId = 359,
+                    usersId = 364,
                     IsDel = 0,
                 });
             }
 
             var updateCount = 0;
-            if (toUserList.Count == 259)
+            if (toUserList.Count == 327)
             {
                 updateCount =  _sqlSugar.Insertable(toUserList).ExecuteCommand();
             }
@@ -1055,6 +1055,26 @@ namespace OASystem.API.Controllers
 
         }
 
+        [HttpPost]
+        public IActionResult CloneUserClient(CloneUserClientDto dto)
+        {
+            var list = _sqlSugar.Queryable<Crm_ClientDataAndUser>()
+                                 .Where(x => x.IsDel == 0 && x.usersId == dto.UserId)
+                                 .ToList();
+
+            foreach (var item in list)
+            {
+                item.usersId = dto.ToUserId;
+            }
+
+            var count =  _sqlSugar.Insertable<Crm_ClientDataAndUser>(list).ExecuteCommand();
+
+            return Ok(new
+            {
+                count,
+            });
+        }
+
         #endregion
 
         /// <summary>

+ 6 - 0
OASystem/OASystem.Domain/Dtos/CRM/NewClientDataQueryDto.cs

@@ -92,6 +92,12 @@ namespace OASystem.Domain.Dtos.CRM
         public string EndTime { get; set; }
     }
 
+    public class CloneUserClientDto
+    {
+        public int UserId { get; set; }
+
+        public int ToUserId { get; set; }
+    }
     public class NewClientOpDto : PortDtoBase
     {
         /// <summary>

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

@@ -33,26 +33,38 @@ namespace OASystem.Domain.Entities.Resource
         [SugarColumn(IsNullable = true, ColumnDataType = "varchar(800)")]
         public string ReturnCode { get; set; }
         /// <summary>
-        /// 
+        /// 经济舱现
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "varchar(200)")]
         public string Price { get; set; }
         /// <summary>
-        /// 最新报
+        /// 公务舱现
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "varchar(200)")]
         public string NowPrice { get; set; }
         /// <summary>
-        /// 公务舱
+        /// 公务舱
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "decimal(10,2)")]
         public decimal BCPrice { get; set; }
         /// <summary>
-        ///经济舱
+        ///经济舱
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "decimal(10,2)")]
         public decimal ECPrice { get; set; }
 
+        /// <summary>
+        /// 头等舱全价
+        /// </summary>
+
+        public decimal FCPrice { get; set; }
+
+        /// <summary>
+        /// 头等舱现价
+        /// </summary>
+        public decimal FCNowPrice { get; set; }
+
+
         /// <summary>
         /// 行程代码标题
         /// </summary>

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

@@ -1389,7 +1389,7 @@ namespace OASystem.Infrastructure.Repositories.CRM
             var userArr =  _sqlSugar.SqlQueryable<Sys_Users>(sql).ToList();
             var dic = new Dictionary<int, int[]>()
             {
-                { 95, new int []{ 95 , 337 , 302, 350, 355, 357, 353 , 359 , 361 } }
+                { 95, new int []{ 95 , 337 , 302, 350, 355, 357, 353 , 359 , 361, 368, 364, 366, 369 } }
             };
 
             if (dic.Keys.Contains(userid))

+ 1 - 1
OASystem/OASystem.Infrastructure/Repositories/Resource/TicketBlackCodeRepository.cs

@@ -149,7 +149,7 @@ namespace OASystem.Infrastructure.Repositories.Resource
                 AirGroupCostParameterView _AirgroupCostParameter = _mapper.Map<AirGroupCostParameterView>(_GroupCostParameter);
                 Grp_DelegationInfo _DelegationInfo=_sqlSugar.Queryable<Grp_DelegationInfo>().First(a=>a.Id == dto.DiId && a.IsDel==0);//团组信息
                 Air_TicketBlackCode _TicketBlackCode=new Air_TicketBlackCode();
-                if (dto.Id!=0 && !string.IsNullOrWhiteSpace(dto.Id.ToString()))
+                if (dto.Id > 0)
                 {
                     _TicketBlackCode = _sqlSugar.Queryable<Air_TicketBlackCode>().First(a => a.IsDel==0 && a.Id==dto.Id);
                     return result = new Result()