|
@@ -65,6 +65,8 @@ using static NPOI.POIFS.Crypt.CryptoFunctions;
|
|
|
using Aspose.Words.Lists;
|
|
|
using OASystem.API.OAMethodLib.YouDaoAPI;
|
|
|
using NPOI.XSSF.Streaming.Values;
|
|
|
+using OASystem.API.OAMethodLib.Quartz.Business;
|
|
|
+using System.Linq;
|
|
|
|
|
|
namespace OASystem.API.Controllers
|
|
|
{
|
|
@@ -1346,6 +1348,14 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
var carFeeTypeItems = await _groupRepository.Query<Sys_SetData>(s => s.STid == 17 && s.IsDel == 0).ToListAsync();
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ * 车/导游地接 费用类型
|
|
|
+ */
|
|
|
+ var carFeeItems = await _groupRepository.Query<Sys_SetData>(s => s.STid == 83 && s.IsDel == 0).ToListAsync();
|
|
|
+
|
|
|
+ var cityData = await _groupRepository.Query<Grp_NationalTravelFee>(s => s.IsDel == 0).ToListAsync();
|
|
|
+
|
|
|
|
|
|
* 用户信息
|
|
|
*/
|
|
@@ -1475,7 +1485,33 @@ namespace OASystem.API.Controllers
|
|
|
}
|
|
|
|
|
|
|
|
|
- _detail.PriceNameContent = touristGuideGroundReservations.Area;
|
|
|
+ bool isInt = int.TryParse(touristGuideGroundReservations.Area, out int cityId);
|
|
|
+
|
|
|
+ if (isInt)
|
|
|
+ {
|
|
|
+ var cityInfo = cityData.Find(it => it.Id == cityId);
|
|
|
+ if (cityInfo != null)
|
|
|
+ {
|
|
|
+ string nameContent = $@"{cityInfo.Country}-{cityInfo.City}";
|
|
|
+
|
|
|
+ var carFeeItem = carFeeItems.Find(it => it.Id == touristGuideGroundReservations.PriceType);
|
|
|
+ if (carFeeItem != null )
|
|
|
+ {
|
|
|
+ nameContent += $@"({carFeeItem.Name})";
|
|
|
+ }
|
|
|
+ _detail.PriceNameContent = nameContent;
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _detail.PriceNameContent = touristGuideGroundReservations.Area;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
List<Grp_CarTouristGuideGroundReservationsContent> touristGuideGroundReservationsContents = _CarTouristGuideGroundReservationsContent
|
|
|
.Where(s => s.CTGGRId == touristGuideGroundReservations.Id && s.IsDel == 0 && s.Price != 0).ToList();
|
|
@@ -4232,18 +4268,20 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
|
|
|
decimal allPrice = dac1totalPrice + dac2totalPrice + _EnterExitCosts.Visa + _EnterExitCosts.Safe + _EnterExitCosts.Ticket;
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
string outsideJJ = "";
|
|
|
string allPriceJJ = "";
|
|
|
- if (_EnterExitCosts.SumJJC == 1) {
|
|
|
+ if (_EnterExitCosts.SumJJC == 1)
|
|
|
+ {
|
|
|
outsideJJ = string.Format(@"经济舱:{0} 元/人", _EnterExitCosts.OutsideJJPay.ToString("#0.00"));
|
|
|
allPriceJJ = string.Format(@"经济舱:{0} 元/人", (allPrice + _EnterExitCosts.OutsideJJPay).ToString("#0.00"));
|
|
|
}
|
|
|
string outsideGW = "";
|
|
|
string allPriceGW = "";
|
|
|
- if (_EnterExitCosts.SumGWC == 1) {
|
|
|
+ if (_EnterExitCosts.SumGWC == 1)
|
|
|
+ {
|
|
|
outsideGW = string.Format(@"公务舱:{0} 元/人", _EnterExitCosts.OutsaideGWPay.ToString("#0.00"));
|
|
|
allPriceGW = string.Format(@"公务舱:{0} 元/人", (allPrice + _EnterExitCosts.OutsaideGWPay).ToString("#0.00"));
|
|
|
}
|
|
@@ -4493,6 +4531,186 @@ namespace OASystem.API.Controllers
|
|
|
string url = AppSettingsHelper.Get("WordBaseUrl") + "Office/Word/EnterExitCost/File/" + strFileName;
|
|
|
return Ok(JsonView(true, "成功", new { Url = url }));
|
|
|
}
|
|
|
+ else if (dto.SubTypeId == 1066)
|
|
|
+ {
|
|
|
+
|
|
|
+ string tempPath = (AppSettingsHelper.Get("WordBasePath") + "EnterExitCost/Temp/成都市因公临时出国任务和预算审批意见表.docx");
|
|
|
+
|
|
|
+ Document doc = new Document(tempPath);
|
|
|
+
|
|
|
+ DocumentBuilder builder = new DocumentBuilder(doc);
|
|
|
+
|
|
|
+ Dictionary<string, string> dic = new Dictionary<string, string>();
|
|
|
+
|
|
|
+ dic.Add("GroupName", _DelegationInfo.TeamName);
|
|
|
+ dic.Add("ClientUnit", _DelegationInfo.ClientUnit);
|
|
|
+
|
|
|
+ string missionLeader = "";
|
|
|
+ string missionLeaderJob = "";
|
|
|
+ int groupNumber = 0;
|
|
|
+ if (DeleClientList.Count > 0)
|
|
|
+ {
|
|
|
+ missionLeader = DeleClientList[0]?.Name ?? "";
|
|
|
+ missionLeaderJob = DeleClientList[0]?.Job ?? "";
|
|
|
+ }
|
|
|
+ dic.Add("MissionLeader", missionLeader);
|
|
|
+ dic.Add("MissionLeaderJob", missionLeaderJob);
|
|
|
+ dic.Add("GroupNumber", _DelegationInfo.VisitPNumber.ToString());
|
|
|
+
|
|
|
+
|
|
|
+ #region MyRegion
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ List<string> countrys = _groupRepository.GroupSplitCountry(_DelegationInfo.VisitCountry);
|
|
|
+ dic.Add("ReturnCode", string.Join( "、", countrys));
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ dic.Add("Day", _DelegationInfo.VisitDays.ToString());
|
|
|
+
|
|
|
+ dic.Add("CultivateDay", dac4.Count.ToString());
|
|
|
+
|
|
|
+
|
|
|
+ NodeCollection allTables = doc.GetChildNodes(NodeType.Table, true);
|
|
|
+ Aspose.Words.Tables.Table table1 = allTables[0] as Aspose.Words.Tables.Table;
|
|
|
+
|
|
|
+
|
|
|
+ int cultivateRowIndex = 7;
|
|
|
+ foreach (var item in DeleClientList)
|
|
|
+ {
|
|
|
+ builder.MoveToCell(0, cultivateRowIndex, 0, 0);
|
|
|
+ builder.Write(item.Name);
|
|
|
+ builder.MoveToCell(0, cultivateRowIndex, 1, 0);
|
|
|
+ builder.Write(item.Sex == 0 ? "男" : item.Sex == 1 ? "女" : "");
|
|
|
+
|
|
|
+ builder.MoveToCell(0, cultivateRowIndex, 2, 0);
|
|
|
+
|
|
|
+ string birthDay = "";
|
|
|
+ if (item.Birthday != null)
|
|
|
+ {
|
|
|
+ DateTime dt = Convert.ToDateTime(item.Birthday);
|
|
|
+ birthDay = $"{dt.Year}.{dt.Month}";
|
|
|
+ }
|
|
|
+ builder.Write(birthDay);
|
|
|
+
|
|
|
+ builder.MoveToCell(0, cultivateRowIndex, 3, 0);
|
|
|
+ builder.Write(item.Company);
|
|
|
+
|
|
|
+ builder.MoveToCell(0, cultivateRowIndex, 4, 0);
|
|
|
+ builder.Write(item.Job);
|
|
|
+
|
|
|
+ cultivateRowIndex++;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ int delRows = 10 + 7 - cultivateRowIndex;
|
|
|
+ if (delRows > 0)
|
|
|
+ {
|
|
|
+ for (int i = 0; i < delRows; i++)
|
|
|
+ {
|
|
|
+
|
|
|
+ table1.Rows.RemoveAt(cultivateRowIndex);
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ decimal hotelFeeTotal = dac1.Sum(it => it.SubTotal);
|
|
|
+ dic.Add("HotelFeeTotal", hotelFeeTotal.ToString("#0.00"));
|
|
|
+ decimal mealsFeeTotal = dac2.Sum(it => it.SubTotal);
|
|
|
+ dic.Add("MealsFeeTotal", mealsFeeTotal.ToString("#0.00"));
|
|
|
+ decimal miscellaneousFeeTotal = dac3.Sum(it => it.SubTotal);
|
|
|
+ dic.Add("MiscellaneousFeeTotal", miscellaneousFeeTotal.ToString("#0.00"));
|
|
|
+ decimal trainingFeeTotal = dac4.Sum(it => it.SubTotal);
|
|
|
+ dic.Add("TrainingFeeTotal", trainingFeeTotal.ToString("#0.00"));
|
|
|
+ decimal cityTranfficFeeToatal = _EnterExitCosts.CityTranffic;
|
|
|
+ dic.Add("CityTranfficFeeToatal", cityTranfficFeeToatal.ToString("#0.00"));
|
|
|
+
|
|
|
+ decimal otherFeeTotal = _EnterExitCosts.Visa + _EnterExitCosts.Safe + _EnterExitCosts.Ticket + _EnterExitCosts.YiMiao + _EnterExitCosts.HeSuan+ _EnterExitCosts.Service;
|
|
|
+ dic.Add("OtherFeeTotal", otherFeeTotal.ToString("#0.00"));
|
|
|
+
|
|
|
+
|
|
|
+ decimal _otherFeeTotal = hotelFeeTotal + mealsFeeTotal + miscellaneousFeeTotal + trainingFeeTotal + cityTranfficFeeToatal + otherFeeTotal;
|
|
|
+
|
|
|
+ decimal _jjcFeeToatal = _EnterExitCosts.AirJJ + _otherFeeTotal;
|
|
|
+ decimal _gwcFeeToatal = _EnterExitCosts.AirGW + _otherFeeTotal;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ string outsideJJ = "";
|
|
|
+ string allPriceJJ = "";
|
|
|
+ if (_EnterExitCosts.SumJJC == 1 && _EnterExitCosts.SumGWC == 0)
|
|
|
+ {
|
|
|
+ dic.Add("AirFeeTotal", _EnterExitCosts.AirJJ.ToString("#0.00"));
|
|
|
+ dic.Add("FeeTotal", _jjcFeeToatal.ToString("#0.00"));
|
|
|
+ }
|
|
|
+ if (_EnterExitCosts.SumGWC == 1 && _EnterExitCosts.SumJJC == 0)
|
|
|
+ {
|
|
|
+ dic.Add("AirFeeTotal", _EnterExitCosts.AirGW.ToString("#0.00"));
|
|
|
+ dic.Add("FeeTotal", _gwcFeeToatal.ToString("#0.00"));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (_EnterExitCosts.SumJJC == 1 && _EnterExitCosts.SumGWC == 1)
|
|
|
+ {
|
|
|
+ string airFeeTotalStr = string.Format(@$"经济舱:{_EnterExitCosts.AirJJ.ToString("#0.00")} 公务舱:{_EnterExitCosts.AirGW.ToString("#0.00")}");
|
|
|
+ dic.Add("AirFeeTotal", airFeeTotalStr);
|
|
|
+ string feeTotalStr = string.Format(@$"经济舱:{_jjcFeeToatal.ToString("#0.00")} 公务舱:{_gwcFeeToatal.ToString("#0.00")}");
|
|
|
+ dic.Add("FeeTotal", feeTotalStr);
|
|
|
+ }
|
|
|
+
|
|
|
+ foreach (var key in dic.Keys)
|
|
|
+ {
|
|
|
+ builder.MoveToBookmark(key);
|
|
|
+ builder.Write(dic[key]);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ string strFileName = $"{_DelegationInfo.TeamName}成都市因公临时出国任务和预算审批意见表(外专培训团专用).docx";
|
|
|
+ doc.Save(AppSettingsHelper.Get("WordBasePath") + "EnterExitCost/File/" + strFileName);
|
|
|
+ string url = AppSettingsHelper.Get("WordBaseUrl") + "Office/Word/EnterExitCost/File/" + strFileName;
|
|
|
+ return Ok(JsonView(true, "成功", new { Url = url }));
|
|
|
+ }
|
|
|
}
|
|
|
else if (dto.ExportType == 2)
|
|
|
{
|
|
@@ -10258,13 +10476,9 @@ namespace OASystem.API.Controllers
|
|
|
if (clientInfo == null)
|
|
|
{
|
|
|
|
|
|
-
|
|
|
- string format1 = "yyyy-MM-dd";
|
|
|
-
|
|
|
- string data111 = "1990-01-01";
|
|
|
-
|
|
|
- var data11_1 = IsValidDate(item.Birthday, format1);
|
|
|
- if (data11_1) data111 = item.OPdate;
|
|
|
+ DateTime? dateTime = null;
|
|
|
+ var isDt = DateTime.TryParse(item.Birthday, out DateTime birthDayDt);
|
|
|
+ if (isDt) dateTime = birthDayDt;
|
|
|
|
|
|
var addInfo1 = new Crm_DeleClient()
|
|
|
{
|
|
@@ -10278,8 +10492,7 @@ namespace OASystem.API.Controllers
|
|
|
Marriage = 0,
|
|
|
Phone = item.Phone,
|
|
|
Job = item.Job,
|
|
|
- BirthDay = Convert.ToDateTime(data111).ToString("yyyy-MM-dd"),
|
|
|
-
|
|
|
+ BirthDay = dateTime
|
|
|
|
|
|
};
|
|
|
|
|
@@ -10864,8 +11077,8 @@ namespace OASystem.API.Controllers
|
|
|
dic.Add("SQtime", info1.ApprovalDt.ConvertToDatetime());
|
|
|
dic.Add("SQRemark", info1.ApprovalRemark);
|
|
|
|
|
|
- dic.Add("CPJtime", info1.ApprovalDt.ConvertToDatetime());
|
|
|
- dic.Add("CPJRemark", info1.ApprovalRemark);
|
|
|
+ dic.Add("CPJtime", info1.IssueApprovalDt.ConvertToDatetime());
|
|
|
+ dic.Add("CPJRemark", info1.IssueApprovalRemark);
|
|
|
|
|
|
|
|
|
|
|
@@ -10912,16 +11125,9 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
[HttpPost]
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
- public async Task<IActionResult> ChangeDataBase_Offi(PostTourClientListDownloadFile _dto)
|
|
|
+ public async Task<IActionResult> Test_SendMsg(PostTourClientListDownloadFile _dto)
|
|
|
{
|
|
|
- _airTicketResRep.ChangeDataBase(DBEnum.OA2014DB);
|
|
|
-
|
|
|
- string sqlOld = string.Format(@" Select * From AirTicketReservations With(nolock) ");
|
|
|
-
|
|
|
- List<oa2021_AirTicketReservations> listOld = _airTicketResRep._sqlSugar.SqlQueryable<oa2021_AirTicketReservations>(sqlOld).ToList();
|
|
|
-
|
|
|
-
|
|
|
- _airTicketResRep.ChangeDataBase(DBEnum.OA2023DB);
|
|
|
+ DeleReminderMessage.PostMessageByWebhook();
|
|
|
|
|
|
return Ok(JsonView(true, "操作成功!"));
|
|
|
}
|