Sfoglia il codice sorgente

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

yuanrf 6 mesi fa
parent
commit
cfd31d0925

+ 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);

+ 133 - 38
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)
             {
@@ -6927,19 +6988,14 @@ FROM
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
         public async Task<IActionResult> QueryVisaByDiId(VisaPriceDto dto)
         {
-            try
-            {
-                Result groupData = await _visaPriceRep.PostVisaByDiId(dto);
-                if (groupData.Code != 0)
-                {
-                    return Ok(JsonView(false, groupData.Msg));
-                }
-                return Ok(JsonView(true, groupData.Msg, groupData.Data));
-            }
-            catch (Exception ex)
+            
+            Result groupData = await _visaPriceRep.PostVisaByDiId(dto);
+            if (groupData.Code != 0)
             {
-                return Ok(JsonView(false, ex.Message));
+                return Ok(JsonView(false, groupData.Msg));
             }
+            return Ok(JsonView(true, groupData.Msg, groupData.Data));
+
         }
         /// <summary>
         /// 根据签证费用Id查询单条数据及c表数据
@@ -7057,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)
             {
@@ -7420,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)
                 {
@@ -10954,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)
             {
@@ -12664,19 +12754,12 @@ ORDER by  gctggrc.id DESC
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
         public async Task<IActionResult> CustomersByDiId(CustomersByDiIdDto dto)
         {
-            try
-            {
-                Result groupData = await _customersRep.CustomersByDiId(dto);
-                if (groupData.Code != 0)
-                {
-                    return Ok(JsonView(false, groupData.Msg));
-                }
-                return Ok(JsonView(true, groupData.Msg, groupData.Data));
-            }
-            catch (Exception ex)
+            Result groupData = await _customersRep.CustomersByDiId(dto);
+            if (groupData.Code != 0)
             {
-                return Ok(JsonView(false, ex.Message));
+                return Ok(JsonView(false, groupData.Msg));
             }
+            return Ok(JsonView(true, groupData.Msg, groupData.Data));
         }
         /// <summary>
         /// 根据保险费用Id查询保险费用详细
@@ -12746,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)
             {

+ 40 - 43
OASystem/OASystem.Api/Controllers/ResourceController.cs

@@ -2832,24 +2832,11 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
         {
             if (id <1 ) return Ok(JsonView(false,"请传入有效的Id!"));
 
-            var view = await _translatorRep.Query(x => x.Id == id)
-                .Select(x => new { 
-                    x.Id,
-                    x.Name,
-                    x.Sex,
-                    x.Photo,
-                    x.Tel,
-                    x.Email,
-                    x.WechatNo,
-                    x.OtherSocialAccounts,
-                    x.Language,
-                    x.Price,
-                    x.Currency,
-                    x.Files
-                })
-                .FirstAsync();
+            var view = await _translatorRep.Query(x => x.Id == id).FirstAsync();
 
-            return Ok(JsonView(view));
+            var view1 = _mapper.Map<TranslatorLibraryInfoView>(view);
+
+            return Ok(JsonView(view1));
         }
 
 
@@ -2880,10 +2867,11 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
                     x.WechatNo,
                     x.Language,
                     x.Price,
-                    x.Currency,
-                    //Currency = SqlFunc.Subqueryable<Sys_SetData>().Where(x1 => x1.Id == x.Currency).Select(x1 => x1.Name) ?? "-",
+                    //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);
@@ -2902,7 +2890,7 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
         public async Task<IActionResult> TranslatorLibraryOp([FromForm]TranslatorLibraryOpDto dto)
         {
             if (dto.PortType < 1 || dto.PortType > 3) return Ok(JsonView(false, MsgTips.Port));
-            if (dto.OpStatus < 1 || dto.OpStatus > 2) return Ok(JsonView(false, MsgTips.Status));
+            if (dto.Status < 1 || dto.Status > 2) return Ok(JsonView(false, MsgTips.Status));
 
             var currUserInfo = JwtHelper.SerializeJwt(HttpContext.Request.Headers.Authorization);
             if (currUserInfo == null) return Ok(JsonView(false, "请传入token!"));
@@ -2911,34 +2899,38 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
             //D:\FTP\File\OA2023\Office\GrpFile\TranslatorLibrary
             var fileBasePath = $"{AppSettingsHelper.Get("GrpFileBasePath")}TranslatorLibrary";
             #region 保存文件
-            foreach (var item in dto.Files)
+            if (dto.Files != null)
             {
-                if (item.Length < 1) continue;
 
-                if (!System.IO.Directory.Exists(fileBasePath))
+                foreach (var item in dto.Files)
                 {
-                    System.IO.Directory.CreateDirectory(fileBasePath);
-                }
+                    if (item.Length < 1) continue;
 
-                var file = item;
+                    if (!System.IO.Directory.Exists(fileBasePath))
+                    {
+                        System.IO.Directory.CreateDirectory(fileBasePath);
+                    }
 
-                // 将文件保存到指定位置
-                var filePath = Path.Combine(fileBasePath, file.FileName);
-                using (var stream = new FileStream(filePath, FileMode.Create))
-                {
-                    await file.CopyToAsync(stream);
-                }
+                    var file = item;
 
-                //验证文件是否上传成功
-                if (!System.IO.File.Exists(filePath))
-                {
-                    foreach (var filePathStr in fileNames)
+                    // 将文件保存到指定位置
+                    var filePath = Path.Combine(fileBasePath, file.FileName);
+                    using (var stream = new FileStream(filePath, FileMode.Create))
                     {
-                        System.IO.File.Delete(Path.Combine(fileBasePath, filePathStr));
+                        await file.CopyToAsync(stream);
                     }
-                    return Ok(JsonView(false, "文件上传失败!"));
+
+                    //验证文件是否上传成功
+                    if (!System.IO.File.Exists(filePath))
+                    {
+                        foreach (var filePathStr in fileNames)
+                        {
+                            System.IO.File.Delete(Path.Combine(fileBasePath, filePathStr));
+                        }
+                        return Ok(JsonView(false, "文件上传失败!"));
+                    }
+                    fileNames.Add(file.FileName);
                 }
-                fileNames.Add(file.FileName);
             }
 
             #endregion
@@ -2950,8 +2942,13 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
             #endregion
 
 
-            if (dto.OpStatus == 1)
+            if (dto.Status == 1)
             {
+                //验证重复
+                var info = await _translatorRep.Query(x => x.Area.Equals(dto.Area) && x.Name.Equals(dto.Name)).FirstAsync();
+                if (info != null) return Ok(JsonView(false, "该条数据已存在!"));
+
+
                 translatorInfo.CreateUserId = currUserInfo.UserId;
                 if (fileNames.Count > 0)
                 {
@@ -2961,7 +2958,7 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
                 var add = await _translatorRep.AddAsync(translatorInfo);
                 if (add > 0) return Ok(JsonView(true));
             }
-            else if (dto.OpStatus == 2)
+            else if (dto.Status == 2)
             {
                 var info = await _translatorRep.Query(x => x.Id == dto.Id).FirstAsync();
                 if (info != null)
@@ -3002,7 +2999,7 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
                         Files = translatorInfo.Files,
                     });
 
-                if (upd) Ok(JsonView(true));
+                if (upd) return Ok(JsonView(true));
             }
 
             return Ok(JsonView(false));

+ 216 - 34
OASystem/OASystem.Api/Controllers/StatisticsController.cs

@@ -2179,12 +2179,6 @@ ORDER BY
                                                   .Select(it => it.JietuanOperator)
                                                   .ToList();
 
-            //var jobData = _sqlSugar.Queryable<Sys_JobPost>().Where(it => it.IsDel == 0 && companyIds.Contains(it.CompanyId) && (it.JobName.Contains("经理") || it.JobName.Contains("主管")))
-            //                       .Select(it => new { it.Id, it.CompanyId, it.DepId, it.JobName })
-            //                       .ToList();
-            //List<int> jobIds = jobData.Select(it => it.Id).ToList();
-            //(depIds.Contains(it.DepId) || jobIds.Contains(it.JobPostId)
-            //userId = 21 
             var userData = _sqlSugar.Queryable<Sys_Users>().Where(it => it.IsDel == 0 && (pickGroupUserIds.Contains(it.Id) || it.Id == 21))
                                    .Select(it => new { id = it.Id, companyId = it.CompanyId, name = it.CnName })
                                    .ToList();
@@ -2284,7 +2278,6 @@ ORDER BY
         /// <summary>
         ///  市场部销售额
         ///  年度/季度/月度 报表(同比)
-        ///  (增加团组查询条件 IsSure=1)
         /// </summary>
         /// <param name="_dto">市场部销售额请求dto</param>
         /// <returns></returns>
@@ -2376,6 +2369,39 @@ ORDER BY
 
             string lastBeginDt = Convert.ToDateTime(beginDt).AddYears(-1).ToString("yyyy-MM-dd HH:mm:ss"),
                    lastEndDt = Convert.ToDateTime(endDt).AddYears(-1).ToString("yyyy-MM-dd HH:mm:ss");
+            //            string salesSql = string.Format(@"
+            //SELECT
+            //	'ThisSales' As [Name],
+            //	CAST(SUM(Sales) AS decimal(12,2)) As Sales
+            //FROM
+            //	(
+            //	SELECT di.VisitDate,
+            //		(SELECT  CAST(SUM(ItemSumPrice * Rate) AS decimal(12,2)) FROM Fin_ForeignReceivables
+            //		WHERE IsDel = 0 AND AddingWay IN (0, 1, 2)AND di.Id = Diid
+            //		) AS Sales
+            //	FROM
+            //		Grp_DelegationInfo di
+            //	WHERE di.IsDel = 0 AND di.IsSure = 1
+            //		AND di.JietuanOperator IN (SELECT Id FROM Sys_Users WITH (NoLock) WHERE IsDel = 0  {0})
+            //		AND di.VisitDate BETWEEN '{1}' AND '{2}'
+            //	) temp
+            //Union ALL
+            //SELECT
+            //	'LastSales' As [Name],
+            //	CAST(SUM(Sales) AS decimal(12,2)) As Sales
+            //FROM
+            //	(
+            //	SELECT di.VisitDate,
+            //		(SELECT  CAST(SUM(ItemSumPrice * Rate) AS decimal(12,2)) FROM Fin_ForeignReceivables
+            //		WHERE IsDel = 0 AND AddingWay IN (0, 1, 2)AND di.Id = Diid
+            //		) AS Sales
+            //	FROM
+            //		Grp_DelegationInfo di
+            //	WHERE di.IsDel = 0 AND di.IsSure = 1
+            //		AND di.JietuanOperator IN (SELECT Id FROM Sys_Users WITH (NoLock) WHERE IsDel = 0 {3})
+            //		AND di.VisitDate BETWEEN '{4}' AND '{5}'
+            //	) temp", userSqlWhere, beginDt, endDt, userSqlWhere, lastBeginDt, lastEndDt);
+
             string salesSql = string.Format(@"
 SELECT
 	'ThisSales' As [Name],
@@ -2388,7 +2414,7 @@ FROM
 		) AS Sales
 	FROM
 		Grp_DelegationInfo di
-	WHERE di.IsDel = 0 AND di.IsSure = 1
+	WHERE di.IsDel = 0 
 		AND di.JietuanOperator IN (SELECT Id FROM Sys_Users WITH (NoLock) WHERE IsDel = 0  {0})
 		AND di.VisitDate BETWEEN '{1}' AND '{2}'
 	) temp
@@ -2404,11 +2430,10 @@ FROM
 		) AS Sales
 	FROM
 		Grp_DelegationInfo di
-	WHERE di.IsDel = 0 AND di.IsSure = 1
+	WHERE di.IsDel = 0 
 		AND di.JietuanOperator IN (SELECT Id FROM Sys_Users WITH (NoLock) WHERE IsDel = 0 {3})
 		AND di.VisitDate BETWEEN '{4}' AND '{5}'
 	) temp", userSqlWhere, beginDt, endDt, userSqlWhere, lastBeginDt, lastEndDt);
-
             var salesData = await _sqlSugar.SqlQueryable<SalesView>(salesSql).ToListAsync();
 
             thisSales = salesData.Where(x => x.Name.Equals("ThisSales")).First()?.Sales ?? 0;
@@ -2441,7 +2466,6 @@ FROM
         /// <summary>
         ///  市场部销售额
         ///  团组列表
-        ///  (增加团组查询条件 IsSure=1)
         /// </summary>
         /// <param name="_dto">市场部销售额请求dto</param>
         /// <returns></returns>
@@ -2489,6 +2513,48 @@ FROM
 
             string beginDt = $"{_dto.BeginDt} 00:00:00", endDt = $"{_dto.EndDt} 23:59:59";
 
+            //            string sql = string.Format(@$"SELECT
+            //  ROW_NUMBER() OVER (
+            //    ORDER BY
+            //      CollectionDays
+            //  ) AS RowNumber,
+            //  *
+            //FROM
+            //  (
+            //    SELECT
+            //      di.Id,
+            //      di.TeamName,
+            //      di.ClientUnit,
+            //      di.ClientName,
+            //      di.VisitDate,
+            //      di.VisitPNumber,
+            //      di.JietuanOperator,
+            //      di.VisitEndDate,
+            //      (
+            //        SELECT
+            //          CAST(
+            //            COALESCE(SUM(ItemSumPrice * Rate), 0) AS DECIMAL(12, 2)
+            //          ) AS GroupSales
+            //        FROM
+            //          Fin_ForeignReceivables
+            //        WHERE
+            //          IsDel = 0
+            //          AND di.Id = Diid
+            //          AND AddingWay IN (0, 1, 2)
+            //      ) AS GroupSales,
+            //      u.CnName AS GroupPickupUser,
+            //      DATEADD(DAY, 7, di.VisitEndDate) AS CollectionDays
+            //    FROM
+            //      Grp_DelegationInfo di
+            //    WITH
+            //      (NoLock)
+            //      LEFT JOIN Sys_Users u ON di.JietuanOperator = u.Id
+            //    WHERE
+            //      di.Isdel = 0
+            //	  AND di.IsSure = 1 {userSql} 
+            //      AND VisitDate Between '{beginDt}' And  '{endDt}'
+            //  ) Temp ");
+
             string sql = string.Format(@$"SELECT
   ROW_NUMBER() OVER (
     ORDER BY
@@ -2527,7 +2593,19 @@ FROM
       LEFT JOIN Sys_Users u ON di.JietuanOperator = u.Id
     WHERE
       di.Isdel = 0
-	  AND di.IsSure = 1 {userSql} 
+      AND  (
+        SELECT
+          CAST(
+            COALESCE(SUM(ItemSumPrice * Rate), 0) AS DECIMAL(12, 2)
+          ) AS GroupSales
+        FROM
+          Fin_ForeignReceivables
+        WHERE
+          IsDel = 0
+          AND di.Id = Diid
+          AND AddingWay IN (0, 1, 2)
+      ) > 0
+	   {userSql}  
       AND VisitDate Between '{beginDt}' And  '{endDt}'
   ) Temp ");
 
@@ -2602,7 +2680,19 @@ FROM
 From Grp_DelegationInfo di
 Left Join Sys_SetData sd On di.TeamDid = sd.Id
 Where di.Isdel = 0 
-And IsSure = 1 {userSql} 
+And (
+  SELECT
+    CAST(
+      COALESCE(SUM(ItemSumPrice * Rate), 0) AS DECIMAL(12, 2)
+    ) AS GroupSales
+  FROM
+    Fin_ForeignReceivables fr
+  WHERE
+    fr.IsDel = 0
+    AND di.Id = fr.Diid
+    AND AddingWay IN (0, 1, 2)
+) > 0
+ {userSql} 
 And VisitDate Between '{beginDt}' And  '{endDt}'
 Group By [Name]
 Order By Count Desc");
@@ -2615,7 +2705,19 @@ Order By Count Desc");
 From Grp_DelegationInfo di
 Left Join Sys_SetData sd On di.TeamLevSId = sd.Id
 Where di.Isdel = 0 
-And IsSure = 1 {userSql} 
+And (
+  SELECT
+    CAST(
+      COALESCE(SUM(ItemSumPrice * Rate), 0) AS DECIMAL(12, 2)
+    ) AS GroupSales
+  FROM
+    Fin_ForeignReceivables fr
+  WHERE
+    fr.IsDel = 0
+    AND di.Id = fr.Diid
+    AND AddingWay IN (0, 1, 2)
+) > 0
+ {userSql} 
 And VisitDate Between '{beginDt}' And  '{endDt}'
 Group By [Name]
 Order By Count Desc");
@@ -2630,7 +2732,19 @@ Order By Count Desc");
 From Grp_DelegationInfo di
 Left Join Sys_SetData sd On di.TeamDid = sd.Id
 Where di.Isdel = 0 
-And IsSure = 1 {userSql} 
+And (
+  SELECT
+    CAST(
+      COALESCE(SUM(ItemSumPrice * Rate), 0) AS DECIMAL(12, 2)
+    ) AS GroupSales
+  FROM
+    Fin_ForeignReceivables fr
+  WHERE
+    fr.IsDel = 0
+    AND di.Id = fr.Diid
+    AND AddingWay IN (0, 1, 2)
+) > 0
+ {userSql} 
 And VisitDate Between '{beginDt}' And  '{endDt}'
 Group By [Name]
 Order By Count Desc");
@@ -2643,7 +2757,19 @@ Order By Count Desc");
 From Grp_DelegationInfo di
 Left Join Sys_SetData sd On di.TeamLevSId = sd.Id
 Where di.Isdel = 0 
-And IsSure = 1 {userSql} 
+And (
+  SELECT
+    CAST(
+      COALESCE(SUM(ItemSumPrice * Rate), 0) AS DECIMAL(12, 2)
+    ) AS GroupSales
+  FROM
+    Fin_ForeignReceivables fr
+  WHERE
+    fr.IsDel = 0
+    AND di.Id = fr.Diid
+    AND AddingWay IN (0, 1, 2)
+) > 0
+ {userSql} 
 And VisitDate Between '{beginDt}' And  '{endDt}'
 Group By [Name]
 Order By Count Desc");
@@ -2712,7 +2838,19 @@ Order By Count Desc");
 	From Grp_DelegationInfo di
 	Left Join Sys_Users u On di.JietuanOperator = u.Id
 	Where di.Isdel = 0 
-    AND IsSure = 1 {userSql} 
+	And (
+      SELECT
+        CAST(
+          COALESCE(SUM(ItemSumPrice * Rate), 0) AS DECIMAL(12, 2)
+        ) AS GroupSales
+      FROM
+        Fin_ForeignReceivables fr
+      WHERE
+        fr.IsDel = 0
+        AND di.Id = fr.Diid
+        AND AddingWay IN (0, 1, 2)
+    ) > 0
+     {userSql} 
 	And VisitDate Between '{beginDt}' And  '{endDt}'
 	Group By CnName");
 
@@ -2726,7 +2864,6 @@ Order By Count Desc");
         /// <summary>
         ///  市场部销售额
         ///  团组列表、客户类型、客户等级、接单排名
-        ///  (增加团组查询条件 IsSure=1)
         /// </summary>
         /// <param name="_dto">市场部销售额请求dto</param>
         /// <returns></returns>
@@ -2814,7 +2951,19 @@ FROM
       LEFT JOIN Sys_Users u ON di.JietuanOperator = u.Id
     WHERE
       di.Isdel = 0
-	  AND di.IsSure = 1 {userSql} 
+    AND (
+          SELECT
+            CAST(
+              COALESCE(SUM(ItemSumPrice * Rate), 0) AS DECIMAL(12, 2)
+            ) AS GroupSales
+          FROM
+            Fin_ForeignReceivables fr
+          WHERE
+            fr.IsDel = 0
+            AND di.Id = fr.Diid
+            AND AddingWay IN (0, 1, 2)
+        ) > 0 
+	   {userSql} 
       AND VisitDate Between '{beginDt}' And  '{endDt}'
   ) Temp ");
             RefAsync<int> total = 0;
@@ -2829,7 +2978,19 @@ FROM
 From Grp_DelegationInfo di
 Left Join Sys_SetData sd On di.TeamDid = sd.Id
 Where di.Isdel = 0 
-And IsSure = 1 {userSql} 
+And (
+  SELECT
+    CAST(
+      COALESCE(SUM(ItemSumPrice * Rate), 0) AS DECIMAL(12, 2)
+    ) AS GroupSales
+  FROM
+    Fin_ForeignReceivables fr
+  WHERE
+    fr.IsDel = 0
+    AND di.Id = fr.Diid
+    AND AddingWay IN (0, 1, 2)
+) > 0 
+ {userSql} 
 And VisitDate Between '{beginDt}' And  '{endDt}'
 Group By [Name]
 Order By Count Desc");
@@ -2842,7 +3003,19 @@ Order By Count Desc");
 From Grp_DelegationInfo di
 Left Join Sys_SetData sd On di.TeamLevSId = sd.Id
 Where di.Isdel = 0 
-And IsSure = 1 {userSql} 
+And (
+  SELECT
+    CAST(
+      COALESCE(SUM(ItemSumPrice * Rate), 0) AS DECIMAL(12, 2)
+    ) AS GroupSales
+  FROM
+    Fin_ForeignReceivables fr
+  WHERE
+    fr.IsDel = 0
+    AND di.Id = fr.Diid
+    AND AddingWay IN (0, 1, 2)
+) > 0 
+ {userSql} 
 And VisitDate Between '{beginDt}' And  '{endDt}'
 Group By [Name]
 Order By Count Desc");
@@ -2852,15 +3025,27 @@ Order By Count Desc");
             #region 接单排名
 
             string sql4 = string.Format(@$"Select 
-	ROW_NUMBER() Over(Order By Count(*) Desc) As RowNumber,
-	u.CnName As UserName,
-	Count(*) As [Count]
-	From Grp_DelegationInfo di
-	Left Join Sys_Users u On di.JietuanOperator = u.Id
-	Where di.Isdel = 0 
-    AND IsSure = 1 {userSql} 
-	And VisitDate Between '{beginDt}' And  '{endDt}'
-	Group By CnName");
+ROW_NUMBER() Over(Order By Count(*) Desc) As RowNumber,
+u.CnName As UserName,
+Count(*) As [Count]
+From Grp_DelegationInfo di
+Left Join Sys_Users u On di.JietuanOperator = u.Id
+Where di.Isdel = 0 
+And (
+  SELECT
+    CAST(
+      COALESCE(SUM(ItemSumPrice * Rate), 0) AS DECIMAL(12, 2)
+    ) AS GroupSales
+  FROM
+    Fin_ForeignReceivables fr
+  WHERE
+    fr.IsDel = 0
+    AND di.Id = fr.Diid
+    AND AddingWay IN (0, 1, 2)
+) > 0
+    {userSql} 
+And VisitDate Between '{beginDt}' And  '{endDt}'
+Group By CnName");
 
             var rankingData = await _sqlSugar.SqlQueryable<MarketingSalesOrderRankingView>(sql4).ToListAsync();
 
@@ -2879,8 +3064,6 @@ Order By Count Desc");
             return Ok(JsonView(true, "操作成功!", viewData, total));
         }
 
-
-
         /// <summary>
         ///  市场部销售额
         ///  客户拜访列表
@@ -3458,7 +3641,6 @@ FROM
 WHERE
   di.IsDel = 0
   AND di.TeamDid IN (38,39,40,1048)
-  AND di.IsSure = 1
   AND di.VisitDate BETWEEN '{0}' AND '{1}'
 ORDER BY
   di.VisitDate
@@ -3892,7 +4074,7 @@ WHERE
 
             var groupInfos = await _sqlSugar.Queryable<Grp_DelegationInfo>()
                                             .Where(x => x.IsDel == 0)
-                                            .Where(x => x.IsSure == 1)
+                                            //.Where(x => x.IsSure == 1)
                                             .Where(x => x.VisitDate >= _beginDt && x.VisitDate <= _endDt)
                                             .ToListAsync();
 

+ 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>

+ 1 - 0
OASystem/OASystem.Domain/AutoMappers/_baseMappingProfile.cs

@@ -177,6 +177,7 @@ namespace OASystem.Domain.AutoMappers
             CreateMap<OpinionaireManageInfo, Grp_Opinionaire>();
             CreateMap<Grp_Opinionaire, OpinionaireUserListView>();
             CreateMap<OpinionaireUserSaveInfo, Grp_Opinionaire>();
+            CreateMap<Res_TranslatorLibrary, TranslatorLibraryInfoView>();
             #endregion
             #endregion
 

+ 1 - 1
OASystem/OASystem.Domain/Dtos/Resource/TranslatorLibraryDto.cs

@@ -23,7 +23,7 @@ namespace OASystem.Domain.Dtos.Resource
         /// 1 添加
         /// 2 编辑
         /// </summary>
-        public int OpStatus { get; set; }
+        public int Status { get; set; }
 
         public int Id { get; set; }
 

+ 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; }
+
+    }
+}

+ 12 - 12
OASystem/OASystem.Domain/Entities/Resource/Res_TranslatorLibrary.cs

@@ -15,74 +15,74 @@ namespace OASystem.Domain.Entities.Resource
         /// <summary>
         /// 所在地区
         /// </summary>
-        [SugarColumn(ColumnDescription = "所在地区", IsNullable = false, ColumnDataType = "nvarchar(100)")]
+        [SugarColumn(ColumnDescription = "所在地区", IsNullable = true, ColumnDataType = "nvarchar(100)")]
         public string Area { get; set; }
 
         /// <summary>
         /// 姓名
         /// </summary>
-        [SugarColumn(ColumnDescription = "翻译人员姓名", IsNullable = false, ColumnDataType = "nvarchar(100)")]
+        [SugarColumn(ColumnDescription = "翻译人员姓名", IsNullable = true, ColumnDataType = "nvarchar(100)")]
         public string Name { get; set; }
 
         /// <summary>
         /// 性别(0:未设置 1:男 2:女)
         /// </summary>
-        [SugarColumn(ColumnDescription = "性别(0:未设置 1:男 2:女)", IsNullable = false, ColumnDataType = "int")]
+        [SugarColumn(ColumnDescription = "性别(0:未设置 1:男 2:女)", IsNullable = true, ColumnDataType = "int")]
         public int Sex { get; set; }
 
         /// <summary>
         /// 照片
         /// </summary>
-        [SugarColumn(ColumnDescription = "照片", IsNullable = false, ColumnDataType = "nvarchar(max)")]
+        [SugarColumn(ColumnDescription = "照片", IsNullable = true, ColumnDataType = "nvarchar(max)")]
         public string Photo { get; set; }
 
 
         /// <summary>
         /// 联系电话
         /// </summary>
-        [SugarColumn(ColumnDescription = "联系电话", IsNullable = false, ColumnDataType = "varchar(50)")]
+        [SugarColumn(ColumnDescription = "联系电话", IsNullable = true, ColumnDataType = "varchar(50)")]
         public string Tel { get; set; }
 
         /// <summary>
         /// 邮箱号
         /// </summary>
-        [SugarColumn(ColumnDescription = "邮箱号", IsNullable = false, ColumnDataType = "varchar(50)")]
+        [SugarColumn(ColumnDescription = "邮箱号", IsNullable = true, ColumnDataType = "varchar(50)")]
         public string Email { get; set; }
 
         /// <summary>
         /// 微信号
         /// </summary>
-        [SugarColumn(ColumnDescription = "微信号", IsNullable = false, ColumnDataType = "varchar(50)")]
+        [SugarColumn(ColumnDescription = "微信号", IsNullable = true, ColumnDataType = "varchar(50)")]
         public string WechatNo { get; set; }
 
         /// <summary>
         /// 其他社交账号
         /// </summary>
-        [SugarColumn(ColumnDescription = "其他社交账号", IsNullable = false, ColumnDataType = "varchar(50)")]
+        [SugarColumn(ColumnDescription = "其他社交账号", IsNullable = true, ColumnDataType = "varchar(200)")]
         public string OtherSocialAccounts { get; set; }
 
         /// <summary>
         /// 语种
         /// </summary>
-        [SugarColumn(ColumnDescription = "语种", IsNullable = false, ColumnDataType = "varchar(50)")]
+        [SugarColumn(ColumnDescription = "语种", IsNullable = true, ColumnDataType = "varchar(50)")]
         public string Language { get; set; }
 
         /// <summary>
         /// 费用
         /// </summary>
-        [SugarColumn(ColumnDescription = "费用", IsNullable = false, ColumnDataType = "decimal(10,2)")]
+        [SugarColumn(ColumnDescription = "费用", IsNullable = true, ColumnDataType = "decimal(10,2)")]
         public decimal Price { get; set; }
 
         /// <summary>
         /// 币种
         /// </summary>
-        [SugarColumn(ColumnDescription = "语种", IsNullable = false, ColumnDataType = "int")]
+        [SugarColumn(ColumnDescription = "语种", IsNullable = true, ColumnDataType = "int")]
         public int Currency { get; set; }
 
         /// <summary>
         /// 简历或其他证书
         /// </summary>
-        [SugarColumn(ColumnDescription = "简历或其他证书", IsNullable = false, ColumnDataType = "varchar(200)")]
+        [SugarColumn(ColumnDescription = "简历或其他证书", IsNullable = true, ColumnDataType = "varchar(200)")]
         public string Files { 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,
     }
 }

+ 2 - 0
OASystem/OASystem.Domain/ViewModels/Groups/CustomersView.cs

@@ -56,6 +56,8 @@ namespace OASystem.Domain.ViewModels.Groups
         /// 是否审核Str
         /// </summary>
         public string IsAuditGMStr { get; set; }
+
+        public string PayName { get; set; }
     }
 
     public class CustomersByIdView

+ 2 - 0
OASystem/OASystem.Domain/ViewModels/Groups/VisaInfoView.cs

@@ -55,6 +55,8 @@ namespace OASystem.Domain.ViewModels.Groups
         /// </summary>
         public string VisaDescription { get; set; }
         public int IsPay { get; set; }
+
+        public string PayName { get; set; }
     }
 
 }

+ 112 - 1
OASystem/OASystem.Domain/ViewModels/Resource/TranslatorLibraryView.cs

@@ -1,4 +1,5 @@
-using OASystem.Domain.Entities.Resource;
+using Newtonsoft.Json;
+using OASystem.Domain.Entities.Resource;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -10,4 +11,114 @@ namespace OASystem.Domain.ViewModels.Resource
     public class TranslatorLibraryView : Res_TranslatorLibrary
     {
     }
+
+    public class TranslatorLibraryInfoView
+    {
+        public int Id { get; set; }
+
+        /// <summary>
+        /// 所在地区
+        /// </summary>
+        public string Area { get; set; }
+
+        /// <summary>
+        /// 姓名
+        /// </summary>
+        public string Name { get; set; }
+
+        /// <summary>
+        /// 性别(0:未设置 1:男 2:女)
+        /// </summary>
+        public int Sex { get; set; }
+
+        /// <summary>
+        /// 照片
+        /// </summary>
+        public string Photo { get; set; }
+
+
+        /// <summary>
+        /// 联系电话
+        /// </summary>
+        public string Tel { get; set; }
+
+        /// <summary>
+        /// 邮箱号
+        /// </summary>
+        public string Email { get; set; }
+
+        /// <summary>
+        /// 微信号
+        /// </summary>
+        public string WechatNo { get; set; }
+
+        /// <summary>
+        /// 其他社交账号
+        /// </summary>
+        public string OtherSocialAccounts { get; set; }
+
+        /// <summary>
+        /// 语种
+        /// </summary>
+        public string Language { get; set; }
+
+        /// <summary>
+        /// 费用
+        /// </summary>
+        public decimal Price { get; set; }
+
+        /// <summary>
+        /// 币种
+        /// </summary>
+        public int Currency { get; set; }
+
+        /// <summary>
+        /// 简历或其他证书
+        /// </summary>
+        public string Files { get; set; }
+
+        /// <summary>
+        /// 简历或其他证书
+        /// </summary>
+        public FileInfoView[] FilePaths
+        {
+            get
+            {
+                var files1 = new List<FileInfoView>();
+                var files = new List<string>();
+
+                if (!string.IsNullOrEmpty(Files))
+                {
+                    try
+                    {
+                        files = JsonConvert.DeserializeObject<List<string>>(Files);
+                        for (int i = 0; i < files.Count; i++)
+                        {
+                            files1.Add(new FileInfoView()
+                            {
+                                FileName = files[i].ToString(),
+                                FilePathName = $"http://132.232.92.186:24/Office/GrpFile/TranslatorLibrary/{files[i].ToString()}"
+                            });
+                        }
+                    }
+                    catch (Exception)
+                    {
+                    }
+                }
+                return files1.ToArray();
+            }
+        }
+
+
+        /// <summary>
+        /// 备注
+        /// </summary>
+        public string Remark { get; set; }
+    }
+
+    public class FileInfoView
+    {
+        public string FileName { get; set; }
+        public string FilePathName { get; set; }
+    }
 }

+ 159 - 161
OASystem/OASystem.Infrastructure/Repositories/Groups/CustomersRepository.cs

@@ -38,208 +38,206 @@ namespace OASystem.Infrastructure.Repositories.Groups
         public async Task<Result> CustomersByDiId(CustomersByDiIdDto dto)
         {
             Result result = new Result() { Code = -2, Msg = "未知错误" };
-            try
+           
+            string UserId = "";
+            List<Grp_GroupsTaskAssignment> gtaUIdList = _sqlSugar.Queryable<Grp_GroupsTaskAssignment>().Where(a => a.DIId == dto.DiId && a.IsDel == 0 && a.CTId == 82).ToList();
+            foreach (Grp_GroupsTaskAssignment gta in gtaUIdList)
+                UserId += gta.UId + ",";
+
+            if (!string.IsNullOrWhiteSpace(UserId))
+            {
+                UserId = UserId.Substring(0, UserId.Length - 1);
+            }
+            else
             {
-                string UserId = "";
-                List<Grp_GroupsTaskAssignment> gtaUIdList = _sqlSugar.Queryable<Grp_GroupsTaskAssignment>().Where(a => a.DIId == dto.DiId && a.IsDel == 0 && a.CTId == 82).ToList();
-                foreach (Grp_GroupsTaskAssignment gta in gtaUIdList)
-                    UserId += gta.UId + ",";
+                UserId = "0";
+            }
+            string sqlWhere = string.Format(@"Where h.DiId={0} and h.IsDel={1} And h.CreateUserId in ({2})", dto.DiId, 0, UserId);
 
-                if (!string.IsNullOrWhiteSpace(UserId))
-                {
-                    UserId = UserId.Substring(0, UserId.Length - 1);
-                }
-                else
+            int startIndex = (dto.PageIndex - 1) * dto.PageSize + 1;
+            int endIndex = startIndex + dto.PageSize - 1;
+            if (dto.PortType == 1)
+            {
+                string sql = string.Format(@"select h.Id,h.ClientName,InsuranceCosts,Currency,s.Name as CurrencyStr,Attachment,c.OrbitalPrivateTransfer,
+                                                    u.CnName,c.IsAuditGM,s1.Name As 'PayName'
+                                                From Grp_Customers h 
+                                                Join Grp_CreditCardPayment c on h.Id=c.CId and c.CTable=82 and c.isdel=0
+                                                Left Join Sys_SetData s on  h.Currency=s.Id
+                                                Left Join Sys_Users u on u.Id=h.CreateUserId 
+                                                Left Join Sys_SetData s1 on c.PayDId = s1.Id {0}
+                                                Order by c.IsAuditGM,c.PayPercentage,h.CreateTime desc", sqlWhere);
+                List<CustomersView> Customers = _sqlSugar.SqlQueryable<CustomersView>(sql).ToList();
+
+                var parseIntValue = 0;
+                var CrmIds = (from item in Customers
+                                where item.ClientName.Contains(",") || int.TryParse(item.ClientName, out parseIntValue)
+                                select item.ClientName).ToList();
+                var strCrmIds = string.Join(',', CrmIds);
+                List<Crm_DeleClient> clietArr = new List<Crm_DeleClient>();
+                if (!string.IsNullOrWhiteSpace(strCrmIds))
                 {
-                    UserId = "0";
+                    sql = string.Format("SELECT * FROM Crm_DeleClient cdc where id in ({0}) and IsDel  = 0", strCrmIds);
+                    clietArr = _sqlSugar.SqlQueryable<Crm_DeleClient>(sql).ToList();
                 }
-                string sqlWhere = string.Format(@"Where h.DiId={0} and h.IsDel={1} And h.CreateUserId in ({2})", dto.DiId, 0, UserId);
 
-                int startIndex = (dto.PageIndex - 1) * dto.PageSize + 1;
-                int endIndex = startIndex + dto.PageSize - 1;
-                if (dto.PortType == 1)
+                foreach (var item in Customers)
                 {
-                    string sql = string.Format(@"select h.Id,h.ClientName,InsuranceCosts,Currency,s.Name as CurrencyStr,Attachment,c.OrbitalPrivateTransfer,u.CnName,c.IsAuditGM
-                                                    From Grp_Customers h 
-                                                    Join Grp_CreditCardPayment c on h.Id=c.CId and c.CTable=82 and c.isdel=0
-                                                    left Join Sys_SetData s on  h.Currency=s.Id
-                                                    left Join Sys_Users u on u.Id=h.CreateUserId {0} order by c.IsAuditGM,c.PayPercentage,h.CreateTime desc", sqlWhere);
-                    List<CustomersView> Customers = _sqlSugar.SqlQueryable<CustomersView>(sql).ToList();
-
-                    var parseIntValue = 0;
-                    var CrmIds = (from item in Customers
-                                  where item.ClientName.Contains(",") || int.TryParse(item.ClientName, out parseIntValue)
-                                  select item.ClientName).ToList();
-                    var strCrmIds = string.Join(',', CrmIds);
-                    List<Crm_DeleClient> clietArr = new List<Crm_DeleClient>();
-                    if (!string.IsNullOrWhiteSpace(strCrmIds))
-                    {
-                        sql = string.Format("SELECT * FROM Crm_DeleClient cdc where id in ({0}) and IsDel  = 0", strCrmIds);
-                        clietArr = _sqlSugar.SqlQueryable<Crm_DeleClient>(sql).ToList();
-                    }
-
-                    foreach (var item in Customers)
-                    {
-                        if (item.IsAuditGM == 0) item.IsAuditGMStr = "未审核";
-                        else if (item.IsAuditGM == 1) item.IsAuditGMStr = "已通过";
-                        else if (item.IsAuditGM == 2) item.IsAuditGMStr = "未通过";
-                        else if (item.IsAuditGM == 3) item.IsAuditGMStr = "自动审核";
+                    if (item.IsAuditGM == 0) item.IsAuditGMStr = "未审核";
+                    else if (item.IsAuditGM == 1) item.IsAuditGMStr = "已通过";
+                    else if (item.IsAuditGM == 2) item.IsAuditGMStr = "未通过";
+                    else if (item.IsAuditGM == 3) item.IsAuditGMStr = "自动审核";
 
-                        if (item.OrbitalPrivateTransfer == 0) item.OrbitalPrivateTransferStr = "公转";
-                        else if (item.OrbitalPrivateTransfer == 1) item.OrbitalPrivateTransferStr = "私转";
+                    if (item.OrbitalPrivateTransfer == 0) item.OrbitalPrivateTransferStr = "公转";
+                    else if (item.OrbitalPrivateTransfer == 1) item.OrbitalPrivateTransferStr = "私转";
 
-                        if (item.ClientName.Contains(","))
+                    if (item.ClientName.Contains(","))
+                    {
+                        var splitArr = item.ClientName.Split(',');
+                        var name = string.Empty;
+                        foreach (var client in splitArr)
                         {
-                            var splitArr = item.ClientName.Split(',');
-                            var name = string.Empty;
-                            foreach (var client in splitArr)
+                            if (int.TryParse(client, out parseIntValue))
                             {
-                                if (int.TryParse(client, out parseIntValue))
-                                {
-                                    var clientObject = clietArr.Find(x => x.Id == parseIntValue);
-                                    name += (clientObject?.LastName + clientObject?.FirstName + " ");
-                                }
+                                var clientObject = clietArr.Find(x => x.Id == parseIntValue);
+                                name += (clientObject?.LastName + clientObject?.FirstName + " ");
                             }
-
-                            if (!string.IsNullOrWhiteSpace(name))
-                            {
-                                item.ClientName = name;
-                            }
-                            continue;
                         }
-                        if (int.TryParse(item.ClientName, out parseIntValue))
-                        {
-                            var name = string.Empty;
-                            var clientObject = clietArr.Find(x => x.Id == parseIntValue);
-                            name += (clientObject?.LastName + clientObject?.FirstName);
 
-                            if (!string.IsNullOrWhiteSpace(name))
-                            {
-                                item.ClientName = name;
-                            }
-                            continue;
+                        if (!string.IsNullOrWhiteSpace(name))
+                        {
+                            item.ClientName = name;
                         }
+                        continue;
                     }
-
-                    if (!string.IsNullOrWhiteSpace(dto.ClientName))
+                    if (int.TryParse(item.ClientName, out parseIntValue))
                     {
-                        Customers = Customers.Where(x => x.ClientName.Contains(dto.ClientName)).ToList();
+                        var name = string.Empty;
+                        var clientObject = clietArr.Find(x => x.Id == parseIntValue);
+                        name += (clientObject?.LastName + clientObject?.FirstName);
+
+                        if (!string.IsNullOrWhiteSpace(name))
+                        {
+                            item.ClientName = name;
+                        }
+                        continue;
                     }
+                }
 
-                    return result = new Result() { Code = 0, Msg = "查询成功!", Data = Customers };
+                if (!string.IsNullOrWhiteSpace(dto.ClientName))
+                {
+                    Customers = Customers.Where(x => x.ClientName.Contains(dto.ClientName)).ToList();
+                }
+
+                return result = new Result() { Code = 0, Msg = "查询成功!", Data = Customers };
+            }
+            else if (dto.PortType == 2 || dto.PortType == 3)
+            {
+                string sql = string.Format(@"Select * From (	
+                                            Select row_number() over (order by c.IsAuditGM,c.PayPercentage,h.CreateTime desc) as RowNumber,h.Id,h.ClientName,InsuranceCosts,
+                                            Currency,s.Name as CurrencyStr,Attachment,c.OrbitalPrivateTransfer,u.CnName,c.IsAuditGM,s1.Name As 'PayName'
+                                            From Grp_Customers h 
+                                            Join Grp_CreditCardPayment c on h.Id=c.CId and c.CTable=82 and c.isdel=0
+                                            Left Join Sys_SetData s on  h.Currency=s.Id  
+                                            Left Join Sys_Users u on u.Id=h.CreateUserId  
+                                            Left Join Sys_SetData s1 on c.PayDId = s1.Id {0}
+                                            ) temp Where RowNumber Between {1} and {2}", sqlWhere, startIndex, endIndex);
+
+                List<CustomersView> Customers = _sqlSugar.SqlQueryable<CustomersView>(sql).ToList();
+
+                var parseIntValue = 0;
+                var CrmIds = (from item in Customers
+                                where item.ClientName.Contains(",") || int.TryParse(item.ClientName, out parseIntValue)
+                                select item.ClientName).ToList();
+                var strCrmIds = string.Join(',', CrmIds);
+                List<Crm_DeleClient> clietArr = new List<Crm_DeleClient>();
+                if (!string.IsNullOrWhiteSpace(strCrmIds))
+                {
+                    sql = string.Format("SELECT * FROM Crm_DeleClient cdc where id in ({0}) and IsDel  = 0", strCrmIds);
+                    clietArr = _sqlSugar.SqlQueryable<Crm_DeleClient>(sql).ToList();
                 }
-                else if (dto.PortType == 2 || dto.PortType == 3)
+
+                foreach (var item in Customers)
                 {
-                    string sql = string.Format(@"Select * From (	
-                                                Select row_number() over (order by c.IsAuditGM,c.PayPercentage,h.CreateTime desc) as RowNumber,h.Id,h.ClientName,InsuranceCosts,
-                                                Currency,s.Name as CurrencyStr,Attachment,c.OrbitalPrivateTransfer,u.CnName,c.IsAuditGM
-                                                From Grp_Customers h 
-                                                Join Grp_CreditCardPayment c on h.Id=c.CId and c.CTable=82 and c.isdel=0
-                                                left Join Sys_SetData s on  h.Currency=s.Id  
-                                                left Join Sys_Users u on u.Id=h.CreateUserId  {0}
-                                                ) temp Where RowNumber Between {1} and {2}", sqlWhere, startIndex, endIndex);
-
-                    List<CustomersView> Customers = _sqlSugar.SqlQueryable<CustomersView>(sql).ToList();
-
-                    var parseIntValue = 0;
-                    var CrmIds = (from item in Customers
-                                  where item.ClientName.Contains(",") || int.TryParse(item.ClientName, out parseIntValue)
-                                  select item.ClientName).ToList();
-                    var strCrmIds = string.Join(',', CrmIds);
-                    List<Crm_DeleClient> clietArr = new List<Crm_DeleClient>();
-                    if (!string.IsNullOrWhiteSpace(strCrmIds))
-                    {
-                        sql = string.Format("SELECT * FROM Crm_DeleClient cdc where id in ({0}) and IsDel  = 0", strCrmIds);
-                        clietArr = _sqlSugar.SqlQueryable<Crm_DeleClient>(sql).ToList();
-                    }
+                    if (item.IsAuditGM == 0) item.IsAuditGMStr = "未审核";
+                    else if (item.IsAuditGM == 1) item.IsAuditGMStr = "已通过";
+                    else if (item.IsAuditGM == 2) item.IsAuditGMStr = "未通过";
+                    else if (item.IsAuditGM == 3) item.IsAuditGMStr = "自动审核";
 
-                    foreach (var item in Customers)
-                    {
-                        if (item.IsAuditGM == 0) item.IsAuditGMStr = "未审核";
-                        else if (item.IsAuditGM == 1) item.IsAuditGMStr = "已通过";
-                        else if (item.IsAuditGM == 2) item.IsAuditGMStr = "未通过";
-                        else if (item.IsAuditGM == 3) item.IsAuditGMStr = "自动审核";
+                    if (item.OrbitalPrivateTransfer == 0) item.OrbitalPrivateTransferStr = "公转";
+                    else if (item.OrbitalPrivateTransfer == 1) item.OrbitalPrivateTransferStr = "私转";
 
-                        if (item.OrbitalPrivateTransfer == 0) item.OrbitalPrivateTransferStr = "公转";
-                        else if (item.OrbitalPrivateTransfer == 1) item.OrbitalPrivateTransferStr = "私转";
 
+                    if (item.ClientName.Contains(","))
+                    {
+                        var splitArr = item.ClientName.Split(',');
+                        var name = string.Empty;
+                        var i = 0;
 
-                        if (item.ClientName.Contains(","))
+                        while (i < splitArr.Count())
                         {
-                            var splitArr = item.ClientName.Split(',');
-                            var name = string.Empty;
-                            var i = 0;
-
-                            while (i < splitArr.Count())
+                            if (int.TryParse(splitArr[i], out parseIntValue))
                             {
-                                if (int.TryParse(splitArr[i], out parseIntValue))
-                                {
-                                    var clientObject = clietArr.Find(x => x.Id == parseIntValue);
-                                    name += (clientObject?.LastName + clientObject?.FirstName);
-                                }
-
-                                i++;
-
-                                if (i < splitArr.Count())
-                                {
-                                    name += "[*TuT*]";
-                                }
+                                var clientObject = clietArr.Find(x => x.Id == parseIntValue);
+                                name += (clientObject?.LastName + clientObject?.FirstName);
                             }
 
-                            if (!string.IsNullOrWhiteSpace(name))
+                            i++;
+
+                            if (i < splitArr.Count())
                             {
-                                item.ClientName = name.TrimEnd();
+                                name += "[*TuT*]";
                             }
-
-                            continue;
                         }
 
-                        if (int.TryParse(item.ClientName, out parseIntValue))
+                        if (!string.IsNullOrWhiteSpace(name))
                         {
-                            var name = string.Empty;
-                            var clientObject = clietArr.Find(x => x.Id == parseIntValue);
-                            name += (clientObject?.LastName + clientObject?.FirstName);
-
-                            if (!string.IsNullOrWhiteSpace(name))
-                            {
-                                item.ClientName = name;
-                            }
-                            continue;
+                            item.ClientName = name.TrimEnd();
                         }
 
+                        continue;
+                    }
+
+                    if (int.TryParse(item.ClientName, out parseIntValue))
+                    {
+                        var name = string.Empty;
+                        var clientObject = clietArr.Find(x => x.Id == parseIntValue);
+                        name += (clientObject?.LastName + clientObject?.FirstName);
+
+                        if (!string.IsNullOrWhiteSpace(name))
+                        {
+                            item.ClientName = name;
+                        }
+                        continue;
                     }
-                    string CountSql = string.Format(@"Select COUNT(1) as Count From (	
-                                                    select h.Id,h.ClientName,InsuranceCosts,Currency,s.Name as CurrencyStr,Attachment,c.OrbitalPrivateTransfer,u.CnName,c.IsAuditGM
-                                                    From Grp_Customers h 
-                                                    Join Grp_CreditCardPayment c on h.Id=c.CId and c.CTable=82 and c.isdel=0
-                                                    left Join Sys_SetData s on  h.Currency=s.Id  
-                                                    left Join Sys_Users u on u.Id=h.CreateUserId   {0}
-                                                    ) temp", sqlWhere);
-                    DataCount dataCount = _sqlSugar.SqlQueryable<DataCount>(CountSql).First();
-
-                    int count = dataCount.Count;
-                    float totalPage = (float)count / dto.PageSize;//总页数
-                    if (totalPage == 0) totalPage = 1;
-                    else totalPage = (int)Math.Ceiling((double)totalPage);
-
-                    ListViewBase<CustomersView> rst = new ListViewBase<CustomersView>();
-                    rst.DataList = Customers;
-                    rst.DataCount = count;
-                    rst.CurrPageIndex = dto.PageIndex;
-                    rst.CurrPageSize = dto.PageSize;
-                    return result = new Result() { Code = 0, Msg = "查询成功!", Data = rst };
 
                 }
-                else
-                {
-                    return result = new Result() { Code = -2, Msg = "请传入PortType参数,1 Web 2 Android 3 IOS" };
-                }
+                string CountSql = string.Format(@"Select COUNT(1) as Count From (	
+                                                select h.Id,h.ClientName,InsuranceCosts,Currency,s.Name as CurrencyStr,Attachment,c.OrbitalPrivateTransfer,u.CnName,c.IsAuditGM
+                                                From Grp_Customers h 
+                                                Join Grp_CreditCardPayment c on h.Id=c.CId and c.CTable=82 and c.isdel=0
+                                                left Join Sys_SetData s on  h.Currency=s.Id  
+                                                left Join Sys_Users u on u.Id=h.CreateUserId   {0}
+                                                ) temp", sqlWhere);
+                DataCount dataCount = _sqlSugar.SqlQueryable<DataCount>(CountSql).First();
+
+                int count = dataCount.Count;
+                float totalPage = (float)count / dto.PageSize;//总页数
+                if (totalPage == 0) totalPage = 1;
+                else totalPage = (int)Math.Ceiling((double)totalPage);
+
+                ListViewBase<CustomersView> rst = new ListViewBase<CustomersView>();
+                rst.DataList = Customers;
+                rst.DataCount = count;
+                rst.CurrPageIndex = dto.PageIndex;
+                rst.CurrPageSize = dto.PageSize;
+                return result = new Result() { Code = 0, Msg = "查询成功!", Data = rst };
+
             }
-            catch (Exception ex)
+            else
             {
-                return result = new Result() { Code = -2, Msg = "未知错误" };
-                throw;
+                return result = new Result() { Code = -2, Msg = "请传入PortType参数,1 Web 2 Android 3 IOS" };
             }
+           
         }
 
         public async Task<Result> CustomersById(CustomersByIdDto dto)

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

@@ -91,8 +91,9 @@ namespace OASystem.Infrastructure.Repositories.Groups
                     //                            (select Name from Sys_SetData where isdel=0 and v.VisaCurrency=Id) VisaCurrencyStr from
                     //                            Grp_VisaInfo v {0} order by CreateTime desc",sqlWhere);
 
-                    string sql = string.Format(@"  Select v.*, c.IsAuditGM,c.IsPay
-From Grp_VisaInfo as v With(Nolock) left Join Grp_CreditCardPayment as c With(Nolock) On v.Id = c.CId
+                    string sql = string.Format(@"  Select v.*, c.IsAuditGM,c.IsPay,sd.Name As 'PayName' From Grp_VisaInfo as v With(Nolock) 
+left Join Grp_CreditCardPayment as c With(Nolock) On v.Id = c.CId
+Left Join Sys_SetData as sd With(Nolock) On c.PayDId = sd.Id 
 {0}
  And c.CTable = 80 And c.IsDel = 0   ", sqlWhere);
 
@@ -188,10 +189,11 @@ From Grp_VisaInfo as v With(Nolock) left Join Grp_CreditCardPayment as c With(No
                 else if (dto.PortType == 2 || dto.PortType == 3)
                 {
                     string sql = string.Format(@"Select * From (	
-                                            Select row_number() over (order by v.Id Desc) as RowNumber,v.*,c.IsAuditGM,s.Name as VisaCurrencyStr
+                                            Select row_number() over (order by v.Id Desc) as RowNumber,v.*,c.IsAuditGM,s.Name as VisaCurrencyStr,s1.Name As 'PayName'
                                             From Grp_VisaInfo v
-                                            left Join Grp_CreditCardPayment c On v.Id = c.CId and CTable=80 and c.isdel=0
-                                            Left Join Sys_SetData s On v.VisaCurrency = s.Id {0}
+                                            Left Join Grp_CreditCardPayment c On v.Id = c.CId and CTable=80 and c.isdel=0
+                                            Left Join Sys_SetData s On v.VisaCurrency = s.Id 
+                                            Left Join Sys_SetData s1 On c.PayDId = s1.Id {0}
                                             ) temp Where RowNumber Between {1} and {2}", sqlWhere, startIndex, endIndex);
 
                     List<VisaInfoView> infoViews = _sqlSugar.SqlQueryable<VisaInfoView>(sql).ToList();