|
@@ -1416,6 +1416,7 @@ ORDER BY
|
|
|
{
|
|
|
//pageId 38
|
|
|
int currUserId = _dto.UserId, pageId = _dto.PageId, diId = _dto.DiId;
|
|
|
+ //默认查看所有数据
|
|
|
bool isAudit = _dto.isAudit;
|
|
|
|
|
|
#region 参数验证
|
|
@@ -1711,43 +1712,45 @@ ORDER BY
|
|
|
string CTGGRFeeSql = string.Empty;
|
|
|
if (groupInfo.VisitDate > Convert.ToDateTime("2024-04-17"))
|
|
|
{
|
|
|
- CTGGRFeeSql = string.Format(@"Select ctggr.Id As CTGGRId,ctggr.DiId As CTGGRDiId,ctggr.PriceName As Area,ctggrc.*,ctggrc.Price As PayMoney,
|
|
|
- sd2.name As PaymentCurrency,ccp.PayPercentage,
|
|
|
- (ctggrc.Price * (ccp.PayPercentage / 100)) As AmountPaid,
|
|
|
- (ctggrc.Price - ctggrc.Price * (ccp.PayPercentage / 100)) As BalancePayment,
|
|
|
- ccp.DayRate,(ctggrc.Price * (ccp.PayPercentage / 100) * ccp.DayRate) As CNYPrice,ccp.Payee,ccp.AuditGMDate,
|
|
|
- ccp.OrbitalPrivateTransfer,sd1.Name As PayWay,ccp.IsPay,u.CnName As Applicant,ctggr.CreateTime
|
|
|
- From Grp_CarTouristGuideGroundReservations ctggr
|
|
|
- Left Join ( Select cggrc.CTGGRId,sd1.Name As PriceName,cggrc.Price*cggrc.Count As Price,sd2.Name As PriceCurrency,
|
|
|
- cggrc.DatePrice,cggrc.PriceContent
|
|
|
- From Grp_CarTouristGuideGroundReservationsContent cggrc
|
|
|
- Left Join Sys_SetData sd1 On cggrc.SId = sd1.Id
|
|
|
- Left Join Sys_SetData sd2 On cggrc.Currency = sd2.Id
|
|
|
- Where cggrc.ISdel = 0 And cggrc.Price != 0.00
|
|
|
- ) ctggrc On ctggr.Id = ctggrc.CTGGRId
|
|
|
- Left Join Grp_CreditCardPayment ccp On ccp.IsDel = 0 And ccp.CTable = 79 And ctggr.Id = ccp.CId
|
|
|
- Left Join Sys_SetData sd1 On ccp.PayDId = sd1.Id
|
|
|
- Left Join Sys_SetData sd2 On ccp.PaymentCurrency = sd2.Id
|
|
|
- Left Join Sys_Users u On ccp.CreateUserId = u.Id
|
|
|
- Where ctggr.IsDel = 0 {1} And ctggr.DiId = {0}
|
|
|
- Order By CreateTime", _dto.DiId, _dto.isAudit ? "And (ccp.IsAuditGM = 1 OR ccp.IsAuditGM = 3)" : " ");
|
|
|
+ CTGGRFeeSql = string.Format(@"
|
|
|
+Select ctggr.Id As CTGGRId,ctggr.DiId As CTGGRDiId,ctggr.PriceName As Area,ctggrc.*,ctggrc.Price As PayMoney,
|
|
|
+sd2.name As PaymentCurrency,ccp.PayPercentage,
|
|
|
+(ctggrc.Price * (ccp.PayPercentage / 100)) As AmountPaid,
|
|
|
+(ctggrc.Price - ctggrc.Price * (ccp.PayPercentage / 100)) As BalancePayment,
|
|
|
+ccp.DayRate,(ctggrc.Price * (ccp.PayPercentage / 100) * ccp.DayRate) As CNYPrice,ccp.Payee,ccp.AuditGMDate,
|
|
|
+ccp.OrbitalPrivateTransfer,sd1.Name As PayWay,ccp.IsPay,u.CnName As Applicant,ctggr.CreateTime
|
|
|
+From Grp_CarTouristGuideGroundReservations ctggr
|
|
|
+Left Join ( Select cggrc.CTGGRId,sd1.Name As PriceName,cggrc.Price*cggrc.Count As Price,sd2.Name As PriceCurrency,
|
|
|
+cggrc.DatePrice,cggrc.PriceContent
|
|
|
+From Grp_CarTouristGuideGroundReservationsContent cggrc
|
|
|
+Left Join Sys_SetData sd1 On cggrc.SId = sd1.Id
|
|
|
+Left Join Sys_SetData sd2 On cggrc.Currency = sd2.Id
|
|
|
+Where cggrc.ISdel = 0 And cggrc.Price != 0.00
|
|
|
+) ctggrc On ctggr.Id = ctggrc.CTGGRId
|
|
|
+Left Join Grp_CreditCardPayment ccp On ccp.IsDel = 0 And ccp.CTable = 79 And ctggr.Id = ccp.CId
|
|
|
+Left Join Sys_SetData sd1 On ccp.PayDId = sd1.Id
|
|
|
+Left Join Sys_SetData sd2 On ccp.PaymentCurrency = sd2.Id
|
|
|
+Left Join Sys_Users u On ccp.CreateUserId = u.Id
|
|
|
+Where ctggr.IsDel = 0 {1} And ctggr.DiId = {0}
|
|
|
+Order By CreateTime", _dto.DiId, _dto.isAudit ? "And (ccp.IsAuditGM = 1 OR ccp.IsAuditGM = 3)" : " ");
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- CTGGRFeeSql = string.Format(@"Select ctggr.Id As CTGGRId,ctggr.DiId As CTGGRDiId,ctggr.PriceName As Area,
|
|
|
- ccp.PayMoney,sd2.name As PaymentCurrency,ccp.PayPercentage,
|
|
|
- (ccp.PayMoney * (ccp.PayPercentage / 100)) As AmountPaid,
|
|
|
- (ccp.PayMoney -ccp.PayMoney * (ccp.PayPercentage / 100)) As BalancePayment,
|
|
|
- ccp.DayRate,(ccp.PayMoney * (ccp.PayPercentage / 100) * ccp.DayRate) As CNYPrice,
|
|
|
- ccp.Payee,ccp.AuditGMDate,
|
|
|
- ccp.OrbitalPrivateTransfer,sd1.Name As PayWay,ccp.IsPay,u.CnName As Applicant,ctggr.CreateTime
|
|
|
- From Grp_CarTouristGuideGroundReservations ctggr
|
|
|
- Left Join Grp_CreditCardPayment ccp On ccp.IsDel = 0 And ccp.CTable = 79 And ctggr.Id = ccp.CId
|
|
|
- Left Join Sys_SetData sd1 On ccp.PayDId = sd1.Id
|
|
|
- Left Join Sys_SetData sd2 On ccp.PaymentCurrency = sd2.Id
|
|
|
- Left Join Sys_Users u On ccp.CreateUserId = u.Id
|
|
|
- Where ctggr.IsDel = 0 {1} And ctggr.DiId = {0}
|
|
|
- Order By CreateTime", _dto.DiId, _dto.isAudit ? "And (ccp.IsAuditGM = 1 OR ccp.IsAuditGM = 3)" : " ");
|
|
|
+ CTGGRFeeSql = string.Format(@"
|
|
|
+Select ctggr.Id As CTGGRId,ctggr.DiId As CTGGRDiId,ctggr.PriceName As Area,
|
|
|
+ccp.PayMoney,sd2.name As PaymentCurrency,ccp.PayPercentage,
|
|
|
+(ccp.PayMoney * (ccp.PayPercentage / 100)) As AmountPaid,
|
|
|
+(ccp.PayMoney -ccp.PayMoney * (ccp.PayPercentage / 100)) As BalancePayment,
|
|
|
+ccp.DayRate,(ccp.PayMoney * (ccp.PayPercentage / 100) * ccp.DayRate) As CNYPrice,
|
|
|
+ccp.Payee,ccp.AuditGMDate,
|
|
|
+ccp.OrbitalPrivateTransfer,sd1.Name As PayWay,ccp.IsPay,u.CnName As Applicant,ctggr.CreateTime
|
|
|
+From Grp_CarTouristGuideGroundReservations ctggr
|
|
|
+Left Join Grp_CreditCardPayment ccp On ccp.IsDel = 0 And ccp.CTable = 79 And ctggr.Id = ccp.CId
|
|
|
+Left Join Sys_SetData sd1 On ccp.PayDId = sd1.Id
|
|
|
+Left Join Sys_SetData sd2 On ccp.PaymentCurrency = sd2.Id
|
|
|
+Left Join Sys_Users u On ccp.CreateUserId = u.Id
|
|
|
+Where ctggr.IsDel = 0 {1} And ctggr.DiId = {0}
|
|
|
+Order By CreateTime", _dto.DiId, _dto.isAudit ? "And (ccp.IsAuditGM = 1 OR ccp.IsAuditGM = 3)" : " ");
|
|
|
}
|
|
|
|
|
|
var groupOPFeeViews = await _sqlSugar.SqlQueryable<GroupCTGGRFeeView>(CTGGRFeeSql).ToListAsync();
|
|
@@ -1816,18 +1819,19 @@ ORDER BY
|
|
|
#region 签证费用
|
|
|
if (visaFeeSheet != null)
|
|
|
{
|
|
|
- string groupVisaFeeSql = string.Format(@"Select vi.Id As VisaId,vi.DIId As VisaDiId,vi.VisaClient,ccp.PayMoney,sd1.Name As PayMoneyCurrency,
|
|
|
- ccp.DayRate,ccp.Payee,ccp.AuditGMDate,sd2.Name As PaymentModes,sd3.Name As CardTypeName,u.CnName As Applicant,vi.CreateTime,
|
|
|
- (((ccp.PayMoney * ccp.DayRate) / ccp.PayPercentage) * 100) As CNYPrice,ccp.ConsumptionDate,
|
|
|
- Case When ccp.OrbitalPrivateTransfer = 0 Then '公转' Else '私转' End As CostMark,
|
|
|
- Case When ccp.IsPay = 0 Then '未付款' Else '已付款' End As IsPay,vi.Remark
|
|
|
- From Grp_VisaInfo vi
|
|
|
- Left Join Grp_CreditCardPayment ccp On ccp.isdel = 0 And ccp.CTable = 80 And vi.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 vi.IsDel = 0 {1} And vi.DIId = {0} Order By CreateTime", diId, isAudit ? "And ccp.IsAuditGM = 1" : " ");
|
|
|
+ string groupVisaFeeSql = string.Format(@"
|
|
|
+Select vi.Id As VisaId,vi.DIId As VisaDiId,vi.VisaClient,ccp.PayMoney,sd1.Name As PayMoneyCurrency,
|
|
|
+ccp.DayRate,ccp.Payee,ccp.AuditGMDate,sd2.Name As PaymentModes,sd3.Name As CardTypeName,u.CnName As Applicant,vi.CreateTime,
|
|
|
+(((ccp.PayMoney * ccp.DayRate) / ccp.PayPercentage) * 100) As CNYPrice,ccp.ConsumptionDate,
|
|
|
+Case When ccp.OrbitalPrivateTransfer = 0 Then '公转' Else '私转' End As CostMark,
|
|
|
+Case When ccp.IsPay = 0 Then '未付款' Else '已付款' End As IsPay,vi.Remark
|
|
|
+From Grp_VisaInfo vi
|
|
|
+Left Join Grp_CreditCardPayment ccp On ccp.isdel = 0 And ccp.CTable = 80 And vi.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 vi.IsDel = 0 {1} And vi.DIId = {0} Order By CreateTime", diId, isAudit ? "AND (ccp.IsAuditGM = 1 Or ccp.IsAuditGM = 3)" : " ");
|
|
|
|
|
|
var groupVisaFeeViews = _sqlSugar.SqlQueryable<GroupVisaFeeExcelView>(groupVisaFeeSql).ToList();
|
|
|
|
|
@@ -1877,24 +1881,25 @@ ORDER BY
|
|
|
|
|
|
if (OAFeeSheet != null)
|
|
|
{
|
|
|
- string feeSql = string.Format(@"Select ioa.Id As IOAId,ioa.DiId As IOADiId,ioa.InviterArea,ioa.Inviter,CONVERT(DATE, ioa.InviteTime) AS InviteTime,
|
|
|
- ioa.InviteCost,sd3.Name As InviteCurrency,ioa.SendCost,sd4.Name As SendCurrency,ioa.EventsCost,
|
|
|
- sd5.Name As EventsCurrency,ioa.TranslateCost,sd6.Name As TranslateCurrency,ccp.PayMoney,
|
|
|
- sd7.Name As PaymentCurrency,ccp.RMBPrice As CNYPrice,ccp.ConsumptionDate,
|
|
|
- Case When ccp.OrbitalPrivateTransfer = 0 Then '公转' Else '私转' End As CostMark,
|
|
|
- Case When ccp.IsPay = 0 Then '未付款' Else '已付款' End As IsPay,sd2.Name As PaymentModes,
|
|
|
- ccp.Payee,ioa.Remark,ccp.AuditGMDate,u.CnName As Applicant,ioa.CreateTime
|
|
|
- From Grp_InvitationOfficialActivities ioa
|
|
|
- Left Join Grp_CreditCardPayment ccp On ccp.isdel = 0 And ccp.CTable = 81 And ioa.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 ioa.InviteCurrency = sd3.Id
|
|
|
- Left Join Sys_SetData sd4 On ioa.SendCurrency = sd4.Id
|
|
|
- Left Join Sys_SetData sd5 On ioa.EventsCurrency = sd5.Id
|
|
|
- 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", diId, isAudit ? "And ccp.IsAuditGM = 1" : " ");
|
|
|
+ string feeSql = string.Format(@"
|
|
|
+Select ioa.Id As IOAId,ioa.DiId As IOADiId,ioa.InviterArea,ioa.Inviter,CONVERT(DATE, ioa.InviteTime) AS InviteTime,
|
|
|
+ioa.InviteCost,sd3.Name As InviteCurrency,ioa.SendCost,sd4.Name As SendCurrency,ioa.EventsCost,
|
|
|
+sd5.Name As EventsCurrency,ioa.TranslateCost,sd6.Name As TranslateCurrency,ccp.PayMoney,
|
|
|
+sd7.Name As PaymentCurrency,ccp.RMBPrice As CNYPrice,ccp.ConsumptionDate,
|
|
|
+Case When ccp.OrbitalPrivateTransfer = 0 Then '公转' Else '私转' End As CostMark,
|
|
|
+Case When ccp.IsPay = 0 Then '未付款' Else '已付款' End As IsPay,sd2.Name As PaymentModes,
|
|
|
+ccp.Payee,ioa.Remark,ccp.AuditGMDate,u.CnName As Applicant,ioa.CreateTime
|
|
|
+From Grp_InvitationOfficialActivities ioa
|
|
|
+Left Join Grp_CreditCardPayment ccp On ccp.isdel = 0 And ccp.CTable = 81 And ioa.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 ioa.InviteCurrency = sd3.Id
|
|
|
+Left Join Sys_SetData sd4 On ioa.SendCurrency = sd4.Id
|
|
|
+Left Join Sys_SetData sd5 On ioa.EventsCurrency = sd5.Id
|
|
|
+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", diId, isAudit ? "AND (ccp.IsAuditGM = 1 Or ccp.IsAuditGM = 3)" : " ");
|
|
|
|
|
|
var feeViews = _sqlSugar.SqlQueryable<GroupOAFeeExcelView>(feeSql).ToList();
|
|
|
|
|
@@ -1909,21 +1914,22 @@ ORDER BY
|
|
|
|
|
|
if (airTicketFeeSheet != null)
|
|
|
{
|
|
|
- string feeSql = string.Format(@"Select atr.Id As AirId,atr.DIId As AirDiId,atr.FlightsCode,atr.FlightsCity,
|
|
|
- sd4.Name As AirTypeName,atr.FlightsDate,atr.FlightsTime,atr.ClientName,atr.ClientNum,
|
|
|
- atr.PriceDescription,ccp.PayMoney,ccp.DayRate,sd1.Name As PayMoneyCurrency,
|
|
|
- (((ccp.PayMoney * ccp.DayRate) / ccp.PayPercentage) * 100) As CNYPrice,ccp.ConsumptionDate,
|
|
|
- ccp.Payee,Case When ccp.OrbitalPrivateTransfer = 0 Then '公转' Else '私转' End As CostMark,
|
|
|
- Case When ccp.IsPay = 0 Then '未付款' Else '已付款' End As IsPay,sd2.Name As PaymentModes,
|
|
|
- sd3.Name As CardType,ccp.AuditGMDate,u.CnName As Applicant,atr.CreateTime,atr.Remark
|
|
|
- From Grp_AirTicketReservations atr
|
|
|
- Left Join Grp_CreditCardPayment ccp On ccp.isdel = 0 And ccp.CTable = 85 And atr.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_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", diId, isAudit ? "And ccp.IsAuditGM = 1" : " ");
|
|
|
+ string feeSql = string.Format(@"
|
|
|
+Select atr.Id As AirId,atr.DIId As AirDiId,atr.FlightsCode,atr.FlightsCity,
|
|
|
+sd4.Name As AirTypeName,atr.FlightsDate,atr.FlightsTime,atr.ClientName,atr.ClientNum,
|
|
|
+atr.PriceDescription,ccp.PayMoney,ccp.DayRate,sd1.Name As PayMoneyCurrency,
|
|
|
+(((ccp.PayMoney * ccp.DayRate) / ccp.PayPercentage) * 100) As CNYPrice,ccp.ConsumptionDate,
|
|
|
+ccp.Payee,Case When ccp.OrbitalPrivateTransfer = 0 Then '公转' Else '私转' End As CostMark,
|
|
|
+Case When ccp.IsPay = 0 Then '未付款' Else '已付款' End As IsPay,sd2.Name As PaymentModes,
|
|
|
+sd3.Name As CardType,ccp.AuditGMDate,u.CnName As Applicant,atr.CreateTime,atr.Remark
|
|
|
+From Grp_AirTicketReservations atr
|
|
|
+Left Join Grp_CreditCardPayment ccp On ccp.isdel = 0 And ccp.CTable = 85 And atr.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_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", diId, isAudit ? "AND (ccp.IsAuditGM = 1 Or ccp.IsAuditGM = 3)" : " ");
|
|
|
|
|
|
var feeViews = _sqlSugar.SqlQueryable<GroupAirTicketExcelView>(feeSql).ToList();
|
|
|
|
|
@@ -1938,17 +1944,18 @@ ORDER BY
|
|
|
|
|
|
if (insureFeeSheet != null)
|
|
|
{
|
|
|
- string feeSql = string.Format(@"Select ic.Id As InsuranceId,ic.Diid As InsuranceDiId,ClientName,ccp.PayMoney,
|
|
|
- sd1.Name As PayMoneyCurrency,ccp.DayRate,ccp.PayMoney * ccp.DayRate As CNYPrice,ccp.ConsumptionDate,
|
|
|
- Case When ccp.OrbitalPrivateTransfer = 0 Then '公转' Else '私转' End As CostMark,
|
|
|
- Case When ccp.IsPay = 0 Then '未付款' Else '已付款' End As IsPay,sd2.Name As PaymentModes,
|
|
|
- ccp.Payee,ccp.AuditGMDate,u.CnName As Applicant,ic.CreateTime,ic.Remark
|
|
|
- From Grp_Customers ic
|
|
|
- Left Join Grp_CreditCardPayment ccp On ccp.isdel = 0 And ccp.CTable = 82 And ic.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_Users u On ccp.CreateUserId = u.Id
|
|
|
- Where ic.IsDel = 0 {1} And ic.DiId = {0} Order By CreateTime", diId, isAudit ? "And ccp.IsAuditGM = 1" : " ");
|
|
|
+ string feeSql = string.Format(@"
|
|
|
+Select ic.Id As InsuranceId,ic.Diid As InsuranceDiId,ClientName,ccp.PayMoney,
|
|
|
+sd1.Name As PayMoneyCurrency,ccp.DayRate,ccp.PayMoney * ccp.DayRate As CNYPrice,ccp.ConsumptionDate,
|
|
|
+Case When ccp.OrbitalPrivateTransfer = 0 Then '公转' Else '私转' End As CostMark,
|
|
|
+Case When ccp.IsPay = 0 Then '未付款' Else '已付款' End As IsPay,sd2.Name As PaymentModes,
|
|
|
+ccp.Payee,ccp.AuditGMDate,u.CnName As Applicant,ic.CreateTime,ic.Remark
|
|
|
+From Grp_Customers ic
|
|
|
+Left Join Grp_CreditCardPayment ccp On ccp.isdel = 0 And ccp.CTable = 82 And ic.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_Users u On ccp.CreateUserId = u.Id
|
|
|
+Where ic.IsDel = 0 {1} And ic.DiId = {0} Order By CreateTime", diId, isAudit ? "AND (ccp.IsAuditGM = 1 Or ccp.IsAuditGM = 3)" : " ");
|
|
|
|
|
|
var feeViews = _sqlSugar.SqlQueryable<GroupInsureExcelView>(feeSql).ToList();
|
|
|
|
|
@@ -2001,18 +2008,19 @@ ORDER BY
|
|
|
|
|
|
if (insureFeeSheet != null)
|
|
|
{
|
|
|
- string feeSql = string.Format(@"Select dp.Id As DPId,dp.DiId As DPDiId,dp.PriceName,ccp.PayMoney,sd1.Name As PayMoneyCurrency,
|
|
|
- ccp.DayRate,(((ccp.PayMoney * ccp.DayRate) / ccp.PayPercentage) * 100) As CNYPrice,ccp.ConsumptionDate,
|
|
|
- Case When ccp.OrbitalPrivateTransfer = 0 Then '公转' Else '私转' End As CostMark,
|
|
|
- Case When ccp.IsPay = 0 Then '未付款' Else '已付款' End As IsPay,sd2.Name As PaymentModes,
|
|
|
- ccp.Payee,ccp.AuditGMDate,u.CnName As Applicant,dp.CreateTime,dp.Remark
|
|
|
- From Grp_DecreasePayments dp
|
|
|
- Left Join Grp_CreditCardPayment ccp On ccp.isdel = 0 And ccp.CTable = 98 And dp.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_Users u On ccp.CreateUserId = u.Id
|
|
|
- Where dp.IsDel = 0 And ccp.Ctable = 98 {1} And dp.Diid = {0}
|
|
|
- Order By CreateTime", diId, isAudit ? "And ccp.IsAuditGM = 1" : " ");
|
|
|
+ string feeSql = string.Format(@"
|
|
|
+Select dp.Id As DPId,dp.DiId As DPDiId,dp.PriceName,ccp.PayMoney,sd1.Name As PayMoneyCurrency,
|
|
|
+ccp.DayRate,(((ccp.PayMoney * ccp.DayRate) / ccp.PayPercentage) * 100) As CNYPrice,ccp.ConsumptionDate,
|
|
|
+Case When ccp.OrbitalPrivateTransfer = 0 Then '公转' Else '私转' End As CostMark,
|
|
|
+Case When ccp.IsPay = 0 Then '未付款' Else '已付款' End As IsPay,sd2.Name As PaymentModes,
|
|
|
+ccp.Payee,ccp.AuditGMDate,u.CnName As Applicant,dp.CreateTime,dp.Remark
|
|
|
+From Grp_DecreasePayments dp
|
|
|
+Left Join Grp_CreditCardPayment ccp On ccp.isdel = 0 And ccp.CTable = 98 And dp.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_Users u On ccp.CreateUserId = u.Id
|
|
|
+Where dp.IsDel = 0 And ccp.Ctable = 98 {1} And dp.Diid = {0}
|
|
|
+Order By CreateTime", diId, isAudit ? "AND (ccp.IsAuditGM = 1 Or ccp.IsAuditGM = 3)" : " ");
|
|
|
|
|
|
var feeViews = _sqlSugar.SqlQueryable<GroupOtherFeeExcelView>(feeSql).ToList();
|
|
|
|