Pārlūkot izejas kodu

团组报表添加参数

yuanrf 7 mēneši atpakaļ
vecāks
revīzija
e9a8b6fc81

+ 13 - 13
OASystem/OASystem.Api/Controllers/StatisticsController.cs

@@ -237,7 +237,7 @@ namespace OASystem.API.Controllers
                                                 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 ccp.IsDel = 0 And ccp.CTable = 1015 And ccp.IsAuditGM = 1 And ccp.IsPay = 1 And ccp.DiId = {0} Order By CreateTime", _dto.DiId);
+												Where ccp.IsDel = 0 And ccp.CTable = 1015 {1} And ccp.IsPay = 1 And ccp.DiId = {0} Order By CreateTime", _dto.DiId ,_dto.isAudit ? "And ccp.IsAuditGM = 1" : " ");
 
                 List<Gsd_ExtraCostsView> _ExtraCostsViews = await _sqlSugar.SqlQueryable<Gsd_ExtraCostsView>(_ecSql).ToListAsync();
 
@@ -300,8 +300,8 @@ namespace OASystem.API.Controllers
 										         Left Join Grp_CreditCardPayment ccp On prom.DiId = ccp.DIId And prom.Id = ccp.CId
 										         Left Join Sys_Users u On ccp.CreateUserId = u.Id
 										         Where prom.IsDel = 0  And prom.PayType = 1 And ccp.CTable = 285
-										         And ccp.IsAuditGM = 1 And ccp.IsPay = 1
-										         And prom.DiId = {0} Order By PrCreateTime", _dto.DiId);
+										         {1} And ccp.IsPay = 1
+										         And prom.DiId = {0} Order By PrCreateTime", _dto.DiId, _dto.isAudit ? "And ccp.IsAuditGM = 1" : " ");
                 var _promDatas = await _sqlSugar.SqlQueryable<Gsd_PaymentRefundAndOtherMoneyDataSource1View>(_ropSql).ToListAsync();
 
                 foreach (var ropItem in _promDatas)
@@ -425,8 +425,8 @@ namespace OASystem.API.Controllers
                                                      Left Join Sys_SetData sd4 On hr.BreakfastCurrency = sd4.Id
                                                      Left Join Sys_SetData sd5 On hr.GovernmentRentCurrency = sd5.Id
                                                      Left Join Sys_SetData sd6 On hr.CityTaxCurrency = sd6.Id
-                                                     Where hr.IsDel = 0 And ccp.IsDel = 0 And ccp.CTable = 76 And ccp.IsAuditGM = 1 And ccp.PayMoney<> 0 And hr.DiId = {0} 
-                                                     Order By CheckInDate Asc", _dto.DiId);
+                                                     Where hr.IsDel = 0 And ccp.IsDel = 0 And ccp.CTable = 76 {1} And ccp.PayMoney<> 0 And hr.DiId = {0} 
+                                                     Order By CheckInDate Asc", _dto.DiId , _dto.isAudit ? "And ccp.IsAuditGM = 1" : " ");
 
                 groupHotelFeeViews = await _sqlSugar.SqlQueryable<GroupHotelFeeView>(hotelFeeSql).ToListAsync();
 
@@ -592,8 +592,8 @@ namespace OASystem.API.Controllers
                                                      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 And ccp.IsAuditGM = 1 And ctggr.DiId = {0}
-                                                     Order By CreateTime", _dto.DiId);
+                                                     Where ctggr.IsDel = 0 {1} And ctggr.DiId = {0}
+                                                     Order By CreateTime", _dto.DiId, _dto.isAudit ? "And ccp.IsAuditGM = 1" : " ");
 
                 groupCTGGRFeeViews = await _sqlSugar.SqlQueryable<GroupCTGGRFeeView>(CTGGRFeeSql).ToListAsync();
 
@@ -683,7 +683,7 @@ namespace OASystem.API.Controllers
                                                         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 And ccp.IsAuditGM = 1 And atr.DiId = {0} Order By CreateTime", _dto.DiId);
+                                                        Where atr.IsDel = 0 {1} And atr.DiId = {0} Order By CreateTime", _dto.DiId, _dto.isAudit ? "And ccp.IsAuditGM = 1" : " ");
                 groupAirFeeViews = await _sqlSugar.SqlQueryable<GroupAirFeeView>(groupAirFeeSql).ToListAsync();
 
                 string str = "";
@@ -894,7 +894,7 @@ namespace OASystem.API.Controllers
                                                          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 And ccp.IsAuditGM = 1 And vi.DIId = {0} Order By CreateTime", _dto.DiId);
+                                                         Where vi.IsDel = 0 {1} And vi.DIId = {0} Order By CreateTime", _dto.DiId, _dto.isAudit ? "And ccp.IsAuditGM = 1" : " ");
 
                 groupVisaFeeViews = await _sqlSugar.SqlQueryable<GroupVisaFeeView>(groupVisaFeeSql).ToListAsync();
 
@@ -974,7 +974,7 @@ namespace OASystem.API.Controllers
                                                                  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 And ccp.IsAuditGM = 1 And  ioa.Diid = {0} Order By CreateTime", _dto.DiId);
+                                                                 Where ioa.IsDel = 0 {1} And  ioa.Diid = {0} Order By CreateTime", _dto.DiId, _dto.isAudit ? "And ccp.IsAuditGM = 1" : " ");
 
                 groupInvitationalFeeViews = await _sqlSugar.SqlQueryable<GroupInvitationalFeeView>(groupInvitationalFeeSql).ToListAsync();
 
@@ -1072,7 +1072,7 @@ namespace OASystem.API.Controllers
                                                               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 And ccp.IsAuditGM = 1 And ic.DiId = {0} Order By CreateTime", _dto.DiId);
+                                                              Where ic.IsDel = 0 {1} And ic.DiId = {0} Order By CreateTime", _dto.DiId, _dto.isAudit ? "And ccp.IsAuditGM = 1" : " ");
                 groupInsuranceFeeViews = await _sqlSugar.SqlQueryable<GroupInsuranceFeeView>(groupInsuranceFeeSql).ToListAsync();
 
                 decimal InsuranceCNYTotalPrice = 0.00M;
@@ -1156,8 +1156,8 @@ namespace OASystem.API.Controllers
                                                              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 And ccp.IsAuditGM = 1 And dp.Diid = {0} 
-                                                             Order By CreateTime", _dto.DiId);
+                                                             Where dp.IsDel = 0 And ccp.Ctable = 98 {1} And dp.Diid = {0} 
+                                                             Order By CreateTime", _dto.DiId, _dto.isAudit ? "And ccp.IsAuditGM = 1" : " ");
                 groupDecreaseFeeViews = await _sqlSugar.SqlQueryable<GroupDecreaseFeeView>(groupDecreaseFeeSql).ToListAsync();
 
                 #region 保险费用 - 模拟数据

+ 5 - 0
OASystem/OASystem.Domain/Dtos/Statistics/GroupStatementDto.cs

@@ -39,6 +39,11 @@ namespace OASystem.Domain.Dtos.Statistics
         /// 团组Id
         /// </summary>
         public int DiId { get; set; }
+
+        /// <summary>
+        /// 是否审核
+        /// </summary>
+        public bool isAudit { get; set; }
     }
 
     /// <summary>