Sfoglia il codice sorgente

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

yuanrf 1 giorno fa
parent
commit
c313bb0e1c

+ 21 - 3
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -142,10 +142,20 @@ namespace OASystem.API.Controllers
                 { 24, new List<int> { 85 } },      // 机票 -> 机票预订
                 { 25, new List<int> { 76 } },      // 酒店 -> 酒店预订
                 { 26, new List<int> { 80, 82 } },  // 签证 -> 签证, 团组客户保险
-                { 27, new List<int> { 81 } },      // 地接专员 -> 邀请/公务活动
+                { 27, new List<int> { 81 } },      // 地接 -> 邀请/公务活动
                 { 28, new List<int> { 79 } }       // 商邀 -> 车/导游地接
             };
 
+        /// <summary>
+        /// 签证下载类型初始化
+        /// </summary>
+        private readonly Dictionary<int, string> _visaTypeInit = new()
+        {
+            { 1, "美国" },
+            { 2, "日本" },
+            { 3, "韩国" },
+        };
+
         /// <summary>
         /// 构造函数
         /// </summary>
@@ -4173,6 +4183,14 @@ FROM
 
         #endregion
 
+
+        #region 文件下载
+
+
+
+        #endregion
+
+
         /// <summary>
         ///  根据团组Id获取签证客户信息List
         /// </summary>
@@ -8691,6 +8709,7 @@ FROM
             try
             {
                 var rateRecords = new List<RateRecordInfo>();
+
                 #region 汇率保存前存储
                 var info = await _sqlSugar.Queryable<Grp_EnterExitCost>().FirstAsync(x => x.IsDel == 0 && x.DiId == dto.DiId);
                 if (info != null)
@@ -8810,10 +8829,9 @@ FROM
                 {
                     //消息推送
                     await AppNoticeLibrary.SendUserMsg_GroupShare_ToFin(dto.DiId, dto.UserId, msgContent);
-
                 }
 
-                #region //日志汇率记录
+                #region 日志汇率记录
 
                 //按照已使用币种记录
                 if (checkCurrencys != null && checkCurrencys.Count > 0)

+ 1 - 0
OASystem/OASystem.Api/Controllers/PersonnelModuleController.cs

@@ -3324,6 +3324,7 @@ OPTION (MAXRECURSION 0); -- 允许无限递归      ";
                     d.DepName.Contains(dto.ScreeningCriteria.Trim()) ||
                     jp.JobName.Contains(dto.ScreeningCriteria.Trim()) ||
                     SqlFunc.ToString(u.Id).Contains(dto.ScreeningCriteria.Trim()))
+
                 .OrderBy(u => u.CompanyId)
                 .OrderBy(u => u.DepId)
                 .OrderBy(u => u.JobPostId)

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

@@ -4287,6 +4287,16 @@ namespace OASystem.API.OAMethodLib
 
         #region 汇率
 
+        /// <summary>
+        /// 三公费用实时汇率调差
+        /// </summary>
+        private readonly static decimal _xchgRateAdj = 0.00M;
+
+        /// <summary>
+        /// 三公费用实时汇率上浮比例
+        /// </summary>
+        private readonly static decimal _fxRateRise = 1.0350M;
+
         /// <summary>
         /// 出入境费用 初始化汇率
         /// </summary>
@@ -4312,13 +4322,9 @@ namespace OASystem.API.OAMethodLib
                     if (rateInfo != null)
                     {
                         decimal rate1 = Convert.ToDecimal(rateInfo.FSellPri) / 100.00M;
+                        rate1 *= _fxRateRise;
 
-                        //if (rateInfo.Name.Equals("日元")) rate1 *= 1.3700M; //rate1 = rate1 * 1;
-                        //else rate1 *= 1.035M;
-
-                        rate1 *= 1.035M;
-
-                        item.Rate = rate1.TruncDecimals(4) + 0.01M;
+                        item.Rate = rate1.TruncDecimals(4) + _xchgRateAdj;
                     }
                 }
             }
@@ -4352,13 +4358,7 @@ namespace OASystem.API.OAMethodLib
                     {
                         item.Rate = Convert.ToDecimal((Convert.ToDecimal(rateInfo.FSellPri == null ? 0.00M : rateInfo.FSellPri) / 100.00M).ToString("#0.0000"));
 
-                        //currency == usd  上浮比例 1.0300
-                        decimal increaseRate = 1.0350M;
-
-                        //if (item.CurrencyCode.ToUpper().equals("USD")) increaseRate = 1.0300M;
-
-                        decimal rate1 = item.Rate * increaseRate;
-                        //rate1 += 0.01M;
+                        decimal rate1 = item.Rate * _fxRateRise + _xchgRateAdj;
 
                         reteInfos.Add(new
                         {
@@ -4411,7 +4411,7 @@ namespace OASystem.API.OAMethodLib
 
             var cacheRateInfos = CommonFun.GetCurrencyChinaToList(info.CurrencyRemark);
 
-            var isSendMsg = false;
+            var isSendMsg = true;
             var msgContent = new StringBuilder();
 
             //去掉费用未使用得币种
@@ -4422,19 +4422,20 @@ namespace OASystem.API.OAMethodLib
 
             if (cacheRateInfos.Any())
             {
-                decimal rowthRate = 1.0350M;
+                decimal rowthRate = _fxRateRise;
                 foreach (var cacheRate in cacheRateInfos)
                 {
                     var liveRate = liveRates.Find(x => x.CurrencyName.Equals(cacheRate.CurrencyName));
                     if (liveRate == null) continue;
 
-                    var currRate = (rowthRate * liveRate.Rate).TruncDecimals(4);
-                    if (cacheRate.Rate != currRate)
-                    {
-                        isSendMsg = true;
+                    var currRate = (rowthRate * liveRate.Rate).TruncDecimals(4) + _xchgRateAdj;
+
+                    //if (cacheRate.Rate != currRate)
+                    //{
+                    //    isSendMsg = true;
                         //>团组归属:<font color='info'>{groupName}</font>
                         msgContent.AppendLine($">- {cacheRate.CurrencyName}汇率(页面保存):{cacheRate.Rate:#0.0000}  / 实时汇率(接口保存,已上浮1.0350):{currRate:#0.0000}【原接口输出汇率为:{liveRate.Rate:#0.0000}】");
-                    }
+                    //}
                 }
                 return (isSendMsg, msgContent.ToString(), liveRates);
             }
@@ -4516,7 +4517,7 @@ namespace OASystem.API.OAMethodLib
                 List<Grp_DayAndCost> dac4 = dayAndCosts.Where(it => it.Type == 4).ToList(); //培训费
 
                 var _CurrDatas = _sqlSugar.Queryable<Sys_SetData>().Where(it => it.IsDel == 0 && it.STid == 66).ToList();
-                var _DelegationInfo = _sqlSugar.Queryable<Grp_DelegationInfo>().Where(it => it.IsDel == 0 && it.Id == dto.DiId).First();
+                var _DelegationInfo = _sqlSugar.Queryable<Grp_DelegationInfo>().Where(it => it.Id == dto.DiId).First();
                 var DeleClientList = _sqlSugar.Queryable<Grp_TourClientList>()
                                                       .LeftJoin<Crm_DeleClient>((tcl, dc) => tcl.ClientId == dc.Id && dc.IsDel == 0)
                                                       .LeftJoin<Crm_CustomerCompany>((tcl, dc, cc) => dc.CrmCompanyId == cc.Id && dc.IsDel == 0)
@@ -4535,8 +4536,7 @@ namespace OASystem.API.OAMethodLib
                 var placeData = _sqlSugar.Queryable<Grp_NationalTravelFee>().Where(it => it.IsDel == 0).ToList();
                 var rateDatas = await enterExitCosts.CurrencyRemark.SplitExchangeRate();
 
-
-                _DelegationInfo.VisitCountry = _DelegationInfo.VisitCountry.Replace("|", "、");
+                _DelegationInfo.VisitCountry = _DelegationInfo?.VisitCountry?.Replace("|", "、") ?? "";
 
                 if (dto.ExportType == 1) //明细表
                 {

+ 4 - 4
OASystem/OASystem.Api/OAMethodLib/QiYeWeChatAPI/AppNotice/Library.cs

@@ -905,7 +905,7 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
         /// <returns></returns>
         public static async Task<bool> SendUserMsg_GroupShare_ToFin(int diId, int operationId, string msgContent)
         {
-            Grp_DelegationInfo groupInfo = _grpDeleRep.Query<Grp_DelegationInfo>(s => s.Id == diId).First();
+            var groupInfo = _grpDeleRep._sqlSugar.Queryable<Grp_DelegationInfo>().First(x => x.Id == diId);
 
             var operationName = _grpDeleRep.Query<Sys_Users>(s => s.IsDel == 0 && s.Id == operationId).First()?.CnName ?? "Unknown";
 
@@ -922,10 +922,10 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
 >**汇率明细**   
 {1}
 
->操作人员:<font color='comment'>{2}</font> l
+>操作人员:<font color='comment'>{2}</font> 
 >操作时间:<font color='comment'>{3}</font> 
 
-[详细信息请前往OA系统查看](http://oa.pan-american-intl.com:4399/)   ", groupInfo.TeamName, msgContent, operationName, DateTime.Now.ToString("yyyy-MM-dd HH:mm"));
+[详细信息请前往OA系统查看](http://oa.pan-american-intl.com:4399/)   ", groupInfo?.TeamName ?? "-", msgContent, operationName, DateTime.Now.ToString("yyyy-MM-dd HH:mm"));
 
 
                 ResponseBase result = await _qiYeWeChatApiService.GroupStatus_SendMessage_ToUser_Markdown(qwUserIdList, resMsg);
@@ -959,7 +959,7 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
             GroupShare_ToGMModel info = new GroupShare_ToGMModel()
             {
                 RefreshDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm"),
-                TeamName = groupInfo.TeamName,
+                TeamName = groupInfo?.TeamName ?? "-",
                 CreateUser = _grpDeleRep.Query<Sys_Users>(s => s.Id == updateUserId).First()?.CnName ?? "-",
                 Url = url
             };

+ 4 - 0
OASystem/OASystem.Api/appsettings.json

@@ -450,6 +450,10 @@
         {
           "Id": 95,
           "Name": "舒庆"
+        },
+        {
+          "Id": 396,
+          "Name": "李瑛"
         }
       ]
     }

+ 5 - 5
OASystem/OASystem.Domain/Entities/Groups/Grp_ProcessOverview.cs

@@ -130,7 +130,7 @@ namespace OASystem.Domain.Entities.Groups
                     StartTime = DateTime.Now,
                     UpdatedUserId = currUserId,
                     CreateUserId = currUserId,
-                    Nodes=visaNodes
+                    Nodes = visaNodes
                 },
 
                 //机票流程
@@ -161,10 +161,10 @@ namespace OASystem.Domain.Entities.Groups
                     UpdatedUserId = currUserId,
                     CreateUserId = currUserId,
                     Nodes = new List<Grp_ProcessNode>()
-                {
-                    new(){NodeOrder = 1, NodeName="酒店占房中", OverallStatus=ProcessStatus.InProgress, IsCurrent=true,CreateUserId = currUserId },
-                    new(){NodeOrder = 2, NodeName="酒店已订", OverallStatus=ProcessStatus.UnStarted, IsCurrent=false,CreateUserId = currUserId },
-                }
+                    {
+                        new(){NodeOrder = 1, NodeName="酒店占房中", OverallStatus=ProcessStatus.InProgress, IsCurrent=true,CreateUserId = currUserId },
+                        new(){NodeOrder = 2, NodeName="酒店已订", OverallStatus=ProcessStatus.UnStarted, IsCurrent=false,CreateUserId = currUserId },
+                    }
                 },
 
                 //地接流程