Browse Source

修改部分字段

yuanrf 1 year ago
parent
commit
fb4cf6fc78

+ 3 - 3
OASystem/OASystem.Domain/Dtos/Groups/InvitationOfficialActivitiesListDto.cs

@@ -75,7 +75,7 @@ namespace OASystem.Domain.Dtos.Groups
         /// <summary>
         /// 邀请时间
         /// </summary>
-        public DateTime InviteTime { get; set; }
+        public string InviteTime { get; set; }
 
         /// <summary>
         /// 附件
@@ -85,12 +85,12 @@ namespace OASystem.Domain.Dtos.Groups
         /// <summary>
         /// 邀请费用
         /// </summary>
-        public decimal InviteCosts { get; set; }
+        public decimal InviteCost { get; set; }
 
         /// <summary>
         /// 币种
         /// </summary>
-        public int Currency { get; set; }
+        public int inviteCurrency { get; set; }
 
         /// <summary>
         /// 快递费用

+ 2 - 2
OASystem/OASystem.Domain/ViewModels/Groups/InvitationOfficialActivitiesByIdView.cs

@@ -53,12 +53,12 @@ namespace OASystem.Domain.ViewModels.Groups
         /// <summary>
         /// 邀请费用
         /// </summary>
-        public decimal InviteCosts { get; set; }
+        public decimal InviteCost { get; set; }
 
         /// <summary>
         /// 币种
         /// </summary>
-        public int Currency { get; set; }
+        public int InviteCurrency { get; set; }
 
         /// <summary>
         /// 快递费用

+ 1 - 1
OASystem/OASystem.Domain/ViewModels/Groups/InvitationOfficialActivitiesView.cs

@@ -31,7 +31,7 @@ namespace OASystem.Domain.ViewModels.Groups
         /// <summary>
         /// 费用
         /// </summary>
-        public decimal InviteCosts { get; set; }
+        public decimal InviteCost { get; set; }
         /// <summary>
         /// 币种
         /// </summary>

+ 1 - 1
OASystem/OASystem.Infrastructure/Repositories/Groups/AirTicketResRepository.cs

@@ -685,7 +685,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                                 grp_CreditCard.AuditGMDate = "";
                                 grp_CreditCard.IsPay = 0;
                             }
-                            if (Convert.ToDecimal(_GroupCostParameter.GWCCB) * Convert.ToDecimal(grp_AirTicket.ClientNum) > grp_CreditCard.RMBPrice)
+                            if ((_GroupCostParameter != null ? _GroupCostParameter.GWCB : 0) * Convert.ToDecimal(grp_AirTicket.ClientNum) > grp_CreditCard.RMBPrice)
                             {
                                 grp_CreditCard.ExceedBudget = 0;// 超出预算比例 换算
                                 grp_CreditCard.IsAuditGM = 3;//3 为自动审核

+ 11 - 9
OASystem/OASystem.Infrastructure/Repositories/Groups/InvitationOfficialActivitiesRepository.cs

@@ -137,7 +137,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                     sqlWhere = r.Replace(sqlWhere, "Where", 1);
                 }
                 
-                string sql = string.Format(@"select Id,DiId,InviterArea,Inviter,InviteTime,InviteCosts,(select name from Sys_SetData where id=i.Currency and IsDel={0}) 
+                string sql = string.Format(@"select Id,DiId,InviterArea,Inviter,InviteTime,InviteCost,(select name from Sys_SetData where id=i.InviteCurrency and IsDel={0}) 
                                              as Currency,IsGoOfficaiaBussiness,(select IsAuditGM from Grp_CreditCardPayment where CTable=81 and CId=i.Id 
                                              and IsDel={0}) as 'isAudit',Attachment from Grp_InvitationOfficialActivities i  {1}", 0, sqlWhere);
                 List<InvitationOfficialActivitiesView> _DecreasePayments = await _sqlSugar.SqlQueryable<InvitationOfficialActivitiesView>(sql).ToListAsync();
@@ -266,8 +266,8 @@ namespace OASystem.Infrastructure.Repositories.Groups
                             C.CTDId = 0;
                             C.BankNo = "";
                             C.CardholderName = "";
-                            C.PayMoney = dto.InviteCosts + dto.SendCost;
-                            C.PaymentCurrency = dto.Currency;
+                            C.PayMoney = dto.InviteCost + dto.SendCost;
+                            C.PaymentCurrency = dto.inviteCurrency;
                             //当天汇率
                             //if (!string.IsNullOrEmpty(hfRate.Value))
                             //    C.DayRate = hfRate.Value;
@@ -308,13 +308,13 @@ namespace OASystem.Infrastructure.Repositories.Groups
                             Grp_TeamRate _TeamRate = _sqlSugar.Queryable<Grp_TeamRate>().First(a => a.DiId == dto.DiId && a.IsDel == 0 && a.CTable == 81);
                             if (_TeamRate != null)
                             {
-                                if (dto.Currency == 49)
+                                if (dto.inviteCurrency == 49)
                                 {
                                     C.DayRate = _TeamRate.RateU;
                                     C.RMBPrice = C.PayMoney * Convert.ToDecimal(_TeamRate.RateU);
                                     //ccp.PayMoney = ccp.PayMoney * float.Parse(tr.RateU); 
                                 }
-                                else if (dto.Currency == 51)
+                                else if (dto.inviteCurrency == 51)
                                 {
                                     C.DayRate = _TeamRate.RateE;
                                     C.RMBPrice = C.PayMoney * Convert.ToDecimal(_TeamRate.RateE);
@@ -346,15 +346,17 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 }
                 else//修改
                 {
+                    var thisTime = new DateTime();
+                    DateTime.TryParse(dto.InviteTime, out thisTime);
                     bool res = await UpdateAsync(a => a.Id == grp_Invitation.Id, a => new Grp_InvitationOfficialActivities
                     {
                         DiId = dto.DiId,
                         InviterArea = dto.InviterArea,
                         Inviter = dto.Inviter,
-                        InviteTime = dto.InviteTime,
+                        InviteTime = thisTime,
                         Attachment = dto.Attachment,
-                        InviteCost = dto.InviteCosts,
-                        InviteCurrency = dto.Currency,
+                        InviteCost = dto.InviteCost,
+                        InviteCurrency = dto.inviteCurrency,
                         SendCost = dto.SendCost,
                         IsGoOfficaiaBussiness = dto.IsGoOfficaiaBussiness,
                         Remark = dto.Remark,
@@ -398,7 +400,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                             Grp_CreditCardPayment grp_CreditCardPayment = _sqlSugar.Queryable<Grp_CreditCardPayment>().First(a => a.CId == grp_Invitation.Id && a.CTable==81 && a.IsDel == 0);
                             if (grp_CreditCardPayment != null)
                             {
-                                grp_CreditCardPayment.PayMoney = dto.InviteCosts + dto.SendCost;
+                                grp_CreditCardPayment.PayMoney = dto.InviteCost + dto.SendCost;
                                 Grp_TeamRate _TeamRate = _sqlSugar.Queryable<Grp_TeamRate>().First(a => a.DiId == grp_Invitation.DiId && a.IsDel == 0 && a.IsDel==0 && a.CTable == 81);
                                 if (_TeamRate != null)
                                 {