Commit e4d05297 by lcx

二次绩效审核

parent 92a110ee
......@@ -81,7 +81,8 @@ public ApiResponse SaveValue(int secondid, [FromBody] List<ag_fixatitem> request
if (unitTypeCount != 1 || request.Any(t => string.IsNullOrEmpty(t.UnitType)))
throw new PerformanceException("科室类型错误");
var repetition = request.GroupBy(t => new { t.RowNumber, t.ItemName /*, WorkType = t.WorkType ?? 0*/ }).Where(t => t.Count() > 1);
var repetition = request.Where(t => !string.IsNullOrWhiteSpace(t.ItemName))
.GroupBy(t => new { t.RowNumber, t.ItemName /*, WorkType = t.WorkType ?? 0*/ }).Where(t => t.Count() > 1);
if (repetition.Any())
throw new PerformanceException(string.Join(";", repetition.Select(t => $"行{t.Key.RowNumber}项‘{t.Key.ItemName}’重复录入")));
......
......@@ -35,7 +35,7 @@ public void ConfigureServices(IServiceCollection services)
services.AddMemoryCache();
// ratelimit
services.AddRateLimitConfiguration(Configuration);
// services.AddRateLimitConfiguration(Configuration);
// graphql
services.AddGraphQLSchemaAndTypes();
......@@ -108,7 +108,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
app.UseSignalR(routes => routes.MapHub<AllotLogHub>("/performance/allotLogHub"));
app.UseRateLimitSetup();
// app.UseRateLimitSetup();
app.UseMvc();
......
......@@ -1589,7 +1589,7 @@ bool VerifySubmissioAmount(decimal? submitDataAmount, decimal? realGiveFee)
if (data == null || !data.Any())
throw new PerformanceException("提交时未检测到数据!");
var total = data.Sum(t => t.DistPerformance + t.NightWorkPerformance); // 其他模板 = 可分配绩效 + 夜班绩效
var total = data.Sum(t => t.DistPerformance ?? 0 + t.NightWorkPerformance ?? 0); // 其他模板 = 可分配绩效 + 夜班绩效
if (!VerifySubmissioAmount(total, second.RealGiveFee))
throw new PerformanceException($"总金额与考核后金额不一致!可分配金额:{second.RealGiveFee},提交金额:{total}");
}
......@@ -1600,7 +1600,7 @@ bool VerifySubmissioAmount(decimal? submitDataAmount, decimal? realGiveFee)
throw new PerformanceException("提交时未检测到数据!");
var total = data.Where(t => new string[] { "可分配绩效", "夜班工作量绩效" }.Contains(t.ItemName) && t.RowNumber > -1).GroupBy(t => t.RowNumber)
.Sum(t => ConvertHelper.To<decimal>(t.OrderByDescending(o => o.ID).FirstOrDefault().ItemValue));
.Sum(t => t.Sum(item => ConvertHelper.To<decimal>(item.ItemValue)));
if (!VerifySubmissioAmount(total, second.RealGiveFee))
throw new PerformanceException($"总金额与考核后金额不一致!可分配金额:{second.RealGiveFee},提交金额:{total}");
}
......@@ -1610,7 +1610,7 @@ bool VerifySubmissioAmount(decimal? submitDataAmount, decimal? realGiveFee)
if (data == null || !data.Any())
throw new PerformanceException("提交时未检测到数据!");
var total = data.Sum(t => t.DistPerformance + t.NightWorkPerformance);
var total = data.Sum(t => t.DistPerformance ?? 0 + t.NightWorkPerformance ?? 0);
if (!VerifySubmissioAmount(total, second.RealGiveFee))
throw new PerformanceException($"总金额与考核后金额不一致!可分配金额:{second.RealGiveFee},提交金额:{total}");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment