Commit 47103830 by 钟博

发放表名字修改

parent 76217558
...@@ -54,7 +54,7 @@ public class DownloadService : IAutoInjection ...@@ -54,7 +54,7 @@ public class DownloadService : IAutoInjection
/// <param name="allData"></param> /// <param name="allData"></param>
/// <param name="isAll"></param> /// <param name="isAll"></param>
/// <returns></returns> /// <returns></returns>
public string AllComputerReport(int allotId, List<ComputeResponse> allData, bool isAll) public string AllComputerReport(int allotId, List<ComputeResponse> allData, bool isAll,string name)
{ {
var allot = perallotRepository.GetEntity(t => t.ID == allotId); var allot = perallotRepository.GetEntity(t => t.ID == allotId);
var hospital = perforHospital.GetEntity(t => t.ID == allot.HospitalId); var hospital = perforHospital.GetEntity(t => t.ID == allot.HospitalId);
...@@ -81,7 +81,7 @@ public string AllComputerReport(int allotId, List<ComputeResponse> allData, bool ...@@ -81,7 +81,7 @@ public string AllComputerReport(int allotId, List<ComputeResponse> allData, bool
var dpath = Path.Combine(evn.ContentRootPath, "Files", "PerformanceRelease", $"{allot.HospitalId}"); var dpath = Path.Combine(evn.ContentRootPath, "Files", "PerformanceRelease", $"{allot.HospitalId}");
FileHelper.CreateDirectory(dpath); FileHelper.CreateDirectory(dpath);
string fileName = $"{hospital.HosName}-全院绩效发放-{DateTime.Now:yyyyMMdd}"; string fileName = $"{hospital.HosName}-{name}-{DateTime.Now:yyyyMMdd}";
string filepath = Path.Combine(dpath, fileName); string filepath = Path.Combine(dpath, fileName);
FileStream stream = new FileStream(filepath, FileMode.Create); FileStream stream = new FileStream(filepath, FileMode.Create);
try try
...@@ -93,7 +93,7 @@ public string AllComputerReport(int allotId, List<ComputeResponse> allData, bool ...@@ -93,7 +93,7 @@ public string AllComputerReport(int allotId, List<ComputeResponse> allData, bool
style.BorderBottom = BorderStyle.Thin; style.BorderBottom = BorderStyle.Thin;
style.BorderRight = BorderStyle.Thin; style.BorderRight = BorderStyle.Thin;
ISheet sheet = workbook.CreateSheet("全院绩效发放"); ISheet sheet = workbook.CreateSheet($"{name}");
sheet.ForceFormulaRecalculation = true; sheet.ForceFormulaRecalculation = true;
ICellStyle cellStyle = workbook.CreateCellStyle(); ICellStyle cellStyle = workbook.CreateCellStyle();
cellStyle.DataFormat = HSSFDataFormat.GetBuiltinFormat("0.00"); cellStyle.DataFormat = HSSFDataFormat.GetBuiltinFormat("0.00");
...@@ -228,7 +228,7 @@ public string DeptReport(int allotId, List<DeptResponse> deptData) ...@@ -228,7 +228,7 @@ public string DeptReport(int allotId, List<DeptResponse> deptData)
FileStream stream = new FileStream(filepath, FileMode.Create); FileStream stream = new FileStream(filepath, FileMode.Create);
try try
{ {
XSSFWorkbook workbook = new HSSFWorkbook(); XSSFWorkbook workbook = new XSSFWorkbook();
//设置单元格样式 //设置单元格样式
ICellStyle style = workbook.CreateCellStyle(); ICellStyle style = workbook.CreateCellStyle();
style.Alignment = HorizontalAlignment.Center; style.Alignment = HorizontalAlignment.Center;
......
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