jiangjc hai 10 meses
pai
achega
4ba74e0b61

+ 106 - 78
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -11139,8 +11139,108 @@ namespace OASystem.API.Controllers
         #endregion
 
 
+        //        /// <summary>
+        //        /// 
+        //        /// </summary>
+        //        /// <param name="_dto"></param>
+        //        /// <returns></returns>
+        //        [HttpPost]
+        //        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        //        public async Task<IActionResult> Test_DataChange(PostTourClientListDownloadFile _dto)
+        //        {
+        //            _airTicketResRep.ChangeDataBase(DBEnum.OA2014DB);
+
+        //            string sql = string.Format(@" Select * From Visa With(Nolock) ");
+        //            List<OA2014_Visa> list_visa = _airTicketResRep._sqlSugar.SqlQueryable<OA2014_Visa>(sql).ToList();
+
+        //            _airTicketResRep.ChangeDataBase(DBEnum.OA2023DB);
+        //            Dictionary<string, int> dic_psg = new Dictionary<string, int>();
+        //            dic_psg.Add("客人", 974);
+        //            dic_psg.Add("司机", 975);
+        //            dic_psg.Add("导游", 976);
+        //            dic_psg.Add("公司内部人员", 977);
+        //            dic_psg.Add("司机/导游/公司内部人员", 978);
+
+        //            foreach (var item in list_visa)
+        //            {
+        //                Grp_VisaInfo temp = new Grp_VisaInfo();
+
+        //                temp.Id = item.Id;
+        //                temp.DIId = item.DIId;
+        //                temp.VisaClient = item.VisaClient;
+        //                temp.VisaPrice = Convert.ToDecimal(item.VisaPrice);
+        //                temp.VisaCurrency = item.VisaCurrency;
+
+        //                temp.IsThird = item.IsThird;
+        //                if (dic_psg.ContainsKey(item.PassengerType))
+        //                {
+        //                    temp.PassengerType = dic_psg[item.PassengerType];
+        //                }
+        //                else {
+        //                    temp.PassengerType = -1;
+        //                }
+
+        //                temp.VisaNumber = item.VisaNumber;
+        //                temp.VisaFreeNumber = item.VisaFreeNumber;
+        //                temp.CreateUserId = item.Operators;
+
+        //                DateTime dt_ct;
+        //                bool b_ct = DateTime.TryParse(item.OperatorsDate, out dt_ct);
+        //                if (b_ct)
+        //                {
+        //                    temp.CreateTime = dt_ct;
+        //                }
+        //                else
+        //                {
+        //                    temp.CreateTime = DateTime.Now;
+        //                }
+
+        //                temp.DeleteTime = "";
+        //                temp.DeleteUserId = 0;
+        //                temp.Remark = item.Remark;
+        //                if (string.IsNullOrEmpty(temp.Remark)) {
+        //                    temp.Remark = "";
+        //                }
+
+        //                temp.IsDel = item.IsDel;
+        //                temp.VisaDescription = item.VisaAttachment;
+
+        //                string sqlInsert = string.Format(@" INSERT INTO [dbo].[Grp_VisaInfo]
+
+        //([Id]
+        //           ,[DIId]
+        //           ,[VisaClient]
+        //           ,[VisaPrice]
+        //           ,[VisaCurrency]
+
+        //           ,[IsThird]
+        //           ,[PassengerType]
+        //           ,[VisaNumber]
+        //           ,[VisaFreeNumber]
+        //           ,[CreateUserId]
+
+        //           ,[CreateTime]
+        //           ,[DeleteTime]
+        //           ,[DeleteUserId]
+        //           ,[Remark]
+        //           ,[IsDel]
+        //           ,[visaDescription])
+        //     VALUES
+        //           ({0},{1},'{2}',{3},{4}
+        //,{5},{6},{7},{8},{9}
+        //,'{10}','{11}',{12},'{13}',{14},'{15}') ",temp.Id,temp.DIId,temp.VisaClient,temp.VisaPrice,temp.VisaCurrency,
+        //temp.IsThird,temp.PassengerType,temp.VisaNumber,temp.VisaNumber,temp.CreateUserId,
+        //temp.CreateTime, temp.DeleteTime, temp.DeleteUserId, temp.Remark,temp.IsDel,temp.VisaDescription
+        //);
+        //               await _airTicketResRep.ExecuteCommandAsync(sqlInsert);
+        //            }
+
+
+        //            return Ok(JsonView(true, "操作成功!"));
+        //        }
+
         /// <summary>
-        /// 
+        /// 123132123
         /// </summary>
         /// <param name="_dto"></param>
         /// <returns></returns>
@@ -11154,88 +11254,16 @@ namespace OASystem.API.Controllers
             List<OA2014_Visa> list_visa = _airTicketResRep._sqlSugar.SqlQueryable<OA2014_Visa>(sql).ToList();
 
             _airTicketResRep.ChangeDataBase(DBEnum.OA2023DB);
-            Dictionary<string, int> dic_psg = new Dictionary<string, int>();
-            dic_psg.Add("客人", 974);
-            dic_psg.Add("司机", 975);
-            dic_psg.Add("导游", 976);
-            dic_psg.Add("公司内部人员", 977);
-            dic_psg.Add("司机/导游/公司内部人员", 978);
-
             foreach (var item in list_visa)
             {
-                Grp_VisaInfo temp = new Grp_VisaInfo();
+                var result = await _grpScheduleRep._sqlSugar.Updateable<Grp_VisaInfo>()
+               .SetColumns(it => it.CreateUserId == item.Operator)
+               .Where(s => s.Id == item.Id)
 
-                temp.Id = item.Id;
-                temp.DIId = item.DIId;
-                temp.VisaClient = item.VisaClient;
-                temp.VisaPrice = Convert.ToDecimal(item.VisaPrice);
-                temp.VisaCurrency = item.VisaCurrency;
-
-                temp.IsThird = item.IsThird;
-                if (dic_psg.ContainsKey(item.PassengerType))
-                {
-                    temp.PassengerType = dic_psg[item.PassengerType];
-                }
-                else {
-                    temp.PassengerType = -1;
-                }
-                
-                temp.VisaNumber = item.VisaNumber;
-                temp.VisaFreeNumber = item.VisaFreeNumber;
-                temp.CreateUserId = item.Operators;
-
-                DateTime dt_ct;
-                bool b_ct = DateTime.TryParse(item.OperatorsDate, out dt_ct);
-                if (b_ct)
-                {
-                    temp.CreateTime = dt_ct;
-                }
-                else
-                {
-                    temp.CreateTime = DateTime.Now;
-                }
-
-                temp.DeleteTime = "";
-                temp.DeleteUserId = 0;
-                temp.Remark = item.Remark;
-                if (string.IsNullOrEmpty(temp.Remark)) {
-                    temp.Remark = "";
-                }
-
-                temp.IsDel = item.IsDel;
-                temp.VisaDescription = item.VisaAttachment;
-
-                string sqlInsert = string.Format(@" INSERT INTO [dbo].[Grp_VisaInfo]
-           
-([Id]
-           ,[DIId]
-           ,[VisaClient]
-           ,[VisaPrice]
-           ,[VisaCurrency]
-
-           ,[IsThird]
-           ,[PassengerType]
-           ,[VisaNumber]
-           ,[VisaFreeNumber]
-           ,[CreateUserId]
-
-           ,[CreateTime]
-           ,[DeleteTime]
-           ,[DeleteUserId]
-           ,[Remark]
-           ,[IsDel]
-           ,[visaDescription])
-     VALUES
-           ({0},{1},'{2}',{3},{4}
-,{5},{6},{7},{8},{9}
-,'{10}','{11}',{12},'{13}',{14},'{15}') ",temp.Id,temp.DIId,temp.VisaClient,temp.VisaPrice,temp.VisaCurrency,
-temp.IsThird,temp.PassengerType,temp.VisaNumber,temp.VisaNumber,temp.CreateUserId,
-temp.CreateTime, temp.DeleteTime, temp.DeleteUserId, temp.Remark,temp.IsDel,temp.VisaDescription
-);
-               await _airTicketResRep.ExecuteCommandAsync(sqlInsert);
+               //.UpdateColumns(s => new { s.Duty, s.ExpectBeginDt, s.ExpectEndDt, s.JobContent, s.Remark, s.StepStatus })
+               .ExecuteCommandAsync();
             }
 
-
             return Ok(JsonView(true, "操作成功!"));
         }
     }

+ 0 - 1
OASystem/OASystem.Api/OAMethodLib/Quartz/Business/DeleReminderMessage.cs

@@ -106,7 +106,6 @@ namespace OASystem.API.OAMethodLib.Quartz.Business
 
                 if (listAdd7day.Count > 0)
                 {
-
                     string tempStr1 = string.Format(@" \n\n检查到7天后开始的团组数量: <font color='warning'>** {1} **</font>\n ", dayStr, listAdd7day.Count);
                     listAdd7day.ForEach(s => tempStr1 += string.Format(@">{0} \n", s.TeamName));
                     content += tempStr1;

+ 1 - 10
OASystem/OASystem.Domain/ViewModels/OA2014DB.cs

@@ -94,16 +94,7 @@ namespace OASystem.Domain.ViewModels
             set { remark = value; }
         }
 
-        int operators;
-
-        /// <summary>
-        /// 操作人
-        /// </summary>
-        public int Operators
-        {
-            get { return operators; }
-            set { operators = value; }
-        }
+        public int Operator { get; set; }
 
         string operatorsDate;