Commit e1cd454b by lcx

科室cmi配置、抽取人员样式修改、抽取文件格式修改、新增exitem bug修改

parent 9dd67143
......@@ -476,7 +476,7 @@ public ApiResponse DepttypeDelete([CustomizeValidator(RuleSet = "Delete"), FromB
/// <returns></returns>
[Route("cmilist")]
[HttpPost]
public ApiResponse GetHosCMIList(cof_cmi request)
public ApiResponse GetHosCMIList([FromBody] cof_cmi request)
{
var list = _configService.GetCMIList(request.AllotId);
return new ApiResponse(ResponseType.OK, "ok", list);
......@@ -489,7 +489,7 @@ public ApiResponse GetHosCMIList(cof_cmi request)
/// <returns></returns>
[Route("cmiinsert")]
[HttpPost]
public ApiResponse HosCMIInsert(cof_cmi request)
public ApiResponse HosCMIInsert([FromBody] cof_cmi request)
{
var drugprop = _configService.HosCMIInsert(request);
return new ApiResponse(ResponseType.OK, drugprop);
......@@ -502,7 +502,7 @@ public ApiResponse HosCMIInsert(cof_cmi request)
/// <returns></returns>
[Route("cmiupdate")]
[HttpPost]
public ApiResponse HosCMIUpdate(cof_cmi request)
public ApiResponse HosCMIUpdate([FromBody] cof_cmi request)
{
var drugprop = _configService.HosCMIUpdate(request);
return new ApiResponse(ResponseType.OK, drugprop);
......@@ -515,7 +515,7 @@ public ApiResponse HosCMIUpdate(cof_cmi request)
/// <returns></returns>
[Route("cmidelete")]
[HttpPost]
public ApiResponse HosCMIDelete(cof_cmi request)
public ApiResponse HosCMIDelete([FromBody] cof_cmi request)
{
if (!_configService.HosCMIDelete(request))
return new ApiResponse(ResponseType.Fail);
......
......@@ -71,7 +71,7 @@ public static ICellStyle CreateCellStyle(IWorkbook wb, StyleType type = StyleTyp
cellStyle.FillPattern = FillPattern.SolidForeground;
break;
case StyleType.Remove:
cellStyle.FillForegroundColor = HSSFColor.LightTurquoise.Index;
cellStyle.FillForegroundColor = HSSFColor.Orange.Index;
cellStyle.FillPattern = FillPattern.SolidForeground;
break;
case StyleType.默认:
......
......@@ -304,8 +304,10 @@ private void ClearHistData(per_allot allot)
/// <returns></returns>
public string TemplateExecute(string email, sys_hospital hospital, List<sys_hospitalconfig> configs, List<ex_module> modules, List<ex_item> items, List<ex_special> specials, List<NewExtractDto> data)
{
logger.LogInformation("空白模板提取");
string originalPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Template", "医院绩效模板.xls");
var (tempPath, newPath) = CopyOriginalFile(hospital.ID, originalPath);
logger.LogInformation($"tempPath: {tempPath}, newPath: {newPath}");
var version = FileHelper.GetExtension(originalPath) == ".xlsx" ? ExcelVersion.xlsx : ExcelVersion.xls;
......@@ -679,12 +681,14 @@ private void SaveWorkload(IEnumerable<NewExtractDto> dtos)
return (tempPath, newPath);
}
private static void CreateNotExistSheet(List<ex_module> modulesList, IWorkbook workbook)
private void CreateNotExistSheet(List<ex_module> modulesList, IWorkbook workbook)
{
SortedDictionary<string, int> pairs = new SortedDictionary<string, int>();
for (int i = 0; i < workbook.NumberOfSheets; i++)
{
pairs.Add(workbook.GetSheetAt(i).SheetName, i);
var sheetname = workbook.GetSheetAt(i).SheetName;
if (!pairs.Keys.Contains(sheetname))
pairs.Add(workbook.GetSheetAt(i).SheetName, i);
}
int sheetIndex = 0;
......@@ -693,6 +697,7 @@ private static void CreateNotExistSheet(List<ex_module> modulesList, IWorkbook w
var sheet = workbook.GetSheet(module.ModuleName);
if (sheet == null)
{
logger.LogInformation($"CreateNotExistSheet: {module.ModuleName}");
string[] keyArray = new string[] { "开单", "执行" };
if (keyArray.Any(key => module.ModuleName.Contains(key)))
{
......@@ -700,7 +705,8 @@ private static void CreateNotExistSheet(List<ex_module> modulesList, IWorkbook w
if (sheetIndex == 0)
sheetIndex = item.Value + 1;
var copysheet = workbook.GetSheet(item.Key);
var newSheet = copysheet.CopySheet(item.Key, true);
var newSheet = copysheet.CopySheet(item.Key + Guid.NewGuid().ToString("N"), true);
logger.LogInformation($"newSheet: {newSheet.SheetName}");
workbook.SetSheetOrder(newSheet.SheetName, sheetIndex);
workbook.SetSheetName(sheetIndex, module.ModuleName);
sheetIndex++;
......@@ -786,7 +792,7 @@ public void GenRowStyle(IRow r, ICellStyle cellStyle)
{
cItem.CellStyle = cellStyle;
}
r.RowStyle = cellStyle;
//r.RowStyle = cellStyle;
}
......@@ -880,7 +886,7 @@ private void WriteClinicEmployee(ISheet sheet, IPerSheetDataRead sheetRead, bool
{
var accountingunits = new string[] { AccountUnitType.行政高层.ToString(), AccountUnitType.行政中层.ToString(), AccountUnitType.行政工勤.ToString() };
var validData = perforPeremployeeRepository.GetEntities(t => t.AllotId == Allot.ID && !accountingunits.Contains(t.UnitType)
&& (t.Duty.Contains("主任") || t.Duty.Contains("护士长")))?.ToList();
&& !string.IsNullOrEmpty(t.Duty) && !t.Duty.Contains("副") && (t.Duty.Contains("科主任") || t.Duty.Contains("护士长")))?.ToList();
if (validData == null || !validData.Any()) return;
Dictionary<string, Func<per_employee, object>> dict = new Dictionary<string, Func<per_employee, object>>
......@@ -889,7 +895,7 @@ private void WriteClinicEmployee(ISheet sheet, IPerSheetDataRead sheetRead, bool
{ "核算单元", (t) => t.AccountingUnit },
{ "人员工号", (t) => t.PersonnelNumber },
{ "医生姓名", (t) => t.DoctorName },
{ "职务分类", (t) => t.JobTitle },
{ "职务分类", (t) => t.Duty },
{ "出勤率", (t) => t.Attendance },
};
......
......@@ -204,7 +204,7 @@ public List<ex_item> QueryItems(int moduleId)
public List<ex_item> AddItem(ItemListRequest request)
{
var entity = exitemRepository.GetEntity(t => t.Id == request.ModuleId);
var entity = exmoduleRepository.GetEntity(t => t.Id == request.ModuleId);
if (entity == null)
throw new PerformanceException("选择的绩效抽取方案不存在!");
......
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