Bläddra i källkod

Groups/GroupOperation(接团信息 操作(增改))、
Groups/GroupProcessOperation(接团流程操作(增改)-安卓端使用)、
Groups/OpAirTicketRes(机票费用录入操作)、Groups/OpDecreasePayments(团组增减款项操作)、Groups/OpInvitationOfficialActivities(商邀费用录入操作)Groups/OpVisaPrice(签证费用录入操作)、Groups/OpCarTouristGuideGroundContent(OP费用录入填写详情)、Groups/PostHotelReservationsAddOrEdit(酒店预订)、Groups/OpCustomers(保险费用录入)、Financial/PostAddDailyPayment(日付申请 添加)、Financial/PostEditDailyPayment(日付申请 Update)
等接口 新增张总 消息通知

LEIYI 4 månader sedan
förälder
incheckning
2b602a3bbb

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

@@ -29,6 +29,7 @@ using NPOI.SS.Formula.Functions;
 using Org.BouncyCastle.Asn1.X509.Qualified;
 using MathNet.Numerics;
 using static OASystem.API.OAMethodLib.JWTHelper;
+using Org.BouncyCastle.Asn1.Ocsp;
 
 namespace OASystem.API.Controllers
 {
@@ -189,6 +190,14 @@ namespace OASystem.API.Controllers
                 int sign = result.Data.GetType().GetProperty("sign").GetValue(result.Data, null);
 
                 await AppNoticeLibrary.DailyPayReminders_Create_ToCaiwuChat(dailyId, sign, QiyeWeChatEnum.CaiWuChat);
+
+                //2024-10-21 新增LZ UID
+                var userIds = new List<int>() { 21 };
+                string title = $"系统通知";
+                var dailyInfo = await _sqlSugar.Queryable<Fin_DailyFeePayment>().Where(x => x.Id == dailyId).FirstAsync();
+                string content = $"[新增-日付申请]一项费用:[费用说明:{dailyInfo.Instructions}]{dailyInfo.SumPrice.ToString("#0.00")} CNY;";
+
+                await GeneralMethod.MessageIssueAndNotification(MessageTypeEnum.DailyPayment, title, content, userIds, 0);
             }
             catch (Exception ex)
             {
@@ -222,6 +231,14 @@ namespace OASystem.API.Controllers
                 int sign = result.Data.GetType().GetProperty("sign").GetValue(result.Data, null);
 
                 await AppNoticeLibrary.DailyPayReminders_Create_ToCaiwuChat(dailyId, sign, QiyeWeChatEnum.CaiWuChat);
+
+                //2024-10-21 新增LZ UID
+                var userIds = new List<int>() { 21 };
+                string title = $"系统通知";
+                var dailyInfo = await _sqlSugar.Queryable<Fin_DailyFeePayment>().Where(x => x.Id == dailyId).FirstAsync();
+                string content = $"[更新-日付申请]一项费用:[费用说明:{dailyInfo.Instructions}]{dailyInfo.SumPrice.ToString("#0.00")} CNY;";
+
+                await GeneralMethod.MessageIssueAndNotification(MessageTypeEnum.DailyPayment, title, content, userIds, 0);
             }
             catch (Exception ex)
             {
@@ -5781,7 +5798,6 @@ Group by PriceType ", dto.diId);
         /// </summary>
         /// <returns></returns>
         [HttpPost]
-
         public async Task<IActionResult> RoyaltyConfirmByFin(RoyaltyConfirmDto dto)
         {
             var jw = JsonView(false);

+ 123 - 16
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -46,6 +46,7 @@ using Ubiety.Dns.Core;
 using static NPOI.POIFS.Crypt.CryptoFunctions;
 using static OASystem.API.OAMethodLib.JWTHelper;
 using static OASystem.Infrastructure.Repositories.Groups.AirTicketResRepository;
+using static OpenAI.GPT3.ObjectModels.SharedModels.IOpenAiModels;
 using Bookmark = Aspose.Words.Bookmark;
 using Cell = Aspose.Words.Tables.Cell;
 using Table = Aspose.Words.Tables.Table;
@@ -105,16 +106,42 @@ namespace OASystem.API.Controllers
         private readonly ForeignReceivablesRepository _ffrRep;  //对外收款账单仓库
         private readonly OpinionaireRepository _opinionaireRep;  //对外收款账单仓库
 
-        public GroupsController(ILogger<GroupsController> logger, IMapper mapper, SqlSugarClient sqlSugar, GrpScheduleRepository grpScheduleRep, DelegationInfoRepository groupRepository,
-            TaskAssignmentRepository taskAssignmentRep, AirTicketResRepository airTicketResRep, DecreasePaymentsRepository decreasePaymentsRep,
-            InvitationOfficialActivitiesRepository InvitationOfficialActivitiesRep, DelegationEnDataRepository delegationEnDataRep, EnterExitCostRepository enterExitCostRep
-            , DelegationVisaRepository delegationVisaRep, MessageRepository message, VisaPriceRepository visaPriceRep, CarTouristGuideGroundRepository carTouristGuideGroundRep,
-            CheckBoxsRepository checkBoxs, GroupCostRepository GroupCostRepository, CostTypeHotelNumberRepository CostTypeHotelNumberRepository,
-            GroupCostParameterRepository GroupCostParameterRepository, HotelPriceRepository hotelPriceRep, CustomersRepository customersRep, SetDataRepository setDataRep,
-            TourClientListRepository tourClientListRep, TeamRateRepository teamRateRep, IHubContext<ChatHub, IChatClient> hubContext, UsersRepository usersRep, IJuHeApiService juHeApi,
-            InvertedListRepository invertedListRep, VisaFeeInfoRepository visaFeeInfoRep, TicketBlackCodeRepository ticketBlackCodeRep, HotelInquiryRepository hotelInquiryRep,
-            ThreeCodeRepository threeCodeRepository, FeeAuditRepository feeAuditRep, VisaCommissionRepository visaCommissionRep, ForeignReceivablesRepository ffrRep,
-            OpinionaireRepository opinionaireRep)
+        public GroupsController(ILogger<GroupsController> logger, 
+                                IMapper mapper, 
+                                SqlSugarClient sqlSugar, 
+                                GrpScheduleRepository grpScheduleRep, 
+                                DelegationInfoRepository groupRepository,
+                                TaskAssignmentRepository taskAssignmentRep, 
+                                AirTicketResRepository airTicketResRep, 
+                                DecreasePaymentsRepository decreasePaymentsRep,
+                                InvitationOfficialActivitiesRepository InvitationOfficialActivitiesRep, 
+                                DelegationEnDataRepository delegationEnDataRep, 
+                                EnterExitCostRepository enterExitCostRep, 
+                                DelegationVisaRepository delegationVisaRep,
+                                MessageRepository message, 
+                                VisaPriceRepository visaPriceRep, 
+                                CarTouristGuideGroundRepository carTouristGuideGroundRep,
+                                CheckBoxsRepository checkBoxs, 
+                                GroupCostRepository GroupCostRepository, 
+                                CostTypeHotelNumberRepository CostTypeHotelNumberRepository,
+                                GroupCostParameterRepository GroupCostParameterRepository,
+                                HotelPriceRepository hotelPriceRep, 
+                                CustomersRepository customersRep, 
+                                SetDataRepository setDataRep,
+                                TourClientListRepository tourClientListRep, 
+                                TeamRateRepository teamRateRep,
+                                IHubContext<ChatHub, IChatClient> hubContext, 
+                                UsersRepository usersRep, IJuHeApiService juHeApi,
+                                InvertedListRepository invertedListRep, 
+                                VisaFeeInfoRepository visaFeeInfoRep, 
+                                TicketBlackCodeRepository ticketBlackCodeRep, 
+                                HotelInquiryRepository hotelInquiryRep,
+                                ThreeCodeRepository threeCodeRepository, 
+                                FeeAuditRepository feeAuditRep, 
+                                VisaCommissionRepository visaCommissionRep, 
+                                ForeignReceivablesRepository ffrRep,
+                                OpinionaireRepository opinionaireRep
+                                )
         {
             _logger = logger;
             _mapper = mapper;
@@ -624,8 +651,8 @@ namespace OASystem.API.Controllers
                     //默认分配权限
                     await GeneralMethod.PostGroupAuthAddInit(dto.UserId, diId);
 
-                    //消息提示 王鸽 主管号
-                    List<int> _managerIds = new List<int>() { 22, 32 };
+                    //消息提示 王鸽 主管号 2024-10-21 新增LZ UID
+                    var _managerIds = new List<int>() { 22, 32, 21 };
                     var userIds = _usersRep._sqlSugar.Queryable<Sys_Users>().Where(it => it.IsDel == 0 && _managerIds.Contains(it.JobPostId)).Select(it => it.Id).ToList();
                     if (userIds.Count > 0)
                     {
@@ -790,8 +817,8 @@ namespace OASystem.API.Controllers
                     //默认分配权限
                     await GeneralMethod.PostGroupAuthAddInit(dto.UserId, diId);
 
-                    //消息提示 王鸽 主管号
-                    List<int> _managerIds = new List<int>() { 22, 32 };
+                    //消息提示 王鸽 主管号 2024-10-21 新增LZ UID
+                    List<int> _managerIds = new List<int>() { 21,22, 32 };
                     var userIds = _usersRep._sqlSugar.Queryable<Sys_Users>().Where(it => it.IsDel == 0 && _managerIds.Contains(it.JobPostId)).Select(it => it.Id).ToList();
                     if (userIds.Count > 0)
                     {
@@ -2725,6 +2752,18 @@ FROM
 
                     await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
 
+                    //2024-10-21 新增LZ UID
+                    var userIds = new List<int>() { 21 };
+                    string title = $"系统通知";
+                    string content = "";
+                    var diId = dto.AirTicketResOpData.DiId;
+                    var groupInfo = await _groupRepository.Query(x => x.Id == diId).FirstAsync();
+                    var ccpInfo = await _sqlSugar.Queryable<Grp_CreditCardPayment>().Where(x => x.Id == ccpId).FirstAsync();
+                    if (dto.Status == 1) content = $"[新增-机票费用录入({groupInfo?.TeamName ?? "-"})]一项费用:{(ccpInfo.PayMoney * ccpInfo.DayRate).ToString("#0.00")} CNY;";
+                    else if (dto.Status == 2) content = $"[更新-机票费用录入({groupInfo?.TeamName ?? "-"})]一项费用:{(ccpInfo.PayMoney * ccpInfo.DayRate).ToString("#0.00")} CNY;";
+
+                    await GeneralMethod.MessageIssueAndNotification(MessageTypeEnum.GroupBusinessOperations, title, content, userIds, diId);
+
                 }
                 catch (Exception ex)
                 {
@@ -3609,6 +3648,18 @@ FROM
 
             await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
 
+            //2024-10-21 新增LZ UID
+            var userIds = new List<int>() { 21 };
+            string title = $"系统通知";
+            string content = "";
+            var diId = dto.DiId;
+            var groupInfo = await _groupRepository.Query(x => x.Id == diId).FirstAsync();
+            var ccpInfo = await _sqlSugar.Queryable<Grp_CreditCardPayment>().Where(x => x.Id == ccpId).FirstAsync();
+            if (dto.Status == 1) content = $"[新增-增减款项({groupInfo?.TeamName ?? "-"})]一项费用:{(ccpInfo.PayMoney * ccpInfo.DayRate).ToString("#0.00")} CNY;";
+            else if (dto.Status == 2) content = $"[更新-增减款项({groupInfo?.TeamName ?? "-"})]一项费用:{(ccpInfo.PayMoney * ccpInfo.DayRate).ToString("#0.00")} CNY;";
+
+            await GeneralMethod.MessageIssueAndNotification(MessageTypeEnum.GroupBusinessOperations, title, content, userIds, diId);
+
             #endregion
 
             return Ok(JsonView(true, groupData.Msg, groupData.Data));
@@ -4125,8 +4176,6 @@ FROM
             return Ok(JsonView(new {url = @$"{AppSettingsHelper.Get("OfficeBaseUrl")}{AppSettingsHelper.Get("GrpFileFtpPath")}/商邀相关文件/{zipFilePathGuid}" }));
         }
 
-
-
         /// <summary>
         /// 商邀费用 Info Page 基础数据源
         /// </summary>
@@ -4199,6 +4248,18 @@ FROM
                 int sign = groupData.Data.GetType().GetProperty("sign").GetValue(groupData.Data, null);
 
                 await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
+
+                //2024-10-21 新增LZ UID
+                var userIds = new List<int>() { 21 };
+                string title = $"系统通知";
+                string content = "";
+                var diId = dto.DiId;
+                var groupInfo = await _groupRepository.Query(x => x.Id == diId).FirstAsync();
+                var ccpInfo = await _sqlSugar.Queryable<Grp_CreditCardPayment>().Where(x => x.Id == ccpId).FirstAsync();
+                if (dto.Status == 1) content = $"[新增-商邀费用录入({groupInfo?.TeamName ?? "-"})]一项费用:{(ccpInfo.PayMoney * ccpInfo.DayRate).ToString("#0.00")} CNY;";
+                else if (dto.Status == 2) content = $"[更新-商邀费用录入({groupInfo?.TeamName ?? "-"})]一项费用:{(ccpInfo.PayMoney * ccpInfo.DayRate).ToString("#0.00")} CNY;";
+
+                await GeneralMethod.MessageIssueAndNotification(MessageTypeEnum.GroupBusinessOperations, title, content, userIds, diId);
             }
             catch (Exception ex)
             {
@@ -7052,6 +7113,18 @@ FROM
                 int sign = groupData.Data.GetType().GetProperty("sign").GetValue(groupData.Data, null);
 
                 await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
+
+                //2024-10-21 新增LZ UID
+                var userIds = new List<int>() { 21 };
+                string title = $"系统通知";
+                string content = "";
+                var diId = dto.DiId;
+                var groupInfo = await _groupRepository.Query(x => x.Id == diId).FirstAsync();
+                var ccpInfo = await _sqlSugar.Queryable<Grp_CreditCardPayment>().Where(x => x.Id == ccpId).FirstAsync();
+                if (dto.Status == 1) content = $"[新增-签证费用录入({groupInfo?.TeamName ?? "-"})]一项费用:{(ccpInfo.PayMoney * ccpInfo.DayRate).ToString("#0.00")} CNY;";
+                else if (dto.Status == 2) content = $"[更新-签证费用录入({groupInfo?.TeamName ?? "-"})]一项费用:{(ccpInfo.PayMoney * ccpInfo.DayRate).ToString("#0.00")} CNY;";
+
+                await GeneralMethod.MessageIssueAndNotification(MessageTypeEnum.GroupBusinessOperations, title, content, userIds, diId);
             }
             catch (Exception ex)
             {
@@ -7415,7 +7488,15 @@ FROM
 
                     await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
 
+                    //2024-10-21 新增LZ UID
+                    var userIds = new List<int>() { 21 };
+                    string title = $"系统通知";
+                    var diId = dto.DiId;
+                    var groupInfo = await _groupRepository.Query(x => x.Id == diId).FirstAsync();
+                    var ccpInfo = await _sqlSugar.Queryable<Grp_CreditCardPayment>().Where(x => x.Id == ccpId).FirstAsync();
+                    string content = $"[更新-OP费用录入填写详情({groupInfo?.TeamName ?? "-"})]一项费用:{(((ccpInfo.PayMoney * ccpInfo.DayRate) / 100) * ccpInfo.PayPercentage).ToString("#0.00")} CNY;";
 
+                    await GeneralMethod.MessageIssueAndNotification(MessageTypeEnum.GroupBusinessOperations, title, content, userIds, diId);
                 }
                 catch (Exception ex)
                 {
@@ -10949,6 +11030,20 @@ ORDER by  gctggrc.id DESC
                 //if (autoAdit.Code != 200) _view.Msg += $"\r\n{autoAdit.Msg}";
 
                 _logger.LogInformation($"【酒店自动审核】【{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}】执行调用   调用结果:{JsonConvert.SerializeObject(autoAdit)}");
+
+
+                //2024-10-21 新增LZ UID
+                var userIds = new List<int>() { 21 };
+                string title = $"系统通知";
+                var diId = _dto.DiId;
+                var groupInfo = await _groupRepository.Query(x => x.Id == diId).FirstAsync();
+                var ccpInfo = await _sqlSugar.Queryable<Grp_CreditCardPayment>().Where(x => x.Id == ccpId).FirstAsync();
+                string content = "";
+                if (_dto.Id == 0) content = $"[新增-酒店费用录入({groupInfo?.TeamName ?? "-"})]一项费用:{(ccpInfo.PayMoney * ccpInfo.DayRate).ToString("#0.00")} CNY;";
+                else if (_dto.Id > 0) content = $"[更新-酒店费用录入({groupInfo?.TeamName ?? "-"})]一项费用:{(ccpInfo.PayMoney * ccpInfo.DayRate).ToString("#0.00")} CNY;";
+
+                await GeneralMethod.MessageIssueAndNotification(MessageTypeEnum.GroupBusinessOperations, title, content, userIds, diId);
+
             }
             catch (Exception ex)
             {
@@ -12734,6 +12829,18 @@ ORDER by  gctggrc.id DESC
                 int sign = groupData.Data.GetType().GetProperty("sign").GetValue(groupData.Data, null);
 
                 await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
+
+                //2024-10-21 新增LZ UID
+                var userIds = new List<int>() { 21 };
+                string title = $"系统通知";
+                var diId = dto.DiId;
+                var groupInfo = await _groupRepository.Query(x => x.Id == diId).FirstAsync();
+                var ccpInfo = await _sqlSugar.Queryable<Grp_CreditCardPayment>().Where(x => x.Id == ccpId).FirstAsync();
+                string content = "";
+                if (dto.Status == 1) content = $"[新增-保险费用录入({groupInfo?.TeamName ?? "-"})]一项费用:{(ccpInfo.PayMoney * ccpInfo.DayRate).ToString("#0.00")} CNY;";
+                else if (dto.Status == 2) content = $"[更新-保险费用录入({groupInfo?.TeamName ?? "-"})]一项费用:{(ccpInfo.PayMoney * ccpInfo.DayRate).ToString("#0.00")} CNY;";
+
+                await GeneralMethod.MessageIssueAndNotification(MessageTypeEnum.GroupBusinessOperations, title, content, userIds, diId);
             }
             catch (Exception ex)
             {

+ 5 - 2
OASystem/OASystem.Api/Controllers/ResourceController.cs

@@ -2833,6 +2833,7 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
             var view = await _translatorRep.Query(x => x.Id == id)
                 .Select(x => new { 
                     x.Id,
+                    x.Area,
                     x.Name,
                     x.Sex,
                     x.Photo,
@@ -2843,7 +2844,8 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
                     x.Language,
                     x.Price,
                     x.Currency,
-                    x.Files
+                    x.Files,
+                    x.Remark
                 })
                 .FirstAsync();
 
@@ -2881,7 +2883,8 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
                     //x.Currency,
                     Currency = SqlFunc.Subqueryable<Sys_SetData>().Where(x1 => x1.Id == x.Currency).Select(x1 => x1.Name) ?? "-",
                     CreateUserName = SqlFunc.Subqueryable<Sys_Users>().Where(x1 => x1.Id == x.CreateUserId).Select(x1 => x1.CnName) ?? "-",
-                    x.CreateTime
+                    x.CreateTime,
+                    x.Remark
                 })
                 .OrderByDescending(x => x.CreateTime)
                 .ToPageListAsync(dto.PageIndex, dto.PageSize, total);

+ 37 - 0
OASystem/OASystem.Api/Controllers/SystemController.cs

@@ -1,3 +1,4 @@
+using EyeSoft.Messanging;
 using System.Collections;
 using static OASystem.API.OAMethodLib.GeneralMethod;
 
@@ -2179,5 +2180,41 @@ And u.UId = {0} And u.FId = 1 ", dto.UserId);
         }
 
         #endregion
+
+
+        #region 各部门首页消息提示
+        /// <summary>
+        /// 部门首页消息提示
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> DepartmentHomePageMessagePrompts(DepartmentHomePageMessagePromptsDto dto)
+        {
+            var portType = dto.PortType;
+            var depType = dto.DepType;
+            var postType = dto.PostType;
+            if (portType < 1 || portType > 3) return Ok(JsonView(false, MsgTips.Port));
+            if (depType < 1 || depType > 3) return Ok(JsonView(false, "请传入有效的DepType参数;1 总经办、2 国交部、3 财务"));
+
+            if (depType == 1) //总经办
+            {
+                //1、资料数据(市场部客户资源、op地接导游、op地接车数据、商邀数据、团组收款数据)
+                //2、费用未审核(日付申请未审核数据、团组费用未审核数据)数据提示Range(固定上个月)2、费用提示Range(固定本年)
+
+            }
+            else if (depType == 2) //国交部
+            {
+               
+            }
+            else if (depType == 3)//财务
+            {
+                
+            } 
+
+            return Ok(JsonView(false));
+        }
+
+        #endregion
     }
 }

+ 1 - 0
OASystem/OASystem.Api/OAMethodLib/GeneralMethod.cs

@@ -142,6 +142,7 @@ namespace OASystem.API.OAMethodLib
         /// 4 团组费用审核消息
         /// 5 团组签证进度通知
         /// 6 团组任务进度通知
+        /// 7 日付申请通知
         /// </param>
         /// <param name="title">消息标题</param>
         /// <param name="content">消息内容</param>

+ 31 - 0
OASystem/OASystem.Domain/Dtos/System/DepartmentHomePageMessagePromptsDto.cs

@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Dtos.System
+{
+    /// <summary>
+    /// 部门首页消息提示
+    /// </summary>
+    public class DepartmentHomePageMessagePromptsDto : PortDtoBase
+    {
+        /// <summary>
+        /// 部门
+        /// 1 总经办 
+        /// 2 国交部
+        /// 3 财务
+        /// </summary>
+        public int DepType { get; set; }
+
+        /// <summary>
+        /// 岗位
+        /// DepType = 1 PostRange(1:总经理)
+        /// DepType = 2 PostRange(1:机票、2:酒店、3:OP、4:商邀、5:签证)
+        /// DepType = 3 PostRange(1:财务经理、2:会计、3:出纳)
+        /// </summary>
+        public int PostType { get; set; }
+
+    }
+}

+ 5 - 0
OASystem/OASystem.Domain/Enums/MessgeTypeEnum.cs

@@ -42,5 +42,10 @@ namespace OASystem.Domain.Enums
         /// </summary>
         [Description("团组任务进度消息通知")]
         TaskProgressUpdate = 6,
+        /// <summary>
+        /// 任务进度更新消息
+        /// </summary>
+        [Description("日付申请通知")]
+        DailyPayment = 7,
     }
 }