Browse Source

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

Lyyyi 21 hours ago
parent
commit
0c2282dbd7

+ 276 - 34
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -3,6 +3,7 @@ using Aspose.Words;
 using Aspose.Words.Drawing;
 using Aspose.Words.Tables;
 using DiffMatchPatch;
+using Dm.util;
 using Microsoft.AspNetCore.SignalR;
 using NPOI.SS.Formula.Functions;
 using NPOI.SS.UserModel;
@@ -17548,42 +17549,45 @@ end as 'country'
                     try
                     {
                         var visa = _sqlSugar.Queryable<Res_VisaFeeStandard>()
-                       .Where(x => x.IsDel == 0 && x.Country == item)
-                       .ToList();
-                        var visainfo = _sqlSugar.Queryable<Res_VisaFeeStandardDetails>()
-                        .Where(x => x.IsDel == 0 && visa.Select(x => x.Id).Contains(x.ParentId))
-                        .ToList();
-                        var visaMain = visainfo.FirstOrDefault(x => x.ProvinceId == diparent.Id);
-                        var visayinsiValue = visainfo.FirstOrDefault(x => x.ParentId == visa.FirstOrDefault(x => x.FeeType == 1)?.Id);
-                        visaCountryInfoArr.Add(new
+                            .Where(x => x.IsDel == 0 && x.Country == item)
+                            .ToList();
+                        if (visa.Any())
                         {
-                            country = item,
-                            yinsi = new
-                            {
-                                Id = visayinsiValue.Id,
-                                value = visayinsiValue.SmallVisaPrice
-                            },
-                            visaMain = new
+                            var visainfo = _sqlSugar.Queryable<Res_VisaFeeStandardDetails>()
+                            .Where(x => x.IsDel == 0 && visa.Select(x => x.Id).Contains(x.ParentId))
+                            .ToList();
+                            var visaMain = visainfo.FirstOrDefault(x => x.ProvinceId == diparent.Id);
+                            var visayinsiValue = visainfo.FirstOrDefault(x => x.ParentId == visa.FirstOrDefault(x => x.FeeType == 1)?.Id);
+                            visaCountryInfoArr.Add(new
                             {
-                                Id = visaMain.Id,
-                                IsVisaOnArrival = visaMain.IsVisaOnArrival ? "是" : "否",
-                                IsElectronicSign = visaMain.IsElectronicSign ? "是" : "否",
-                                VisaTime = visaMain.VisaTime,
-                                IsVisaExemptionLarge = visaMain.IsVisaExemptionLarge ? "是" : "否",
-                                LargeVisaPrice = visaMain.LargeVisaPrice,
-                                LargeAgencyFee = visaMain.LargeAgencyFee,
-                                IsVisaExemptionSmall = visaMain.IsVisaExemptionSmall ? "是" : "否",
-                                SmallVisaPrice = visaMain.SmallVisaPrice,
-                                SmallAgencyFee = visaMain.SmallAgencyFee,
-                                NormExtFee = visaMain.NormExtFee,
-                                UrgExtFee = visaMain.UrgExtFee,
-                                IsUrgent = visaMain.IsUrgent ? "是" : "否",
-                                UrgentTime = visaMain.UrgentTime,
-                                UrgentPrice = visaMain.UrgentPrice,
-                                UrgentPriceDesc = visaMain.UrgentPriceDesc,
-                                Remark = visaMain.Remark,
-                            }
-                        });
+                                country = item,
+                                yinsi = new
+                                {
+                                    Id = visayinsiValue.Id,
+                                    value = visayinsiValue.SmallVisaPrice
+                                },
+                                visaMain = new
+                                {
+                                    Id = visaMain.Id,
+                                    IsVisaOnArrival = visaMain.IsVisaOnArrival ? "是" : "否",
+                                    IsElectronicSign = visaMain.IsElectronicSign ? "是" : "否",
+                                    VisaTime = visaMain.VisaTime,
+                                    IsVisaExemptionLarge = visaMain.IsVisaExemptionLarge ? "是" : "否",
+                                    LargeVisaPrice = visaMain.LargeVisaPrice,
+                                    LargeAgencyFee = visaMain.LargeAgencyFee,
+                                    IsVisaExemptionSmall = visaMain.IsVisaExemptionSmall ? "是" : "否",
+                                    SmallVisaPrice = visaMain.SmallVisaPrice,
+                                    SmallAgencyFee = visaMain.SmallAgencyFee,
+                                    NormExtFee = visaMain.NormExtFee,
+                                    UrgExtFee = visaMain.UrgExtFee,
+                                    IsUrgent = visaMain.IsUrgent ? "是" : "否",
+                                    UrgentTime = visaMain.UrgentTime,
+                                    UrgentPrice = visaMain.UrgentPrice,
+                                    UrgentPriceDesc = visaMain.UrgentPriceDesc,
+                                    Remark = visaMain.Remark,
+                                }
+                            });
+                        }
                     }
                     catch (Exception ex)
                     {
@@ -27995,6 +27999,244 @@ ORDER BY
         }
 
 
+        #endregion
+
+        #region 会务流程
+
+        /// <summary>
+        /// 会务流程 - 数据初始化
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns>团组基本信息、团组列表和会务基本信息列表</returns>
+        [HttpPost]
+        public async Task<IActionResult> ConferenceProceduresInit(ConferenceProceduresInitDto dto)
+        {
+            try
+            {
+                Grp_DelegationInfo targetGroup = null;
+
+                targetGroup = await _sqlSugar.Queryable<Grp_DelegationInfo>()
+                    .Where(x => x.Id == dto.GroupId && x.IsDel == 0)
+                    .FirstAsync();
+
+                if (targetGroup == null)
+                {
+                    targetGroup = await _sqlSugar.Queryable<Grp_DelegationInfo>()
+                        .Where(x => x.IsDel == 0)
+                        .OrderByDescending(x => x.CreateTime)
+                        .FirstAsync();
+                }
+
+                if (targetGroup == null)
+                {
+                    return Ok(JsonView(false, "未找到任何团组信息"));
+                }
+
+                var groupList = await _sqlSugar.Queryable<Grp_DelegationInfo>()
+                    .Where(x => x.IsDel == 0)
+                    .OrderByDescending(x => x.CreateTime)
+                    .Select(x => new { x.Id, x.TeamName })
+                    .ToListAsync();
+
+                var conferenceProceduresList = await _sqlSugar.Queryable<Grp_ConferenceProcedures>()
+                    .Where(x => x.DiId == targetGroup.Id && x.IsDel == 0)
+                    .Select(x => new { x.Id, x.Title, x.DataDetails, x.Details, x.Remark })
+                    .ToListAsync();
+
+                if (!conferenceProceduresList.Any())
+                {
+                    conferenceProceduresList = await _sqlSugar.Queryable<Grp_ConferenceProcedures>()
+                    .Where(x => x.DiId == -1 && x.IsDel == 0)
+                    .Select(x => new { x.Id, x.Title, x.DataDetails, x.Details, x.Remark })
+                    .ToListAsync();
+                }
+
+                var conferenceProceduresGroupByTitle = conferenceProceduresList
+                .GroupBy(x => x.Title)
+                .Select(x => new
+                {
+                    title = x.Key,
+                    itmes = x.Select(y => new
+                    {
+                        y.Id,
+                        y.DataDetails,
+                        y.Details,
+                        y.Remark
+                    }).ToList()
+                })
+                .ToList();
+
+                var response = new
+                {
+                    GroupInfo = new
+                    {
+                        targetGroup.Id,
+                        targetGroup.TeamName,
+                        targetGroup.VisitDate,
+                        targetGroup.VisitDays,
+                        targetGroup.VisitPNumber,
+                        targetGroup.VisitCountry,
+                        targetGroup.VisitStartDate,
+                        targetGroup.VisitEndDate,
+                        targetGroup.ClientName,
+                        targetGroup.ClientUnit
+                    },
+                    GroupList = groupList,
+                    ConferenceProceduresList = conferenceProceduresList,
+                    conferenceProceduresGroupByTitle = conferenceProceduresGroupByTitle
+                };
+
+                return Ok(JsonView(true, "SUCCESS", response));
+            }
+            catch (Exception ex)
+            {
+                _logger.LogError(ex, "数据初始化失败");
+                return Ok(JsonView(false, $"ERROR:{ex.Message}"));
+            }
+        }
+
+
+        /// <summary>
+        /// 会务流程 - 保存
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public async Task<IActionResult> ConferenceProceduresSave(ConferenceProceduresSaveDto dto)
+        {
+            _sqlSugar.BeginTran();
+
+            try
+            {
+                //删除旧数据
+                _sqlSugar.Updateable<Grp_ConferenceProcedures>()
+                    .Where(x => x.DiId == dto.GroupId && x.IsDel == 0)
+                    .SetColumns(x => new Grp_ConferenceProcedures
+                    {
+                        IsDel = 1,
+                        DeleteTime = DateTime.Now.ToString("yyyy-MM-dd"),
+                        DeleteUserId = dto.UserId
+                    })
+                    .ExecuteCommand();
+
+                //添加新数据
+                var newData = new List<Grp_ConferenceProcedures>();
+                foreach (var item in dto.ConferenceProceduresSaveItem)
+                {
+                    foreach (var item2 in item.itmes)
+                    {
+                        newData.Add(new Grp_ConferenceProcedures
+                        {
+                            DiId = dto.GroupId,
+                            Title = item.title,
+                            DataDetails = item2.DataDetails,
+                            Details = item2.details,
+                            Remark = item2.Remark,
+                            CreateTime = DateTime.Now,
+                            CreateUserId = dto.UserId
+                        });
+                    }
+                }
+
+                _sqlSugar.Insertable(newData).ExecuteCommand();
+                _sqlSugar.CommitTran();
+            }
+            catch (Exception ex)
+            {
+                _sqlSugar.RollbackTran();
+                return Ok(JsonView(false, $"ERROR:{ex.Message}"));
+            }
+
+            return Ok(JsonView(true, "SUCCESS"));
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> ConferenceProceduresFileDown(ConferenceProceduresFileDownDto dto)
+        {
+
+            var groupInfo = await _sqlSugar.Queryable<Grp_DelegationInfo>()
+                .Where(x => x.Id == dto.GroupId && x.IsDel == 0)
+                .FirstAsync();
+            if (groupInfo == null)
+            {
+                return Ok(JsonView(false, "团组信息不存在"));
+            }
+
+            var conferenceProceduresList = await _sqlSugar.Queryable<Grp_ConferenceProcedures>()
+                .Where(x => x.DiId == dto.GroupId && x.IsDel == 0)
+                .ToListAsync();
+
+            if (!conferenceProceduresList.Any())
+            {
+                return Ok(JsonView(false, "会务流程信息不存在"));
+            }
+
+            var filePath = $"{AppSettingsHelper.Get("ExcelBasePath")}Template/会务流程.xlsx";
+            if (!System.IO.File.Exists(filePath))
+            {
+                return Ok(JsonView(false, "模板文件不存在"));
+            }
+
+            var designer = new WorkbookDesigner();
+            designer.Workbook = new Workbook(filePath);
+            designer.SetDataSource("TB", conferenceProceduresList);
+            designer.Process();
+
+            var sheet = designer.Workbook.Worksheets[0];
+            var cells = sheet.Cells;
+
+            int col = 0;              // 第一列
+            int startRow = 2;         // 若第0行为表头,则从第1行开始;无表头请改为0
+            int endRow = cells.MaxDataRow;
+
+            if (endRow >= startRow)
+            {
+                int mergeStart = startRow;
+                string prev = cells[mergeStart, col].StringValue?.Trim() ?? string.Empty;
+
+                for (int r = startRow + 1; r <= endRow; r++)
+                {
+                    string cur = cells[r, col].StringValue?.Trim() ?? string.Empty;
+                    if (!string.Equals(cur, prev, StringComparison.Ordinal))
+                    {
+                        int count = r - mergeStart;
+                        if (count > 1)
+                            cells.Merge(mergeStart, col, count, 1);
+
+                        mergeStart = r;
+                        prev = cur;
+                    }
+                }
+
+                int tailCount = endRow - mergeStart + 1;
+                if (tailCount > 1)
+                    cells.Merge(mergeStart, col, tailCount, 1);
+            }
+
+            // byte[] bytes = null;
+
+            // using (MemoryStream stream = new MemoryStream())
+            // {
+            //     designer.Workbook.Save(stream, Aspose.Cells.SaveFormat.Xlsx);
+            //     bytes = stream.ToArray();
+            // }
+
+            // return File(bytes, "application/excel", $"{groupInfo.TeamName}_会务流程.xlsx");
+
+
+            string savePath = $"{AppSettingsHelper.Get("ExcelBasePath")}ConferenceProcedures";
+
+            if (!System.IO.Directory.Exists(savePath))
+            {
+                System.IO.Directory.CreateDirectory(savePath);
+            }
+
+            designer.Workbook.Save($"{savePath}/{groupInfo.TeamName}_会务流程.xlsx");
+            string rst = savePath.replace(AppSettingsHelper.Get("ExcelBasePath"),
+            AppSettingsHelper.Get("ExcelBaseUrl") + AppSettingsHelper.Get("ExcelFtpPath"));
+            return Ok(JsonView(true, "SUCCESS", $"{rst}/{groupInfo.TeamName}_会务流程.xlsx"));
+        }
+
         #endregion
 
         #region 团组签证流程

+ 5 - 15
OASystem/OASystem.Api/appsettings.json

@@ -141,23 +141,18 @@
   "ExcelFtpPath": "Office/Excel/",
   "OfficeBaseUrl": "http://132.232.92.186:24/",
   "OfficeTempBasePath": "D:/FTP/File/OA2023/Office/",
-
   "WordBaseUrl": "http://132.232.92.186:24/",
   "WordBasePath": "D:/FTP/File/OA2023/Office/Word/",
   "WordFtpPath": "Office/Word/",
-
   "GrpFileBaseUrl": "http://132.232.92.186:24/",
   "GrpFileBasePath": "D:/FTP/File/OA2023/Office/GrpFile/",
   "GrpFileFtpPath": "Office/GrpFile/",
-
   "ShareFileBaseUrl": "http://132.232.92.186:24/",
   "ShareFileBasePath": "D:/FTP/File/OA2023/Office/ShareFile/",
   "ShareFileFtpPath": "Office/ShareFile/",
-
   "TaskFileBaseUrl": "http://132.232.92.186:24/",
   "TaskFileBasePath": "D:/FTP/File/OA2023/Office/TaskFile/",
   "TaskFileFtpPath": "Office/TaskFile/",
-
   "ExcelTempPath": "D:/FTP/File/OA2023/Office/Excel/Template/",
   "GrpListFileBasePath": "D:/FTP/File/OA2023/Office/GrpFile/GroupList/",
   "GrpListFileFtpPath": "Office/GrpFile/GroupList/",
@@ -165,13 +160,10 @@
   "VisaProgressImageBaseUrl": "http://132.232.92.186:24/",
   "VisaProgressImageBasePath": "D:/FTP/File/OA2023/Image/Visa/",
   "VisaProgressImageFtpPath": "Image/Visa/",
-
   "WageSheetExcelBaseUrl": "http://132.232.92.186:24/",
   "WageSheetExcelFptPath": "D:/FTP/File/OA2023/Office/WageSheetFile/",
-
   "WageSheetTaxExcelBaseUrl": "http://132.232.92.186:24/",
   "WageSheetTaxExcelFptPath": "D:/FTP/File/OA2023/Office/Excel/WageSheetTaxFile/",
-
   "CTableCorrelationPageDatas": [
     {
       "CTableId": 76, //CtableId 酒店预订
@@ -234,7 +226,6 @@
       ]
     }
   ],
-
   //消息通知类型
   "MessageNotificationType": [
     {
@@ -259,8 +250,6 @@
       ]
     }
   ],
-
-
   //职位默认页面权限
   "DefaultPostPageData": [
     {
@@ -406,10 +395,8 @@
       ]
     }
   ],
-
   //日付类型Data
   "Dailypayment": "666,667",
-
   //出入境费用明细权限特定基础人员
   "FeeBasePerm": [
     {
@@ -517,5 +504,8 @@
     "MaxFileSizeMB": 50,
     "ExcelTemplatesPath": "Templates/Excel"
   },
-  "AllowedHosts": "*"
-}
+  "AllowedHosts": "*",
+  "DecreasePaymentsSelectIsGm": [
+    149
+  ]
+}

+ 59 - 4
OASystem/OASystem.Domain/Dtos/Groups/GroupListDto.cs

@@ -20,7 +20,7 @@ namespace OASystem.Domain.Dtos.Groups
     public class GroupCostEditGroupInfoDto
     {
         // 团组Id
-        public int Diid{ get; set; }
+        public int Diid { get; set; }
         // 访问日期
         public string VisitDate { get; set; }
 
@@ -84,6 +84,59 @@ namespace OASystem.Domain.Dtos.Groups
         public int Id { get; set; }
     }
 
+    /// <summary>
+    /// 数据初始化请求DTO
+    /// </summary>
+    public class ConferenceProceduresInitDto
+    {
+        /// <summary>
+        /// 团组Id
+        /// </summary>
+        public int GroupId { get; set; }
+    }
+
+    public class ConferenceProceduresFileDownDto
+    {
+        public int GroupId { get; set; }
+    }
+
+    public class ConferenceProceduresSaveDto
+    {
+        /// <summary>
+        /// 团组Id
+        /// </summary>
+        public int GroupId { get; set; }
+        /// <summary>
+        /// 操作用户Id
+        /// </summary>
+        public int UserId { get; set; }
+        public List<ConferenceProceduresSaveItemDto> ConferenceProceduresSaveItem { get; set; }
+
+    }
+
+    public class ConferenceProceduresSaveItemDto
+    {
+        public string title { get; set; }
+
+        public List<ConferenceProceduresSaveItem> itmes { get; set; }
+    }
+
+    public class ConferenceProceduresSaveItem
+    {
+        /// <summary>
+        /// 时间安排内容
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(100)")]
+        public string DataDetails { get; set; }
+
+        /// <summary>
+        /// 详细内容
+        /// </summary>
+        public string details { get; set; }
+
+        public string Remark { get; set; }
+    }
+
     /// <summary>
     /// 团组信息 操作
     /// 请求dto
@@ -305,14 +358,15 @@ namespace OASystem.Domain.Dtos.Groups
         public int UserId { get; set; }
     }
 
-    public class EnterpriseWeChatNotificationAsyncBaoPiDto {
+    public class EnterpriseWeChatNotificationAsyncBaoPiDto
+    {
         public int currUserId { get; set; }
         public int diid { get; set; }
     }
 
     public class tableSetting
     {
-        public int Index { get;set; }
+        public int Index { get; set; }
 
         public string Property { get; set; }
     }
@@ -328,7 +382,8 @@ namespace OASystem.Domain.Dtos.Groups
 
     public class GroupNameScreenDtoFoaValidator : AbstractValidator<GroupNameScreenDto>
     {
-        public GroupNameScreenDtoFoaValidator() {
+        public GroupNameScreenDtoFoaValidator()
+        {
             RuleFor(it => it.PortType)
                 .NotNull()
                 .NotEmpty()

+ 47 - 0
OASystem/OASystem.Domain/Entities/Groups/Grp_ConferenceProcedures.cs

@@ -0,0 +1,47 @@
+using System;
+
+namespace OASystem.Domain.Entities.Groups
+{
+    /// <summary>
+    /// 会务流程
+    /// </summary>
+    [SugarTable("Grp_ConferenceProcedures")]
+    public class Grp_ConferenceProcedures : EntityBase
+    {
+        /// <summary>
+        /// 团组Id
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int DiId { get; set; }
+
+        /// <summary>
+        /// 标题Id
+        /// </summary>
+        //[SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        //public int TitleId { get; set; }
+
+        /// <summary>
+        /// 标题
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(100)")]
+        public string Title { get; set; }
+
+        /// <summary>
+        /// 时间安排
+        /// </summary>
+        //[SugarColumn(IsNullable = true, ColumnDataType = "DateTime")]
+        //public DateTime Date { get; set; }
+
+        /// <summary>
+        /// 时间安排内容
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(100)")]
+        public string DataDetails { get; set; }
+
+        /// <summary>
+        /// 详细内容
+        /// </summary>
+        public string Details { get; set; }
+    }
+
+}

+ 54 - 25
OASystem/OASystem.Infrastructure/Repositories/Groups/DecreasePaymentsRepository.cs

@@ -12,6 +12,7 @@ using OASystem.Domain.ViewModels.Groups;
 using OASystem.Domain.ViewModels.QiYeWeChat;
 using OASystem.Domain.ViewModels.Resource;
 using OASystem.Infrastructure.Repositories.System;
+using OASystem.Infrastructure.Tools;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -62,25 +63,54 @@ namespace OASystem.Infrastructure.Repositories.Groups
         {
 
             #region 团组下拉框
-
-            List<Grp_GroupsTaskAssignment> grp_GroupsTaskAssignment = Query<Grp_GroupsTaskAssignment>(a => a.IsDel == 0 && a.UId == dto.UserId && a.CTId == dto.CTId).ToList();
-
-            string DiId = "";
-
+            var isGm = AppSettingsHelper
+                        .Get<int>("DecreasePaymentsSelectIsGm")
+                        .Contains(dto.UserId);
             List<DecreasePaymentGroupView> _Delegations = new List<DecreasePaymentGroupView>();
-            if (grp_GroupsTaskAssignment.Count > 0)
-            {
 
+            if (isGm && dto.CTId != 81)
+            {
+                isGm = false;
+            }
 
-                foreach (var item in grp_GroupsTaskAssignment)
-                {
-                    DiId += item.DIId + ",";
-                }
-                if (DiId != "0")
+            if (!isGm)
+            {
+                List<Grp_GroupsTaskAssignment> grp_GroupsTaskAssignment = Query<Grp_GroupsTaskAssignment>(a => a.IsDel == 0 && a.UId == dto.UserId && a.CTId == dto.CTId).ToList();
+                string DiId = "";
+                if (grp_GroupsTaskAssignment.Count > 0)
                 {
-                    DiId = DiId.Substring(0, DiId.Length - 1);
+                    foreach (var item in grp_GroupsTaskAssignment)
+                    {
+                        DiId += item.DIId + ",";
+                    }
+                    if (DiId != "0")
+                    {
+                        DiId = DiId.Substring(0, DiId.Length - 1);
+                    }
+                    string sql = string.Format($@"Select 
+                                        (select ssd.name from Sys_SetData ssd  WHERE  ssd.id  = di.TeamLevSId) as TeamLevSId,
+                                        di.Id,
+										di.TeamName,
+										di.ClientUnit,
+										di.ClientName,
+										di.TourCode,
+										di.TeamDid,
+										sd.[Name] As TeamTypeName,
+										di.VisitCountry,
+										di.VisitStartDate,
+										di.VisitEndDate,
+										di.VisitDays,
+										di.VisitPNumber,
+										di.CreateTime
+										From Grp_DelegationInfo di With(NoLock)
+										Left Join Sys_SetData sd On di.TeamDid = sd.Id
+                                        Where di.Id in({DiId}) and di.IsDel=0 
+										Order By di.VisitStartDate Desc");
+                    _Delegations = _sqlSugar.SqlQueryable<DecreasePaymentGroupView>(sql).ToList();
                 }
-
+            }
+            else
+            {
                 string sql = string.Format($@"Select 
                                         (select ssd.name from Sys_SetData ssd  WHERE  ssd.id  = di.TeamLevSId) as TeamLevSId,
                                         di.Id,
@@ -98,10 +128,8 @@ namespace OASystem.Infrastructure.Repositories.Groups
 										di.CreateTime
 										From Grp_DelegationInfo di With(NoLock)
 										Left Join Sys_SetData sd On di.TeamDid = sd.Id
-                                        Where di.Id in({DiId}) and di.IsDel=0 
+                                        Where di.IsDel=0 
 										Order By di.VisitStartDate Desc");
-
-                //DecreasePaymentGroupView
                 _Delegations = _sqlSugar.SqlQueryable<DecreasePaymentGroupView>(sql).ToList();
             }
             #endregion
@@ -189,7 +217,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 C.CardholderName = "";
                 C.PayMoney = grp_Decrease.FeeTotal;
                 C.PaymentCurrency = grp_Decrease.Currency;
-               
+
                 C.CompanyBankNo = "";
                 C.OtherBankName = dto.OtherBankName;
                 C.OtherSideNo = dto.OtherSideNo;
@@ -382,7 +410,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
                                 //检索历史金额
                                 var histyPrice = _sqlSugar.Queryable<Grp_DecreasePayments>()
-                                    .LeftJoin<Grp_CreditCardPayment>((x, a) => a.IsDel == 0 && a.CTable == 98 && a.CId == x.Id )
+                                    .LeftJoin<Grp_CreditCardPayment>((x, a) => a.IsDel == 0 && a.CTable == 98 && a.CId == x.Id)
                                     .Where((x, a) => x.IsDel == 0 && x.PriceName == dto.PriceName && x.Id != grp_Decrease.Id)
                                     .Select((x, a) => new
                                     {
@@ -418,9 +446,10 @@ namespace OASystem.Infrastructure.Repositories.Groups
                                 }
                             }
 
-                            if (isAuto) {
+                            if (isAuto)
+                            {
 
-                                var execCount =  _sqlSugar.Updateable<Grp_CreditCardPayment>()
+                                var execCount = _sqlSugar.Updateable<Grp_CreditCardPayment>()
                                       .SetColumns(a => new Grp_CreditCardPayment
                                       {
                                           IsAuditGM = 3, //自动审核通过
@@ -536,7 +565,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                                 if (setting != null)
                                 {
                                     var dbList = _sqlSugar.Queryable<Grp_DecreasePayments>()
-                                                .LeftJoin<Grp_CreditCardPayment>((x,a) => x.Id == a.CId && a.IsDel == 0 && a.CTable == 98 && a.DIId == dto.DiId )
+                                                .LeftJoin<Grp_CreditCardPayment>((x, a) => x.Id == a.CId && a.IsDel == 0 && a.CTable == 98 && a.DIId == dto.DiId)
                                                 .Where((x, a) => x.IsDel == 0 && x.PriceName.Contains(spPriceName[0]) && x.PriceName.Contains(spPriceName[1]) && x.Id != dto.Id)
                                                 .Select((x, a) => new
                                                 {
@@ -558,7 +587,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
                                     //现有金额
                                     var sumPrice = dbList.Sum(x => x.RMBPrice);
-                                    
+
                                     //现有数量
                                     //var sumCount = dbList.Sum(x => x.Quantity);
 
@@ -594,7 +623,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                                     })
                                     .Where(a => a.CId == dto.Id && a.CTable == 98 && a.DIId == 2590)
                                     .ExecuteCommand();
-                                recheck = false; 
+                                recheck = false;
                             }
                         }
                         #endregion
@@ -685,7 +714,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
                         CommitTran();
 
-                        var data = new { ccpId = grp_CreditCardPayment.Id, sign = 2, dataId = grp_Decrease.Id  ,recheck };
+                        var data = new { ccpId = grp_CreditCardPayment.Id, sign = 2, dataId = grp_Decrease.Id, recheck };
 
                         return new JsonView() { Code = 200, Msg = "修改成功!", Data = data };
                     }