Bläddra i källkod

OpDecreasePayments 合并

LEIYI 1 månad sedan
förälder
incheckning
fda0829ed0

+ 5 - 0
OASystem/OASystem.Domain/Dtos/Groups/DecreasePaymentsDto.cs

@@ -152,6 +152,11 @@ namespace OASystem.Domain.Dtos.Groups
         /// OTA订单号NO
         /// </summary>
         public string OTAOrderNo { get; set; }
+
+        /// <summary>
+        /// 是否为选择的费用
+        /// </summary>
+        public int IsSelect { get; set; } 
     }
     public class DecreasePaymentsByIdDto
     {

+ 5 - 0
OASystem/OASystem.Domain/Entities/Groups/Grp_DecreasePayments.cs

@@ -109,5 +109,10 @@ namespace OASystem.Domain.Entities.Groups
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "varchar(200)")]
         public string OTAOrderNo { get; set; }
+
+        /// <summary>
+        /// 是否为选择的费用
+        /// </summary>
+        public int IsSelect { get; set; }
     }
 }

+ 5 - 0
OASystem/OASystem.Domain/ViewModels/Financial/Fin_ForeignReceivablesView.cs

@@ -201,6 +201,11 @@ namespace OASystem.Domain.ViewModels.Financial
         /// </summary>
         public int Currency { get; set; }
 
+        /// <summary>
+        /// 币种Str
+        /// </summary>
+        public int CurrencyStr { get; set; }
+
         /// <summary>
         /// 添加方式   
         /// 0 - 账单模块   1 - 预算成本页面添加

+ 3 - 2
OASystem/OASystem.Infrastructure/Repositories/Financial/ForeignReceivablesRepository.cs

@@ -408,9 +408,10 @@ namespace OASystem.Infrastructure.Repositories.Financial
 
 
             //应收款项
-            string groupReceivedSql = string.Format(@"Select *,su.CnName As AuditorName From Fin_ForeignReceivables  ffr
+            string groupReceivedSql = string.Format(@"Select *,su.CnName As AuditorName, ssd.Name  as 'CurrencyStr'  From Fin_ForeignReceivables  ffr
 Left Join Sys_Users su On  ffr.Auditor = su.Id
-Where ffr.IsDel=0 And ffr.Diid={0}", dto.DiId);
+Where ffr.IsDel=0 And ffr.Diid={0}
+LEFT JOIN  Sys_SetData ssd  on ffr.Currency  = ssd.Id  AND  ssd.IsDel  = 0", dto.DiId);
             var groupReceivedList = await _sqlSugar.SqlQueryable<ProceedsReceivedNewView>(groupReceivedSql).ToListAsync();
 
             result.Code = 200;

+ 6 - 4
OASystem/OASystem.Infrastructure/Repositories/Groups/DecreasePaymentsRepository.cs

@@ -23,11 +23,13 @@ namespace OASystem.Infrastructure.Repositories.Groups
     {
         private readonly IMapper _mapper;
         private readonly TeamRateRepository _teamRateRep;
-        public DecreasePaymentsRepository(SqlSugarClient sqlSugar, IMapper mapper, TeamRateRepository teamRateRep)
+        private readonly SetDataRepository _setDataRepository;
+        public DecreasePaymentsRepository(SqlSugarClient sqlSugar, IMapper mapper, TeamRateRepository teamRateRep, SetDataRepository setDataRepository )
             : base(sqlSugar)
         {
             this._mapper = mapper;
             _teamRateRep = teamRateRep;
+            this._setDataRepository = setDataRepository;
         }
         /// <summary>
         /// 根据团组Id查询数据
@@ -159,7 +161,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 grp_Decrease.FeeTotal = grp_Decrease.Price * grp_Decrease.Price;
             }
 
-            var teamRates = await _teamRateRep.PostGroupTeamRateItemByDiIdAndCTableId(1, dto.DiId, 98);
+            List<TeamRateDescAddCurrencyIdView> teamRates = await _teamRateRep.PostGroupTeamRateItemByDiIdAndCTableId(1, dto.DiId, 98);
             if (dto.Status == 1)//添加
             {
                 string selectSql = string.Format(@"select * from Grp_DecreasePayments where PriceName='{0}' and IsDel={1} and DiId={2}"
@@ -207,7 +209,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                     C.IsAuditMF = 0;
                     C.AuditMFOperate = 0;
                     C.AuditMFDate = "";
-                    C.IsAuditGM = 0;
+                    C.IsAuditGM = auto ? 3 : 0;
                     C.AuditGMOperate = 21;
                     C.AuditGMDate = "";
 
@@ -331,7 +333,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                                                         OrbitalPrivateTransfer = dto.OrbitalPrivateTransfer,
                                                         DayRate = grp_CreditCardPayment.DayRate,
                                                         RMBPrice = grp_CreditCardPayment.RMBPrice,
-
+                                                        IsAuditGM = auto ? 3 : grp_CreditCardPayment.IsAuditGM
                                                     })
                                                     .ExecuteCommandAsync();
                         if (CTable > 0)