fix 调整

This commit is contained in:
cheche
2024-01-26 15:35:25 +08:00
parent d435004a97
commit 40c655c9ff
2 changed files with 14 additions and 13 deletions

View File

@@ -119,10 +119,10 @@ public class BalanceService : IBalanceService
obj.LateNightAmount = costIdGroup.Where(x => x.BusinessShiftCode.ToString() == shiftCodeDict["LateNight"]).Sum(x => x.Amount);
// 每个餐次单价
obj.BreakfastPrice = obj.BreakfastNumberOfPeople == 0 ? 0 : obj.BreakfastAmount / obj.BreakfastNumberOfPeople;
obj.LunchPrice = obj.LunchNumberOfPeople == 0 ? 0 : obj.LunchAmount / obj.LunchNumberOfPeople;
obj.DinnerPrice = obj.DinnerNumberOfPeople == 0 ? 0 : obj.DinnerAmount / obj.DinnerNumberOfPeople;
obj.LateNightPrice = obj.LateNightNumberOfPeople == 0 ? 0 : obj.LateNightAmount / obj.LateNightNumberOfPeople;
obj.BreakfastPrice = obj.BreakfastNumberOfPeople == 0 ? 0 : Math.Round(obj.BreakfastAmount / obj.BreakfastNumberOfPeople, 2);
obj.LunchPrice = obj.LunchNumberOfPeople == 0 ? 0 : Math.Round(obj.LunchAmount / obj.LunchNumberOfPeople, 2);
obj.DinnerPrice = obj.DinnerNumberOfPeople == 0 ? 0 : Math.Round(obj.DinnerAmount / obj.DinnerNumberOfPeople, 2);
obj.LateNightPrice = obj.LateNightNumberOfPeople == 0 ? 0 : Math.Round(obj.LateNightAmount / obj.LateNightNumberOfPeople, 2);
// 总人数 总金额
obj.TotalNumberOfPeople = obj.BreakfastNumberOfPeople + obj.LunchNumberOfPeople + obj.DinnerNumberOfPeople + obj.LateNightNumberOfPeople;
@@ -234,10 +234,10 @@ public class BalanceService : IBalanceService
obj.LateNightAmount = departmentGroup.Where(x => x.BusinessShiftCode.ToString() == shiftCodeDict["LateNight"]).Sum(x => x.Amount);
// 每个餐次单价
obj.BreakfastPrice = obj.BreakfastNumberOfPeople == 0 ? 0 : obj.BreakfastAmount / obj.BreakfastNumberOfPeople;
obj.LunchPrice = obj.LunchNumberOfPeople == 0 ? 0 : obj.LunchAmount / obj.LunchNumberOfPeople;
obj.DinnerPrice = obj.DinnerNumberOfPeople == 0 ? 0 : obj.DinnerAmount / obj.DinnerNumberOfPeople;
obj.LateNightPrice = obj.LateNightNumberOfPeople == 0 ? 0 : obj.LateNightAmount / obj.LateNightNumberOfPeople;
obj.BreakfastPrice = obj.BreakfastNumberOfPeople == 0 ? 0 : Math.Round(obj.BreakfastAmount / obj.BreakfastNumberOfPeople, 2);
obj.LunchPrice = obj.LunchNumberOfPeople == 0 ? 0 : Math.Round(obj.LunchAmount / obj.LunchNumberOfPeople, 2);
obj.DinnerPrice = obj.DinnerNumberOfPeople == 0 ? 0 : Math.Round(obj.DinnerAmount / obj.DinnerNumberOfPeople, 2);
obj.LateNightPrice = obj.LateNightNumberOfPeople == 0 ? 0 : Math.Round(obj.LateNightAmount / obj.LateNightNumberOfPeople, 2);
// 总人数 总金额
obj.TotalNumberOfPeople = obj.BreakfastNumberOfPeople + obj.LunchNumberOfPeople + obj.DinnerNumberOfPeople + obj.LateNightNumberOfPeople;
@@ -299,10 +299,10 @@ public class BalanceService : IBalanceService
obj.LateNightAmount = originTenantIdGroup.Where(x => x.BusinessShiftCode.ToString() == shiftCodeDict["LateNight"]).Sum(x => x.Amount);
// 每个餐次单价
obj.BreakfastPrice = obj.BreakfastNumberOfPeople == 0 ? 0 : obj.BreakfastAmount / obj.BreakfastNumberOfPeople;
obj.LunchPrice = obj.LunchNumberOfPeople == 0 ? 0 : obj.LunchAmount / obj.LunchNumberOfPeople;
obj.DinnerPrice = obj.DinnerNumberOfPeople == 0 ? 0 : obj.DinnerAmount / obj.DinnerNumberOfPeople;
obj.LateNightPrice = obj.LateNightNumberOfPeople == 0 ? 0 : obj.LateNightAmount / obj.LateNightNumberOfPeople;
obj.BreakfastPrice = obj.BreakfastNumberOfPeople == 0 ? 0 : Math.Round(obj.BreakfastAmount / obj.BreakfastNumberOfPeople, 2);
obj.LunchPrice = obj.LunchNumberOfPeople == 0 ? 0 : Math.Round(obj.LunchAmount / obj.LunchNumberOfPeople, 2);
obj.DinnerPrice = obj.DinnerNumberOfPeople == 0 ? 0 : Math.Round(obj.DinnerAmount / obj.DinnerNumberOfPeople, 2);
obj.LateNightPrice = obj.LateNightNumberOfPeople == 0 ? 0 : Math.Round(obj.LateNightAmount / obj.LateNightNumberOfPeople, 2);
// 总人数 总金额
obj.TotalNumberOfPeople = obj.BreakfastNumberOfPeople + obj.LunchNumberOfPeople + obj.DinnerNumberOfPeople + obj.LateNightNumberOfPeople;

View File

@@ -1,6 +1,7 @@
using Dlhis.Common.Request;
using Dlhis.Common.Response;
using Dlhis.Entity.Common;
using Kurisu.AspNetCore.Utils.Extensions;
using Kurisu.SqlSugar.Services;
using Mapster;
using Microsoft.AspNetCore.Mvc;
@@ -73,7 +74,7 @@ public class ApkFIileService : IApkFIileService
{
//上传
var completeFilePath = FormSingleFileUpload(request.formFile);
if (completeFilePath == "No file uploaded")
if (completeFilePath == "No file uploaded" || completeFilePath.IsEmpty())
{
return null;
}