|
@@ -2147,7 +2147,7 @@ namespace OASystem.API.Controllers
|
|
|
{
|
|
|
item.BankNo = item.BankType + ":" + item.BankNo?.Substring(0, 3);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
item.PrePrice = System.Decimal.Round(item.PrePrice, 2);
|
|
|
item.Price = System.Decimal.Round(item.Price, 2);
|
|
@@ -2178,8 +2178,8 @@ namespace OASystem.API.Controllers
|
|
|
throw;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
Dictionary<string, string> transDic = new Dictionary<string, string>();
|
|
|
|
|
|
/// <summary>
|
|
@@ -4341,14 +4341,14 @@ namespace OASystem.API.Controllers
|
|
|
decimal dac1totalPrice = 0.00M, dac2totalPrice = 0.00M;
|
|
|
foreach (var item in dac1)
|
|
|
{
|
|
|
- item.Place =GetEnterExitCostExportCity(placeData, item.NationalTravelFeeId);
|
|
|
+ item.Place = GetEnterExitCostExportCity(placeData, item.NationalTravelFeeId);
|
|
|
if (place.Contains(item.Place))
|
|
|
{
|
|
|
continue;
|
|
|
}
|
|
|
DataRow row = dtdac1.NewRow();
|
|
|
|
|
|
- row["city"] =item.Place;
|
|
|
+ row["city"] = item.Place;
|
|
|
|
|
|
string currency = _CurrDatas.Find(it => it.Id == item.Currency)?.Remark ?? "Unknwon";
|
|
|
decimal rate = rateDatas.Find(it => it.CurrencyName == currency)?.Rate ?? 0.00M;
|
|
@@ -4590,7 +4590,7 @@ namespace OASystem.API.Controllers
|
|
|
dac1totalPrice += rbmPrice;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
dic.Add("dac1totalPrice", dac1totalPrice.ToString("#0.00"));
|
|
@@ -4772,7 +4772,7 @@ namespace OASystem.API.Controllers
|
|
|
/// <param name="placeData"></param>
|
|
|
/// <param name="nationalTravelFeeId"></param>
|
|
|
/// <returns></returns>
|
|
|
- private string GetEnterExitCostExportCity(List<Grp_NationalTravelFee> placeData,int nationalTravelFeeId)
|
|
|
+ private string GetEnterExitCostExportCity(List<Grp_NationalTravelFee> placeData, int nationalTravelFeeId)
|
|
|
{
|
|
|
string _city = string.Empty;
|
|
|
|
|
@@ -10138,7 +10138,7 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
int updateCount = 0;
|
|
|
|
|
|
- if (oldOAClientList.Count > 0 )
|
|
|
+ if (oldOAClientList.Count > 0)
|
|
|
{
|
|
|
|
|
|
_sqlSugar.ChangeDatabase(DBEnum.OA2023DB);
|
|
@@ -10166,7 +10166,7 @@ namespace OASystem.API.Controllers
|
|
|
var clientComInfo = clientComInfos.Where(it => it.CompanyFullName.Equals(item.Company)).FirstOrDefault();
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
if (clientComInfo == null) // add
|
|
|
{
|
|
@@ -10235,7 +10235,7 @@ namespace OASystem.API.Controllers
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
- int airType= 0;
|
|
|
+ int airType = 0;
|
|
|
|
|
|
if (item.AirType == "超经舱") airType = 459;
|
|
|
else if (item.AirType == "公务舱") airType = 458;
|
|
@@ -10280,7 +10280,7 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
}
|
|
|
|
|
|
- private bool IsValidDate(string dateString, string format)
|
|
|
+ private bool IsValidDate(string dateString, string format)
|
|
|
{
|
|
|
DateTime dateValue;
|
|
|
bool valid = DateTime.TryParseExact(dateString, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateValue);
|
|
@@ -10680,7 +10680,7 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
string fileName = "组团人员名单(" + DateTime.Now.ToString("yyyyhhddHHmmss") + ").doc";
|
|
|
|
|
|
- var fileDir = AppSettingsHelper.Get("WordBasePath")+ "TourClientList/" + fileName;
|
|
|
+ var fileDir = AppSettingsHelper.Get("WordBasePath") + "TourClientList/" + fileName;
|
|
|
doc.Save(fileDir);
|
|
|
string Url = AppSettingsHelper.Get("WordBaseUrl") + "Office/Word/TourClientList/" + fileName;
|
|
|
return Ok(JsonView(true, "操作成功!", Url));
|
|
@@ -10844,5 +10844,70 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ ///
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="_dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> ChangeDataBase_Offi(PostTourClientListDownloadFile _dto)
|
|
|
+ {
|
|
|
+ _airTicketResRep.ChangeDataBase(DBEnum.OA2014DB);
|
|
|
+
|
|
|
+ string sqlOld = string.Format(@" Select * From OfficialActivities With(nolock) ");
|
|
|
+
|
|
|
+ List<OA2014_OfficialActivities> listOld = _airTicketResRep._sqlSugar.SqlQueryable<OA2014_OfficialActivities>(sqlOld).ToList();
|
|
|
+ Dictionary<string, int> dic = new Dictionary<string, int>();
|
|
|
+ dic.Add("座谈", 383);
|
|
|
+ dic.Add("参观", 384);
|
|
|
+ dic.Add("推介会", 385);
|
|
|
+ dic.Add("路演", 386);
|
|
|
+
|
|
|
+
|
|
|
+ _airTicketResRep.ChangeDataBase(DBEnum.OA2023DB);
|
|
|
+ foreach (var item in listOld)
|
|
|
+ {
|
|
|
+ Res_OfficialActivities temp = new Res_OfficialActivities();
|
|
|
+
|
|
|
+ temp.DiId = item.Diid;
|
|
|
+ temp.Type = item.Type;
|
|
|
+ temp.Client = item.Client;
|
|
|
+ temp.Date = item.Date;
|
|
|
+ temp.Time = item.Time;
|
|
|
+
|
|
|
+ temp.Address = item.Address;
|
|
|
+ temp.Contact = item.Contact;
|
|
|
+ temp.Job = item.Job;
|
|
|
+ temp.Tel = item.Tel;
|
|
|
+ temp.OfficialForm = dic[item.Form];
|
|
|
+
|
|
|
+ temp.Setting = item.Setting;
|
|
|
+ temp.Dresscode = item.Dresscode;
|
|
|
+ temp.Attendees = item.Attendees;
|
|
|
+ temp.IsNeedTrans = item.IsNeedTrans.ToLower() == "true" ? 1 : 0;
|
|
|
+ temp.Translators = item.Translators;
|
|
|
+
|
|
|
+ temp.language = item.Language;
|
|
|
+ temp.Trip = item.Trip;
|
|
|
+ temp.CreateUserId = item.Oper;
|
|
|
+ temp.CreateTime = DateTime.Parse(item.OpDate + " 00:00:00");
|
|
|
+ temp.Remark = "";
|
|
|
+
|
|
|
+ temp.IsDel = item.Isdel;
|
|
|
+ temp.IsSubmitApproval = item.IsSubmitApproval;
|
|
|
+ temp.IsPay = item.IsPay;
|
|
|
+
|
|
|
+ await _airTicketResRep.AddAsync<Res_OfficialActivities>(temp);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ return Ok(JsonView(true, "操作成功!"));
|
|
|
+ }
|
|
|
}
|
|
|
}
|