leiy 11 months ago
parent
commit
5ce8c1a7ac

+ 1 - 0
OASystem/OASystem.Api/Controllers/AuthController.cs

@@ -19,6 +19,7 @@ using OASystem.API.OAMethodLib.Hub.Hubs;
 using OASystem.API.OAMethodLib.Hub.HubClients;
 using static OASystem.API.OAMethodLib.Hub.Hubs.ChatHub;
 using static OASystem.API.OAMethodLib.JWTHelper;
+using OASystem.Domain.Entities.Groups;
 
 namespace OASystem.API.Controllers
 {

+ 16 - 8
OASystem/OASystem.Api/Controllers/FinancialController.cs

@@ -1879,6 +1879,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
             {
                 if (_groupIds.Count < 1)
                 {
+                    _DailyFeePaymentResult.dataList = new List<tree_Group_DailyFeePaymentPageListView>();
                     return _DailyFeePaymentResult;
                 }
                 sqlWhere += string.Format(@" And Id In ({0})", string.Join(",", _groupIds));
@@ -2036,7 +2037,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
             {
                 if (_dailyIds.Count < 1)
                 {
-                    return new tree_Fin_DailyFeePaymentResult();
+                    return new tree_Fin_DailyFeePaymentResult() { childList = new List<Fin_DailyFeePaymentContentInfolView>() };
                 }
 
                 sqlWhere += string.Format(@" And dfp.Id  In({0}) ", string.Join(",", _dailyIds));
@@ -2110,7 +2111,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
                     string remaksDescription = $"{rowNumber}、【{item.priceTypeStr}】{item.Instructions}({subItem.PriceName}) CNY:{subItem.ItemTotal.ToString("#0.00")}(单价:{subItem.Price.ToString("#0.00")} * {subItem.Quantity})";
                     subItem.RemaksDescription = remaksDescription;
                     string excelRemaksDescription = $"【{item.priceTypeStr}】{item.Instructions}({subItem.PriceName}) CNY:{subItem.ItemTotal.ToString("#0.00")}(单价:{subItem.Price.ToString("#0.00")} * {subItem.Quantity})【申请人:{item.CreateUser}  申请时间:{item.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")}】";
-                    subItem.RemaksDescription = excelRemaksDescription;
+                    subItem.ExcelRemaksDescription = excelRemaksDescription;
                     rowNumber++;
                 }
             }
@@ -2431,27 +2432,34 @@ 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(2, checkedView.DailyPaymentIds, dto.beginDt, dto.endDt);
                 tree_Group_DailyFeePaymentResult groupResult = PayRequest_GroupPaymentByDateRange(2, checkedView.GroupIds, dto.beginDt, dto.endDt);
 
+                if (dailyResult.childList == null)
+                {
+                    dailyResult.childList = new List<Fin_DailyFeePaymentContentInfolView>();
+                }
+
                 List<tree_Group_DailyFeePaymentPageListView> _GroupData = new List<tree_Group_DailyFeePaymentPageListView>();
                 List<tree_Fin_DailyFeePaymentPageListView> _DailyData = new List<tree_Fin_DailyFeePaymentPageListView>();
 
                 //1	成都泛美商务有限公司
                 if (dto.ConpanyId == 1)
                 {
-                    _GroupData = groupResult.dataList.Where(it => it.CompanyId == 1).ToList();
-                    _DailyData = dailyResult.dataList.Where(it => it.CompanyId == 1).ToList();
+                    if (groupResult.dataList != null && groupResult.dataList.Count > 0) _GroupData = groupResult.dataList.Where(it => it.CompanyId == 1).ToList();
+                    if (dailyResult.dataList != null && dailyResult.dataList.Count > 0) _DailyData = dailyResult.dataList.Where(it => it.CompanyId == 1).ToList();
+
                 }
                 //2	四川泛美交流有限公司
                 else if (dto.ConpanyId == 2)
                 {
-                    _GroupData = groupResult.dataList.Where(it => it.CompanyId == 2).ToList();
-                    _DailyData = dailyResult.dataList.Where(it => it.CompanyId == 2).ToList();
+                    if (groupResult.dataList != null && groupResult.dataList.Count > 0) _GroupData = groupResult.dataList.Where(it => it.CompanyId == 2).ToList();
+                    if (dailyResult.dataList != null && dailyResult.dataList.Count > 0) _DailyData = dailyResult.dataList.Where(it => it.CompanyId == 2).ToList();
+
                 }
                 //3 成都纽茵教育科技有限公司
                 else if (dto.ConpanyId == 3)
                 {
+                    if (groupResult.dataList != null && groupResult.dataList.Count > 0) _GroupData = groupResult.dataList.Where(it => it.CompanyId == 3).ToList();
+                    if (dailyResult.dataList != null && dailyResult.dataList.Count > 0) _DailyData = dailyResult.dataList.Where(it => it.CompanyId == 3).ToList();
 
-                    _GroupData = groupResult.dataList.Where(it => it.CompanyId == 3).ToList();
-                    _DailyData = dailyResult.dataList.Where(it => it.CompanyId == 3).ToList();
                 }
                 //4 成都鸿企中元科技有限公司
                 else if (dto.ConpanyId == 4)

+ 2 - 1
OASystem/OASystem.Domain/Entities/Groups/Grp_DelegationInfo.cs

@@ -30,7 +30,7 @@ namespace OASystem.Domain.Entities.Groups
         /// <summary>
         /// 客户单位
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(200)")]
         public string ClientUnit { get; set; }
         /// <summary>
         /// 团组号
@@ -241,4 +241,5 @@ namespace OASystem.Domain.Entities.Groups
         public string Officialneeds { get; set; }
         #endregion
     }
+
 }