家属成本加十个点
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Linq.Dynamic.Core;
|
using System.Linq.Dynamic.Core;
|
||||||
|
using NewLife.Reflection;
|
||||||
using SimpleAdmin.Application.Entity;
|
using SimpleAdmin.Application.Entity;
|
||||||
using SimpleAdmin.Application.Services.Prescription;
|
using SimpleAdmin.Application.Services.Prescription;
|
||||||
using Yitter.IdGenerator;
|
using Yitter.IdGenerator;
|
||||||
@@ -103,7 +104,15 @@ public class PrescriptionService : DbRepository<Prescription>, IPrescriptionServ
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
foreach (var item in prescriptionPage.List)
|
||||||
|
{
|
||||||
|
//家属成本多十个点
|
||||||
|
if (item.PersonType== PersonType.Relative)
|
||||||
|
{
|
||||||
|
// 四舍五入规则
|
||||||
|
item.TotalMedicineCost = Math.Round(item.TotalMedicineCost * (decimal)1.1, 2, MidpointRounding.AwayFromZero);
|
||||||
|
}
|
||||||
|
}
|
||||||
return prescriptionPage;
|
return prescriptionPage;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -171,8 +180,7 @@ public class PrescriptionService : DbRepository<Prescription>, IPrescriptionServ
|
|||||||
remainingToCalculate = 0;
|
remainingToCalculate = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return Math.Round(totalCost, 2, MidpointRounding.AwayFromZero);
|
||||||
return totalCost;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -299,7 +307,6 @@ public class PrescriptionService : DbRepository<Prescription>, IPrescriptionServ
|
|||||||
}
|
}
|
||||||
else if (!string.IsNullOrWhiteSpace(input.Person.EmployeeName))
|
else if (!string.IsNullOrWhiteSpace(input.Person.EmployeeName))
|
||||||
{
|
{
|
||||||
// 兼容:即便没有显式 EmployeeIsTemp,前端传了 EmployeeName,我们也可以选择创建员工
|
|
||||||
var newEmp = new Person
|
var newEmp = new Person
|
||||||
{
|
{
|
||||||
Id = YitIdHelper.NextId(),
|
Id = YitIdHelper.NextId(),
|
||||||
@@ -440,7 +447,6 @@ public class PrescriptionService : DbRepository<Prescription>, IPrescriptionServ
|
|||||||
DiagnosisResult = input.DiagnosisResult,
|
DiagnosisResult = input.DiagnosisResult,
|
||||||
UserMedicinaAdvice = input.UserMedicinaAdvice,
|
UserMedicinaAdvice = input.UserMedicinaAdvice,
|
||||||
VisitDate = input.VisitDate ?? DateTime.Now,
|
VisitDate = input.VisitDate ?? DateTime.Now,
|
||||||
CreateTime = DateTime.Now // 新增时设置创建时间
|
|
||||||
};
|
};
|
||||||
await Context.Insertable(prescription).ExecuteCommandAsync();
|
await Context.Insertable(prescription).ExecuteCommandAsync();
|
||||||
input.Id = prescripId;
|
input.Id = prescripId;
|
||||||
|
|||||||
Reference in New Issue
Block a user