Commit 4fc34a3b by lcx

其他考核绩效去除金额为0的录入项,抽取新增sheet为6.1,6.7类型的采集

parent 3ce206f8
...@@ -287,7 +287,8 @@ public ApiResponse GetAprGroupList([FromBody] per_apr_amount request) ...@@ -287,7 +287,8 @@ public ApiResponse GetAprGroupList([FromBody] per_apr_amount request)
{ {
AccountingUnit = t.Key.AccountingUnit, AccountingUnit = t.Key.AccountingUnit,
TypeInDepartment = t.Key.TypeInDepartment, TypeInDepartment = t.Key.TypeInDepartment,
Amount = t.Sum(s => s.Amount ?? 0) Amount = t.Sum(s => s.Amount ?? 0),
Status = t.Any(s => s.Status == 2) ? 2 : t.Any(s => s.Status == 4) ? 4 : t.FirstOrDefault().Status,
}); });
return new ApiResponse(ResponseType.OK, "ok", result); return new ApiResponse(ResponseType.OK, "ok", result);
} }
...@@ -315,7 +316,7 @@ public ApiResponse GetAprDetail([FromBody] per_apr_amount request) ...@@ -315,7 +316,7 @@ public ApiResponse GetAprDetail([FromBody] per_apr_amount request)
Status = t.Any(s => s.Status == 2) ? 2 : t.Any(s => s.Status == 4) ? 4 : t.FirstOrDefault().Status, Status = t.Any(s => s.Status == 2) ? 2 : t.Any(s => s.Status == 4) ? 4 : t.FirstOrDefault().Status,
Detail = t.GroupBy(group => group.PerforType).Select(s => new TitleValue<decimal> Detail = t.GroupBy(group => group.PerforType).Select(s => new TitleValue<decimal>
{ {
Title = s.Key, Title = string.IsNullOrEmpty(s.Key) ? "未知" : s.Key,
Value = s.Sum(sum => sum.Amount ?? 0) Value = s.Sum(sum => sum.Amount ?? 0)
}) })
}); });
......
...@@ -245,7 +245,7 @@ private IEnumerable<collect_permission> GetCollectSheetByAllot(int hospitalId, i ...@@ -245,7 +245,7 @@ private IEnumerable<collect_permission> GetCollectSheetByAllot(int hospitalId, i
join head in headers on sheet.ID equals head.SheetID join head in headers on sheet.ID equals head.SheetID
select new { sheet.SheetName, sheet.SheetType, HeadName = head.CellValue }; select new { sheet.SheetName, sheet.SheetType, HeadName = head.CellValue };
var result = sheetHeads.Select(sh => new collect_permission { HospitalId = hospitalId, SheetName = sh.SheetName, SheetType = sh.SheetType.Value, HeadName = sh.HeadName, AttachLast = 1, Visible = 1 })?.ToList(); var result = sheetHeads.Select(sh => new collect_permission { HospitalId = hospitalId, SheetName = sh.SheetName, SheetType = sh.SheetType.Value, HeadName = sh.HeadName, AttachLast = 0, Visible = 1 })?.ToList();
//if (result != null && result.Any()) //if (result != null && result.Any())
//{ //{
......
...@@ -376,7 +376,7 @@ public bool Audit(int allotId) ...@@ -376,7 +376,7 @@ public bool Audit(int allotId)
public List<per_apr_amount> GetAprList(int allotId) public List<per_apr_amount> GetAprList(int allotId)
{ {
var list = perapramountRepository.GetEntities(t => t.AllotId == allotId); var list = perapramountRepository.GetEntities(t => t.AllotId == allotId && t.Amount != 0);
if (list != null && list.Any()) if (list != null && list.Any())
list = list.OrderBy(t => t.DoctorName).ToList(); list = list.OrderBy(t => t.DoctorName).ToList();
...@@ -385,7 +385,7 @@ public List<per_apr_amount> GetAprList(int allotId) ...@@ -385,7 +385,7 @@ public List<per_apr_amount> GetAprList(int allotId)
public List<per_apr_amount> GetAprList(int allotId, string accountingUnit, string department) public List<per_apr_amount> GetAprList(int allotId, string accountingUnit, string department)
{ {
var list = perapramountRepository.GetEntities(t => t.AllotId == allotId && (t.AccountingUnit ?? "") == accountingUnit && (t.TypeInDepartment ?? "") == department); var list = perapramountRepository.GetEntities(t => t.AllotId == allotId && t.Amount != 0 && (t.AccountingUnit ?? "") == accountingUnit && (t.TypeInDepartment ?? "") == department);
if (list != null && list.Any()) if (list != null && list.Any())
list = list.OrderBy(t => t.DoctorName).ToList(); list = list.OrderBy(t => t.DoctorName).ToList();
...@@ -443,7 +443,7 @@ public bool DeleteApr(int id) ...@@ -443,7 +443,7 @@ public bool DeleteApr(int id)
/// <returns></returns> /// <returns></returns>
public bool ConfirmAudit(int userid, AprAmountAuditRequest request) public bool ConfirmAudit(int userid, AprAmountAuditRequest request)
{ {
if (request.Id.Length == 0) if (string.IsNullOrEmpty(request.DoctorName) && string.IsNullOrEmpty(request.PersonnelNumber))
throw new PerformanceException("审核信息无效,请确认"); throw new PerformanceException("审核信息无效,请确认");
var apramounts = perapramountRepository.GetEntities(t => (t.DoctorName ?? "") == request.DoctorName && (t.PersonnelNumber ?? "") == request.PersonnelNumber); var apramounts = perapramountRepository.GetEntities(t => (t.DoctorName ?? "") == request.DoctorName && (t.PersonnelNumber ?? "") == request.PersonnelNumber);
......
using NPOI.SS.UserModel;
using Performance.DtoModels;
using Performance.EntityModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Performance.Services.ExtractExcelService.SheetDataWrite
{
public class DepartmentDataWrite : ISheetDataWrite
{
public void WriteCollectData(ISheet sheet, PerSheetPoint point, SheetType sheetType, ExcelStyle style, List<collect_data> collects)
{
if (collects == null || !collects.Any(t => !string.IsNullOrEmpty(t.TypeName))) return;
var columns = collects.Where(t => !string.IsNullOrEmpty(t.TypeName)).Select(t => t.TypeName).Distinct().OrderBy(t => t).ToList();
var headers = columns.Select(t => new ExcelHeader
{
ColumnName = t.Trim(),
DoctorFactor = 0,
NurseFactor = 0,
TechnicianFactor = 0
}).ToList();
point = new PerSheetPoint
{
HeaderFirstRowNum = 1,
HeaderFirstCellNum = 1,
DataFirstRowNum = 2,
DataFirstCellNum = 3
};
ExtractHelper.ClearSheetPartialData(sheet, point, sheetType);
WriteDataHelper.WriteSheetHeader(sheet, point, sheetType, style, headers);
WriteDataHelper.WriteCollectData(sheet, point, sheetType, style, columns, collects);
}
public void WriteSheetData(ISheet sheet, PerSheetPoint point, SheetType sheetType, ExcelStyle style, object data, Dictionary<ExDataDict, object> exdict = null)
{
}
}
}
...@@ -35,6 +35,13 @@ public ISheetDataWrite GetWriteData(SheetType sheetType) ...@@ -35,6 +35,13 @@ public ISheetDataWrite GetWriteData(SheetType sheetType)
case SheetType.SpecialUnit: case SheetType.SpecialUnit:
factory = new SpecialUnitDataWrite(); factory = new SpecialUnitDataWrite();
break; break;
case SheetType.AccountExtra:
case SheetType.PersonExtra:
case SheetType.AccountScoreAverage:
case SheetType.BudgetRatio:
case SheetType.AssessBeforeOtherFee:
factory = new DepartmentDataWrite();
break;
default: default:
return null; return null;
} }
......
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