Commit 317a3cc9 by lcx

Merge branch 'v2020calculate' into v2020collect

# Conflicts:
#	performance/Performance.Api/wwwroot/Performance.Api.xml
#	performance/Performance.Api/wwwroot/Performance.DtoModels.xml
#	performance/Performance.Infrastructure/Helper/JsonHelper.cs
#	performance/Performance.Services/PerExcelService/ExcelReadConfig.cs
parents e218731d 9c7c862b
...@@ -44,6 +44,19 @@ public class AccountController : Controller ...@@ -44,6 +44,19 @@ public class AccountController : Controller
/// <summary> /// <summary>
/// 登录 /// 登录
/// </summary> /// </summary>
/// <remarks>
/// Sample request:
///
/// POST /Todo
/// {
/// "logintype": 2,
/// "account": "admin",
/// "password": "1111",
/// "appname": "string",
/// "device": "web"
/// }
///
/// </remarks>
/// <param name="request"></param> /// <param name="request"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
...@@ -110,7 +123,7 @@ public ApiResponse SelfInfo() ...@@ -110,7 +123,7 @@ public ApiResponse SelfInfo()
user.Role = _roleService.GetUserRole(user.UserID); user.Role = _roleService.GetUserRole(user.UserID);
user.Hospital = _hospitalService.GetUserHopital(user.UserID); user.Hospital = _hospitalService.GetUserHopital(user.UserID);
int[] roleArray = new int[] { _options.NurseRole, _options.DirectorRole, _options.SpecialRole }; int[] roleArray = new int[] { _options.NurseRole, _options.DirectorRole, _options.SpecialRole, _options.OfficeRole };
user.IsAgainAdmin = user.Role != null ? roleArray.Contains(user.Role.First().Type ?? 0) : false; user.IsAgainAdmin = user.Role != null ? roleArray.Contains(user.Role.First().Type ?? 0) : false;
return new ApiResponse(ResponseType.OK, user); return new ApiResponse(ResponseType.OK, user);
} }
...@@ -179,7 +192,7 @@ public ApiResponse<UserResponse> Update([CustomizeValidator(RuleSet = "Update"), ...@@ -179,7 +192,7 @@ public ApiResponse<UserResponse> Update([CustomizeValidator(RuleSet = "Update"),
{ {
var userId = _claim.GetUserId(); var userId = _claim.GetUserId();
int[] roleArray = new int[] { _options.NurseRole, _options.DirectorRole }; int[] roleArray = new int[] { _options.NurseRole, _options.DirectorRole, _options.SpecialRole, _options.OfficeRole };
var roles = _roleService.GetUserRole(userId); var roles = _roleService.GetUserRole(userId);
var isAgainAdmin = roles != null ? roleArray.Contains(roles.First().Type ?? 0) : false; var isAgainAdmin = roles != null ? roleArray.Contains(roles.First().Type ?? 0) : false;
......
...@@ -116,49 +116,49 @@ public ApiResponse Import([FromForm] IFormCollection form) ...@@ -116,49 +116,49 @@ public ApiResponse Import([FromForm] IFormCollection form)
return new ApiResponse(ResponseType.OK); return new ApiResponse(ResponseType.OK);
} }
/// <summary> ///// <summary>
/// 查看科室绩效 ///// 查看科室绩效
/// </summary> ///// </summary>
/// <param name="request"></param> ///// <param name="request"></param>
/// <returns></returns> ///// <returns></returns>
[Route("departmentdetail")] //[Route("departmentdetail")]
[HttpPost] //[HttpPost]
public ApiResponse DepartmentDetail([CustomizeValidator(RuleSet = "Generate"), FromBody]AgainAllotRequest request) //public ApiResponse DepartmentDetail([CustomizeValidator(RuleSet = "Generate"), FromBody]AgainAllotRequest request)
{ //{
var userId = claimService.GetUserId(); // var userId = claimService.GetUserId();
var roles = roleService.GetUserRole(userId); // var roles = roleService.GetUserRole(userId);
var department = claimService.GetUserClaim(JwtClaimTypes.Department); // var department = claimService.GetUserClaim(JwtClaimTypes.Department);
var again = againAllotService.GetAgainallot(request.AgainAllotID); // var again = againAllotService.GetAgainallot(request.AgainAllotID);
if (again == null) // if (again == null)
return new ApiResponse(ResponseType.Fail, "当前二次绩效ID无效"); // return new ApiResponse(ResponseType.Fail, "当前二次绩效ID无效");
if (roles.First().Type == application.DirectorRole) // if (roles.First().Type == application.DirectorRole)
{ // {
var detail = computeService.GetDepartmentDetail(again.AllotID.Value, department, 1); // var detail = computeService.GetDepartmentDetail(again.AllotID.Value, department, 1);
return new ApiResponse(ResponseType.OK, detail); // return new ApiResponse(ResponseType.OK, detail);
} // }
else if (roles.First().Type == application.NurseRole) // else if (roles.First().Type == application.NurseRole)
{ // {
var detail = computeService.GetDepartmentDetail(again.AllotID.Value, department, 2); // var detail = computeService.GetDepartmentDetail(again.AllotID.Value, department, 2);
return new ApiResponse(ResponseType.OK, detail); // return new ApiResponse(ResponseType.OK, detail);
} // }
return new ApiResponse(ResponseType.Fail, "当前用户角色无法识别"); // return new ApiResponse(ResponseType.Fail, "当前用户角色无法识别");
} //}
/// <summary> ///// <summary>
/// 生成绩效 ///// 生成绩效
/// </summary> ///// </summary>
/// <param name="request"></param> ///// <param name="request"></param>
/// <returns></returns> ///// <returns></returns>
[Route("generate")] //[Route("generate")]
[HttpPost] //[HttpPost]
public ApiResponse Generate([CustomizeValidator(RuleSet = "Generate"), FromBody]AgainAllotRequest request) //public ApiResponse Generate([CustomizeValidator(RuleSet = "Generate"), FromBody]AgainAllotRequest request)
{ //{
var userId = claimService.GetUserId(); // var userId = claimService.GetUserId();
var department = claimService.GetUserClaim(JwtClaimTypes.Department); // var department = claimService.GetUserClaim(JwtClaimTypes.Department);
var result = againAllotService.Generate(request, userId, department); // var result = againAllotService.Generate(request, userId, department);
return new ApiResponse(ResponseType.OK); // return new ApiResponse(ResponseType.OK);
} //}
/// <summary> /// <summary>
/// 查看绩效详情 /// 查看绩效详情
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
using Performance.EntityModels; using Performance.EntityModels;
using Performance.Infrastructure; using Performance.Infrastructure;
using Performance.Services; using Performance.Services;
using Performance.Services.AllotCompute;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
...@@ -24,6 +25,7 @@ namespace Performance.Api.Controllers ...@@ -24,6 +25,7 @@ namespace Performance.Api.Controllers
public class AllotController : Controller public class AllotController : Controller
{ {
private AllotService _allotService; private AllotService _allotService;
private readonly ResultComputeService resultComputeService;
private HospitalService _hospitalService; private HospitalService _hospitalService;
private ConfigService _configService; private ConfigService _configService;
private IHostingEnvironment _evn; private IHostingEnvironment _evn;
...@@ -32,11 +34,13 @@ public class AllotController : Controller ...@@ -32,11 +34,13 @@ public class AllotController : Controller
private readonly LogManageService logManageService; private readonly LogManageService logManageService;
public AllotController(AllotService allotService, public AllotController(AllotService allotService,
ResultComputeService resultComputeService,
HospitalService hospitalService, ConfigService configService, HospitalService hospitalService, ConfigService configService,
ILogger<AllotController> logger, IHostingEnvironment evn, ILogger<AllotController> logger, IHostingEnvironment evn,
ClaimService claim, LogManageService logManageService) ClaimService claim, LogManageService logManageService)
{ {
_allotService = allotService; _allotService = allotService;
this.resultComputeService = resultComputeService;
_hospitalService = hospitalService; _hospitalService = hospitalService;
_logger = logger; _logger = logger;
_evn = evn; _evn = evn;
...@@ -265,6 +269,8 @@ public ApiResponse Issued([FromBody] AllotRequest request) ...@@ -265,6 +269,8 @@ public ApiResponse Issued([FromBody] AllotRequest request)
if (null == allot) if (null == allot)
throw new PerformanceException("当前绩效记录不存在"); throw new PerformanceException("当前绩效记录不存在");
_allotService.UpdateAllotStates(allot.ID, (int)AllotStates.GenerateSucceed, EnumHelper.GetDescription(AllotStates.GenerateSucceed)); _allotService.UpdateAllotStates(allot.ID, (int)AllotStates.GenerateSucceed, EnumHelper.GetDescription(AllotStates.GenerateSucceed));
// 科室下发
resultComputeService.GenerateSecondAllot(allot);
return new ApiResponse(ResponseType.OK); return new ApiResponse(ResponseType.OK);
} }
...@@ -282,5 +288,82 @@ public ApiResponse UpdateAllotShowFormula([FromBody] AllotRequest request) ...@@ -282,5 +288,82 @@ public ApiResponse UpdateAllotShowFormula([FromBody] AllotRequest request)
var result = _allotService.UpdateAllotShowFormula(request.ID); var result = _allotService.UpdateAllotShowFormula(request.ID);
return new ApiResponse(ResponseType.OK, result); return new ApiResponse(ResponseType.OK, result);
} }
/// <summary>
/// 获取
/// </summary>
/// <returns></returns>
[Route("reserved")]
[HttpPost]
public ApiResponse Reserved([FromBody] ReservedRequest request)
{
if (request.HospitalId < 1)
return new ApiResponse(ResponseType.ParameterError, "绩效信息无效");
var userid = _claim.GetUserId();
var reserveds = _allotService.GetReserved(request.HospitalId, request.Year, userid);
#region 格式转换
var result = reserveds?.Select(w => new
{
w.HospitalId,
w.Year,
w.UnitType,
w.AccountingUnit,
w.EmployeeName,
w.JobNumber,
JanReseFee = w.JanFee * w.JanRatio,
JanGiveFee = w.JanFee * (1 - w.JanRatio),
FebReseFee = w.FebFee * w.FebRatio,
FebGiveFee = w.FebFee * (1 - w.FebRatio),
MarReseFee = w.MarFee * w.MarRatio,
MarGiveFee = w.MarFee * (1 - w.MarRatio),
AprReseFee = w.AprFee * w.AprRatio,
AprGiveFee = w.AprFee * (1 - w.AprRatio),
MayReseFee = w.MayFee * w.MayRatio,
MayGiveFee = w.MayFee * (1 - w.MayRatio),
JunReseFee = w.JunFee * w.JunRatio,
JunGiveFee = w.JunFee * (1 - w.JunRatio),
JulReseFee = w.JulFee * w.JulRatio,
JulGiveFee = w.JulFee * (1 - w.JulRatio),
AugReseFee = w.AugFee * w.AugRatio,
AugGiveFee = w.AugFee * (1 - w.AugRatio),
SepReseFee = w.SepFee * w.SepRatio,
SepGiveFee = w.SepFee * (1 - w.SepRatio),
OctReseFee = w.OctFee * w.OctRatio,
OctGiveFee = w.OctFee * (1 - w.OctRatio),
NovReseFee = w.NovFee * w.NovRatio,
NovGiveFee = w.NovFee * (1 - w.NovRatio),
DecReseFee = w.DecFee * w.DecRatio,
DecGiveFee = w.DecFee * (1 - w.DecRatio),
TotalReseFee = (w.JanFee * w.JanRatio ?? 0) + (w.FebFee * w.FebRatio ?? 0) + (w.MarFee * w.MarRatio ?? 0)
+ (w.AprFee * w.AprRatio ?? 0) + (w.MayFee * w.MayRatio ?? 0) + (w.JunFee * w.JunRatio ?? 0)
+ (w.JulFee * w.JulRatio ?? 0) + (w.AugFee * w.AugRatio ?? 0) + (w.SepFee * w.SepRatio ?? 0)
+ (w.OctFee * w.OctRatio ?? 0) + (w.NovFee * w.NovRatio ?? 0) + (w.DecFee * w.DecRatio ?? 0),
TotalGiveFee = (w.JanFee * (1 - w.JanRatio) ?? 0) + (w.FebFee * (1 - w.FebRatio) ?? 0) + (w.MarFee * (1 - w.MarRatio) ?? 0)
+ (w.AprFee * (1 - w.AprRatio) ?? 0) + (w.MayFee * (1 - w.MayRatio) ?? 0) + (w.JunFee * (1 - w.JunRatio) ?? 0)
+ (w.JulFee * (1 - w.JulRatio) ?? 0) + (w.AugFee * (1 - w.AugRatio) ?? 0) + (w.SepFee * (1 - w.SepRatio) ?? 0)
+ (w.OctFee * (1 - w.OctRatio) ?? 0) + (w.NovFee * (1 - w.NovRatio) ?? 0) + (w.DecFee * (1 - w.DecRatio) ?? 0),
});
#endregion
return new ApiResponse(ResponseType.OK, result);
}
} }
} }
...@@ -30,7 +30,7 @@ public BudgetController(ClaimService claim, BudgetService budgetService) ...@@ -30,7 +30,7 @@ public BudgetController(ClaimService claim, BudgetService budgetService)
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[Route("query")] [Route("query")]
public ApiResponse<List<BudgetResponse>> Query([FromBody]BudgetRequest request) public ApiResponse<List<BudgetResponse>> Query([FromBody] BudgetRequest request)
{ {
if (request.HospitalId == 0 || request.Year == 0) if (request.HospitalId == 0 || request.Year == 0)
return new ApiResponse<List<BudgetResponse>>(ResponseType.ParameterError, "参数无效"); return new ApiResponse<List<BudgetResponse>>(ResponseType.ParameterError, "参数无效");
...@@ -47,7 +47,7 @@ public ApiResponse<List<BudgetResponse>> Query([FromBody]BudgetRequest request) ...@@ -47,7 +47,7 @@ public ApiResponse<List<BudgetResponse>> Query([FromBody]BudgetRequest request)
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[Route("save/{mainYear}")] [Route("save/{mainYear}")]
public ApiResponse Save(int mainYear, [FromBody]List<BudgetResponse> request) public ApiResponse Save(int mainYear, [FromBody] List<BudgetResponse> request)
{ {
var userId = claim.GetUserId(); var userId = claim.GetUserId();
var result = false; var result = false;
...@@ -65,7 +65,7 @@ public ApiResponse Save(int mainYear, [FromBody]List<BudgetResponse> request) ...@@ -65,7 +65,7 @@ public ApiResponse Save(int mainYear, [FromBody]List<BudgetResponse> request)
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[Route("modify")] [Route("modify")]
public ApiResponse Modify([FromBody]List<BudgetResponse> request) public ApiResponse Modify([FromBody] List<BudgetResponse> request)
{ {
//var result = budgetService.ModifyBudgetData(request); //var result = budgetService.ModifyBudgetData(request);
//return result ? new ApiResponse(ResponseType.OK, "修改成功") : new ApiResponse(ResponseType.Fail, "修改失败"); //return result ? new ApiResponse(ResponseType.OK, "修改成功") : new ApiResponse(ResponseType.Fail, "修改失败");
...@@ -79,7 +79,7 @@ public ApiResponse Modify([FromBody]List<BudgetResponse> request) ...@@ -79,7 +79,7 @@ public ApiResponse Modify([FromBody]List<BudgetResponse> request)
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[Route("result/query")] [Route("result/query")]
public ApiResponse<List<per_budget_result>> Result([FromBody]BudgetRequest request) public ApiResponse<List<per_budget_result>> Result([FromBody] BudgetRequest request)
{ {
if (request.HospitalId == 0 || request.Year == 0) if (request.HospitalId == 0 || request.Year == 0)
return new ApiResponse<List<per_budget_result>>(ResponseType.ParameterError, "参数无效"); return new ApiResponse<List<per_budget_result>>(ResponseType.ParameterError, "参数无效");
...@@ -95,7 +95,7 @@ public ApiResponse<List<per_budget_result>> Result([FromBody]BudgetRequest reque ...@@ -95,7 +95,7 @@ public ApiResponse<List<per_budget_result>> Result([FromBody]BudgetRequest reque
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[Route("result/ratio")] [Route("result/ratio")]
public ApiResponse<List<BudgetRatioResponse>> Ratio([FromBody]BudgetRequest request) public ApiResponse<List<BudgetRatioResponse>> Ratio([FromBody] BudgetRequest request)
{ {
if (request.HospitalId == 0 || request.Year == 0) if (request.HospitalId == 0 || request.Year == 0)
return new ApiResponse<List<BudgetRatioResponse>>(ResponseType.ParameterError, "参数无效"); return new ApiResponse<List<BudgetRatioResponse>>(ResponseType.ParameterError, "参数无效");
...@@ -111,7 +111,7 @@ public ApiResponse<List<BudgetRatioResponse>> Ratio([FromBody]BudgetRequest requ ...@@ -111,7 +111,7 @@ public ApiResponse<List<BudgetRatioResponse>> Ratio([FromBody]BudgetRequest requ
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[Route("result/save")] [Route("result/save")]
public ApiResponse ResultSave([FromBody]List<per_budget_result> request) public ApiResponse ResultSave([FromBody] List<per_budget_result> request)
{ {
var userId = claim.GetUserId(); var userId = claim.GetUserId();
var result = budgetService.SaveBudgetRatio(request, userId); var result = budgetService.SaveBudgetRatio(request, userId);
...@@ -143,5 +143,26 @@ public ApiResponse CancelResult(int id) ...@@ -143,5 +143,26 @@ public ApiResponse CancelResult(int id)
var result = budgetService.CancelResult(id); var result = budgetService.CancelResult(id);
return result ? new ApiResponse(ResponseType.OK, "操作成功") : new ApiResponse(ResponseType.Fail, "操作失败"); return result ? new ApiResponse(ResponseType.OK, "操作成功") : new ApiResponse(ResponseType.Fail, "操作失败");
} }
/// <summary>
/// 统计指定月份绩效信息
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("result/collect")]
public ApiResponse Collect([FromBody] BudgetCollectRequest request)
{
var result = budgetService.Collect(request.HospitalId, request.Year, request.Month);
return new ApiResponse(ResponseType.OK, new
{
result.Year,
result.Month,
result.MedicalIncome,
result.TheNewPerformance,
result.MedicineProportion,
result.MaterialCosts,
});
}
} }
} }
\ No newline at end of file
...@@ -162,6 +162,10 @@ public ApiResponse DeptDetail([FromBody] DeptDetailRequest request) ...@@ -162,6 +162,10 @@ public ApiResponse DeptDetail([FromBody] DeptDetailRequest request)
request.AccountID = accountId; request.AccountID = accountId;
} }
} }
else if (request.AccountID != 0 && request.UnitType == (int)UnitType.特殊核算组)
{
second = _computeService.GetSecondByAccountId(request.AccountID);
}
if (second != null && second.UnitType == UnitType.特殊核算组.ToString()) if (second != null && second.UnitType == UnitType.特殊核算组.ToString())
{ {
...@@ -188,11 +192,56 @@ public ApiResponse AllCompute([FromBody] ComputerRequest request) ...@@ -188,11 +192,56 @@ public ApiResponse AllCompute([FromBody] ComputerRequest request)
if (null == allot) if (null == allot)
throw new PerformanceException("当前绩效记录不存在"); throw new PerformanceException("当前绩效记录不存在");
var isShowManage = _computeService.IsShowManage(request.AllotId); var isShowManage = _computeService.IsShowManage(request.AllotId);
var list = isShowManage == 1 ? _computeService.AllCompute(request.AllotId) : _computeService.AllManageCompute(request.AllotId); //var list = isShowManage == 1
// ? _computeService.AllCompute(request.AllotId)
// : _computeService.AllManageCompute(request.AllotId);
var list = _computeService.AllCompute(request.AllotId, isShowManage);
return new ApiResponse(ResponseType.OK, "ok", list); return new ApiResponse(ResponseType.OK, "ok", list);
} }
/// <summary> /// <summary>
/// 获取全院绩效平均
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("allavg")]
[HttpPost]
public ApiResponse AllComputeAvg([FromBody] ComputerRequest request)
{
var allot = _allotService.GetAllot(request.AllotId);
if (null == allot)
throw new PerformanceException("当前绩效记录不存在");
var isShowManage = _computeService.IsShowManage(request.AllotId);
var list = _computeService.AllCompute(request.AllotId, isShowManage);
List<res_baiscnorm> avgs = new List<res_baiscnorm>();
var gc = list.Where(w => w.UnitType != UnitType.行政高层.ToString());
avgs.Add(new res_baiscnorm
{
PositionName = "不含行政高层人均绩效",
TotelNumber = gc.Select(w => new { w.JobNumber, w.EmployeeName }).Distinct().Count(),
TotelValue = Math.Round(gc.Sum(s => s.RealGiveFee) ?? 0),
AvgValue = gc.Select(p => new { p.JobNumber, p.EmployeeName }).Distinct().Count() == 0
? 0 : Math.Round(gc.Sum(s => s.RealGiveFee) / gc.Select(p => new { p.JobNumber, p.EmployeeName }).Distinct().Count() ?? 0)
});
avgs.AddRange(
list.GroupBy(w => w.UnitType).Select(w => new res_baiscnorm
{
PositionName = $"{w.Key}人均绩效",
TotelNumber = w.Count(),
TotelValue = Math.Round(w.Sum(s => s.RealGiveFee) ?? 0),
AvgValue = gc.Select(p => new { p.JobNumber, p.EmployeeName }).Distinct().Count() == 0
? 0 : Math.Round(gc.Sum(s => s.RealGiveFee) / gc.Select(p => new { p.JobNumber, p.EmployeeName }).Distinct().Count() ?? 0)
}));
return new ApiResponse(ResponseType.OK, "ok", avgs.Select(w => new { w.PositionName, w.TotelNumber, w.TotelValue, w.AvgValue }));
}
/// <summary>
/// 获取全院管理绩效列表 /// 获取全院管理绩效列表
/// </summary> /// </summary>
/// <param name="request"></param> /// <param name="request"></param>
...@@ -204,7 +253,7 @@ public ApiResponse AllManageCompute([FromBody] ComputerRequest request) ...@@ -204,7 +253,7 @@ public ApiResponse AllManageCompute([FromBody] ComputerRequest request)
var allot = _allotService.GetAllot(request.AllotId); var allot = _allotService.GetAllot(request.AllotId);
if (null == allot) if (null == allot)
throw new PerformanceException("当前绩效记录不存在"); throw new PerformanceException("当前绩效记录不存在");
var list = _computeService.AllManageCompute(request.AllotId); var list = _computeService.AllCompute(request.AllotId, 1);
return new ApiResponse(ResponseType.OK, "ok", list); return new ApiResponse(ResponseType.OK, "ok", list);
} }
......
...@@ -320,6 +320,19 @@ public ApiResponse DeleteApr([FromBody] per_apr_amount request) ...@@ -320,6 +320,19 @@ public ApiResponse DeleteApr([FromBody] per_apr_amount request)
} }
/// <summary> /// <summary>
/// 医院其他绩效审核;驳回、成功
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("apr/audit")]
public ApiResponse AuditResult([FromBody] AprAmountAuditRequest request)
{
var userid = claim.GetUserId();
var result = employeeService.ConfirmAudit(userid, request);
return result ? new ApiResponse(ResponseType.OK, "操作成功") : new ApiResponse(ResponseType.Fail, "操作失败");
}
/// <summary>
/// 上传人员绩效文件 /// 上传人员绩效文件
/// </summary> /// </summary>
/// <param name="form"></param> /// <param name="form"></param>
......
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Internal;
using Microsoft.AspNetCore.Mvc;
using Performance.DtoModels;
using Performance.Infrastructure;
using Performance.Services;
namespace Performance.Api.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class HistoryController : ControllerBase
{
private readonly HistoryService historyService;
private readonly ClaimService claim;
private readonly IHostingEnvironment evn;
public HistoryController(
HistoryService historyService,
ClaimService claim,
IHostingEnvironment evn)
{
this.historyService = historyService;
this.claim = claim;
this.evn = evn;
}
/// <summary>
/// 上传历史绩效数据
/// </summary>
/// <param name="form"></param>
/// <returns></returns>
[Route("import")]
[HttpPost]
public ApiResponse Import([FromForm] IFormCollection form)
{
var hospitalid = form.ToDictionary().GetValue("hospitalid", 0);
if (hospitalid <= 0)
return new ApiResponse(ResponseType.Fail, "参数错误", "hospitalid无效");
var file = ((FormFileCollection)form.Files).FirstOrDefault();
if (file == null)
return new ApiResponse(ResponseType.Fail, "参数错误", "文件无效");
var name = $"History_{FileHelper.GetFileNameNoExtension(file.FileName)}{DateTime.Now:yyyyMMddHHmmssfff}";
var ext = FileHelper.GetExtension(file.FileName);
var dpath = Path.Combine(evn.ContentRootPath, "Files", hospitalid.ToString());
FileHelper.CreateDirectory(dpath);
var path = Path.Combine(dpath, $"{name}{ext}");
using (var stream = file.OpenReadStream())
{
byte[] bytes = new byte[stream.Length];
stream.Read(bytes, 0, bytes.Length);
if (!FileHelper.CreateFile(path, bytes))
return new ApiResponse(ResponseType.Fail, $"{file.FileName}上传失败");
}
historyService.ImportHistoryData(hospitalid, path);
return new ApiResponse(ResponseType.OK);
}
}
}
...@@ -145,13 +145,13 @@ public ApiResponse DeleteDeptDic([FromBody] DeptdicResponse request) ...@@ -145,13 +145,13 @@ public ApiResponse DeleteDeptDic([FromBody] DeptdicResponse request)
/// 系统/标准科室字典 /// 系统/标准科室字典
/// </summary> /// </summary>
/// <param name="hospitalId">医院Id</param> /// <param name="hospitalId">医院Id</param>
/// <param name="type">1系统科室 2标准科室 3核算单元</param> /// <param name="type">1系统科室 2标准科室 3核算单元 4行政后勤 5特殊核算组</param>
/// <returns></returns> /// <returns></returns>
[Route("deptdic/{hospitalId}/dict/{type}")] [Route("deptdic/{hospitalId}/dict/{type}")]
[HttpPost] [HttpPost]
public ApiResponse DeptDics(int hospitalId, int type) public ApiResponse DeptDics(int hospitalId, int type)
{ {
if (!new int[] { 1, 2, 3 }.Contains(type)) if (!new int[] { 1, 2, 3, 4, 5 }.Contains(type))
return new ApiResponse(ResponseType.ParameterError, "参数错误!"); return new ApiResponse(ResponseType.ParameterError, "参数错误!");
var result = personService.DeptDics(hospitalId, type); var result = personService.DeptDics(hospitalId, type);
...@@ -169,5 +169,17 @@ public ApiResponse DeptWorkloadDetail([CustomizeValidator(RuleSet = "Select"), F ...@@ -169,5 +169,17 @@ public ApiResponse DeptWorkloadDetail([CustomizeValidator(RuleSet = "Select"), F
var data = personService.DeptWorkloadDetail(request, claimService.GetUserId()); var data = personService.DeptWorkloadDetail(request, claimService.GetUserId());
return new ApiResponse(ResponseType.OK, data); return new ApiResponse(ResponseType.OK, data);
} }
/// <summary>
/// 门诊开单收入详情
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("dept/incomedetail")]
public ApiResponse DeptIncomeDetail([CustomizeValidator(RuleSet = "Select"), FromBody] WorkDetailRequest request)
{
var data = personService.DeptIncomeDetail(request, claimService.GetUserId());
return new ApiResponse(ResponseType.OK, data);
}
} }
} }
...@@ -37,7 +37,7 @@ public ApiResponse Rank([FromBody] HospitalIdRequest request) ...@@ -37,7 +37,7 @@ public ApiResponse Rank([FromBody] HospitalIdRequest request)
{ {
var allots = allotService.GetAllotList(request.HospitalId); var allots = allotService.GetAllotList(request.HospitalId);
int[] states = new int[] { 6, 8 }; int[] states = new int[] { 6, 8, 10 };
var result = allots?.Where(w => states.Contains(w.States)) var result = allots?.Where(w => states.Contains(w.States))
.Select(w => new { w.Year, w.Month }) .Select(w => new { w.Year, w.Month })
.OrderByDescending(w => w.Year) .OrderByDescending(w => w.Year)
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
using Performance.DtoModels; using Performance.DtoModels;
using Performance.EntityModels; using Performance.EntityModels;
using Performance.Services; using Performance.Services;
using Performance.Services.AllotCompute;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -19,12 +20,16 @@ public class SecondAllotController : ControllerBase ...@@ -19,12 +20,16 @@ public class SecondAllotController : ControllerBase
{ {
private readonly ClaimService claimService; private readonly ClaimService claimService;
private readonly SecondAllotService secondAllotService; private readonly SecondAllotService secondAllotService;
private readonly ResultComputeService resultComputeService;
public SecondAllotController(ClaimService claimService, public SecondAllotController(
SecondAllotService secondAllotService) ClaimService claimService,
SecondAllotService secondAllotService,
ResultComputeService resultComputeService)
{ {
this.claimService = claimService; this.claimService = claimService;
this.secondAllotService = secondAllotService; this.secondAllotService = secondAllotService;
this.resultComputeService = resultComputeService;
} }
#region 二次绩效列表、录入数据展示,保存数据 #region 二次绩效列表、录入数据展示,保存数据
...@@ -131,6 +136,30 @@ public ApiResponse SecondDetail([CustomizeValidator(RuleSet = "Refresh"), FromBo ...@@ -131,6 +136,30 @@ public ApiResponse SecondDetail([CustomizeValidator(RuleSet = "Refresh"), FromBo
//} //}
#endregion #endregion
/// <summary>
/// 二次绩效录入页面自动补全
/// </summary>
/// <returns></returns>
[Route("api/second/autocomplete")]
[HttpPost]
public ApiResponse AutoComplete([FromBody] SecondEmpRequest request)
{
var result = secondAllotService.AutoComplete(request, claimService.GetUserId());
return new ApiResponse(ResponseType.OK, result);
}
/// <summary>
/// 二次绩效录入页面其他模板自动补全
/// </summary>
/// <returns></returns>
[Route("api/second/other/autocomplete")]
[HttpPost]
public ApiResponse OtherAutoComplete([FromBody] SecondEmpRequest request)
{
var result = secondAllotService.OtherAutoComplete(request, claimService.GetUserId());
return new ApiResponse(ResponseType.OK, result);
}
#region 模板使用 #region 模板使用
/// <summary> /// <summary>
/// 选择二次绩效模板 /// 选择二次绩效模板
...@@ -302,8 +331,7 @@ public ApiResponse SubmitAudit(SubmitAuditRequest request) ...@@ -302,8 +331,7 @@ public ApiResponse SubmitAudit(SubmitAuditRequest request)
[Route("/api/second/audit/list")] [Route("/api/second/audit/list")]
public ApiResponse<List<ag_secondallot>> AuditList([FromBody] AllotDeptRequest request) public ApiResponse<List<ag_secondallot>> AuditList([FromBody] AllotDeptRequest request)
{ {
var userid = claimService.GetUserId(); var list = secondAllotService.AuditList(request.AllotId);
var list = secondAllotService.AuditList(userid, request.AllotId);
return new ApiResponse<List<ag_secondallot>>(ResponseType.OK, "审核列表", list); return new ApiResponse<List<ag_secondallot>>(ResponseType.OK, "审核列表", list);
} }
...@@ -317,6 +345,36 @@ public ApiResponse AuditResult([FromBody] SecondAuditRequest request) ...@@ -317,6 +345,36 @@ public ApiResponse AuditResult([FromBody] SecondAuditRequest request)
{ {
var userid = claimService.GetUserId(); var userid = claimService.GetUserId();
var result = secondAllotService.ConfirmAudit(userid, request); var result = secondAllotService.ConfirmAudit(userid, request);
if (request.IsPass == 1)
{
resultComputeService.SaveSecondReserved(request.SecondId);
}
return result ? new ApiResponse(ResponseType.OK, "操作成功") : new ApiResponse(ResponseType.Fail, "操作失败");
}
/// <summary>
/// 护理部二次绩效审核列表
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("/api/second/audit/nursingdept/list")]
public ApiResponse<List<ag_secondallot>> NursingDeptlist([FromBody] AllotDeptRequest request)
{
var list = secondAllotService.NursingDeptlist(request.AllotId);
return new ApiResponse<List<ag_secondallot>>(ResponseType.OK, "审核列表", list);
}
/// <summary>
/// 护理部二次绩效审核结果;驳回、成功
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("/api/second/audit/nursingdept/result")]
public ApiResponse NursingDeptAuditResult([FromBody] SecondAuditRequest request)
{
var userid = claimService.GetUserId();
var result = secondAllotService.NursingDeptAudit(userid, request);
return result ? new ApiResponse(ResponseType.OK, "操作成功") : new ApiResponse(ResponseType.Fail, "操作失败"); return result ? new ApiResponse(ResponseType.OK, "操作成功") : new ApiResponse(ResponseType.Fail, "操作失败");
} }
#endregion #endregion
......
...@@ -25,6 +25,7 @@ public class TemplateController : Controller ...@@ -25,6 +25,7 @@ public class TemplateController : Controller
{ {
private readonly TemplateService templateService; private readonly TemplateService templateService;
private readonly DFExtractService extractService; private readonly DFExtractService extractService;
private readonly ExtractIncomeService extractIncomeService;
private HospitalService hospitalService; private HospitalService hospitalService;
private IHostingEnvironment env; private IHostingEnvironment env;
private ClaimService claim; private ClaimService claim;
...@@ -37,6 +38,7 @@ public class TemplateController : Controller ...@@ -37,6 +38,7 @@ public class TemplateController : Controller
public TemplateController(TemplateService templateService, public TemplateController(TemplateService templateService,
HospitalService hospitalService, HospitalService hospitalService,
DFExtractService extractService, DFExtractService extractService,
ExtractIncomeService extractIncomeService,
IHostingEnvironment env, IHostingEnvironment env,
ClaimService claim, ClaimService claim,
IOptions<Application> options, IOptions<Application> options,
...@@ -47,6 +49,7 @@ public class TemplateController : Controller ...@@ -47,6 +49,7 @@ public class TemplateController : Controller
{ {
this.templateService = templateService; this.templateService = templateService;
this.extractService = extractService; this.extractService = extractService;
this.extractIncomeService = extractIncomeService;
this.hospitalService = hospitalService; this.hospitalService = hospitalService;
this.env = env; this.env = env;
this.claim = claim; this.claim = claim;
...@@ -81,6 +84,9 @@ public IActionResult DownFile(int type = 1) ...@@ -81,6 +84,9 @@ public IActionResult DownFile(int type = 1)
case 4: case 4:
path = Path.Combine(env.ContentRootPath, "Template", "医院人员绩效模板.xls"); path = Path.Combine(env.ContentRootPath, "Template", "医院人员绩效模板.xls");
break; break;
case 5:
path = Path.Combine(env.ContentRootPath, "Template", "工作量数据导入模板.xls");
break;
} }
var memoryStream = new MemoryStream(); var memoryStream = new MemoryStream();
...@@ -407,5 +413,24 @@ public ApiResponse Schedule([FromBody] log_dbug request) ...@@ -407,5 +413,24 @@ public ApiResponse Schedule([FromBody] log_dbug request)
var ratio = allotService.AllotLog(allot, 3)?.Max(t => ConvertHelper.TryDecimal(t.Message)) ?? 0; var ratio = allotService.AllotLog(allot, 3)?.Max(t => ConvertHelper.TryDecimal(t.Message)) ?? 0;
return new ApiResponse(ResponseType.OK, new { ratio }); return new ApiResponse(ResponseType.OK, new { ratio });
} }
[Route("extract/income/{allotId}")]
[AllowAnonymous]
[HttpGet]
public IActionResult ExtractIncome(int allotId)
{
string filepath = extractIncomeService.Execture(allotId);
var memoryStream = new MemoryStream();
using (var stream = new FileStream(filepath, FileMode.Open))
{
stream.CopyToAsync(memoryStream).Wait();
}
memoryStream.Seek(0, SeekOrigin.Begin);
string fileExt = Path.GetExtension(filepath);
var provider = new FileExtensionContentTypeProvider();
var memi = provider.Mappings[fileExt];
return File(memoryStream, memi, Path.GetFileName(filepath));
}
} }
} }
\ No newline at end of file
...@@ -63,10 +63,8 @@ public ActionsFilter(ILoggerFactory factory, IMemoryCache cache, IHostingEnviron ...@@ -63,10 +63,8 @@ public ActionsFilter(ILoggerFactory factory, IMemoryCache cache, IHostingEnviron
else else
{ {
var executedContext = await next(); var executedContext = await next();
if (executedContext.Exception != null)
throw executedContext.Exception;
if (executedContext.Result is ObjectResult) if (executedContext.Exception == null && executedContext.Result is ObjectResult)
{ {
_logger.LogInformation("响应结果" + JsonHelper.Serialize(executedContext.Result)); _logger.LogInformation("响应结果" + JsonHelper.Serialize(executedContext.Result));
var objectResult = (ObjectResult)executedContext.Result; var objectResult = (ObjectResult)executedContext.Result;
......
...@@ -81,7 +81,7 @@ public void ConfigureServices(IServiceCollection services) ...@@ -81,7 +81,7 @@ public void ConfigureServices(IServiceCollection services)
json.SerializerSettings.NullValueHandling = Newtonsoft.Json.NullValueHandling.Include; json.SerializerSettings.NullValueHandling = Newtonsoft.Json.NullValueHandling.Include;
json.SerializerSettings.DateFormatHandling = Newtonsoft.Json.DateFormatHandling.MicrosoftDateFormat; json.SerializerSettings.DateFormatHandling = Newtonsoft.Json.DateFormatHandling.MicrosoftDateFormat;
json.SerializerSettings.DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc; json.SerializerSettings.DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc;
json.SerializerSettings.Culture = new CultureInfo("it-IT"); json.SerializerSettings.Culture = new CultureInfo("zh-CN");
json.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore; json.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
}) })
//model验证 //model验证
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
}, },
"Application": { "Application": {
//登录过期时间 //登录过期时间
"ExpirationMinutes": "120", "ExpirationMinutes": "1200",
//验证码过期 //验证码过期
"SmsCodeMinutes": "5", "SmsCodeMinutes": "5",
//护士长二次绩效管理员 //护士长二次绩效管理员
......
...@@ -36,6 +36,8 @@ ...@@ -36,6 +36,8 @@
"DirectorRole": "4", "DirectorRole": "4",
//特殊科室二次绩效管理员 //特殊科室二次绩效管理员
"SpecialRole": "9", "SpecialRole": "9",
//行政科室二次绩效管理员
"OfficeRole": "10",
//邮件指定接收人 //邮件指定接收人
"Receiver": [ "chengxiang.li@suvalue.com", "486035085@qq.com" ], "Receiver": [ "chengxiang.li@suvalue.com", "486035085@qq.com" ],
// 抽取结果Excel文件保存地址 // 抽取结果Excel文件保存地址
......
...@@ -31,6 +31,10 @@ public class Application ...@@ -31,6 +31,10 @@ public class Application
/// </summary> /// </summary>
public int SpecialRole { get; set; } public int SpecialRole { get; set; }
/// <summary> /// <summary>
/// 行政科室二次绩效管理员
/// </summary>
public int OfficeRole { get; set; }
/// <summary>
/// 邮件指定接收人 /// 邮件指定接收人
/// </summary> /// </summary>
public string[] Receiver { get; set; } public string[] Receiver { get; set; }
......
...@@ -70,7 +70,7 @@ public AutoMapperConfigs() ...@@ -70,7 +70,7 @@ public AutoMapperConfigs()
CreateMap<PerData, im_data>() CreateMap<PerData, im_data>()
.ForMember(dest => dest.IsFactor, opt => opt.MapFrom(src => src.IsFactor ? 1 : 2)) .ForMember(dest => dest.IsFactor, opt => opt.MapFrom(src => src.IsFactor ? 1 : 2))
.ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => EnumHelper.GetItems<UnitType>().FirstOrDefault(t => t.Name == src.UnitType).Value)); .ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => EnumHelper.GetItems<UnitType>().FirstOrDefault(t => t.Name == src.UnitType.Replace("行政工勤", "行政后勤")).Value));
CreateMap<im_header, PerHeader>() CreateMap<im_header, PerHeader>()
.ForMember(dest => dest.IsMerge, opt => opt.MapFrom(src => src.IsMerge == 1 ? true : false)); .ForMember(dest => dest.IsMerge, opt => opt.MapFrom(src => src.IsMerge == 1 ? true : false));
...@@ -108,7 +108,7 @@ public AutoMapperConfigs() ...@@ -108,7 +108,7 @@ public AutoMapperConfigs()
//CreateMap<PerDataAccountBaisc, im_accountbasic>(); //CreateMap<PerDataAccountBaisc, im_accountbasic>();
//CreateMap<im_accountbasic, PerDataAccountBaisc>(); //CreateMap<im_accountbasic, PerDataAccountBaisc>();
CreateMap<PerDataAccountBaisc, im_accountbasic>() CreateMap<PerDataAccountBaisc, im_accountbasic>()
.ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => EnumHelper.GetItems<UnitType>().First(t => t.Name == src.UnitType).Value)) .ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => EnumHelper.GetItems<UnitType>().First(t => t.Name == src.UnitType.Replace("行政工勤", "行政后勤")).Value))
.ForMember(dest => dest.DoctorAccountingUnit, opt => opt.MapFrom(src => src.AccountingUnit)) .ForMember(dest => dest.DoctorAccountingUnit, opt => opt.MapFrom(src => src.AccountingUnit))
//.ForMember(dest => dest.Department, opt => opt.MapFrom(src => src.Department)) //.ForMember(dest => dest.Department, opt => opt.MapFrom(src => src.Department))
.ForMember(dest => dest.DoctorDirectorNumber, opt => opt.MapFrom(src => src.ManagerNumber)) .ForMember(dest => dest.DoctorDirectorNumber, opt => opt.MapFrom(src => src.ManagerNumber))
...@@ -116,7 +116,7 @@ public AutoMapperConfigs() ...@@ -116,7 +116,7 @@ public AutoMapperConfigs()
.ForMember(dest => dest.DoctorBasicFactor, opt => opt.MapFrom(src => src.BasicFactor)) .ForMember(dest => dest.DoctorBasicFactor, opt => opt.MapFrom(src => src.BasicFactor))
//.ForMember(dest => dest.DoctorSlopeFactor, opt => opt.MapFrom(src => src.SlopeFactor)) //.ForMember(dest => dest.DoctorSlopeFactor, opt => opt.MapFrom(src => src.SlopeFactor))
.ForMember(dest => dest.DoctorOtherPerfor1, opt => opt.MapFrom(src => src.OtherPerfor1)) .ForMember(dest => dest.DoctorOtherPerfor1, opt => opt.MapFrom(src => src.OtherPerfor1))
.ForMember(dest => dest.DoctorOtherPerfor2, opt => opt.MapFrom(src => src.OtherPerfor2)) //.ForMember(dest => dest.DoctorOtherPerfor2, opt => opt.MapFrom(src => src.OtherPerfor2))
//.ForMember(dest => dest.DoctorExtra, opt => opt.MapFrom(src => src.Extra)) //.ForMember(dest => dest.DoctorExtra, opt => opt.MapFrom(src => src.Extra))
.ForMember(dest => dest.DoctorScoringAverage, opt => opt.MapFrom(src => src.ScoringAverage)) .ForMember(dest => dest.DoctorScoringAverage, opt => opt.MapFrom(src => src.ScoringAverage))
.ForMember(dest => dest.DoctorAdjustFactor, opt => opt.MapFrom(src => src.AdjustFactor)) .ForMember(dest => dest.DoctorAdjustFactor, opt => opt.MapFrom(src => src.AdjustFactor))
...@@ -150,7 +150,7 @@ public AutoMapperConfigs() ...@@ -150,7 +150,7 @@ public AutoMapperConfigs()
CreateMap<res_account, PerDataAccountBaisc>() CreateMap<res_account, PerDataAccountBaisc>()
.ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => src.UnitType.HasValue ? ((UnitType)src.UnitType).ToString() : "")); .ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => src.UnitType.HasValue ? ((UnitType)src.UnitType).ToString() : ""));
CreateMap<PerDataAccountBaisc, res_account>() CreateMap<PerDataAccountBaisc, res_account>()
.ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => string.IsNullOrEmpty(src.UnitType) ? -1 : EnumHelper.GetItems<UnitType>().First(t => t.Name == src.UnitType).Value)); .ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => string.IsNullOrEmpty(src.UnitType) ? -1 : EnumHelper.GetItems<UnitType>().First(t => t.Name == src.UnitType.Replace("行政工勤", "行政后勤")).Value));
//CreateMap<PerDataAccountBaisc, res_accountnurse>(); //CreateMap<PerDataAccountBaisc, res_accountnurse>();
//CreateMap<res_accountdoctor, ComputeSource>(); //CreateMap<res_accountdoctor, ComputeSource>();
...@@ -229,6 +229,21 @@ public AutoMapperConfigs() ...@@ -229,6 +229,21 @@ public AutoMapperConfigs()
CreateMap<res_compute, SecondPerforResponse>() CreateMap<res_compute, SecondPerforResponse>()
.ReverseMap(); .ReverseMap();
CreateMap<HistoryData, report_original_persontime>()
.ForMember(dest => dest.PersonTime, opt => opt.MapFrom(src => src.ResultData))
.ReverseMap();
CreateMap<HistoryData, report_original_stays>()
.ForMember(dest => dest.Stays, opt => opt.MapFrom(src => src.ResultData))
.ReverseMap();
CreateMap<HistoryData, report_original_surgery>()
.ForMember(dest => dest.PersonTime, opt => opt.MapFrom(src => src.ResultData))
.ReverseMap();
}
public void xx()
{
} }
} }
} }
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class HistoryData
{
/// <summary>
/// 年
/// </summary>
public int Year { get; set; }
/// <summary>
/// 月
/// </summary>
public int Month { get; set; }
/// <summary>
/// 医院ID
/// </summary>
public int HospitalID { get; set; }
/// <summary>
///
/// </summary>
public string SourceType { get; set; }
/// <summary>
/// 科室核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 科室
/// </summary>
public string Department { get; set; }
/// <summary>
/// 结果值
/// </summary>
public Nullable<decimal> ResultData { get; set; }
public string SheetName { get; set; }
}
}
...@@ -42,6 +42,11 @@ public class ComputeEmployee ...@@ -42,6 +42,11 @@ public class ComputeEmployee
public Nullable<decimal> BasicNorm { get; set; } public Nullable<decimal> BasicNorm { get; set; }
/// <summary> /// <summary>
/// 其他管理绩效
/// </summary>
public Nullable<decimal> OtherManagePerfor { get; set; }
/// <summary>
/// 医生姓名 /// 医生姓名
/// </summary> /// </summary>
public string DoctorName { get; set; } public string DoctorName { get; set; }
...@@ -77,11 +82,26 @@ public class ComputeEmployee ...@@ -77,11 +82,26 @@ public class ComputeEmployee
//public Nullable<DateTime> WorkTime { get; set; } //public Nullable<DateTime> WorkTime { get; set; }
/// <summary> /// <summary>
/// 考核前其他绩效
/// </summary>
public Nullable<decimal> AssessBeforeOtherFee { get; set; }
/// <summary>
/// 考核得分率 /// 考核得分率
/// </summary> /// </summary>
public Nullable<decimal> ScoreAverageRate { get; set; } public Nullable<decimal> ScoreAverageRate { get; set; }
/// <summary> /// <summary>
/// 考核后其他绩效
/// </summary>
public Nullable<decimal> AssessLaterOtherFee { get; set; }
/// <summary>
/// 调节后其他绩效
/// </summary>
public Nullable<decimal> AdjustLaterOtherFee { get; set; }
/// <summary>
/// 出勤率 /// 出勤率
/// </summary> /// </summary>
public Nullable<decimal> Attendance { get; set; } public Nullable<decimal> Attendance { get; set; }
...@@ -135,5 +155,10 @@ public class ComputeEmployee ...@@ -135,5 +155,10 @@ public class ComputeEmployee
/// 管理绩效发放系数 /// 管理绩效发放系数
/// </summary> /// </summary>
public Nullable<decimal> Management { get; set; } public Nullable<decimal> Management { get; set; }
/// <summary>
/// 夜班费
/// </summary>
public Nullable<decimal> NightWorkPerfor { get; set; }
} }
} }
...@@ -21,12 +21,22 @@ public class ComputeResult ...@@ -21,12 +21,22 @@ public class ComputeResult
public string FitPeople { get; set; } public string FitPeople { get; set; }
/// <summary> /// <summary>
/// 绩效基础核算参考值
/// </summary>
public Nullable<decimal> FitPeopleValue { get; set; }
/// <summary>
/// 绩效基数核算参考对象取值比例(如临床科室护士*95%)
/// </summary>
public Nullable<decimal> FitPeopleRatio { get; set; }
/// <summary>
/// 人员姓名 /// 人员姓名
/// </summary> /// </summary>
public string EmployeeName { get; set; } public string EmployeeName { get; set; }
/// <summary> /// <summary>
/// 绩效合计(来自科室经济测算表) /// 绩效合计 考核前(来自科室经济测算表)
/// </summary> /// </summary>
public Nullable<decimal> PerforTotal { get; set; } public Nullable<decimal> PerforTotal { get; set; }
...@@ -66,16 +76,31 @@ public class ComputeResult ...@@ -66,16 +76,31 @@ public class ComputeResult
public Nullable<decimal> ShouldGiveFee { get; set; } public Nullable<decimal> ShouldGiveFee { get; set; }
/// <summary> /// <summary>
/// 绩效合计(需计算) /// 绩效合计 考核前(需计算)
/// </summary> /// </summary>
public Nullable<decimal> PerforSumFee { get; set; } public Nullable<decimal> PerforSumFee { get; set; }
/// <summary> /// <summary>
/// 考核对分率(来自人员名单) /// 考核前其他绩效
/// </summary>
public Nullable<decimal> AssessBeforeOtherFee { get; set; }
/// <summary>
/// 考核得分率
/// </summary> /// </summary>
public Nullable<decimal> ScoreAverageRate { get; set; } public Nullable<decimal> ScoreAverageRate { get; set; }
/// <summary> /// <summary>
/// 考核后其他绩效
/// </summary>
public Nullable<decimal> AssessLaterOtherFee { get; set; }
/// <summary>
/// 调节后其他绩效
/// </summary>
public Nullable<decimal> AdjustLaterOtherFee { get; set; }
/// <summary>
/// 出勤率(来自人员名单) /// 出勤率(来自人员名单)
/// </summary> /// </summary>
public Nullable<decimal> Attendance { get; set; } public Nullable<decimal> Attendance { get; set; }
...@@ -86,12 +111,17 @@ public class ComputeResult ...@@ -86,12 +111,17 @@ public class ComputeResult
public Nullable<decimal> Punishment { get; set; } public Nullable<decimal> Punishment { get; set; }
/// <summary> /// <summary>
/// 其他管理绩效
/// </summary>
public Nullable<decimal> OtherManagePerfor { get; set; }
/// <summary>
/// 其他绩效(来自人员名单) /// 其他绩效(来自人员名单)
/// </summary> /// </summary>
public Nullable<decimal> OtherPerfor { get; set; } public Nullable<decimal> OtherPerfor { get; set; }
/// <summary> /// <summary>
/// 应发绩效(需计算) /// 应发绩效 考核前(需计算)
/// </summary> /// </summary>
public Nullable<decimal> GiveFee { get; set; } public Nullable<decimal> GiveFee { get; set; }
...@@ -158,5 +188,10 @@ public class ComputeResult ...@@ -158,5 +188,10 @@ public class ComputeResult
/// 效率绩效人数 /// 效率绩效人数
/// </summary> /// </summary>
public Nullable<decimal> PermanentStaff { get; set; } public Nullable<decimal> PermanentStaff { get; set; }
/// <summary>
/// 夜班费
/// </summary>
public Nullable<decimal> NightWorkPerfor { get; set; }
} }
} }
...@@ -37,8 +37,8 @@ public enum UnitType ...@@ -37,8 +37,8 @@ public enum UnitType
行政高层 = 10, 行政高层 = 10,
[Description("行政中层")] [Description("行政中层")]
行政中层 = 11, 行政中层 = 11,
[Description("行政勤")] [Description("行政勤")]
行政 = 12, 行政 = 12,
} }
public enum SheetType public enum SheetType
...@@ -114,6 +114,23 @@ public enum SheetType ...@@ -114,6 +114,23 @@ public enum SheetType
/// <summary> 行政后勤 </summary> /// <summary> 行政后勤 </summary>
[Description("行政后勤")] [Description("行政后勤")]
LogisticsEmployee = 21, LogisticsEmployee = 21,
/// <summary> 科室材料考核 </summary>
[Description("科室考核")]
AccountScoreAverage = 25,
/// <summary> 科室调节后其他绩效 </summary>
[Description("科室调节后其他绩效")]
AccountAdjustLaterOtherFee = 26,
/// <summary> 业务中层行政中高层调节后其他绩效 </summary>
[Description("业务中层行政中高层调节后其他绩效")]
PersonAdjustLaterOtherFee = 27,
/// <summary> 其他工作量(不参与核算) </summary>
[Description("其他工作量")]
OtherWorkload = 28,
} }
/// <summary> /// <summary>
......
...@@ -64,9 +64,14 @@ public class PerDataAccountBaisc : IPerData ...@@ -64,9 +64,14 @@ public class PerDataAccountBaisc : IPerData
public decimal OtherPerfor1 { get; set; } public decimal OtherPerfor1 { get; set; }
/// <summary> /// <summary>
/// 其他绩效2 /// 考核前其他绩效
/// </summary> /// </summary>
public decimal OtherPerfor2 { get; set; } public Nullable<decimal> AssessBeforeOtherFee { get; set; }
///// <summary>
///// 其他绩效2
///// </summary>
//public decimal OtherPerfor2 { get; set; }
/// <summary> /// <summary>
/// 药占比奖罚 /// 药占比奖罚
...@@ -89,11 +94,21 @@ public class PerDataAccountBaisc : IPerData ...@@ -89,11 +94,21 @@ public class PerDataAccountBaisc : IPerData
public decimal ScoringAverage { get; set; } public decimal ScoringAverage { get; set; }
/// <summary> /// <summary>
/// 考核后其他绩效
/// </summary>
public Nullable<decimal> AssessLaterOtherFee { get; set; }
/// <summary>
/// 调节系数 /// 调节系数
/// </summary> /// </summary>
public decimal AdjustFactor { get; set; } public decimal AdjustFactor { get; set; }
/// <summary> /// <summary>
/// 调节后其他绩效
/// </summary>
public Nullable<decimal> AdjustLaterOtherFee { get; set; }
/// <summary>
/// 规模绩效系数 /// 规模绩效系数
/// </summary> /// </summary>
public decimal Scale { get; set; } public decimal Scale { get; set; }
...@@ -153,11 +168,16 @@ public class PerDataAccountBaisc : IPerData ...@@ -153,11 +168,16 @@ public class PerDataAccountBaisc : IPerData
public Nullable<decimal> WorkloadFee { get; set; } public Nullable<decimal> WorkloadFee { get; set; }
/// <summary> /// <summary>
/// 绩效合计 /// 绩效合计 考核前
/// </summary> /// </summary>
public Nullable<decimal> PerforTotal { get; set; } public Nullable<decimal> PerforTotal { get; set; }
/// <summary> /// <summary>
/// 绩效合计 考核后
/// </summary>
public Nullable<decimal> AssessLaterPerforTotal { get; set; }
/// <summary>
/// 人均绩效 /// 人均绩效
/// </summary> /// </summary>
public Nullable<decimal> Avg { get; set; } public Nullable<decimal> Avg { get; set; }
......
...@@ -37,6 +37,11 @@ public class PerDataClinicEmployee : IPerData ...@@ -37,6 +37,11 @@ public class PerDataClinicEmployee : IPerData
public string JobTitle { get; set; } public string JobTitle { get; set; }
/// <summary> /// <summary>
/// 实际人均绩效
/// </summary>
public Nullable<decimal> FitPeopleValue { get; set; }
/// <summary>
/// 基础绩效系数 /// 基础绩效系数
/// </summary> /// </summary>
public Nullable<decimal> Basics { get; set; } public Nullable<decimal> Basics { get; set; }
...@@ -72,11 +77,21 @@ public class PerDataClinicEmployee : IPerData ...@@ -72,11 +77,21 @@ public class PerDataClinicEmployee : IPerData
//public Nullable<DateTime> WorkTime { get; set; } //public Nullable<DateTime> WorkTime { get; set; }
/// <summary> /// <summary>
/// 考核前其他绩效
/// </summary>
public Nullable<decimal> AssessBeforeOtherFee { get; set; }
/// <summary>
/// 考核得分率 /// 考核得分率
/// </summary> /// </summary>
public Nullable<decimal> ScoreAverageRate { get; set; } public Nullable<decimal> ScoreAverageRate { get; set; }
/// <summary> /// <summary>
/// 考核后其他绩效
/// </summary>
public Nullable<decimal> AssessLaterOtherFee { get; set; }
/// <summary>
/// 出勤率 /// 出勤率
/// </summary> /// </summary>
public Nullable<decimal> Attendance { get; set; } public Nullable<decimal> Attendance { get; set; }
...@@ -84,12 +99,17 @@ public class PerDataClinicEmployee : IPerData ...@@ -84,12 +99,17 @@ public class PerDataClinicEmployee : IPerData
/// <summary> /// <summary>
/// 其他管理绩效 /// 其他管理绩效
/// </summary> /// </summary>
public Nullable<decimal> OtheManagementPerfor { get; set; } public Nullable<decimal> OtherManagePerfor { get; set; }
/// <summary>
/// 其他绩效
/// </summary>
public Nullable<decimal> OthePerfor { get; set; }
///// <summary> ///// <summary>
///// 其他绩效 ///// 夜班费
///// </summary> ///// </summary>
//public Nullable<decimal> OthePerfor { get; set; } //public Nullable<decimal> NightWorkPerfor { get; set; }
///// <summary> ///// <summary>
///// 医院奖罚 ///// 医院奖罚
...@@ -102,6 +122,11 @@ public class PerDataClinicEmployee : IPerData ...@@ -102,6 +122,11 @@ public class PerDataClinicEmployee : IPerData
public Nullable<decimal> Adjust { get; set; } public Nullable<decimal> Adjust { get; set; }
/// <summary> /// <summary>
/// 调节后其他绩效
/// </summary>
public Nullable<decimal> AdjustLaterOtherFee { get; set; }
/// <summary>
/// 行号 /// 行号
/// </summary> /// </summary>
public int RowNumber { get; set; } public int RowNumber { get; set; }
......
...@@ -62,11 +62,26 @@ public class PerDataEmployee : IPerData ...@@ -62,11 +62,26 @@ public class PerDataEmployee : IPerData
//public Nullable<DateTime> WorkTime { get; set; } //public Nullable<DateTime> WorkTime { get; set; }
/// <summary> /// <summary>
/// 夜班费
/// </summary>
public Nullable<decimal> NightWorkPerfor { get; set; }
/// <summary>
/// 考核前其他绩效
/// </summary>
public Nullable<decimal> AssessBeforeOtherFee { get; set; }
/// <summary>
/// 考核得分率 /// 考核得分率
/// </summary> /// </summary>
public Nullable<decimal> ScoreAverageRate { get; set; } public Nullable<decimal> ScoreAverageRate { get; set; }
/// <summary> /// <summary>
/// 考核后其他绩效
/// </summary>
public Nullable<decimal> AssessLaterOtherFee { get; set; }
/// <summary>
/// 出勤率 /// 出勤率
/// </summary> /// </summary>
public Nullable<decimal> Attendance { get; set; } public Nullable<decimal> Attendance { get; set; }
...@@ -91,6 +106,11 @@ public class PerDataEmployee : IPerData ...@@ -91,6 +106,11 @@ public class PerDataEmployee : IPerData
/// </summary> /// </summary>
public Nullable<decimal> Adjust { get; set; } public Nullable<decimal> Adjust { get; set; }
/// <summary>
/// 调节后其他绩效
/// </summary>
public Nullable<decimal> AdjustLaterOtherFee { get; set; }
///// <summary> ///// <summary>
///// 发放系数 ///// 发放系数
///// </summary> ///// </summary>
......
...@@ -34,7 +34,7 @@ public class PerDataLogisticsEmployee : IPerData ...@@ -34,7 +34,7 @@ public class PerDataLogisticsEmployee : IPerData
/// <summary> /// <summary>
/// 人员工号 /// 人员工号
/// </summary> /// </summary>
public string JobNumber { get; set; } public string PersonnelNumber { get; set; }
/// <summary> /// <summary>
/// 姓名 /// 姓名
...@@ -62,6 +62,11 @@ public class PerDataLogisticsEmployee : IPerData ...@@ -62,6 +62,11 @@ public class PerDataLogisticsEmployee : IPerData
public Nullable<decimal> OthePerfor { get; set; } public Nullable<decimal> OthePerfor { get; set; }
/// <summary> /// <summary>
/// 调节后其他绩效
/// </summary>
public Nullable<decimal> AdjustLaterOtherFee { get; set; }
/// <summary>
/// 行号 /// 行号
/// </summary> /// </summary>
public int RowNumber { get; set; } public int RowNumber { get; set; }
......
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class AprAmountAuditRequest
{
/// <summary> 二次绩效Id </summary>
public int[] Id { get; set; }
/// <summary> 审核结果 1、审核通过 2、驳回 </summary>
public int IsPass { get; set; }
/// <summary> 备注 </summary>
public string Remark { get; set; }
}
public class AprAmountAuditRequestValidator : AbstractValidator<AprAmountAuditRequest>
{
public AprAmountAuditRequestValidator()
{
RuleFor(x => x.IsPass).NotNull().NotEmpty().InclusiveBetween(1, 2);
}
}
}
...@@ -10,4 +10,8 @@ public class BudgetRequest ...@@ -10,4 +10,8 @@ public class BudgetRequest
public int Year { get; set; } public int Year { get; set; }
} }
public class BudgetCollectRequest : BudgetRequest
{
public int Month { get; set; }
}
} }
...@@ -29,6 +29,11 @@ public class DeptDetailRequest ...@@ -29,6 +29,11 @@ public class DeptDetailRequest
/// 汇总ID /// 汇总ID
/// </summary> /// </summary>
public int AccountID { get; set; } public int AccountID { get; set; }
/// <summary>
/// 核算单元类型
/// </summary>
public int UnitType { get; set; }
} }
public class DetailRequestValidator : AbstractValidator<DeptDetailRequest> public class DetailRequestValidator : AbstractValidator<DeptDetailRequest>
{ {
......
...@@ -55,6 +55,10 @@ public class HospitalRequest ...@@ -55,6 +55,10 @@ public class HospitalRequest
/// 是否显示绩效合计 1 显示绩效合计 2 显示管理绩效 /// 是否显示绩效合计 1 显示绩效合计 2 显示管理绩效
/// </summary> /// </summary>
public Nullable<int> IsShowManage { get; set; } public Nullable<int> IsShowManage { get; set; }
/// <summary>
/// 是否开启科室CMI占比 1 启用 2 禁用
/// </summary>
public Nullable<int> IsOpenCMIPercent { get; set; }
} }
public class HospitalRequestValidator : AbstractValidator<HospitalRequest> public class HospitalRequestValidator : AbstractValidator<HospitalRequest>
......
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class ReservedRequest
{
public int HospitalId { get; set; }
public int Year { get; set; }
}
}
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class SecondEmpRequest
{
public int TempId { get; set; }
public int SecondId { get; set; }
public string EmployeeName { get; set; }
public string JobNumber { get; set; }
}
public class SecondEmpRequestValidator : AbstractValidator<SecondEmpRequest>
{
public SecondEmpRequestValidator()
{
RuleFor(x => x.TempId).NotNull().GreaterThan(0);
RuleFor(x => x.SecondId).NotNull().GreaterThan(0);
}
}
}
...@@ -79,7 +79,7 @@ public UserRequestValidator() ...@@ -79,7 +79,7 @@ public UserRequestValidator()
action(); action();
RuleFor(x => x.ID).NotNull().NotEmpty().GreaterThan(0); RuleFor(x => x.ID).NotNull().NotEmpty().GreaterThan(0);
RuleFor(x => x.States).InclusiveBetween(1, 2); RuleFor(x => x.States).InclusiveBetween(1, 2);
RuleFor(x => x.Password).Length(4, 20); //RuleFor(x => x.Password).Length(4, 20);
RuleFor(x => x.Role).NotNull().NotEmpty().GreaterThan(0); RuleFor(x => x.Role).NotNull().NotEmpty().GreaterThan(0);
RuleFor(x => x.HosIDArray).NotNull().NotEmpty().Must(f => f.Length > 0); RuleFor(x => x.HosIDArray).NotNull().NotEmpty().Must(f => f.Length > 0);
}); });
......
...@@ -8,6 +8,7 @@ namespace Performance.DtoModels ...@@ -8,6 +8,7 @@ namespace Performance.DtoModels
public class WorkDetailRequest public class WorkDetailRequest
{ {
public int AllotId { get; set; } public int AllotId { get; set; }
public int SecondId { get; set; }
public string AccountingUnit { get; set; } public string AccountingUnit { get; set; }
} }
...@@ -19,6 +20,7 @@ public WorkDetailRequestValidator() ...@@ -19,6 +20,7 @@ public WorkDetailRequestValidator()
RuleSet("Select", () => RuleSet("Select", () =>
{ {
RuleFor(x => x.AllotId).NotNull().NotEmpty().GreaterThan(0); RuleFor(x => x.AllotId).NotNull().NotEmpty().GreaterThan(0);
RuleFor(x => x.SecondId).NotNull().NotEmpty().GreaterThan(0);
RuleFor(x => x.AccountingUnit).NotNull().NotEmpty(); RuleFor(x => x.AccountingUnit).NotNull().NotEmpty();
}); });
} }
......
...@@ -6,11 +6,24 @@ namespace Performance.DtoModels ...@@ -6,11 +6,24 @@ namespace Performance.DtoModels
{ {
public class ComputeResponse public class ComputeResponse
{ {
public ComputeResponse() { }
public ComputeResponse(string source, string accountingUnit, string employeeName, string jobNumber, string jobTitle)
{
Source = source;
AccountingUnit = accountingUnit;
EmployeeName = employeeName;
JobNumber = jobNumber;
JobTitle = jobTitle;
}
/// <summary> /// <summary>
/// 来源 /// 来源
/// </summary> /// </summary>
public string Source { get; set; } public string Source { get; set; }
public string UnitType { get; set; }
/// <summary> /// <summary>
/// 核算单元 /// 核算单元
/// </summary> /// </summary>
...@@ -32,8 +45,43 @@ public class ComputeResponse ...@@ -32,8 +45,43 @@ public class ComputeResponse
public string JobTitle { get; set; } public string JobTitle { get; set; }
/// <summary> /// <summary>
/// 业绩绩效
/// </summary>
public Nullable<decimal> PerforSumFee { get; set; }
/// <summary>
/// 管理绩效
/// </summary>
public Nullable<decimal> PerforManagementFee { get; set; }
/// <summary>
/// 应发小计
/// </summary>
public Nullable<decimal> ShouldGiveFee { get; set; }
/// <summary>
/// 医院其他绩效
/// </summary>
public Nullable<decimal> OthePerfor { get; set; }
/// <summary>
/// 夜班费
/// </summary>
public Nullable<decimal> NightWorkPerfor { get; set; }
/// <summary>
/// 实发绩效 /// 实发绩效
/// </summary> /// </summary>
public Nullable<decimal> RealGiveFee { get; set; } public Nullable<decimal> RealGiveFee { get; set; }
/// <summary>
/// 预留比例
/// </summary>
public Nullable<decimal> ReservedRatio { get; set; }
/// <summary>
/// 预留比例金额
/// </summary>
public Nullable<decimal> ReservedRatioFee { get; set; }
} }
} }
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
/// <summary>
/// 查看科室绩效详情
/// </summary>
public class DeptIncomeResponse
{
public string Department { get; set; }
public string DoctorName { get; set; }
public string PersonnelNumber { get; set; }
public string Category { get; set; }
public decimal Fee { get; set; }
}
}
...@@ -147,5 +147,18 @@ public class DeptResponse ...@@ -147,5 +147,18 @@ public class DeptResponse
/// 备注 /// 备注
/// </summary> /// </summary>
public string Remark { get; set; } public string Remark { get; set; }
/// <summary>
/// 考核前其他绩效
/// </summary>
public Nullable<decimal> AssessBeforeOtherFee { get; set; }
/// <summary>
/// 考核后其他绩效
/// </summary>
public Nullable<decimal> AssessLaterOtherFee { get; set; }
/// <summary>
/// 调节后其他绩效
/// </summary>
public Nullable<decimal> AdjustLaterOtherFee { get; set; }
} }
} }
...@@ -15,6 +15,8 @@ public class DeptdicResponse ...@@ -15,6 +15,8 @@ public class DeptdicResponse
public Deptdic InpatDoctorAccounting { get; set; } public Deptdic InpatDoctorAccounting { get; set; }
public Deptdic InpatNurseAccounting { get; set; } public Deptdic InpatNurseAccounting { get; set; }
public Deptdic InpatTechnicAccounting { get; set; } public Deptdic InpatTechnicAccounting { get; set; }
public Deptdic LogisticsAccounting { get; set; }
public Deptdic SpecialAccounting { get; set; }
public DateTime? CreateTime { get; set; } public DateTime? CreateTime { get; set; }
} }
......
...@@ -19,5 +19,13 @@ public class HospitalResponse ...@@ -19,5 +19,13 @@ public class HospitalResponse
public int IsOpenIncome { get; set; } public int IsOpenIncome { get; set; }
public int IsOpenDirector { get; set; } public int IsOpenDirector { get; set; }
public int IsShowManage { get; set; } public int IsShowManage { get; set; }
/// <summary>
/// 是否开启科室CMI占比 1 启用 2 禁用
/// </summary>
public int IsOpenCMIPercent { get; set; }
/// <summary>
/// 是否开启护理部审核 1 启用 2 禁用
/// </summary>
public int IsOpenNursingDeptAudit { get; set; }
} }
} }
...@@ -30,6 +30,8 @@ public class ResComputeResponse ...@@ -30,6 +30,8 @@ public class ResComputeResponse
/// 绩效基数核算参考对象 /// 绩效基数核算参考对象
/// </summary> /// </summary>
public string FitPeople { get; set; } public string FitPeople { get; set; }
public string FitPeopleValue { get; set; }
public string FitPeopleRatio { get; set; }
/// <summary> /// <summary>
/// 人员姓名 /// 人员姓名
...@@ -72,6 +74,11 @@ public class ResComputeResponse ...@@ -72,6 +74,11 @@ public class ResComputeResponse
public Nullable<decimal> Scale { get; set; } public Nullable<decimal> Scale { get; set; }
/// <summary> /// <summary>
/// 其他管理绩效
/// </summary>
public Nullable<decimal> OtherManagePerfor { get; set; }
/// <summary>
/// 岗位系数 /// 岗位系数
/// </summary> /// </summary>
public Nullable<decimal> PostCoefficient { get; set; } public Nullable<decimal> PostCoefficient { get; set; }
...@@ -165,5 +172,30 @@ public class ResComputeResponse ...@@ -165,5 +172,30 @@ public class ResComputeResponse
/// 效率绩效人数 /// 效率绩效人数
/// </summary> /// </summary>
public Nullable<decimal> PermanentStaff { get; set; } public Nullable<decimal> PermanentStaff { get; set; }
/// <summary>
/// 夜班费
/// </summary>
public Nullable<decimal> NightWorkPerfor { get; set; }
/// <summary>
/// 医院其他绩效
/// </summary>
public Nullable<decimal> OtherPerformance { get; set; }
/// <summary>
/// 考核前其他绩效
/// </summary>
public Nullable<decimal> AssessBeforeOtherFee { get; set; }
/// <summary>
/// 考核后其他绩效
/// </summary>
public Nullable<decimal> AssessLaterOtherFee { get; set; }
/// <summary>
/// 调节后其他绩效
/// </summary>
public Nullable<decimal> AdjustLaterOtherFee { get; set; }
} }
} }
...@@ -150,6 +150,9 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options) ...@@ -150,6 +150,9 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
public virtual DbSet<rep_report> rep_report { get; set; } public virtual DbSet<rep_report> rep_report { get; set; }
/// <summary> 条件表 </summary> /// <summary> 条件表 </summary>
public virtual DbSet<rep_selection> rep_selection { get; set; } public virtual DbSet<rep_selection> rep_selection { get; set; }
public virtual DbSet<report_original_surgery> report_original_surgery { get; set; }
public virtual DbSet<report_original_stays> report_original_stays { get; set; }
public virtual DbSet<report_original_persontime> report_original_persontime { get; set; }
/// <summary> 科室核算结果 </summary> /// <summary> 科室核算结果 </summary>
public virtual DbSet<res_account> res_account { get; set; } public virtual DbSet<res_account> res_account { get; set; }
/// <summary> 医生科室核算结果 </summary> /// <summary> 医生科室核算结果 </summary>
...@@ -161,6 +164,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options) ...@@ -161,6 +164,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
/// <summary> </summary> /// <summary> </summary>
public virtual DbSet<res_compute> res_compute { get; set; } public virtual DbSet<res_compute> res_compute { get; set; }
/// <summary> </summary> /// <summary> </summary>
public virtual DbSet<res_reserved> res_reserved { get; set; }
/// <summary> </summary>
public virtual DbSet<res_specialunit> res_specialunit { get; set; } public virtual DbSet<res_specialunit> res_specialunit { get; set; }
/// <summary> 医院数据提取脚本 </summary> /// <summary> 医院数据提取脚本 </summary>
public virtual DbSet<sys_extract> sys_extract { get; set; } public virtual DbSet<sys_extract> sys_extract { get; set; }
......
...@@ -30,6 +30,7 @@ public class ag_compute ...@@ -30,6 +30,7 @@ public class ag_compute
/// 二次绩效ID /// 二次绩效ID
/// </summary> /// </summary>
public Nullable<int> SecondId { get; set; } public Nullable<int> SecondId { get; set; }
public string UnitType { get; set; }
/// <summary> /// <summary>
/// 科室 /// 科室
...@@ -52,6 +53,21 @@ public class ag_compute ...@@ -52,6 +53,21 @@ public class ag_compute
public string PersonName { get; set; } public string PersonName { get; set; }
/// <summary> /// <summary>
/// 可分配绩效
/// </summary>
public Nullable<decimal> PerforSumFee { get; set; }
/// <summary>
/// 医院其他绩效
/// </summary>
public Nullable<decimal> OthePerfor { get; set; }
/// <summary>
/// 实发绩效工资金额
/// </summary>
public Nullable<decimal> NightWorkPerfor { get; set; }
/// <summary>
/// 实发金额 /// 实发金额
/// </summary> /// </summary>
public Nullable<decimal> RealGiveFee { get; set; } public Nullable<decimal> RealGiveFee { get; set; }
......
...@@ -80,5 +80,15 @@ public class ag_othersource ...@@ -80,5 +80,15 @@ public class ag_othersource
/// 实发绩效工资金额 /// 实发绩效工资金额
/// </summary> /// </summary>
public Nullable<decimal> RealAmount { get; set; } public Nullable<decimal> RealAmount { get; set; }
/// <summary>
/// 预留比例
/// </summary>
public Nullable<decimal> ReservedRatio { get; set; }
/// <summary>
/// 预留金额
/// </summary>
public Nullable<decimal> ReservedAmount { get; set; }
} }
} }
...@@ -85,5 +85,25 @@ public class ag_secondallot ...@@ -85,5 +85,25 @@ public class ag_secondallot
/// 备注 /// 备注
/// </summary> /// </summary>
public string Remark { get; set; } public string Remark { get; set; }
/// <summary>
/// 护理部审核状态 1 未提交 2 等待审核 3 审核通过 4 驳回
/// </summary>
public Nullable<int> NursingDeptStatus { get; set; }
/// <summary>
/// 护理部审核时间
/// </summary>
public Nullable<DateTime> NursingDeptAuditTime { get; set; }
/// <summary>
/// 护理部审核人
/// </summary>
public Nullable<int> NursingDeptAuditUser { get; set; }
/// <summary>
/// 护理部备注
/// </summary>
public string NursingDeptRemark { get; set; }
} }
} }
...@@ -37,6 +37,11 @@ public class ex_script ...@@ -37,6 +37,11 @@ public class ex_script
public int TypeId { get; set; } public int TypeId { get; set; }
/// <summary> /// <summary>
/// 配置Id
/// </summary>
public int ConfigId { get; set; }
/// <summary>
/// 是否可用 1 可用 2 不可用 /// 是否可用 1 可用 2 不可用
/// </summary> /// </summary>
public int IsEnable { get; set; } public int IsEnable { get; set; }
......
...@@ -141,70 +141,70 @@ public class im_accountbasic ...@@ -141,70 +141,70 @@ public class im_accountbasic
/// </summary> /// </summary>
public Nullable<decimal> MinimumFactor { get; set; } public Nullable<decimal> MinimumFactor { get; set; }
/// <summary> ///// <summary>
/// 护士长人数 ///// 护士长人数
/// </summary> ///// </summary>
public Nullable<decimal> NurseHeadNumber { get; set; } //public Nullable<decimal> NurseHeadNumber { get; set; }
/// <summary> ///// <summary>
/// 护士人数 ///// 护士人数
/// </summary> ///// </summary>
public Nullable<decimal> NurseNumber { get; set; } //public Nullable<decimal> NurseNumber { get; set; }
/// <summary> ///// <summary>
/// 护理基础系数 ///// 护理基础系数
/// </summary> ///// </summary>
public Nullable<decimal> NurseBasicFactor { get; set; } //public Nullable<decimal> NurseBasicFactor { get; set; }
/// <summary> ///// <summary>
/// 倾斜系数 ///// 倾斜系数
/// </summary> ///// </summary>
public Nullable<decimal> NurseSlopeFactor { get; set; } //public Nullable<decimal> NurseSlopeFactor { get; set; }
/// <summary> ///// <summary>
/// 规模绩效系数 ///// 规模绩效系数
/// </summary> ///// </summary>
public Nullable<decimal> NurseScale { get; set; } //public Nullable<decimal> NurseScale { get; set; }
/// <summary> ///// <summary>
/// 效率绩效系数 ///// 效率绩效系数
/// </summary> ///// </summary>
public Nullable<decimal> NurseEffic { get; set; } //public Nullable<decimal> NurseEffic { get; set; }
/// <summary> ///// <summary>
/// 发放系数 ///// 发放系数
/// </summary> ///// </summary>
public Nullable<decimal> NurseGrant { get; set; } //public Nullable<decimal> NurseGrant { get; set; }
/// <summary> ///// <summary>
/// 其他绩效1 ///// 其他绩效1
/// </summary> ///// </summary>
public Nullable<decimal> NurseOtherPerfor1 { get; set; } //public Nullable<decimal> NurseOtherPerfor1 { get; set; }
/// <summary> ///// <summary>
/// 其他绩效2 ///// 其他绩效2
/// </summary> ///// </summary>
public Nullable<decimal> NurseOtherPerfor2 { get; set; } //public Nullable<decimal> NurseOtherPerfor2 { get; set; }
/// <summary> ///// <summary>
/// 医院奖罚 ///// 医院奖罚
/// </summary> ///// </summary>
public Nullable<decimal> NurseExtra { get; set; } //public Nullable<decimal> NurseExtra { get; set; }
/// <summary> ///// <summary>
/// 考核对分率 ///// 考核对分率
/// </summary> ///// </summary>
public Nullable<decimal> NurseScoringAverage { get; set; } //public Nullable<decimal> NurseScoringAverage { get; set; }
/// <summary> ///// <summary>
/// 调节系数 ///// 调节系数
/// </summary> ///// </summary>
public Nullable<decimal> NurseAdjustFactor { get; set; } //public Nullable<decimal> NurseAdjustFactor { get; set; }
/// <summary> ///// <summary>
/// 工作量倾斜系数 ///// 工作量倾斜系数
/// </summary> ///// </summary>
public Nullable<decimal> WorkSlopeFactor { get; set; } //public Nullable<decimal> WorkSlopeFactor { get; set; }
/// <summary> /// <summary>
/// ///
...@@ -215,5 +215,18 @@ public class im_accountbasic ...@@ -215,5 +215,18 @@ public class im_accountbasic
/// ///
/// </summary> /// </summary>
public Nullable<int> UpdateUser { get; set; } public Nullable<int> UpdateUser { get; set; }
/// <summary>
/// 考核前其他绩效
/// </summary>
public Nullable<decimal> AssessBeforeOtherFee { get; set; }
/// <summary>
/// 考核后其他绩效
/// </summary>
public Nullable<decimal> AssessLaterOtherFee { get; set; }
/// <summary>
/// 调节后其他绩效
/// </summary>
public Nullable<decimal> AdjustLaterOtherFee { get; set; }
} }
} }
...@@ -117,6 +117,11 @@ public class im_employee ...@@ -117,6 +117,11 @@ public class im_employee
public Nullable<decimal> OtherPerfor { get; set; } public Nullable<decimal> OtherPerfor { get; set; }
/// <summary> /// <summary>
/// 夜班费
/// </summary>
public Nullable<decimal> NightWorkPerfor { get; set; }
/// <summary>
/// 医院奖罚 /// 医院奖罚
/// </summary> /// </summary>
public Nullable<decimal> Punishment { get; set; } public Nullable<decimal> Punishment { get; set; }
...@@ -140,5 +145,17 @@ public class im_employee ...@@ -140,5 +145,17 @@ public class im_employee
/// ///
/// </summary> /// </summary>
public Nullable<int> UpdateUser { get; set; } public Nullable<int> UpdateUser { get; set; }
/// <summary>
/// 考核前其他绩效
/// </summary>
public Nullable<decimal> AssessBeforeOtherFee { get; set; }
/// <summary>
/// 考核后其他绩效
/// </summary>
public Nullable<decimal> AssessLaterOtherFee { get; set; }
/// <summary>
/// 调节后其他绩效
/// </summary>
public Nullable<decimal> AdjustLaterOtherFee { get; set; }
} }
} }
...@@ -72,6 +72,11 @@ public class im_employee_clinic ...@@ -72,6 +72,11 @@ public class im_employee_clinic
public Nullable<decimal> Basics { get; set; } public Nullable<decimal> Basics { get; set; }
/// <summary> /// <summary>
/// 实际人均绩效
/// </summary>
public Nullable<decimal> FitPeopleValue { get; set; }
/// <summary>
/// 岗位系数 /// 岗位系数
/// </summary> /// </summary>
public Nullable<decimal> PostCoefficient { get; set; } public Nullable<decimal> PostCoefficient { get; set; }
...@@ -97,6 +102,11 @@ public class im_employee_clinic ...@@ -97,6 +102,11 @@ public class im_employee_clinic
public Nullable<decimal> Management { get; set; } public Nullable<decimal> Management { get; set; }
/// <summary> /// <summary>
/// 其他管理绩效
/// </summary>
public Nullable<decimal> OtherManagePerfor { get; set; }
/// <summary>
/// 考核得分率 /// 考核得分率
/// </summary> /// </summary>
public Nullable<decimal> ScoreAverageRate { get; set; } public Nullable<decimal> ScoreAverageRate { get; set; }
...@@ -145,5 +155,17 @@ public class im_employee_clinic ...@@ -145,5 +155,17 @@ public class im_employee_clinic
/// ///
/// </summary> /// </summary>
public Nullable<int> UpdateUser { get; set; } public Nullable<int> UpdateUser { get; set; }
/// <summary>
/// 考核前其他绩效
/// </summary>
public Nullable<decimal> AssessBeforeOtherFee { get; set; }
/// <summary>
/// 考核后其他绩效
/// </summary>
public Nullable<decimal> AssessLaterOtherFee { get; set; }
/// <summary>
/// 调节后其他绩效
/// </summary>
public Nullable<decimal> AdjustLaterOtherFee { get; set; }
} }
} }
...@@ -140,5 +140,18 @@ public class im_employee_logistics ...@@ -140,5 +140,18 @@ public class im_employee_logistics
/// ///
/// </summary> /// </summary>
public Nullable<int> UpdateUser { get; set; } public Nullable<int> UpdateUser { get; set; }
/// <summary>
/// 考核前其他绩效
/// </summary>
public Nullable<decimal> AssessBeforeOtherFee { get; set; }
/// <summary>
/// 考核后其他绩效
/// </summary>
public Nullable<decimal> AssessLaterOtherFee { get; set; }
/// <summary>
/// 调节后其他绩效
/// </summary>
public Nullable<decimal> AdjustLaterOtherFee { get; set; }
} }
} }
...@@ -47,6 +47,36 @@ public class per_apr_amount ...@@ -47,6 +47,36 @@ public class per_apr_amount
public Nullable<decimal> Amount { get; set; } public Nullable<decimal> Amount { get; set; }
/// <summary> /// <summary>
/// 录入科室
/// </summary>
public string TypeInDepartment { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 状态 1 未提交 2 等待审核 3 审核通过 4 驳回
/// </summary>
public int Status { get; set; }
/// <summary>
/// 审核时间
/// </summary>
public Nullable<DateTime> AuditTime { get; set; }
/// <summary>
/// 审核人
/// </summary>
public Nullable<int> AuditUser { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// ///
/// </summary> /// </summary>
public Nullable<DateTime> CreateDate { get; set; } public Nullable<DateTime> CreateDate { get; set; }
......
...@@ -22,6 +22,16 @@ public class per_employee ...@@ -22,6 +22,16 @@ public class per_employee
public int Id { get; set; } public int Id { get; set; }
/// <summary> /// <summary>
/// 医院Id
/// </summary>
public Nullable<int> HospitalId { get; set; }
/// <summary>
/// 绩效Id
/// </summary>
public Nullable<int> AllotId { get; set; }
/// <summary>
/// 核算单元 /// 核算单元
/// </summary> /// </summary>
public string AccountingUnit { get; set; } public string AccountingUnit { get; set; }
...@@ -97,19 +107,14 @@ public class per_employee ...@@ -97,19 +107,14 @@ public class per_employee
public Nullable<int> Age { get; set; } public Nullable<int> Age { get; set; }
/// <summary> /// <summary>
/// 备注 /// 预留比例
/// </summary> /// </summary>
public string Remark { get; set; } public Nullable<decimal> ReservedRatio { get; set; }
/// <summary>
/// 医院Id
/// </summary>
public Nullable<int> HospitalId { get; set; }
/// <summary> /// <summary>
/// 绩效Id /// 备注
/// </summary> /// </summary>
public Nullable<int> AllotId { get; set; } public string Remark { get; set; }
/// <summary> /// <summary>
/// ///
......
//-----------------------------------------------------------------------
// <copyright file=" report_original_workload.cs">
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
///
/// </summary>
[Table("report_original_persontime")]
public class report_original_persontime
{
/// <summary>
///
/// </summary>
[Key]
public int Id { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
/// 年
/// </summary>
public int Year { get; set; }
/// <summary>
/// 月
/// </summary>
public int Month { get; set; }
/// <summary>
/// 医院ID
/// </summary>
public int HospitalID { get; set; }
/// <summary>
///
/// </summary>
public string SourceType { get; set; }
/// <summary>
/// 科室核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 科室
/// </summary>
public string Department { get; set; }
/// <summary>
/// 人次
/// </summary>
public Nullable<int> PersonTime { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" report_original_workload.cs">
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
///
/// </summary>
[Table("report_original_stays")]
public class report_original_stays
{
/// <summary>
///
/// </summary>
[Key]
public int Id { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
/// 年
/// </summary>
public int Year { get; set; }
/// <summary>
/// 月
/// </summary>
public int Month { get; set; }
/// <summary>
/// 医院ID
/// </summary>
public int HospitalID { get; set; }
/// <summary>
///
/// </summary>
public string SourceType { get; set; }
/// <summary>
/// 科室核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 科室
/// </summary>
public string Department { get; set; }
/// <summary>
/// 住院时长
/// </summary>
public Nullable<decimal> Stays { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" report_original_workload.cs">
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
///
/// </summary>
[Table("report_original_surgery")]
public class report_original_surgery
{
/// <summary>
///
/// </summary>
[Key]
public int Id { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
/// 年
/// </summary>
public int Year { get; set; }
/// <summary>
/// 月
/// </summary>
public int Month { get; set; }
/// <summary>
/// 医院ID
/// </summary>
public int HospitalID { get; set; }
/// <summary>
///
/// </summary>
public string SourceType { get; set; }
/// <summary>
/// 科室核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 科室
/// </summary>
public string Department { get; set; }
/// <summary>
/// 人次
/// </summary>
public Nullable<int> PersonTime { get; set; }
}
}
...@@ -162,6 +162,23 @@ public class res_account ...@@ -162,6 +162,23 @@ public class res_account
public Nullable<decimal> RealGiveFee { get; set; } public Nullable<decimal> RealGiveFee { get; set; }
/// <summary> /// <summary>
/// 考核前其他绩效
/// </summary>
public Nullable<decimal> AssessBeforeOtherFee { get; set; }
/// <summary>
/// 考核后其他绩效
/// </summary>
public Nullable<decimal> AssessLaterOtherFee { get; set; }
/// <summary>
/// 调节后其他绩效
/// </summary>
public Nullable<decimal> AdjustLaterOtherFee { get; set; }
/// <summary>
/// 考核后绩效
/// </summary>
public Nullable<decimal> AssessLaterPerforTotal { get; set; }
/// <summary>
/// 备注 /// 备注
/// </summary> /// </summary>
public string Remark { get; set; } public string Remark { get; set; }
......
...@@ -52,6 +52,16 @@ public class res_compute ...@@ -52,6 +52,16 @@ public class res_compute
public string FitPeople { get; set; } public string FitPeople { get; set; }
/// <summary> /// <summary>
/// 绩效基础核算参考值
/// </summary>
public Nullable<decimal> FitPeopleValue { get; set; }
/// <summary>
/// 绩效基数核算参考对象取值比例(如临床科室护士*95%)
/// </summary>
public Nullable<decimal> FitPeopleRatio { get; set; }
/// <summary>
/// 人员姓名 /// 人员姓名
/// </summary> /// </summary>
public string EmployeeName { get; set; } public string EmployeeName { get; set; }
...@@ -127,6 +137,11 @@ public class res_compute ...@@ -127,6 +137,11 @@ public class res_compute
public Nullable<decimal> OtherPerfor { get; set; } public Nullable<decimal> OtherPerfor { get; set; }
/// <summary> /// <summary>
/// 夜班费
/// </summary>
public Nullable<decimal> NightWorkPerfor { get; set; }
/// <summary>
/// 应发绩效(需计算) /// 应发绩效(需计算)
/// </summary> /// </summary>
public Nullable<decimal> GiveFee { get; set; } public Nullable<decimal> GiveFee { get; set; }
...@@ -182,6 +197,11 @@ public class res_compute ...@@ -182,6 +197,11 @@ public class res_compute
public Nullable<decimal> ManagerNumber { get; set; } public Nullable<decimal> ManagerNumber { get; set; }
/// <summary> /// <summary>
/// 其他管理绩效
/// </summary>
public Nullable<decimal> OtherManagePerfor { get; set; }
/// <summary>
/// 核算单元人员数量 /// 核算单元人员数量
/// </summary> /// </summary>
public Nullable<decimal> MedicalNumber { get; set; } public Nullable<decimal> MedicalNumber { get; set; }
...@@ -190,5 +210,18 @@ public class res_compute ...@@ -190,5 +210,18 @@ public class res_compute
/// 效率绩效人数 /// 效率绩效人数
/// </summary> /// </summary>
public Nullable<decimal> PermanentStaff { get; set; } public Nullable<decimal> PermanentStaff { get; set; }
/// <summary>
/// 考核前其他绩效
/// </summary>
public Nullable<decimal> AssessBeforeOtherFee { get; set; }
/// <summary>
/// 考核后其他绩效
/// </summary>
public Nullable<decimal> AssessLaterOtherFee { get; set; }
/// <summary>
/// 调节后其他绩效
/// </summary>
public Nullable<decimal> AdjustLaterOtherFee { get; set; }
} }
} }
//-----------------------------------------------------------------------
// <copyright file=" res_reserved.cs">
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
///
/// </summary>
[Table("res_reserved")]
public class res_reserved
{
/// <summary>
///
/// </summary>
[Key]
public int Id { get; set; }
/// <summary>
///
/// </summary>
public int HospitalId { get; set; }
/// <summary>
///
/// </summary>
public int Year { get; set; }
public string UnitType { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 人员姓名
/// </summary>
public string EmployeeName { get; set; }
/// <summary>
/// 工号
/// </summary>
public string JobNumber { get; set; }
/// <summary>
/// 一月
/// </summary>
public Nullable<decimal> JanFee { get; set; }
/// <summary>
/// 一月
/// </summary>
public Nullable<decimal> JanRatio { get; set; }
/// <summary>
/// 二月
/// </summary>
public Nullable<decimal> FebFee { get; set; }
/// <summary>
/// 二月
/// </summary>
public Nullable<decimal> FebRatio { get; set; }
/// <summary>
/// 三月
/// </summary>
public Nullable<decimal> MarFee { get; set; }
/// <summary>
/// 三月
/// </summary>
public Nullable<decimal> MarRatio { get; set; }
/// <summary>
/// 四月
/// </summary>
public Nullable<decimal> AprFee { get; set; }
/// <summary>
/// 四月
/// </summary>
public Nullable<decimal> AprRatio { get; set; }
/// <summary>
/// 五月
/// </summary>
public Nullable<decimal> MayFee { get; set; }
/// <summary>
/// 五月
/// </summary>
public Nullable<decimal> MayRatio { get; set; }
/// <summary>
/// 六月
/// </summary>
public Nullable<decimal> JunFee { get; set; }
/// <summary>
/// 六月
/// </summary>
public Nullable<decimal> JunRatio { get; set; }
/// <summary>
/// 七月
/// </summary>
public Nullable<decimal> JulFee { get; set; }
/// <summary>
/// 七月
/// </summary>
public Nullable<decimal> JulRatio { get; set; }
/// <summary>
/// 八月
/// </summary>
public Nullable<decimal> AugFee { get; set; }
/// <summary>
/// 八月
/// </summary>
public Nullable<decimal> AugRatio { get; set; }
/// <summary>
/// 九月
/// </summary>
public Nullable<decimal> SepFee { get; set; }
/// <summary>
/// 九月
/// </summary>
public Nullable<decimal> SepRatio { get; set; }
/// <summary>
/// 十月
/// </summary>
public Nullable<decimal> OctFee { get; set; }
/// <summary>
/// 十月
/// </summary>
public Nullable<decimal> OctRatio { get; set; }
/// <summary>
/// 十一月
/// </summary>
public Nullable<decimal> NovFee { get; set; }
/// <summary>
/// 十一月
/// </summary>
public Nullable<decimal> NovRatio { get; set; }
/// <summary>
/// 十二月
/// </summary>
public Nullable<decimal> DecFee { get; set; }
/// <summary>
/// 十二月
/// </summary>
public Nullable<decimal> DecRatio { get; set; }
}
}
...@@ -62,6 +62,11 @@ public class res_specialunit ...@@ -62,6 +62,11 @@ public class res_specialunit
public Nullable<decimal> QuantitativeIndicatorsValue { get; set; } public Nullable<decimal> QuantitativeIndicatorsValue { get; set; }
/// <summary> /// <summary>
/// 量化指标绩效金额
/// </summary>
public Nullable<decimal> QuantitativeFee { get; set; }
/// <summary>
/// 考核得分率 /// 考核得分率
/// </summary> /// </summary>
public Nullable<decimal> ScoringAverage { get; set; } public Nullable<decimal> ScoringAverage { get; set; }
...@@ -110,5 +115,21 @@ public class res_specialunit ...@@ -110,5 +115,21 @@ public class res_specialunit
/// 业绩总绩效 /// 业绩总绩效
/// </summary> /// </summary>
public Nullable<decimal> ResultsTotalFee { get; set; } public Nullable<decimal> ResultsTotalFee { get; set; }
/// <summary>
/// 考核前绩效
/// </summary>
public Nullable<decimal> PerforTotal { get; set; }
/// <summary>
/// 考核前其他绩效
/// </summary>
public Nullable<decimal> AssessBeforeOtherFee { get; set; }
/// <summary>
/// 考核后其他绩效
/// </summary>
public Nullable<decimal> AssessLaterOtherFee { get; set; }
/// <summary>
/// 调节后其他绩效
/// </summary>
public Nullable<decimal> AdjustLaterOtherFee { get; set; }
} }
} }
...@@ -85,5 +85,15 @@ public class sys_hospital ...@@ -85,5 +85,15 @@ public class sys_hospital
/// 是否显示绩效合计 1 显示绩效合计 2 显示管理绩效 /// 是否显示绩效合计 1 显示绩效合计 2 显示管理绩效
/// </summary> /// </summary>
public Nullable<int> IsShowManage { get; set; } public Nullable<int> IsShowManage { get; set; }
/// <summary>
/// 是否开启科室CMI占比 1 启用 2 禁用
/// </summary>
public Nullable<int> IsOpenCMIPercent { get; set; }
/// <summary>
/// 是否开启护理部审核 1 启用 2 禁用
/// </summary>
public Nullable<int> IsOpenNursingDeptAudit { get; set; }
} }
} }
...@@ -35,6 +35,10 @@ public IEnumerable<T> DapperQuery<T>(string sql, object param) where T : class, ...@@ -35,6 +35,10 @@ public IEnumerable<T> DapperQuery<T>(string sql, object param) where T : class,
{ {
return context.Database.GetDbConnection().Query<T>(sql, param); return context.Database.GetDbConnection().Query<T>(sql, param);
} }
public T DapperQueryFirstOrDefault<T>(string sql, object param)
{
return context.Database.GetDbConnection().QueryFirstOrDefault<T>(sql, param);
}
public IEnumerable<T> DapperQuery<T>(string sql, object param, int? commandTimeout = null) public IEnumerable<T> DapperQuery<T>(string sql, object param, int? commandTimeout = null)
{ {
...@@ -80,6 +84,14 @@ public bool RemoveRange(params TEntity[] entities) ...@@ -80,6 +84,14 @@ public bool RemoveRange(params TEntity[] entities)
context.Set<TEntity>().RemoveRange(entities); context.Set<TEntity>().RemoveRange(entities);
return context.SaveChanges() > 0; return context.SaveChanges() > 0;
} }
public bool RemoveRange(Expression<Func<TEntity, bool>> exp)
{
var query = CompileQuery(exp);
var entities = query == null || query.Count() == 0 ? null : query.ToList();
if (entities != null)
context.Set<TEntity>().RemoveRange(entities);
return context.SaveChanges() > 0;
}
public bool Update(TEntity entity) public bool Update(TEntity entity)
{ {
......
...@@ -158,15 +158,54 @@ public void ImportWorkloadData(per_allot allot, object parameters) ...@@ -158,15 +158,54 @@ public void ImportWorkloadData(per_allot allot, object parameters)
/// 查询工作量数据 /// 查询工作量数据
/// </summary> /// </summary>
/// <param name="allotid"></param> /// <param name="allotid"></param>
public IEnumerable<report_original_workload> QueryWorkloadData(int allotid, string accountingunit, string[] unittype) public IEnumerable<report_original_workload> QueryWorkloadData(int allotid, string accountingunit, string unittype, int hospitalid)
{ {
using (var connection = context.Database.GetDbConnection()) using (var connection = context.Database.GetDbConnection())
{ {
if (connection.State != ConnectionState.Open) connection.Open(); if (connection.State != ConnectionState.Open) connection.Open();
try try
{ {
string clear = "select t1.* from report_original_workload t1 join per_employee t2 on t1.doctorname = t2.doctorname and t1.personnelnumber = t2.personnelnumber where t1.allotid = @allotid and t1.accountingunit = @accountingunit and t1.accountingunit = @accountingunit and t2.unittype in @unittype order by fee desc,convert(t1.doctorname using gbk);"; string clear = @"SELECT t3.AccountingUnit as Department,t1.DoctorName,t1.PersonnelNumber,t1.Category,t1.Fee FROM ex_result t1
return connection.Query<report_original_workload>(clear, new { allotid, accountingunit, unittype }, commandTimeout: 60 * 60); JOIN per_employee t2 on t1.doctorname = t2.doctorname and t1.personnelnumber = t2.personnelnumber
JOIN (select distinct AccountingUnit,HISDeptName,unittype from per_dept_dic where HospitalId = @hospitalid) t3 ON t1.Department = t3.HISDeptName
WHERE t1.allotid = @allotid
AND t2.allotid = @allotid
AND t3.unittype = @unittype
AND t3.accountingunit = @accountingunit
AND t1.Source LIKE CONCAT('%',@unittype,'工作量%')
AND T1.IsDelete = 0
ORDER BY t1.doctorname,t1.Category;";
return connection.Query<report_original_workload>(clear, new { allotid, accountingunit, unittype, hospitalid }, commandTimeout: 60 * 60);
}
catch (Exception ex)
{
throw ex;
}
}
}
/// <summary>
/// 查询门诊收入数据
/// </summary>
/// <param name="allotid"></param>
public IEnumerable<ex_result> QueryIncomeData(int allotid, string accountingunit, string unittype, int hospitalid)
{
using (var connection = context.Database.GetDbConnection())
{
if (connection.State != ConnectionState.Open) connection.Open();
try
{
string clear = @"SELECT t3.AccountingUnit as Department,t1.DoctorName,t1.PersonnelNumber,t1.Category,t1.Fee FROM ex_result t1
JOIN per_employee t2 on t1.doctorname = t2.doctorname and t1.personnelnumber = t2.personnelnumber
JOIN (select distinct AccountingUnit,HISDeptName,unittype from per_dept_dic where HospitalId = @hospitalid) t3 ON t1.Department = t3.HISDeptName
WHERE t1.allotid = @allotid
AND t2.allotid = @allotid
AND t3.unittype = @unittype
AND t3.accountingunit = @accountingunit
AND t1.Source like '%门诊开单%'
AND T1.IsDelete = 0
ORDER BY t1.doctorname,t1.Category;";
return connection.Query<ex_result>(clear, new { allotid, accountingunit, unittype, hospitalid }, commandTimeout: 60 * 60);
} }
catch (Exception ex) catch (Exception ex)
{ {
......
//-----------------------------------------------------------------------
// <copyright file=" ag_header.cs">
// * FileName: ag_header.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using Performance.EntityModels;
namespace Performance.Repository
{
/// <summary>
/// report_original_persontime Repository
/// </summary>
public partial class PerforReportoriginalpersontimeRepository : PerforRepository<report_original_persontime>
{
public PerforReportoriginalpersontimeRepository(PerformanceDbContext context) : base(context)
{
}
}
}
//-----------------------------------------------------------------------
// <copyright file=" ag_header.cs">
// * FileName: ag_header.cs
// </copyright>
//-----------------------------------------------------------------------
using Performance.EntityModels;
namespace Performance.Repository
{
/// <summary>
/// report_original_stays Repository
/// </summary>
public partial class PerforReportoriginalstaysRepository : PerforRepository<report_original_stays>
{
public PerforReportoriginalstaysRepository(PerformanceDbContext context) : base(context)
{
}
}
}
//-----------------------------------------------------------------------
// <copyright file=" ag_header.cs">
// * FileName: ag_header.cs
// </copyright>
//-----------------------------------------------------------------------
using Performance.EntityModels;
namespace Performance.Repository
{
/// <summary>
/// report_original_surgery Repository
/// </summary>
public partial class PerforReportoriginalsurgeryRepository : PerforRepository<report_original_surgery>
{
public PerforReportoriginalsurgeryRepository(PerformanceDbContext context) : base(context)
{
}
}
}
//-----------------------------------------------------------------------
// <copyright file=" cof_guarantee.cs">
// * FileName: cof_guarantee.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using Performance.EntityModels;
namespace Performance.Repository
{
/// <summary>
/// cof_guarantee Repository
/// </summary>
public partial class PerforresreservedRepository : PerforRepository<res_reserved>
{
public PerforresreservedRepository(PerformanceDbContext context) : base(context)
{
}
}
}
...@@ -82,7 +82,8 @@ private List<PerAgainData> SlideRowRead(ISheet sheet, PerHeader header, int r, I ...@@ -82,7 +82,8 @@ private List<PerAgainData> SlideRowRead(ISheet sheet, PerHeader header, int r, I
for (int c = 0; c < header.Children.Count(); c++) for (int c = 0; c < header.Children.Count(); c++)
{ {
var athead = header.Children.ElementAt(c); var athead = header.Children.ElementAt(c);
var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell)); //var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
var cellValue = ConvertHelper.To<decimal?>(row.GetCell(athead.PointCell).GetValue());
if (!cellValue.HasValue || cellValue.Value == 0) if (!cellValue.HasValue || cellValue.Value == 0)
continue; continue;
var factorValue = ConvertHelper.To<decimal?>(sheet.GetRow(FactorRow).GetCell(athead.PointCell)?.ToString()); var factorValue = ConvertHelper.To<decimal?>(sheet.GetRow(FactorRow).GetCell(athead.PointCell)?.ToString());
......
...@@ -207,7 +207,7 @@ private int SaveClinicEmployee(PerSheet sheet, int allotId) ...@@ -207,7 +207,7 @@ private int SaveClinicEmployee(PerSheet sheet, int allotId)
var imdata = Mapper.Map<im_employee_clinic>(data); var imdata = Mapper.Map<im_employee_clinic>(data);
imdata.SheetID = imsheet.ID; imdata.SheetID = imsheet.ID;
imdata.AllotID = allotId; imdata.AllotID = allotId;
//imdata.OtherPerfor = data.OthePerfor; imdata.OtherPerfor = data.OthePerfor;
addList.Add(imdata); addList.Add(imdata);
} }
perforImemployeeclinicRepository.AddRange(addList.ToArray()); perforImemployeeclinicRepository.AddRange(addList.ToArray());
......
...@@ -25,6 +25,7 @@ public class AllotService : IAutoInjection ...@@ -25,6 +25,7 @@ public class AllotService : IAutoInjection
private ProcessComputService processComputService; private ProcessComputService processComputService;
private ResultComputeService resultComputeService; private ResultComputeService resultComputeService;
private PerforLogdbugRepository logdbug; private PerforLogdbugRepository logdbug;
private readonly PerforresreservedRepository perforresreservedRepository;
private ConfigService configService; private ConfigService configService;
private IHostingEnvironment _evn; private IHostingEnvironment _evn;
private ILogger<AllotService> _logger; private ILogger<AllotService> _logger;
...@@ -36,6 +37,8 @@ public class AllotService : IAutoInjection ...@@ -36,6 +37,8 @@ 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 readonly RoleService roleService;
private readonly UserService userService;
private PerforCofdirectorRepository perforCofdirectorRepository; private PerforCofdirectorRepository perforCofdirectorRepository;
//private readonly IHubContext<AllotLogHub> hubContext; //private readonly IHubContext<AllotLogHub> hubContext;
...@@ -51,6 +54,7 @@ public class AllotService : IAutoInjection ...@@ -51,6 +54,7 @@ public class AllotService : IAutoInjection
ResultComputeService resultComputeService, ResultComputeService resultComputeService,
ConfigService configService, ConfigService configService,
PerforLogdbugRepository logdbug, PerforLogdbugRepository logdbug,
PerforresreservedRepository perforresreservedRepository,
IHostingEnvironment evn, ILogger<AllotService> logger, IHostingEnvironment evn, ILogger<AllotService> logger,
IEmailService emailService, IEmailService emailService,
IOptions<Application> options, IOptions<Application> options,
...@@ -60,6 +64,8 @@ public class AllotService : IAutoInjection ...@@ -60,6 +64,8 @@ public class AllotService : IAutoInjection
PerforResbaiscnormRepository perforResbaiscnormRepository, PerforResbaiscnormRepository perforResbaiscnormRepository,
PerforHospitalconfigRepository perforHospitalconfigRepository, PerforHospitalconfigRepository perforHospitalconfigRepository,
//IHubContext<AllotLogHub> hubContext //IHubContext<AllotLogHub> hubContext
RoleService roleService,
UserService userService,
LogManageService logManageService, LogManageService logManageService,
ReportService reportService, ReportService reportService,
PerforCofdirectorRepository perforCofdirectorRepository, PerforCofdirectorRepository perforCofdirectorRepository,
...@@ -78,10 +84,13 @@ public class AllotService : IAutoInjection ...@@ -78,10 +84,13 @@ public class AllotService : IAutoInjection
this.options = options; this.options = options;
this.configService = configService; this.configService = configService;
this.logdbug = logdbug; this.logdbug = logdbug;
this.perforresreservedRepository = perforresreservedRepository;
this.perforLogcheckRepository = perforLogcheckRepository; this.perforLogcheckRepository = perforLogcheckRepository;
this.perforHospitalRepository = perforHospitalRepository; this.perforHospitalRepository = perforHospitalRepository;
this.perforResbaiscnormRepository = perforResbaiscnormRepository; this.perforResbaiscnormRepository = perforResbaiscnormRepository;
this.perforHospitalconfigRepository = perforHospitalconfigRepository; this.perforHospitalconfigRepository = perforHospitalconfigRepository;
this.roleService = roleService;
this.userService = userService;
//this.hubContext = hubContext; //this.hubContext = hubContext;
this.logManageService = logManageService; this.logManageService = logManageService;
this.reportService = reportService; this.reportService = reportService;
...@@ -343,13 +352,16 @@ public void Generate(per_allot allot, string mail) ...@@ -343,13 +352,16 @@ public void Generate(per_allot allot, string mail)
// 科室奖罚汇总 // 科室奖罚汇总
logManageService.WriteMsg("正在生成绩效", "科室奖罚汇总", 1, allot.ID, "ReceiveMessage", true); logManageService.WriteMsg("正在生成绩效", "科室奖罚汇总", 1, allot.ID, "ReceiveMessage", true);
var accountExtras = processComputService.GetAccountExtra(excel, SheetType.AccountExtra); var accountExtras = processComputService.GetAccountExtra(excel, SheetType.AccountExtra, true);
// 科室药占比考核 // 科室药占比考核
logManageService.WriteMsg("正在生成绩效", "科室药占比考核", 1, allot.ID, "ReceiveMessage", true); logManageService.WriteMsg("正在生成绩效", "科室药占比考核", 1, allot.ID, "ReceiveMessage", true);
var drugExtras = processComputService.GetAccountExtra(excel, SheetType.AccountDrugAssess, true); var drugExtras = processComputService.GetAccountExtra(excel, SheetType.AccountDrugAssess, true);
// 科室材料占比考核 // 科室材料占比考核
logManageService.WriteMsg("正在生成绩效", "科室材料占比考核", 1, allot.ID, "ReceiveMessage", true); logManageService.WriteMsg("正在生成绩效", "科室材料占比考核", 1, allot.ID, "ReceiveMessage", true);
var materialsExtras = processComputService.GetAccountExtra(excel, SheetType.AccountMaterialsAssess, true); var materialsExtras = processComputService.GetAccountExtra(excel, SheetType.AccountMaterialsAssess, true);
// 科室考核得分率
logManageService.WriteMsg("正在生成绩效", "科室考核得分率", 1, allot.ID, "ReceiveMessage", true);
var accountScoreAverages = processComputService.GetAccountScoreAverage(excel, SheetType.AccountScoreAverage, true);
////科室药占比考核 ////科室药占比考核
//logManageService.WriteMsg("正在生成绩效", "科室奖罚汇总", 1, allot.ID, "ReceiveMessage", true); //logManageService.WriteMsg("正在生成绩效", "科室奖罚汇总", 1, allot.ID, "ReceiveMessage", true);
...@@ -361,7 +373,7 @@ public void Generate(per_allot allot, string mail) ...@@ -361,7 +373,7 @@ public void Generate(per_allot allot, string mail)
//重新计算科室业绩(含所有提供保底金额) //重新计算科室业绩(含所有提供保底金额)
logManageService.WriteMsg("正在生成绩效", "计算科室业绩分", 1, allot.ID, "ReceiveMessage", true); logManageService.WriteMsg("正在生成绩效", "计算科室业绩分", 1, allot.ID, "ReceiveMessage", true);
var sheetLast = processComputService.Compute(excel, mergeSheets, accountExtras, drugExtras, materialsExtras); var sheetLast = processComputService.Compute(excel, mergeSheets, accountExtras, drugExtras, materialsExtras, accountScoreAverages);
//保存计算过程数据 //保存计算过程数据
logManageService.WriteMsg("正在生成绩效", "保存科室业绩结果及计算过程中产生的数据", 1, allot.ID, "ReceiveMessage", true); logManageService.WriteMsg("正在生成绩效", "保存科室业绩结果及计算过程中产生的数据", 1, allot.ID, "ReceiveMessage", true);
...@@ -380,13 +392,17 @@ public void Generate(per_allot allot, string mail) ...@@ -380,13 +392,17 @@ public void Generate(per_allot allot, string mail)
// 计算特殊科室 // 计算特殊科室
logManageService.WriteMsg("正在生成绩效", "计算最终特殊科室绩效数据", 1, allot.ID, "ReceiveMessage", true); logManageService.WriteMsg("正在生成绩效", "计算最终特殊科室绩效数据", 1, allot.ID, "ReceiveMessage", true);
resultComputeService.SpecialUnitCompute(excel, allot, sheetLast, baiscnormList, accountExtras, drugExtras, materialsExtras, employeeExtra); resultComputeService.SpecialUnitCompute(excel, allot, sheetLast, baiscnormList, accountExtras, drugExtras, materialsExtras, employeeExtra, accountScoreAverages);
logManageService.WriteMsg("正在生成绩效", "保存最终特殊科室绩效数据", 1, allot.ID, "ReceiveMessage", true); logManageService.WriteMsg("正在生成绩效", "保存最终特殊科室绩效数据", 1, allot.ID, "ReceiveMessage", true);
//保存 绩效人均参考标准 //保存 绩效人均参考标准
logManageService.WriteMsg("正在生成绩效", "保存绩效人均参考标准", 1, allot.ID, "ReceiveMessage", true); logManageService.WriteMsg("正在生成绩效", "保存绩效人均参考标准", 1, allot.ID, "ReceiveMessage", true);
perforResbaiscnormRepository.AddRange(baiscnormList.ToArray()); perforResbaiscnormRepository.AddRange(baiscnormList.ToArray());
// 保存预留绩效
logManageService.WriteMsg("正在生成绩效", "保存预留绩效金额", 1, allot.ID, "ReceiveMessage", true);
resultComputeService.SaveReserved(allot);
UpdateAllotStates(allot.ID, (int)AllotStates.GenerateAccomplish, EnumHelper.GetDescription(AllotStates.GenerateAccomplish), generate); UpdateAllotStates(allot.ID, (int)AllotStates.GenerateAccomplish, EnumHelper.GetDescription(AllotStates.GenerateAccomplish), generate);
perforCofdirectorRepository.SupplementaryData(allot.ID); perforCofdirectorRepository.SupplementaryData(allot.ID);
...@@ -395,8 +411,8 @@ public void Generate(per_allot allot, string mail) ...@@ -395,8 +411,8 @@ public void Generate(per_allot allot, string mail)
var flag = reportService.UpdateData(allot); var flag = reportService.UpdateData(allot);
logManageService.WriteMsg("正在生成报表数据", $"报表数据生成完成;受影响:{res}行", 1, allot.ID, "ReceiveMessage", true); logManageService.WriteMsg("正在生成报表数据", $"报表数据生成完成;受影响:{res}行", 1, allot.ID, "ReceiveMessage", true);
//发送邮件 ////发送邮件
logManageService.WriteMsg("正在发送邮件", "正在发送邮件", 1, allot.ID, "ReceiveMessage", true); //logManageService.WriteMsg("正在发送邮件", "正在发送邮件", 1, allot.ID, "ReceiveMessage", true);
//SendEmail(allot, mail, 1, time); //SendEmail(allot, mail, 1, time);
//logdbug.Add(allot.ID, "绩效开始执行", "绩效生成成功"); //logdbug.Add(allot.ID, "绩效开始执行", "绩效生成成功");
logManageService.WriteMsg("绩效生成结束", "绩效生成成功", 5, allot.ID, "ReceiveMessage", true); logManageService.WriteMsg("绩效生成结束", "绩效生成成功", 5, allot.ID, "ReceiveMessage", true);
...@@ -511,5 +527,34 @@ public List<log_dbug> AllotLog(per_allot allot, int type) ...@@ -511,5 +527,34 @@ public List<log_dbug> AllotLog(per_allot allot, int type)
list = list.OrderBy(t => t.CreateTime).ToList(); list = list.OrderBy(t => t.CreateTime).ToList();
return list; return list;
} }
public List<res_reserved> GetReserved(int hospitalId, int year, int userid)
{
var user = userService.GetUser(userid);
if (user == null)
throw new PerformanceException("用户信息错误");
var role = roleService.GetUserRole(userid)?.FirstOrDefault()?.Type;
if (!role.HasValue)
throw new PerformanceException("用户信息错误");
var roleTypes = new[] { options.Value.NurseRole, options.Value.DirectorRole, options.Value.SpecialRole, options.Value.OfficeRole };
var reserveds = perforresreservedRepository.GetEntities(w => w.HospitalId == hospitalId && w.Year == year);
if (reserveds != null && reserveds.Any())
{
if (role.Value == options.Value.NurseRole)
reserveds = reserveds.Where(w => !string.IsNullOrEmpty(w.UnitType) && w.UnitType.Contains(UnitType.护理组.ToString()) && w.AccountingUnit == user.Department)?.ToList();
else if (role.Value == options.Value.DirectorRole)
reserveds = reserveds.Where(w => !string.IsNullOrEmpty(w.UnitType) && (w.UnitType.Contains(UnitType.医生组.ToString()) || w.UnitType.Contains(UnitType.医技组.ToString())) && w.AccountingUnit == user.Department)?.ToList();
else if (role.Value == options.Value.SpecialRole)
reserveds = reserveds.Where(w => !string.IsNullOrEmpty(w.UnitType) && w.UnitType.Contains(UnitType.特殊核算组.ToString()) && w.AccountingUnit == user.Department)?.ToList();
else if (role.Value == options.Value.OfficeRole)
reserveds = reserveds.Where(w => !string.IsNullOrEmpty(w.UnitType) && (w.UnitType.Contains(UnitType.行政中层.ToString()) || w.UnitType.Contains(UnitType.行政后勤.ToString())) && w.AccountingUnit == user.Department)?.ToList();
}
return reserveds;
}
} }
} }
...@@ -329,5 +329,61 @@ public bool GetAdjustAndGrant(per_allot allot, out decimal adjust, out decimal g ...@@ -329,5 +329,61 @@ public bool GetAdjustAndGrant(per_allot allot, out decimal adjust, out decimal g
grant = result.Grant.Value / 100; grant = result.Grant.Value / 100;
return true; return true;
} }
/// <summary>
/// 统计指定月份绩效信息
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public per_budget_result Collect(int hospitalid, int year, int month)
{
return new per_budget_result
{
Year = year,
Month = month,
MedicalIncome = GetMedicalIncome(hospitalid, year, month),
TheNewPerformance = GetTheNewPerformance(hospitalid, year, month),
MedicineProportion = GetMedicineProportion(hospitalid, year, month),
MaterialCosts = GetMaterialCosts(hospitalid, year, month),
};
}
///绩效总金额
private decimal GetTheNewPerformance(int hospitalid, int year, int month)
{
string sql = @"select ifnull(sum(fee),0) as fee from (
select realgivefee as fee from res_compute t1
join per_allot t2 on t1.allotid=t2.id
where hospitalid=@hospitalid and year=@year and month=@month and accounttype in ('护士长','科主任','行政中层','行政高层')
union all
select AssessLaterPerforTotal as fee from res_account t1
join per_allot t2 on t1.allotid=t2.id
where hospitalid=@hospitalid and year=@year and month=@month
) tab";
return perbudgetresultRepository.DapperQueryFirstOrDefault<decimal>(sql, new { hospitalid, year, month });
}
///医疗收入
private decimal GetMedicalIncome(int hospitalid, int year, int month)
{
string sql = @"select ifnull(sum(cellvalue),0) as fee from report_original_income t1 where hospitalid=@hospitalid and year=@year and month=@month";
return perbudgetresultRepository.DapperQueryFirstOrDefault<decimal>(sql, new { hospitalid, year, month });
}
///药品收入
private decimal GetMedicineProportion(int hospitalid, int year, int month)
{
string sql = @"select ifnull(sum(cellvalue),0) as fee
from report_original_income t1
join cof_drugtype t2 on t1.allotid = t2.allotid and t2.chargetype = '药费'
where hospitalid=@hospitalid and year=@year and month=@month";
return perbudgetresultRepository.DapperQueryFirstOrDefault<decimal>(sql, new { hospitalid, year, month });
}
///材料支出
private decimal GetMaterialCosts(int hospitalid, int year, int month)
{
string sql = @"select ifnull(sum(cellvalue),0) as fee
from report_original_income t1
join cof_drugtype t2 on t1.allotid = t2.allotid and t2.chargetype = '材料费'
where hospitalid=@hospitalid and year=@year and month=@month";
return perbudgetresultRepository.DapperQueryFirstOrDefault<decimal>(sql, new { hospitalid, year, month });
}
} }
} }
...@@ -670,9 +670,10 @@ public void Copy(per_allot allot) ...@@ -670,9 +670,10 @@ public void Copy(per_allot allot)
if (orgDurgprop == null || orgDurgprop.Count == 0) if (orgDurgprop == null || orgDurgprop.Count == 0)
{ {
var durgprop = _drugpropRepository.GetEntities(t => t.AllotID == allotId) ?? _drugpropRepository.GetEntities(t => t.AllotID == -1); var durgprop = _drugpropRepository.GetEntities(t => t.AllotID == allotId) ?? _drugpropRepository.GetEntities(t => t.AllotID == -1);
var newDurgprops = durgprop.Select(t => new cof_drugprop { AllotID = allot.ID, MaxRange = t.MaxRange, MinRange = t.MinRange, Value = t.Value }); var newDurgprops = durgprop?.Select(t => new cof_drugprop { AllotID = allot.ID, MaxRange = t.MaxRange, MinRange = t.MinRange, Value = t.Value });
if (hospital != null && hospital?.IsOpenDrugprop == 2) //if (hospital != null && hospital?.IsOpenDrugprop == 2)
newDurgprops = new List<cof_drugprop> { new cof_drugprop { AllotID = allot.ID, MaxRange = 1000, MinRange = 0, Value = 1 } }; // newDurgprops = new List<cof_drugprop> { new cof_drugprop { AllotID = allot.ID, MaxRange = 1000, MinRange = 0, Value = 1 } };
if (durgprop != null && durgprop.Any())
_drugpropRepository.AddRange(newDurgprops.ToArray()); _drugpropRepository.AddRange(newDurgprops.ToArray());
} }
...@@ -791,6 +792,7 @@ private void CopyAprData(int prevAllotId, int allotId) ...@@ -791,6 +792,7 @@ private void CopyAprData(int prevAllotId, int allotId)
{ {
var data = list.Select(t => new per_apr_amount var data = list.Select(t => new per_apr_amount
{ {
Status = 2,
AllotId = allotId, AllotId = allotId,
PersonnelNumber = t.PersonnelNumber, PersonnelNumber = t.PersonnelNumber,
DoctorName = t.DoctorName, DoctorName = t.DoctorName,
......
...@@ -388,10 +388,10 @@ public bool InsertApr(per_apr_amount request, int userId) ...@@ -388,10 +388,10 @@ public bool InsertApr(per_apr_amount request, int userId)
if (request == null) if (request == null)
return false; return false;
var data = perapramountRepository.GetEntity(t => t.PersonnelNumber == request.PersonnelNumber && t.AllotId == request.AllotId); //var data = perapramountRepository.GetEntity(t => t.PersonnelNumber == request.PersonnelNumber && t.AllotId == request.AllotId);
if (data != null) //if (data != null)
throw new PerformanceException("人员工号已存在"); // throw new PerformanceException("人员工号已存在");
request.Status = 2;
request.CreateDate = DateTime.Now; request.CreateDate = DateTime.Now;
request.CreateUser = userId; request.CreateUser = userId;
return perapramountRepository.Add(request); return perapramountRepository.Add(request);
...@@ -406,9 +406,12 @@ public bool UpdateApr(per_apr_amount request) ...@@ -406,9 +406,12 @@ public bool UpdateApr(per_apr_amount request)
if (data == null) if (data == null)
throw new PerformanceException("修改数据无效"); throw new PerformanceException("修改数据无效");
data.Status = 2;
data.PersonnelNumber = request.PersonnelNumber; data.PersonnelNumber = request.PersonnelNumber;
data.DoctorName = request.DoctorName; data.DoctorName = request.DoctorName;
data.PerforType = request.PerforType; data.PerforType = request.PerforType;
data.TypeInDepartment = request.TypeInDepartment;
data.AccountingUnit = request.AccountingUnit;
data.Amount = request.Amount; data.Amount = request.Amount;
return perapramountRepository.Update(data); return perapramountRepository.Update(data);
...@@ -423,6 +426,29 @@ public bool DeleteApr(int id) ...@@ -423,6 +426,29 @@ public bool DeleteApr(int id)
return true; return true;
} }
/// <summary>
/// 审核医院其他绩效
/// </summary>
/// <param name="userid"></param>
/// <param name="request"></param>
/// <returns></returns>
public bool ConfirmAudit(int userid, AprAmountAuditRequest request)
{
if (request.Id.Length == 0)
throw new PerformanceException("审核信息无效,请确认");
var apramounts = perapramountRepository.GetEntities(t => request.Id.Contains(t.Id));
foreach (var item in apramounts)
{
item.Status = (request.IsPass == 1) ? 3 : 4;
item.AuditUser = userid;
item.AuditTime = DateTime.Now;
item.Remark = request.Remark;
}
return perapramountRepository.UpdateRange(apramounts.ToArray());
}
public void ImpoerAprEmployees(int allotid, string path, int userid) public void ImpoerAprEmployees(int allotid, string path, int userid)
{ {
var data = perapramountRepository.GetEntities(t => t.AllotId == allotid); var data = perapramountRepository.GetEntities(t => t.AllotId == allotid);
...@@ -459,7 +485,7 @@ public void ImpoerAprEmployees(int allotid, string path, int userid) ...@@ -459,7 +485,7 @@ public void ImpoerAprEmployees(int allotid, string path, int userid)
Dictionary<string, int> dict = new Dictionary<string, int> Dictionary<string, int> dict = new Dictionary<string, int>
{ {
{ "人员工号", -1 }, { "姓名", -1 }, { "绩效类型", -1 }, { "金额", -1 }, { "录入科室", -1 },{ "核算单元", -1 },{ "人员工号", -1 }, { "姓名", -1 }, { "绩效类型", -1 }, { "金额", -1 },
}; };
List<string> errorHeaders = new List<string>(); List<string> errorHeaders = new List<string>();
...@@ -483,10 +509,13 @@ public void ImpoerAprEmployees(int allotid, string path, int userid) ...@@ -483,10 +509,13 @@ public void ImpoerAprEmployees(int allotid, string path, int userid)
var entity = new per_apr_amount var entity = new per_apr_amount
{ {
PersonnelNumber = row.GetCell(dict["人员工号"])?.ToString(), Status = 2,
DoctorName = row.GetCell(dict["姓名"])?.ToString(), PersonnelNumber = row.GetCell(dict["人员工号"]).GetValue(),
PerforType = row.GetCell(dict["绩效类型"])?.ToString(), DoctorName = row.GetCell(dict["姓名"]).GetValue(),
Amount = (decimal)(row.GetCell(dict["金额"])?.NumericCellValue ?? 0), PerforType = row.GetCell(dict["绩效类型"]).GetValue(),
Amount = ConvertHelper.To<decimal>(row.GetCell(dict["金额"]).GetValue(), 0),
TypeInDepartment = row.GetCell(dict["录入科室"]).GetValue(),
AccountingUnit = row.GetCell(dict["核算单元"]).GetValue(),
AllotId = allotid, AllotId = allotid,
CreateDate = createtime, CreateDate = createtime,
CreateUser = userid, CreateUser = userid,
......
...@@ -100,9 +100,12 @@ private void DefaultModules(int hospitalId) ...@@ -100,9 +100,12 @@ private void DefaultModules(int hospitalId)
public ex_module AddModule(ModModuleRequest request) public ex_module AddModule(ModModuleRequest request)
{ {
if (request.SheetType != (int)SheetType.Income) if (!new int[] { (int)SheetType.Income, (int)SheetType.OtherWorkload }.Contains(request.SheetType.Value))
throw new PerformanceException("模块类型错误,只支持收入模板配置"); throw new PerformanceException("模块类型错误,只支持收入模板配置");
string addname = "";
if (request.SheetType == (int)SheetType.Income)
{
string[] array = new string[] { "开单收入", "执行收入" }; string[] array = new string[] { "开单收入", "执行收入" };
if (request.ModuleName.IndexOf("开单收入") == -1 && request.ModuleName.IndexOf("执行收入") == -1) if (request.ModuleName.IndexOf("开单收入") == -1 && request.ModuleName.IndexOf("执行收入") == -1)
throw new PerformanceException("模块名称规则错误"); throw new PerformanceException("模块名称规则错误");
...@@ -114,7 +117,6 @@ public ex_module AddModule(ModModuleRequest request) ...@@ -114,7 +117,6 @@ public ex_module AddModule(ModModuleRequest request)
if (incomeList.Any(t => Regex.Replace(t.ModuleName, @"\d", "").Replace(".", "").Replace(" ", "") == request.ModuleName)) if (incomeList.Any(t => Regex.Replace(t.ModuleName, @"\d", "").Replace(".", "").Replace(" ", "") == request.ModuleName))
throw new PerformanceException("绩效模板已存在!"); throw new PerformanceException("绩效模板已存在!");
string addname = "";
var moduleList = exmoduleRepository.GetEntities(t => t.HospitalId == request.HospitalId && t.ModuleName.IndexOf("1.") != -1); var moduleList = exmoduleRepository.GetEntities(t => t.HospitalId == request.HospitalId && t.ModuleName.IndexOf("1.") != -1);
string name = request.ModuleName.Replace("开单收入", "").Replace("执行收入", ""); string name = request.ModuleName.Replace("开单收入", "").Replace("执行收入", "");
var exist = moduleList.Where(t => t.ModuleName.Contains(name)); var exist = moduleList.Where(t => t.ModuleName.Contains(name));
...@@ -132,6 +134,20 @@ public ex_module AddModule(ModModuleRequest request) ...@@ -132,6 +134,20 @@ public ex_module AddModule(ModModuleRequest request)
sort[1] += 1; sort[1] += 1;
addname = $"{sort[0]}.{sort[1]}.1 " + request.ModuleName; addname = $"{sort[0]}.{sort[1]}.1 " + request.ModuleName;
} }
}
else if (request.SheetType == (int)SheetType.OtherWorkload)
{
var incomeList = exmoduleRepository.GetEntities(t => t.HospitalId == request.HospitalId && t.SheetType == (int)SheetType.OtherWorkload);
if (incomeList.Any(t => Regex.Replace(t.ModuleName, @"\d", "").Replace(".", "").Replace(" ", "") == request.ModuleName))
throw new PerformanceException("绩效模板已存在!");
var moduleList = exmoduleRepository.GetEntities(t => t.HospitalId == request.HospitalId && t.ModuleName.IndexOf("3.") != -1);
string modulename = moduleList.OrderByDescending(t => t.ModuleName).First().ModuleName;
int[] sort = Array.ConvertAll(modulename.Split(' ')[0].Split(new string[] { "." }, StringSplitOptions.RemoveEmptyEntries), t => ConvertHelper.TryInt(t));
sort[1] += 1;
addname = $"{sort[0]}.{sort[1]}.1 " + request.ModuleName;
}
ex_module entity = new ex_module ex_module entity = new ex_module
{ {
...@@ -488,7 +504,7 @@ public List<TitleValue> ExtractScheme(int hospitalId, List<int> executeType) ...@@ -488,7 +504,7 @@ public List<TitleValue> ExtractScheme(int hospitalId, List<int> executeType)
public List<TitleValue> FeeType() public List<TitleValue> FeeType()
{ {
var titlevalue = new List<TitleValue>(); var titlevalue = new List<TitleValue>();
var type = EnumHelper.GetItems<SheetType>().Where(t => new List<int> { (int)SheetType.Income, (int)SheetType.OtherIncome, (int)SheetType.Expend, (int)SheetType.Workload, (int)SheetType.SpecialUnit }.Contains(t.Value)); var type = EnumHelper.GetItems<SheetType>().Where(t => new List<int> { (int)SheetType.Income, (int)SheetType.OtherIncome, (int)SheetType.Expend, (int)SheetType.Workload, (int)SheetType.SpecialUnit, (int)SheetType.OtherWorkload }.Contains(t.Value));
if (type != null && type.Any()) if (type != null && type.Any())
{ {
titlevalue = type.Select(t => new TitleValue titlevalue = type.Select(t => new TitleValue
......
using Microsoft.Extensions.Logging;
using NPOI.HSSF.UserModel;
using NPOI.SS.UserModel;
using NPOI.XSSF.UserModel;
using Performance.DtoModels;
using Performance.EntityModels;
using Performance.Infrastructure;
using Performance.Repository;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace Performance.Services
{
public class HistoryService : IAutoInjection
{
private readonly ILogger<EmployeeService> logger;
private readonly PerforReportoriginalsurgeryRepository reportoriginalsurgeryRepository;
private readonly PerforReportoriginalstaysRepository reportoriginalstaysRepository;
private readonly PerforReportoriginalpersontimeRepository reportoriginalpersontimeRepository;
public HistoryService(
ILogger<EmployeeService> logger,
PerforReportoriginalsurgeryRepository reportoriginalsurgeryRepository,
PerforReportoriginalstaysRepository reportoriginalstaysRepository,
PerforReportoriginalpersontimeRepository reportoriginalpersontimeRepository)
{
this.logger = logger;
this.reportoriginalsurgeryRepository = reportoriginalsurgeryRepository;
this.reportoriginalstaysRepository = reportoriginalstaysRepository;
this.reportoriginalpersontimeRepository = reportoriginalpersontimeRepository;
}
public void ImportHistoryData(int hospitalid, string path)
{
try
{
var entities = ReadExcelData(hospitalid, path);
var @data1 = entities.Where(w => w.SheetName == "工作量");
if (@data1.Any())
{
var years = @data1.Select(s => s.Year).Distinct().ToList();
var months = @data1.Select(s => s.Month).Distinct().ToList();
reportoriginalpersontimeRepository.RemoveRange(w => w.HospitalID == hospitalid && years.Contains(w.Year) && months.Contains(w.Month));
var @data = AutoMapper.Mapper.Map<List<report_original_persontime>>(@data1);
reportoriginalpersontimeRepository.AddRange(@data.ToArray());
}
var @data2 = entities.Where(w => w.SheetName == "手术量");
if (@data2.Any())
{
var years = @data2.Select(s => s.Year).Distinct().ToList();
var months = @data2.Select(s => s.Month).Distinct().ToList();
reportoriginalsurgeryRepository.RemoveRange(w => w.HospitalID == hospitalid && years.Contains(w.Year) && months.Contains(w.Month));
var @data = AutoMapper.Mapper.Map<List<report_original_surgery>>(@data2);
reportoriginalsurgeryRepository.AddRange(@data.ToArray());
}
var @data3 = entities.Where(w => w.SheetName == "住院天数");
if (@data3.Any())
{
var years = @data3.Select(s => s.Year).Distinct().ToList();
var months = @data3.Select(s => s.Month).Distinct().ToList();
reportoriginalstaysRepository.RemoveRange(w => w.HospitalID == hospitalid && years.Contains(w.Year) && months.Contains(w.Month));
var @data = AutoMapper.Mapper.Map<List<report_original_stays>>(@data3);
reportoriginalstaysRepository.AddRange(@data.ToArray());
}
}
catch (Exception ex)
{
logger.LogError(ex.ToString());
}
}
private List<HistoryData> ReadExcelData(int hospitalid, string path)
{
var entities = new List<HistoryData>();
var config = new[]
{
new { sheetName = "工作量", columnNames = new string[] { "年份", "月份", "来源", "核算单元", "科室", "数量" } },
new { sheetName = "手术量", columnNames = new string[] { "年份", "月份", "来源", "核算单元", "科室", "数量" } },
new { sheetName = "住院天数", columnNames = new string[] { "年份", "月份", "来源", "核算单元", "科室", "数量" } },
};
IWorkbook workbook = null;
var version = FileHelper.GetExtension(path) == ".xlsx" ? ExcelVersion.xlsx : ExcelVersion.xls;
using (FileStream fs = new FileStream(path, FileMode.OpenOrCreate))
{
workbook = (version == ExcelVersion.xlsx)
? (IWorkbook)(new XSSFWorkbook(fs))
: (IWorkbook)(new HSSFWorkbook(fs));
}
if (workbook == null) return entities;
foreach (var cfg in config)
{
var sheet = workbook.GetSheet(cfg.sheetName);
if (sheet == null) continue;
var firstRow = sheet.GetRow(0);
List<(string, int)> excelheader = new List<(string, int)>();
for (int cellindex = 0; cellindex < firstRow.LastCellNum + 1; cellindex++)
{
var cell = firstRow.GetCell(cellindex);
if (cell == null) continue;
if (!string.IsNullOrEmpty(cell.ToString()))
excelheader.Add((cell.ToString(), cellindex));
}
if (excelheader == null || !excelheader.Any())
throw new PerformanceException("上传excel内容错误");
Dictionary<string, int> dict = new Dictionary<string, int>();
cfg.columnNames.ToList().ForEach(w => dict.Add(w, -1));
List<string> errorHeaders = new List<string>();
foreach (var key in dict.Keys.ToList())
{
if (!excelheader.Select(t => t.Item1).Contains(key)) errorHeaders.Add(key);
else dict[key] = excelheader.First(t => t.Item1 == key).Item2;
}
if (errorHeaders != null && errorHeaders.Any())
throw new PerformanceException($"excel缺少列{string.Join(", ", errorHeaders)}");
for (int rowindex = 1; rowindex < sheet.LastRowNum + 1; rowindex++)
{
var row = sheet.GetRow(rowindex);
if (row == null) continue;
var entity = new HistoryData
{
SheetName = cfg.sheetName,
HospitalID = hospitalid,
Year = ConvertHelper.To<int>(row.GetCell(dict["年份"]).GetValue()),
Month = ConvertHelper.To<int>(row.GetCell(dict["月份"]).GetValue()),
SourceType = row.GetCell(dict["来源"]).GetValue(),
AccountingUnit = row.GetCell(dict["核算单元"]).GetValue(),
Department = row.GetCell(dict["科室"]).GetValue(),
ResultData = ConvertHelper.To<decimal>(row.GetCell(dict["数量"]).GetValue()),
};
entities.Add(entity);
}
}
return entities;
}
}
}
...@@ -133,6 +133,7 @@ public HospitalResponse Update(HospitalRequest request) ...@@ -133,6 +133,7 @@ public HospitalResponse Update(HospitalRequest request)
//hospital.IsOpenDirector = request.IsOpenDirector; //hospital.IsOpenDirector = request.IsOpenDirector;
hospital.IsOpenDrugprop = request.IsOpenDrugprop; hospital.IsOpenDrugprop = request.IsOpenDrugprop;
hospital.IsShowManage = request.IsShowManage; hospital.IsShowManage = request.IsShowManage;
hospital.IsOpenCMIPercent = request.IsOpenCMIPercent;
//hospital.IsOpenIncome = request.IsOpenIncome; //hospital.IsOpenIncome = request.IsOpenIncome;
if (!_hospitalRepository.Update(hospital)) if (!_hospitalRepository.Update(hospital))
......
...@@ -183,7 +183,7 @@ private bool EditAccountBasic(int userId, OriginalRequest request) ...@@ -183,7 +183,7 @@ private bool EditAccountBasic(int userId, OriginalRequest request)
{ "核算单元人员数量", nameof(im_accountbasic.DoctorNumber) }, { "核算单元人员数量", nameof(im_accountbasic.DoctorNumber) },
{ "预算比例", nameof(im_accountbasic.DoctorBasicFactor) }, { "预算比例", nameof(im_accountbasic.DoctorBasicFactor) },
//{ "倾斜系数", nameof(im_accountbasic.DoctorSlopeFactor) }, //{ "倾斜系数", nameof(im_accountbasic.DoctorSlopeFactor) },
{ "工作量倾斜系数", nameof(im_accountbasic.WorkSlopeFactor) }, //{ "工作量倾斜系数", nameof(im_accountbasic.WorkSlopeFactor) },
{ "保底绩效参考标准", nameof(im_accountbasic.MinimumReference) }, { "保底绩效参考标准", nameof(im_accountbasic.MinimumReference) },
{ "保底绩效系数", nameof(im_accountbasic.MinimumFactor) }, { "保底绩效系数", nameof(im_accountbasic.MinimumFactor) },
{ "其他绩效1", nameof(im_accountbasic.DoctorOtherPerfor1) }, { "其他绩效1", nameof(im_accountbasic.DoctorOtherPerfor1) },
......
...@@ -19,9 +19,13 @@ public class ExcelReadConfig ...@@ -19,9 +19,13 @@ public class ExcelReadConfig
new ColumnInfo(nameof(PerDataEmployee.FitPeopleRatio), "绩效基数核算系数", true), new ColumnInfo(nameof(PerDataEmployee.FitPeopleRatio), "绩效基数核算系数", true),
new ColumnInfo(nameof(PerDataEmployee.AccountType), "人员分类"), new ColumnInfo(nameof(PerDataEmployee.AccountType), "人员分类"),
new ColumnInfo(nameof(PerDataEmployee.PostCoefficient), "岗位系数", true), new ColumnInfo(nameof(PerDataEmployee.PostCoefficient), "岗位系数", true),
new ColumnInfo(nameof(PerDataEmployee.NightWorkPerfor), "夜班费"),
new ColumnInfo(nameof(PerDataEmployee.AssessBeforeOtherFee), "考核前其他绩效", true),
new ColumnInfo(nameof(PerDataEmployee.ScoreAverageRate), "考核得分率", true), new ColumnInfo(nameof(PerDataEmployee.ScoreAverageRate), "考核得分率", true),
new ColumnInfo(nameof(PerDataEmployee.AssessLaterOtherFee), "考核后其他绩效", true),
new ColumnInfo(nameof(PerDataEmployee.Attendance), "出勤率", true), new ColumnInfo(nameof(PerDataEmployee.Attendance), "出勤率", true),
new ColumnInfo(nameof(PerDataEmployee.Adjust), "调节系数", true), new ColumnInfo(nameof(PerDataEmployee.Adjust), "调节系数", true),
new ColumnInfo(nameof(PerDataEmployee.AdjustLaterOtherFee), "调节后其他绩效", true),
}; };
...@@ -34,14 +38,20 @@ public class ExcelReadConfig ...@@ -34,14 +38,20 @@ public class ExcelReadConfig
new ColumnInfo(nameof(PerDataClinicEmployee.DoctorName), "医生姓名"), new ColumnInfo(nameof(PerDataClinicEmployee.DoctorName), "医生姓名"),
new ColumnInfo(nameof(PerDataClinicEmployee.JobTitle), "职务分类"), new ColumnInfo(nameof(PerDataClinicEmployee.JobTitle), "职务分类"),
new ColumnInfo(nameof(PerDataClinicEmployee.Basics), "基础绩效系数", true), new ColumnInfo(nameof(PerDataClinicEmployee.Basics), "基础绩效系数", true),
new ColumnInfo(nameof(PerDataClinicEmployee.FitPeopleValue), "实际人均绩效", true),
new ColumnInfo(nameof(PerDataClinicEmployee.PermanentStaff), "效率绩效人数", true), new ColumnInfo(nameof(PerDataClinicEmployee.PermanentStaff), "效率绩效人数", true),
new ColumnInfo(nameof(PerDataClinicEmployee.Efficiency), "效率绩效系数", true), new ColumnInfo(nameof(PerDataClinicEmployee.Efficiency), "效率绩效系数", true),
new ColumnInfo(nameof(PerDataClinicEmployee.Scale), "规模绩效系数", true), new ColumnInfo(nameof(PerDataClinicEmployee.Scale), "规模绩效系数", true),
new ColumnInfo(nameof(PerDataClinicEmployee.Management), "管理绩效发放系数", true), new ColumnInfo(nameof(PerDataClinicEmployee.Management), "管理绩效发放系数", true),
new ColumnInfo(nameof(PerDataClinicEmployee.AssessBeforeOtherFee), "考核前其他绩效", true),
new ColumnInfo(nameof(PerDataClinicEmployee.ScoreAverageRate), "考核得分率", true), new ColumnInfo(nameof(PerDataClinicEmployee.ScoreAverageRate), "考核得分率", true),
new ColumnInfo(nameof(PerDataClinicEmployee.AssessLaterOtherFee), "考核后其他绩效", true),
new ColumnInfo(nameof(PerDataClinicEmployee.Attendance), "出勤率", true), new ColumnInfo(nameof(PerDataClinicEmployee.Attendance), "出勤率", true),
new ColumnInfo(nameof(PerDataClinicEmployee.OtheManagementPerfor), "其他管理绩效"), new ColumnInfo(nameof(PerDataClinicEmployee.OtherManagePerfor), "其他管理绩效"),
new ColumnInfo(nameof(PerDataClinicEmployee.OthePerfor), "其他绩效"),
//new ColumnInfo(nameof(PerDataClinicEmployee.NightWorkPerfor), "夜班费"),
new ColumnInfo(nameof(PerDataClinicEmployee.Adjust), "调节系数", true), new ColumnInfo(nameof(PerDataClinicEmployee.Adjust), "调节系数", true),
new ColumnInfo(nameof(PerDataClinicEmployee.AdjustLaterOtherFee), "调节后其他绩效", true),
}; };
...@@ -52,12 +62,13 @@ public class ExcelReadConfig ...@@ -52,12 +62,13 @@ public class ExcelReadConfig
new ColumnInfo(nameof(PerDataLogisticsEmployee.FitPeople), "绩效基数核算参考对象"), new ColumnInfo(nameof(PerDataLogisticsEmployee.FitPeople), "绩效基数核算参考对象"),
new ColumnInfo(nameof(PerDataLogisticsEmployee.FitPeopleValue), "绩效基础核算参考值", true), new ColumnInfo(nameof(PerDataLogisticsEmployee.FitPeopleValue), "绩效基础核算参考值", true),
new ColumnInfo(nameof(PerDataLogisticsEmployee.FitPeopleRatio), "绩效基数核算系数", true), new ColumnInfo(nameof(PerDataLogisticsEmployee.FitPeopleRatio), "绩效基数核算系数", true),
new ColumnInfo(nameof(PerDataLogisticsEmployee.JobNumber), "人员工号"), new ColumnInfo(nameof(PerDataLogisticsEmployee.PersonnelNumber), "人员工号"),
new ColumnInfo(nameof(PerDataLogisticsEmployee.DoctorName), "人员姓名"), new ColumnInfo(nameof(PerDataLogisticsEmployee.DoctorName), "人员姓名"),
new ColumnInfo(nameof(PerDataLogisticsEmployee.JobTitle), "职务分类"), new ColumnInfo(nameof(PerDataLogisticsEmployee.JobTitle), "职务分类"),
new ColumnInfo(nameof(PerDataLogisticsEmployee.PostCoefficient), "岗位系数", true), new ColumnInfo(nameof(PerDataLogisticsEmployee.PostCoefficient), "岗位系数", true),
new ColumnInfo(nameof(PerDataLogisticsEmployee.Attendance), "出勤率", true), new ColumnInfo(nameof(PerDataLogisticsEmployee.Attendance), "出勤率", true),
new ColumnInfo(nameof(PerDataLogisticsEmployee.OthePerfor), "其他绩效", true), new ColumnInfo(nameof(PerDataLogisticsEmployee.OthePerfor), "其他绩效", true),
new ColumnInfo(nameof(PerDataLogisticsEmployee.AdjustLaterOtherFee), "调节后其他绩效", true),
}; };
public static ColumnInfo[] AccountBaisc { get; set; } = new ColumnInfo[] public static ColumnInfo[] AccountBaisc { get; set; } = new ColumnInfo[]
...@@ -68,8 +79,11 @@ public class ExcelReadConfig ...@@ -68,8 +79,11 @@ public class ExcelReadConfig
new ColumnInfo(nameof(PerDataAccountBaisc.Number), "核算单元人员数量", true), new ColumnInfo(nameof(PerDataAccountBaisc.Number), "核算单元人员数量", true),
new ColumnInfo(nameof(PerDataAccountBaisc.BasicFactor), "预算比例", true), new ColumnInfo(nameof(PerDataAccountBaisc.BasicFactor), "预算比例", true),
new ColumnInfo(nameof(PerDataAccountBaisc.OtherPerfor1), "其他绩效1", true), new ColumnInfo(nameof(PerDataAccountBaisc.OtherPerfor1), "其他绩效1", true),
new ColumnInfo(nameof(PerDataAccountBaisc.AssessBeforeOtherFee), "考核前其他绩效", true),
new ColumnInfo(nameof(PerDataAccountBaisc.ScoringAverage), "考核得分率", true), new ColumnInfo(nameof(PerDataAccountBaisc.ScoringAverage), "考核得分率", true),
new ColumnInfo(nameof(PerDataAccountBaisc.AssessLaterOtherFee), "考核后其他绩效", true),
new ColumnInfo(nameof(PerDataAccountBaisc.AdjustFactor), "调节系数", true), new ColumnInfo(nameof(PerDataAccountBaisc.AdjustFactor), "调节系数", true),
new ColumnInfo(nameof(PerDataAccountBaisc.AdjustLaterOtherFee), "调节后其他绩效", true),
}; };
} }
......
...@@ -12,53 +12,53 @@ namespace Performance.Services ...@@ -12,53 +12,53 @@ namespace Performance.Services
{ {
public static class NopiSevice public static class NopiSevice
{ {
public static string GetCellStringValue(ICell cell) //public static string GetCellStringValue(ICell cell)
{ //{
if (cell != null) // if (cell != null)
{ // {
try // try
{ // {
switch (cell.CellType) // switch (cell.CellType)
{ // {
case CellType.Numeric: // case CellType.Numeric:
return cell.NumericCellValue.ToString().Replace("0", ""); // return cell.NumericCellValue.ToString().Replace("0", "");
case CellType.String: // case CellType.String:
return cell.StringCellValue.ToString().Replace("0", ""); // return cell.StringCellValue.ToString().Replace("0", "");
case CellType.Formula: // case CellType.Formula:
cell.SetCellType(CellType.String); // cell.SetCellType(CellType.String);
return cell.StringCellValue.ToString().Replace("0", ""); // return cell.StringCellValue.ToString().Replace("0", "");
} // }
} // }
catch (Exception ex) // catch (Exception ex)
{ // {
//throw ex; // //throw ex;
} // }
} // }
return null; // return null;
} //}
public static decimal? GetCellValue(ICell cell) //public static decimal? GetCellValue(ICell cell)
{ //{
if (cell != null) // if (cell != null)
{ // {
try // try
{ // {
switch (cell.CellType) // switch (cell.CellType)
{ // {
case CellType.Numeric: // case CellType.Numeric:
return ConvertHelper.To<decimal?>(cell.NumericCellValue); // return ConvertHelper.To<decimal?>(cell.NumericCellValue);
case CellType.String: // case CellType.String:
return ConvertHelper.To<decimal?>(cell.StringCellValue); // return ConvertHelper.To<decimal?>(cell.StringCellValue);
case CellType.Formula: // case CellType.Formula:
return ConvertHelper.To<decimal?>(cell.NumericCellValue); // return ConvertHelper.To<decimal?>(cell.NumericCellValue);
} // }
} // }
catch (Exception ex) // catch (Exception ex)
{ // {
//throw ex; // //throw ex;
} // }
} // }
return null; // return null;
} //}
public static string GetValue(this ICell cell) public static string GetValue(this ICell cell)
{ {
...@@ -73,7 +73,8 @@ public static string GetValue(this ICell cell) ...@@ -73,7 +73,8 @@ public static string GetValue(this ICell cell)
case CellType.String: case CellType.String:
return cell?.StringCellValue.ToString(); return cell?.StringCellValue.ToString();
case CellType.Formula: case CellType.Formula:
return cell?.NumericCellValue.ToString(); cell?.SetCellType(CellType.String);
return cell?.StringCellValue.ToString();
case CellType.Boolean: case CellType.Boolean:
return cell?.BooleanCellValue.ToString(); return cell?.BooleanCellValue.ToString();
case CellType.Unknown: case CellType.Unknown:
...@@ -97,25 +98,25 @@ public static bool TryGetPoint(List<PerHeader> headers, string title, out int po ...@@ -97,25 +98,25 @@ public static bool TryGetPoint(List<PerHeader> headers, string title, out int po
return x.HasValue; return x.HasValue;
} }
public static DateTime? GetCellDatetimeValue(ICell cell) //public static DateTime? GetCellDatetimeValue(ICell cell)
{ //{
if (cell != null) // if (cell != null)
{ // {
if (cell.CellType == CellType.Numeric) // if (cell.CellType == CellType.Numeric)
{ // {
if (HSSFDateUtil.IsCellDateFormatted(cell)) // if (HSSFDateUtil.IsCellDateFormatted(cell))
{ // {
return cell.DateCellValue; // return cell.DateCellValue;
} // }
} // }
else if (cell.CellType == CellType.String) // else if (cell.CellType == CellType.String)
{ // {
var reg = @"(19|20)\d{2}(-|/)[01]?\d(-|/)[0123]?\d( [012]?\d\:\d{2}\:\d{2})?"; // var reg = @"(19|20)\d{2}(-|/)[01]?\d(-|/)[0123]?\d( [012]?\d\:\d{2}\:\d{2})?";
if (!string.IsNullOrEmpty(cell.StringCellValue) && Regex.Match(cell.StringCellValue.Trim(), reg).ToString() == cell.StringCellValue.Trim()) // if (!string.IsNullOrEmpty(cell.StringCellValue) && Regex.Match(cell.StringCellValue.Trim(), reg).ToString() == cell.StringCellValue.Trim())
return ConvertHelper.To<DateTime>(cell.StringCellValue); // return ConvertHelper.To<DateTime>(cell.StringCellValue);
} // }
} // }
return null; // return null;
} //}
} }
} }
...@@ -72,6 +72,16 @@ public static IPerSheetDataRead GetDataRead(SheetType sheetType, bool isnew = fa ...@@ -72,6 +72,16 @@ public static IPerSheetDataRead GetDataRead(SheetType sheetType, bool isnew = fa
dataread = new PerSheetDataReadAccountExtra(); dataread = new PerSheetDataReadAccountExtra();
//dataread = new PerSheetDataReadAccountMaterialsAssess(); // 科室材料考核 //dataread = new PerSheetDataReadAccountMaterialsAssess(); // 科室材料考核
break; break;
case SheetType.AccountScoreAverage:
dataread = new PerSheetDataReadAccountExtra();
break;
case SheetType.AccountAdjustLaterOtherFee:
//dataread = new PerSheetDataReadPersonExtra(); // 科室调节后其他绩效
dataread = new PerSheetDataReadAccountExtra();
break;
case SheetType.PersonAdjustLaterOtherFee:
dataread = new PerSheetDataReadPersonExtra(); // 业务中层行政中高层调节后其他绩效
break;
} }
return dataread; return dataread;
} }
......
...@@ -104,6 +104,12 @@ public SheetType GetSheetType(string sheetName) ...@@ -104,6 +104,12 @@ public SheetType GetSheetType(string sheetName)
return SheetType.AccountDrugAssess; return SheetType.AccountDrugAssess;
else if (sheetName.StartsWith("5.4")) else if (sheetName.StartsWith("5.4"))
return SheetType.AccountMaterialsAssess; return SheetType.AccountMaterialsAssess;
else if (sheetName.StartsWith("6.1"))
return SheetType.AccountScoreAverage;
else if (sheetName.StartsWith("6.2"))
return SheetType.AccountAdjustLaterOtherFee;
else if (sheetName.StartsWith("6.3"))
return SheetType.PersonAdjustLaterOtherFee;
return SheetType.Unidentifiable; return SheetType.Unidentifiable;
} }
} }
......
...@@ -99,7 +99,7 @@ public PerSheet OnceCompute(PerSheet sheet, List<CofDrugProp> confs = null) ...@@ -99,7 +99,7 @@ public PerSheet OnceCompute(PerSheet sheet, List<CofDrugProp> confs = null)
/// </summary> /// </summary>
/// <param name="sheet"></param> /// <param name="sheet"></param>
/// <returns></returns> /// <returns></returns>
public (PerSheet Sheet, List<PerData> PerData) TwiceCompute(PerSheet sheet, List<CofDrugProp> confs = null, List<cof_cmi> cmis = null, List<cof_workitem> workitems = null, bool isDoctor = false) public (PerSheet Sheet, List<PerData> PerData) TwiceCompute(PerSheet sheet, sys_hospital hospital, List<CofDrugProp> confs = null, List<cof_cmi> cmis = null, List<cof_workitem> workitems = null, bool isDoctor = false)
{ {
//获取最大列坐标位置 //获取最大列坐标位置
int thiscell = sheet.PerHeader.OrderByDescending(t => t.PointCell).FirstOrDefault().PointCell + 1; int thiscell = sheet.PerHeader.OrderByDescending(t => t.PointCell).FirstOrDefault().PointCell + 1;
...@@ -115,7 +115,7 @@ public PerSheet OnceCompute(PerSheet sheet, List<CofDrugProp> confs = null) ...@@ -115,7 +115,7 @@ public PerSheet OnceCompute(PerSheet sheet, List<CofDrugProp> confs = null)
{ {
var ds = group.Select(t => var ds = group.Select(t =>
{ {
var (cellvalue, factor) = ComputValue(group, confs, cmis, workitems, isDoctor); var (cellvalue, factor) = ComputValue(group, hospital, confs, cmis, workitems, isDoctor);
var dto = new PerData var dto = new PerData
{ {
...@@ -140,7 +140,7 @@ public PerSheet OnceCompute(PerSheet sheet, List<CofDrugProp> confs = null) ...@@ -140,7 +140,7 @@ public PerSheet OnceCompute(PerSheet sheet, List<CofDrugProp> confs = null)
return (sheet, perDataList); return (sheet, perDataList);
} }
private (decimal?, decimal?) ComputValue(IGrouping<object, PerData> group, List<CofDrugProp> confs = null, List<cof_cmi> cmis = null, List<cof_workitem> workitems = null, bool isDoctor = false) private (decimal?, decimal?) ComputValue(IGrouping<object, PerData> group, sys_hospital hospital, List<CofDrugProp> confs = null, List<cof_cmi> cmis = null, List<cof_workitem> workitems = null, bool isDoctor = false)
{ {
var unittype = isDoctor ? new List<int> { (int)UnitType.医生组, (int)UnitType.医技组, (int)UnitType.专家组, (int)UnitType.其他医生组, (int)UnitType.其他医技组, (int)UnitType.特殊核算组 } : new List<int> { (int)UnitType.护理组, (int)UnitType.其他护理组 }; var unittype = isDoctor ? new List<int> { (int)UnitType.医生组, (int)UnitType.医技组, (int)UnitType.专家组, (int)UnitType.其他医生组, (int)UnitType.其他医技组, (int)UnitType.特殊核算组 } : new List<int> { (int)UnitType.护理组, (int)UnitType.其他护理组 };
...@@ -149,8 +149,8 @@ public PerSheet OnceCompute(PerSheet sheet, List<CofDrugProp> confs = null) ...@@ -149,8 +149,8 @@ public PerSheet OnceCompute(PerSheet sheet, List<CofDrugProp> confs = null)
return (group.Sum(s => s.IsFactor ? s.CellValue * s.FactorValue : s.CellValue), null); return (group.Sum(s => s.IsFactor ? s.CellValue * s.FactorValue : s.CellValue), null);
else else
{ {
var factor = confs?.FirstOrDefault(t => t.AccoutingUnit == group.First().AccountingUnit)?.Factor ?? 1; var factor = hospital.IsOpenDrugprop == 2 ? 1 : (confs?.FirstOrDefault(t => t.AccoutingUnit == group.First().AccountingUnit)?.Factor ?? 1);
var cmifactor = cmis?.FirstOrDefault(t => t.AccountingUnit == group.First().AccountingUnit && unittype.Contains(t.UnitType))?.Value ?? 1; var cmifactor = hospital.IsOpenCMIPercent == 2 ? 1 : (cmis?.FirstOrDefault(t => t.AccountingUnit == group.First().AccountingUnit && unittype.Contains(t.UnitType))?.Value ?? 1);
//需要乘系数的项 //需要乘系数的项
var fgroup = group.Where(t => workitems.Select(s => s.Item).Contains(t.TypeName)); var fgroup = group.Where(t => workitems.Select(s => s.Item).Contains(t.TypeName));
//需要乘系数的项 //需要乘系数的项
...@@ -171,7 +171,7 @@ public PerSheet OnceCompute(PerSheet sheet, List<CofDrugProp> confs = null) ...@@ -171,7 +171,7 @@ public PerSheet OnceCompute(PerSheet sheet, List<CofDrugProp> confs = null)
value += ngroup.Sum(s => value += ngroup.Sum(s =>
{ {
var cellvalue = s.IsFactor ? s.CellValue * s.FactorValue : s.CellValue; var cellvalue = s.IsFactor ? s.CellValue * s.FactorValue : s.CellValue;
if (workitems.Any(w => w.Type == 2) && workitems.Where(w => w.Type == 2).Select(q => q.Item).Contains(s.TypeName)) if (workitems.Any(w => w.Type == 1) && workitems.Where(w => w.Type == 1).Select(q => q.Item).Contains(s.TypeName))
{ {
cellvalue = cmifactor * cellvalue; cellvalue = cmifactor * cellvalue;
} }
......
...@@ -49,7 +49,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -49,7 +49,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
for (int c = 0; c < vhead.Count(); c++) for (int c = 0; c < vhead.Count(); c++)
{ {
var athead = vhead.ElementAt(c); var athead = vhead.ElementAt(c);
var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell)); //var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
var cellValue = ConvertHelper.To<decimal?>(row.GetCell(athead.PointCell).GetValue());
if (!cellValue.HasValue || cellValue.Value == 0) if (!cellValue.HasValue || cellValue.Value == 0)
continue; continue;
...@@ -57,8 +58,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -57,8 +58,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{ {
RowNumber = r, RowNumber = r,
SignID = athead.SignID, SignID = athead.SignID,
UnitType = NopiSevice.GetCellStringValue(row.GetCell(unit.UnitTypeNum.Value)), UnitType = row.GetCell(unit.UnitTypeNum.Value).GetValue(),
AccountingUnit = NopiSevice.GetCellStringValue(row.GetCell(unit.AccountingUnitCellNum.Value)), AccountingUnit = row.GetCell(unit.AccountingUnitCellNum.Value).GetValue(),
TypeName = athead?.CellValue, TypeName = athead?.CellValue,
CellValue = cellValue, CellValue = cellValue,
Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String, Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String,
...@@ -68,11 +69,11 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -68,11 +69,11 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
if (Point.TotalCellNum.HasValue && athead.PointCell == Point.TotalCellNum) if (Point.TotalCellNum.HasValue && athead.PointCell == Point.TotalCellNum)
data.IsTotal = 1; data.IsTotal = 1;
if (unit.DeptCellNum.HasValue) if (unit.DeptCellNum.HasValue)
data.Department = NopiSevice.GetCellStringValue(row.GetCell(unit.DeptCellNum.Value)); data.Department = row.GetCell(unit.DeptCellNum.Value).GetValue();
if (unit.EmpNameCellNum.HasValue) if (unit.EmpNameCellNum.HasValue)
data.EmployeeName = NopiSevice.GetCellStringValue(row.GetCell(unit.EmpNameCellNum.Value)); data.EmployeeName = row.GetCell(unit.EmpNameCellNum.Value).GetValue();
if (unit.JobCellNum.HasValue) if (unit.JobCellNum.HasValue)
data.JobNumber = NopiSevice.GetCellStringValue(row.GetCell(unit.JobCellNum.Value)); data.JobNumber = row.GetCell(unit.JobCellNum.Value).GetValue();
if (string.IsNullOrEmpty(data.AccountingUnit) && string.IsNullOrEmpty(data.Department)) if (string.IsNullOrEmpty(data.AccountingUnit) && string.IsNullOrEmpty(data.Department))
......
...@@ -68,20 +68,21 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -68,20 +68,21 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
for (int c = 0; c < vhead.Count(); c++) for (int c = 0; c < vhead.Count(); c++)
{ {
var athead = vhead.ElementAt(c); var athead = vhead.ElementAt(c);
var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell)); //var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
var cellValue = ConvertHelper.To<decimal?>(row.GetCell(athead.PointCell).GetValue());
if (!cellValue.HasValue || cellValue.Value == 0) if (!cellValue.HasValue || cellValue.Value == 0)
continue; continue;
PerData data = new PerData PerData data = new PerData
{ {
RowNumber = r, RowNumber = r,
SignID = athead.SignID, SignID = athead.SignID,
AccountingUnit = NopiSevice.GetCellStringValue(row.GetCell(unit.AccountingUnitCellNum.Value)), AccountingUnit = row.GetCell(unit.AccountingUnitCellNum.Value).GetValue(),
Department = NopiSevice.GetCellStringValue(row.GetCell(unit.DeptCellNum.Value)), Department = row.GetCell(unit.DeptCellNum.Value).GetValue(),
TypeName = athead?.CellValue, TypeName = athead?.CellValue,
CellValue = cellValue, CellValue = cellValue,
Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String, Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String,
UnitType = unit.UnitType, //手动匹配 UnitType = unit.UnitType, //手动匹配
FactorValue = ConvertHelper.To<decimal?>(sheet.GetRow(unit.FactorRow.Value).GetCell(athead.PointCell)?.NumericCellValue), FactorValue = ConvertHelper.To<decimal?>(sheet.GetRow(unit.FactorRow.Value).GetCell(athead.PointCell).GetValue()),
IsFactor = true, IsFactor = true,
}; };
dataList.Add(data); dataList.Add(data);
......
...@@ -45,7 +45,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -45,7 +45,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
for (int c = 0; c < vhead.Count(); c++) for (int c = 0; c < vhead.Count(); c++)
{ {
var athead = vhead.ElementAt(c); var athead = vhead.ElementAt(c);
var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell)); //var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
var cellValue = ConvertHelper.To<decimal?>(row.GetCell(athead.PointCell).GetValue());
if (!cellValue.HasValue || cellValue.Value == 0) if (!cellValue.HasValue || cellValue.Value == 0)
continue; continue;
...@@ -53,7 +54,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -53,7 +54,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{ {
RowNumber = r, RowNumber = r,
SignID = athead.SignID, SignID = athead.SignID,
AccountingUnit = NopiSevice.GetCellStringValue(row.GetCell(unit.AccountingUnitCellNum.Value)), AccountingUnit = row.GetCell(unit.AccountingUnitCellNum.Value).GetValue(),
//Department = NopiSevice.GetCellStringValue(row.GetCell(unit.DeptCellNum.Value)), //Department = NopiSevice.GetCellStringValue(row.GetCell(unit.DeptCellNum.Value)),
TypeName = athead?.CellValue, TypeName = athead?.CellValue,
CellValue = cellValue, CellValue = cellValue,
......
...@@ -70,7 +70,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -70,7 +70,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
continue; continue;
if (!string.IsNullOrEmpty(athead?.CellValue) && athead.CellValue.Contains("备注")) if (!string.IsNullOrEmpty(athead?.CellValue) && athead.CellValue.Contains("备注"))
continue; continue;
var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell)); //var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
var cellValue = ConvertHelper.To<decimal?>(row.GetCell(athead.PointCell).GetValue());
if (!cellValue.HasValue || cellValue.Value == 0) if (!cellValue.HasValue || cellValue.Value == 0)
continue; continue;
...@@ -78,8 +79,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -78,8 +79,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{ {
RowNumber = r, RowNumber = r,
SignID = athead.SignID, SignID = athead.SignID,
AccountingUnit = NopiSevice.GetCellStringValue(row.GetCell(unit.AccountingUnitCellNum.Value)), AccountingUnit = row.GetCell(unit.AccountingUnitCellNum.Value).GetValue(),
Department = NopiSevice.GetCellStringValue(row.GetCell(unit.DeptCellNum.Value)), Department = row.GetCell(unit.DeptCellNum.Value).GetValue(),
TypeName = athead?.CellValue, TypeName = athead?.CellValue,
CellValue = cellValue, CellValue = cellValue,
Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String, Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String,
......
...@@ -66,15 +66,16 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -66,15 +66,16 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
for (int c = 0; c < vhead.Count(); c++) for (int c = 0; c < vhead.Count(); c++)
{ {
var athead = vhead.ElementAt(c); var athead = vhead.ElementAt(c);
var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell)); //var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
var cellValue = ConvertHelper.To<decimal?>(row.GetCell(athead.PointCell).GetValue());
if (!cellValue.HasValue || cellValue.Value == 0) if (!cellValue.HasValue || cellValue.Value == 0)
continue; continue;
PerData data = new PerData PerData data = new PerData
{ {
RowNumber = r, RowNumber = r,
SignID = athead.SignID, SignID = athead.SignID,
AccountingUnit = NopiSevice.GetCellStringValue(row.GetCell(unit.AccountingUnitCellNum.Value)), AccountingUnit = row.GetCell(unit.AccountingUnitCellNum.Value).GetValue(),
Department = NopiSevice.GetCellStringValue(row.GetCell(unit.DeptCellNum.Value)), Department = row.GetCell(unit.DeptCellNum.Value).GetValue(),
TypeName = athead?.CellValue, TypeName = athead?.CellValue,
CellValue = cellValue, CellValue = cellValue,
Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String, Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String,
......
...@@ -66,15 +66,16 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -66,15 +66,16 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
for (int c = 0; c < vhead.Count(); c++) for (int c = 0; c < vhead.Count(); c++)
{ {
var athead = vhead.ElementAt(c); var athead = vhead.ElementAt(c);
var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell)); //var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
var cellValue = ConvertHelper.To<decimal?>(row.GetCell(athead.PointCell).GetValue());
if (!cellValue.HasValue || cellValue.Value == 0) if (!cellValue.HasValue || cellValue.Value == 0)
continue; continue;
PerData data = new PerData PerData data = new PerData
{ {
RowNumber = r, RowNumber = r,
SignID = athead.SignID, SignID = athead.SignID,
AccountingUnit = NopiSevice.GetCellStringValue(row.GetCell(unit.AccountingUnitCellNum.Value)), AccountingUnit = row.GetCell(unit.AccountingUnitCellNum.Value).GetValue(),
Department = NopiSevice.GetCellStringValue(row.GetCell(unit.DeptCellNum.Value)), Department = row.GetCell(unit.DeptCellNum.Value).GetValue(),
TypeName = athead?.CellValue, TypeName = athead?.CellValue,
CellValue = cellValue, CellValue = cellValue,
Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String, Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String,
......
...@@ -48,7 +48,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -48,7 +48,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
for (int c = 0; c < vhead.Count(); c++) for (int c = 0; c < vhead.Count(); c++)
{ {
var athead = vhead.ElementAt(c); var athead = vhead.ElementAt(c);
var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell)); //var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
var cellValue = ConvertHelper.To<decimal?>(row.GetCell(athead.PointCell).GetValue());
if (!cellValue.HasValue || cellValue.Value == 0) if (!cellValue.HasValue || cellValue.Value == 0)
continue; continue;
...@@ -56,8 +57,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -56,8 +57,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{ {
RowNumber = r, RowNumber = r,
SignID = athead.SignID, SignID = athead.SignID,
UnitType = NopiSevice.GetCellStringValue(row.GetCell(unit.UnitTypeNum.Value)), UnitType = row.GetCell(unit.UnitTypeNum.Value).GetValue(),
AccountingUnit = NopiSevice.GetCellStringValue(row.GetCell(unit.AccountingUnitCellNum.Value)), AccountingUnit = row.GetCell(unit.AccountingUnitCellNum.Value).GetValue(),
TypeName = athead?.CellValue, TypeName = athead?.CellValue,
CellValue = cellValue, CellValue = cellValue,
Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String, Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String,
...@@ -67,11 +68,11 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -67,11 +68,11 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
if (Point.TotalCellNum.HasValue && athead.PointCell == Point.TotalCellNum) if (Point.TotalCellNum.HasValue && athead.PointCell == Point.TotalCellNum)
data.IsTotal = 1; data.IsTotal = 1;
if (unit.DeptCellNum.HasValue) if (unit.DeptCellNum.HasValue)
data.Department = NopiSevice.GetCellStringValue(row.GetCell(unit.DeptCellNum.Value)); data.Department = row.GetCell(unit.DeptCellNum.Value).GetValue();
if (unit.EmpNameCellNum.HasValue) if (unit.EmpNameCellNum.HasValue)
data.EmployeeName = NopiSevice.GetCellStringValue(row.GetCell(unit.EmpNameCellNum.Value)); data.EmployeeName = row.GetCell(unit.EmpNameCellNum.Value).GetValue();
if (unit.JobCellNum.HasValue) if (unit.JobCellNum.HasValue)
data.JobNumber = NopiSevice.GetCellStringValue(row.GetCell(unit.JobCellNum.Value)); data.JobNumber = row.GetCell(unit.JobCellNum.Value).GetValue();
if (string.IsNullOrEmpty(data.AccountingUnit) && string.IsNullOrEmpty(data.Department)) if (string.IsNullOrEmpty(data.AccountingUnit) && string.IsNullOrEmpty(data.Department))
......
...@@ -46,7 +46,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -46,7 +46,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
for (int c = 0; c < vhead.Count(); c++) for (int c = 0; c < vhead.Count(); c++)
{ {
var athead = vhead.ElementAt(c); var athead = vhead.ElementAt(c);
var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell)); //var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
var cellValue = ConvertHelper.To<decimal?>(row.GetCell(athead.PointCell).GetValue());
if (!cellValue.HasValue || cellValue.Value == 0) if (!cellValue.HasValue || cellValue.Value == 0)
continue; continue;
...@@ -54,13 +55,13 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -54,13 +55,13 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{ {
RowNumber = r, RowNumber = r,
SignID = athead.SignID, SignID = athead.SignID,
AccountingUnit = NopiSevice.GetCellStringValue(row.GetCell(unit.AccountingUnitCellNum.Value)), AccountingUnit = row.GetCell(unit.AccountingUnitCellNum.Value).GetValue(),
Department = NopiSevice.GetCellStringValue(row.GetCell(unit.DeptCellNum.Value)), Department = row.GetCell(unit.DeptCellNum.Value).GetValue(),
TypeName = athead?.CellValue, TypeName = athead?.CellValue,
CellValue = cellValue, CellValue = cellValue,
Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String, Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String,
UnitType = unit.UnitType, UnitType = unit.UnitType,
FactorValue = ConvertHelper.To<decimal?>(sheet.GetRow(unit.FactorRow.Value).GetCell(athead.PointCell)?.NumericCellValue), FactorValue = ConvertHelper.To<decimal?>(sheet.GetRow(unit.FactorRow.Value).GetCell(athead.PointCell).GetValue()),
IsFactor = true, IsFactor = true,
}; };
if (sheet.SheetName.Contains("医生组")) if (sheet.SheetName.Contains("医生组"))
......
...@@ -358,7 +358,8 @@ private bool IsMedical(int userId) ...@@ -358,7 +358,8 @@ private bool IsMedical(int userId)
{ {
var userrole = userroleRepository.GetEntity(t => t.UserID == userId); var userrole = userroleRepository.GetEntity(t => t.UserID == userId);
var role = roleRepository.GetEntity(t => t.ID == userrole.RoleID); var role = roleRepository.GetEntity(t => t.ID == userrole.RoleID);
if (role.Type == application.DirectorRole || role.Type == application.NurseRole) var roleTypes = new[] { application.NurseRole, application.DirectorRole, application.SpecialRole, application.OfficeRole };
if (role.Type.HasValue && roleTypes.Contains(role.Type.Value))
return true; return true;
else else
return false; return false;
......
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