浏览代码

Merge branch 'develop' of http://132.232.92.186:3000/XinXiBu/OA2023 into develop

yuanrf 11 月之前
父节点
当前提交
69676bd99e

+ 1 - 1
OASystem/OASystem.Api/Controllers/FinancialController.cs

@@ -1826,7 +1826,7 @@ namespace OASystem.API.Controllers
                     sumAll_pr += (sum_pr - sum_refund);
                     sumAll_balance += ((sum_fr + sum_extra) - (sum_pr - sum_refund));
 
-                    #region 单位应收已收细项(以应收费用名称为主去(已收费用)匹配) 新增 雷怡 2024-35-08 16:35:28
+                    #region 单位应收已收细项(以应收费用名称为主去(已收费用)匹配) 新增 雷怡 2024-5-08 16:35:28
 
                     List<ClientFeeInfoView> feeDatas = new List<ClientFeeInfoView>();
 

+ 24 - 15
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -2315,6 +2315,7 @@ namespace OASystem.API.Controllers
                     int sign = groupData.Data.GetType().GetProperty("sign").GetValue(groupData.Data, null);
 
                     await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
+
                 }
                 catch (Exception ex)
                 {
@@ -4086,7 +4087,7 @@ namespace OASystem.API.Controllers
                 int sign = (int)data.Data.GetType().GetProperty("sign").GetValue(data.Data, null);
                 string md5Sign = GeneralMethod.Encrypt($"{sign}&fileName={fileUrl}");
                 string url = string.Format("http://oa.pan-american-intl.com:4399/#/Sankunginfo?sign={0}&fileName={1}", sign,fileUrl);
-                await AppNoticeLibrary.SendUserMsg_GroupShare_ToGM(dto.DiId, new List<string>() { "208","5","233" }, dto.UserId, url);
+                await AppNoticeLibrary.SendUserMsg_GroupShare_ToGM(dto.DiId, new List<string>() { "208","233","21" }, dto.UserId, url);
 
 
                 return Ok(JsonView(true, data.Msg, data.Data));
@@ -8996,22 +8997,30 @@ namespace OASystem.API.Controllers
                             _ModuleSubPromptInfo.AddRange(
                                 _GroupCostsTypeData.Select(it => new
                                 {
-                                    Date = it.Date,  //日期
-                                    CarFee = (it.CarCost + it.CFM + it.CFOF) * _rate * _scale, //车费用
-                                    GuideFee = (it.TGS + it.TGOF + it.TGM + it.TGA + it.TGTF + it.TGEF) * _rate * _scale, //导游费用
-                                    MealFee = (it.B + it.L + it.D) * _rate * _scale,  //餐食费
-                                    TicketFee = it.EF * _rate * _scale,  //门票费 
-                                    TipFee = (it.TGTips + it.DRVTips) * _rate * _scale, //小费
-                                    AirportTransferFee = 0.00M,
-                                    DrinksSnacksFruitFee = it.B_R_F * _rate * _scale,  //饮料零食水果
-                                    TravelSupplies = it.TE * _rate * _scale,  //出行物资
-                                    LeadersFee = it.TLF * _rate * _scale,  //领队费
-                                    CarFee1 = it.CarCost * _rate * _scale,
-                                    CarType = it.CarType,  //车型
-                                    SpentCash = it.PC * _rate * _scale, //零用金
+                                    Date = it.Date,                       //日期
+                                    CarFee = it.CarCost * _rate * _scale, //车费用
+                                    CarType = it.CarType,                 //车型
+                                    DriverFee = it.CFS * _rate * _scale,  //司机工资
+                                    DriverTipsFee = it.DRVTips * _rate * _scale,  //司机小费
+                                    DriverMealSubsidy = it.CFM * _rate * _scale,  //司机餐补
+                                    DriverOvertimeFee = it.CFOF * _rate * _scale, //司机超时费用
+                                    GuideFee = it.TGS * _rate * _scale,           //导游费用
+                                    GuideOvertimeFee = it.TGOF * _rate * _scale,  //导游超时费用
+                                    GuideMealSubsidy = it.TGM * _rate * _scale,   //导游餐补
+                                    GuideRoomSubsidy = it.TGA * _rate * _scale,   //导游房补
+                                    GuideCarFare = it.TGTF * _rate * _scale,      //导游交通费
+                                    GuideSpotFee = it.TGEF * _rate * _scale,      //导游景点费
+                                    GuideTipsFee = it.TGTips * _rate * _scale,    //导游小费
+                                    Breakfast = it.B * _rate * _scale,            //早餐费
+                                    Lunch = it.L * _rate * _scale,                //午餐费
+                                    Dinner = it.D * _rate * _scale,               //晚餐费
+                                    TicketFee = it.EF * _rate * _scale,           //门票费 
+                                    SpentCash = it.PC * _rate * _scale,           //零用金
+                                    LeadersFee = it.TLF * _rate * _scale,         //领队费
+                                    DrinksSnacksFruitFee = it.B_R_F * _rate * _scale, //饮料零食水果
+                                    TravelSupplies = it.TE * _rate * _scale,      //出行物资
                                 })
                             );
-
                             break;
                         case 85: // 机票
 

+ 17 - 7
OASystem/OASystem.Api/Controllers/ResourceController.cs

@@ -1,12 +1,15 @@
 using Aspose.Words;
 using NPOI.HPSF;
 using NPOI.POIFS.Crypt.Dsig;
+using NPOI.SS.Formula.Functions;
 using OASystem.API.OAMethodLib;
+using OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice;
 using OASystem.Domain.Dtos.Resource;
 using OASystem.Domain.Entities.Groups;
 using OASystem.Domain.ViewModels.Groups;
 using OASystem.Domain.ViewModels.QiYeWeChat;
 using OASystem.Infrastructure.Repositories.Groups;
+using Org.BouncyCastle.Asn1.Ocsp;
 using Org.BouncyCastle.Utilities;
 using Quartz.Util;
 using System.Collections.Generic;
@@ -2453,20 +2456,27 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
         public async Task<IActionResult> OpTicketBlackCode(OpTicketBlackCodeDto dto)
         {
+           
+            Result groupData = await _ticketBlackCodeRep.OpTicketBlackCode(dto);
+            if (groupData.Code != 0)
+            {
+                return Ok(JsonView(false, groupData.Msg));
+            }
+
             try
             {
-                Result groupData = await _ticketBlackCodeRep.OpTicketBlackCode(dto);
-                if (groupData.Code != 0)
-                {
-                    return Ok(JsonView(false, groupData.Msg));
-                }
-                return Ok(JsonView(true, groupData.Msg, groupData.Data));
+                //行程代码变更通知
+                await AppNoticeLibrary.SendUserMsg_GroupShare_ToDP(dto.DiId, dto.CreateUserId);
             }
             catch (Exception ex)
             {
-                return Ok(JsonView(false, "程序错误!"));
+
                 throw;
             }
+
+
+            return Ok(JsonView(true, groupData.Msg, groupData.Data));
+           
         }
 
         /// <summary>

+ 2 - 2
OASystem/OASystem.Api/OAMethodLib/GeneralMethod.cs

@@ -3233,7 +3233,8 @@ namespace OASystem.API.OAMethodLib
 
                         //文件名
                         //string strFileName = $"{_DelegationInfo.TeamName}出入境费用{Guid.NewGuid().ToString()}.{fileFormat}";
-                        string strFileName = $"{_DelegationInfo.TeamName}-出入境费用{Guid.NewGuid().ToString()}.{fileFormat}";
+                        //string strFileName = $"{_DelegationInfo.TeamName}-出入境费用{Guid.NewGuid().ToString()}.{fileFormat}";
+                        string strFileName = $"{_DelegationInfo.TeamName}{DateTime.UtcNow.ToString("yyyyMMddHHmmss")}.{fileFormat}";
 
                         AsposeHelper.removewatermark_v2180();
                         //doc.Save(AppSettingsHelper.Get("WordBasePath") + "EnterExitCost/File/" + strFileName);
@@ -3255,7 +3256,6 @@ namespace OASystem.API.OAMethodLib
                             _view.Data = new { Url = strFileName };
                             _view.Msg = "成功";
                             return _view;
-
                         }
 
                         doc.Save(AppSettingsHelper.Get("WordBasePath") + "EnterExitCost/File/" + strFileName, saveFormat);

+ 53 - 5
OASystem/OASystem.Api/OAMethodLib/QiYeWeChatAPI/AppNotice/Library.cs

@@ -41,6 +41,7 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
 
         #endregion
 
+
         #region 确认出团
 
         /// <summary>
@@ -120,7 +121,7 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
         }
 
         #endregion
-
+       
         #region 团组费用审核
 
 
@@ -788,6 +789,7 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
         #endregion
 
 
+        #region 费用保存发送消息
         #region 三公费用更改通知
 
         /// <summary>
@@ -795,11 +797,11 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
         /// </summary>
         /// <param name="sign"></param>
         /// <returns></returns>
-        public static async Task<bool> SendUserMsg_GroupShare_ToGM(int diId,List<string> receivedUserIds, int updateUserId, string url)
+        public static async Task<bool> SendUserMsg_GroupShare_ToGM(int diId, List<string> receivedUserIds, int updateUserId, string url)
         {
 
             Grp_DelegationInfo groupInfo = _grpDeleRep.Query<Grp_DelegationInfo>(s => s.Id == diId).First();
-            
+
             GroupShare_ToGMModel info = new GroupShare_ToGMModel()
             {
                 RefreshDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm"),
@@ -829,7 +831,6 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
         /// <returns></returns>
         public static async Task<bool> SendUserMsg_GroupShare_ToFinance(int diId)
         {
-
             Grp_DelegationInfo groupInfo = _grpDeleRep.Query<Grp_DelegationInfo>(s => s.Id == diId).First();
 
             GroupShare_ToUserModel info = new GroupShare_ToUserModel()
@@ -839,7 +840,10 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
             };
 
             List<string> receivedUserIds = _grpDeleRep.Query<Sys_Users>(s => s.IsDel == 0 && s.DepId == 3).Select(x => x.Id.ToString()).ToList();
-            receivedUserIds = new List<string>() { "208","4", "233" };
+            var defaultUserIds = new List<string>() { "208", "233" };
+            receivedUserIds.AddRange(defaultUserIds);
+            if (receivedUserIds.Contains("150")) receivedUserIds.Remove("150");
+
             if (receivedUserIds.Count > 0)
             {
                 List<string> qwUserIdList = GetQiyeChatUserIdList(receivedUserIds);
@@ -854,10 +858,54 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
             return true;
         }
 
+        #endregion
+
+        /// <summary>
+        /// 机票行程代码录入变更通知发送国交经理、主管、王鸽
+        /// </summary>
+        /// <param name="diId"></param>
+        /// <param name="operationId"></param>
+        /// <returns></returns>
+        public static async Task<bool> SendUserMsg_GroupShare_ToDP(int diId,int operationId)
+        {
+            Grp_DelegationInfo groupInfo = _grpDeleRep.Query<Grp_DelegationInfo>(s => s.Id == diId).First();
+
+            var operationName = _grpDeleRep.Query<Sys_Users>(s => s.IsDel == 0 && s.Id == operationId).First()?.CnName ?? "Unknown";
+            var defaultJobPostIds = new List<int>() { 22, 32 };
+            List<string> receivedUserIds = _grpDeleRep.Query<Sys_Users>(s => s.IsDel == 0 && s.DepId == 7 && defaultJobPostIds.Contains(s.JobPostId)).Select(x => x.Id.ToString()).ToList();
+            var defaultUserIds = new List<string>() { "208", "233" };
+            receivedUserIds.AddRange(defaultUserIds);
+
+            if (receivedUserIds.Count > 0)
+            {
+                List<string> qwUserIdList = GetQiyeChatUserIdList(receivedUserIds);
+
+                string resMsg = string.Format(@" `机票行程代码录入操作通知`  
+
+>团组:<font color='info'>{0}</font> 
+
+>操作人员:<font color='comment'>{1}</font> 
+>操作时间:<font color='comment'>{2}</font> 
+
+[详细信息请前往OA系统查看](http://oa.pan-american-intl.com:4399/)   ", groupInfo.TeamName, operationName, DateTime.Now.ToString("yyyy-MM-dd HH:mm"));
+
+
+                ResponseBase result = await _qiYeWeChatApiService.GroupStatus_SendMessage_ToUser_Markdown(qwUserIdList, resMsg);
+                if (result.errcode != 0)
+                {
+                    //抄送日志 
+                    return false;
+                }
+            }
+
+            return true;
+        }
+
 
         #endregion
 
 
+
         #region 成本通知
 
         /// <summary>

+ 1 - 0
OASystem/OASystem.Domain/Dtos/Groups/EnterExitCostDto.cs

@@ -218,6 +218,7 @@ namespace OASystem.Domain.Dtos.Groups
 
     }
 
+
     public class ConfirmCostDto {
 
         /// <summary>

+ 1 - 1
OASystem/OASystem.Domain/Entities/Groups/Grp_CreditCardPayment.cs

@@ -31,7 +31,7 @@ namespace OASystem.Domain.Entities.Groups
         /// 支付方式
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
-        public int PayDId { get; set; }
+        public int PayDId { get; set; } = 0;
         /// <summary>
         /// 消费方式
         /// </summary>

+ 9 - 7
OASystem/OASystem.Infrastructure/Repositories/Groups/AirTicketResRepository.cs

@@ -459,12 +459,13 @@ namespace OASystem.Infrastructure.Repositories.Groups
                         Grp_CreditCardPayment grp_CreditCard = _mapper.Map<Grp_CreditCardPayment>(dto.CardPaymentOpData);
 
                         //PayDId == 刷卡 IsPay == 1
-                        if (dto.CardPaymentOpData.PayDId == 72)
-                        {
-                            grp_CreditCard.IsPay = 1;
-                        }
-                        else grp_CreditCard.IsPay = 0;
+                        //if (dto.CardPaymentOpData.PayDId == 72)
+                        //{
+                        //    grp_CreditCard.IsPay = 1;
+                        //}
+                        //else grp_CreditCard.IsPay = 0;
 
+                        grp_CreditCard.IsPay = 0;
 
                         //获取新汇率  int diId,int CId, int currencyId
                         var rate = await fn(dto.AirTicketResOpData.DiId,85,dto.AirTicketResOpData.Currency);
@@ -677,8 +678,9 @@ namespace OASystem.Infrastructure.Repositories.Groups
                         Grp_CreditCardPayment grp_CreditCard = _mapper.Map<Grp_CreditCardPayment>(dto.CardPaymentOpData);
 
                         //PayDId == 刷卡 IsPay == 1
-                        if (grp_CreditCard.PayDId == 72) grp_CreditCard.IsPay = 1;
-                        else grp_CreditCard.IsPay = 0;
+                        //if (grp_CreditCard.PayDId == 72) grp_CreditCard.IsPay = 1;
+                        //else grp_CreditCard.IsPay = 0;
+                        grp_CreditCard.IsPay = 0;
 
                         //获取新汇率  int diId,int CId, int currencyId
                         var rate = await fn(dto.AirTicketResOpData.DiId, 85, dto.AirTicketResOpData.Currency);

+ 5 - 3
OASystem/OASystem.Infrastructure/Repositories/Groups/CarTouristGuideGroundRepository.cs

@@ -1138,8 +1138,9 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 c.OrbitalPrivateTransfer = dto.OrbitalPrivateTransfer;
                 c.Payee = dto.Payee;
                 c.CreateUserId = dto.CreateUserId;
-                if (c.PayDId == 72) c.IsPay = 1;
-                else c.IsPay = 0;
+                //if (c.PayDId == 72) c.IsPay = 1;
+                //else c.IsPay = 0;
+                c.IsPay = 0;
                 c.RMBPrice = c.PayMoney;
                 c.DayRate = 1;
 
@@ -1344,7 +1345,8 @@ namespace OASystem.Infrastructure.Repositories.Groups
             //设置团组汇率
             decimal dcm_dayrate = 1M;
             decimal dcm_rmbPrice = costDto.price;
-            int ispay = costDto.payType == 72 ? 1 : 0;
+            //int ispay = costDto.payType == 72 ? 1 : 0; 
+            int ispay =  0;
 
             if (costDto.costSign != 3)
             {

+ 3 - 2
OASystem/OASystem.Infrastructure/Repositories/Groups/CustomersRepository.cs

@@ -375,8 +375,9 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 c.IsAuditGM = 0;
                 c.PayMoney = cus.InsuranceCosts;
                 c.PaymentCurrency = cus.Currency;
-                if (c.PayDId == 72) c.IsPay = 1;
-                else c.IsPay = 0;
+                //if (c.PayDId == 72) c.IsPay = 1;
+                //else c.IsPay = 0;
+                c.IsPay = 0;
                 c.RMBPrice = cus.InsuranceCosts;
                 c.DayRate = 1;
                 Grp_TeamRate _TeamRate = _sqlSugar.Queryable<Grp_TeamRate>().First(a => a.DiId == dto.DiId && a.IsDel == 0 && a.CTable == 82);

+ 5 - 5
OASystem/OASystem.Infrastructure/Repositories/Groups/DecreasePaymentsRepository.cs

@@ -210,8 +210,10 @@ namespace OASystem.Infrastructure.Repositories.Groups
                     C.AuditGMOperate = 21;
                     C.AuditGMDate = "";
 
-                    if (C.PayDId == 72) C.IsPay = 1;
-                    else C.IsPay = 0;
+                    //注释 刷卡=已支付状态
+                    //if (C.PayDId == 72) C.IsPay = 1;
+                    //else C.IsPay = 0;
+                    C.IsPay = 0;
 
                     C.DIId = grp_Decrease.DiId;
                     C.CId = id;
@@ -262,7 +264,6 @@ namespace OASystem.Infrastructure.Repositories.Groups
                     }
 
                 }
-
             }
             else if (dto.Status == 2)
             {
@@ -305,7 +306,6 @@ namespace OASystem.Infrastructure.Repositories.Groups
                                 grp_CreditCardPayment.DayRate = teamRate.Rate;
                                 grp_CreditCardPayment.RMBPrice = grp_CreditCardPayment.PayMoney * grp_CreditCardPayment.DayRate;
                             }
-
                         }
                         else
                         {
@@ -314,7 +314,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                         }
 
                         int ispay = 0;
-                        if (dto.PayDId == 72) ispay = 1;
+                        //if (dto.PayDId == 72) ispay = 1;
 
 
                         int CTable = await _sqlSugar.Updateable<Grp_CreditCardPayment>()

+ 6 - 5
OASystem/OASystem.Infrastructure/Repositories/Groups/InvitationOfficialActivitiesRepository.cs

@@ -335,8 +335,8 @@ Order By i.id  Desc ", sqlWhere);
 
                         Grp_CreditCardPayment C = new Grp_CreditCardPayment();
                         C.PayDId = dto.PayDId;
-                        if (C.PayDId == 72) C.IsPay = 1;
-                        else C.IsPay = 0;
+                        //if (C.PayDId == 72) C.IsPay = 1;
+                        //else C.IsPay = 0;
 
                         C.ConsumptionPatterns = dto.ConsumptionPatterns;
                         C.ConsumptionDate = dto.ConsumptionDate;
@@ -362,7 +362,7 @@ Order By i.id  Desc ", sqlWhere);
                         C.IsAuditGM = 0;
                         C.AuditGMOperate = 0;
                         C.AuditGMDate = "";
-                        //C.IsPay = 0;
+                        C.IsPay = 0;
                         C.DIId = dto.DiId;
                         C.CId = id;
                         C.CTable = 81;
@@ -471,8 +471,9 @@ Order By i.id  Desc ", sqlWhere);
                         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)
                         {
-                            if (dto.PayDId == 72) grp_CreditCardPayment.IsPay = 1;
-                            else grp_CreditCardPayment.IsPay = 0;
+                            //if (dto.PayDId == 72) grp_CreditCardPayment.IsPay = 1;
+                            //else grp_CreditCardPayment.IsPay = 0;
+                            grp_CreditCardPayment.IsPay = 0;
 
                             grp_CreditCardPayment.PayMoney = dto.PayMoney;
                             grp_CreditCardPayment.PaymentCurrency = dto.PaymentCurrency;

+ 3 - 5
OASystem/OASystem.Infrastructure/Repositories/Groups/VisaPriceRepository.cs

@@ -333,11 +333,9 @@ From Grp_VisaInfo as v With(Nolock) left Join Grp_CreditCardPayment as c With(No
                 c.CTable = 80;
                 c.CId = dto.Id;
                 c.IsAuditGM = 0;
-                if (c.PayDId == 72)
-                {
-                    c.IsPay = 1;
-                }
-                else c.IsPay = 0;
+                //if (c.PayDId == 72) c.IsPay = 1; 
+                //else c.IsPay = 0;
+                c.IsPay = 0;
                 c.RMBPrice = c.PayMoney;
                 c.DayRate = 1;
                 Grp_TeamRate _TeamRate = _sqlSugar.Queryable<Grp_TeamRate>().First(a => a.DiId == dto.DiId && a.IsDel == 0 && a.CTable == 80);