Commit 0dab9603 by ruyun.zhang@suvalue.com

大屏初始稳定版

parents be771d58 f4c739f7
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "5.0.1",
"commands": [
"dotnet-ef"
]
}
}
}
\ No newline at end of file
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Performance.Services.Queues;
using System;
using System.Threading;
using System.Threading.Tasks;
namespace Performance.Api
{
public class QueuedHostedService : BackgroundService
{
private readonly ILogger<QueuedHostedService> _logger;
public QueuedHostedService(
IBackgroundTaskQueue taskQueue,
ILogger<QueuedHostedService> logger)
{
TaskQueue = taskQueue;
_logger = logger;
}
public IBackgroundTaskQueue TaskQueue { get; }
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
_logger.LogInformation(
$"Queued Hosted Service is running.{Environment.NewLine} {Environment.NewLine}Tap W to add a work item to the background queue.{Environment.NewLine}");
await BackgroundProcessing(stoppingToken);
}
private async Task BackgroundProcessing(CancellationToken stoppingToken)
{
while (!stoppingToken.IsCancellationRequested)
{
var workItem =
await TaskQueue.DequeueAsync(stoppingToken);
try
{
await workItem(stoppingToken);
}
catch (Exception ex)
{
_logger.LogError(ex,
"Error occurred executing {WorkItem}.", nameof(workItem));
}
}
}
public override async Task StopAsync(CancellationToken stoppingToken)
{
_logger.LogInformation("Queued Hosted Service is stopping.");
await base.StopAsync(stoppingToken);
}
}
}
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
using Performance.EntityModels; using Performance.EntityModels;
using Performance.Infrastructure; using Performance.Infrastructure;
using Performance.Services; using Performance.Services;
using Performance.Services.ExtractExcelService;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
...@@ -85,6 +86,9 @@ public ApiResponse Import([FromForm] IFormCollection form) ...@@ -85,6 +86,9 @@ public ApiResponse Import([FromForm] IFormCollection form)
if (file == null) if (file == null)
return new ApiResponse(ResponseType.Fail, "参数错误", "文件无效"); return new ApiResponse(ResponseType.Fail, "参数错误", "文件无效");
if (!ExtractHelper.IsXlsxFile(file.FileName))
return new ApiResponse(ResponseType.Fail, "文件格式错误", "文件暂只支持xlsx文件");
var again = againAllotService.GetAgainallot(againid); var again = againAllotService.GetAgainallot(againid);
if (again == null) if (again == null)
return new ApiResponse(ResponseType.Fail, "二次绩效记录不存在"); return new ApiResponse(ResponseType.Fail, "二次绩效记录不存在");
...@@ -116,49 +120,49 @@ public ApiResponse Import([FromForm] IFormCollection form) ...@@ -116,49 +120,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>
/// 查看绩效详情 /// 查看绩效详情
......
using FluentValidation.AspNetCore; using FluentValidation.AspNetCore;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.Options;
using Newtonsoft.Json.Linq;
using Performance.DtoModels; using Performance.DtoModels;
using Performance.DtoModels.AppSettings;
using Performance.EntityModels;
using Performance.Infrastructure;
using Performance.Services; using Performance.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Performance.Api.Controllers namespace Performance.Api.Controllers
{ {
...@@ -21,6 +11,7 @@ public class AssessController : Controller ...@@ -21,6 +11,7 @@ public class AssessController : Controller
private ClaimService claimService; private ClaimService claimService;
private AssessService assessService; private AssessService assessService;
private UserService userService; private UserService userService;
public AssessController(ClaimService claimService, public AssessController(ClaimService claimService,
AssessService assessService, UserService userService) AssessService assessService, UserService userService)
{ {
...@@ -32,7 +23,7 @@ public class AssessController : Controller ...@@ -32,7 +23,7 @@ public class AssessController : Controller
//考核类别列表 //考核类别列表
[HttpPost] [HttpPost]
[Route("assesslist")] [Route("assesslist")]
public ApiResponse AssessList([CustomizeValidator(RuleSet = "List"), FromBody]AssessRequest request) public ApiResponse AssessList([CustomizeValidator(RuleSet = "List"), FromBody] AssessRequest request)
{ {
return assessService.AssessList(request.AllotID); return assessService.AssessList(request.AllotID);
} }
...@@ -40,7 +31,7 @@ public ApiResponse AssessList([CustomizeValidator(RuleSet = "List"), FromBody]As ...@@ -40,7 +31,7 @@ public ApiResponse AssessList([CustomizeValidator(RuleSet = "List"), FromBody]As
//新增考核类别 //新增考核类别
[HttpPost] [HttpPost]
[Route("addassess")] [Route("addassess")]
public ApiResponse AddAssess([CustomizeValidator(RuleSet = "Add"), FromBody]AssessRequest request) public ApiResponse AddAssess([CustomizeValidator(RuleSet = "Add"), FromBody] AssessRequest request)
{ {
return assessService.AddAssess(request.AllotID, request.AssessName); return assessService.AddAssess(request.AllotID, request.AssessName);
} }
...@@ -48,7 +39,7 @@ public ApiResponse AddAssess([CustomizeValidator(RuleSet = "Add"), FromBody]Asse ...@@ -48,7 +39,7 @@ public ApiResponse AddAssess([CustomizeValidator(RuleSet = "Add"), FromBody]Asse
//修改考核类别 //修改考核类别
[HttpPost] [HttpPost]
[Route("editassess")] [Route("editassess")]
public ApiResponse EditAssess([CustomizeValidator(RuleSet = "Update"), FromBody]AssessRequest request) public ApiResponse EditAssess([CustomizeValidator(RuleSet = "Update"), FromBody] AssessRequest request)
{ {
return assessService.EditAssess(request.AssessID, request.AssessName); return assessService.EditAssess(request.AssessID, request.AssessName);
} }
...@@ -56,7 +47,7 @@ public ApiResponse EditAssess([CustomizeValidator(RuleSet = "Update"), FromBody] ...@@ -56,7 +47,7 @@ public ApiResponse EditAssess([CustomizeValidator(RuleSet = "Update"), FromBody]
//删除考核类别 //删除考核类别
[HttpPost] [HttpPost]
[Route("delassess")] [Route("delassess")]
public ApiResponse DelAssess([CustomizeValidator(RuleSet = "Del"), FromBody]AssessRequest request) public ApiResponse DelAssess([CustomizeValidator(RuleSet = "Del"), FromBody] AssessRequest request)
{ {
return assessService.DelAssess(request.AssessID); return assessService.DelAssess(request.AssessID);
} }
...@@ -64,7 +55,7 @@ public ApiResponse DelAssess([CustomizeValidator(RuleSet = "Del"), FromBody]Asse ...@@ -64,7 +55,7 @@ public ApiResponse DelAssess([CustomizeValidator(RuleSet = "Del"), FromBody]Asse
//获取所有科室列表 //获取所有科室列表
[HttpPost] [HttpPost]
[Route("departmentlist")] [Route("departmentlist")]
public ApiResponse DepartmentList([CustomizeValidator(RuleSet = "Use"), FromBody]AssessRequest request) public ApiResponse DepartmentList([CustomizeValidator(RuleSet = "Use"), FromBody] AssessRequest request)
{ {
var department = assessService.Department(request); var department = assessService.Department(request);
return new ApiResponse(ResponseType.OK, "ok", department); return new ApiResponse(ResponseType.OK, "ok", department);
...@@ -73,7 +64,7 @@ public ApiResponse DepartmentList([CustomizeValidator(RuleSet = "Use"), FromBody ...@@ -73,7 +64,7 @@ public ApiResponse DepartmentList([CustomizeValidator(RuleSet = "Use"), FromBody
//设置科室考核分类 //设置科室考核分类
[HttpPost] [HttpPost]
[Route("setassesstype")] [Route("setassesstype")]
public ApiResponse SetAssessType([FromBody]SetAssessRequest request) public ApiResponse SetAssessType([FromBody] SetAssessRequest request)
{ {
return assessService.SetAssessType(request); return assessService.SetAssessType(request);
} }
...@@ -81,7 +72,7 @@ public ApiResponse SetAssessType([FromBody]SetAssessRequest request) ...@@ -81,7 +72,7 @@ public ApiResponse SetAssessType([FromBody]SetAssessRequest request)
//考核列头列表 //考核列头列表
[HttpPost] [HttpPost]
[Route("columnlist")] [Route("columnlist")]
public ApiResponse ColumnList([CustomizeValidator(RuleSet = "List"), FromBody]AssessColumnRequest request) public ApiResponse ColumnList([CustomizeValidator(RuleSet = "List"), FromBody] AssessColumnRequest request)
{ {
return assessService.ColumnList(request.AssessID); return assessService.ColumnList(request.AssessID);
} }
...@@ -89,7 +80,7 @@ public ApiResponse ColumnList([CustomizeValidator(RuleSet = "List"), FromBody]As ...@@ -89,7 +80,7 @@ public ApiResponse ColumnList([CustomizeValidator(RuleSet = "List"), FromBody]As
//新增考核项 //新增考核项
[HttpPost] [HttpPost]
[Route("addcolumn")] [Route("addcolumn")]
public ApiResponse AddColumn([CustomizeValidator(RuleSet = "Add"), FromBody]AssessColumnRequest request) public ApiResponse AddColumn([CustomizeValidator(RuleSet = "Add"), FromBody] AssessColumnRequest request)
{ {
return assessService.AddColumn(request.AssessID, request.ParentID, request.ColumnName, request.Sort); return assessService.AddColumn(request.AssessID, request.ParentID, request.ColumnName, request.Sort);
} }
...@@ -97,7 +88,7 @@ public ApiResponse AddColumn([CustomizeValidator(RuleSet = "Add"), FromBody]Asse ...@@ -97,7 +88,7 @@ public ApiResponse AddColumn([CustomizeValidator(RuleSet = "Add"), FromBody]Asse
//修改考核项 //修改考核项
[HttpPost] [HttpPost]
[Route("editcolumn")] [Route("editcolumn")]
public ApiResponse EditColumn([CustomizeValidator(RuleSet = "Update"), FromBody]AssessColumnRequest request) public ApiResponse EditColumn([CustomizeValidator(RuleSet = "Update"), FromBody] AssessColumnRequest request)
{ {
return assessService.EditColumn(request.ColumnID, request.ColumnName, request.Sort); return assessService.EditColumn(request.ColumnID, request.ColumnName, request.Sort);
} }
...@@ -105,7 +96,7 @@ public ApiResponse EditColumn([CustomizeValidator(RuleSet = "Update"), FromBody] ...@@ -105,7 +96,7 @@ public ApiResponse EditColumn([CustomizeValidator(RuleSet = "Update"), FromBody]
//删除考核项 //删除考核项
[HttpPost] [HttpPost]
[Route("delcolumn")] [Route("delcolumn")]
public ApiResponse DelColumn([CustomizeValidator(RuleSet = "Del"), FromBody]AssessColumnRequest request) public ApiResponse DelColumn([CustomizeValidator(RuleSet = "Del"), FromBody] AssessColumnRequest request)
{ {
return assessService.DelColumn(request.ColumnID); return assessService.DelColumn(request.ColumnID);
} }
...@@ -113,7 +104,7 @@ public ApiResponse DelColumn([CustomizeValidator(RuleSet = "Del"), FromBody]Asse ...@@ -113,7 +104,7 @@ public ApiResponse DelColumn([CustomizeValidator(RuleSet = "Del"), FromBody]Asse
//考核数据列表 //考核数据列表
[HttpPost] [HttpPost]
[Route("datalist")] [Route("datalist")]
public ApiResponse DataList([CustomizeValidator(RuleSet = "List"), FromBody]AssessDataRequest request) public ApiResponse DataList([CustomizeValidator(RuleSet = "List"), FromBody] AssessDataRequest request)
{ {
return assessService.DataList(request.AssessID); return assessService.DataList(request.AssessID);
} }
...@@ -121,7 +112,7 @@ public ApiResponse DataList([CustomizeValidator(RuleSet = "List"), FromBody]Asse ...@@ -121,7 +112,7 @@ public ApiResponse DataList([CustomizeValidator(RuleSet = "List"), FromBody]Asse
//考核数据修改 //考核数据修改
[HttpPost] [HttpPost]
[Route("editassessdata")] [Route("editassessdata")]
public ApiResponse EditAssessData([CustomizeValidator(RuleSet = "Edit"), FromBody]AssessDataRequest request) public ApiResponse EditAssessData([CustomizeValidator(RuleSet = "Edit"), FromBody] AssessDataRequest request)
{ {
return assessService.EditAssessData(request.AssessRow); return assessService.EditAssessData(request.AssessRow);
} }
...@@ -137,7 +128,7 @@ public ApiResponse TempAssessList() ...@@ -137,7 +128,7 @@ public ApiResponse TempAssessList()
//模板列头列表 //模板列头列表
[HttpPost] [HttpPost]
[Route("tempcolumnlist")] [Route("tempcolumnlist")]
public ApiResponse TempColumnList([CustomizeValidator(RuleSet = "List"), FromBody]AssessColumnRequest request) public ApiResponse TempColumnList([CustomizeValidator(RuleSet = "List"), FromBody] AssessColumnRequest request)
{ {
return assessService.TempColumnList(request.AssessID); return assessService.TempColumnList(request.AssessID);
} }
...@@ -145,9 +136,9 @@ public ApiResponse TempColumnList([CustomizeValidator(RuleSet = "List"), FromBod ...@@ -145,9 +136,9 @@ public ApiResponse TempColumnList([CustomizeValidator(RuleSet = "List"), FromBod
//使用考核模版 //使用考核模版
[HttpPost] [HttpPost]
[Route("usetemplate")] [Route("usetemplate")]
public ApiResponse UseTemplate([CustomizeValidator(RuleSet = "Use"), FromBody]AssessRequest request) public ApiResponse UseTemplate([CustomizeValidator(RuleSet = "Use"), FromBody] AssessRequest request)
{ {
return assessService.UseTemplate(request.AllotID, request.AssessID); return assessService.UseTemplate(request.AllotID, request.AssessID);
} }
} }
} }
\ No newline at end of file
...@@ -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
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Performance.DtoModels;
using Performance.DtoModels.Response;
using Performance.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Performance.Api.Controllers
{
[Route("api/collect")]
[ApiController]
public class CollectController : ControllerBase
{
private readonly ILogger<CollectController> logger;
private readonly ClaimService claim;
private readonly CollectService collectService;
public CollectController(
ILogger<CollectController> logger,
ClaimService claim,
CollectService collectService)
{
this.logger = logger;
this.claim = claim;
this.collectService = collectService;
}
/// <summary>
/// 查询采集内容
/// </summary>
[HttpPost]
[Route("getcollectcontent")]
public ApiResponse GetCollectContent([FromQuery] int hospitalId, [FromQuery] int userId)
{
if (hospitalId <= 0)
return new ApiResponse(ResponseType.ParameterError, "参数无效");
var result = collectService.GetCollectContent(hospitalId, userId);
return new ApiResponse(ResponseType.OK, result);
}
/// <summary>
/// 设置采集录入权限
/// </summary>
[HttpPost]
[Route("setpermission/{userid}")]
public ApiResponse SetPermission(int userid, [FromBody] IEnumerable<CollectPermission> collects)
{
if (collects == null || !collects.Any())
return new ApiResponse(ResponseType.ParameterError, "参数无效");
collectService.SetPermission(userid, collects);
return new ApiResponse(ResponseType.OK);
}
/// <summary>
/// 获取采集SHEET名称
/// </summary>
[HttpPost]
[Route("getcollectsheet/{hospitalId}")]
public ApiResponse GetCollectSheet(int hospitalId)
{
if (hospitalId <= 0)
return new ApiResponse(ResponseType.ParameterError, "参数无效");
var regex = new Regex("^[0-9]");
var userId = claim.GetUserId();
var result = collectService.GetCollectSheet(hospitalId, userId)
?.Where(w => !collectService.retain.Contains(w.HeadName))
?.Select(w => new { w.SheetType, w.SheetName })
.Distinct()
.ToList();
//result?.Add(new { SheetType = -1, SheetName = "预留比例" });
if (result == null || !result.Any()) return new ApiResponse(ResponseType.OK, "", new List<string>());
result = result.OrderBy(w => regex.IsMatch(w.SheetName) ? w.SheetName : $"0{w.SheetName}")
.ThenBy(w => w.SheetType)
.ToList();
return new ApiResponse(ResponseType.OK, result);
}
/// <summary>
/// 加载采集内容
/// </summary>
[HttpPost]
[Route("getcollectdata/{allotId}")]
public ApiResponse GetCollectData(int allotId, [FromQuery] string sheetName)
{
if (allotId <= 0)
return new ApiResponse(ResponseType.ParameterError, "参数无效");
var userId = claim.GetUserId();
var result = collectService.GetCollectData(userId, allotId, sheetName);
return new ApiResponse(ResponseType.OK, result);
}
/// <summary>
/// 保存采集内容
/// </summary>
[HttpPost]
[Route("savecollectdata/{allotId}")]
public ApiResponse SaveCollectData(int allotId, [FromBody] SaveCollectData request)
{
if (allotId <= 0)
return new ApiResponse(ResponseType.ParameterError, "参数无效");
collectService.SaveCollectData(allotId, request);
return new ApiResponse(ResponseType.OK);
}
}
}
\ No newline at end of file
using GraphQL;
using GraphQL.Types;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Performance.DtoModels;
using System.Threading.Tasks;
namespace Performance.Api
{
[AllowAnonymous]
[Route("api/graphql")]
[ApiController]
public class GraphQLController : ControllerBase
{
public ISchema performanceSchema { get; }
public IDocumentExecuter documentExecuter { get; }
public ILogger logger { get; set; }
public GraphQLController(ISchema performanceSchema, IDocumentExecuter documentExecuter, ILogger<GraphQLController> logger)
{
this.performanceSchema = performanceSchema;
this.documentExecuter = documentExecuter;
this.logger = logger;
}
/// <summary>
/// GraphQL请求地址
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
[HttpPost]
public async Task<ApiResponse> Post(GraphQLRequest query)
{
var result = await documentExecuter.ExecuteAsync(options =>
{
options.Schema = performanceSchema;
options.Query = query.Query;
});
if (result.Errors?.Count > 0)
{
return new ApiResponse(ResponseType.Error, result.Errors);
}
return new ApiResponse(ResponseType.OK, result.Data);
}
}
}
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;
using Performance.Services.ExtractExcelService;
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, "参数错误", "文件无效");
if (!ExtractHelper.IsXlsxFile(file.FileName))
return new ApiResponse(ResponseType.Fail, "文件格式错误", "文件暂只支持xlsx文件");
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);
}
}
}
...@@ -25,7 +25,6 @@ public HospitalController(HospitalService hospitalService, ClaimService claimSer ...@@ -25,7 +25,6 @@ public HospitalController(HospitalService hospitalService, ClaimService claimSer
/// <summary> /// <summary>
/// 获取当前登录用户管辖医院列表 /// 获取当前登录用户管辖医院列表
/// </summary> /// </summary>
/// <param name="request"></param>
/// <returns></returns> /// <returns></returns>
[Route("hospitallist")] [Route("hospitallist")]
[HttpPost] [HttpPost]
......
...@@ -28,7 +28,6 @@ public MenuController(MenuService menuService, ClaimService claimService) ...@@ -28,7 +28,6 @@ public MenuController(MenuService menuService, ClaimService claimService)
/// <summary> /// <summary>
/// 设置用户管辖医院 /// 设置用户管辖医院
/// </summary> /// </summary>
/// <param name="request"></param>
/// <returns></returns> /// <returns></returns>
[Route("menulist")] [Route("menulist")]
[HttpPost] [HttpPost]
......
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Performance.DtoModels; using Performance.DtoModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Performance.Api.Controllers namespace Performance.Api.Controllers
{ {
...@@ -19,4 +15,4 @@ public ActionResult<ApiResponse> Get() ...@@ -19,4 +15,4 @@ public ActionResult<ApiResponse> Get()
return new ApiResponse(ResponseType.NotFound, "not found"); return new ApiResponse(ResponseType.NotFound, "not found");
} }
} }
} }
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using FluentValidation.AspNetCore;
using Microsoft.AspNetCore.Mvc;
using Performance.DtoModels;
using Performance.EntityModels;
using Performance.Services;
namespace Performance.Api.Controllers
{
[Route("api")]
[ApiController]
public class PersonController : Controller
{
private readonly PersonService personService;
private readonly ClaimService claimService;
public PersonController(PersonService personService, ClaimService claimService)
{
this.personService = personService;
this.claimService = claimService;
}
/// <summary>
/// 获取所有员工记录
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
[Route("person/list/{allotId}")]
[HttpPost]
public ApiResponse GetPersons(int allotId)
{
var list = personService.GetPersons(allotId, claimService.GetUserId());
return new ApiResponse(ResponseType.OK, list);
}
/// <summary>
/// 新增员工信息
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("person/add")]
[HttpPost]
public ApiResponse CreatePerson([FromBody] PerEmployeeResponse request)
{
request.CreateUser = claimService.GetUserId();
var employeee = personService.CreatePerson(request);
return employeee.Id > 0 ? new ApiResponse(ResponseType.OK, "添加成功!", employeee)
: new ApiResponse(ResponseType.Fail, "添加失败!");
}
/// <summary>
/// 修改员工信息
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("person/edit")]
[HttpPost]
public ApiResponse UpdatePerson([FromBody] PerEmployeeResponse request)
{
var result = personService.UpdatePerson(request);
return result ? new ApiResponse(ResponseType.OK, "修改成功!")
: new ApiResponse(ResponseType.OK, "修改失败!");
}
/// <summary>
/// 删除员工
/// </summary>
/// <param name="employeeId"></param>
/// <returns></returns>
[Route("person/delete/{employeeId}")]
[HttpPost]
public ApiResponse DeletePerson(int employeeId)
{
var result = personService.DeletePerson(employeeId);
return result ? new ApiResponse(ResponseType.OK, "删除成功!")
: new ApiResponse(ResponseType.OK, "删除失败!");
}
/// <summary>
/// 获取所有科室记录
/// </summary>
/// <param name="hospitalId"></param>
/// <returns></returns>
[Route("deptdic/list/{hospitalId}")]
[HttpPost]
public ApiResponse GetDepartments(int hospitalId)
{
var list = personService.GetDepartments(hospitalId);
return new ApiResponse(ResponseType.OK, list);
}
/// <summary>
/// 新增科室信息
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("deptdic/add")]
[HttpPost]
public ApiResponse CreateDeptDic([FromBody] per_dept_dic request)
{
if (string.IsNullOrEmpty(request.Department) || string.IsNullOrEmpty(request.HISDeptName))
return new ApiResponse(ResponseType.ParameterError, "标准科室,系统科室不可为空!");
request.CreateUser = claimService.GetUserId();
var employeee = personService.CreateDeptDic(request);
return employeee.Id > 0 ? new ApiResponse(ResponseType.OK, "添加成功!", employeee)
: new ApiResponse(ResponseType.Fail, "添加失败!");
}
/// <summary>
/// 修改科室信息
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("deptdic/edit")]
[HttpPost]
public ApiResponse UpdateDeptDic([FromBody] DeptdicResponse request)
{
if (string.IsNullOrEmpty(request.Department) || string.IsNullOrEmpty(request.HISDeptName))
return new ApiResponse(ResponseType.ParameterError, "标准科室,系统科室不可为空!");
var result = personService.UpdateDeptDic(request);
return result ? new ApiResponse(ResponseType.OK, "修改成功!")
: new ApiResponse(ResponseType.OK, "修改失败!");
}
/// <summary>
/// 删除科室
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("deptdic/delete")]
[HttpPost]
public ApiResponse DeleteDeptDic([FromBody] DeptdicResponse request)
{
var result = personService.DeleteDeptDic(request);
return result ? new ApiResponse(ResponseType.OK, "删除成功!")
: new ApiResponse(ResponseType.OK, "删除失败!");
}
/// <summary>
/// 系统/标准科室字典
/// </summary>
/// <param name="hospitalId">医院Id</param>
/// <param name="type">1系统科室 2标准科室 3核算单元 4行政后勤 5特殊核算组</param>
/// <returns></returns>
[Route("deptdic/{hospitalId}/dict/{type}")]
[HttpPost]
public ApiResponse DeptDics(int hospitalId, int type)
{
if (!new int[] { 1, 2, 3, 4, 5 }.Contains(type))
return new ApiResponse(ResponseType.ParameterError, "参数错误!");
var result = personService.DeptDics(hospitalId, type);
return new ApiResponse(ResponseType.OK, result);
}
/// <summary>
/// 科室工作量详情
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("dept/workdetail")]
public ApiResponse DeptWorkloadDetail([CustomizeValidator(RuleSet = "Select"), FromBody] WorkDetailRequest request)
{
var data = personService.DeptWorkloadDetail(request, claimService.GetUserId());
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);
}
}
}
...@@ -33,12 +33,12 @@ public class ReportController : Controller ...@@ -33,12 +33,12 @@ public class ReportController : Controller
[Route("rank")] [Route("rank")]
[HttpPost] [HttpPost]
public ApiResponse Rank([FromBody]HospitalIdRequest request) 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)
.ThenByDescending(w => w.Month); .ThenByDescending(w => w.Month);
...@@ -48,16 +48,16 @@ public ApiResponse Rank([FromBody]HospitalIdRequest request) ...@@ -48,16 +48,16 @@ public ApiResponse Rank([FromBody]HospitalIdRequest request)
[Route("selection")] [Route("selection")]
[HttpPost] [HttpPost]
public ApiResponse Selection([FromBody]SelectionRequest report) public ApiResponse Selection([FromBody] SelectionRequest report)
{ {
var userId = claimService.GetUserId(); var userId = claimService.GetUserId();
var result = reportDataService.GetReportSelection(report.GroupId, userId); var result = reportDataService.GetReportSelection(report.GroupId, userId, report.HospitalId);
return new ApiResponse(ResponseType.OK, result); return new ApiResponse(ResponseType.OK, result);
} }
[Route("info")] [Route("info")]
[HttpPost] [HttpPost]
public ApiResponse Info([FromBody]SelectionRequest report) public ApiResponse Info([FromBody] SelectionRequest report)
{ {
var result = reportDataService.GetReportInfo(report.GroupId); var result = reportDataService.GetReportInfo(report.GroupId);
return new ApiResponse(ResponseType.OK, result); return new ApiResponse(ResponseType.OK, result);
...@@ -65,8 +65,18 @@ public ApiResponse Info([FromBody]SelectionRequest report) ...@@ -65,8 +65,18 @@ public ApiResponse Info([FromBody]SelectionRequest report)
[Route("search")] [Route("search")]
[HttpPost] [HttpPost]
public ApiResponse Search([FromBody]SearchReportRequest report) public ApiResponse Search([FromBody] SearchReportRequest report)
{ {
if (report.Values == null || !report.Values.Any())
return new ApiResponse(ResponseType.OK, new List<ReportData>());
//string[] keys = new string[] { "year", "month", };
//foreach (var item in report.Values.Where(t => keys.Contains(t.Title)))
//{
// if (item.Values == null || !item.Values.Any(t => !string.IsNullOrEmpty(t)))
// return new ApiResponse(ResponseType.OK, new List<ReportData>());
//}
var userId = claimService.GetUserId(); var userId = claimService.GetUserId();
var result = reportDataService.GetReportData(report.HospitalId, report.GroupId, report.ReportId, report.Values ?? new List<SelectionValues>(), userId); var result = reportDataService.GetReportData(report.HospitalId, report.GroupId, report.ReportId, report.Values ?? new List<SelectionValues>(), userId);
return new ApiResponse(ResponseType.OK, result); return new ApiResponse(ResponseType.OK, result);
...@@ -78,7 +88,7 @@ public ApiResponse Search([FromBody]SearchReportRequest report) ...@@ -78,7 +88,7 @@ public ApiResponse Search([FromBody]SearchReportRequest report)
/// <returns></returns> /// <returns></returns>
[Route("survey")] [Route("survey")]
[HttpPost] [HttpPost]
public ApiResponse Survey([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request) public ApiResponse Survey([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{ {
var result = reportService.Survey(request.HospitalId); var result = reportService.Survey(request.HospitalId);
return new ApiResponse(ResponseType.OK, result); return new ApiResponse(ResponseType.OK, result);
...@@ -90,7 +100,7 @@ public ApiResponse Survey([CustomizeValidator(RuleSet = "Query"), FromBody]Repor ...@@ -90,7 +100,7 @@ public ApiResponse Survey([CustomizeValidator(RuleSet = "Query"), FromBody]Repor
/// <returns></returns> /// <returns></returns>
[Route("doctoravg")] [Route("doctoravg")]
[HttpPost] [HttpPost]
public ApiResponse DoctorAvg([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request) public ApiResponse DoctorAvg([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{ {
var result = reportService.DoctorAvg(request.HospitalId, request.IsIndex); var result = reportService.DoctorAvg(request.HospitalId, request.IsIndex);
return new ApiResponse(ResponseType.OK, result); return new ApiResponse(ResponseType.OK, result);
...@@ -102,7 +112,7 @@ public ApiResponse DoctorAvg([CustomizeValidator(RuleSet = "Query"), FromBody]Re ...@@ -102,7 +112,7 @@ public ApiResponse DoctorAvg([CustomizeValidator(RuleSet = "Query"), FromBody]Re
/// <returns></returns> /// <returns></returns>
[Route("nurseavg")] [Route("nurseavg")]
[HttpPost] [HttpPost]
public ApiResponse NurseAvg([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request) public ApiResponse NurseAvg([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{ {
var result = reportService.NurseAvg(request.HospitalId, request.IsIndex); var result = reportService.NurseAvg(request.HospitalId, request.IsIndex);
return new ApiResponse(ResponseType.OK, result); return new ApiResponse(ResponseType.OK, result);
...@@ -114,7 +124,7 @@ public ApiResponse NurseAvg([CustomizeValidator(RuleSet = "Query"), FromBody]Rep ...@@ -114,7 +124,7 @@ public ApiResponse NurseAvg([CustomizeValidator(RuleSet = "Query"), FromBody]Rep
/// <returns></returns> /// <returns></returns>
[Route("outfeeavg")] [Route("outfeeavg")]
[HttpPost] [HttpPost]
public ApiResponse OutFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request) public ApiResponse OutFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{ {
var list = reportService.OutFeeAvg(request.HospitalId); var list = reportService.OutFeeAvg(request.HospitalId);
return new ApiResponse(ResponseType.OK, "", list); return new ApiResponse(ResponseType.OK, "", list);
...@@ -126,7 +136,7 @@ public ApiResponse OutFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody]Re ...@@ -126,7 +136,7 @@ public ApiResponse OutFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody]Re
/// <returns></returns> /// <returns></returns>
[Route("inpatfeeavg")] [Route("inpatfeeavg")]
[HttpPost] [HttpPost]
public ApiResponse InpatFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request) public ApiResponse InpatFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{ {
var list = reportService.InpatFeeAvg(request.HospitalId); var list = reportService.InpatFeeAvg(request.HospitalId);
return new ApiResponse(ResponseType.OK, "", list); return new ApiResponse(ResponseType.OK, "", list);
...@@ -138,7 +148,7 @@ public ApiResponse InpatFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody] ...@@ -138,7 +148,7 @@ public ApiResponse InpatFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody]
/// <returns></returns> /// <returns></returns>
[Route("medicine")] [Route("medicine")]
[HttpPost] [HttpPost]
public ApiResponse Medicine([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request) public ApiResponse Medicine([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{ {
var list = reportService.Medicine(request.HospitalId, request.IsIndex); var list = reportService.Medicine(request.HospitalId, request.IsIndex);
return new ApiResponse(ResponseType.OK, "", list); return new ApiResponse(ResponseType.OK, "", list);
...@@ -150,7 +160,7 @@ public ApiResponse Medicine([CustomizeValidator(RuleSet = "Query"), FromBody]Rep ...@@ -150,7 +160,7 @@ public ApiResponse Medicine([CustomizeValidator(RuleSet = "Query"), FromBody]Rep
/// <returns></returns> /// <returns></returns>
[Route("income")] [Route("income")]
[HttpPost] [HttpPost]
public ApiResponse Income([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request) public ApiResponse Income([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{ {
var list = reportService.Income(request.HospitalId, request.IsIndex); var list = reportService.Income(request.HospitalId, request.IsIndex);
return new ApiResponse(ResponseType.OK, "", list); return new ApiResponse(ResponseType.OK, "", list);
...@@ -163,7 +173,7 @@ public ApiResponse Income([CustomizeValidator(RuleSet = "Query"), FromBody]Repor ...@@ -163,7 +173,7 @@ public ApiResponse Income([CustomizeValidator(RuleSet = "Query"), FromBody]Repor
/// <returns></returns> /// <returns></returns>
[Route("getperforavg")] [Route("getperforavg")]
[HttpPost] [HttpPost]
public ApiResponse AvgPerfor([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request) public ApiResponse AvgPerfor([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{ {
var list = reportService.GetAvgPerfor(request.HospitalId); var list = reportService.GetAvgPerfor(request.HospitalId);
return new ApiResponse(ResponseType.OK, "", list); return new ApiResponse(ResponseType.OK, "", list);
...@@ -177,7 +187,7 @@ public ApiResponse AvgPerfor([CustomizeValidator(RuleSet = "Query"), FromBody]Re ...@@ -177,7 +187,7 @@ public ApiResponse AvgPerfor([CustomizeValidator(RuleSet = "Query"), FromBody]Re
/// <returns></returns> /// <returns></returns>
[Route("avgratio")] [Route("avgratio")]
[HttpPost] [HttpPost]
public ApiResponse AvgRatio([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request) public ApiResponse AvgRatio([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{ {
var list = reportService.AvgRatio(request.HospitalId); var list = reportService.AvgRatio(request.HospitalId);
return new ApiResponse(ResponseType.OK, "", list); return new ApiResponse(ResponseType.OK, "", list);
...@@ -190,7 +200,7 @@ public ApiResponse AvgRatio([CustomizeValidator(RuleSet = "Query"), FromBody]Rep ...@@ -190,7 +200,7 @@ public ApiResponse AvgRatio([CustomizeValidator(RuleSet = "Query"), FromBody]Rep
/// <returns></returns> /// <returns></returns>
[Route("index")] [Route("index")]
[HttpPost] [HttpPost]
public ApiResponse IndexReport([CustomizeValidator(RuleSet = "Index"), FromBody]ReportRequest request) public ApiResponse IndexReport([CustomizeValidator(RuleSet = "Index"), FromBody] ReportRequest request)
{ {
var list = reportService.IndexReport(request.HospitalId, request.Source); var list = reportService.IndexReport(request.HospitalId, request.Source);
return new ApiResponse(ResponseType.OK, "", list); return new ApiResponse(ResponseType.OK, "", list);
...@@ -203,7 +213,7 @@ public ApiResponse IndexReport([CustomizeValidator(RuleSet = "Index"), FromBody] ...@@ -203,7 +213,7 @@ public ApiResponse IndexReport([CustomizeValidator(RuleSet = "Index"), FromBody]
/// <returns></returns> /// <returns></returns>
[Route("menu")] [Route("menu")]
[HttpPost] [HttpPost]
public ApiResponse MenuReport([CustomizeValidator(RuleSet = "Menu"), FromBody]ReportRequest request) public ApiResponse MenuReport([CustomizeValidator(RuleSet = "Menu"), FromBody] ReportRequest request)
{ {
var list = reportService.MenuReport(request); var list = reportService.MenuReport(request);
return new ApiResponse(ResponseType.OK, "", list); return new ApiResponse(ResponseType.OK, "", list);
......
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Internal;
using Microsoft.AspNetCore.Mvc;
using Performance.DtoModels;
using Performance.EntityModels;
using Performance.Infrastructure;
using Performance.Services;
using Performance.Services.ExtractExcelService;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace Performance.Api.Controllers
{
[ApiController]
[Route("api/{hospitalId}/report/global")]
public class ReportGlobalController : Controller
{
private readonly IHostingEnvironment env;
private readonly AllotService allotService;
private readonly ReportGlobalService reportGlobalService;
public ReportGlobalController(
IHostingEnvironment env,
AllotService allotService,
ReportGlobalService reportGlobalService
)
{
this.env = env;
this.allotService = allotService;
this.reportGlobalService = reportGlobalService;
}
/// <summary>
/// 获取报表配置信息
/// </summary>
/// <param name="hospitalId"></param>
/// <returns></returns>
[HttpGet]
public ApiResponse GetAllReportGlobal([FromRoute] int hospitalId)
{
//reportGlobalService.CopyPreviousGlobalData(new per_allot
//{
// ID = 101,
// HospitalId = 13,
// Year = 2020,
// Month = 8
//});
var result = reportGlobalService.GetReportGlobals(hospitalId);
return new ApiResponse(ResponseType.OK, result);
}
/// <summary>
/// 添加报表配置
/// </summary>
/// <param name="global"></param>
/// <returns></returns>
[HttpPost]
public ApiResponse CreateReportGlobal([FromBody] report_global global)
{
var result = reportGlobalService.CreateReportGlobal(global);
return new ApiResponse(ResponseType.OK, result);
}
/// <summary>
/// 修改报表配置
/// </summary>
/// <param name="global"></param>
/// <returns></returns>
[HttpPost("update")]
public ApiResponse UpdateReportGlobal([FromBody] report_global global)
{
var result = reportGlobalService.UpdateReportGlobal(global);
return new ApiResponse(ResponseType.OK, result);
}
/// <summary>
/// 删除报表配置
/// </summary>
/// <param name="globalId"></param>
/// <returns></returns>
[HttpPost("{globalId}")]
public ApiResponse DeleteReportGlobal([FromRoute] int globalId)
{
var result = reportGlobalService.DeleteReportGlobal(globalId);
return new ApiResponse(ResponseType.OK, result);
}
/// <summary>
/// 上传人员绩效文件
/// </summary>
/// <param name="hospitalId"></param>
/// <param name="form"></param>
/// <returns></returns>
[Route("import")]
[HttpPost]
public ApiResponse Import(int hospitalId, [FromForm] IFormCollection form)
{
var file = ((FormFileCollection)form.Files).FirstOrDefault();
if (file == null)
return new ApiResponse(ResponseType.Fail, "参数错误", "文件无效");
if (!ExtractHelper.IsXlsxFile(file.FileName))
return new ApiResponse(ResponseType.Fail, "文件格式错误", "文件暂只支持xlsx文件");
var name = FileHelper.GetFileNameNoExtension(file.FileName) + DateTime.Now.ToString("yyyyMMddHHmmssfff");
var ext = FileHelper.GetExtension(file.FileName);
var dpath = Path.Combine(env.ContentRootPath, "Files", $"{hospitalId}", $"ImportDataFiles");
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}上传失败");
}
reportGlobalService.ImportAllotData(hospitalId, path);
return new ApiResponse(ResponseType.OK);
}
#region 人员、科室标签配置
/// <summary>
/// 获取人员标签配置
/// </summary>
/// <param name="hospitalId"></param>
/// <returns></returns>
[Route("ReportPersonTag")]
[HttpPost]
public ApiResponse ReportPersonTag(int hospitalId)
{
if (hospitalId<=0)
{
return new ApiResponse(ResponseType.Fail,"参数错误", "hospitalId无效");
}
var relust = reportGlobalService.GetReportPersonTag(hospitalId);
return new ApiResponse(ResponseType.OK, relust);
}
/// <summary>
/// 保存科室标签配置
/// </summary>
/// <param name="hospitalId"></param>
/// <param name="request"></param>
/// <returns></returns>
[Route("saveReportPersonTag")]
[HttpPost]
public ApiResponse SaveReportPersonTag(int hospitalId,[FromBody] SaveCollectData request)
{
if (hospitalId <= 0)
{
return new ApiResponse(ResponseType.Fail, "参数错误", "hospitalId无效");
}
reportGlobalService.SaveReportPersonTag(hospitalId,request);
return new ApiResponse(ResponseType.OK);
}
/// <summary>
/// 获取人员标签配置
/// </summary>
/// <param name="hospitalId"></param>
/// <returns></returns>
[Route("ReportTag")]
[HttpPost]
public ApiResponse ReportTag(int hospitalId)
{
if (hospitalId <= 0)
{
return new ApiResponse(ResponseType.Fail, "参数错误", "hospitalId无效");
}
var relust = reportGlobalService.GetReportTag(hospitalId);
return new ApiResponse(ResponseType.OK, relust);
}
/// <summary>
/// 保存科室标签配置
/// </summary>
/// <param name="hospitalId"></param>
/// <param name="request"></param>
/// <returns></returns>
[Route("saveReportTag")]
[HttpPost]
public ApiResponse SaveReportTag(int hospitalId, [FromBody] SaveCollectData request)
{
if (hospitalId <= 0)
{
return new ApiResponse(ResponseType.Fail, "参数错误", "hospitalId无效");
}
reportGlobalService.SaveReportTag(hospitalId, request);
return new ApiResponse(ResponseType.OK);
}
#endregion
}
}
...@@ -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;
......
using GraphQL.Types;
using Performance.DtoModels;
namespace Performance.Api
{
public class ChartDataType : ObjectGraphType<ChartData>
{
public ChartDataType()
{
Field(x => x.X, nullable: true);
Field(x => x.Y, nullable: true);
Field(x => x.Name, nullable: true);
Field(x => x.Value, nullable: true);
Field(x => x.Total, nullable: true);
Field(x => x.Type, nullable: true);
}
}
}
using GraphQL;
using GraphQL.Types;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Performance.Api
{
public static class GraphQLExtension
{
public static void AddGraphQLSchemaAndTypes(this IServiceCollection services)
{
services.AddScoped<ChartDataType>();
services.AddScoped<ReportDataType>();
services.AddScoped<ReportPerformanceType>();
services.AddScoped<PerformanceQuery>();
services.AddScoped<ISchema, PerformanceSchema>();
services.AddScoped<IDocumentExecuter, DocumentExecuter>();
services.AddScoped<IDependencyResolver>(provider => new FuncDependencyResolver
(
type => provider.GetRequiredService(type)
));
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Performance.Api
{
public class GraphQLRequest
{
public string Query { get; set; }
}
}
using Dapper;
using GraphQL.Types;
using Performance.DtoModels;
using Performance.Infrastructure;
using Performance.Services;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Performance.Api
{
public class PerformanceQuery : ObjectGraphType
{
public PerformanceQuery(GraphQLService service)
{
Field<ListGraphType<ReportDataType>>("info",
resolve: context =>
{
return service.GetReportsInfo();
}
);
Field<ReportDataType>("report",
arguments: new QueryArguments
(
new QueryArgument<IntGraphType>() { Name = QueryParams.reportId }
),
resolve: context =>
{
int reportId = context.Arguments.ContainsKey(QueryParams.reportId)
? ConvertHelper.To<int>(context.Arguments[QueryParams.reportId])
: 0;
return service.GetReport(reportId);
}
);
Field<ListGraphType<ChartDataType>>("chartdata",
arguments: Arguments(
new QueryArgument<StringGraphType>() { Name = QueryParams.accountingUnit }
),
resolve: context =>
{
int reportId = context.Arguments.ContainsKey(QueryParams.reportId)
? ConvertHelper.To<int>(context.Arguments[QueryParams.reportId])
: 0;
var parameters = GetDynamicParameters(context.Arguments, QueryParams.hospitalId, QueryParams.year, QueryParams.month, QueryParams.accountingUnit);
return service.GetChartData(reportId, parameters);
}
);
Field<ListGraphType<ReportPerformanceType>>("performances",
arguments: Arguments(
new QueryArgument<StringGraphType>() { Name = QueryParams.accountingUnit },
new QueryArgument<StringGraphType>() { Name = QueryParams.category },
new QueryArgument<StringGraphType>() { Name = QueryParams.itemName }
),
resolve: context =>
{
int reportId = context.Arguments.ContainsKey(QueryParams.reportId)
? ConvertHelper.To<int>(context.Arguments[QueryParams.reportId])
: 0;
var parameters = GetDynamicParameters(context.Arguments, QueryParams.hospitalId, QueryParams.year, QueryParams.month, QueryParams.accountingUnit, QueryParams.category, QueryParams.itemName);
return service.GetReportPerformance(reportId, parameters);
}
);
}
public static QueryArguments Arguments(params QueryArgument[] args)
{
var basic = new QueryArguments
{
new QueryArgument<IntGraphType>() { Name = QueryParams.reportId },
new QueryArgument<IntGraphType>() { Name = QueryParams.hospitalId },
new QueryArgument<IntGraphType>() { Name = QueryParams.year },
new QueryArgument<IntGraphType>() { Name = QueryParams.month }
};
if (args != null && args.Any())
{
foreach (var item in args)
{
basic.Add(item);
}
}
return basic;
}
public DynamicParameters GetDynamicParameters(Dictionary<string, object> arguments, params string[] fields)
{
DynamicParameters parameters = new DynamicParameters();
if (arguments == null || !arguments.Any()) return parameters;
if (fields != null && fields.Any())
{
foreach (var item in fields)
{
if (arguments.ContainsKey(item))
{
parameters.Add(item.ToLower(), arguments[item]);
}
}
}
return parameters;
}
}
}
using GraphQL;
using GraphQL.Types;
namespace Performance.Api
{
public class PerformanceSchema : Schema
{
public PerformanceSchema(PerformanceQuery query, IDependencyResolver dependencyResolver)
{
Query = query;
DependencyResolver = dependencyResolver;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Performance.Api
{
public struct QueryParams
{
public const string pageSize = "pageSize";
public const string pageNumber = "pageNumber";
public const string hospitalId = "hospitalId";
public const string year = "year";
public const string month = "month";
public const string reportId = "reportID";
public const string sourceType = "sourceType";
public const string accountingUnit = "accountingUnit";
public const string category = "category";
public const string itemName = "itemName";
}
}
using GraphQL.Types;
using Performance.DtoModels;
using Performance.Infrastructure;
using Performance.Services;
namespace Performance.Api
{
public class ReportDataType : ObjectGraphType<ReportData>
{
public ReportDataType()
{
Field(x => x.ReportID, type: typeof(IdGraphType));
Field(x => x.ChartType, nullable: true);
Field(x => x.Sort, nullable: true);
Field(x => x.Title);
Field(x => x.QueryName);
Field(x => x.QueryArguments);
Field(x => x.XTitle);
Field(x => x.XUnit);
Field(x => x.YTitle);
Field(x => x.YUnit);
Field(x => x.VTitle);
Field(x => x.VUnit);
Field(x => x.NTitle);
Field(x => x.NUnit);
Field(x => x.Formula);
Field(x => x.DataType, nullable: true);
Field(x => x.FilterValue, nullable: true);
}
}
}
using GraphQL.Types;
using Performance.DtoModels;
using Performance.EntityModels;
namespace Performance.Api
{
public class ReportPerformanceType : ObjectGraphType<ReportTable>
{
public ReportPerformanceType()
{
Field(x => x.PersonnelName, nullable: true);
Field(x => x.PersonnelNumber, nullable: true);
Field(x => x.AccountingUnit, nullable: true);
Field(x => x.Category, nullable: true);
Field(x => x.ItemName, nullable: true);
Field(x => x.CurrentValue, nullable: true);
Field(x => x.LastIssueValue, nullable: true);
Field(x => x.SamePeriodValue, nullable: true);
Field(x => x.BudgetValue, nullable: true);
Field(x => x.RatioValue, nullable: true);
}
}
}
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
<PropertyGroup> <PropertyGroup>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest> <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
<UserSecretsId>e732666b-5531-4cd8-b713-2fe3db31126c</UserSecretsId>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
...@@ -39,6 +40,7 @@ ...@@ -39,6 +40,7 @@
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="6.0.0" /> <PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="6.0.0" />
<PackageReference Include="CSRedisCore" Version="3.0.45" /> <PackageReference Include="CSRedisCore" Version="3.0.45" />
<PackageReference Include="FluentValidation.AspNetCore" Version="8.1.3" /> <PackageReference Include="FluentValidation.AspNetCore" Version="8.1.3" />
<PackageReference Include="GraphQL" Version="2.4.0" />
<PackageReference Include="Hangfire" Version="1.6.22" /> <PackageReference Include="Hangfire" Version="1.6.22" />
<PackageReference Include="Hangfire.MySql.Core" Version="2.2.2" /> <PackageReference Include="Hangfire.MySql.Core" Version="2.2.2" />
<PackageReference Include="Microsoft.AspNetCore.App" /> <PackageReference Include="Microsoft.AspNetCore.App" />
...@@ -83,9 +85,15 @@ ...@@ -83,9 +85,15 @@
<None Update="Template\医院二次分配绩效模板.xlsx"> <None Update="Template\医院二次分配绩效模板.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Template\医院人员绩效模板.xls">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Template\医院绩效模板%28无执行科室%29.xlsx"> <None Update="Template\医院绩效模板%28无执行科室%29.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Template\医院绩效模板.xls">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Template\医院绩效模板.xlsx"> <None Update="Template\医院绩效模板.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
...@@ -98,6 +106,9 @@ ...@@ -98,6 +106,9 @@
<None Update="Template\医院绩效模板.xlsx"> <None Update="Template\医院绩效模板.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Template\导入数据模板.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup> </ItemGroup>
<ProjectExtensions><VisualStudio><UserProperties appsettings_1json__JSONSchema="" /></VisualStudio></ProjectExtensions> <ProjectExtensions><VisualStudio><UserProperties appsettings_1json__JSONSchema="" /></VisualStudio></ProjectExtensions>
......
...@@ -27,6 +27,7 @@ public static void Main(string[] args) ...@@ -27,6 +27,7 @@ public static void Main(string[] args)
config.AddJsonFile($"appsettings.{env.EnvironmentName}.json", true, true); config.AddJsonFile($"appsettings.{env.EnvironmentName}.json", true, true);
env.ConfigureNLog("nlog.config"); env.ConfigureNLog("nlog.config");
}) })
.UseUrls("http://*:5001")
.UseStartup<Startup>(); .UseStartup<Startup>();
} }
} }
using AutoMapper; using AutoMapper;
using FluentValidation; using FluentValidation;
using FluentValidation.AspNetCore; using FluentValidation.AspNetCore;
using Hangfire;
using Hangfire.MySql.Core;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using NLog;
using NLog.Extensions.Logging; using NLog.Extensions.Logging;
using NLog.Web;
using Performance.DtoModels;
using Performance.DtoModels.AppSettings; using Performance.DtoModels.AppSettings;
using Performance.DtoModels.AutoMapper; using Performance.DtoModels.AutoMapper;
using Performance.EntityModels; using Performance.EntityModels;
using Performance.Infrastructure; using Performance.Infrastructure;
using Performance.Repository;
using Performance.Services; using Performance.Services;
using Performance.Services.Queues;
using Swashbuckle.AspNetCore.Swagger; using Swashbuckle.AspNetCore.Swagger;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.IO; using System.IO;
using System.Linq;
using System.Net.Http;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace Performance.Api namespace Performance.Api
{ {
...@@ -52,17 +42,22 @@ public void ConfigureServices(IServiceCollection services) ...@@ -52,17 +42,22 @@ public void ConfigureServices(IServiceCollection services)
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
#region appsetting注入 #region appsetting注入
services services
.Configure<AppConnection>(Configuration.GetSection("AppConnection")) .Configure<AppConnection>(Configuration.GetSection("AppConnection"))
.Configure<Application>(Configuration.GetSection("Application")) .Configure<Application>(Configuration.GetSection("Application"))
.Configure<HuyiSmsConfig>(Configuration.GetSection("HuyiSmsConfig")) .Configure<HuyiSmsConfig>(Configuration.GetSection("HuyiSmsConfig"))
.Configure<EmailOptions>(Configuration.GetSection("EmailOptions")) .Configure<EmailOptions>(Configuration.GetSection("EmailOptions"))
.Configure<WebapiUrl>(Configuration.GetSection("WebapiUrl")); .Configure<WebapiUrl>(Configuration.GetSection("WebapiUrl"));
#endregion
#endregion appsetting注入
var connection = services.BuildServiceProvider().GetService<IOptions<AppConnection>>(); var connection = services.BuildServiceProvider().GetService<IOptions<AppConnection>>();
services.AddGraphQLSchemaAndTypes();
#region json & fluentvalidation & filter #region json & fluentvalidation & filter
services services
//筛选器配置 //筛选器配置
.AddMvc(option => .AddMvc(option =>
...@@ -81,7 +76,7 @@ public void ConfigureServices(IServiceCollection services) ...@@ -81,7 +76,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验证
...@@ -97,19 +92,23 @@ public void ConfigureServices(IServiceCollection services) ...@@ -97,19 +92,23 @@ public void ConfigureServices(IServiceCollection services)
fv.RegisterValidatorsFromAssemblyContaining(type.GetType()); fv.RegisterValidatorsFromAssemblyContaining(type.GetType());
} }
}); });
#endregion
#endregion json & fluentvalidation & filter
#region automapper #region automapper
Mapper.Initialize(cfg => cfg.AddProfile<AutoMapperConfigs>()); Mapper.Initialize(cfg => cfg.AddProfile<AutoMapperConfigs>());
services.AddAutoMapper(); services.AddAutoMapper();
#endregion
#region service注入 repoitory注入 #endregion automapper
#region service注入 repoitory注入
services services
.AddPerformanceService() .AddPerformanceService()
.AddPerformanceRepoitory(); .AddPerformanceRepoitory();
#endregion
#endregion service注入 repoitory注入
#region custom util #region custom util
...@@ -118,7 +117,7 @@ public void ConfigureServices(IServiceCollection services) ...@@ -118,7 +117,7 @@ public void ConfigureServices(IServiceCollection services)
//用户身份信息服务 //用户身份信息服务
services.AddScoped<ClaimService>(); services.AddScoped<ClaimService>();
#endregion #endregion custom util
#region email #region email
...@@ -132,22 +131,30 @@ public void ConfigureServices(IServiceCollection services) ...@@ -132,22 +131,30 @@ public void ConfigureServices(IServiceCollection services)
options.SmtpServer = emailOption.Value.SmtpServer; options.SmtpServer = emailOption.Value.SmtpServer;
}); });
#endregion #endregion email
#region redis #region redis
//var csredis = new CSRedis.CSRedisClient(connection.Value.RedisConnectionString); //var csredis = new CSRedis.CSRedisClient(connection.Value.RedisConnectionString);
//RedisHelper.Initialization(csredis); //RedisHelper.Initialization(csredis);
#endregion
#endregion redis
services.AddMemoryCache(); services.AddMemoryCache();
#region hangfire services.AddHostedService<QueuedHostedService>();
services.AddHangfire(config => services.AddSingleton<IBackgroundTaskQueue, BackgroundTaskQueue>();
{ services.AddSingleton<IHubNotificationQueue, HubNotificationQueue>();
config.UseFilter(new AutomaticRetryAttribute { Attempts = 0 });
config.UseStorage(new MySqlStorage(connection.Value.HangfireConnectionString)); //#region hangfire
});
#endregion //services.AddHangfire(config =>
//{
// config.UseFilter(new AutomaticRetryAttribute { Attempts = 0 });
// config.UseStorage(new MySqlStorage(connection.Value.HangfireConnectionString));
//});
//#endregion hangfire
services.AddSignalR(); services.AddSignalR();
services.AddCors(options => services.AddCors(options =>
...@@ -158,15 +165,17 @@ public void ConfigureServices(IServiceCollection services) ...@@ -158,15 +165,17 @@ public void ConfigureServices(IServiceCollection services)
}); });
}); });
#region //ef配置 #region //ef配置
services.AddDbContext<PerformanceDbContext>(options => services.AddDbContext<PerformanceDbContext>(options =>
{ {
options.UseMySQL(connection.Value.PerformanceConnectionString); options.UseMySQL(connection.Value.PerformanceConnectionString);
}); });
#endregion
#region swagger #endregion //ef配置
#region swagger
services.AddSwaggerGen(c => services.AddSwaggerGen(c =>
{ {
c.SwaggerDoc("v1", new Info { Version = "v1.0", Title = "绩效API接口" }); c.SwaggerDoc("v1", new Info { Version = "v1.0", Title = "绩效API接口" });
...@@ -196,10 +205,10 @@ public void ConfigureServices(IServiceCollection services) ...@@ -196,10 +205,10 @@ public void ConfigureServices(IServiceCollection services)
In = "HEADER" In = "HEADER"
}); });
#endregion #endregion Token绑定到ConfigureServices
}); });
#endregion
#endregion swagger
} }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
...@@ -216,6 +225,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF ...@@ -216,6 +225,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
} }
#region Swagger #region Swagger
app.UseSwagger(); app.UseSwagger();
app.UseSwaggerUI(c => app.UseSwaggerUI(c =>
{ {
...@@ -223,14 +233,15 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF ...@@ -223,14 +233,15 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
//c.SwaggerEndpoint("/swagger/v1/swagger.json", "v1.0"); //c.SwaggerEndpoint("/swagger/v1/swagger.json", "v1.0");
c.RoutePrefix = ""; c.RoutePrefix = "";
}); });
#endregion
#region hangfire #endregion Swagger
app.UseHangfireServer(); //#region hangfire
app.UseHangfireDashboard("/hangfire", new DashboardOptions { Authorization = new[] { new HangfireAuthorizationFilter() } });
#endregion //app.UseHangfireServer();
//app.UseHangfireDashboard("/hangfire", new DashboardOptions { Authorization = new[] { new HangfireAuthorizationFilter() } });
//#endregion hangfire
app.UseCors("SignalrCore"); app.UseCors("SignalrCore");
app.UseSignalR(routes => routes.MapHub<AllotLogHub>("/performance/allotLogHub")); app.UseSignalR(routes => routes.MapHub<AllotLogHub>("/performance/allotLogHub"));
...@@ -250,5 +261,6 @@ public bool Authorize(Hangfire.Dashboard.DashboardContext context) ...@@ -250,5 +261,6 @@ public bool Authorize(Hangfire.Dashboard.DashboardContext context)
return true; return true;
} }
} }
#endregion
#endregion hangfire 权限
} }
...@@ -54,7 +54,7 @@ public string GetUserClaim(string jwtClaimTypes) ...@@ -54,7 +54,7 @@ public string GetUserClaim(string jwtClaimTypes)
/// <returns></returns> /// <returns></returns>
public List<Claim> GetUserClaim() public List<Claim> GetUserClaim()
{ {
if (contextAccessor.HttpContext.User == null) if (contextAccessor.HttpContext?.User == null)
{ {
throw new PerformanceException("获取当前请求登录信息失败"); throw new PerformanceException("获取当前请求登录信息失败");
} }
......
...@@ -69,7 +69,7 @@ public static ClaimsPrincipal GetPrincipal(string token) ...@@ -69,7 +69,7 @@ public static ClaimsPrincipal GetPrincipal(string token)
return principal; return principal;
} }
catch (Exception ex) catch (Exception)
{ {
return null; return null;
} }
......
...@@ -20,13 +20,17 @@ ...@@ -20,13 +20,17 @@
"NurseRole": "3", "NurseRole": "3",
//科主任二次绩效管理员 //科主任二次绩效管理员
"DirectorRole": "4", "DirectorRole": "4",
//特殊科室二次绩效管理员
"SpecialRole": "9",
// 抽取结果Excel文件保存地址
"AbsolutePath": "E:\\wwwroot\\testjx.suvalue.com", "AbsolutePath": "E:\\wwwroot\\testjx.suvalue.com",
// 抽取结果Excel文件保存地址 更替的 网络地址
"HttpPath": "http://testjx.suvalue.com:81" "HttpPath": "http://testjx.suvalue.com:81"
}, },
"WebapiUrl": { "WebapiUrl": {
"ImportFirst": "http://localhost:50997/api/extract/import", // 抽取结果保存地址
"ExtractData": "http://localhost:50997/api/extract/index", "ImportFile": "http://localhost:5001/api/",
"ImportFile": "http://localhost:5001/api/template/savefile", // 抽取uri
"HttpPost": "http://localhost:50997/api" "HttpPost": "http://localhost:50997/api/"
} }
} }
...@@ -8,27 +8,33 @@ ...@@ -8,27 +8,33 @@
}, },
"AppConnection": { "AppConnection": {
//"PerformanceConnectionString": "server=112.124.13.17;database=db_performance;uid=suvalue;pwd=suvalue2016;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;", //"PerformanceConnectionString": "server=112.124.13.17;database=db_performance;uid=suvalue;pwd=suvalue2016;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;",
"PerformanceConnectionString": "server=192.168.18.166;database=db_performance;uid=root;pwd=1234qwer;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;", "PerformanceConnectionString": "server=192.168.18.166;database=db_performance_screen;uid=root;pwd=1234qwer;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;",
"HangfireConnectionString": "server=192.168.18.166;database=db_hangfire;uid=root;pwd=1234qwer;port=3306;allow user variables=true;", "HangfireConnectionString": "server=192.168.18.166;database=db_hangfire;uid=root;pwd=1234qwer;port=3306;allow user variables=true;",
"RedisConnectionString": "116.62.245.55:6379,defaultDatabase=2" "RedisConnectionString": "116.62.245.55:6379,defaultDatabase=2"
}, },
"Application": { "Application": {
//登录过期时间 //登录过期时间
"ExpirationMinutes": "120", "ExpirationMinutes": "1200",
//验证码过期 //验证码过期
"SmsCodeMinutes": "5", "SmsCodeMinutes": "5",
//护士长二次绩效管理员 //护士长二次绩效管理员
"NurseRole": "3", "NurseRole": "3",
//科主任二次绩效管理员 //科主任二次绩效管理员
"DirectorRole": "4", "DirectorRole": "4",
//特殊科室二次绩效管理员
"SpecialRole": "9",
//数据收集角色(可查看所有)
"CollectRoles": [ 1, 2, 5, 6, 7, 8 ],
// 抽取结果Excel文件保存地址
"AbsolutePath": "E:\\wwwroot\\testjx.suvalue.com", "AbsolutePath": "E:\\wwwroot\\testjx.suvalue.com",
// 抽取结果Excel文件保存地址 更替的 网络地址
"HttpPath": "http://testjx.suvalue.com:81", "HttpPath": "http://testjx.suvalue.com:81",
"SwaggerEndpoint": "/swagger/v1/swagger.json" "SwaggerEndpoint": "/swagger/v1/swagger.json"
}, },
"WebapiUrl": { "WebapiUrl": {
"ImportFirst": "http://localhost:50997/api/extract/import", // 抽取结果保存地址
"ExtractData": "http://localhost:50997/api/extract/index", "ImportFile": "http://localhost:5001/api/",
"ImportFile": "http://localhost:5001/api/template/savefile", // 抽取uri
"HttpPost": "http://localhost:50997/api" "HttpPost": "http://localhost:50997/api/"
} }
} }
...@@ -34,16 +34,22 @@ ...@@ -34,16 +34,22 @@
"NurseRole": "3", "NurseRole": "3",
//科主任二次绩效管理员 //科主任二次绩效管理员
"DirectorRole": "4", "DirectorRole": "4",
//特殊科室二次绩效管理员
"SpecialRole": "9",
//行政科室二次绩效管理员
"OfficeRole": "10",
//邮件指定接收人 //邮件指定接收人
"Receiver": [ "chengxiang.li@suvalue.com", "486035085@qq.com" ], "Receiver": [ "chengxiang.li@suvalue.com", "486035085@qq.com" ],
// 抽取结果Excel文件保存地址
"AbsolutePath": "E:\\wwwroot\\testjx.suvalue.com", "AbsolutePath": "E:\\wwwroot\\testjx.suvalue.com",
// 抽取结果Excel文件保存地址 更替的 网络地址
"HttpPath": "http://testjx.suvalue.com:81", "HttpPath": "http://testjx.suvalue.com:81",
"SwaggerEndpoint": "/api/swagger/v1/swagger.json" "SwaggerEndpoint": "/api/swagger/v1/swagger.json"
}, },
"WebapiUrl": { "WebapiUrl": {
"ImportFirst": "http://localhost:50997/api/extract/import", // 抽取结果保存地址
"ExtractData": "http://localhost:50997/api/extract/index", "ImportFile": "http://localhost:5001/api/",
"ImportFile": "http://localhost:5001/api/template/savefile", // 抽取uri
"HttpPost": "http://localhost:50997/api" "HttpPost": "http://localhost:50997/api/"
} }
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -27,6 +27,18 @@ public class Application ...@@ -27,6 +27,18 @@ public class Application
/// </summary> /// </summary>
public int DirectorRole { get; set; } public int DirectorRole { get; set; }
/// <summary> /// <summary>
/// 特殊科室二次绩效管理员
/// </summary>
public int SpecialRole { get; set; }
/// <summary>
/// 数据收集角色(可查看所有)
/// </summary>
public int[] CollectRoles { get; set; }
/// <summary>
/// 行政科室二次绩效管理员
/// </summary>
public int OfficeRole { get; set; }
/// <summary>
/// 邮件指定接收人 /// 邮件指定接收人
/// </summary> /// </summary>
public string[] Receiver { get; set; } public string[] Receiver { get; set; }
......
...@@ -6,15 +6,15 @@ namespace Performance.DtoModels.AppSettings ...@@ -6,15 +6,15 @@ namespace Performance.DtoModels.AppSettings
{ {
public class WebapiUrl public class WebapiUrl
{ {
/// <summary> ///// <summary>
/// 上传首次模板文件 ///// 上传首次模板文件
/// </summary> ///// </summary>
public string ImportFirst { get; set; } //public string ImportFirst { get; set; }
/// <summary> ///// <summary>
/// 抽取数据地址 ///// 抽取数据地址
/// </summary> ///// </summary>
public string ExtractData { get; set; } //public string ExtractData { get; set; }
/// <summary> /// <summary>
/// 上传文件地址 /// 上传文件地址
......
...@@ -93,4 +93,21 @@ public enum AgWorkloadType ...@@ -93,4 +93,21 @@ public enum AgWorkloadType
/// </summary> /// </summary>
Workload = 2, Workload = 2,
} }
public enum DataFormat
{
/// <summary> 普通格式 </summary>
普通格式,
/// <summary> 小数 </summary>
小数,
/// <summary> 货币 </summary>
货币,
/// <summary> 百分比 </summary>
百分比,
/// <summary> 科学计数 </summary>
科学计数,
/// <summary> 分数 </summary>
分数,
/// <summary> 日期 </summary>
日期
}
} }
...@@ -6,6 +6,8 @@ namespace Performance.DtoModels ...@@ -6,6 +6,8 @@ namespace Performance.DtoModels
{ {
public class ExtractDto public class ExtractDto
{ {
public string DoctorName { get; set; }
public string PersonnelNumber { get; set; }
public string Department { get; set; } public string Department { get; set; }
public string Category { get; set; } public string Category { get; set; }
public decimal Value { get; set; } public decimal Value { get; set; }
......
using Performance.EntityModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Performance.DtoModels
{
public class HandsonTable
{
private IEnumerable<collect_permission> _permissions;
private List<Dictionary<string, string>> _data;
public HandsonTable(int sheetType, string[] cols, List<collect_permission> permissions)
{
_permissions = permissions;
_data = new List<Dictionary<string, string>>();
InitColHeaders(sheetType, cols);
InitColumns(permissions);
}
public string[] ColHeaders { get; private set; }
public List<Dictionary<string, string>> Data => _data;
public HandsonColumn[] Columns { get; private set; }
/// <summary>
///
/// </summary>
/// <param name="datas"></param>
/// <param name="isTypein">是否是用户录入的 是:true 不是:false</param>
public void SetRowData(IEnumerable<HandsonRowData> datas, bool isTypein)
{
foreach (var dt in datas)
{
var dic = CreateDataRow("编号", dt.Row.ToString());
foreach (var item in dt.CellData)
{
if (dic.ContainsKey(item.Name.ToLower()) && isTypein && _permissions.Any(w => w.HeadName.ToLower() == item.Name.ToLower()))
dic[item.Name.ToLower()] = item.Value?.ToString() ?? "";
else if (dic.ContainsKey(item.Name.ToLower()) && _permissions.Any(w => w.HeadName.ToLower() == item.Name.ToLower() && w.AttachLast > 0))
dic[item.Name.ToLower()] = item.Value?.ToString() ?? "";
else if (dic.ContainsKey(item.Name.ToLower()) && _permissions.Any(w => w.HeadName.ToLower() == item.Name.ToLower()))
dic[item.Name.ToLower()] = item.Value?.ToString() ?? "";
}
_data.Add(dic);
}
}
private void InitColHeaders(int sheetType, string[] cols)
{
var defaluts = new DefalutHandsonHeader[]
{
new DefalutHandsonHeader{ SheetType = SheetType.OtherIncome, Necessity = new[] { "核算单元(医技组)","核算单元(医生组)","核算单元(护理组)","科室名称" } },
new DefalutHandsonHeader{ SheetType = SheetType.Expend, Necessity = new[] { "核算单元(医技组)","核算单元(医生组)","核算单元(护理组)","科室名称" } },
new DefalutHandsonHeader{ SheetType = SheetType.Workload, Necessity = new[] { "核算单元","科室名称" } },
//new DefalutHandsonHeader{ SheetType = SheetType.AccountExtra, Necessity = new[] { "核算单元","科室名称" } },
//new DefalutHandsonHeader{ SheetType = SheetType.PersonExtra, Necessity = new[] { "核算单元","科室名称" } },
};
var necessitys = defaluts.FirstOrDefault(w => sheetType == (int)w.SheetType)?.Necessity.ToList();
necessitys = necessitys ?? new List<string>();
foreach (var col in cols)
{
var item = col.ToLower();
if (!necessitys.Contains(item))
necessitys.Add(item);
if (!_permissions.Any(w => w.HeadName.ToLower() == item && w.Visible == 1))
necessitys.Remove(item);
}
ColHeaders = necessitys.ToArray();
}
private void InitColumns(List<collect_permission> permissions)
{
List<HandsonColumn> columns = new List<HandsonColumn>();
foreach (var col in ColHeaders)
{
var item = col.ToLower();
var readnoly = _permissions.FirstOrDefault(f => f.HeadName == item)?.Readnoly == 1;
columns.Add(new HandsonColumn(item.ToLower(), readnoly));
}
Columns = columns.ToArray();
}
private Dictionary<string, string> CreateDataRow(string key, string value)
{
var temp = new Dictionary<string, string>() { { key, value } };
foreach (var item in ColHeaders)
{
if (!temp.ContainsKey(item))
temp.Add(item.ToLower(), "");
}
return temp;
}
}
public class HandsonColumn
{
public HandsonColumn(string data, bool readOnly = false, DataFormat format = DataFormat.普通格式)
{
Data = data;
ReadOnly = readOnly;
switch (format)
{
case DataFormat.普通格式:
Type = "text";
break;
case DataFormat.小数:
Type = "numeric";
NumericFormat = new NumericFormat { Pattern = "0,00.00" };
break;
case DataFormat.百分比:
Type = "numeric";
NumericFormat = new NumericFormat { Pattern = "0,00.00%" };
break;
}
}
public string Data { get; set; }
public bool ReadOnly { get; set; }
public string Type { get; set; }
public string[] Source { get; set; }
public bool Strict { get; set; } = false;
public NumericFormat NumericFormat { get; set; }
}
public class NumericFormat
{
public string Pattern { get; set; }
}
public class DefalutHandsonHeader
{
public SheetType SheetType { get; set; }
public string[] Necessity { get; set; }
}
public class HandsonRowData
{
public HandsonRowData(int row, IEnumerable<HandsonCellData> cellData)
{
Row = row;
CellData = cellData;
}
public int Row { get; set; }
public IEnumerable<HandsonCellData> CellData { get; set; }
}
public class HandsonCellData
{
public HandsonCellData(string name, object value)
{
Name = name;
Value = value;
}
public string Name { get; set; }
public object Value { get; set; }
}
}
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; }
}
}
...@@ -9,11 +9,13 @@ namespace Performance.DtoModels ...@@ -9,11 +9,13 @@ namespace Performance.DtoModels
/// </summary> /// </summary>
public class CofDrugProp public class CofDrugProp
{ {
public string AccoutingUnit { get; set; } public string AccountingUnit { get; set; }
/// <summary> public string UnitType { get; set; }
/// 占比 //public string AccoutingUnit { get; set; }
/// </summary> ///// <summary>
public decimal Prop { get; set; } ///// 占比
///// </summary>
//public decimal Prop { get; set; }
/// <summary> /// <summary>
/// 分值 /// 分值
/// </summary> /// </summary>
......
...@@ -27,6 +27,11 @@ public class ComputeEmployee ...@@ -27,6 +27,11 @@ public class ComputeEmployee
public string FitPeople { get; set; } public string FitPeople { get; set; }
/// <summary> /// <summary>
/// 绩效基础核算参考值
/// </summary>
public Nullable<decimal> FitPeopleValue { get; set; }
/// <summary>
/// 绩效基数核算参考对象取值比例(如临床科室护士*95%) /// 绩效基数核算参考对象取值比例(如临床科室护士*95%)
/// </summary> /// </summary>
public Nullable<decimal> FitPeopleRatio { get; set; } public Nullable<decimal> FitPeopleRatio { get; set; }
...@@ -37,6 +42,11 @@ public class ComputeEmployee ...@@ -37,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; }
...@@ -62,9 +72,19 @@ public class ComputeEmployee ...@@ -62,9 +72,19 @@ public class ComputeEmployee
public Nullable<decimal> PostCoefficient { get; set; } public Nullable<decimal> PostCoefficient { get; set; }
/// <summary> /// <summary>
/// 参加工作时间 /// 效率绩效人数
/// </summary>
public Nullable<decimal> PermanentStaff { get; set; }
///// <summary>
///// 参加工作时间
///// </summary>
//public Nullable<DateTime> WorkTime { get; set; }
/// <summary>
/// 考核前其他绩效
/// </summary> /// </summary>
public Nullable<DateTime> WorkTime { get; set; } public Nullable<decimal> AssessBeforeOtherFee { get; set; }
/// <summary> /// <summary>
/// 考核得分率 /// 考核得分率
...@@ -72,6 +92,16 @@ public class ComputeEmployee ...@@ -72,6 +92,16 @@ public class ComputeEmployee
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; }
...@@ -125,5 +155,15 @@ public class ComputeEmployee ...@@ -125,5 +155,15 @@ 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; }
/// <summary>
/// 是否需要二次分配
/// </summary>
public string NeedSecondAllot { 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; }
...@@ -61,37 +71,62 @@ public class ComputeResult ...@@ -61,37 +71,62 @@ public class ComputeResult
public Nullable<decimal> Grant { get; set; } public Nullable<decimal> Grant { get; set; }
/// <summary> /// <summary>
/// 应发管理绩效(需计算) /// 考核前管理绩效
/// </summary> /// </summary>
public Nullable<decimal> ShouldGiveFee { get; set; } public Nullable<decimal> ShouldGiveFee { get; set; }
/// <summary> /// <summary>
/// 绩效合计(需计算) /// 考核后管理绩效
/// </summary>
public Nullable<decimal> AssessLaterManagementFee { get; set; }
/// <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; }
/// <summary> /// <summary>
/// 医院奖罚(来自人员名单) /// 医院奖罚 来自5.2
/// </summary> /// </summary>
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; }
...@@ -100,20 +135,20 @@ public class ComputeResult ...@@ -100,20 +135,20 @@ public class ComputeResult
/// </summary> /// </summary>
public Nullable<decimal> BaiscNormPerforTotal { get; set; } public Nullable<decimal> BaiscNormPerforTotal { get; set; }
/// <summary> ///// <summary>
/// 参加工作时间(来自人员名单) ///// 参加工作时间(来自人员名单)
/// </summary> ///// </summary>
public Nullable<DateTime> WorkTime { get; set; } //public Nullable<DateTime> WorkTime { get; set; }
/// <summary> /// <summary>
/// 绩效基础金额(计算) /// 绩效基础金额(计算)
/// </summary> /// </summary>
public Nullable<decimal> BaiscNormValue { get; set; } public Nullable<decimal> BaiscNormValue { get; set; }
/// <summary> ///// <summary>
/// 年资系数(来自人员名单) ///// 年资系数(来自人员名单)
/// </summary> ///// </summary>
public Nullable<decimal> WorkYear { get; set; } //public Nullable<decimal> WorkYear { get; set; }
/// <summary> /// <summary>
/// 实发绩效 /// 实发绩效
...@@ -144,10 +179,10 @@ public class ComputeResult ...@@ -144,10 +179,10 @@ public class ComputeResult
///// </summary> ///// </summary>
//public decimal? Workload { get; set; } //public decimal? Workload { get; set; }
/// <summary> ///// <summary>
/// 科主任/护士长人数 ///// 科主任/护士长人数
/// </summary> ///// </summary>
public Nullable<decimal> ManagerNumber { get; set; } //public Nullable<decimal> ManagerNumber { get; set; }
/// <summary> /// <summary>
/// 核算单元人员数量 /// 核算单元人员数量
...@@ -158,5 +193,15 @@ public class ComputeResult ...@@ -158,5 +193,15 @@ 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; }
/// <summary>
/// 是否需要二次分配
/// </summary>
public string NeedSecondAllot { get; set; }
} }
} }
...@@ -11,28 +11,43 @@ public enum ExcelVersion ...@@ -11,28 +11,43 @@ public enum ExcelVersion
xls xls
} }
/// <summary> 核算单元类型 </summary> /// <summary> 核算单元类型 </summary>
public enum UnitType public enum UnitType
{ {
[Description("医生组")] [Description("医生组")]
医生组 = 1, 医生组 = 1,
[Description("护理组")] [Description("护理组")]
护理组 = 2, 护理组 = 2,
[Description("医技组")] [Description("医技组")]
医技组 = 3, 医技组 = 3,
[Description("专家组")] [Description("专家组")]
专家组 = 4, 专家组 = 4,
//[Description("其他")] //[Description("其他")]
//其他 = 5, //其他 = 5,
[Description("特殊核算组")] [Description("特殊核算组")]
特殊核算组 = 6, 特殊核算组 = 6,
[Description("其他医生组")] [Description("其他医生组")]
其他医生组 = 7, 其他医生组 = 7,
[Description("其他护理组")] [Description("其他护理组")]
其他护理组 = 8, 其他护理组 = 8,
[Description("其他医技组")] [Description("其他医技组")]
其他医技组 = 9, 其他医技组 = 9,
[Description("行政高层")]
行政高层 = 10,
[Description("行政中层")]
行政中层 = 11,
[Description("行政后勤")]
行政后勤 = 12,
} }
public enum SheetType public enum SheetType
...@@ -40,27 +55,35 @@ public enum SheetType ...@@ -40,27 +55,35 @@ public enum SheetType
/// <summary> 无法识别 </summary> /// <summary> 无法识别 </summary>
[Description("无法识别")] [Description("无法识别")]
Unidentifiable = 1, Unidentifiable = 1,
/// <summary> 医院人员名单 </summary>
[Description("医院人员名单")] /// <summary> 行政中高层 </summary>
[Description("行政中高层")]
Employee = 2, Employee = 2,
/// <summary> 收入 </summary> /// <summary> 收入 </summary>
[Description("收入")] [Description("收入")]
Income = 3, Income = 3,
/// <summary> 其他收入 </summary> /// <summary> 其他收入 </summary>
[Description("其他收入")] [Description("其他收入")]
OtherIncome = 4, OtherIncome = 4,
/// <summary> 支出 </summary> /// <summary> 支出 </summary>
[Description("支出")] [Description("支出")]
Expend = 5, Expend = 5,
/// <summary> 加班 </summary> /// <summary> 加班 </summary>
[Description("加班")] [Description("加班")]
Overtime = 6, Overtime = 6,
/// <summary> 工作量 </summary> /// <summary> 工作量 </summary>
[Description("工作量")] [Description("工作量")]
Workload = 7, Workload = 7,
/// <summary> 特殊核算单元 </summary> /// <summary> 特殊核算单元 </summary>
[Description("特殊核算单元")] [Description("特殊核算单元")]
SpecialUnit = 8, SpecialUnit = 8,
/// <summary> 临床科室医护绩效测算基础 </summary> /// <summary> 临床科室医护绩效测算基础 </summary>
[Description("临床科室医护绩效测算基础")] [Description("临床科室医护绩效测算基础")]
AccountBasic = 9, AccountBasic = 9,
...@@ -68,26 +91,102 @@ public enum SheetType ...@@ -68,26 +91,102 @@ public enum SheetType
/// <summary> 科室经济核算汇总表 </summary> /// <summary> 科室经济核算汇总表 </summary>
[Description("科室经济核算汇总表")] [Description("科室经济核算汇总表")]
ComputeEconomic = 10, ComputeEconomic = 10,
/// <summary> 医生工作量计算 </summary> /// <summary> 医生工作量计算 </summary>
[Description("医生工作量计算")] [Description("医生工作量计算")]
ComputeDoctorWorkload = 11, ComputeDoctorWorkload = 11,
/// <summary> 护士工作量计算 </summary> /// <summary> 护士工作量计算 </summary>
[Description("护士工作量计算")] [Description("护士工作量计算")]
ComputeNurseWorkload = 12, ComputeNurseWorkload = 12,
/// <summary> 临床科室医生绩效测算表 </summary> /// <summary> 临床科室医生绩效测算表 </summary>
[Description("临床科室医生绩效测算表")] [Description("临床科室医生绩效测算表")]
ComputeDoctorAccount = 13, ComputeDoctorAccount = 13,
/// <summary> 临床科室护士绩效测算表 </summary> /// <summary> 临床科室护士绩效测算表 </summary>
[Description("临床科室护士绩效测算表")] [Description("临床科室护士绩效测算表")]
ComputeNurseAccount = 14, ComputeNurseAccount = 14,
/// <summary> 临床人员名单 </summary> /// <summary> 业务中层 </summary>
[Description("临床人员名单")] [Description("业务中层")]
ClinicEmployee = 15, ClinicEmployee = 15,
/// <summary> 特殊临床科室医护绩效测算基础 </summary> /// <summary> 特殊临床科室医护绩效测算基础 </summary>
[Description("特殊临床科室医护绩效测算基础")] [Description("特殊临床科室医护绩效测算基础")]
AccountBasicSpecial = 16, AccountBasicSpecial = 16,
/// <summary> 科室绩效医院奖罚 </summary>
[Description("科室绩效医院奖罚")]
AccountExtra = 17,
/// <summary> 业务中层行政中高层医院奖罚 </summary>
[Description("业务中层行政中高层医院奖罚")]
PersonExtra = 18,
/// <summary> 科室药占比考核 </summary>
[Description("科室药占比考核")]
AccountDrugAssess = 19,
/// <summary> 科室材料考核 </summary>
[Description("科室材料考核")]
AccountMaterialsAssess = 20,
/// <summary> 行政后勤 </summary>
[Description("行政后勤")]
LogisticsEmployee = 21,
/// <summary> 科室考核 </summary>
[Description("科室考核")]
AccountScoreAverage = 25,
/// <summary> 科室调节后其他绩效 </summary>
[Description("科室调节后其他绩效")]
AccountAdjustLaterOtherFee = 26,
/// <summary> 业务中层行政中高层调节后其他绩效 </summary>
[Description("业务中层行政中高层调节后其他绩效")]
PersonAdjustLaterOtherFee = 27,
/// <summary> 其他工作量(不参与核算) </summary>
[Description("其他工作量")]
OtherWorkload = 28,
/// <summary> 预算比例 </summary>
[Description("预算比例")]
BudgetRatio = 30,
/// <summary> 科室考核前其他绩效 </summary>
[Description("科室考核前其他绩效")]
AssessBeforeOtherFee = 31,
/// <summary> 其他管理绩效 </summary>
[Description("其他管理绩效")]
PersonOtherManagePerforFee = 32,
/// <summary> 调节后其他管理绩效 </summary>
[Description("调节后其他管理绩效")]
PersonAdjustLaterOtherManagePerforFee = 33,
/// <summary> 个人岗位系数 </summary>
[Description("个人岗位系数")]
PersonPostCoefficient = 34,
/// <summary> 药占比系数 </summary>
[Description("药占比系数")]
WorkloadMedicineProp = 35,
/// <summary> CMI系数 </summary>
[Description("CMI系数")]
WorkloadCMI = 36,
/// <summary> 工作量倾斜系数 </summary>
[Description("工作量倾斜系数")]
WorkloadIncline = 37,
/// <summary> 考核 </summary>
[Description("考核")]
Assess = 38, //该参数作用类似于 其他工作量
} }
/// <summary> /// <summary>
...@@ -98,18 +197,23 @@ public enum AccountUnitType ...@@ -98,18 +197,23 @@ public enum AccountUnitType
/// <summary> </summary> /// <summary> </summary>
[Description("")] [Description("")]
Null = 1, Null = 1,
/// <summary> 临床科室 </summary> /// <summary> 临床科室 </summary>
[Description("科主任")] [Description("科主任")]
科主任 = 2, 科主任 = 2,
/// <summary> 临床科室 </summary> /// <summary> 临床科室 </summary>
[Description("护士长")] [Description("护士长")]
护士长 = 3, 护士长 = 3,
/// <summary> 行政高层 </summary> /// <summary> 行政高层 </summary>
[Description("行政高层")] [Description("行政高层")]
行政高层 = 4, 行政高层 = 4,
/// <summary> 临床科室 </summary> /// <summary> 临床科室 </summary>
[Description("行政中层")] [Description("行政中层")]
行政中层 = 5, 行政中层 = 5,
/// <summary> 临床科室 </summary> /// <summary> 临床科室 </summary>
[Description("行政工勤")] [Description("行政工勤")]
行政工勤 = 6, 行政工勤 = 6,
...@@ -119,30 +223,43 @@ public enum PerforType ...@@ -119,30 +223,43 @@ public enum PerforType
{ {
[Description("临床科室主任人均绩效")] [Description("临床科室主任人均绩效")]
临床主任, 临床主任,
[Description("临床科室副主任人均绩效")] [Description("临床科室副主任人均绩效")]
临床副主任, 临床副主任,
[Description("医技科室主任人均绩效")] [Description("医技科室主任人均绩效")]
医技主任, 医技主任,
[Description("医技科室副主任人均绩效")] [Description("医技科室副主任人均绩效")]
医技副主任, 医技副主任,
[Description("护士长人均绩效")] [Description("护士长人均绩效")]
护士长, 护士长,
[Description("护士人均绩效")] [Description("护士人均绩效")]
护士, 护士,
[Description("临床主任护士长平均")] [Description("临床主任护士长平均")]
临床主任护士长平均, 临床主任护士长平均,
[Description("临床主任医技主任护士长平均")] [Description("临床主任医技主任护士长平均")]
临床主任医技主任护士长平均, 临床主任医技主任护士长平均,
[Description("临床医生人均绩效")] [Description("临床医生人均绩效")]
临床医生, 临床医生,
[Description("医技医生人均绩效")] [Description("医技医生人均绩效")]
医技医生, 医技医生,
[Description("行政高层人均绩效")] [Description("行政高层人均绩效")]
行政高层, 行政高层,
[Description("行政中层人均绩效")] [Description("行政中层人均绩效")]
行政中层, 行政中层,
[Description("行政工勤人均绩效")] [Description("行政工勤人均绩效")]
行政工勤, 行政工勤,
[Description("医生护士平均绩效")] [Description("医生护士平均绩效")]
医生护士平均, 医生护士平均,
} }
...@@ -154,12 +271,16 @@ public enum MinimumType ...@@ -154,12 +271,16 @@ public enum MinimumType
{ {
[Description("保底绩效临床医生人均绩效")] [Description("保底绩效临床医生人均绩效")]
保底临床医生 = 1, 保底临床医生 = 1,
[Description("保底绩效医技医生人均绩效")] [Description("保底绩效医技医生人均绩效")]
保底医技医生 = 2, 保底医技医生 = 2,
[Description("保底绩效护士人均绩效")] [Description("保底绩效护士人均绩效")]
保底护士 = 3, 保底护士 = 3,
[Description("保底绩效行政工勤人均绩效")] [Description("保底绩效行政工勤人均绩效")]
保底工勤 = 4, 保底工勤 = 4,
[Description("自定义保底绩效")] [Description("自定义保底绩效")]
自定义保底 = 5, 自定义保底 = 5,
} }
......
...@@ -23,6 +23,14 @@ public class PerData : IPerData ...@@ -23,6 +23,14 @@ public class PerData : IPerData
/// </summary> /// </summary>
public string TypeName { get; set; } public string TypeName { get; set; }
/// <summary> /// <summary>
/// 人员姓名
/// </summary>
public string EmployeeName { get; set; }
/// <summary>
/// 人员工号
/// </summary>
public string JobNumber { get; set; }
/// <summary>
/// 单元格注释 /// 单元格注释
/// </summary> /// </summary>
public string Annotation { get; set; } public string Annotation { get; set; }
...@@ -63,5 +71,7 @@ public class PerData : IPerData ...@@ -63,5 +71,7 @@ public class PerData : IPerData
/// </summary> /// </summary>
public int PointCell { get; set; } public int PointCell { get; set; }
public string SignID { get; set; } public string SignID { get; set; }
//public decimal? MedicineFactor { get; set; }
} }
} }
...@@ -24,24 +24,29 @@ public class PerDataAccountBaisc : IPerData ...@@ -24,24 +24,29 @@ public class PerDataAccountBaisc : IPerData
public string UnitType { get; set; } public string UnitType { get; set; }
/// <summary> /// <summary>
/// 核算单元 /// 核算单元
/// </summary> /// </summary>
public string AccountingUnit { get; set; } public string AccountingUnit { get; set; }
/// <summary> /// <summary>
/// 科室名称 /// 医生姓名
/// </summary> /// </summary>
public string Department { get; set; } public string EmployeeName { get; set; }
///// <summary>
///// 科室名称
///// </summary>
//public string Department { get; set; }
/// <summary> /// <summary>
/// 定科人数 /// 效率绩效人数
/// </summary> /// </summary>
public decimal PermanentStaff { get; set; } public decimal PermanentStaff { get; set; }
/// <summary> ///// <summary>
/// 科主任/护士长数量 ///// 科主任/护士长数量
/// </summary> ///// </summary>
public decimal ManagerNumber { get; set; } //public decimal ManagerNumber { get; set; }
/// <summary> /// <summary>
/// 核算单元医生数量 /// 核算单元医生数量
...@@ -49,34 +54,39 @@ public class PerDataAccountBaisc : IPerData ...@@ -49,34 +54,39 @@ public class PerDataAccountBaisc : IPerData
public decimal Number { get; set; } public decimal Number { get; set; }
/// <summary> /// <summary>
/// 医生基础系数 /// 预算比例
/// </summary> /// </summary>
public decimal BasicFactor { get; set; } public decimal BasicFactor { get; set; }
/// <summary> ///// <summary>
/// 倾斜系数 ///// 倾斜系数
/// </summary> ///// </summary>
public decimal SlopeFactor { get; set; } //public decimal SlopeFactor { get; set; }
/// <summary> ///// <summary>
/// 其他绩效1 ///// 其他绩效1
/// </summary> ///// </summary>
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>
/// 药占比奖罚 /// 药占比奖罚
/// </summary> /// </summary>
public decimal MedicineExtra { get; set; } public decimal? MedicineExtra { get; set; }
/// <summary> /// <summary>
/// 材料占比奖罚 /// 材料占比奖罚
/// </summary> /// </summary>
public decimal MaterialsExtra { get; set; } public decimal? MaterialsExtra { get; set; }
/// <summary> /// <summary>
/// 医院奖罚 /// 医院奖罚
...@@ -89,47 +99,98 @@ public class PerDataAccountBaisc : IPerData ...@@ -89,47 +99,98 @@ public class PerDataAccountBaisc : IPerData
public decimal ScoringAverage { get; set; } public decimal ScoringAverage { get; set; }
/// <summary> /// <summary>
/// 考核后管理绩效
/// </summary>
public Nullable<decimal> AssessLaterManagementFee { get; set; }
/// <summary>
/// 管理绩效发放系数
/// </summary>
public Nullable<decimal> Management { get; set; }
/// <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; }
/// <summary> /// <summary>
/// 规模绩效
/// </summary>
public decimal ScalePerfor { get; set; }
/// <summary>
/// 效率绩效系数 /// 效率绩效系数
/// </summary> /// </summary>
public decimal Effic { get; set; } public decimal Effic { get; set; }
/// <summary> /// <summary>
/// 发放系数 /// 效率绩效
/// </summary> /// </summary>
public decimal Grant { get; set; } public decimal EfficPerfor { get; set; }
/// <summary> /// <summary>
/// 保底绩效参考标准 /// 出勤率
/// </summary> /// </summary>
public string MinimumReference { get; set; } public Nullable<decimal> Attendance { get; set; }
/// <summary> /// <summary>
/// 保底绩效系数 /// 发放系数
/// </summary> /// </summary>
public Nullable<decimal> MinimumFactor { get; set; } public decimal Grant { get; set; }
/// <summary> /// <summary>
/// 工作量倾斜系数 /// 应发管理绩效
/// </summary> /// </summary>
public Nullable<decimal> WorkSlopeFactor { get; set; } public decimal ShouldGiveFee { get; set; }
#endregion
#region 由计算得出
/// <summary> /// <summary>
/// 保底绩效金额 /// 其他管理绩效
/// </summary> /// </summary>
public Nullable<decimal> MinimumFee { get; set; } public decimal OtherManagePerfor { get; set; }
///// <summary>
///// 保底绩效参考标准
///// </summary>
//public string MinimumReference { get; set; }
///// <summary>
///// 保底绩效系数
///// </summary>
//public Nullable<decimal> MinimumFactor { get; set; }
///// <summary>
///// 工作量倾斜系数
///// </summary>
//public Nullable<decimal> WorkSlopeFactor { get; set; }
#endregion EXCEL读取
#region 由计算得出
///// <summary>
///// 药占比系数
///// </summary>
//public Nullable<decimal> MedicineFactor { get; set; }
///// <summary>
///// 保底绩效金额
///// </summary>
//public Nullable<decimal> MinimumFee { get; set; }
/// <summary> /// <summary>
/// 科室业绩 /// 科室业绩
...@@ -147,20 +208,40 @@ public class PerDataAccountBaisc : IPerData ...@@ -147,20 +208,40 @@ 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; }
/// <summary> /// <summary>
/// 人均核算绩效
/// </summary>
public Nullable<decimal> AvgPerfor { get; set; }
/// <summary>
/// 实发绩效 /// 实发绩效
/// </summary> /// </summary>
public Nullable<decimal> RealGiveFee { get; set; } public Nullable<decimal> RealGiveFee { get; set; }
#endregion /// <summary>
/// 是否需要二次分配
/// </summary>
public string NeedSecondAllot { get; set; }
/// <summary>
/// 夜班绩效
/// </summary>
public Nullable<decimal> NightShiftWorkPerforFee { get; set; }
#endregion 由计算得出
} }
} }
...@@ -37,14 +37,24 @@ public class PerDataClinicEmployee : IPerData ...@@ -37,14 +37,24 @@ 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; }
/// <summary> /// <summary>
/// 岗位系 /// 效率绩效人
/// </summary> /// </summary>
public Nullable<decimal> PostCoefficient { get; set; } public decimal PermanentStaff { get; set; }
///// <summary>
///// 岗位系数
///// </summary>
//public Nullable<decimal> PostCoefficient { get; set; }
/// <summary> /// <summary>
/// 效率绩效系数 /// 效率绩效系数
...@@ -61,10 +71,15 @@ public class PerDataClinicEmployee : IPerData ...@@ -61,10 +71,15 @@ public class PerDataClinicEmployee : IPerData
/// </summary> /// </summary>
public Nullable<decimal> Management { get; set; } public Nullable<decimal> Management { get; set; }
///// <summary>
///// 参加工作时间
///// </summary>
//public Nullable<DateTime> WorkTime { get; set; }
/// <summary> /// <summary>
/// 参加工作时间 /// 考核前其他绩效
/// </summary> /// </summary>
public Nullable<DateTime> WorkTime { get; set; } public Nullable<decimal> AssessBeforeOtherFee { get; set; }
/// <summary> /// <summary>
/// 考核得分率 /// 考核得分率
...@@ -72,15 +87,30 @@ public class PerDataClinicEmployee : IPerData ...@@ -72,15 +87,30 @@ public class PerDataClinicEmployee : IPerData
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; }
/// <summary> /// <summary>
/// 其他管理绩效
/// </summary>
public Nullable<decimal> OtherManagePerfor { get; set; }
/// <summary>
/// 其他绩效 /// 其他绩效
/// </summary> /// </summary>
public Nullable<decimal> OthePerfor { get; set; } public Nullable<decimal> OthePerfor { get; set; }
///// <summary>
///// 夜班费
///// </summary>
//public Nullable<decimal> NightWorkPerfor { get; set; }
/// <summary> /// <summary>
/// 医院奖罚 /// 医院奖罚
/// </summary> /// </summary>
...@@ -92,6 +122,11 @@ public class PerDataClinicEmployee : IPerData ...@@ -92,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; }
......
...@@ -22,6 +22,11 @@ public class PerDataEmployee : IPerData ...@@ -22,6 +22,11 @@ public class PerDataEmployee : IPerData
public string FitPeople { get; set; } public string FitPeople { get; set; }
/// <summary> /// <summary>
/// 绩效基础核算参考值
/// </summary>
public Nullable<decimal> FitPeopleValue { get; set; }
/// <summary>
/// 绩效基数核算参考对象取值比例(如临床科室护士*95%) /// 绩效基数核算参考对象取值比例(如临床科室护士*95%)
/// </summary> /// </summary>
public Nullable<decimal> FitPeopleRatio { get; set; } public Nullable<decimal> FitPeopleRatio { get; set; }
...@@ -51,10 +56,20 @@ public class PerDataEmployee : IPerData ...@@ -51,10 +56,20 @@ public class PerDataEmployee : IPerData
/// </summary> /// </summary>
public Nullable<decimal> PostCoefficient { get; set; } public Nullable<decimal> PostCoefficient { get; set; }
///// <summary>
///// 参加工作时间
///// </summary>
//public Nullable<DateTime> WorkTime { get; set; }
/// <summary> /// <summary>
/// 参加工作时间 /// 夜班费
/// </summary> /// </summary>
public Nullable<DateTime> WorkTime { get; set; } public Nullable<decimal> NightWorkPerfor { get; set; }
/// <summary>
/// 考核前其他绩效
/// </summary>
public Nullable<decimal> AssessBeforeOtherFee { get; set; }
/// <summary> /// <summary>
/// 考核得分率 /// 考核得分率
...@@ -62,6 +77,11 @@ public class PerDataEmployee : IPerData ...@@ -62,6 +77,11 @@ public class PerDataEmployee : IPerData
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; }
...@@ -71,10 +91,10 @@ public class PerDataEmployee : IPerData ...@@ -71,10 +91,10 @@ public class PerDataEmployee : IPerData
///// </summary> ///// </summary>
//public Nullable<decimal> Workload { get; set; } //public Nullable<decimal> Workload { get; set; }
/// <summary> ///// <summary>
/// 其他绩效 ///// 其他绩效
/// </summary> ///// </summary>
public Nullable<decimal> OthePerfor { get; set; } //public Nullable<decimal> OthePerfor { get; set; }
/// <summary> /// <summary>
/// 医院奖罚 /// 医院奖罚
...@@ -86,6 +106,11 @@ public class PerDataEmployee : IPerData ...@@ -86,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>
......
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class PerDataLogisticsEmployee : IPerData
{
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 绩效基数核算参考对象
/// </summary>
public string FitPeople { get; set; }
/// <summary>
/// 绩效基础核算参考值
/// </summary>
public Nullable<decimal> FitPeopleValue { get; set; }
/// <summary>
/// 绩效基数核算参考对象取值比例(如临床科室护士*95%)
/// </summary>
public Nullable<decimal> FitPeopleRatio { get; set; }
/// <summary>
/// 科室类别(例如 医技科室 临床科室 其他科室)
/// </summary>
public string AccountType { get; set; }
/// <summary>
/// 人员工号
/// </summary>
public string PersonnelNumber { get; set; }
/// <summary>
/// 姓名
/// </summary>
public string DoctorName { get; set; }
/// <summary>
/// 职务分类
/// </summary>
public string JobTitle { get; set; }
/// <summary>
/// 岗位系数
/// </summary>
public Nullable<decimal> PostCoefficient { get; set; }
/// <summary>
/// 出勤率
/// </summary>
public Nullable<decimal> Attendance { get; set; }
/// <summary>
/// 其他绩效
/// </summary>
public Nullable<decimal> OthePerfor { get; set; }
/// <summary>
/// 调节后其他绩效
/// </summary>
public Nullable<decimal> AdjustLaterOtherFee { get; set; }
/// <summary>
/// 是否需要二次分配
/// </summary>
public string NeedSecondAllot { get; set; }
/// <summary>
/// 行号
/// </summary>
public int RowNumber { get; set; }
}
}
...@@ -36,25 +36,26 @@ public class PerDataSpecialUnit : IPerData ...@@ -36,25 +36,26 @@ public class PerDataSpecialUnit : IPerData
/// </summary> /// </summary>
public Nullable<decimal> QuantitativeIndicatorsValue { get; set; } public Nullable<decimal> QuantitativeIndicatorsValue { get; set; }
/// <summary> ///// <summary>
/// 考核得分率 ///// 考核得分率
/// </summary> ///// </summary>
public Nullable<decimal> ScoringAverage { get; set; } //public Nullable<decimal> ScoringAverage { get; set; }
/// <summary> ///// <summary>
/// 其他绩效 ///// 其他绩效
/// </summary> ///// </summary>
public Nullable<decimal> OtherPerfor { get; set; } //public Nullable<decimal> OtherPerfor { get; set; }
/// <summary> ///// <summary>
/// 医院奖罚 ///// 医院奖罚
/// </summary> ///// </summary>
public Nullable<decimal> Punishment { get; set; } //public Nullable<decimal> Punishment { get; set; }
///// <summary>
///// 调节系数
///// </summary>
//public Nullable<decimal> Adjust { get; set; }
/// <summary>
/// 调节系数
/// </summary>
public Nullable<decimal> Adjust { get; set; }
public int RowNumber { get; set; } public int RowNumber { get; set; }
/// <summary> /// <summary>
......
...@@ -11,25 +11,24 @@ public class PerSheetHeader ...@@ -11,25 +11,24 @@ public class PerSheetHeader
public static List<(string, Func<im_employee, object>, int, int, bool, bool, bool, string)> employeeHeaders = public static List<(string, Func<im_employee, object>, int, int, bool, bool, bool, string)> employeeHeaders =
new List<(string, Func<im_employee, object>, int, int, bool, bool, bool, string)> new List<(string, Func<im_employee, object>, int, int, bool, bool, bool, string)>
{ {
("核算单元类型", (t) => t.AccountType, 1, 1, false, false, false,"AccountType"), ("人员分类", (t) => t.AccountType, 1, 1, false, false, false,"AccountType"),
("核算单元", (t) => t.AccountingUnit, 1, 1, false, false, false,"AccountingUnit"), ("核算单元", (t) => t.AccountingUnit, 1, 1, false, false, false,"AccountingUnit"),
("人员工号", (t) => t.PersonnelNumber, 1, 1, false, false, false,"PersonnelNumber"), ("人员工号", (t) => t.PersonnelNumber, 1, 1, false, false, false,"PersonnelNumber"),
("医生姓名", (t) => t.DoctorName, 1, 1, false, false, false,"DoctorName"), ("医生姓名", (t) => t.DoctorName, 1, 1, false, false, false,"DoctorName"),
("职", (t) => t.JobTitle, 1, 1, false, true, false,"JobTitle"), ("职务分类", (t) => t.JobTitle, 1, 1, false, true, false,"JobTitle"),
("绩效基数核算参考对象", (t) => t.FitPeople, 1, 1, false, false, false, "FitPeople"), ("绩效基数核算参考对象", (t) => t.FitPeople, 1, 1, false, false, false, "FitPeople"),
("岗位系数", (t) => t.PostCoefficient, 1, 1, false, true, false, "PostCoefficient"), ("岗位系数", (t) => t.PostCoefficient, 1, 1, false, true, false, "PostCoefficient"),
("参加工作时间", (t) => t.WorkTime, 1, 1, false, false, false, "WorkTime"), //("参加工作时间", (t) => t.WorkTime, 1, 1, false, false, false, "WorkTime"),
("考核得分率", (t) => Math.Round(t.ScoreAverageRate.Value * 100, 2) , 1, 1, false, true, true, "ScoreAverageRate"), ("考核得分率", (t) => Math.Round((t.ScoreAverageRate ?? 1) * 100, 2) , 1, 1, false, true, true, "ScoreAverageRate"),
("出勤率", (t) => Math.Round(t.Attendance.Value * 100, 2), 1, 1, false, true, true, "Attendance"), ("出勤率", (t) => Math.Round((t.Attendance ?? 0) * 100, 2), 1, 1, false, true, true, "Attendance"),
("核算单元医生数", (t) => t.PeopleNumber, 1, 1, false, true, false, "PeopleNumber"), //("核算单元医生数", (t) => t.PeopleNumber, 1, 1, false, true, false, "PeopleNumber"),
("工作量绩效", (t) =>t.Workload, 1, 1, false, true, false, "Workload"), //("工作量绩效", (t) =>t.Workload, 1, 1, false, true, false, "Workload"),
("其他绩效", (t) => t.OtherPerfor, 1, 1, false, true, false, "OtherPerfor"), //("其他绩效", (t) => t.OtherPerfor, 1, 1, false, true, false, "OtherPerfor"),
("医院奖罚", (t) => t.Punishment, 1, 1, false, true, false, "Punishment"), //("医院奖罚", (t) => t.Punishment, 1, 1, false, true, false, "Punishment"),
("调节系数", (t) => Math.Round(t.Adjust.Value * 100, 2), 1, 1, false, true, true, "Adjust"), ("调节系数", (t) => Math.Round((t.Adjust ?? 1) * 100, 2), 1, 1, false, true, true, "Adjust"),
("发放系数", (t) => t.Grant, 1, 1, false, true, false, "Grant"), //("发放系数", (t) => t.Grant, 1, 1, false, true, false, "Grant"),
}; };
// Tuple Items: 列明, 字段名, mergeRow, mergeCell, isTotal, isNumValue, 是否含有% // Tuple Items: 列明, 字段名, mergeRow, mergeCell, isTotal, isNumValue, 是否含有%
public static List<(string, Func<im_employee_clinic, object>, int, int, bool, bool, bool, string)> employeeClinicHeaders = public static List<(string, Func<im_employee_clinic, object>, int, int, bool, bool, bool, string)> employeeClinicHeaders =
new List<(string, Func<im_employee_clinic, object>, int, int, bool, bool, bool, string)> new List<(string, Func<im_employee_clinic, object>, int, int, bool, bool, bool, string)>
...@@ -38,18 +37,41 @@ public class PerSheetHeader ...@@ -38,18 +37,41 @@ public class PerSheetHeader
("核算单元", (t) => t.AccountingUnit, 1, 1, false, false, false, "AccountingUnit"), ("核算单元", (t) => t.AccountingUnit, 1, 1, false, false, false, "AccountingUnit"),
("人员工号", (t) => t.PersonnelNumber, 1, 1, false, false, false, "PersonnelNumber"), ("人员工号", (t) => t.PersonnelNumber, 1, 1, false, false, false, "PersonnelNumber"),
("医生姓名", (t) => t.DoctorName, 1, 1, false, false, false, "DoctorName"), ("医生姓名", (t) => t.DoctorName, 1, 1, false, false, false, "DoctorName"),
("职称", (t) => t.JobTitle, 1, 1, false, true, false, "JobTitle"), ("职务分类", (t) => t.JobTitle, 1, 1, false, true, false, "JobTitle"),
("岗位系数", (t) => t.PostCoefficient, 1, 1, false, true, false, "PostCoefficient"), //("岗位系数", (t) => t.PostCoefficient, 1, 1, false, true, false, "PostCoefficient"),
("效率绩效系数", (t) => Math.Round(t.Efficiency.Value * 100, 2), 1, 1, false, true, true, "Efficiency"), ("基础绩效系数", (t) => Math.Round((t.Basics ?? 1) * 100, 2), 1, 1, false, true, false, "Basics"),
("规模绩效系数", (t) => Math.Round(t.Scale.Value * 100, 2), 1, 1, false, true, true, "Scale"), ("效率绩效人数", (t) => t.PermanentStaff, 1, 1, false, true, false, "PermanentStaff"),
("管理绩效发放系数", (t) => Math.Round(t.Management.Value * 100, 2), 1, 1, false, true, true, "Management"), ("效率绩效系数", (t) => Math.Round((t.Efficiency ?? 0) * 100, 2), 1, 1, false, true, true, "Efficiency"),
("考核得分率", (t) => Math.Round(t.ScoreAverageRate.Value * 100, 2), 1, 1, false, true, true, "ScoreAverageRate"), ("规模绩效系数", (t) => Math.Round((t.Scale ?? 0) * 100, 2), 1, 1, false, true, true, "Scale"),
("出勤率", (t) => Math.Round(t.Attendance.Value * 100, 2), 1, 1, false, true, true, "Attendance"), ("管理绩效发放系数", (t) => Math.Round((t.Management ?? 1) * 100, 2), 1, 1, false, true, true, "Management"),
("考核得分率", (t) => Math.Round((t.ScoreAverageRate ?? 1) * 100, 2), 1, 1, false, true, true, "ScoreAverageRate"),
("出勤率", (t) => Math.Round((t.Attendance ?? 0) * 100, 2), 1, 1, false, true, true, "Attendance"),
("其他绩效", (t) => t.OtherPerfor, 1, 1, false, true, false, "OtherPerfor"), ("其他绩效", (t) => t.OtherPerfor, 1, 1, false, true, false, "OtherPerfor"),
("医院奖罚", (t) => t.Punishment, 1, 1, false, true, false, "Punishment"), //("医院奖罚", (t) => t.Punishment, 1, 1, false, true, false, "Punishment"),
("调节系数", (t) => Math.Round(t.Adjust.Value * 100, 2), 1, 1, false, true, true, "Adjust"), ("调节系数", (t) => Math.Round(t.Adjust.Value * 100, 2), 1, 1, false, true, true, "Adjust"),
}; };
// Tuple Items: 列明, 字段名, mergeRow, mergeCell, isTotal, isNumValue, 是否含有%
public static List<(string, Func<im_employee_logistics, object>, int, int, bool, bool, bool, string)> employeeLogisticsHeaders =
new List<(string, Func<im_employee_logistics, object>, int, int, bool, bool, bool, string)>
{
("人员分类", (t) => t.AccountType, 1, 1, false, false, false,"AccountType"),
("核算单元", (t) => t.AccountingUnit, 1, 1, false, false, false,"AccountingUnit"),
("人员工号", (t) => t.PersonnelNumber, 1, 1, false, false, false,"PersonnelNumber"),
("人员姓名", (t) => t.DoctorName, 1, 1, false, false, false,"DoctorName"),
("职务分类", (t) => t.JobTitle, 1, 1, false, true, false,"JobTitle"),
("绩效基数核算参考对象", (t) => t.FitPeople, 1, 1, false, false, false, "FitPeople"),
("岗位系数", (t) => t.PostCoefficient, 1, 1, false, true, false, "PostCoefficient"),
//("参加工作时间", (t) => t.WorkTime, 1, 1, false, false, false, "WorkTime"),
//("考核得分率", (t) => Math.Round(t.ScoreAverageRate.Value * 100, 2) , 1, 1, false, true, true, "ScoreAverageRate"),
("出勤率", (t) => Math.Round((t.Attendance ?? 0) * 100, 2), 1, 1, false, true, true, "Attendance"),
//("核算单元医生数", (t) => t.PeopleNumber, 1, 1, false, true, false, "PeopleNumber"),
//("工作量绩效", (t) =>t.Workload, 1, 1, false, true, false, "Workload"),
("其他绩效", (t) => t.OtherPerfor, 1, 1, false, true, false, "OtherPerfor"),
//("医院奖罚", (t) => t.Punishment, 1, 1, false, true, false, "Punishment"),
//("调节系数", (t) => Math.Round(t.Adjust.Value * 100, 2), 1, 1, false, true, true, "Adjust"),
//("发放系数", (t) => t.Grant, 1, 1, false, true, false, "Grant"),
};
// Tuple Items: 列明, 字段名, mergeRow, mergeCell, isTotal, isNumValue, 是否含有% // Tuple Items: 列明, 字段名, mergeRow, mergeCell, isTotal, isNumValue, 是否含有%
public static List<(string, Func<im_specialunit, object>, int, int, bool, bool, bool, string)> specialUnitHeaders = public static List<(string, Func<im_specialunit, object>, int, int, bool, bool, bool, string)> specialUnitHeaders =
...@@ -61,10 +83,10 @@ public class PerSheetHeader ...@@ -61,10 +83,10 @@ public class PerSheetHeader
("量化指标", (t) => t.QuantitativeIndicators, 1, 1, false, true, false, "QuantitativeIndicators"), ("量化指标", (t) => t.QuantitativeIndicators, 1, 1, false, true, false, "QuantitativeIndicators"),
("数量", (t) => t.Quantity, 1, 1, false, true, false, "Quantity"), ("数量", (t) => t.Quantity, 1, 1, false, true, false, "Quantity"),
("量化指标绩效分值", (t) => t.QuantitativeIndicatorsValue, 1, 1, false, true, false, "QuantitativeIndicatorsValue"), ("量化指标绩效分值", (t) => t.QuantitativeIndicatorsValue, 1, 1, false, true, false, "QuantitativeIndicatorsValue"),
("考核得分率", (t) => Math.Round(t.ScoringAverage.Value * 100, 2), 1, 1, false, true, true, "ScoringAverage"), //("考核得分率", (t) => Math.Round(t.ScoringAverage.Value * 100, 2), 1, 1, false, true, true, "ScoringAverage"),
("其他绩效", (t) => t.OtherPerfor, 1, 1, false, true, false, "OtherPerfor"), //("其他绩效", (t) => t.OtherPerfor, 1, 1, false, true, false, "OtherPerfor"),
("医院奖罚", (t) => t.Punishment, 1, 1, false, true, false, "Punishment"), //("医院奖罚", (t) => t.Punishment, 1, 1, false, true, false, "Punishment"),
("调节系数", (t) => Math.Round(t.Adjust.Value * 100, 2), 1, 1, false, true, true, "Adjust"), //("调节系数", (t) => Math.Round(t.Adjust.Value * 100, 2), 1, 1, false, true, true, "Adjust"),
}; };
} }
} }
...@@ -25,8 +25,16 @@ public class PerSheetPoint ...@@ -25,8 +25,16 @@ public class PerSheetPoint
/// 数据开始行 /// 数据开始行
/// </summary> /// </summary>
public int? DataFirstRowNum { get; set; } public int? DataFirstRowNum { get; set; }
/// <summary>
/// 数据开始列
/// </summary>
public int? DataFirstCellNum { get; set; }
public List<AccountingUnit> AccountingUnit { get; set; } public List<AccountingUnit> AccountingUnit { get; set; }
/// <summary>
/// 汇总列
/// </summary>
public int? TotalCellNum { get; set; }
} }
public class AccountingUnit public class AccountingUnit
...@@ -44,8 +52,20 @@ public class AccountingUnit ...@@ -44,8 +52,20 @@ public class AccountingUnit
/// </summary> /// </summary>
public int? DeptCellNum { get; set; } public int? DeptCellNum { get; set; }
/// <summary> /// <summary>
/// 核算单元类型列
/// </summary>
public int? UnitTypeNum { get; set; }
/// <summary>
/// 核算单元类型 /// 核算单元类型
/// </summary> /// </summary>
public string UnitType { get; set; } public string UnitType { get; set; }
/// <summary>
/// 人员名称
/// </summary>
public int? EmpNameCellNum { get; set; }
/// <summary>
/// 人员工号
/// </summary>
public int? JobCellNum { get; set; }
} }
} }
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class AccountUnitTotal
{
public string UnitType { get; set; }
public string AccountingUnit { get; set; }
public decimal? TotelValue { get; set; }
}
public class EmpolyeeTotal : AccountUnitTotal
{
public string JobNumber { get; set; }
public string EmployeeName { get; set; }
}
}
...@@ -13,6 +13,8 @@ public ReportData(rep_report report) ...@@ -13,6 +13,8 @@ public ReportData(rep_report report)
ChartType = report.ChartType; ChartType = report.ChartType;
Sort = report.Sort; Sort = report.Sort;
Title = report.Title; Title = report.Title;
QueryName = report.QueryName;
QueryArguments = report.QueryArguments;
XTitle = report.XTitle; XTitle = report.XTitle;
XUnit = report.XUnit; XUnit = report.XUnit;
YTitle = report.YTitle; YTitle = report.YTitle;
...@@ -30,12 +32,12 @@ public ReportData(rep_report report) ...@@ -30,12 +32,12 @@ public ReportData(rep_report report)
public int ReportID { get; set; } public int ReportID { get; set; }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public Nullable<int> ChartType { get; set; } public Nullable<int> ChartType { get; set; }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public Nullable<int> Sort { get; set; } public Nullable<int> Sort { get; set; }
...@@ -45,6 +47,16 @@ public ReportData(rep_report report) ...@@ -45,6 +47,16 @@ public ReportData(rep_report report)
public string Title { get; set; } public string Title { get; set; }
/// <summary> /// <summary>
/// 查询方法名称
/// </summary>
public string QueryName { get; set; }
/// <summary>
/// 查询参数
/// </summary>
public string QueryArguments { get; set; }
/// <summary>
/// X轴标题 /// X轴标题
/// </summary> /// </summary>
public string XTitle { get; set; } public string XTitle { get; set; }
...@@ -115,23 +127,27 @@ public class ChartData ...@@ -115,23 +127,27 @@ public class ChartData
/// X轴内容 /// X轴内容
/// </summary> /// </summary>
public string X { get; set; } public string X { get; set; }
/// <summary> /// <summary>
/// Y轴内容 /// Y轴内容
/// </summary> /// </summary>
public string Y { get; set; } public string Y { get; set; }
/// <summary> /// <summary>
/// 分类 /// 分类
/// </summary> /// </summary>
public string Name { get; set; } public string Name { get; set; }
/// <summary> /// <summary>
/// 值 /// 值
/// </summary> /// </summary>
public Double Value { get; set; } public decimal Value { get; set; }
/// <summary> /// <summary>
/// 总量 /// 总量
/// </summary> /// </summary>
public Double? Total { get; set; } public Nullable<decimal> Total { get; set; }
/// <summary> /// <summary>
/// ChartData 类型标签 /// ChartData 类型标签
/// </summary> /// </summary>
......
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class ReportTable
{
/// <summary>
/// 人员信息
/// </summary>
public string PersonnelName { get; set; }
/// <summary>
/// 人员工号
/// </summary>
public string PersonnelNumber { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 统计大分类
/// </summary>
public string Category { get; set; }
/// <summary>
/// 统计小分类
/// </summary>
public string ItemName { get; set; }
/// <summary>
/// 本期
/// </summary>
public decimal CurrentValue { get; set; }
/// <summary>
/// 上期
/// </summary>
public decimal LastIssueValue { get; set; }
/// <summary>
/// 同期
/// </summary>
public decimal SamePeriodValue { get; set; }
/// <summary>
/// 预算
/// </summary>
public decimal BudgetValue { get; set; }
/// <summary>
/// 比率
/// </summary>
public decimal RatioValue { get; set; }
}
}
...@@ -9,6 +9,10 @@ public class AgOtherRequest ...@@ -9,6 +9,10 @@ public class AgOtherRequest
{ {
public int SecondId { get; set; } public int SecondId { get; set; }
public int IsArchive { get; set; }
public int EmployeeSource { get; set; }
public List<ag_othersource> Othersources { get; set; } public List<ag_othersource> Othersources { get; set; }
} }
} }
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class AprAmountAuditRequest
{
public class Member
{
public string PersonnelNumber { get; set; }
public string DoctorName { get; set; }
}
/// <summary> 绩效ID </summary>
public int AllotId { get; set; }
public List<Member> Members { 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; }
}
} }
using System;
using System.Collections.Generic;
using System.Text;
using FluentValidation;
namespace Performance.DtoModels.Request
{
public class ComputerAvgRequest
{
public int Id { get; set; }
public int AllotId { get; set; }
public int SheetId { get; set; }
/// <summary>
/// 绩效核算人群
/// </summary>
public string PositionName { get; set; }
/// <summary>
/// 绩效总额
/// </summary>
public decimal TotelValue { get; set; }
/// <summary>
/// 人均绩效
/// </summary>
public decimal AvgValue { get; set; }
/// <summary>
/// 总人数
/// </summary>
public decimal TotelNumber { get; set; }
}
public class ComputerRequestValidator : AbstractValidator<ComputerAvgRequest>
{
public ComputerRequestValidator()
{
RuleFor(x => x.Id).NotNull();
RuleFor(x => x.AllotId).NotNull().GreaterThan(0);
RuleFor(x => x.PositionName).NotNull().NotEmpty();
RuleFor(x => x.TotelNumber).NotNull();
RuleFor(x => x.TotelValue).NotNull();
RuleFor(x => x.AvgValue).NotNull();
}
}
}
...@@ -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>
{ {
......
...@@ -9,6 +9,8 @@ public class DrugpropRequest ...@@ -9,6 +9,8 @@ public class DrugpropRequest
{ {
public int ID { get; set; } public int ID { get; set; }
public int HospitalId { get; set; }
public int AllotID { get; set; } public int AllotID { get; set; }
/// <summary> /// <summary>
/// 药占比最大范围(小于) /// 药占比最大范围(小于)
...@@ -43,6 +45,7 @@ public DrugpropRequestValidator() ...@@ -43,6 +45,7 @@ public DrugpropRequestValidator()
RuleSet("Insert", () => RuleSet("Insert", () =>
{ {
RuleFor(x => x.HospitalId).NotNull().GreaterThan(0);
RuleFor(x => x.AllotID).NotNull().GreaterThan(0); RuleFor(x => x.AllotID).NotNull().GreaterThan(0);
}); });
......
...@@ -9,25 +9,34 @@ public class ExtractRequest ...@@ -9,25 +9,34 @@ public class ExtractRequest
{ {
/// <summary> /// <summary>
/// 绩效ID /// 绩效ID
/// </summary> /// </summary>
public int AllotId { get; set; } public int AllotId { get; set; }
/// <summary> /// <summary>
/// 医院ID /// 医院ID
/// </summary> /// </summary>
public int HospitalId { get; set; } public int HospitalId { get; set; }
/// <summary> /// <summary>
/// 使用方案 /// 使用方案
/// </summary> /// </summary>
public int UseScheme { get; set; } public int UseScheme { get; set; }
/// <summary> /// <summary>
/// 邮箱 /// 邮箱
/// </summary> /// </summary>
public string Email { get; set; } public string Email { get; set; }
}
/// <summary>
/// Signalr分组名称
/// </summary>
public string GroupName { get; set; }
/// <summary>
/// 用户Id
/// </summary>
public int UserId { get; set; }
}
public class ExtractRequestValidator : AbstractValidator<ExtractRequest> public class ExtractRequestValidator : AbstractValidator<ExtractRequest>
{ {
......
...@@ -35,9 +35,9 @@ public class HospitalRequest ...@@ -35,9 +35,9 @@ public class HospitalRequest
/// 医院状态 1 启用 2 禁用 /// 医院状态 1 启用 2 禁用
/// </summary> /// </summary>
public Nullable<int> States { get; set; } public Nullable<int> States { get; set; }
/// <summary> ///// <summary>
/// 是否开启年资系数 1 启用 2 禁用 ///// 是否开启年资系数 1 启用 2 禁用
/// </summary> ///// </summary>
//public Nullable<int> IsOpenWorkYear { get; set; } //public Nullable<int> IsOpenWorkYear { get; set; }
/// <summary> /// <summary>
/// 是否开启药占比系数 1 启用 2 禁用 /// 是否开启药占比系数 1 启用 2 禁用
...@@ -55,6 +55,15 @@ public class HospitalRequest ...@@ -55,6 +55,15 @@ 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; }
///// <summary>
///// 是否开启行政后勤二次绩效分配 1 启用 2 禁用
///// </summary>
//public Nullable<int> IsOpenLogisticsSecondAllot { get; set; }
} }
public class HospitalRequestValidator : AbstractValidator<HospitalRequest> public class HospitalRequestValidator : AbstractValidator<HospitalRequest>
......
...@@ -30,7 +30,7 @@ public class ItemListRequest ...@@ -30,7 +30,7 @@ public class ItemListRequest
public Nullable<int> ModuleId { get; set; } public Nullable<int> ModuleId { get; set; }
/// <summary> 新增项 </summary> /// <summary> 新增项 </summary>
public List<mod_item> Items { get; set; } public List<ex_item> Items { get; set; }
} }
} }
...@@ -13,7 +13,7 @@ public class ModModuleRequest ...@@ -13,7 +13,7 @@ public class ModModuleRequest
/// <summary> 医院Id </summary> /// <summary> 医院Id </summary>
public Nullable<int> HospitalId { get; set; } public Nullable<int> HospitalId { get; set; }
public Nullable<int> ExtractId { get; set; } public Nullable<int> TypeId { get; set; }
/// <summary> /// <summary>
/// 数据库地址 /// 数据库地址
......
...@@ -21,6 +21,6 @@ public class SpecialListRequest ...@@ -21,6 +21,6 @@ public class SpecialListRequest
public int HospitalId { get; set; } public int HospitalId { get; set; }
/// <summary> 特殊考核项 </summary> /// <summary> 特殊考核项 </summary>
public List<mod_special> Items { get; set; } public List<ex_special> Items { get; set; }
} }
} }
namespace Performance.DtoModels
{
public class RecalculationRequest
{
public int AllotId { get; set; }
public decimal? Money { get; set; }
}
}
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);
}
}
}
...@@ -9,7 +9,7 @@ public class HospitalIdRequest ...@@ -9,7 +9,7 @@ public class HospitalIdRequest
{ {
public int HospitalId { get; set; } public int HospitalId { get; set; }
} }
public class SelectionRequest public class SelectionRequest : HospitalIdRequest
{ {
public int GroupId { get; set; } public int GroupId { get; set; }
} }
......
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class SignalrLogRequest
{
public int Type { get; set; }
public string Tag { get; set; }
public string Message { get; set; }
public int Level { get; set; }
public string GroupName { get; set; }
}
}
...@@ -19,7 +19,11 @@ public class UseTempRequest ...@@ -19,7 +19,11 @@ public class UseTempRequest
/// <summary> 是否归档 </summary> /// <summary> 是否归档 </summary>
public int IsArchive { get; set; } public int IsArchive { get; set; }
/// <summary> 人员信息来源 </summary>
public int EmployeeSource { get; set; }
} }
public class UseTempRequestValidator : AbstractValidator<UseTempRequest> public class UseTempRequestValidator : AbstractValidator<UseTempRequest>
{ {
public UseTempRequestValidator() public UseTempRequestValidator()
......
...@@ -42,7 +42,11 @@ public class UserRequest ...@@ -42,7 +42,11 @@ public class UserRequest
/// 角色 /// 角色
/// </summary> /// </summary>
public int Role { get; set; } public int Role { get; set; }
/// <summary>
/// 角色Arr
/// </summary>
public int[] RoleArr { get; set; }
/// <summary> /// <summary>
/// 用户医院ID /// 用户医院ID
/// </summary> /// </summary>
...@@ -62,14 +66,14 @@ public UserRequestValidator() ...@@ -62,14 +66,14 @@ public UserRequestValidator()
{ {
RuleFor(x => x.RealName).NotNull().NotEmpty(); RuleFor(x => x.RealName).NotNull().NotEmpty();
RuleFor(x => x.Login).NotNull().NotEmpty(); RuleFor(x => x.Login).NotNull().NotEmpty();
RuleFor(x => x.Mobile).NotNull().NotEmpty().Must((pre) => { return CustomValidator.IsMobile(pre); }); //RuleFor(x => x.Mobile).NotNull().NotEmpty().Must((pre) => { return CustomValidator.IsMobile(pre); });
RuleFor(x => x.Mail).EmailAddress().When(pre => { return !string.IsNullOrEmpty(pre.Mail); }); //RuleFor(x => x.Mail).EmailAddress().When(pre => { return !string.IsNullOrEmpty(pre.Mail); });
}; };
RuleSet("Insert", () => RuleSet("Insert", () =>
{ {
action(); action();
RuleFor(x => x.Role).NotNull().NotEmpty().GreaterThan(0); RuleFor(x => x.RoleArr).NotNull().NotEmpty();
RuleFor(x => x.Password).NotNull().NotEmpty().Length(4, 20); RuleFor(x => x.Password).NotNull().NotEmpty().Length(4, 20);
RuleFor(x => x.HosIDArray).NotNull().NotEmpty().Must(f => f.Length > 0); RuleFor(x => x.HosIDArray).NotNull().NotEmpty().Must(f => f.Length > 0);
}); });
...@@ -79,8 +83,8 @@ public UserRequestValidator() ...@@ -79,8 +83,8 @@ 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.RoleArr).NotNull().NotEmpty();
RuleFor(x => x.HosIDArray).NotNull().NotEmpty().Must(f => f.Length > 0); RuleFor(x => x.HosIDArray).NotNull().NotEmpty().Must(f => f.Length > 0);
}); });
...@@ -92,13 +96,13 @@ public UserRequestValidator() ...@@ -92,13 +96,13 @@ public UserRequestValidator()
RuleSet("Self", () => RuleSet("Self", () =>
{ {
RuleFor(x => x.Password).Length(4, 20); RuleFor(x => x.Password).Length(4, 20);
RuleFor(x => x.Mobile).Must((pre) => //RuleFor(x => x.Mobile).Must((pre) =>
{ //{
if (!string.IsNullOrEmpty(pre)) // if (!string.IsNullOrEmpty(pre))
return CustomValidator.IsMobile(pre); // return CustomValidator.IsMobile(pre);
return true; // return true;
}); //});
RuleFor(x => x.Mail).EmailAddress().When(pre => { return !string.IsNullOrEmpty(pre.Mail); }); //RuleFor(x => x.Mail).EmailAddress().When(pre => { return !string.IsNullOrEmpty(pre.Mail); });
}); });
} }
} }
......
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class WorkDetailRequest
{
public int AllotId { get; set; }
public int SecondId { get; set; }
public string Source { get; set; }
public string AccountingUnit { get; set; }
}
public class WorkDetailRequestValidator : AbstractValidator<WorkDetailRequest>
{
public WorkDetailRequestValidator()
{
RuleSet("Select", () =>
{
RuleFor(x => x.AllotId).NotNull().NotEmpty().GreaterThan(0);
RuleFor(x => x.SecondId).NotNull().NotEmpty().GreaterThan(0);
RuleFor(x => x.AccountingUnit).NotNull().NotEmpty();
});
}
}
}
...@@ -16,31 +16,36 @@ public class WorkItemRequest ...@@ -16,31 +16,36 @@ public class WorkItemRequest
/// </summary> /// </summary>
public string Item { get; set; } public string Item { get; set; }
/// <summary>
public class WorkItemRequestValidator : AbstractValidator<WorkItemRequest> /// 1. 药占比 2. CMI
/// </summary>
public int Type { get; set; }
}
public class WorkItemRequestValidator : AbstractValidator<WorkItemRequest>
{
public WorkItemRequestValidator()
{ {
public WorkItemRequestValidator() RuleSet("Select", () =>
{ {
RuleSet("Select", () => RuleFor(x => x.AllotID).NotNull().NotEmpty().GreaterThan(0);
{ });
RuleFor(x => x.AllotID).NotNull().NotEmpty().GreaterThan(0);
});
RuleSet("Insert", () => RuleSet("Insert", () =>
{ {
RuleFor(x => x.AllotID).NotNull().GreaterThan(0); RuleFor(x => x.AllotID).NotNull().GreaterThan(0);
}); RuleFor(x => x.Type).NotNull().GreaterThan(0);
});
RuleSet("Update", () => RuleSet("Update", () =>
{ {
RuleFor(x => x.ID).NotNull().GreaterThan(0); RuleFor(x => x.ID).NotNull().GreaterThan(0);
}); RuleFor(x => x.Type).NotNull().GreaterThan(0);
});
RuleSet("Delete", () => RuleSet("Delete", () =>
{ {
RuleFor(x => x.ID).NotNull().GreaterThan(0); RuleFor(x => x.ID).NotNull().GreaterThan(0);
}); });
}
} }
} }
} }
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels.Response
{
public class CollectPermission
{
public int HospitalId { get; set; }
public string SheetName { get; set; }
public int? PermissionId { get; set; }
/// <summary>
/// 列头名称
/// </summary>
public string HeadName { get; set; }
/// <summary>
/// 禁止修改
/// </summary>
public bool BanChange { get; set; }
/// <summary>
/// 0 可读可写 1 只读
/// </summary>
public int Readnoly { get; set; }
/// <summary>
/// 是否可见 0 不可见 1 可见
/// </summary>
public int Visible { get; set; }
/// <summary>
/// 是否附带上次绩效 0 不附带 1 附带
/// </summary>
public int AttachLast { get; set; }
public int SheetType { get; set; }
}
}
...@@ -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,63 @@ public class ComputeResponse ...@@ -32,8 +45,63 @@ 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; }
/// <summary>
///
/// </summary>
public Nullable<decimal> Punishment { get; set; }
/// <summary>
///
/// </summary>
public Nullable<decimal> GiveFee { get; set; }
/// <summary>
///
/// </summary>
public Nullable<decimal> Adjust { get; set; }
/// <summary>
///
/// </summary>
public Nullable<decimal> AdjustLaterOtherFee { get; set; }
} }
} }
...@@ -18,6 +18,18 @@ public class DeptDetail ...@@ -18,6 +18,18 @@ public class DeptDetail
} }
public class DeptDataDetails<T>
{
/// <summary> 概览</summary>
public PerDataAccountBaisc Pandect { get; set; }
/// <summary> 收入明细 </summary>
public List<DetailDtos<T>> Detail { get; set; }
/// <summary> 0 不显示 1 显示 </summary>
public int ShowFormula { get; set; }
}
public class DeptDataDetails public class DeptDataDetails
{ {
/// <summary> 概览</summary> /// <summary> 概览</summary>
...@@ -30,23 +42,34 @@ public class DeptDataDetails ...@@ -30,23 +42,34 @@ public class DeptDataDetails
public int ShowFormula { get; set; } public int ShowFormula { get; set; }
} }
public class DetailDtos public class DetailDtos<T>
{ {
/// <summary> 收入项名称 </summary> /// <summary> 收入项名称 </summary>
public string ItemName { get; set; } public string ItemName { get; set; }
/// <summary> 1、收入 2、支出 3、工作量 </summary> /// <summary> 1、收入 2、支出 3、工作量 4、特殊科室 5、科室奖罚 6、科室药占比考核 7、科室材料占比考核 8、调节后其他绩效 9、行政工勤 </summary>
public int IncomeType { get; set; } public int IncomeType { get; set; }
/// <summary> 原始SheetType </summary>
public int OriginalType { get; set; }
/// <summary> 金额 </summary> /// <summary> 金额 </summary>
public decimal Amount { get; set; } public decimal Amount { get; set; }
/// <summary> 详情 </summary> /// <summary> 详情 </summary>
public List<DetailModule> Items { get; set; } public List<T> Items { get; set; }
/// <summary> 分组依据 </summary>
public int GroupBasis { get; set; }
}
public class DetailDtos : DetailDtos<DetailModule>
{
} }
public class DetailModule public class DetailModule
{ {
/// <summary> 工号 </summary>
public string JobNumber { get; set; }
/// <summary> 明细项 </summary> /// <summary> 明细项 </summary>
public string ItemName { get; set; } public string ItemName { get; set; }
...@@ -56,7 +79,29 @@ public class DetailModule ...@@ -56,7 +79,29 @@ public class DetailModule
/// <summary> 系数 </summary> /// <summary> 系数 </summary>
public decimal? Factor { get; set; } public decimal? Factor { get; set; }
/// <summary> 药占比系数 </summary>
public decimal? MediFactor { get; set; }
/// <summary> CMI系数 </summary>
public decimal? CMIFactor { get; set; }
/// <summary> 工作量倾斜系数 </summary>
public decimal? InclineFactor { get; set; }
/// <summary> 结算值 </summary> /// <summary> 结算值 </summary>
public decimal? ItemValue { get; set; } public decimal? ItemValue { get; set; }
} }
public class DetailModuleExtend : DetailModule
{
/// <summary> 原始值 </summary>
public decimal? CellValue2 { get; set; }
/// <summary> 系数 </summary>
public decimal? Factor2 { get; set; }
/// <summary> 结算值 </summary>
public decimal? ItemValue2 { 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; }
}
}
...@@ -7,17 +7,17 @@ namespace Performance.DtoModels ...@@ -7,17 +7,17 @@ namespace Performance.DtoModels
public class DeptResponse public class DeptResponse
{ {
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public int ID { get; set; } public int ID { get; set; }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public Nullable<int> AllotID { get; set; } public Nullable<int> AllotID { get; set; }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public Nullable<int> SheetID { get; set; } public Nullable<int> SheetID { get; set; }
...@@ -84,6 +84,16 @@ public class DeptResponse ...@@ -84,6 +84,16 @@ public class DeptResponse
public Nullable<decimal> OtherPerfor2 { get; set; } public Nullable<decimal> OtherPerfor2 { get; set; }
/// <summary> /// <summary>
/// 药占比奖罚
/// </summary>
public Nullable<decimal> MedicineExtra { get; set; }
/// <summary>
/// 材料占比奖罚
/// </summary>
public Nullable<decimal> MaterialsExtra { get; set; }
/// <summary>
/// 医院奖罚 /// 医院奖罚
/// </summary> /// </summary>
public Nullable<decimal> Extra { get; set; } public Nullable<decimal> Extra { get; set; }
...@@ -119,7 +129,7 @@ public class DeptResponse ...@@ -119,7 +129,7 @@ public class DeptResponse
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; }
...@@ -137,5 +147,35 @@ public class DeptResponse ...@@ -137,5 +147,35 @@ 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; }
/// <summary>
/// 考核后绩效
/// </summary>
public Nullable<decimal> AssessLaterPerforTotal { get; set; }
/// <summary>
/// 考核后管理绩效
/// </summary>
public Nullable<decimal> AssessLaterManagementFee { get; set; }
/// <summary>
/// 其他绩效
/// </summary>
public Nullable<decimal> AprPerforAmount { get; set; }
} }
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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