|
@@ -11320,8 +11320,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>
|
|
@@ -11335,88 +11435,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, "操作成功!"));
|
|
|
}
|
|
|
}
|