Просмотр исходного кода

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

yuanrf месяцев назад: 11
Родитель
Сommit
0200d8a116

+ 86 - 29
OASystem/OASystem.Api/Controllers/FinancialController.cs

@@ -899,7 +899,7 @@ namespace OASystem.API.Controllers
                                                       AirType = tcl.ShippingSpaceTypeId
                                                   })
                                                   .ToList();
-                    if (DeleClientList.Count<1)
+                    if (DeleClientList.Count < 1)
                     {
                         return Ok(JsonView(false, "暂无团组成员,请先填写团组成员!!!"));
                     }
@@ -947,14 +947,14 @@ namespace OASystem.API.Controllers
 
                             //计算费用总和
                             decimal airPrice = client.AirType == 460 ? _EnterExitCosts.AirJJ : _EnterExitCosts.AirGW;
-                            decimal AllPrice = airPrice + _EnterExitCosts.CityTranffic + dac1.Sum(x => x.SubTotal) + dac2.Sum(x => x.SubTotal) + 
-                                               dac3.Sum(x => x.SubTotal) + dac4.Sum(x => x.SubTotal) + _EnterExitCosts.Visa + _EnterExitCosts.Safe + 
+                            decimal AllPrice = airPrice + _EnterExitCosts.CityTranffic + dac1.Sum(x => x.SubTotal) + dac2.Sum(x => x.SubTotal) +
+                                               dac3.Sum(x => x.SubTotal) + dac4.Sum(x => x.SubTotal) + _EnterExitCosts.Visa + _EnterExitCosts.Safe +
                                                _EnterExitCosts.Service;
                             WordAllPrice += AllPrice;
 
                             UsersTop += firstName + "出访费用为¥" + AllPrice.ToString("#0.00") + "元、";
 
-                            TeableBookmarkArr.Add("jp",(client.AirType == 460 ? _EnterExitCosts.AirJJ : _EnterExitCosts.AirGW).ToString("#0.00") + " 元"); //机票金额
+                            TeableBookmarkArr.Add("jp", (client.AirType == 460 ? _EnterExitCosts.AirJJ : _EnterExitCosts.AirGW).ToString("#0.00") + " 元"); //机票金额
                             TeableBookmarkArr.Add("cs", _EnterExitCosts.CityTranffic.ToString("#0.00") + " 元"); //城市交通费用
                             TeableBookmarkArr.Add("zs", dac1.Sum(x => Convert.ToDecimal(x.SubTotal)).ToString("#0.00") + " 元"); //住宿费
                             string zsinfo = string.Empty;
@@ -997,7 +997,7 @@ namespace OASystem.API.Controllers
                                     SetCells(ChildTable, doc, rowIndex, 3, " 汇率" + (item.SubTotal / item.Cost).ToString("#0.00"));
                                     SetCells(ChildTable, doc, rowIndex, 4, "CNY" + item.SubTotal * days + "\r\n");
                                     rowIndex++;
-                                    zsinfo += item.Place + "  " + days + "晚 " + item.Cost + item.Currency + "/晚" + " 汇率" + (item.SubTotal /item.Cost).ToString("#0.00") + "   CNY" + item.SubTotal * days + "\r\n";
+                                    zsinfo += item.Place + "  " + days + "晚 " + item.Cost + item.Currency + "/晚" + " 汇率" + (item.SubTotal / item.Cost).ToString("#0.00") + "   CNY" + item.SubTotal * days + "\r\n";
                                 }
 
                             }
@@ -1030,9 +1030,9 @@ namespace OASystem.API.Controllers
                                     SetCells(ChildTable1, doc, rowIndex, 1, days + "天");
                                     SetCells(ChildTable1, doc, rowIndex, 2, item.Cost + item.Currency + "/天");
                                     SetCells(ChildTable1, doc, rowIndex, 3, " 汇率" + (item.SubTotal / item.Cost).ToString("#0.00"));
-                                    SetCells(ChildTable1, doc, rowIndex, 4, "CNY" +item.SubTotal * days);
+                                    SetCells(ChildTable1, doc, rowIndex, 4, "CNY" + item.SubTotal * days);
                                     rowIndex++;
-                                    hsinfo += item.Place + "  " + days + "天 " + item.Cost + item.Currency + "/天" + " 汇率" + (item.SubTotal / item.Cost).ToString("#0.00") + "   CNY" +item.SubTotal * days + "\r\n";
+                                    hsinfo += item.Place + "  " + days + "天 " + item.Cost + item.Currency + "/天" + " 汇率" + (item.SubTotal / item.Cost).ToString("#0.00") + "   CNY" + item.SubTotal * days + "\r\n";
                                 }
 
                             }
@@ -1127,7 +1127,7 @@ namespace OASystem.API.Controllers
 
                     //文件名
                     string zipFileName = _DelegationInfo.TeamName + "-收款账单.zip";
-                    string zipPath =  $"ForeignReceivables/File/{_DelegationInfo.TeamName}-收款账单{DateTime.Now.ToString("yyyyMMddHHmmss")}.zip";
+                    string zipPath = $"ForeignReceivables/File/{_DelegationInfo.TeamName}-收款账单{DateTime.Now.ToString("yyyyMMddHHmmss")}.zip";
                     try
                     {
                         using (var zip = ZipFile.Open(AppSettingsHelper.Get("WordBasePath") + zipPath, ZipArchiveMode.Create))
@@ -1603,7 +1603,8 @@ namespace OASystem.API.Controllers
                 {
                     DateTime dtTemp;
                     bool b = DateTime.TryParse(item_rst.visitDate, out dtTemp);
-                    if (b) {
+                    if (b)
+                    {
                         item_rst.visitDate = dtTemp.ToString("yyyy-MM-dd");
                     }
 
@@ -1768,7 +1769,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
                                             }).ToList();
 
 
-                return Ok(JsonView(true, "操作成功!",new { ConpanyData = conpanyDatas }));
+                return Ok(JsonView(true, "操作成功!", new { ConpanyData = conpanyDatas }));
             }
             catch (Exception ex)
             {
@@ -1818,7 +1819,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
                 }
 
                 tree_Fin_DailyFeePaymentResult dailyResult = PayRequest_DailyByDateRange(dto.Status, checkedView.DailyPaymentIds, dto.beginDt, dto.endDt);
-                tree_Group_DailyFeePaymentResult groupResult = PayRequest_GroupPaymentByDateRange( dto.Status,checkedView.GroupIds, dto.beginDt, dto.endDt);
+                tree_Group_DailyFeePaymentResult groupResult = PayRequest_GroupPaymentByDateRange(dto.Status, checkedView.GroupIds, dto.beginDt, dto.endDt);
 
                 return Ok(JsonView(true, "获取成功", new { daily = dailyResult, group = groupResult }));
             }
@@ -1875,7 +1876,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
         /// <param name="beginDt"></param>
         /// <param name="endDt"></param>
         /// <returns></returns>
-        private tree_Group_DailyFeePaymentResult PayRequest_GroupPaymentByDateRange(int status,List<int> _groupIds, string beginDt, string endDt)
+        private tree_Group_DailyFeePaymentResult PayRequest_GroupPaymentByDateRange(int status, List<int> _groupIds, string beginDt, string endDt)
         {
             tree_Group_DailyFeePaymentResult _DailyFeePaymentResult = new tree_Group_DailyFeePaymentResult();
             List<tree_Group_DailyFeePaymentPageListView> dataList = new List<tree_Group_DailyFeePaymentPageListView>();
@@ -1919,7 +1920,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
             var ExtraCostDatas = _sqlSugar.Queryable<Fin_GroupExtraCost>().Where(it => it.IsDel == 0 && groupIds.Contains(it.DiId)).ToList();
             #endregion
             //Expense company
-            foreach ( var groupInfo in _groupDatas) 
+            foreach (var groupInfo in _groupDatas)
             {
                 List<Group_DailyFeePaymentContentInfolView> childList = new List<Group_DailyFeePaymentContentInfolView>();
 
@@ -1941,7 +1942,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
                             {
                                 if (payInfo.OrbitalPrivateTransfer == 0) //公转
                                 {
-                                    priName = $"【{orbitalPrivateTransfer}】【导游: {opData.ServiceGuide} 】{opData.Area}" ;
+                                    priName = $"【{orbitalPrivateTransfer}】【导游: {opData.ServiceGuide} 】{opData.Area}";
                                 }
                                 else if (payInfo.OrbitalPrivateTransfer == 1) //私转
                                 {
@@ -2072,7 +2073,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
                 {
                     item.IsChecked = _dailyIds.Contains(item.Id);
                 }
-                
+
                 if (dic_setData.ContainsKey(item.PriceTypeId))
                 {
                     item.priceTypeStr = dic_setData[item.PriceTypeId];
@@ -2152,7 +2153,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
 
             try
             {
-                PaymentRequestCheckedView requestCheckedView =new PaymentRequestCheckedView();
+                PaymentRequestCheckedView requestCheckedView = new PaymentRequestCheckedView();
                 List<int> groupIds = new List<int>();
                 List<int> dailyPaymentIds = new List<int>();
 
@@ -2186,15 +2187,15 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
                 if (dto.Type == 1)
                 {
                     TimeSpan ts = DateTime.Now.AddDays(180) - DateTime.Now; //设置redis 过期时间 半年(180)
-                    var status = await RedisRepository.RedisFactory.CreateRedisRepository().StringSetAsync<string>("paymentRequestCheckedData", JsonConvert.SerializeObject(requestCheckedView),ts);
+                    var status = await RedisRepository.RedisFactory.CreateRedisRepository().StringSetAsync<string>("paymentRequestCheckedData", JsonConvert.SerializeObject(requestCheckedView), ts);
                     if (status)
                     {
                         return Ok(JsonView(true, "操作成功!"));
                     }
                 }
-                else if(dto.Type == 2)
+                else if (dto.Type == 2)
                 {
-                    var status = await RedisRepository.RedisFactory.CreateRedisRepository().KeyDeleteAsync("paymentRequestCheckedData" );
+                    var status = await RedisRepository.RedisFactory.CreateRedisRepository().KeyDeleteAsync("paymentRequestCheckedData");
                     if (status)
                     {
                         return Ok(JsonView(true, "操作成功!"));
@@ -2286,7 +2287,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
         /// <returns></returns>
         [HttpPost]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
-        public async Task<IActionResult> PostPayRequestPayChange(PayRequestPayChangeDto dto) 
+        public async Task<IActionResult> PostPayRequestPayChange(PayRequestPayChangeDto dto)
         {
             if (dto.UserId < 1)
             {
@@ -2426,7 +2427,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
                     checkedView = JsonConvert.DeserializeObject<PaymentRequestCheckedView>(checkedStr.ToString());
                 }
 
-                if (checkedView == null )
+                if (checkedView == null)
                 {
                     return Ok(JsonView(false, "没有选中的数据!"));
                 }
@@ -2591,6 +2592,9 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
             _entity.PriceDetailType = dto.priceDetailType;
             _entity.FilePath = dto.filePath;
             _entity.Remark = dto.remark;
+            _entity.PriceCount = dto.PriceCount;
+            _entity.PriceDt = DateTime.Parse(dto.PriceDt);
+            _entity.PriceSum = dto.price * dto.PriceCount;
 
             _daiRep.BeginTran();
             if (dto.editType == 1)
@@ -2616,7 +2620,10 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
                     PriceDetailType = dto.priceDetailType,
                     Coefficient = dto.coefficient,
                     FilePath = dto.filePath,
-                    Remark = dto.remark
+                    Remark = dto.remark,
+                    PriceCount = dto.PriceCount,
+                    PriceDt = _entity.PriceDt,
+                    PriceSum = _entity.PriceSum
                 });
                 if (!res)
                 {
@@ -2778,6 +2785,37 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
             return false;
         }
 
+        /// <summary>
+        /// 超支费用
+        /// 详情查询
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> PostGroupExtraCost_Detail(Fin_GroupExtraCostDto_Detail dto)
+        {
+            if (dto.Id < 1) { 
+                return Ok(JsonView(false, "查询失败"));
+            }
+
+            string sql = string.Format(@" Select 
+                                                f.Id,f.DiId,
+												f.PriceName,f.Price,f.PriceCurrency,c.Payee,c.OrbitalPrivateTransfer,c.PayDId,
+												c.CTDId,f.PriceType,f.PriceDetailType,f.Coefficient,f.Remark,f.PriceCount,f.PriceDt													
+                                                From Fin_GroupExtraCost f
+                                                Inner Join Grp_CreditCardPayment c On f.Id = c.CId
+                                                Left Join Sys_Users u On f.CreateUserId = u.Id
+                                                Where f.IsDel=0 And c.CTable = 1015 
+												And f.Id = {0} ", dto.Id);
+            Fin_GroupExtraCostDetailView detailView = await _sqlSugar.SqlQueryable<Fin_GroupExtraCostDetailView>(sql).FirstAsync();
+            if (detailView == null) {
+                return Ok(JsonView(false, "查询失败"));
+            }
+
+            return Ok(JsonView(true, "查询成功", detailView));
+        }
+
         /// <summary>
         /// 超支费用
         /// 列表查询
@@ -2793,7 +2831,8 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
             int endIndex = startIndex + dto.PageSize - 1;
             string sql_data = string.Format(@"Select * From (	
                                                 Select row_number() over (order by f.Id Desc) as RowNumber,f.Id,f.DiId,
-												f.PriceName,f.PriceType,CAST(f.Price as varchar)+' '+s.[Name] as PriceStr,f.FilePath,f.CreateUserId,f.CreateTime,c.IsAuditGM
+												f.PriceName,f.PriceType,f.PriceDetailType,CAST(f.Price as varchar)+' '+s.[Name] as PriceStr,f.PriceCount,CAST(f.PriceSum as varchar)+' '+s.[Name] as PriceSumStr,
+                                                f.CreateUserId,f.PriceDt,c.IsAuditGM												
                                                 From Fin_GroupExtraCost f
                                                 Inner Join Grp_CreditCardPayment c On f.Id = c.CId
                                                 Inner Join Sys_SetData s On f.PriceCurrency = s.Id
@@ -2820,15 +2859,16 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
 
                 foreach (var item in dataList)
                 {
-                    DateTime dtTemp_CreateTime;
-                    bool b_ct = DateTime.TryParse(item.CreateTime, out dtTemp_CreateTime);
-                    if (b_ct) {
-                        item.CreateTime = dtTemp_CreateTime.ToString("yyyy-MM-dd HH:mm");
+                    DateTime dtTemp_PriceDt;
+                    bool b_ct = DateTime.TryParse(item.PriceDt, out dtTemp_PriceDt);
+                    if (b_ct)
+                    {
+                        item.PriceDt = dtTemp_PriceDt.ToString("yyyy-MM-dd");
                     }
 
 
 
-                    //费用详细类型
+                    //费用类型
                     if (dic_setData.ContainsKey(item.PriceType))
                     {
                         item.PriceTypeStr = dic_setData[item.PriceType];
@@ -2844,6 +2884,23 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
                         }
                     }
 
+                    if (item.PriceDetailType > 0) {
+                        if (dic_setData.ContainsKey(item.PriceDetailType))
+                        {
+                            item.PriceTypeStr = item.PriceTypeStr + " - " + dic_setData[item.PriceDetailType];
+                        }
+                        else
+                        {
+                            Sys_SetData sd_priceTypeDetail = _daiRep.Query<Sys_SetData>(s => s.Id == item.PriceDetailType).First();
+                            if (sd_priceTypeDetail != null)
+                            {
+                                string tempName = sd_priceTypeDetail.Name.Replace("n", "");
+                                item.PriceTypeStr = item.PriceTypeStr + " - " + tempName;
+                                dic_setData.Add(item.PriceDetailType, tempName);
+                            }
+                        }
+                    }
+
                     //系统用户
                     if (dic_user.ContainsKey(item.CreateUserId))
                     {
@@ -2882,7 +2939,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
             }
 
 
-            return Ok(JsonView(false, "查询成功"));
+            return Ok(JsonView(false, "查询失败"));
         }
 
         /// <summary>

+ 1 - 1
OASystem/OASystem.Api/Program.cs

@@ -26,7 +26,7 @@ using OASystem.API.OAMethodLib.SignalR.HubService;
 using OASystem.API.OAMethodLib.Auth;
 using OASystem.API.OAMethodLib.Hub.HubClients;
 
-var builder = WebApplication.CreateBuilder(args);
+    var builder = WebApplication.CreateBuilder(args);
 var basePath = AppContext.BaseDirectory;
 
 //ÒýÈëÅäÖÃÎļþ

+ 14 - 0
OASystem/OASystem.Domain/Dtos/Financial/Fin_GroupExtraCostDto.cs

@@ -81,12 +81,26 @@ namespace OASystem.Domain.Dtos.Financial
         /// 操作人员
         /// </summary>
         public int createUser { get; set; }
+
+        /// <summary>
+        /// 费用实际产生日期
+        /// </summary>
+        public string PriceDt { get; set; }
+
+        /// <summary>
+        /// 费用数量
+        /// </summary>
+        public int PriceCount { get; set; }
     }
 
     public class Fin_GroupExtraCostDto_Search : DtoBase
     {
         public int diId { get; set; }
     }
+    
+    public class Fin_GroupExtraCostDto_Detail: PortDtoBase {
+        public int Id { get; set; }
+    }
 
     public class Fin_GroupExtraCostDto_DataListInit : PortDtoBase
     {

+ 19 - 0
OASystem/OASystem.Domain/Entities/Financial/Fin_GroupExtraCost.cs

@@ -31,6 +31,25 @@ namespace OASystem.Domain.Entities.Financial
         [SugarColumn(IsNullable = true, ColumnDataType = "decimal(10,2)")]
         public decimal Price { get; set; }
 
+        /// <summary>
+        /// 费用数量
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int PriceCount { get; set; }
+
+        /// <summary>
+        /// 费用总金额
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(14,2)")]
+        public decimal PriceSum { get; set; }
+
+        /// <summary>
+        /// 费用实际产生时间
+        /// </summary>
+        [SugarColumn(ColumnDescription = "创建时间", IsNullable = true, ColumnDataType = "DateTime")]
+        public DateTime PriceDt { get; set; } = DateTime.Now;
+
+
         /// <summary>
         /// 团组Id(币种ID)
         /// </summary>

+ 16 - 15
OASystem/OASystem.Domain/Entities/Groups/Grp_CreditCardPayment.cs

@@ -12,6 +12,21 @@ namespace OASystem.Domain.Entities.Groups
     [SugarTable("Grp_CreditCardPayment")]
     public class Grp_CreditCardPayment:EntityBase
     {
+        /// <summary>
+        /// 团组外键编号
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int DIId { get; set; }
+        /// <summary>
+        /// 指向表外键编号
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int CId { get; set; }
+        /// <summary>
+        /// 指向标识 设置数据外键编号
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int CTable { get; set; }
         /// <summary>
         /// 支付方式
         /// </summary>
@@ -139,21 +154,7 @@ namespace OASystem.Domain.Entities.Groups
         /// </summary> 
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int IsPay { get; set; }
-        /// <summary>
-        /// 团组外键编号
-        /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
-        public int DIId { get; set; }
-        /// <summary>
-        /// 指向表外键编号
-        /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
-        public int CId { get; set; }
-        /// <summary>
-        /// 指向标识 设置数据外键编号
-        /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
-        public int CTable { get; set; }
+        
         /// <summary>
         /// 此次付款百分比
         /// </summary>

+ 1 - 1
OASystem/OASystem.Domain/Entities/Groups/Grp_Customers.cs

@@ -32,7 +32,7 @@ namespace OASystem.Domain.Entities.Groups
         /// <summary>
         /// 保险费用
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(12,2)")]
         public decimal InsuranceCosts { get; set; }
 
         /// <summary>

+ 1 - 1
OASystem/OASystem.Domain/Entities/Groups/Grp_DecreasePayments.cs

@@ -37,7 +37,7 @@ namespace OASystem.Domain.Entities.Groups
         /// <summary>
         /// 附件地址
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(MAX)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(120)")]
         public string FilePath { get; set; }
     }
 }

+ 2 - 2
OASystem/OASystem.Domain/Entities/Groups/Grp_VisaInfo.cs

@@ -20,12 +20,12 @@ namespace OASystem.Domain.Entities.Groups
         /// <summary>
         /// 签证客户
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(200)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(100)")]
         public string VisaClient { get; set; }
         /// <summary>
         /// 签证费用
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(10,2)")]
         public decimal VisaPrice { get; set; }
         /// <summary>
         /// 币种

+ 6 - 3
OASystem/OASystem.Domain/Entities/Resource/Res_CountryFeeCost.cs

@@ -6,6 +6,9 @@ using System.Threading.Tasks;
 
 namespace OASystem.Domain.Entities.Resource
 {
+    /// <summary>
+    /// 签证费用资料
+    /// </summary>
     [SugarTable("Res_CountryFeeCost")]
     public class Res_CountryFeeCost:EntityBase
     {
@@ -46,7 +49,7 @@ namespace OASystem.Domain.Entities.Resource
         /// <summary>
         /// 签证费用描述
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "nvarchar(255)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(255)")]
         public string VisaPriceDesc { get; set; }
 
         /// <summary>
@@ -82,13 +85,13 @@ namespace OASystem.Domain.Entities.Resource
         /// <summary>
         /// 加急费用描述 
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "nvarchar(255)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(255)")]
         public string UrgentPriceDesc { get; set; }
 
         /// <summary>
         /// 签证地址
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(255)")]
         public string VisaAddress { get; set; }
 
     }

+ 13 - 3
OASystem/OASystem.Domain/Entities/Resource/Res_InvitationOfficialActivityData.cs

@@ -26,12 +26,12 @@ namespace OASystem.Domain.Entities.Resource
         /// <summary>
         /// 邀请方名称
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(MAX)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(225)")]
         public string UnitName { get; set; }
         /// <summary>
         ///邀请方官网
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(120)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(150)")]
         public string UnitWeb { get; set; }
         /// <summary>
         /// 涉及领域
@@ -46,7 +46,7 @@ namespace OASystem.Domain.Entities.Resource
         /// <summary>
         /// 邀请方信息
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(MAX)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(500)")]
         public string UnitInfo { get; set; }
         /// <summary>
         /// 联系人
@@ -103,5 +103,15 @@ namespace OASystem.Domain.Entities.Resource
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "varchar(120)")]
         public string Fax { get; set; }
+        /// <summary>
+        /// 其他信息
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(500)")]
+        public string OtherInfo { get; set; }
+        /// <summary>
+        /// 背景
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(500)")]
+        public string Background { get; set; }
     }
 }

+ 3 - 2
OASystem/OASystem.Domain/Entities/Resource/Res_LocalGuideData.cs

@@ -8,6 +8,7 @@ namespace OASystem.Domain.Entities.Resource
 {
     /// <summary>
     /// 导游地接数据
+    /// old OA TableName:OA2014.dbo.TouristGuideGroundData
     /// </summary>
     [SugarTable("Res_LocalGuideData")]
     public class Res_LocalGuideData : EntityBase
@@ -15,7 +16,7 @@ namespace OASystem.Domain.Entities.Resource
         /// <summary>
         /// 区域
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(100)")]
         public string UnitArea { get; set; }
 
         /// <summary>
@@ -27,7 +28,7 @@ namespace OASystem.Domain.Entities.Resource
         /// <summary>
         /// 地址
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(200)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(225)")]
         public string Address { get; set; }
 
         /// <summary>

+ 25 - 2
OASystem/OASystem.Domain/ViewModels/Financial/Fin_GroupExtraCostView.cs

@@ -13,17 +13,40 @@ namespace OASystem.Domain.ViewModels.Financial
         public int DiId { get; set; }
         public string PriceName { get; set; }
         public int PriceType { get; set; }
+        public int PriceDetailType { get; set; }
         public string PriceTypeStr { get; set; }
+        public string Price { get; set; }
+        public int PriceCount { get; set; }
         public string PriceStr { get; set; }
-        public string FilePath { get; set; }
+        public string PriceSumStr { get; set; }
         public int CreateUserId { get; set; }
         public string CreateUserIdStr { get; set; }
-        public string CreateTime { get; set; }
+        public string PriceDt { get; set; }
         public int IsAuditGM { get; set; }
         public string IsAuditGMStr { get; set; }
         
     }
 
+    public class Fin_GroupExtraCostDetailView
+    {
+        public int Id { get; set; }
+        public int DiId { get; set; }
+        public string PriceName { get; set; }
+        public decimal Price { get; set; }
+        public int PriceCount { get; set; }
+        public string PriceDt { get; set; }
+        public int PriceCurrency { get; set; }
+        public string Payee { get; set; }
+        public int OrbitalPrivateTransfer { get; set; }
+        public int PayDId { get; set; }
+        public int CTDId { get; set; }
+        public int PriceType { get; set; }
+        public int PriceDetailType { get; set; }
+        public decimal Coefficient { get; set; }
+        public string Remark { get; set; }
+
+    }
+
     public class Fin_GroupExtraCostViewDataCount
     {
         public int DataCount { get; set; }

+ 0 - 2
OASystem/OASystem.Infrastructure/Repositories/Resource/InvitationOfficialActivityDataRepository.cs

@@ -24,8 +24,6 @@ namespace OASystem.Infrastructure.Repositories.Resource
             _mapper = mapper;
         }
 
-       
-
         /// <summary>
         /// 查询商邀资料列表
         /// </summary>

+ 38 - 46
OASystem/OASystem.Infrastructure/Repositories/System/MessageRepository.cs

@@ -185,15 +185,14 @@ namespace OASystem.Infrastructure.Repositories.System
         {
             Result result = new Result() { Code = -1, Msg = "未知错误",Data = new object[] { } };
 
-            //userId
-            string msgSqlWhere = $" And smra.ReadableUId = {dto.UserId}";
-
             //消息类型
             List<NotificationTypeView> messageTypeViews = AppSettingsHelper.Get<NotificationTypeView>("MessageNotificationType");
             List<int> _operationTypeList = messageTypeViews.Where(it =>it.TypeId == 1021).FirstOrDefault().MsgTypeIds.ToList();
             List<int> _taskTypeList = messageTypeViews.Where(it => it.TypeId == 1020).FirstOrDefault().MsgTypeIds.ToList();
             List<int> _noticeTypeList = messageTypeViews.Where(it => it.TypeId == 1022).FirstOrDefault().MsgTypeIds.ToList();
 
+            //userId
+            string msgSqlWhere = $" And smra.ReadableUId = {dto.UserId}";
 
             string msgSql = string.Format(@"Select * From(
                                                 Select row_number() over(order by sm.ReleaseTime Desc) as RowNumber,
@@ -210,59 +209,52 @@ namespace OASystem.Infrastructure.Repositories.System
 
             var data = await _sqlSugar.SqlQueryable<MessageListView>(msgSql).ToListAsync();
 
-            if (data.Count > 0)
+            var msgTypeResult = await _setData.GetSetDataBySTId(_setData, 77);
+            if (msgTypeResult.Code != 0)
             {
-                var msgTypeResult = await _setData.GetSetDataBySTId(_setData, 77);
-                if (msgTypeResult.Code != 0)
-                {
-                    result.Msg = "消息类型不存在!";
-                    return result;
-                }
-                string msgTypeDataStr = JsonConvert.SerializeObject(msgTypeResult.Data);
-                var msgTypeData = JsonConvert.DeserializeObject<List<MessageTypeView>>(msgTypeDataStr);
-
-                //操作通知 OperationNotification
-                var operationNotificationData = data.Where(it => _operationTypeList.Contains(it.Type)).OrderBy(it => it.IsRead).ToList();
-                int operationNotificationDataCount = operationNotificationData.Where(it => it.IsRead == 0).ToList().Count;
+                result.Msg = "消息类型不存在!";
+                return result;
+            }
+            string msgTypeDataStr = JsonConvert.SerializeObject(msgTypeResult.Data);
+            var msgTypeData = JsonConvert.DeserializeObject<List<MessageTypeView>>(msgTypeDataStr);
 
-                //任务通知
-                var taskNotificationData = data.Where(it => _taskTypeList.Contains(it.Type)).OrderBy(it => it.IsRead).ToList();//操作通知所属类型
-                int taskNotificationDataCount = taskNotificationData.Where(it => it.IsRead == 0).ToList().Count;               //任务通知 TaskNotification
+            //操作通知 OperationNotification
+            var operationNotificationData = data.Where(it => _operationTypeList.Contains(it.Type)).OrderBy(it => it.IsRead).ToList();
+            int operationNotificationDataCount = operationNotificationData.Where(it => it.IsRead == 0).ToList().Count;
 
-                //公告通知 notice
-                var noticeNotificationData = data.Where(it => _noticeTypeList.Contains(it.Type)).OrderBy(it => it.IsRead).ToList();//操作通知所属类型
-                int noticeNotificationDataCount = noticeNotificationData.Where(it => it.IsRead == 0).ToList().Count;               //任务通知 TaskNotification
+            //任务通知
+            var taskNotificationData = data.Where(it => _taskTypeList.Contains(it.Type)).OrderBy(it => it.IsRead).ToList();//操作通知所属类型
+            int taskNotificationDataCount = taskNotificationData.Where(it => it.IsRead == 0).ToList().Count;               //任务通知 TaskNotification
 
+            //公告通知 notice
+            var noticeNotificationData = data.Where(it => _noticeTypeList.Contains(it.Type)).OrderBy(it => it.IsRead).ToList();//操作通知所属类型
+            int noticeNotificationDataCount = noticeNotificationData.Where(it => it.IsRead == 0).ToList().Count;               //任务通知 TaskNotification
 
-                foreach (var item in msgTypeData)
-                {
-                    //1021	团组操作通知 1020	任务操作通知 1022 公告通知
-                    if (item.Id == 1020) item.UnReadCount = taskNotificationDataCount;
-                    else if (item.Id == 1021) item.UnReadCount = operationNotificationDataCount;
-                    else if (item.Id == 1022) item.UnReadCount = noticeNotificationDataCount;
-                }
+            foreach (var item in msgTypeData)
+            {
+                //1021	团组操作通知 1020	任务操作通知 1022 公告通知
+                if (item.Id == 1020) item.UnReadCount = taskNotificationDataCount;
+                else if (item.Id == 1021) item.UnReadCount = operationNotificationDataCount;
+                else if (item.Id == 1022) item.UnReadCount = noticeNotificationDataCount;
+            }
 
-                if (dto.PortType == 1 || dto.PortType == 2)  // web/android
-                {
-                    result.Code = 0;
-                    result.Data = msgTypeData;
+            if (dto.PortType == 1 || dto.PortType == 2)  // web/android
+            {
+                result.Code = 0;
+                result.Msg = $"操作成功";
+                result.Data = msgTypeData;
 
-                }
-                else if (dto.PortType == 3)
-                {
-                    result.Code = 0;
-                    result.Data = new
-                    {
-                        MsgTypeData = msgTypeData,
-                        FirstUnreadData = data[0],
-                        UnreadTotalCount = data.Where(it => it.IsRead == 0).ToList().Count,
-                    };
-                }
             }
-            else
+            else if (dto.PortType == 3)
             {
                 result.Code = 0;
-                result.Msg = "暂无消息";
+                result.Msg = $"操作成功";
+                result.Data = new
+                {
+                    MsgTypeData = msgTypeData,
+                    FirstUnreadData = data[0],
+                    UnreadTotalCount = data.Where(it => it.IsRead == 0).ToList().Count,
+                };
             }
 
             return result;