|
@@ -11139,8 +11139,108 @@ namespace OASystem.API.Controllers
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -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);
|
|
|
+
|
|
|
+ .ExecuteCommandAsync();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
return Ok(JsonView(true, "操作成功!"));
|
|
|
}
|
|
|
}
|