Commit fa2bbcba by 钟博

修改划拨下拉带出

parent 5cb55851
...@@ -709,12 +709,6 @@ ...@@ -709,12 +709,6 @@
</summary> </summary>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Performance.Api.Controllers.CostTransferController.SelectCommon(System.Int32,System.Int32,Performance.DtoModels.DepartmentDetail)">
<summary>
</summary>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.CostTransferController.DeptDetial(System.Int32,System.Int32)"> <member name="M:Performance.Api.Controllers.CostTransferController.DeptDetial(System.Int32,System.Int32)">
<summary> <summary>
当前科室、类别 当前科室、类别
......
...@@ -60,7 +60,7 @@ public class Common ...@@ -60,7 +60,7 @@ public class Common
{ {
public string Source { get; set; } public string Source { get; set; }
public string Category { get; set; } public string Category { get; set; }
public decimal Ratio { get; set; } public decimal? Ratio { get; set; }
} }
public class Option : cost_transfer_item public class Option : cost_transfer_item
......
...@@ -28,6 +28,8 @@ public class CostTransferService : IAutoInjection ...@@ -28,6 +28,8 @@ public class CostTransferService : IAutoInjection
private readonly PerforPerdeptdicRepository perdeptdicRepository; private readonly PerforPerdeptdicRepository perdeptdicRepository;
private readonly PerforPerallotRepository perallotRepository; private readonly PerforPerallotRepository perallotRepository;
private readonly PerforImdataRepository imdataRepository; private readonly PerforImdataRepository imdataRepository;
private readonly PerforCofdrugtypefactorRepository perforCofdrugtypefactor;
private readonly PerforExmoduleRepository perforExmodule;
public CostTransferService( public CostTransferService(
ILogger<CostTransferService> logger, ILogger<CostTransferService> logger,
...@@ -39,7 +41,9 @@ public class CostTransferService : IAutoInjection ...@@ -39,7 +41,9 @@ public class CostTransferService : IAutoInjection
PerforCofaccountingRepository cofaccountingRepository, PerforCofaccountingRepository cofaccountingRepository,
PerforPerdeptdicRepository perdeptdicRepository, PerforPerdeptdicRepository perdeptdicRepository,
PerforPerallotRepository perallotRepository, PerforPerallotRepository perallotRepository,
PerforImdataRepository imdataRepository PerforImdataRepository imdataRepository,
PerforCofdrugtypefactorRepository perforCofdrugtypefactor,
PerforExmoduleRepository perforExmodule
) )
{ {
this.logger = logger; this.logger = logger;
...@@ -52,6 +56,8 @@ PerforImdataRepository imdataRepository ...@@ -52,6 +56,8 @@ PerforImdataRepository imdataRepository
this.perdeptdicRepository = perdeptdicRepository; this.perdeptdicRepository = perdeptdicRepository;
this.perallotRepository = perallotRepository; this.perallotRepository = perallotRepository;
this.imdataRepository = imdataRepository; this.imdataRepository = imdataRepository;
this.perforCofdrugtypefactor = perforCofdrugtypefactor;
this.perforExmodule = perforExmodule;
} }
/// <summary> /// <summary>
...@@ -174,6 +180,21 @@ public CommonResponse Common(int allotId, int hospitalId, int roleType, string d ...@@ -174,6 +180,21 @@ public CommonResponse Common(int allotId, int hospitalId, int roleType, string d
common.unitType = deptDetail.UnitType ?? ""; common.unitType = deptDetail.UnitType ?? "";
var drugFactor = perforCofdrugtypefactor.GetEntities(t => t.HospitalId == hospitalId && t.AllotID == allotId);
if (drugFactor == null || !drugFactor.Any()) return common;
var exModule = perforExmodule.GetEntities(t => drugFactor.Select(c => c.ExModuleId).Contains(t.Id) && t.SheetType == (int)SheetType.Income);
common.Data = drugFactor.Select(t => new Common
{
Source = Regex.Replace(exModule.Find(w => w.Id == t.ExModuleId).ModuleName, @"\d.", ""),
Category = t.Charge,
Ratio = (detail.UnitType == "医生组" ? t.YSZ : detail.UnitType == "医技组" ? t.YJZ : t.HLZ) ?? 0
}).ToList();
#region 注释
/*
var sheets = persheetRepository.GetEntities(t => t.AllotID == allotId && t.SheetType == (int)SheetType.Income); var sheets = persheetRepository.GetEntities(t => t.AllotID == allotId && t.SheetType == (int)SheetType.Income);
if (sheets != null && sheets.Any()) if (sheets != null && sheets.Any())
{ {
...@@ -201,8 +222,9 @@ public CommonResponse Common(int allotId, int hospitalId, int roleType, string d ...@@ -201,8 +222,9 @@ public CommonResponse Common(int allotId, int hospitalId, int roleType, string d
}).ToList(); }).ToList();
} }
common.Data = commons; common.Data = commons;
} } */
#endregion
return common; return common;
} }
......
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