公司员工新增领导与普通员工之分

This commit is contained in:
fuenmao
2026-04-02 13:56:25 +08:00
parent 589dd0305b
commit aa50e569f0
4 changed files with 78 additions and 24 deletions
@@ -28,7 +28,8 @@ public class StatisticsService : DbRepository<Prescription>, IStatisticsService
{
p.Id,
p.PersonId,
IsRelative = pe.EmployeeId != null
IsRelative = pe.EmployeeId != null,
Type = pe.Type
})
.ToListAsync();
@@ -75,6 +76,11 @@ public class StatisticsService : DbRepository<Prescription>, IStatisticsService
familyCost += Math.Round(cost * 1.1m, 2, MidpointRounding.AwayFromZero);
familyQty++;
}
else if (pInfo.Type == 2)
{
staffCost += Math.Round(cost * 1.1m, 2, MidpointRounding.AwayFromZero);
staffQty++;
}
else
{
staffCost += Math.Round(cost, 2, MidpointRounding.AwayFromZero);
@@ -176,7 +182,8 @@ public class StatisticsService : DbRepository<Prescription>, IStatisticsService
p.Id,
p.VisitDate,
p.CreateTime,
IsRelative = pe.EmployeeId != null
IsRelative = pe.EmployeeId != null,
Type = pe.Type
})
.ToListAsync();
@@ -276,6 +283,12 @@ public class StatisticsService : DbRepository<Prescription>, IStatisticsService
monthlyFamilyCost[month] += cost;
monthlyFamilyQty[month]++;
}
else if (pInfo.Type == 2)
{
cost = Math.Round(cost * 1.1m, 2, MidpointRounding.AwayFromZero);
monthlyStaffCost[month] += cost;
monthlyStaffQty[month]++;
}
else
{
cost = Math.Round(cost, 2, MidpointRounding.AwayFromZero);
@@ -337,7 +350,8 @@ public class StatisticsService : DbRepository<Prescription>, IStatisticsService
{
p.Id,
p.PersonId,
IsRelative = pe.EmployeeId != null
IsRelative = pe.EmployeeId != null,
Type = pe.Type
})
.ToListAsync();
@@ -418,6 +432,11 @@ public class StatisticsService : DbRepository<Prescription>, IStatisticsService
familyCost += Math.Round(cost * 1.1m, 2, MidpointRounding.AwayFromZero);
familyQty++;
}
else if (pInfo.Type == 2)
{
staffCost += Math.Round(cost * 1.1m, 2, MidpointRounding.AwayFromZero);
staffQty++;
}
else
{
staffCost += Math.Round(cost, 2, MidpointRounding.AwayFromZero);