护理部审核完善

parent 346ed792
......@@ -17,6 +17,7 @@ namespace Performance.Services
public class SecondAllotService : IAutoInjection
{
private readonly Application application;
private readonly PerforHospitalRepository hospitalRepository;
private readonly PerforUserRepository perforUserRepository;
private readonly PerforUserhospitalRepository perforUserhospitalRepository;
private readonly PerforPerallotRepository perforPerallotRepository;
......@@ -40,6 +41,7 @@ public class SecondAllotService : IAutoInjection
private readonly List<ag_tempitem> tempitems = new List<ag_tempitem>();
public SecondAllotService(IOptions<Application> application,
PerforHospitalRepository hospitalRepository,
PerforUserRepository perforUserRepository,
PerforUserhospitalRepository perforUserhospitalRepository,
PerforPerallotRepository perforPerallotRepository,
......@@ -62,6 +64,7 @@ public class SecondAllotService : IAutoInjection
PerforRescomputeRepository rescomputeRepository)
{
this.application = application.Value;
this.hospitalRepository = hospitalRepository;
this.perforUserRepository = perforUserRepository;
this.perforUserhospitalRepository = perforUserhospitalRepository;
this.perforPerallotRepository = perforPerallotRepository;
......@@ -1356,6 +1359,16 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
if (result && request.IsPass == 1)
{
// 护理部审核
var allot = perforPerallotRepository.GetEntity(w => w.ID == second.AllotId);
if (allot == null) return true;
var hospital = hospitalRepository.GetEntity(w => w.ID == allot.HospitalId);
if (hospital == null) return true;
if (hospital.IsOpenNursingDeptAudit != 1 || second.NursingDeptStatus != 3)
return true;
var computes = new List<ag_compute>();
if (second.SubmitType == 1)
{
......
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