|
@@ -147,7 +147,7 @@ namespace OASystem.API.Controllers
|
|
|
CheckBoxsRepository checkBoxs, GroupCostRepository GroupCostRepository, CostTypeHotelNumberRepository CostTypeHotelNumberRepository,
|
|
|
GroupCostParameterRepository GroupCostParameterRepository, HotelPriceRepository hotelPriceRep, CustomersRepository customersRep, SetDataRepository setDataRep,
|
|
|
TourClientListRepository tourClientListRep, TeamRateRepository teamRateRep, IHubContext<ChatHub, IChatClient> hubContext, UsersRepository usersRep, IJuHeApiService juHeApi,
|
|
|
- InvertedListRepository invertedListRep, VisaFeeInfoRepository visaFeeInfoRep, TicketBlackCodeRepository ticketBlackCodeRep, HotelInquiryRepository hotelInquiryRep,
|
|
|
+ InvertedListRepository invertedListRep, VisaFeeInfoRepository visaFeeInfoRep, TicketBlackCodeRepository ticketBlackCodeRep, HotelInquiryRepository hotelInquiryRep,
|
|
|
ThreeCodeRepository threeCodeRepository, FeeAuditRepository feeAuditRep)
|
|
|
{
|
|
|
_mapper = mapper;
|
|
@@ -1452,7 +1452,7 @@ namespace OASystem.API.Controllers
|
|
|
/*
|
|
|
* 成本信息
|
|
|
*/
|
|
|
- var groupCost = _groupRepository.Query<Grp_GroupCostParameter >(s => s.DiId == _dto.DiId && s.IsDel == 0).First();
|
|
|
+ var groupCost = _groupRepository.Query<Grp_GroupCostParameter>(s => s.DiId == _dto.DiId && s.IsDel == 0).First();
|
|
|
decimal _groupRate = 0.0000M;
|
|
|
string _groupCurrencyCode = "-";
|
|
|
if (groupCost != null)
|
|
@@ -1558,15 +1558,25 @@ namespace OASystem.API.Controllers
|
|
|
checkOut = Convert.ToDateTime(hotelReservations.CheckOutDate);
|
|
|
int hotel_days = (int)(checkOut - checkIn).TotalDays;
|
|
|
|
|
|
- string roomFeeStr = "";
|
|
|
- if (hotelReservations.SingleRoomPrice>0)
|
|
|
- roomFeeStr += $"<br/><span style='width:70px;display: inline-block;'></span>单间:{hotelReservations.SingleRoomPrice.ToString("#0.00")} * {hotelReservations.SingleRoomCount}";
|
|
|
- if (hotelReservations.DoubleRoomPrice > 0)
|
|
|
- roomFeeStr += $"<br/><span style='width:70px;display: inline-block;'></span>双人间:{hotelReservations.DoubleRoomPrice.ToString("#0.00")} * {hotelReservations.DoubleRoomCount}";
|
|
|
- if (hotelReservations.SuiteRoomPrice > 0)
|
|
|
- roomFeeStr += $"<br/><span style='width:70px;display: inline-block;'></span>套房:{hotelReservations.SuiteRoomPrice.ToString("#0.00")} * {hotelReservations.SuiteRoomCount}";
|
|
|
- if (hotelReservations.OtherRoomPrice > 0)
|
|
|
- roomFeeStr += $"<br/><span style='width:70px;display: inline-block;'></span>其他:{hotelReservations.OtherRoomPrice.ToString("#0.00")} * {hotelReservations.OtherRoomCount}";
|
|
|
+ string roomFeeStr = "", roomFeestr1 = "";
|
|
|
+
|
|
|
+ //是否比较房型价格
|
|
|
+ bool __isSingle = false, __isDouble = false, __isSuite = false, __isOther = false;
|
|
|
+
|
|
|
+ roomFeeStr += $"<br/><span style='width:70px;display: inline-block;'></span>";
|
|
|
+
|
|
|
+ if (hotelReservations.SingleRoomPrice > 0)
|
|
|
+ { roomFeestr1 += $"单间:{hotelReservations.SingleRoomPrice.ToString("#0.00")} * {hotelReservations.SingleRoomCount}"; __isSingle = true; }
|
|
|
+ if (hotelReservations.DoubleRoomPrice > 0)
|
|
|
+ { roomFeestr1 += $"双人间:{hotelReservations.DoubleRoomPrice.ToString("#0.00")} * {hotelReservations.DoubleRoomCount}"; __isDouble = true; }
|
|
|
+ if (hotelReservations.SuiteRoomPrice > 0)
|
|
|
+ { roomFeestr1 += $"套房:{hotelReservations.SuiteRoomPrice.ToString("#0.00")} * {hotelReservations.SuiteRoomCount}"; __isSuite = true; }
|
|
|
+ if (hotelReservations.OtherRoomPrice > 0)
|
|
|
+ { roomFeestr1 += $"其他:{hotelReservations.OtherRoomPrice.ToString("#0.00")} * {hotelReservations.OtherRoomCount}"; __isOther = true; }
|
|
|
+
|
|
|
+ if (roomFeestr1.Length > 0) roomFeeStr += roomFeestr1;
|
|
|
+ else roomFeeStr += " 0.00 * 0";
|
|
|
+
|
|
|
|
|
|
decimal governmentRentFee = 0.00M, cityTaxFee = 0.00M, breakfastFee = 0.00M, roomFee = 0.00M;
|
|
|
string governmentRentBool = "否", cityTaxBool = "否", breakfastBool = "否", roomBool = "否";
|
|
@@ -1640,7 +1650,7 @@ namespace OASystem.API.Controllers
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- string hotelCostTitalStr = "<span style='font-weight:800;'>成本信息</span><br/>";
|
|
|
+ string hotelCostTitalStr = "<span style='font-weight:800;'>成本信息</span><br/>";
|
|
|
string hotelCostStr = "";
|
|
|
decimal hotelCsotTotal = 0.00M;
|
|
|
if (groupCost != null)
|
|
@@ -1650,7 +1660,7 @@ namespace OASystem.API.Controllers
|
|
|
hotelCostStr += $"{groupCost.Currency}(汇率:{groupCost.Rate.ToString("#0.0000")})<br/>";
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
if (checkOut > checkIn) checkOut = checkOut.AddDays(-1);
|
|
|
|
|
|
|
|
@@ -1661,26 +1671,30 @@ namespace OASystem.API.Controllers
|
|
|
{
|
|
|
hotelCsotTotal += item.Sum(x => x.HotelSingleRoomFee) + item.Sum(x => x.HotelDoubleRoomFee) + item.Sum(x => x.HotelSuiteRoomFee) + item.Sum(x => x.HotelSuiteFee);
|
|
|
hotelCost_day += @$"{item.First()?.Date ?? "-"}";
|
|
|
- if (item.Sum(x => x.HotelSingleRoomFee) != 0) hotelCost_day += @$" 单间:{item.Sum(x => x.HotelSingleRoomFee).ToString("#0.00")}";
|
|
|
+ if (item.Sum(x => x.HotelSingleRoomFee) != 0) hotelCost_day += @$" 单间:{item.Sum(x => x.HotelSingleRoomFee).ToString("#0.00")}";
|
|
|
+ else { if (__isSingle) hotelCost_day += @$" 单间:0.00"; }
|
|
|
if (item.Sum(x => x.HotelDoubleRoomFee) != 0) hotelCost_day += @$" 双人间:{item.Sum(x => x.HotelDoubleRoomFee).ToString("#0.00")}";
|
|
|
+ else { if (__isDouble) hotelCost_day += @$" 双人间:0.00"; }
|
|
|
if (item.Sum(x => x.HotelSuiteRoomFee) != 0) hotelCost_day += @$" 小套房/豪华套房:{item.Sum(x => x.HotelSuiteRoomFee).ToString("#0.00")}";
|
|
|
- if (item.Sum(x => x.HotelSuiteFee) != 0) hotelCost_day += @$" 套房:{item.Sum(x => x.HotelSuiteFee).ToString("#0.00")}";
|
|
|
+ else { if (__isSuite) hotelCost_day += @$" 小套房/豪华套房:0.00"; }
|
|
|
+ if (item.Sum(x => x.HotelSuiteFee) != 0) hotelCost_day += @$" 套房:{item.Sum(x => x.HotelSuiteFee).ToString("#0.00")}";
|
|
|
+ else { if (__isOther) hotelCost_day += @$" 套房:0.00"; }
|
|
|
hotelCost_day += @$"</br>";
|
|
|
}
|
|
|
|
|
|
- string hotelBreakfastStr = "",hotelGovernmentRentStr = "",hotelCityTaxStr="" ;
|
|
|
+ string hotelBreakfastStr = "", hotelGovernmentRentStr = "", hotelCityTaxStr = "";
|
|
|
if (breakfastFee > 0) hotelBreakfastStr = $"酒店早餐: {breakfastFee.ToString("#0.00")} {breakfastCode} {breakfastName} 当时汇率 {breakfastData?.Rate.ToString("#0.0000")} <br/>是否由地接代付:{breakfastBool}<br/><br/>";
|
|
|
if (governmentRentFee > 0) hotelGovernmentRentStr = $"地税: {governmentRentFee.ToString("#0.00")} {governmentRentCode} {governmentRentName} 当时汇率 {governmentRentData?.Rate.ToString("#0.0000")} <br/>是否由地接代付:{governmentRentBool}<br/><br/>";
|
|
|
if (cityTaxFee > 0) hotelCityTaxStr = $"城市税: {cityTaxFee.ToString("#0.00")} {cityTaxCode} {cityTaxName} 当时汇率 {cityTaxData?.Rate.ToString("#0.0000")} <br/>是否由地接代付:{cityTaxBool}<br/>";
|
|
|
|
|
|
string hotelCostTotalStr = "";// $" 成本合计:{hotelCsotTotal.ToString("#0.00")}<br/>";
|
|
|
- _detail.PriceMsgContent = $"{hotelCostTitalStr}{hotelCostStr}{hotelCostTotalStr}{hotelCost_day}<br/>"+
|
|
|
+ _detail.PriceMsgContent = $"{hotelCostTitalStr}{hotelCostStr}{hotelCostTotalStr}{hotelCost_day}<br/>" +
|
|
|
$"<span style='font-weight:800;'>{hotelReservations.HotelName} [{hotelReservations.CheckInDate} - {hotelReservations.CheckOutDate}]</span><br/>" +
|
|
|
$"信用卡金额:{_detail.WaitPay} ({hotelCurrncyName})<br/>" +
|
|
|
$"房间说明: {hotelReservations.Remark} <br/>" +
|
|
|
$"房间费用: {roomCode} {roomName} 当时汇率 {roomData?.Rate.ToString("#0.0000")}{roomFeeStr} <br/>是否由地接代付:{roomBool}<br/><br/>" +
|
|
|
- $"{hotelBreakfastStr}"+
|
|
|
- $"{hotelGovernmentRentStr}"+
|
|
|
+ $"{hotelBreakfastStr}" +
|
|
|
+ $"{hotelGovernmentRentStr}" +
|
|
|
$"{hotelCityTaxStr}";
|
|
|
_detail.PriceNameContent = hotelReservations.HotelName;
|
|
|
}
|
|
@@ -1720,7 +1734,7 @@ namespace OASystem.API.Controllers
|
|
|
// _detail.PriceNameContent = touristGuideGroundReservations.Area;
|
|
|
//}
|
|
|
|
|
|
- var touristGuideGroundReservationsContents =
|
|
|
+ var touristGuideGroundReservationsContents =
|
|
|
_CarTouristGuideGroundReservationsContent.Where(s => s.CTGGRId == touristGuideGroundReservations.Id && s.IsDel == 0 && s.Price != 0).ToList();
|
|
|
|
|
|
string priceMsg = $"<span style='font-weight:800;'>{touristGuideGroundReservations.PriceName}({touristGuideGroundReservations.ServiceStartTime} - {touristGuideGroundReservations.ServiceEndTime})</span><br/>";
|
|
@@ -1742,13 +1756,13 @@ namespace OASystem.API.Controllers
|
|
|
carCurrencyName = currencyData.Remark;
|
|
|
}
|
|
|
|
|
|
- string opCostStr =string.Empty;
|
|
|
+ string opCostStr = string.Empty;
|
|
|
decimal opCostTypePrice = 0.00M;
|
|
|
#region 处理成本各项费用
|
|
|
|
|
|
var opDate = item.DatePrice?.ToString("yyyy-MM-dd");
|
|
|
|
|
|
-
|
|
|
+
|
|
|
var opCost = groupCostDetails.Where(x => x.Date.Equals(opDate)).ToList();
|
|
|
|
|
|
if (opCost.Count > 0)
|
|
@@ -1776,12 +1790,12 @@ namespace OASystem.API.Controllers
|
|
|
//case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //992 住补费用 -- 暂无
|
|
|
case 994: opCostTypePrice = opCost.Sum(x => x.TranslatorFee); break; //994 翻译费
|
|
|
case 1059: opCostTypePrice = opCost.Sum(x => x.GuideOverTimeFee); break; //1059 导游超时费用
|
|
|
- //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1070 尾款金额
|
|
|
- //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1071 其他额外费用
|
|
|
- //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1073 翻译超时费
|
|
|
- //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1074 早餐超支费用
|
|
|
- //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1075 午餐超支费用
|
|
|
- //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1076 晚餐超支费用
|
|
|
+ //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1070 尾款金额
|
|
|
+ //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1071 其他额外费用
|
|
|
+ //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1073 翻译超时费
|
|
|
+ //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1074 早餐超支费用
|
|
|
+ //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1075 午餐超支费用
|
|
|
+ //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1076 晚餐超支费用
|
|
|
}
|
|
|
opCostStr = $" / 成本:{opCostTypePrice.ToString("#0.00")} {_groupCurrencyCode}(汇率:{_groupRate.ToString("#0.0000")})";
|
|
|
}
|
|
@@ -4059,6 +4073,21 @@ namespace OASystem.API.Controllers
|
|
|
return Ok(JsonView(false, data.Msg));
|
|
|
}
|
|
|
|
|
|
+ //生成默认文件pdf并且通知人员
|
|
|
+ var fileView = await GeneralMethod.EnterExitCostDownload(new EnterExitCostDownloadDto()
|
|
|
+ {
|
|
|
+ DiId = dto.DiId,
|
|
|
+ ExportType = 1,
|
|
|
+ SubTypeId = 1005
|
|
|
+ }, "pdf");
|
|
|
+
|
|
|
+ //发送通知
|
|
|
+ string fileUrl = (string)fileView.Data.GetType().GetProperty("Url").GetValue(fileView.Data, null);
|
|
|
+ int sign = (int)data.Data.GetType().GetProperty("sign").GetValue(data.Data, null);
|
|
|
+ string url = string.Format("http://oa.pan-american-intl.com:4399/?sign={0}&fileUrl={1}", sign, fileUrl);
|
|
|
+ await AppNoticeLibrary.SendUserMsg_GroupShare_ToGM(dto.DiId, "208", dto.UserId, url);
|
|
|
+
|
|
|
+
|
|
|
return Ok(JsonView(true, data.Msg, data.Data));
|
|
|
}
|
|
|
catch (Exception ex)
|
|
@@ -4817,7 +4846,7 @@ namespace OASystem.API.Controllers
|
|
|
wb.CalculateFormula(true);
|
|
|
|
|
|
//模板文件名
|
|
|
- string strFileName = $"四川省商务厅出国经费财政先行审核表.xls";
|
|
|
+ string strFileName = $"{_DelegationInfo.TeamName}-四川省商务厅出国经费财政先行审核表{DateTime.Now.ToString("yyyyMMddHHmmss")}.xls"; ;//$".xls";
|
|
|
designer.Workbook.Save(AppSettingsHelper.Get("WordBasePath") + "EnterExitCost/File/" + strFileName);
|
|
|
string url = AppSettingsHelper.Get("WordBaseUrl") + "Office/Word/EnterExitCost/File/" + strFileName;
|
|
|
return Ok(JsonView(true, "成功", new { Url = url }));
|
|
@@ -4997,7 +5026,7 @@ namespace OASystem.API.Controllers
|
|
|
}
|
|
|
|
|
|
//模板文件名
|
|
|
- string strFileName = $"{_DelegationInfo.TeamName}成都市因公临时出国任务和预算审批意见表(外专培训团专用).docx";
|
|
|
+ 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 }));
|
|
@@ -5357,6 +5386,9 @@ namespace OASystem.API.Controllers
|
|
|
return Ok(JsonView(false, data.Msg));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
return Ok(JsonView(true, data.Msg, data.Data));
|
|
|
|
|
|
}
|
|
@@ -5982,8 +6014,8 @@ namespace OASystem.API.Controllers
|
|
|
}
|
|
|
|
|
|
//自动审核
|
|
|
- await _feeAuditRep.FeeAutomaticAudit(2,dto.DiId,dto.CTGGRId);
|
|
|
-
|
|
|
+ await _feeAuditRep.FeeAutomaticAudit(2, dto.DiId, dto.CTGGRId);
|
|
|
+
|
|
|
#region 应用推送
|
|
|
try
|
|
|
{
|
|
@@ -6379,7 +6411,8 @@ namespace OASystem.API.Controllers
|
|
|
cell.SetCellValue(setCellValue); //写入单元格
|
|
|
}
|
|
|
|
|
|
- if (overspendSoure.ContainsKey(thisSid)) {
|
|
|
+ if (overspendSoure.ContainsKey(thisSid))
|
|
|
+ {
|
|
|
var overspendId = overspendSoure[thisSid];
|
|
|
whereForResult = arr.Where(x => x.SId == item.SId && DateTime.Compare(x.DatePrice.ObjToDate(), item.DatePrice.ObjToDate()) == 0).ToList();
|
|
|
}
|
|
@@ -6813,7 +6846,7 @@ namespace OASystem.API.Controllers
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- CityStr = GeneralMethod.GetGroupCityLine(diid,"/");
|
|
|
+ CityStr = GeneralMethod.GetGroupCityLine(diid, "/");
|
|
|
_travelList = _sqlSugar.Queryable<Grp_TravelList>().Where(x => x.Diid == diid && x.IsDel == 0 && x.Issel == 1).ToList();
|
|
|
}
|
|
|
|
|
@@ -8978,7 +9011,8 @@ namespace OASystem.API.Controllers
|
|
|
var groupCosts = _usersRep._sqlSugar.Queryable<Grp_GroupCost>().Where(it => it.IsDel == 0 && it.Diid == dto.DiId).ToList();
|
|
|
var initDatas = groupCosts.Select(it => new { date = it.Date, week = it.Date.GetWeek() == "" ? "-" : it.Date.GetWeek(), itinerary = it.ITIN }).ToList();
|
|
|
|
|
|
- modulePromptInfo.Data = new {
|
|
|
+ modulePromptInfo.Data = new
|
|
|
+ {
|
|
|
airFeeData = datas,
|
|
|
airInitData = initDatas
|
|
|
};
|
|
@@ -9153,7 +9187,8 @@ ORDER by gctggrc.id DESC
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- var view = dbResult.Select(x => {
|
|
|
+ var view = dbResult.Select(x =>
|
|
|
+ {
|
|
|
|
|
|
decimal dp = 0.00M;
|
|
|
var startB = DateTime.TryParse(x.Start.ToString(), out DateTime startD);
|
|
@@ -9384,7 +9419,8 @@ ORDER by gctggrc.id DESC
|
|
|
{
|
|
|
if (pageFunAuthView.EditAuth == 0) return Ok(JsonView(false, "您没有编辑权限!"));
|
|
|
|
|
|
- } else return Ok(JsonView(false, "请输入正确的数据Id!"));
|
|
|
+ }
|
|
|
+ else return Ok(JsonView(false, "请输入正确的数据Id!"));
|
|
|
|
|
|
#endregion
|
|
|
|
|
@@ -9397,7 +9433,7 @@ ORDER by gctggrc.id DESC
|
|
|
}
|
|
|
|
|
|
#region 应用推送
|
|
|
-
|
|
|
+
|
|
|
try
|
|
|
{
|
|
|
int ccpId = (int)_view.Data.GetType().GetProperty("ccpId").GetValue(_view.Data, null);
|
|
@@ -9406,7 +9442,7 @@ ORDER by gctggrc.id DESC
|
|
|
await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
|
|
|
|
|
|
//自动审核
|
|
|
- await _feeAuditRep.FeeAutomaticAudit(1,_dto.DiId,hotelId);
|
|
|
+ await _feeAuditRep.FeeAutomaticAudit(1, _dto.DiId, hotelId);
|
|
|
|
|
|
}
|
|
|
catch (Exception ex)
|
|
@@ -11549,12 +11585,12 @@ ORDER by gctggrc.id DESC
|
|
|
|
|
|
bool isDepStatus = await GeneralMethod.IsMarketingStaff(dto.CurrUserId);
|
|
|
List<Grp_DelegationInfo> groupInfos = new List<Grp_DelegationInfo>();
|
|
|
- groupInfos = _sqlSugar.Queryable<Grp_DelegationInfo>()
|
|
|
+ groupInfos = _sqlSugar.Queryable<Grp_DelegationInfo>()
|
|
|
.Where(it => it.IsDel == 0)
|
|
|
.WhereIF(isDepStatus, it => it.JietuanOperator == dto.CurrUserId)
|
|
|
.OrderByDescending(it => it.CreateUserId)
|
|
|
.ToList();
|
|
|
- if (groupInfos.Count < 1) return Ok(JsonView(false,"暂无和你相关的团组信息!"));
|
|
|
+ if (groupInfos.Count < 1) return Ok(JsonView(false, "暂无和你相关的团组信息!"));
|
|
|
|
|
|
var country = groupInfos.Select(it => it.VisitCountry).ToList();
|
|
|
var diids = groupInfos.Select(it => it.Id).ToList();
|
|
@@ -11597,11 +11633,11 @@ ORDER by gctggrc.id DESC
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
- var teamNames = groupInfos.Where(it => !string.IsNullOrEmpty(it.TeamName) )
|
|
|
+ var teamNames = groupInfos.Where(it => !string.IsNullOrEmpty(it.TeamName))
|
|
|
.Select(it => it.TeamName).ToList();
|
|
|
|
|
|
stopwatch.Stop();
|
|
|
- return Ok(JsonView(true, $"操作成功,耗时{stopwatch.ElapsedMilliseconds} ms", new { teamNames,countriesDatas, citiesDatas = cityDatas }));
|
|
|
+ return Ok(JsonView(true, $"操作成功,耗时{stopwatch.ElapsedMilliseconds} ms", new { teamNames, countriesDatas, citiesDatas = cityDatas }));
|
|
|
|
|
|
}
|
|
|
|
|
@@ -12248,7 +12284,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
.Where(it => countrys.Contains(it.Name_CN))
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.Search), it => it.Name_CN.Contains(dto.Search))
|
|
|
.Select(it => new { id = it.Id, name = it.Name_CN })
|
|
|
- .ToPageListAsync(dto.PageIndex,dto.PageSize, total);
|
|
|
+ .ToPageListAsync(dto.PageIndex, dto.PageSize, total);
|
|
|
|
|
|
return Ok(JsonView(true, MsgTips.Succeed, countyDatas, total));
|
|
|
}
|
|
@@ -12289,7 +12325,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
watch.Start();
|
|
|
RefAsync<int> total = 0;
|
|
|
var countyDatas = await _sqlSugar.Queryable<Res_OfficialActivities>()
|
|
|
- .InnerJoin<Grp_DelegationInfo>((oa,di) => oa.DiId == di.Id)
|
|
|
+ .InnerJoin<Grp_DelegationInfo>((oa, di) => oa.DiId == di.Id)
|
|
|
.Where((oa, di) => oa.IsDel == 0)
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.Search), (oa, di) => di.TeamName.Contains(dto.Search))
|
|
|
.OrderBy((oa, di) => new { id = SqlFunc.Desc(di.Id) })
|
|
@@ -12326,7 +12362,8 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
.ToPageListAsync(dto.PageIndex, dto.PageSize, total);
|
|
|
var userDatas = _sqlSugar.Queryable<Sys_Users>().Where(x => x.IsDel == 0).ToList();
|
|
|
var setDatas = _sqlSugar.Queryable<Sys_SetData>().Where(x => x.IsDel == 0).ToList();
|
|
|
- infos.ForEach(x => {
|
|
|
+ infos.ForEach(x =>
|
|
|
+ {
|
|
|
x.TeamDid = setDatas.Find(y => int.Parse(x.TeamDid) == y.Id)?.Name ?? "-";
|
|
|
x.JietuanOperator = userDatas.Find(y => int.Parse(x.JietuanOperator) == y.Id)?.CnName ?? "-";
|
|
|
x.TeamLevSId = setDatas.Find(y => int.Parse(x.TeamLevSId) == y.Id)?.Name ?? "-";
|
|
@@ -12449,19 +12486,20 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
{
|
|
|
threeCodeStr.Add(end);
|
|
|
}
|
|
|
- else {
|
|
|
+ else
|
|
|
+ {
|
|
|
threeCodeStr.Add(start);
|
|
|
threeCodeStr.Add(end);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- var threeCodeList = _threeCodeRepository.QueryThreeCodeArray(threeCodeStr);
|
|
|
+ var threeCodeList = _threeCodeRepository.QueryThreeCodeArray(threeCodeStr);
|
|
|
var last = threeCodeStr.Last();
|
|
|
foreach (var item in threeCodeStr)
|
|
|
{
|
|
|
cityPath += (threeCodeList.Keys.Contains(item) ? threeCodeList[item].City : "【未知三字码】") + "-";
|
|
|
- if(item.Equals(last))
|
|
|
+ if (item.Equals(last))
|
|
|
{
|
|
|
stay = threeCodeList.Keys.Contains(item) ? threeCodeList[item].City : "【未知三字码】";
|
|
|
}
|
|
@@ -12499,7 +12537,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
x.Diid,
|
|
|
chiList = chiList.Select(x1 => new
|
|
|
{
|
|
|
- timeInterval = x1.Time == null ? new string [1] : x1.Time.Split('-'),
|
|
|
+ timeInterval = x1.Time == null ? new string[1] : x1.Time.Split('-'),
|
|
|
x1.Details,
|
|
|
x1.ParentId,
|
|
|
x1.Id
|
|
@@ -12509,10 +12547,10 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
|
|
|
data = data with
|
|
|
{
|
|
|
- content = resultArr,
|
|
|
+ content = resultArr,
|
|
|
};
|
|
|
|
|
|
- jw = JsonView(true,"获取成功!",data);
|
|
|
+ jw = JsonView(true, "获取成功!", data);
|
|
|
|
|
|
return Ok(jw);
|
|
|
}
|
|
@@ -12526,7 +12564,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
public IActionResult DeleteApprovalJourney(DeleteApprovalJourney dto)
|
|
|
{
|
|
|
var jw = JsonView(false);
|
|
|
- var group = _sqlSugar.Queryable<Grp_DelegationInfo>().First(x=>x.Id == dto.Diid && x.IsDel == 0);
|
|
|
+ var group = _sqlSugar.Queryable<Grp_DelegationInfo>().First(x => x.Id == dto.Diid && x.IsDel == 0);
|
|
|
if (group == null)
|
|
|
{
|
|
|
jw.Msg = "团组参数有误!";
|
|
@@ -12537,7 +12575,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
{
|
|
|
_sqlSugar.BeginTran();
|
|
|
|
|
|
- var arr = _sqlSugar.Queryable<Grp_ApprovalTravel>().Where(x => x.Diid == dto.Diid && x.IsDel == 0).Select(x=>x.Id).ToList();
|
|
|
+ var arr = _sqlSugar.Queryable<Grp_ApprovalTravel>().Where(x => x.Diid == dto.Diid && x.IsDel == 0).Select(x => x.Id).ToList();
|
|
|
|
|
|
_ = _sqlSugar.Updateable<Grp_ApprovalTravelDetails>().SetColumns(x => new Grp_ApprovalTravelDetails
|
|
|
{
|
|
@@ -12597,10 +12635,10 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
|
|
|
_sqlSugar.BeginTran();
|
|
|
|
|
|
- if (chiArr.Where(x=>x.id == 0).Count() == chiArr.Count)
|
|
|
+ if (chiArr.Where(x => x.id == 0).Count() == chiArr.Count)
|
|
|
{
|
|
|
var parentIds = dto.Arr.Select(x => x.id).ToList();
|
|
|
- _sqlSugar.Updateable<Grp_ApprovalTravelDetails>().Where(x => parentIds.Contains(x.ParentId) && x.IsDel == 0).SetColumns(x=>new Grp_ApprovalTravelDetails
|
|
|
+ _sqlSugar.Updateable<Grp_ApprovalTravelDetails>().Where(x => parentIds.Contains(x.ParentId) && x.IsDel == 0).SetColumns(x => new Grp_ApprovalTravelDetails
|
|
|
{
|
|
|
DeleteTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
|
|
|
DeleteUserId = dto.UserId,
|
|
@@ -12610,13 +12648,13 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
|
|
|
try
|
|
|
{
|
|
|
- _ = _sqlSugar.Insertable<Grp_ApprovalTravelDetails>(chiArr.Where(x => x.id == 0).Select(x => new Grp_ApprovalTravelDetails
|
|
|
+ _ = _sqlSugar.Insertable<Grp_ApprovalTravelDetails>(chiArr.Where(x => x.id == 0).Select(x => new Grp_ApprovalTravelDetails
|
|
|
{
|
|
|
CreateTime = DateTime.Now,
|
|
|
CreateUserId = dto.UserId,
|
|
|
Details = x.details,
|
|
|
ParentId = x.parentId,
|
|
|
- Time = x.timeInterval.Where(x=>!string.IsNullOrWhiteSpace(x)).Count() > 1 ? x.timeInterval[0] + "-" + x.timeInterval[1] : "",
|
|
|
+ Time = x.timeInterval.Where(x => !string.IsNullOrWhiteSpace(x)).Count() > 1 ? x.timeInterval[0] + "-" + x.timeInterval[1] : "",
|
|
|
Remark = "",
|
|
|
IsDel = 0
|
|
|
}).ToList()).ExecuteCommand();
|
|
@@ -12627,7 +12665,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
Details = x.details,
|
|
|
ParentId = x.parentId,
|
|
|
Time = x.timeInterval.Where(x => !string.IsNullOrWhiteSpace(x)).Count() > 1 ? x.timeInterval[0] + "-" + x.timeInterval[1] : "",
|
|
|
- }).ToList()).UpdateColumns(x=> new Grp_ApprovalTravelDetails
|
|
|
+ }).ToList()).UpdateColumns(x => new Grp_ApprovalTravelDetails
|
|
|
{
|
|
|
Details = x.Details,
|
|
|
ParentId = x.ParentId,
|
|
@@ -12640,7 +12678,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
Date = x.date,
|
|
|
}).ToList()).UpdateColumns(x => new Grp_ApprovalTravel
|
|
|
{
|
|
|
- Date = x.Date
|
|
|
+ Date = x.Date
|
|
|
}).ExecuteCommand();
|
|
|
|
|
|
_sqlSugar.CommitTran();
|
|
@@ -12828,10 +12866,10 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
IFormatProvider ifp = new CultureInfo("zh-CN", true);
|
|
|
if (DateTime.TryParseExact(flightTime, "HH小时mm分钟", ifp, DateTimeStyles.None, out DateTime flightDataTime))
|
|
|
{
|
|
|
- flightTime = flightDataTime.Hour > 0
|
|
|
- ? flightDataTime.Hour.ToString() + "小时" + (flightDataTime.Minute > 0
|
|
|
- ? flightDataTime.Minute.ToString() + "分钟": "") : flightDataTime.Minute > 0
|
|
|
- ? flightDataTime.Minute.ToString() + "分钟" : "" ;
|
|
|
+ flightTime = flightDataTime.Hour > 0
|
|
|
+ ? flightDataTime.Hour.ToString() + "小时" + (flightDataTime.Minute > 0
|
|
|
+ ? flightDataTime.Minute.ToString() + "分钟" : "") : flightDataTime.Minute > 0
|
|
|
+ ? flightDataTime.Minute.ToString() + "分钟" : "";
|
|
|
}
|
|
|
|
|
|
|
|
@@ -12874,7 +12912,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
CreateUserId = dto.Userid,
|
|
|
ParentId = 0,
|
|
|
Details = trip
|
|
|
- }) ;
|
|
|
+ });
|
|
|
|
|
|
var threeCodeList = _threeCodeRepository.QueryThreeCodeArray(threeCodeStr);
|
|
|
var last = threeCodeStr.Last();
|
|
@@ -12945,7 +12983,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
jw.Code = 400;
|
|
|
jw.Msg = "生成失败!" + ex.Message;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return Ok(jw);
|
|
|
}
|
|
|
|
|
@@ -12997,7 +13035,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
var ChiRep = _sqlSugar.Queryable<Grp_ApprovalTravelDetails>().Where(x => x.IsDel == 0 && x.ParentId == item.Id).ToList();
|
|
|
|
|
|
SetCells(tableOne, doc, SetIndex, 0, textTime);
|
|
|
-
|
|
|
+
|
|
|
SetIndex++;
|
|
|
|
|
|
if (ChiRep.Count > 0)
|
|
@@ -13100,7 +13138,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
|
|
|
if (val.Contains("\r\n"))
|
|
|
{
|
|
|
- var spArr = val.Split("\r\n").Where(x=>!string.IsNullOrWhiteSpace(x));
|
|
|
+ var spArr = val.Split("\r\n").Where(x => !string.IsNullOrWhiteSpace(x));
|
|
|
foreach (var item in spArr)
|
|
|
{
|
|
|
//新建一个段落
|
|
@@ -13179,7 +13217,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
|
|
|
if (param.ContainsKey("isJson"))
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
if (headValues != null)
|
|
@@ -13229,7 +13267,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
client.Dispose();
|
|
|
}
|
|
|
|
|
|
- return Ok(jw);
|
|
|
+ return Ok(jw);
|
|
|
}
|
|
|
|
|
|
#endregion
|