Преглед на файлове

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

yuanrf преди 5 дни
родител
ревизия
b35806c75d

+ 33 - 15
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -17131,10 +17131,15 @@ FROM
                             #endregion
                         }
                         else dic.Add("SubZS", "0.00");
-                        //删除多余行
-                        while (table1.Rows.Count > table1Row)
+
+
+                        if (table1 != null && table1.Rows.Count > 0)
                         {
-                            table1.Rows.RemoveAt(table1Row);
+                            //删除多余行
+                            while (table1.Rows.Count > table1Row)
+                            {
+                                table1.Rows.RemoveAt(table1Row);
+                            }
                         }
 
                         //伙食费
@@ -17181,10 +17186,13 @@ FROM
                         }
                         else dic.Add("SubHS", "0.00");
 
-                        //删除多余行
-                        while (table2.Rows.Count > table2Row)
+                        if (table2 != null && table2.Rows.Count > 0)
                         {
-                            table2.Rows.RemoveAt(table2Row);
+                            //删除多余行
+                            while (table2.Rows.Count > table2Row)
+                            {
+                                table2.Rows.RemoveAt(table2Row);
+                            }
                         }
 
                         //公杂费
@@ -17235,11 +17243,15 @@ FROM
                         }
                         else dic.Add("SubGZF", "0.00");
 
-                        //删除多余行
-                        while (table3.Rows.Count > table3Row)
+                        if (table3 != null && table3.Rows.Count > 0) 
                         {
-                            table3.Rows.RemoveAt(table3Row);
+                            //删除多余行
+                            while (table3.Rows.Count > table3Row)
+                            {
+                                table3.Rows.RemoveAt(table3Row);
+                            }
                         }
+                            
 
                         //培训费
                         Aspose.Words.Tables.Table table4 = allTables[3] as Aspose.Words.Tables.Table;
@@ -17287,11 +17299,14 @@ FROM
                         }
                         //else dic.Add("SubPX", $"六、培训费合计:  0    元/人");
                         //删除多余行
-                        while (table4.Rows.Count > table4Row)
+                        if (table4 != null && table4.Rows.Count > 0) 
                         {
-                            table4.Rows.RemoveAt(table4Row);
+                            while (table4.Rows.Count > table4Row)
+                            {
+                                table4.Rows.RemoveAt(table4Row);
+                            }
                         }
-
+                       
                         //其他费用
                         Aspose.Words.Tables.Table table5 = allTables[4] as Aspose.Words.Tables.Table;
                         if (_EnterExitCosts.OtherExpenses_Checked == 1)
@@ -17337,10 +17352,13 @@ FROM
                         }
                         //else dic.Add("SubQT", "七、其他费用合计:  0    元/人");
 
-                        //删除多余行
-                        while (table5.Rows.Count > table5Row)
+                        if (table5 != null && table5.Rows.Count > 0)
                         {
-                            table5.Rows.RemoveAt(table5Row);
+                            //删除多余行
+                            while (table5.Rows.Count > table5Row)
+                            {
+                                table5.Rows.RemoveAt(table5Row);
+                            }
                         }
 
                         //加上其他费用

+ 11 - 5
OASystem/OASystem.Api/Controllers/StatisticsController.cs

@@ -8648,7 +8648,7 @@ WHERE
                     monthGroupCostTotal = groupItems.Sum(x => x.CostTotal),
                     yearGroupCollectionTotal = yearGroupItems.Sum(x => x.CollectionTotal),
                     yearGroupCostTotal = yearGroupItems.Sum(x => x.CostTotal);
-            //日付申请 48 人员费用、 49 办公费用、50 销售费用、51 其他费用、55	大运会、90	各部门基础固定费用明细
+            // 日付申请 48 人员费用、 49 办公费用、50 销售费用、51 其他费用、55	大运会、90 各部门基础固定费用明细
             decimal monthStaffCosts = dailyItems.Where(x => x.PriceParentTypeId == 48).Sum(x => x.CNYTotal),
                     monthOfficeExpenses = dailyItems.Where(x => x.PriceParentTypeId == 49).Sum(x => x.CNYTotal),
                     monthCostSales = dailyItems.Where(x => x.PriceParentTypeId == 50).Sum(x => x.CNYTotal),
@@ -8747,10 +8747,6 @@ WHERE
                 string time = $"所属期间: {beginDate.ToString("yyyy 年 MM 月 dd 日")} 至 {endDate.ToString("yyyy 年 MM 月 dd 日")}";
                 designer.SetDataSource("Time", time);
 
-                //办公费用
-                decimal officePirce = yearStaffCosts + yearOfficeExpenses;
-                designer.SetDataSource("officePirce", officePirce.ToString("#0.00"));
-
                 //业务类型
                 var groupTypeIds = new List<int>() {
                     38,   // 政府团
@@ -9056,6 +9052,16 @@ WHERE
 
                 #endregion
 
+                // 办公费用
+                // 月
+                decimal officePirceMonth = monthStaffCostTotal + monthWorkCostTotal + monthSalesCostTotal + monthOtherCostTotal + monthDyhCostTotal + monthBasicCostTotal;
+                designer.SetDataSource("officePirceMonth", officePirceMonth.ToString("#0.00"));
+
+                // 年
+                decimal officePirceYear = yearStaffCostTotal + yearWorkCostTotal + yearSalesCostTotal + yearOtherCostTotal + yearDyhCostTotal + yearBasicCostTotal;
+                designer.SetDataSource("officePirceYear", officePirceYear.ToString("#0.00"));
+
+
                 //designer.SetDataSource("DailyView", dailyViewItems);
                 var dt = CommonFun.ToDataTableArray(dailyViewItems);
                 dt.TableName = "DailyView";

+ 1 - 0
OASystem/OASystem.Api/OAMethodLib/QiYeWeChatAPI/IQiYeWeChatApiService.cs

@@ -266,3 +266,4 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI
 
     }
 }
+

+ 28 - 24
OASystem/OASystem.Api/Program.cs

@@ -114,32 +114,36 @@ builder.Services.Configure<GzipCompressionProviderOptions>(options =>
 #endregion
 
 #region Cors
-builder.Services.AddCors(policy =>
+builder.Services.AddCors(options =>
 {
     //policy.AddPolicy("Cors", opt => opt
-    //.AllowAnyOrigin()
-    //.AllowAnyHeader()
-    //.AllowAnyMethod()
-    //.WithExposedHeaders("X-Pagination"));
-
-    policy.AddPolicy("Cors", opt => opt
-            .SetIsOriginAllowed(origin =>
-            {
-                // 定义允许的来源列表
-                var allowedOrigins = new List<string>
-                    {
-                       "http://132.232.92.186:9002"
-
-                    };
-
-                // 检查请求的来源是否在允许的列表中
-                return allowedOrigins.Contains(origin);
-            })
-
-          //.AllowAnyOrigin()
-          .AllowAnyHeader()
-          .WithMethods("GET", "POST", "HEAD", "PUT", "DELETE", "OPTIONS")
-          .AllowCredentials());
+    //        //.SetIsOriginAllowed(origin =>
+    //        //{
+    //        //    // 定义允许的来源列表
+    //        //    var allowedOrigins = new List<string>
+    //        //        {
+    //        //           "http://132.232.92.186:9002",
+    //        //           "http://oa.pan-american-intl.com:4399"
+    //        //        };
+
+    //        //    // 检查请求的来源是否在允许的列表中
+    //        //    return allowedOrigins.Contains(origin);
+    //        //})
+
+    //      //.AllowAnyOrigin()
+    //      //.AllowAnyHeader()
+    //      //.WithMethods("GET", "POST", "HEAD", "PUT", "DELETE", "OPTIONS")
+    //      //.AllowCredentials());
+    //      .AllowAnyHeader()
+    //      .AllowAnyMethod()
+    //      .AllowCredentials());
+
+    options.AddPolicy("Cors", policy =>
+    {
+        policy.AllowAnyOrigin()
+              .AllowAnyHeader()
+              .AllowAnyMethod();
+    });
 
 });
 #endregion

+ 2 - 2
OASystem/OASystem.sln

@@ -1,7 +1,7 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.4.33110.190
+# Visual Studio Version 18
+VisualStudioVersion = 18.4.11519.219 insiders
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OASystem.API", "OASystem.Api\OASystem.API.csproj", "{3891356C-85CE-4023-9EF8-C34AF3ED85AA}"
 EndProject