Commit 3bd57de9 by lcx

生成绩效时 补充费用占比

parent 512290f7
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
// <copyright file=" cof_director.cs"> // <copyright file=" cof_director.cs">
// * FileName: cof_director.cs // * FileName: cof_director.cs
// * history : Created by T4 2019-03-22 15:48:55 // * history : Created by T4 2019-03-22 15:48:55
...@@ -55,5 +55,23 @@ public int DelAgain(int againid) ...@@ -55,5 +55,23 @@ public int DelAgain(int againid)
return Execute(sql, new { againid }); return Execute(sql, new { againid });
} }
/// <summary>
/// 补充费用占比类型
/// </summary>
/// <param name="allotid"></param>
/// <returns></returns>
public int SupplementaryData(int allotid)
{
var sql = @"insert into cof_drugtype(allotid,charge) select
distinct @allotid allotid,typename charge
from per_sheet sheet
inner join im_data im on sheet.id = im.sheetid
inner join cof_drugtype dtype on sheet.allotid = dtype.allotid
and im.typename != dtype.charge
where sheet.allotid = @allotid and sheet.sheettype = 3 ";
return Execute(sql, new { allotid });
}
} }
} }
...@@ -36,6 +36,7 @@ public class AllotService : IAutoInjection ...@@ -36,6 +36,7 @@ public class AllotService : IAutoInjection
private readonly PerforHospitalRepository perforHospitalRepository; private readonly PerforHospitalRepository perforHospitalRepository;
private readonly PerforResbaiscnormRepository perforResbaiscnormRepository; private readonly PerforResbaiscnormRepository perforResbaiscnormRepository;
private PerforHospitalconfigRepository perforHospitalconfigRepository; private PerforHospitalconfigRepository perforHospitalconfigRepository;
private PerforCofdirectorRepository perforCofdirectorRepository;
//private readonly IHubContext<AllotLogHub> hubContext; //private readonly IHubContext<AllotLogHub> hubContext;
private readonly LogManageService logManageService; private readonly LogManageService logManageService;
...@@ -59,7 +60,8 @@ public class AllotService : IAutoInjection ...@@ -59,7 +60,8 @@ public class AllotService : IAutoInjection
PerforHospitalconfigRepository perforHospitalconfigRepository, PerforHospitalconfigRepository perforHospitalconfigRepository,
//IHubContext<AllotLogHub> hubContext //IHubContext<AllotLogHub> hubContext
LogManageService logManageService, LogManageService logManageService,
ReportService reportService) ReportService reportService,
PerforCofdirectorRepository perforCofdirectorRepository)
{ {
_allotRepository = allotRepository; _allotRepository = allotRepository;
_againallotRepository = againallotRepository; _againallotRepository = againallotRepository;
...@@ -81,6 +83,7 @@ public class AllotService : IAutoInjection ...@@ -81,6 +83,7 @@ public class AllotService : IAutoInjection
//this.hubContext = hubContext; //this.hubContext = hubContext;
this.logManageService = logManageService; this.logManageService = logManageService;
this.reportService = reportService; this.reportService = reportService;
this.perforCofdirectorRepository = perforCofdirectorRepository;
} }
#region 基础功能 #region 基础功能
...@@ -328,6 +331,7 @@ public void Generate(per_allot allot, string mail) ...@@ -328,6 +331,7 @@ public void Generate(per_allot allot, string mail)
perforResbaiscnormRepository.AddRange(baiscnormList.ToArray()); perforResbaiscnormRepository.AddRange(baiscnormList.ToArray());
UpdateAllotStates(allot.ID, (int)AllotStates.GenerateAccomplish, EnumHelper.GetDescription(AllotStates.GenerateAccomplish)); UpdateAllotStates(allot.ID, (int)AllotStates.GenerateAccomplish, EnumHelper.GetDescription(AllotStates.GenerateAccomplish));
perforCofdirectorRepository.SupplementaryData(allot.ID);
logManageService.WriteMsg("正在生成报表数据", "正在生成报表数据", 1, allot.ID, "ReceiveMessage", true); logManageService.WriteMsg("正在生成报表数据", "正在生成报表数据", 1, allot.ID, "ReceiveMessage", true);
var res = reportService.ImportData(allot); var res = reportService.ImportData(allot);
......
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