|
|
@@ -515,7 +515,7 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
var isAudit = _dto.isAudit;
|
|
|
var isAuditSql = string.Format($" AND (ccp.IsAuditGM = 1 OR ccp.IsAuditGM = 3) ");
|
|
|
- var isAuditStatus = new int[] {
|
|
|
+ var isAuditStatus = new int[] {
|
|
|
1, //已通过
|
|
|
3, //自动审核
|
|
|
};
|
|
|
@@ -836,7 +836,7 @@ ORDER BY
|
|
|
Left Join Sys_SetData sd3 On ccp.CTDId = sd3.Id
|
|
|
Left Join Sys_SetData sd4 On atr.CType = sd4.Id
|
|
|
Left Join Sys_Users u On ccp.CreateUserId = u.Id
|
|
|
- Where atr.IsDel = 0 {1} And atr.DiId = {0} Order By CreateTime",
|
|
|
+ Where atr.IsDel = 0 {1} And atr.DiId = {0} Order By CreateTime",
|
|
|
_dto.DiId, _dto.isAudit ? isAuditSql : string.Empty);
|
|
|
groupAirFeeViews = await _sqlSugar.SqlQueryable<GroupAirFeeView>(groupAirFeeSql).ToListAsync();
|
|
|
|
|
|
@@ -997,7 +997,91 @@ ORDER BY
|
|
|
AirCNYTotalPrice += item.CNYPrice;
|
|
|
}
|
|
|
|
|
|
- _geView.GroupAirFeeViews = groupAirFeeViews;
|
|
|
+ #region 加载机票附加服务费用
|
|
|
+
|
|
|
+ List<GroupAirFeeView> groupFeeFinalList = new List<GroupAirFeeView>();
|
|
|
+ decimal aadiFeeTotalPrice = 0.00M;
|
|
|
+ foreach (var rItem in groupAirFeeViews)
|
|
|
+ {
|
|
|
+ groupFeeFinalList.Add(rItem);
|
|
|
+ #region 强制赋值
|
|
|
+ string aadiFeeSql = string.Format(@"Select aads.Id As AirId, {1} As AirDiId, '-' As FlightsCode,'-' As FlightsCity,'-' As AirTypeName,
|
|
|
+ '-' As FlightsDate,'-' As FlightsTime,aads.ClientId As ClientName,1 As ClientNum,ccp.PayMoney,
|
|
|
+ sd1.Name As PayMoneyCurrency,(((ccp.PayMoney * ccp.DayRate) / ccp.PayPercentage) * 100) As CNYPrice,ccp.DayRate,ccp.Payee,ccp.AuditGMDate,
|
|
|
+ ccp.OrbitalPrivateTransfer,sd2.Name As PayWay,sd3.Name As CardType,ccp.IsPay,u.CnName As Applicant,aads.CreateTime,
|
|
|
+ aads.SysTypeId As CType
|
|
|
+ From Grp_AirAdditionServices aads
|
|
|
+ Inner Join Grp_CreditCardPayment ccp On ccp.isdel = 0 And ccp.CTable In (1561,1562,1563,1564,1565,1566) And aads.Id = ccp.CId
|
|
|
+ Left Join Sys_SetData sd1 On ccp.PaymentCurrency = sd1.Id
|
|
|
+ Left Join Sys_SetData sd2 On ccp.PayDId = sd2.Id
|
|
|
+ Left Join Sys_SetData sd3 On ccp.CTDId = sd3.Id
|
|
|
+ Left Join Sys_Users u On ccp.CreateUserId = u.Id
|
|
|
+ Where aads.IsDel = 0 And aads.ResId = {0} {2} Order By aads.CreateTime",
|
|
|
+ rItem.AirId, rItem.AirDiId, _dto.isAudit ? isAuditSql : string.Empty);
|
|
|
+ List<GroupAirFeeView> aadiFeeViews = await _sqlSugar.SqlQueryable<GroupAirFeeView>(aadiFeeSql).ToListAsync();
|
|
|
+
|
|
|
+ foreach (var fjItem in aadiFeeViews)
|
|
|
+ {
|
|
|
+ aadiFeeTotalPrice += fjItem.CNYPrice;
|
|
|
+ AirCNYTotalPrice += fjItem.CNYPrice;
|
|
|
+
|
|
|
+ string itemClientName = "";
|
|
|
+ if (!string.IsNullOrEmpty(fjItem.ClientName))
|
|
|
+ {
|
|
|
+
|
|
|
+
|
|
|
+ System.Text.RegularExpressions.Match m_EnName = Regex.Match(fjItem.ClientName, @"[A-Za-z]+");
|
|
|
+ System.Text.RegularExpressions.Match m_ZHName = Regex.Match(fjItem.ClientName, @"[\u4e00-\u9fa5]");
|
|
|
+
|
|
|
+ if (m_EnName.Success || m_ZHName.Success)
|
|
|
+ {
|
|
|
+ itemClientName = fjItem.ClientName;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ string[] clientIds = Array.Empty<string>();
|
|
|
+ if (fjItem.ClientName.Contains(','))
|
|
|
+ {
|
|
|
+ clientIds = fjItem.ClientName.Split(',');
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ clientIds = new string[] { fjItem.ClientName };
|
|
|
+ }
|
|
|
+ if (clientIds.Length > 0)
|
|
|
+ {
|
|
|
+ int[] output = System.Array.ConvertAll<string, int>(clientIds, delegate (string s) { return int.Parse(s); });
|
|
|
+
|
|
|
+ var clients = _clientDatas.Where(it => output.Contains(it.Id)).ToList();
|
|
|
+ decimal unitCost = 0.00M;
|
|
|
+ unitCost = (fjItem.PayMoney / fjItem.ClientNum).ConvertToDecimal1();
|
|
|
+
|
|
|
+ foreach (var client in clients)
|
|
|
+ {
|
|
|
+ //附加服务类型
|
|
|
+ Sys_SetData tempSd = _setDatas.Where(it => it.Id == fjItem.CType).FirstOrDefault();
|
|
|
+
|
|
|
+ itemClientName += string.Format(@"[{0}]附加服务:{1};", client.LastName + client.FirstName, tempSd?.Name);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ fjItem.ClientName = itemClientName;
|
|
|
+
|
|
|
+
|
|
|
+ if (!string.IsNullOrEmpty(fjItem.AuditGMDate))
|
|
|
+ {
|
|
|
+ fjItem.AuditGMDate = Convert.ToDateTime(fjItem.AuditGMDate).ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ groupFeeFinalList.Add(fjItem);
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ _geView.GroupAirFeeViews = groupFeeFinalList;
|
|
|
if (airClientPris.Count > 0)
|
|
|
{
|
|
|
var peoplePriStr = "";
|
|
|
@@ -1018,6 +1102,8 @@ ORDER BY
|
|
|
airClientPrisIndex++;
|
|
|
}
|
|
|
|
|
|
+ peoplePriStr += $@"\r\n附加服务费用为:{aadiFeeTotalPrice.ToString("#0.00")} CNY;";
|
|
|
+
|
|
|
if (!string.IsNullOrEmpty(peoplePriStr))
|
|
|
{
|
|
|
str = $@"其中:{peoplePriStr}";
|
|
|
@@ -1072,7 +1158,7 @@ ORDER BY
|
|
|
Left Join Sys_SetData sd2 On ccp.PayDId = sd2.Id
|
|
|
Left Join Sys_SetData sd3 On ccp.CTDId = sd3.Id
|
|
|
Left Join Sys_Users u On ccp.CreateUserId = u.Id
|
|
|
- Where vi.IsDel = 0 {1} And vi.DIId = {0} Order By CreateTime",
|
|
|
+ Where vi.IsDel = 0 {1} And vi.DIId = {0} Order By CreateTime",
|
|
|
_dto.DiId, _dto.isAudit ? isAuditSql : string.Empty);
|
|
|
|
|
|
groupVisaFeeViews = await _sqlSugar.SqlQueryable<GroupVisaFeeView>(groupVisaFeeSql).ToListAsync();
|
|
|
@@ -1154,8 +1240,8 @@ ORDER BY
|
|
|
Left Join Sys_SetData sd6 On ioa.TranslateCurrency = sd6.Id
|
|
|
Left Join Sys_SetData sd7 On ccp.PaymentCurrency = sd7.Id
|
|
|
Left Join Sys_Users u On ccp.CreateUserId = u.Id
|
|
|
- Where ioa.IsDel = 0 {1} And ioa.Diid = {0} Order By CreateTime",
|
|
|
- _dto.DiId, _dto.isAudit ? isAuditSql : string.Empty );
|
|
|
+ Where ioa.IsDel = 0 {1} And ioa.Diid = {0} Order By CreateTime",
|
|
|
+ _dto.DiId, _dto.isAudit ? isAuditSql : string.Empty);
|
|
|
|
|
|
groupInvitationalFeeViews = await _sqlSugar.SqlQueryable<GroupInvitationalFeeView>(groupInvitationalFeeSql).ToListAsync();
|
|
|
|
|
|
@@ -1253,7 +1339,7 @@ ORDER BY
|
|
|
Left Join Sys_SetData sd1 On ccp.PaymentCurrency = sd1.Id
|
|
|
Left Join Sys_SetData sd2 On ccp.PayDId = sd2.Id
|
|
|
Left Join Sys_Users u On ccp.CreateUserId = u.Id
|
|
|
- Where ic.IsDel = 0 {1} And ic.DiId = {0} Order By CreateTime",
|
|
|
+ Where ic.IsDel = 0 {1} And ic.DiId = {0} Order By CreateTime",
|
|
|
_dto.DiId, _dto.isAudit ? isAuditSql : string.Empty);
|
|
|
groupInsuranceFeeViews = await _sqlSugar.SqlQueryable<GroupInsuranceFeeView>(groupInsuranceFeeSql).ToListAsync();
|
|
|
|