Browse Source

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

yuanrf 3 weeks ago
parent
commit
2a92d75cc2

+ 19 - 11
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -1891,8 +1891,6 @@ FROM
                     if (_detail.PayType.Equals("现金")) _detail.CardType = "-";
                     else _detail.CardType = initDatas.Find(it => it.Id == entity.CTDId)?.Name ?? "-";
 
-
-
                     //处理金额
                     if (entity.CTable == 1015)
                     {
@@ -2005,29 +2003,37 @@ FROM
 
                                 //roomFeeStr += $"<br/><span style='width:70px;display: inline-block;'></span>";
                                 roomFeeStr += $"<br/>";
-
+                                var roomTotal = 0.00M;
                                 if (hotelReservations.SingleRoomPrice > 0)
                                 {
-                                    roomFeestr1 += $"<span style='width:70px;display: inline-block;'></span>单间:{hotelReservations.SingleRoomPrice.ToString("#0.00")} * {hotelReservations.SingleRoomCount}间 * {(int)hotel_days}晚<br/>";
+                                    var fee = hotelReservations.SingleRoomPrice * hotelReservations.SingleRoomCount * (int)hotel_days;
+                                    roomFeestr1 += $"<span style='width:70px;display: inline-block;'></span>单间:{hotelReservations.SingleRoomPrice.ToString("#0.00")} * {hotelReservations.SingleRoomCount}间 * {(int)hotel_days}晚 = {fee.ToString("#0.00")}<br/>";
                                     __isSingle = true;
+                                    roomTotal += fee;
                                 }
                                 if (hotelReservations.DoubleRoomPrice > 0)
                                 {
-                                    roomFeestr1 += $"<span style='width:70px;display: inline-block;'></span>双人间:{hotelReservations.DoubleRoomPrice.ToString("#0.00")} * {hotelReservations.DoubleRoomCount}间 * {(int)hotel_days}晚<br/>";
+                                    var fee = hotelReservations.DoubleRoomPrice * hotelReservations.DoubleRoomCount * (int)hotel_days;
+                                    roomFeestr1 += $"<span style='width:70px;display: inline-block;'></span>双人间:{hotelReservations.DoubleRoomPrice.ToString("#0.00")} * {hotelReservations.DoubleRoomCount}间 * {(int)hotel_days}晚 = {fee.ToString("#0.00")}<br/>";
                                     __isDouble = true;
+                                    roomTotal += fee;
                                 }
                                 if (hotelReservations.SuiteRoomPrice > 0)
                                 {
-                                    roomFeestr1 += $"<span style='width:70px;display: inline-block;'></span>套房:{hotelReservations.SuiteRoomPrice.ToString("#0.00")} * {hotelReservations.SuiteRoomCount}间 * {(int)hotel_days}晚<br/>";
+                                    var fee = hotelReservations.SuiteRoomPrice * hotelReservations.SuiteRoomCount * (int)hotel_days;
+                                    roomFeestr1 += $"<span style='width:70px;display: inline-block;'></span>套房:{hotelReservations.SuiteRoomPrice.ToString("#0.00")} * {hotelReservations.SuiteRoomCount}间 * {(int)hotel_days}晚 = {fee.ToString("#0.00")}<br/>";
                                     __isSuite = true;
+                                    roomTotal += fee;
                                 }
                                 if (hotelReservations.OtherRoomPrice > 0)
                                 {
-                                    roomFeestr1 += $"<span style='width:70px;display: inline-block;'></span>其他:{hotelReservations.OtherRoomPrice.ToString("#0.00")} * {hotelReservations.OtherRoomCount}间 * {(int)hotel_days}晚)";
+                                    var fee = hotelReservations.OtherRoomPrice * hotelReservations.OtherRoomCount * (int)hotel_days;
+                                    roomFeestr1 += $"<span style='width:70px;display: inline-block;'></span>其他:{hotelReservations.OtherRoomPrice.ToString("#0.00")} * {hotelReservations.OtherRoomCount}间 * {(int)hotel_days}晚 = {fee.ToString("#0.00")}<br/>";
                                     __isOther = true;
+                                    roomTotal += fee;
                                 }
 
-                                if (roomFeestr1.Length > 0) roomFeeStr += roomFeestr1;
+                                if (roomFeestr1.Length > 0) roomFeeStr += roomFeestr1 + $"<span style='width:70px;display: inline-block;'></span>房费总金额:{roomTotal.ToString("#0.00")}"; 
                                 else roomFeeStr += "  0.00 * 0";
 
 
@@ -2147,7 +2153,7 @@ FROM
                                                           $"<span style='font-weight:800;'>{hotelReservations.HotelName} [{hotelReservations.CheckInDate} - {hotelReservations.CheckOutDate}]</span><br/>" +
                                                           $"信用卡金额:{_detail.WaitPay} ({hotelCurrncyName})<br/>" +
                                                           $"房间说明: {hotelReservations.Remark} <br/>" +
-                                                          $"房间费用: {roomCode} {roomName} 当时汇率:{roomData?.Rate.ToString("#0.0000")}{roomFeeStr}  是否由地接或其他人代付:{roomBool}<br/><br/>" +
+                                                          $"房间费用: {roomCode} {roomName} 当时汇率:{roomData?.Rate.ToString("#0.0000")}{roomFeeStr}  <br/>是否由地接或其他人代付:{roomBool}<br/><br/>" +
                                                           $"{hotelBreakfastStr}" +
                                                           $"{hotelGovernmentRentStr}" +
                                                           $"{hotelCityTaxStr}";
@@ -2473,9 +2479,9 @@ FROM
                  * 下方描述处理
                  */
 
-                List<CreditCardPaymentCurrencyPriceItem> nonDuplicat = ccpCurrencyPrices.Where((x, i) => ccpCurrencyPrices.FindIndex(z => z.CurrencyId == x.CurrencyId) == i).ToList();//Lambda表达式去重 
+                var nonDuplicat = ccpCurrencyPrices.Where((x, i) => ccpCurrencyPrices.FindIndex(z => z.CurrencyId == x.CurrencyId) == i).ToList();//Lambda表达式去重 
 
-                CreditCardPaymentCurrencyPriceItem ccpCurrencyPrice = nonDuplicat.Where(it => it.CurrencyId == 836).FirstOrDefault();
+                var ccpCurrencyPrice = nonDuplicat.Where(it => it.CurrencyId == 836).FirstOrDefault();
                 if (ccpCurrencyPrice != null)
                 {
                     int CNYIndex = nonDuplicat.IndexOf(ccpCurrencyPrice);
@@ -2489,6 +2495,7 @@ FROM
                 string thisPaymentStr = string.Format(@"此次付款总金额: ");
                 string balancePaymentStr = string.Format(@"目前剩余尾款总金额: ");
                 string auditedFundsStr = string.Format(@"已审费用总额: ");
+                string unAuditedFundsStr = string.Format(@"未审费用总额: ");
 
                 foreach (var item in nonDuplicat)
                 {
@@ -2529,6 +2536,7 @@ FROM
                 _view.TotalStr2 = thisPaymentStr.Substring(0, thisPaymentStr.Length - 1);
                 _view.TotalStr3 = balancePaymentStr.Substring(0, balancePaymentStr.Length - 1);
                 _view.TotalStr4 = auditedFundsStr.Substring(0, auditedFundsStr.Length - 1);
+                _view.TotalStr5 = unAuditedFundsStr.Substring(0, unAuditedFundsStr.Length - 1);
 
 
                 var _view1 = new

+ 269 - 0
OASystem/OASystem.Api/Controllers/ResourceController.cs

@@ -14,9 +14,11 @@ using OASystem.Domain.ViewModels.Groups;
 using OASystem.Domain.ViewModels.JuHeExchangeRate;
 using OASystem.Domain.ViewModels.QiYeWeChat;
 using OASystem.Infrastructure.Repositories.Groups;
+using Org.BouncyCastle.Asn1.X509;
 using Org.BouncyCastle.Utilities.Encoders;
 using System.Data;
 using System.Diagnostics;
+using System.IO;
 using static OASystem.API.OAMethodLib.JWTHelper;
 using static OpenAI.GPT3.ObjectModels.SharedModels.IOpenAiModels;
 using static QRCoder.PayloadGenerator.SwissQrCode;
@@ -1734,6 +1736,273 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
             }
             return Ok(JsonView(true, "删除成功!"));
         }
+
+        /// <summary>
+        /// 商邀资料 ExcelExport
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> InvitationOfficialActivityExcelExport(QueryInvitationOfficialActivityDataDto dto)
+        {
+            var ExcludedKeyStr = new string[] { "快递费" };
+            var ClientKeyStr = new string[] { "邀请函翻译" };
+            var columns = "Id,UnitName,Contact";
+
+            #region 参数验证
+
+            if (dto.PageIndex < 1) return Ok(JsonView(false, "请传入有效的PageIndex参数!"));
+
+            if (dto.PageSize < 1) return Ok(JsonView(false, "请传入有效的PageSize参数!"));
+
+            #endregion
+
+            if (!string.IsNullOrWhiteSpace(dto.Country)) { columns += ",Country"; }
+            if (!string.IsNullOrWhiteSpace(dto.Delegation)) { columns += ",Delegation"; }
+            if (!string.IsNullOrWhiteSpace(dto.Field)) { columns += ",Field"; }
+
+            DateTime endTime = new DateTime();
+            var InvitationOfficialActivityDataList = _sqlSugar.Queryable<Res_InvitationOfficialActivityData>()
+                                                              .Where(x => x.IsDel == 0)
+                                                              .WhereIF(dto.CreateUserId != 0 && !string.IsNullOrWhiteSpace(dto.CreateUserId.ToString()), x => x.CreateUserId == dto.CreateUserId)
+                                                              .WhereIF(DateTime.TryParse(dto.StartCreateTime, out DateTime startTime) && DateTime.TryParse(dto.EndCreateTime, out endTime), x => x.CreateTime >= startTime && x.CreateTime <= endTime)
+                                                              .Select(columns)
+                                                              .ToList();
+
+            foreach (var item in InvitationOfficialActivityDataList)
+            {
+                EncryptionProcessor.DecryptProperties(item);
+            }
+            InvitationOfficialActivityDataList = InvitationOfficialActivityDataList
+                .WhereIF(!string.IsNullOrWhiteSpace(dto.Country), x => !string.IsNullOrWhiteSpace(x.Country) && x.Country.Contains(dto.Country))
+                .WhereIF(!string.IsNullOrWhiteSpace(dto.UnitName), x => !string.IsNullOrWhiteSpace(x.UnitName) && x.UnitName.Contains(dto.UnitName))
+                .WhereIF(!string.IsNullOrWhiteSpace(dto.Contact), x => !string.IsNullOrWhiteSpace(x.Contact) && x.Contact.Contains(dto.Contact))
+                .WhereIF(!string.IsNullOrWhiteSpace(dto.Delegation), x => !string.IsNullOrWhiteSpace(x.Delegation) && x.Delegation.Contains(dto.Delegation))
+                .WhereIF(!string.IsNullOrWhiteSpace(dto.Field), x => !string.IsNullOrWhiteSpace(x.Field) && x.Field.Contains(dto.Field))
+                .ToList();
+
+            foreach (var item in ExcludedKeyStr)
+            {
+                InvitationOfficialActivityDataList = InvitationOfficialActivityDataList.Where(x => string.IsNullOrWhiteSpace(x.UnitName) || !x.UnitName.Contains(item)).ToList();
+                //sqlWhere += $" And i.UnitName not like '%{item}%' ";
+            }
+
+            foreach (var item in ClientKeyStr)
+            {
+                InvitationOfficialActivityDataList = InvitationOfficialActivityDataList.Where(x => string.IsNullOrWhiteSpace(x.Contact) || !x.Contact.Contains(item)).ToList();
+                //sqlWhere += $" And i.Contact not like '%{item}%' ";
+            }
+
+
+            var ids = InvitationOfficialActivityDataList.Select(x => x.Id);
+
+            var _ivitiesViews = await _sqlSugar.Queryable<Res_InvitationOfficialActivityData>()
+                .LeftJoin<Sys_Users>((a, b) => b.IsDel == 0 && a.CreateUserId == b.Id)
+                .Where((a, b) => ids.Contains(a.Id))
+                .OrderByDescending((a, b) => a.CreateTime)
+                .Select((a, b) => new IOAInfoView
+                {
+                    FaceBook = a.FaceBook,
+                    Id = a.Id,
+                    Address = a.Address,
+                    Background = a.Background,
+                    City = a.City,
+                    Contact = a.Contact,
+                    Country = a.Country,
+                    Delegation = a.Delegation,
+                    Email = a.Email,
+                    Fax = a.Fax,
+                    Field = a.Field,
+                    Ins = a.Ins,
+                    WeChat = a.WeChat,
+                    UnitWeb = a.UnitWeb,
+                    UnitName = a.UnitName,
+                    UnitInfo = a.UnitInfo,
+                    Tel = a.Tel,
+                    SndFileName = a.SndFileName,
+                    Remark = a.Remark,
+                    OtherInfo = a.OtherInfo,
+                    Job = a.Job
+                })
+                .ToListAsync();
+
+            if (!_ivitiesViews.Any()) return Ok(JsonView(false, $"您查询的数据暂无内容,不可导出!"));
+
+            var allGroupIds = new HashSet<int>();
+            foreach (var item in _ivitiesViews)
+            {
+                EncryptionProcessor.DecryptProperties(item);
+
+                if (!string.IsNullOrEmpty(item.Delegation))
+                {
+                    allGroupIds.UnionWith(
+                        item.Delegation.Split(',')
+                        .Select(x =>
+                        {
+                            int id;
+                            if (int.TryParse(x, out id)) return id;
+                            return 0;
+                        })
+                        .Where(id => id != 0)
+                    );
+                }
+            }
+
+            var _DelegationInfos = _sqlSugar.Queryable<Grp_DelegationInfo>()
+                .Where(x => allGroupIds.Contains(x.Id) && x.IsDel == 0)
+                .ToList()
+                .GroupBy(x => x.Id)
+                .ToDictionary(group => group.Key, group => group.Select(g => g.TeamName));
+
+            foreach (var item in _ivitiesViews)
+            {
+                string groupNameStr = "";
+                if (!string.IsNullOrEmpty(item.Delegation))
+                {
+                    var groupIds = item.Delegation.Split(',').Select(x =>
+                    {
+                        int id;
+                        if (int.TryParse(x, out id)) return id;
+                        return 0;
+                    })
+                    .Where(id => id != 0)
+                    .ToArray();
+
+                    foreach (var id in groupIds)
+                    {
+                        if (_DelegationInfos.ContainsKey(id))
+                        {
+                            groupNameStr += string.Join("", _DelegationInfos[id]) + ",";
+                        }
+                    }
+
+                    if (groupNameStr.Length > 1)
+                    {
+                        groupNameStr = groupNameStr.Substring(0, groupNameStr.Length - 1);
+                    }
+                }
+
+                item.DelegationStr = groupNameStr;
+            }
+
+            //获取模板
+            string tempPath = (AppSettingsHelper.Get("ExcelBasePath") + "Template/商邀资料模板.xls");
+            var designer = new WorkbookDesigner();
+            designer.Workbook = new Workbook(tempPath);
+
+            var dt = CommonFun.ToDataTableArray(_ivitiesViews);
+            dt.TableName = $"OADataView";
+
+            designer.SetDataSource(dt);
+            designer.Process();
+
+            //文件名
+            string fileName = $"商邀资料{DateTime.Now.ToString("yyyyMMddHHmmss")}.xls";
+            designer.Workbook.Save(AppSettingsHelper.Get("ExcelBasePath") + "InvitationOfficialActivityExport/" + fileName);
+            string url = AppSettingsHelper.Get("ExcelBaseUrl") + "Office/Excel/InvitationOfficialActivityExport/" + fileName;
+            return Ok(JsonView(true, "成功", url));
+        }
+
+        /// <summary>
+        /// 商邀资料 导入文件(Excel)模板下载 
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpGet]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> InvitationOfficialActivityExcelTemplateExport()
+        {
+            //获取模板
+            string fileName = $"商邀资料上传文件模板.xls";
+            string url = AppSettingsHelper.Get("ExcelBaseUrl") + "Office/Excel/Template/" + fileName;
+            return Ok(JsonView(true, "成功", url));
+        }
+
+        /// <summary>
+        /// 商邀资料 导入文件(Excel)模板下载 
+        /// </summary>
+        /// <param name="file"></param>
+        /// <param name="currUserId"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> InvitationOfficialActivityExcelUpload(IFormFile file,int currUserId)
+        {
+            var fileName = file.FileName;
+            var filePostfix = fileName.Split(".")[1].ToUpper();
+            if (!filePostfix.Contains("XLS")) return Ok(JsonView(false, $"请传入Excel文件"));
+            if (file.Length < 1) return Ok(JsonView(false, $"请传入有效的文件"));
+            if (currUserId < 1) return Ok(JsonView(false, $"请传入有效的UserId"));
+
+            //保存文件
+            string fileDirPath = string.Format(@"{0}InvitationOfficialActivityExcelUpload/", AppSettingsHelper.Get("ExcelBasePath"));
+            if (!Directory.Exists(fileDirPath))
+            {
+                Directory.CreateDirectory(fileDirPath);
+            }
+            var filePath = Path.Combine(fileDirPath, fileName);
+            await using var stream = new FileStream(filePath, FileMode.Create);
+            await file.CopyToAsync(stream);
+
+            //读取保存的文件
+            Workbook workbook = new Workbook(filePath);
+            if (workbook == null) return Ok(JsonView(false, $"Excel文件不存在!"));
+            Worksheet worksheet = workbook.Worksheets[0];
+            if (worksheet == null) return Ok(JsonView(false, $"Excel文件工作簿不存在!"));
+
+            var infos = new List<Res_InvitationOfficialActivityData>();
+            var groupNames = await _sqlSugar.Queryable<Grp_DelegationInfo>().Where(x => x.IsDel == 0 && !string.IsNullOrEmpty(x.TeamName)).Select(x => new { x.Id, x.TeamName }).ToListAsync();
+            for (int row = 1; row < worksheet.Cells.MaxDataRow + 1; row++)
+            {
+                var groupIdsLabel = string.Empty;
+                var groupNames1 = worksheet.Cells[row, 14].StringValue ?? "-";
+                if (!string.IsNullOrEmpty(groupNames1))
+                {
+                    if (groupNames1.Contains(";"))
+                    {
+                        var groupNameArray = groupNames1.Split(";").Where(x => !string.IsNullOrEmpty(x)).ToList();
+
+                        var groupIds = groupNames.Where(x => groupNameArray.Contains(x.TeamName)).Select(x => x.Id).ToList();
+                        if (groupIds.Any()) groupIdsLabel = string.Join(',', groupIds);
+                    }
+                    else groupIdsLabel = groupNames.Where(x => groupNames1.Equals(x.TeamName)).FirstOrDefault()?.Id.ToString() ?? string.Empty;
+
+                }
+                
+                infos.Add(new Res_InvitationOfficialActivityData() { 
+                    Country = worksheet.Cells[row, 0].StringValue ?? "-",
+                    City = worksheet.Cells[row, 1].StringValue ?? "-",
+                    UnitName = worksheet.Cells[row, 2].StringValue ?? "-",
+                    Field = worksheet.Cells[row, 3].StringValue ?? "-",
+                    Address = worksheet.Cells[row, 4].StringValue ?? "-",
+                    UnitInfo = worksheet.Cells[row, 5].StringValue ?? "-",
+                    Contact = worksheet.Cells[row, 6].StringValue ?? "-",
+                    Job = worksheet.Cells[row, 7].StringValue ?? "-",
+                    Tel = worksheet.Cells[row, 8].StringValue ?? "-",
+                    Email = worksheet.Cells[row, 9].StringValue ?? "-",
+                    WeChat = worksheet.Cells[row, 10].StringValue ?? "-",
+                    FaceBook = worksheet.Cells[row, 11].StringValue ?? "-",
+                    Ins = worksheet.Cells[row, 12].StringValue ?? "-",
+                    Fax = worksheet.Cells[row, 13].StringValue ?? "-",
+                    Delegation = groupIdsLabel,
+                    SndFilePath = worksheet.Cells[row, 15].StringValue ?? "-",
+                    OtherInfo = worksheet.Cells[row, 16].StringValue ?? "-",
+                    Remark = $"[{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}] Excel上传文件添加! 文件存储地址[{filePath}]",
+                    CreateUserId = currUserId,
+                    IsDel = 0
+                });
+            }
+
+            //加密
+            foreach (var item in infos) EncryptionProcessor.EncryptProperties(item);
+
+            var addCount = await _sqlSugar.Insertable(infos).ExecuteCommandAsync();
+            if (addCount < 1) return Ok(JsonView(false, "文件上传添加失败!"));
+
+            return Ok(JsonView(true, $"上传文件添加成功!共添加{addCount}条!"));
+        }
+
         #endregion
 
         #region 公务出访

+ 1 - 1
OASystem/OASystem.Domain/Attributes/EncryptedAttribute.cs

@@ -7,7 +7,7 @@ using System.Threading.Tasks;
 namespace OASystem.Domain.Attributes
 {
     /// <summary>
-    /// Aes 加密
+    /// Aes 加密/解密
     /// </summary>
     [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
     public class EncryptedAttribute : Attribute

+ 1 - 0
OASystem/OASystem.Domain/ViewModels/Groups/Grp_CreditCardPaymentView.cs

@@ -101,6 +101,7 @@ namespace OASystem.Domain.ViewModels.Groups
         public string TotalStr2 { get; set; }
         public string TotalStr3 { get; set; }
         public string TotalStr4 { get; set; }
+        public string TotalStr5 { get; set; }
     }
 
     public class Grp_CreditCardPaymentDetailView

+ 25 - 3
OASystem/OASystem.Domain/ViewModels/Resource/InvitationOfficialActivityDataView.cs

@@ -1,4 +1,5 @@
-using OASystem.Domain.Entities;
+using OASystem.Domain.Attributes;
+using OASystem.Domain.Entities;
 using OASystem.Domain.Entities.Resource;
 using System;
 using System.Collections.Generic;
@@ -23,70 +24,86 @@ namespace OASystem.Domain.ViewModels.Resource
     {
         public int Id { get; set; }
 
-        // <summary>
+        /// <summary>
         /// 邀请方国家
         /// </summary>
+        [Encrypted]
         public string Country { get; set; }
         /// <summary>
         /// 城市
         /// </summary>
+        [Encrypted]
         public string City { get; set; }
         /// <summary>
         /// 邀请方名称
         /// </summary>
+        [Encrypted]
         public string UnitName { get; set; }
         /// <summary>
         ///邀请方官网
         /// </summary>
+        [Encrypted]
         public string UnitWeb { get; set; }
         /// <summary>
         /// 涉及领域
         /// </summary>
+        [Encrypted]
         public string Field { get; set; }
         /// <summary>
         /// 邀请方地址
         /// </summary>
+        [Encrypted]
         public string Address { get; set; }
         /// <summary>
         /// 邀请方信息
         /// </summary>
+        [Encrypted]
         public string UnitInfo { get; set; }
         /// <summary>
         /// 联系人
         /// </summary>
+        [Encrypted]
         public string Contact { get; set; }
         /// <summary>
         /// 职务
         /// </summary>
+        [Encrypted]
         public string Job { get; set; }
         /// <summary>
         /// 联系电话
         /// </summary>
+        [Encrypted]
         public string Tel { get; set; }
         /// <summary>
         /// 电子邮箱
         /// </summary>
+        [Encrypted]
         public string Email { get; set; }
         /// <summary>
         /// 微信
         /// </summary>
+        [Encrypted]
         public string WeChat { get; set; }
         /// <summary>
         /// fb
         /// </summary>
+        [Encrypted]
         public string FaceBook { get; set; }
         /// <summary>
         /// ins
         /// </summary>
+        [Encrypted]
         public string Ins { get; set; }
         /// <summary>
         /// 团名
         /// </summary>
+        [Encrypted]
         public string Delegation { get; set; }
 
         /// <summary>
         /// 文件地址
         /// </summary>
+        [Encrypted]
         public string SndFileName { get; set; }
 
         /// <summary>
@@ -142,19 +159,24 @@ namespace OASystem.Domain.ViewModels.Resource
         /// <summary>
         /// 传真号码
         /// </summary>
+        [Encrypted]
         public string Fax { get; set; }
 
         /// <summary>
         /// 其他信息
         /// </summary>
+        [Encrypted]
         public string OtherInfo { get; set; }
 
         /// <summary>
         /// 背景
         /// </summary>
+        [Encrypted]
         public string Background { get; set; }
 
+        [Encrypted]
         public string Remark { get; set; }
-    }
 
+        public string DelegationStr { get; set; }
+    }
 }

+ 11 - 1
OASystem/OASystem.Infrastructure/Tools/CommonFun.cs

@@ -536,7 +536,17 @@ public static class CommonFun
             PropertyInfo[] propertys = list[0].GetType().GetProperties();
             foreach (PropertyInfo pi in propertys)
             {
-                result.Columns.Add(pi.Name, pi.PropertyType);
+                try
+                {
+                    result.Columns.Add(pi.Name, pi.PropertyType);
+                }
+                catch (Exception ex)
+                {
+
+                    Console.WriteLine($"{pi.Name}:{ex.Message}");
+                }
+
+                
             }
             for (int i = 0; i < list.Count; i++)
             {