Commit b4cd4e2b by 799284587@qq.com

Merge branch 'develop'

parents 21a94fdb a15e8ab6
......@@ -5,6 +5,7 @@
using Newtonsoft.Json.Linq;
using Performance.DtoModels;
using Performance.DtoModels.AppSettings;
using Performance.EntityModels;
using Performance.Infrastructure;
using Performance.Services;
using System;
......@@ -51,10 +52,11 @@ public ApiResponse<UserIdentity> Login([FromBody]LoginRequest request)
var user = _userService.Login(request);
if (user == null)
return new ApiResponse<UserIdentity>(ResponseType.Fail, "用户不存在");
int[] roleArray = new int[] { _options.NurseRole, _options.DirectorRole };
user.Hospital = _hospitalService.GetUserHopital(user.UserID);
user.Role = _roleService.GetUserRole(user.UserID);
user.IsHome = (user.Hospital != null && user.Hospital.Count > 1);
user.IsAgainAdmin = user.Role != null ? roleArray.Contains(user.Role.First().RoleID) : false;
if (string.IsNullOrEmpty(user.Token))
user.Token = Guid.NewGuid().ToString("N");
......@@ -69,6 +71,19 @@ public ApiResponse<UserIdentity> Login([FromBody]LoginRequest request)
}
/// <summary>
/// 查询个人信息
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("selfinfo")]
[HttpPost]
public ApiResponse SelfInfo([FromBody]ApiRequest request)
{
var user = _claim.At(request.Token);
return new ApiResponse(ResponseType.OK, user);
}
/// <summary>
/// 修改个人信息
/// </summary>
/// <param name="request"></param>
......@@ -83,7 +98,7 @@ public ApiResponse<UserResponse> UpdateSelf([CustomizeValidator(RuleSet = "Self"
}
/// <summary>
///
/// 用户列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
......@@ -104,36 +119,37 @@ public ApiResponse<List<UserResponse>> List([FromBody]ApiRequest request)
[HttpPost]
public ApiResponse<UserResponse> Insert([CustomizeValidator(RuleSet = "Insert"), FromBody]UserRequest request)
{
var userid = _claim.At(request.Token).UserID;
var user = _userService.Insert(request, userid);
var userIdentity = _claim.At(request.Token);
var user = _userService.Insert(request, userIdentity.UserID);
user.Role = request.Role;
return new ApiResponse<UserResponse>(ResponseType.OK, user);
}
/// <summary>
/// 修改用户
/// 新增用户
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("update")]
[Route("delete")]
[HttpPost]
public ApiResponse<UserResponse> Update([CustomizeValidator(RuleSet = "Update"), FromBody]UserRequest request)
public ApiResponse Delete([CustomizeValidator(RuleSet = "Delete"), FromBody]UserRequest request)
{
var user = _userService.Update(request);
return new ApiResponse<UserResponse>(ResponseType.OK, user);
return _userService.Delete(request.ID);
}
/// <summary>
/// 设置用户管辖医院
/// 删除用户
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("sethospital")]
[Route("update")]
[HttpPost]
public ApiResponse SetHospital([FromBody]SetHospitalRequest request)
public ApiResponse<UserResponse> Update([CustomizeValidator(RuleSet = "Update"), FromBody]UserRequest request)
{
if (!_userService.SetHospital(request))
return new ApiResponse(ResponseType.Fail);
return new ApiResponse(ResponseType.OK);
var userIdentity = _claim.At(request.Token);
var user = _userService.Update(request, userIdentity.IsAgainAdmin);
user.Role = request.Role;
return new ApiResponse<UserResponse>(ResponseType.OK, user);
}
/// <summary>
......@@ -149,5 +165,31 @@ public ApiResponse<UserResponse> Password([FromBody]PasswordRequest request)
var user = _userService.UpdatePwd(request, userid);
return new ApiResponse<UserResponse>(ResponseType.OK, user);
}
/// <summary>
/// 角色列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("rolelist")]
[HttpPost]
public ApiResponse<List<sys_role>> RoleList([FromBody]ApiRequest request)
{
var roleList = _userService.RoleList();
return new ApiResponse<List<sys_role>>(ResponseType.OK, "ok", roleList);
}
/// <summary>
/// 科室列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("department")]
[HttpPost]
public ApiResponse<List<TitleValue>> Department([FromBody]SetDepartmentRequest request)
{
var department = _userService.Department(request.HospitalID);
return new ApiResponse<List<TitleValue>>(ResponseType.OK, "ok", department);
}
}
}
using FluentValidation.AspNetCore;
using Hangfire;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Internal;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Performance.DtoModels;
using Performance.DtoModels.AppSettings;
using Performance.EntityModels;
using Performance.Infrastructure;
using Performance.Services;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
namespace Performance.Api.Controllers
{
/// <summary>
/// 科室二次分配
/// </summary>
[Route("api/[controller]")]
public class AgainAllotController : Controller
{
private AgainAllotService againAllotService;
private ComputeService computeService;
private ClaimService claimService;
private AllotService allotService;
private IHostingEnvironment env;
private ConfigService configService;
private Application application;
public AgainAllotController(AgainAllotService againAllotService,
ClaimService claimService,
AllotService allotService,
IHostingEnvironment env,
ConfigService configService,
ComputeService computeService,
IOptions<Application> options)
{
this.againAllotService = againAllotService;
this.claimService = claimService;
this.allotService = allotService;
this.env = env;
this.configService = configService;
this.computeService = computeService;
this.application = options.Value;
}
/// <summary>
/// 返回当前用户医院下绩效列表
/// </summary>
/// <returns></returns>
[Route("allotlist")]
[HttpPost]
public ApiResponse AllotList([FromBody]ApiRequest request)
{
var user = claimService.At(request);
var list = againAllotService.GetAllotList(user.UserID);
return new ApiResponse(ResponseType.OK, list);
}
/// <summary>
/// 上传文件
/// </summary>
/// <param name="form"></param>
/// <returns></returns>
[Route("import")]
[HttpPost]
public ApiResponse Import([FromForm] IFormCollection form)
{
var againid = form.ToDictionary().GetValue("againid", 0);
if (againid <= 0)
return new ApiResponse(ResponseType.Fail, "参数错误", "againid无效");
var file = ((FormFileCollection)form.Files).FirstOrDefault();
if (file == null)
return new ApiResponse(ResponseType.Fail, "参数错误", "文件无效");
var again = againAllotService.GetAgainallot(againid);
if (again == null)
return new ApiResponse(ResponseType.Fail, "二次绩效记录不存在");
var allot = allotService.GetAllot(again.AllotID.Value);
if (allot == null)
return new ApiResponse(ResponseType.Fail, "一次绩效记录不存在");
var name = FileHelper.GetFileNameNoExtension(file.FileName) + DateTime.Now.ToString("yyyyMMddHHmmssfff");
var ext = FileHelper.GetExtension(file.FileName);
var dpath = Path.Combine(env.ContentRootPath, "Files", $"{allot.HospitalId}", $"{allot.Year}{allot.Month.ToString().PadLeft(2, '0')}");
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}上传失败");
allot.Path = path;
allot.Remark = EnumHelper.GetDescription(AllotStates.FileUploaded);
if (!againAllotService.Update(allot, againid))
return new ApiResponse(ResponseType.Fail, $"{file.FileName}上传成功,修改状态失败");
configService.ClearAgain(againid);
}
return new ApiResponse(ResponseType.OK);
}
/// <summary>
/// 查看科室绩效
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("departmentdetail")]
[HttpPost]
public ApiResponse DepartmentDetail([CustomizeValidator(RuleSet = "Generate"), FromBody]AgainAllotRequest request)
{
var user = claimService.At(request);
var again = againAllotService.GetAgainallot(request.AgainAllotID);
if (again == null)
return new ApiResponse(ResponseType.Fail, "当前二次绩效ID无效");
if (user.Role.First().RoleID == application.DirectorRole)
{
var detail = computeService.GetDepartmentDetail(again.AllotID.Value, user.Department, 1);
return new ApiResponse(ResponseType.OK, detail);
}
else if (user.Role.First().RoleID == application.NurseRole)
{
var detail = computeService.GetDepartmentDetail(again.AllotID.Value, user.Department, 2);
return new ApiResponse(ResponseType.OK, detail);
}
return new ApiResponse(ResponseType.Fail, "当前用户角色无法识别");
}
/// <summary>
/// 生成绩效
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("generate")]
[HttpPost]
public ApiResponse Generate([CustomizeValidator(RuleSet = "Generate"), FromBody]AgainAllotRequest request)
{
var user = claimService.At(request);
var result = againAllotService.Generate(request, user);
return new ApiResponse(ResponseType.OK);
}
/// <summary>
/// 查看绩效详情
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("detail")]
[HttpPost]
public ApiResponse Detail([CustomizeValidator(RuleSet = "Generate"), FromBody]AgainAllotRequest request)
{
var user = claimService.At(request);
var result = againAllotService.Detail(request, user);
return new ApiResponse(ResponseType.OK, new { result.AgainSituation, result.SheetExport });
}
}
}
......@@ -25,24 +25,22 @@ public class AllotController : Controller
{
private AllotService _allotService;
private HospitalService _hospitalService;
private PerExcelService _perExcelService;
private ConfigService _configService;
private IHostingEnvironment _evn;
private ILogger<AllotController> _logger;
private ClaimService _claim;
public AllotController(AllotService allotService,
HospitalService hospitalService,
PerExcelService perExcelService,
ILogger<AllotController> logger,
IHostingEnvironment evn,
HospitalService hospitalService, ConfigService configService,
ILogger<AllotController> logger, IHostingEnvironment evn,
ClaimService claim)
{
_allotService = allotService;
_hospitalService = hospitalService;
_perExcelService = perExcelService;
_logger = logger;
_evn = evn;
_claim = claim;
_configService = configService;
}
/// <summary>
......@@ -65,11 +63,12 @@ public ApiResponse List([FromBody]AllotRequest request)
/// <returns></returns>
[Route("insert")]
[HttpPost]
public ApiResponse<AllotResponse> Insert([CustomizeValidator(RuleSet = "Insert"), FromBody]AllotRequest request)
public ApiResponse Insert([CustomizeValidator(RuleSet = "Insert"), FromBody]AllotRequest request)
{
var user = _claim.At(request);
var result = _allotService.InsertAllot(request, user.UserID);
return new ApiResponse<AllotResponse>(ResponseType.OK, result);
_configService.Copy(result);
return new ApiResponse(ResponseType.OK, result);
}
/// <summary>
......@@ -138,8 +137,7 @@ public ApiResponse Import([FromForm] IFormCollection form)
allot.UploadDate = DateTime.Now;
if (!_allotService.Update(allot))
return new ApiResponse(ResponseType.Fail, $"{file.FileName}上传成功,修改状态失败");
_perExcelService.Clear(allot.ID);
_perExcelService.Copy(allot);
_configService.Clear(allot.ID);
}
return new ApiResponse(ResponseType.OK);
......@@ -157,9 +155,59 @@ public ApiResponse Generate([CustomizeValidator(RuleSet = "Delete"), FromBody]Al
var allot = _allotService.GetAllot(request.ID);
if (null == allot || string.IsNullOrEmpty(allot.Path))
throw new PerformanceException("当前绩效记录不存在或没有上传数据文件");
//_perExcelService.Execute(allot);
BackgroundJob.Enqueue(() => _perExcelService.Execute(allot));
var user = _claim.At(request);
//_allotService.Generate(allot, user.Mail);
BackgroundJob.Enqueue(() => _allotService.Generate(allot, user.Mail));
return new ApiResponse(ResponseType.OK);
}
/// <summary>
/// 归档绩效记录
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("pigeonhole")]
[HttpPost]
public ApiResponse Pigeonhole([CustomizeValidator(RuleSet = "Delete"), FromBody]AllotRequest request)
{
var allot = _allotService.GetAllot(request.ID);
if (null == allot)
throw new PerformanceException("当前绩效记录不存在或没有上传数据文件");
_allotService.Pigeonhole(allot);
return new ApiResponse(ResponseType.OK);
}
/// <summary>
/// 归档时检索数据是否合格
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("checkrecord")]
[HttpPost]
public ApiResponse CheckRecord([CustomizeValidator(RuleSet = "Delete"), FromBody]AllotRequest request)
{
var allot = _allotService.GetAllot(request.ID);
if (null == allot)
throw new PerformanceException("当前绩效记录不存在或没有上传数据文件");
var list = _allotService.GetAgainAllotNotSucceed(allot);
return new ApiResponse(ResponseType.OK, list);
}
/// <summary>
/// 绩效校验结果
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("allotcheckresult")]
[HttpPost]
public ApiResponse AllotCheckResult([CustomizeValidator(RuleSet = "Delete"), FromBody]AllotRequest request)
{
var allot = _allotService.GetAllot(request.ID);
if (null == allot)
throw new PerformanceException("当前绩效记录不存在");
var list = _allotService.AllotCheckResult(allot);
return new ApiResponse(ResponseType.OK, list);
}
}
}
using FluentValidation.AspNetCore;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.Options;
using Newtonsoft.Json.Linq;
using Performance.DtoModels;
using Performance.DtoModels.AppSettings;
using Performance.EntityModels;
using Performance.Infrastructure;
using Performance.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Performance.Api.Controllers
{
[Route("api/[controller]")]
public class AssessController : Controller
{
private ClaimService claimService;
private AssessService assessService;
private UserService userService;
public AssessController(ClaimService claimService,
AssessService assessService, UserService userService)
{
this.claimService = claimService;
this.assessService = assessService;
this.userService = userService;
}
//考核类别列表
[HttpPost]
[Route("assesslist")]
public ApiResponse AssessList([CustomizeValidator(RuleSet = "List"), FromBody]AssessRequest request)
{
return assessService.AssessList(request.AllotID);
}
//新增考核类别
[HttpPost]
[Route("addassess")]
public ApiResponse AddAssess([CustomizeValidator(RuleSet = "Add"), FromBody]AssessRequest request)
{
return assessService.AddAssess(request.AllotID, request.AssessName);
}
//修改考核类别
[HttpPost]
[Route("editassess")]
public ApiResponse EditAssess([CustomizeValidator(RuleSet = "Update"), FromBody]AssessRequest request)
{
return assessService.EditAssess(request.AssessID, request.AssessName);
}
//删除考核类别
[HttpPost]
[Route("delassess")]
public ApiResponse DelAssess([CustomizeValidator(RuleSet = "Del"), FromBody]AssessRequest request)
{
return assessService.DelAssess(request.AssessID);
}
//获取所有科室列表
[HttpPost]
[Route("departmentlist")]
public ApiResponse DepartmentList([CustomizeValidator(RuleSet = "Use"), FromBody]AssessRequest request)
{
var department = assessService.Department(request);
return new ApiResponse(ResponseType.OK, "ok", department);
}
//设置科室考核分类
[HttpPost]
[Route("setassesstype")]
public ApiResponse SetAssessType([FromBody]SetAssessRequest request)
{
return assessService.SetAssessType(request);
}
//考核列头列表
[HttpPost]
[Route("columnlist")]
public ApiResponse ColumnList([CustomizeValidator(RuleSet = "List"), FromBody]AssessColumnRequest request)
{
return assessService.ColumnList(request.AssessID);
}
//新增考核项
[HttpPost]
[Route("addcolumn")]
public ApiResponse AddColumn([CustomizeValidator(RuleSet = "Add"), FromBody]AssessColumnRequest request)
{
return assessService.AddColumn(request.AssessID, request.ParentID, request.ColumnName, request.Sort);
}
//修改考核项
[HttpPost]
[Route("editcolumn")]
public ApiResponse EditColumn([CustomizeValidator(RuleSet = "Update"), FromBody]AssessColumnRequest request)
{
return assessService.EditColumn(request.ColumnID, request.ColumnName, request.Sort);
}
//删除考核项
[HttpPost]
[Route("delcolumn")]
public ApiResponse DelColumn([CustomizeValidator(RuleSet = "Del"), FromBody]AssessColumnRequest request)
{
return assessService.DelColumn(request.ColumnID);
}
//考核数据列表
[HttpPost]
[Route("datalist")]
public ApiResponse DataList([CustomizeValidator(RuleSet = "List"), FromBody]AssessDataRequest request)
{
return assessService.DataList(request.AssessID);
}
//考核数据修改
[HttpPost]
[Route("editassessdata")]
public ApiResponse EditAssessData([CustomizeValidator(RuleSet = "Edit"), FromBody]AssessDataRequest request)
{
return assessService.EditAssessData(request.AssessRow);
}
//考核模版列表
[HttpPost]
[Route("tempassesslist")]
public ApiResponse TempAssessList([FromBody]ApiRequest request)
{
return assessService.TempAssessList();
}
//模板列头列表
[HttpPost]
[Route("tempcolumnlist")]
public ApiResponse TempColumnList([CustomizeValidator(RuleSet = "List"), FromBody]AssessColumnRequest request)
{
return assessService.TempColumnList(request.AssessID);
}
//使用考核模版
[HttpPost]
[Route("usetemplate")]
public ApiResponse UseTemplate([CustomizeValidator(RuleSet = "Use"), FromBody]AssessRequest request)
{
return assessService.UseTemplate(request.AllotID, request.AssessID);
}
}
}
......@@ -20,11 +20,14 @@ public class ComputeController : Controller
{
private ComputeService _computeService;
private AllotService _allotService;
private ClaimService _claim;
public ComputeController(AllotService allotService,
ComputeService computeService)
ComputeService computeService,
ClaimService claim)
{
_allotService = allotService;
_computeService = computeService;
_claim = claim;
}
/// <summary>
......@@ -34,13 +37,13 @@ public class ComputeController : Controller
/// <returns></returns>
[Route("getcompute")]
[HttpPost]
public ApiResponse<List<res_compute>> GetCompute([CustomizeValidator(RuleSet = "Select"), FromBody]ComputerRequest request)
public ApiResponse GetCompute([CustomizeValidator(RuleSet = "Select"), FromBody]ComputerRequest request)
{
var allot = _allotService.GetAllot(request.AllotId);
if (null == allot)
throw new PerformanceException("当前绩效记录不存在");
var list = _computeService.GetCompute(request.AllotId, request.Type);
return new ApiResponse<List<res_compute>>(ResponseType.OK, "ok", list);
return new ApiResponse(ResponseType.OK, "ok", list);
}
/// <summary>
......@@ -104,8 +107,57 @@ public ApiResponse<DeptDetailResponse> DeptDetail([FromBody]DeptDetailRequest re
if (null == allot)
throw new PerformanceException("当前绩效记录不存在");
DeptDetailResponse response = _computeService.GetDepartmentDetail(request);
DeptDetailResponse response = _computeService.GetDepartmentDetail(request.AllotId, request.AccountID, request.Type);
return new ApiResponse<DeptDetailResponse>(ResponseType.OK, response);
}
/// <summary>
/// 获取全院绩效列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("allcompute")]
[HttpPost]
public ApiResponse AllCompute([FromBody]ComputerRequest request)
{
var allot = _allotService.GetAllot(request.AllotId);
if (null == allot)
throw new PerformanceException("当前绩效记录不存在");
var list = _computeService.AllCompute(request.AllotId);
return new ApiResponse(ResponseType.OK, "ok", list);
}
/// <summary>
/// 修改实发绩效
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("updatereal")]
[HttpPost]
public ApiResponse UpdateRealfee([CustomizeValidator(RuleSet = "UpdateReal"), FromBody] ComputerRequest request)
{
var user = _claim.At(request);
var compute = _computeService.GetComputeSingle(request.ComputeId);
if (null == compute)
throw new PerformanceException("当前数据记录不存在");
compute = _computeService.UpdateRealfee(request, user);
return new ApiResponse(ResponseType.OK, "修改成功", compute);
}
/// <summary>
/// 获取全院绩效列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("getbaiscnorm")]
[HttpPost]
public ApiResponse GetBaiscnorm([FromBody]ComputerRequest request)
{
var allot = _allotService.GetAllot(request.AllotId);
if (null == allot)
throw new PerformanceException("当前绩效记录不存在");
var list = _computeService.GetBaiscnorm(request.AllotId);
return new ApiResponse(ResponseType.OK, "ok", list);
}
}
}
\ No newline at end of file
......@@ -46,7 +46,7 @@ public ApiResponse<List<DirectorResponse>> GetDireList([CustomizeValidator(RuleS
/// <returns></returns>
[Route("direinsert")]
[HttpPost]
public ApiResponse<DirectorResponse> DireInsert([FromBody]DirectorRequest request)
public ApiResponse<DirectorResponse> DireInsert([CustomizeValidator(RuleSet = "Insert"), FromBody]DirectorRequest request)
{
var director = _configService.DireInsert(request);
return new ApiResponse<DirectorResponse>(ResponseType.OK, director);
......@@ -101,7 +101,7 @@ public ApiResponse<List<DrugpropResponse>> GetDrugList([CustomizeValidator(RuleS
/// <returns></returns>
[Route("druginsert")]
[HttpPost]
public ApiResponse<DrugpropResponse> DrugInsert([FromBody]DrugpropRequest request)
public ApiResponse<DrugpropResponse> DrugInsert([CustomizeValidator(RuleSet = "Insert"), FromBody]DrugpropRequest request)
{
var drugprop = _configService.DrugInsert(request);
return new ApiResponse<DrugpropResponse>(ResponseType.OK, drugprop);
......@@ -135,6 +135,62 @@ public ApiResponse Delete([CustomizeValidator(RuleSet = "Delete"), FromBody]Drug
}
#endregion
#region drugprop
/// <summary>
/// 获取 药占比类型信息列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("dtypelist")]
[HttpPost]
public ApiResponse GetDrugtypeList([CustomizeValidator(RuleSet = "Select"), FromBody]DrugpropRequest request)
{
var list = _configService.GetDrugtypeList(request.AllotID);
return new ApiResponse(ResponseType.OK, "ok", list);
}
/// <summary>
/// 新增药占比类型
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("dtypeinsert")]
[HttpPost]
public ApiResponse DrugtypeInsert([CustomizeValidator(RuleSet = "Insert"), FromBody]DrugpropRequest request)
{
var drugprop = _configService.DrugtypeInsert(request);
return new ApiResponse(ResponseType.OK, drugprop);
}
/// <summary>
/// 修改药占比类型
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("dtypeupdate")]
[HttpPost]
public ApiResponse DrugtypeUpdate([CustomizeValidator(RuleSet = "Update"), FromBody]DrugpropRequest request)
{
var drugprop = _configService.DrugtypeUpdate(request);
return new ApiResponse(ResponseType.OK, drugprop);
}
/// <summary>
/// 删除药占比类型
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("dtypedelete")]
[HttpPost]
public ApiResponse DrugtypeDelete([CustomizeValidator(RuleSet = "Delete"), FromBody]DrugpropRequest request)
{
if (!_configService.DrugtypeDelete(request))
return new ApiResponse(ResponseType.Fail);
return new ApiResponse(ResponseType.OK);
}
#endregion
#region income
/// <summary>
/// 获取ICU有效收入配置列表
......@@ -156,7 +212,7 @@ public ApiResponse<List<IncomeResponse>> GetIncomeList([CustomizeValidator(RuleS
/// <returns></returns>
[Route("incomeinsert")]
[HttpPost]
public ApiResponse<IncomeResponse> Insert([FromBody]IncomeRequest request)
public ApiResponse<IncomeResponse> Insert([CustomizeValidator(RuleSet = "Insert"), FromBody]IncomeRequest request)
{
var income = _configService.IncomeInsert(request);
return new ApiResponse<IncomeResponse>(ResponseType.OK, income);
......@@ -211,7 +267,7 @@ public ApiResponse<List<WorkyearResponse>> GetWorkList([CustomizeValidator(RuleS
/// <returns></returns>
[Route("workinsert")]
[HttpPost]
public ApiResponse<WorkyearResponse> WorkyearInsert([FromBody]WorkyearRequest request)
public ApiResponse<WorkyearResponse> WorkyearInsert([CustomizeValidator(RuleSet = "Insert"), FromBody]WorkyearRequest request)
{
var workyear = _configService.WorkInsert(request);
return new ApiResponse<WorkyearResponse>(ResponseType.OK, workyear);
......@@ -244,5 +300,60 @@ public ApiResponse WorkyearDelete([CustomizeValidator(RuleSet = "Delete"), FromB
return new ApiResponse(ResponseType.OK);
}
#endregion
#region cofagain
/// <summary>
/// 获取二次绩效配置列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("cofagainlist")]
[HttpPost]
public ApiResponse GetAgainList([CustomizeValidator(RuleSet = "Select"), FromBody]CofAgainRequest request)
{
var list = _configService.GetAgainList(request.AllotID);
return new ApiResponse(ResponseType.OK, "ok", list);
}
/// <summary>
/// 新增二次绩效配置
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("cofagaininsert")]
[HttpPost]
public ApiResponse AgainInsert([CustomizeValidator(RuleSet = "Insert"), FromBody]CofAgainRequest request)
{
var workyear = _configService.AgainInsert(request);
return new ApiResponse(ResponseType.OK, workyear);
}
/// <summary>
/// 修改二次绩效配置
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("cofagainupdate")]
[HttpPost]
public ApiResponse AgainUpdate([CustomizeValidator(RuleSet = "Update"), FromBody]CofAgainRequest request)
{
var workyear = _configService.AgainUpdate(request);
return new ApiResponse(ResponseType.OK, workyear);
}
/// <summary>
/// 删除二次绩效配置
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("cofagaindelete")]
[HttpPost]
public ApiResponse AgainDelete([CustomizeValidator(RuleSet = "Delete"), FromBody]CofAgainRequest request)
{
if (!_configService.AgainDelete(request))
return new ApiResponse(ResponseType.Fail);
return new ApiResponse(ResponseType.OK);
}
#endregion
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AutoMapper;
using FluentValidation.AspNetCore;
using Microsoft.AspNetCore.Mvc;
using Performance.DtoModels;
using Performance.EntityModels;
using Performance.Services;
namespace Performance.Api.Controllers
{
[Route("api/[controller]")]
public class EmployeeController : Controller
{
private EmployeeService employeeService;
public EmployeeController(EmployeeService employeeService)
{
this.employeeService = employeeService;
}
/// <summary>
/// 获取人员列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("getlist")]
[HttpPost]
public ApiResponse GetEmployeeList([CustomizeValidator(RuleSet = "Select"), FromBody]EmployeeRequest request)
{
var employee = employeeService.GetEmployeeList(request.AllotID.Value);
return new ApiResponse(ResponseType.OK, "ok", employee);
}
/// <summary>
/// 新增人员
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("insert")]
[HttpPost]
public ApiResponse Insert([CustomizeValidator(RuleSet = "Insert"), FromBody]EmployeeRequest request)
{
var employee = employeeService.Insert(request);
return new ApiResponse(ResponseType.OK, "ok", employee);
}
/// <summary>
/// 修改人员
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("update")]
[HttpPost]
public ApiResponse Update([CustomizeValidator(RuleSet = "Update"), FromBody]EmployeeRequest request)
{
var employee = employeeService.Update(request);
return new ApiResponse(ResponseType.OK, "ok", employee);
}
/// <summary>
/// 删除人员
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("delete")]
[HttpPost]
public ApiResponse Delete([CustomizeValidator(RuleSet = "Delete"), FromBody]EmployeeRequest request)
{
if (!employeeService.Delete(request))
return new ApiResponse(ResponseType.Fail);
return new ApiResponse(ResponseType.OK);
}
}
}
\ No newline at end of file
using FluentValidation.AspNetCore;
using Microsoft.AspNetCore.Mvc;
using Performance.DtoModels;
using Performance.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Performance.Api.Controllers
{
[Route("api/[controller]")]
public class ReportController : Controller
{
private ReportService reportService;
private ClaimService claimService;
public ReportController(ReportService reportService, ClaimService claimService)
{
this.reportService = reportService;
this.claimService = claimService;
}
/// <summary>
/// 首页数据概况
/// </summary>
/// <returns></returns>
[Route("survey")]
public ApiResponse Survey([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request)
{
var result = reportService.Survey(request.HospitalId);
return new ApiResponse(ResponseType.OK, result);
}
/// <summary>
/// 科室医生人均绩效(含科主任)
/// </summary>
/// <returns></returns>
[Route("doctoravg")]
public ApiResponse DoctorAvg([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request)
{
var result = reportService.DoctorAvg(request.HospitalId, request.IsIndex);
return new ApiResponse(ResponseType.OK, result);
}
/// <summary>
/// 科室护士人均绩效(含护士长)
/// </summary>
/// <returns></returns>
[Route("nurseavg")]
public ApiResponse NurseAvg([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request)
{
var result = reportService.NurseAvg(request.HospitalId, request.IsIndex);
return new ApiResponse(ResponseType.OK, result);
}
/// <summary>
/// 门诊患者均次费用
/// </summary>
/// <returns></returns>
[Route("outfeeavg")]
public ApiResponse OutFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request)
{
var list = reportService.OutFeeAvg(request.HospitalId);
return new ApiResponse(ResponseType.OK, "", list);
}
/// <summary>
/// 住院患者均次费用
/// </summary>
/// <returns></returns>
[Route("inpatfeeavg")]
public ApiResponse InpatFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request)
{
var list = reportService.InpatFeeAvg(request.HospitalId);
return new ApiResponse(ResponseType.OK, "", list);
}
/// <summary>
/// 科室药占比
/// </summary>
/// <returns></returns>
[Route("medicine")]
public ApiResponse Medicine([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request)
{
var list = reportService.Medicine(request.HospitalId, request.IsIndex);
return new ApiResponse(ResponseType.OK, "", list);
}
/// <summary>
/// 科室有效收入占比
/// </summary>
/// <returns></returns>
[Route("income")]
public ApiResponse Income([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request)
{
var list = reportService.Income(request.HospitalId, request.IsIndex);
return new ApiResponse(ResponseType.OK, "", list);
}
/// <summary>
/// 月群体人均绩效
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("getperforavg")]
[HttpPost]
public ApiResponse AvgPerfor([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request)
{
var list = reportService.GetAvgPerfor(request.HospitalId);
return new ApiResponse(ResponseType.OK, "", list);
}
/// <summary>
/// 人群绩效比
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("avgratio")]
[HttpPost]
public ApiResponse AvgRatio([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request)
{
var list = reportService.AvgRatio(request.HospitalId);
return new ApiResponse(ResponseType.OK, "", list);
}
}
}
\ No newline at end of file
using FluentValidation.AspNetCore;
using Hangfire;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Internal;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.StaticFiles;
using Microsoft.Extensions.Options;
using Performance.DtoModels;
using Performance.DtoModels.AppSettings;
using Performance.EntityModels;
using Performance.Infrastructure;
using Performance.Services;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace Performance.Api.Controllers
{
[Route("api/[controller]")]
public class TemplateController : Controller
{
private readonly TemplateService templateService;
private readonly ExtractService extractService;
private HospitalService hospitalService;
private IHostingEnvironment evn;
private ClaimService claim;
private Application application;
private WebapiUrl url;
private readonly AllotService allotService;
public TemplateController(TemplateService templateService,
HospitalService hospitalService,
ExtractService extractService,
IHostingEnvironment evn,
ClaimService claim,
IOptions<Application> options,
IOptions<WebapiUrl> url,
AllotService allotService)
{
this.templateService = templateService;
this.extractService = extractService;
this.hospitalService = hospitalService;
this.evn = evn;
this.claim = claim;
this.application = options.Value;
this.url = url.Value;
this.allotService = allotService;
}
/// <summary>
/// 上传文件
/// </summary>
/// <param name="form"></param>
/// <returns></returns>
[Route("import")]
[HttpPost]
public ApiResponse Import([FromForm] IFormCollection form)
{
var user = claim.At(form.ToDictionary().GetValue("token", ""));
var hospitalid = form.ToDictionary().GetValue("hospitalid", 0);
if (hospitalid <= 0)
return new ApiResponse(ResponseType.Fail, "参数错误", "hospitalid无效");
var file = ((FormFileCollection)form.Files).FirstOrDefault();
if (file == null)
return new ApiResponse(ResponseType.Fail, "参数错误", "文件无效");
var hospital = hospitalService.GetHopital(hospitalid);
if (hospital == null)
return new ApiResponse(ResponseType.Fail, "hospitalid不存在");
var name = FileHelper.GetFileNameNoExtension(file.FileName) + DateTime.Now.ToString("yyyyMMddHHmmssfff");
var ext = FileHelper.GetExtension(file.FileName);
var dpath = Path.Combine(evn.ContentRootPath, "Files", $"{hospitalid}", "first");
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}上传失败");
var template = new per_first
{
HospitalId = hospitalid,
CreateUser = user.UserID,
CreateDate = DateTime.Now,
Path = path,
UploadDate = DateTime.Now,
Remark = "上传成功"
};
if (templateService.InsertFirst(template))
{
templateService.SendEmail(application.Receiver.ToList(), path, $"{hospital.HosName}首次上传模板", "上传成功");
}
}
return new ApiResponse(ResponseType.OK);
}
/// <summary>
/// 提取绩效数据
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("extractdata")]
[HttpPost]
public ApiResponse ExtractData([CustomizeValidator(RuleSet = "Template"), FromBody]AllotRequest request)
{
try
{
var allot = allotService.GetAllot(request.ID);
if (allot == null)
return new ApiResponse(ResponseType.Fail, "该绩效无效");
allot.IsExtracting = allot.IsExtracting ?? 0;
if (allot.IsExtracting == 1)
return new ApiResponse(ResponseType.Fail, "正在提取数据,请稍等。");
var hospital = hospitalService.GetHopital(request.HospitalId.Value);
if (hospital == null)
return new ApiResponse(ResponseType.Fail, "医院无效");
var user = claim.At(request.Token);
allot.IsExtracting = 1;
allotService.Update(allot);
string path = extractService.GetFilepath(hospital.ID, out int type);
if (!string.IsNullOrEmpty(path) && type != 0)
{
//发送请求,返回路径
string retJson = HttpHelper.HttpClient(url.ImportFirst + $"?type={type}&hospitalId={hospital.ID}&year={allot.Year}&month={allot.Month}", path);
var ret = JsonHelper.Deserialize<ApiResponse>(retJson);
if ((int)ret.State != 1)
return new ApiResponse(ResponseType.Fail, "首次模板地址无效!");
path = ret.Message;
}
string param = JsonHelper.Serialize(new
{
id = request.ID,
hospitalId = hospital.ID,
mail = user.Mail,
path = path
});
HttpHelper.HttpPostNoRequest(url.ExtractData, param, true);
//extractService.ExtractData(request.ID, user.Mail, hospital);
//BackgroundJob.Enqueue(() => extractService.ExtractData(request.ID, user.Mail, hospital));
return new ApiResponse(ResponseType.OK, "HIS绩效数据提取任务正在执行,稍后我们将以邮件的通知您!");
}
catch (Exception ex)
{
var allot = allotService.GetAllot(request.ID);
if (allot != null)
{
allot.IsExtracting = 3;
allotService.Update(allot);
}
throw ex;
}
}
/// <summary>
/// 从WebAPI下载文件
/// </summary>
/// <returns></returns>
[Route("down")]
public IActionResult DownFile([FromQuery]AllotRequest request)
{
var allot = allotService.GetAllot(request.ID);
if (allot == null || string.IsNullOrWhiteSpace(allot.ExtractPath) || !FileHelper.IsExistFile(allot.ExtractPath))
{
return new ObjectResult(new ApiResponse(ResponseType.Fail, "文件不存在"));
}
var memoryStream = new MemoryStream();
using (var stream = new FileStream(allot.ExtractPath, FileMode.Open))
{
stream.CopyToAsync(memoryStream).Wait();
}
memoryStream.Seek(0, SeekOrigin.Begin);
string fileExt = Path.GetExtension(allot.ExtractPath);
var provider = new FileExtensionContentTypeProvider();
var memi = provider.Mappings[fileExt];
return File(memoryStream, memi, Path.GetFileName(allot.ExtractPath));
}
/// <summary>
/// 保存提取文件
/// </summary>
/// <param name="form"></param>
/// <returns></returns>
[Route("savefile")]
[HttpPost]
public ApiResponse SaveFile([FromForm] IFormCollection form, int allotId, int hospitalId)
{
var file = ((FormFileCollection)form.Files).FirstOrDefault();
if (file == null)
return new ApiResponse(ResponseType.Error, "上传文件无效");
var dpath = Path.Combine(evn.ContentRootPath, "Files", $"{hospitalId}", "autoextract");
FileHelper.CreateDirectory(dpath);
var path = Path.Combine(dpath, FileHelper.GetFileName(file.FileName));
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.Error, "保存失败");
}
var allot = allotService.GetAllot(allotId);
allot.ExtractPath = path;
allot.IsExtracting = 2;
if (!string.IsNullOrEmpty(path) && allotService.Update(allot))
return new ApiResponse(ResponseType.OK, "上传成功!");
else
return new ApiResponse(ResponseType.Error);
}
}
}
\ No newline at end of file
......@@ -38,6 +38,8 @@ public ActionsFilter(ILoggerFactory factory, IMemoryCache cache, IHostingEnviron
//记录Request请求
var kv = GetRequestContent(request);
_logger.LogInformation($"请求内容 {request.Method}:{JsonHelper.Serialize(kv)}");
LogHelper.Information($"请求地址:{context.HttpContext.Request.Path};请求参数:{JsonHelper.Serialize(kv)}", "请求内容");
//接口禁用
var disable = ((ControllerActionDescriptor)context.ActionDescriptor).MethodInfo.GetCustomAttributes(typeof(DisableAttribute), true);
if (disable.Length > 0)
......@@ -47,16 +49,19 @@ public ActionsFilter(ILoggerFactory factory, IMemoryCache cache, IHostingEnviron
return;
}
//token验证
var arry = ((ControllerActionDescriptor)context.ActionDescriptor).MethodInfo.GetCustomAttributes(typeof(NoVerifyAttribute), true);
if (arry.Length == 0)
if (!_env.IsDevelopment())
{
var token = kv.GetValue("token", "");
var user = _cache.Get<UserIdentity>(token);
if (string.IsNullOrEmpty(token) || user == null || !user.Token.Equals(token))
var arry = ((ControllerActionDescriptor)context.ActionDescriptor).MethodInfo.GetCustomAttributes(typeof(NoVerifyAttribute), true);
if (arry.Length == 0)
{
var response = new ApiResponse(ResponseType.TokenError, "Token无效");
context.Result = new ObjectResult(response);
return;
var token = kv.GetValue("token", "");
var user = _cache.Get<UserIdentity>(token);
if (string.IsNullOrEmpty(token) || user == null || !user.Token.Equals(token))
{
var response = new ApiResponse(ResponseType.TokenError, "Token无效");
context.Result = new ObjectResult(response);
return;
}
}
}
//验证请求参数
......@@ -69,6 +74,7 @@ public ActionsFilter(ILoggerFactory factory, IMemoryCache cache, IHostingEnviron
context.Result = new ObjectResult(response);
var jsonData = JsonHelper.Serialize(context.Result);
_logger.LogInformation($"响应结果:{jsonData}");
LogHelper.Information($"请求地址:{context.HttpContext.Request.Path};响应结果:{jsonData}", "响应结果");
}
//记录response结果
else
......@@ -77,9 +83,14 @@ public ActionsFilter(ILoggerFactory factory, IMemoryCache cache, IHostingEnviron
if (executedContext.Exception != null)
throw executedContext.Exception;
var objectResult = (ObjectResult)executedContext.Result;
var jsonData = JsonHelper.Serialize(objectResult.Value);
_logger.LogInformation($"响应结果:{jsonData}");
if (executedContext.Result is ObjectResult)
{
LogHelper.Information(JsonHelper.Serialize(executedContext.Result), "响应结果");
var objectResult = (ObjectResult)executedContext.Result;
var jsonData = JsonHelper.Serialize(objectResult.Value);
_logger.LogInformation($"响应结果:{jsonData}");
LogHelper.Information($"请求地址:{context.HttpContext.Request.Path};响应结果:{jsonData}", "响应结果");
}
}
}
......
......@@ -2,6 +2,7 @@
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.Logging;
using Performance.DtoModels;
using Performance.Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
......@@ -23,18 +24,23 @@ public Task OnExceptionAsync(ExceptionContext context)
if (context.Exception is PerformanceException)
{
_logger.LogWarning($"接口错误警告:{context.Exception.ToString()}");
context.Result = new ObjectResult(new ApiResponse(ResponseType.Fail, context.Exception.Message));
var response = new ApiResponse(ResponseType.Fail, context.Exception.Message);
context.Result = new ObjectResult(response);
LogHelper.Warning(JsonHelper.Serialize(response), "接口错误警告");
}
else if (context.Exception is PerformanceTokenErrorException)
{
_logger.LogWarning($"Token Error:{context.Exception.ToString()}");
context.Result = new ObjectResult(new ApiResponse(ResponseType.TokenError, context.Exception.Message));
var response = new ApiResponse(ResponseType.TokenError, context.Exception.Message);
context.Result = new ObjectResult(response);
LogHelper.Warning(JsonHelper.Serialize(response), "Token Error");
}
else
{
_logger.LogError($"接口异常:{context.Exception.ToString()}");
var response = new ApiResponse(ResponseType.Error, "接口内部异常", context.Exception.Message);
context.Result = new ObjectResult(response);
LogHelper.Error(JsonHelper.Serialize(response), "接口内部异常");
}
return Task.CompletedTask;
}
......
......@@ -47,4 +47,6 @@
</Content>
</ItemGroup>
<ProjectExtensions><VisualStudio><UserProperties appsettings_1json__JSONSchema="" /></VisualStudio></ProjectExtensions>
</Project>
......@@ -47,7 +47,21 @@ public Startup(IConfiguration configuration)
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
LogHelper.Initialize(Configuration.GetSection("AppConnection:RedisConnectionString").Value, "MTEzMTAyMzEzNDYzMzY5MzE4NA");
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
#region appsetting注入
services
.Configure<AppConnection>(Configuration.GetSection("AppConnection"))
.Configure<Application>(Configuration.GetSection("Application"))
.Configure<HuyiSmsConfig>(Configuration.GetSection("HuyiSmsConfig"))
.Configure<EmailOptions>(Configuration.GetSection("EmailOptions"))
.Configure<WebapiUrl>(Configuration.GetSection("WebapiUrl"));
#endregion
var connection = services.BuildServiceProvider().GetService<IOptions<AppConnection>>();
#region json & fluentvalidation & filter
services
//筛选器配置
.AddMvc(option =>
......@@ -81,32 +95,37 @@ public void ConfigureServices(IServiceCollection services)
fv.RegisterValidatorsFromAssemblyContaining(type.GetType());
}
});
#endregion
//automapper 配置
#region automapper
Mapper.Initialize(cfg => cfg.AddProfile<AutoMapperConfigs>());
services.AddAutoMapper();
#endregion
//service注入 repoitory注入
#region service注入 repoitory注入
services
.AddPerformanceService()
.AddPerformanceRepoitory();
#endregion
//appsetting注入
services
.Configure<AppConnection>(Configuration.GetSection("AppConnection"))
.Configure<Application>(Configuration.GetSection("Application"))
.Configure<HuyiSmsConfig>(Configuration.GetSection("HuyiSmsConfig"))
.Configure<EmailOptions>(Configuration.GetSection("EmailOptions"));
#region swagger
//services.AddSwaggerGen(c =>
//{
// c.SwaggerDoc("v1", new Info { Title = "My API", Version = "v1" });
//});
//});
#endregion
#region custom util
//huyi短信发送注入
services.AddScoped<HuyiSmsNotify>();
//用户身份信息服务
services.AddScoped<ClaimService>();
#endregion
#region email
//阿里邮箱配置
var emailOption = services.BuildServiceProvider().GetService<IOptions<EmailOptions>>();
//邮件发送
......@@ -117,24 +136,27 @@ public void ConfigureServices(IServiceCollection services)
options.SmtpServer = emailOption.Value.SmtpServer;
});
//ef配置
var connection = services.BuildServiceProvider().GetService<IOptions<AppConnection>>();
#endregion
//redis
#region redis
var csredis = new CSRedis.CSRedisClient(connection.Value.RedisConnectionString);
RedisHelper.Initialization(csredis);
#endregion
//后台任务调度
#region hangfire
services.AddHangfire(config =>
{
config.UseFilter(new AutomaticRetryAttribute { Attempts = 0 });
config.UseStorage(new MySqlStorage(connection.Value.HangfireConnectionString));
});
#endregion
#region //ef配置
services.AddDbContext<PerformanceDbContext>(options =>
{
options.UseMySQL(connection.Value.PerformanceConnectionString);
});
#endregion
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
......@@ -160,13 +182,19 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
// c.RoutePrefix = string.Empty;
//});
#region hangfire
app.UseHangfireServer();
app.UseHangfireDashboard("/hangfire", new DashboardOptions { Authorization = new[] { new HangfireAuthorizationFilter() } });
#endregion
loggerFactory.CreateLogger<Startup>().LogDebug(env.EnvironmentName);
app.UseMvc();
}
}
#region hangfire 权限
public class HangfireAuthorizationFilter : Hangfire.Dashboard.IDashboardAuthorizationFilter
{
//这里需要配置权限规则
......@@ -175,4 +203,5 @@ public bool Authorize(Hangfire.Dashboard.DashboardContext context)
return true;
}
}
#endregion
}
......@@ -9,12 +9,23 @@
"AppConnection": {
"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;",
"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=1"
"RedisConnectionString": "116.62.245.55:6379,defaultDatabase=2"
},
"Application": {
//登录过期时间
"ExpirationMinutes": "5",
"ExpirationMinutes": "420",
//验证码过期
"SmsCodeMinutes": "5"
"SmsCodeMinutes": "5",
//护士长二次绩效管理员
"NurseRole": "3",
//科主任二次绩效管理员
"DirectorRole": "4",
"AbsolutePath": "E:\\wwwroot\\testjx.suvalue.com",
"HttpPath": "http://testjx.suvalue.com:81"
},
"WebapiUrl": {
"ImportFirst": "http://localhost:50997/api/extract/import",
"ExtractData": "http://localhost:50997/api/extract/index",
"ImportFile": ""
}
}
......@@ -8,7 +8,7 @@
"AppConnection": {
"PerformanceConnectionString": "server=116.62.245.55;database=db_performance;uid=suvalue;pwd=suvalue2017;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;",
"HangfireConnectionString": "server=116.62.245.55;database=db_hangfire;uid=suvalue;pwd=suvalue2017;port=3306;allow user variables=true;",
"redisconnectionstring": "116.62.245.55:6379,defaultdatabase=2"
"RedisConnectionString": "116.62.245.55:6379,defaultdatabase=2"
},
//互亿
"HuyiSmsConfig": {
......@@ -28,6 +28,19 @@
//验证码过期
"SmsCodeMinutes": "30",
//短信模板
"SmsTemplate": "溯直健康提醒您,您的验证码为:[code],当天有效!"
"SmsTemplate": "溯直健康提醒您,您的验证码为:[code],当天有效!",
//护士长二次绩效管理员
"NurseRole": "3",
//科主任二次绩效管理员
"DirectorRole": "4",
//邮件指定接收人
"Receiver": [ "chengxiang.li@suvalue.com", "486035085@qq.com" ],
"AbsolutePath": "E:\\wwwroot\\testjx.suvalue.com",
"HttpPath": "http://testjx.suvalue.com:81"
},
"WebapiUrl": {
"ImportFirst": "http://localhost:50997/api/extract/import",
"ExtractData": "http://localhost:50997/api/extract/index",
"ImportFile": "http://localhost:5001/api/template/savefile"
}
}
......@@ -18,5 +18,25 @@ public class Application
/// 短信模板
/// </summary>
public string SmsTemplate { get; set; }
/// <summary>
/// 护士长二次绩效管理员
/// </summary>
public int NurseRole { get; set; }
/// <summary>
/// 科主任二次绩效管理员
/// </summary>
public int DirectorRole { get; set; }
/// <summary>
/// 邮件指定接收人
/// </summary>
public string[] Receiver { get; set; }
/// <summary>
/// 绝对路径
/// </summary>
public string AbsolutePath { get; set; }
/// <summary>
/// 相对
/// </summary>
public string HttpPath { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels.AppSettings
{
public class WebapiUrl
{
/// <summary>
/// 上传首次模板文件
/// </summary>
public string ImportFirst { get; set; }
/// <summary>
/// 抽取数据地址
/// </summary>
public string ExtractData { get; set; }
/// <summary>
/// 上传文件地址
/// </summary>
public string ImportFile { get; set; }
}
}
......@@ -65,14 +65,22 @@ public AutoMapperConfigs()
CreateMap<PerHeader, im_header>()
.ForMember(dest => dest.IsMerge, opt => opt.MapFrom(src => src.IsMerge ? 1 : 2));
CreateMap<PerData, im_data>()
.ForMember(dest => dest.IsFactor, opt => opt.MapFrom(src => src.IsFactor ? 1 : 2))
.ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => src.UnitType == "医生组" ? 1 : (src.UnitType == "护理组" ? 2 : 0)));
CreateMap<im_header, PerHeader>()
.ForMember(dest => dest.IsMerge, opt => opt.MapFrom(src => src.IsMerge == 1 ? true : false));
CreateMap<im_data, PerData>()
.ForMember(dest => dest.IsFactor, opt => opt.MapFrom(src => src.IsFactor == 1 ? true : false))
.ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => src.UnitType == 1 ? "医生组" : (src.UnitType == 2 ? "护理组" : "")));
CreateMap<PerDataEmployee, im_employee>();
CreateMap<im_employee, PerDataEmployee>();
CreateMap<PerDataAccountBaisc, PerDataAccountDoctor>()
.ForMember(dest => dest.AccountingUnit, opt => opt.MapFrom(src => src.AccountingUnit))
.ForMember(dest => dest.AccountingUnit, opt => opt.MapFrom(src => src.DoctorAccountingUnit))
.ForMember(dest => dest.Department, opt => opt.MapFrom(src => src.Department))
.ForMember(dest => dest.Number, opt => opt.MapFrom(src => src.DoctorNumber))
.ForMember(dest => dest.BasicFactor, opt => opt.MapFrom(src => src.DoctorBasicFactor))
......@@ -84,7 +92,7 @@ public AutoMapperConfigs()
.ForMember(dest => dest.AdjustFactor, opt => opt.MapFrom(src => src.DoctorAdjustFactor));
CreateMap<PerDataAccountBaisc, PerDataAccountNurse>()
.ForMember(dest => dest.AccountingUnit, opt => opt.MapFrom(src => src.AccountingUnit))
.ForMember(dest => dest.AccountingUnit, opt => opt.MapFrom(src => src.NurseAccountingUnit))
.ForMember(dest => dest.Department, opt => opt.MapFrom(src => src.Department))
.ForMember(dest => dest.Number, opt => opt.MapFrom(src => src.NurseNumber))
.ForMember(dest => dest.BasicFactor, opt => opt.MapFrom(src => src.NurseBasicFactor))
......@@ -96,6 +104,7 @@ public AutoMapperConfigs()
.ForMember(dest => dest.AdjustFactor, opt => opt.MapFrom(src => src.NurseAdjustFactor));
CreateMap<PerDataAccountBaisc, im_accountbasic>();
CreateMap<im_accountbasic, PerDataAccountBaisc>();
CreateMap<PerDataSpecialUnit, im_specialunit>();
CreateMap<PerDataAccountDoctor, res_accountdoctor>();
CreateMap<res_accountdoctor, PerDataAccount>();
......@@ -109,6 +118,25 @@ public AutoMapperConfigs()
CreateMap<res_accountdoctor, DoctorResponse>();
CreateMap<res_accountnurse, NurseResponse>();
//二次绩效
CreateMap<ag_header, PerHeader>();
CreateMap<PerHeader, ag_header>();
CreateMap<PerAgainData, ag_data>();
CreateMap<ag_data, PerAgainData>();
CreateMap<PerAgainEmployee, ag_employee>();
CreateMap<ag_employee, PerAgainEmployee>();
CreateMap<PerAgainSituation, ag_againsituation>();
CreateMap<ag_againsituation, PerAgainSituation>();
CreateMap<per_againallot, AgainAllotResponse>();
CreateMap<res_compute, ComputeResponse>();
CreateMap<EmployeeRequest, im_employee>();
CreateMap<res_compute, ResComputeResponse>();
}
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class ChangeLog
{
public int uid { get; set; }
public string user { get; set; }
public DateTime date { get; set; }
public decimal? value { get; set; }
}
}
......@@ -27,6 +27,11 @@ public class ComputeEmployee
public string FitPeople { get; set; }
/// <summary>
/// 绩效基数核算参考对象取值比例(如临床科室护士*95%)
/// </summary>
public Nullable<decimal> FitPeopleRatio { get; set; }
/// <summary>
/// 核算基数
/// </summary>
public Nullable<decimal> BasicNorm { get; set; }
......@@ -61,15 +66,15 @@ public class ComputeEmployee
/// </summary>
public Nullable<decimal> Attendance { get; set; }
/// <summary>
/// 核算单元医生数
/// </summary>
public Nullable<int> PeopleNumber { get; set; }
///// <summary>
///// 核算单元医生数
///// </summary>
//public Nullable<int> PeopleNumber { get; set; }
/// <summary>
/// 工作量绩效
/// </summary>
public Nullable<decimal> Workload { get; set; }
///// <summary>
///// 工作量绩效
///// </summary>
//public Nullable<decimal> Workload { get; set; }
/// <summary>
/// 其他绩效
......@@ -86,9 +91,9 @@ public class ComputeEmployee
/// </summary>
public Nullable<decimal> Adjust { get; set; }
/// <summary>
/// 发放系数
/// </summary>
public Nullable<decimal> Grant { get; set; }
///// <summary>
///// 发放系数
///// </summary>
//public Nullable<decimal> Grant { get; set; }
}
}
......@@ -55,10 +55,10 @@ public class ComputeResult
/// </summary>
public Nullable<decimal> PostCoefficient { get; set; }
/// <summary>
/// 发放系数(来自人员名单)
/// </summary>
public Nullable<decimal> Grant { get; set; }
///// <summary>
///// 发放系数(来自人员名单)
///// </summary>
//public Nullable<decimal> Grant { get; set; }
/// <summary>
/// 应发管理绩效(需计算)
......@@ -91,7 +91,7 @@ public class ComputeResult
public Nullable<decimal> OtherPerfor { get; set; }
/// <summary>
/// 发绩效(需计算)
/// 发绩效(需计算)
/// </summary>
public Nullable<decimal> GiveFee { get; set; }
......@@ -110,5 +110,24 @@ public class ComputeResult
/// </summary>
public Nullable<decimal> WorkYear { get; set; }
/// <summary>
/// 实发绩效
/// </summary>
public decimal? RealGiveFee { get; set; }
/// <summary>
/// 职称
/// </summary>
public string JobTitle { get; set; }
/// <summary>
/// 调节系数
/// </summary>
public decimal? Adjust { get; set; }
///// <summary>
///// 工作量绩效
///// </summary>
//public decimal? Workload { get; set; }
}
}
......@@ -13,33 +13,47 @@ public enum ExcelVersion
public enum SheetType
{
/// <summary> 无法识别 </summary>
[Description("无法识别")]
Unidentifiable = 1,
/// <summary> 医院人员名单 </summary>
[Description("医院人员名单")]
Employee = 2,
/// <summary> 收入 </summary>
[Description("收入")]
Income = 3,
/// <summary> 其他收入 </summary>
[Description("其他收入")]
OtherIncome = 4,
/// <summary> 支出 </summary>
[Description("支出")]
Expend = 5,
/// <summary> 加班 </summary>
[Description("加班")]
Overtime = 6,
/// <summary> 工作量 </summary>
[Description("工作量")]
Workload = 7,
/// <summary> 特殊核算单元 </summary>
[Description("特殊核算单元")]
SpecialUnit = 8,
/// <summary> 临床科室医护绩效测算基础 </summary>
[Description("临床科室医护绩效测算基础")]
DeptAccounting = 9,
AccountBasic = 9,
/// <summary> 科室经济核算汇总表 </summary>
[Description("科室经济核算汇总表")]
ComputeEconomic = 10,
/// <summary> 医生工作量计算 </summary>
[Description("医生工作量计算")]
ComputeDoctorWorkload = 11,
/// <summary> 护士工作量计算 </summary>
[Description("护士工作量计算")]
ComputeNurseWorkload = 12,
/// <summary> 临床科室医生绩效测算表 </summary>
[Description("临床科室医生绩效测算表")]
ComputeDoctorAccount = 13,
/// <summary> 临床科室护士绩效测算表 </summary>
[Description("临床科室护士绩效测算表")]
ComputeNurseAccount = 14,
}
......@@ -47,33 +61,120 @@ public enum SheetType
/// <summary>
/// 绩效类型
/// </summary>
public enum PerformanceType
//public enum PerformanceType
//{
// /// <summary> </summary>
// [Description("")]
// Null = 0,
// /// <summary> 绩效基数临床科室主任(专门用来计算科主任绩效,由此产生=>>临床科室主任人均绩效)</summary>
// [Description("绩效基数临床科室主任")]
// StandardDirector = 1,
// /// <summary> 绩效基数临床科室副主任(专门用来计算科主任绩效,由此产生=>>临床科室副主任人均绩效) </summary>
// [Description("绩效基数临床科室副主任")]
// StandardDeputyDirector = 2,
// /// <summary> 绩效基数临床科室护士长(专门用来计算科主任绩效,由此产生=>>临床科室护士长人均绩效) </summary>
// [Description("绩效基数临床科室护士长")]
// StandardNurse = 3,
// /// <summary> 绩效基数医技科室主任(专门用来计算科主任绩效,由此产生=>>医技科室主任人均绩效) </summary>
// [Description("绩效基数医技科室主任")]
// StandardDirectorYJ = 14,
// /// <summary> 临床科室主任人均绩效 (绩效标准取 科室主任人均绩效) </summary>
// [Description("临床科室主任人均绩效")]
// ReferenceDirector = 4,
// /// <summary> 临床科室中层人均绩效 (绩效标准取 科室主任/护士长/科室副主任/医技主任 平均值) </summary>
// [Description("临床科室中层人均绩效")]
// ReferenceDirectorAvg = 5,
// /// <summary> 临床科室护士长人均绩效 (绩效标准取 护士长 平均值)</summary>
// [Description("临床科室护士长人均绩效")]
// ReferenceHeadNurse = 7,
// /// <summary> 临床科室副主任人均绩效 </summary>
// [Description("临床科室副主任人均绩效")]
// ReferenceDeputyDirector = 8,
// /// <summary> 临床科室医生人均绩效 </summary>
// [Description("临床科室医生人均绩效")]
// ReferenceDoctor = 9,
// /// <summary> 临床科室护士人均绩效 </summary>
// [Description("临床科室护士人均绩效")]
// ReferenceNurse = 10,
// /// <summary> 行政工勤人均绩效 </summary>
// [Description("行政工勤人均绩效")]
// LogisticsWorker = 11,
// /// <summary> 行政中层人均绩效 </summary>
// [Description("行政中层人均绩效")]
// MiddleManager = 12,
// /// <summary> 行政高层人均绩效 </summary>
// [Description("行政高层人均绩效")]
// TopManager = 13,
//}
/// <summary>
/// 核算单元类型
/// </summary>
public enum AccountUnitType
{
/// <summary> </summary>
[Description("")]
Null = 0,
/// <summary> 科室主任人均绩效 </summary>
[Description("科室主任人均绩效")]
Director = 1,
/// <summary> 科室副主任人均绩效 </summary>
[Description("科室副主任人均绩效")]
DeputyDirector = 2,
/// <summary> 科室护士长人均绩效 </summary>
[Description("科室护士长人均绩效")]
Nurse = 3,
Null = 1,
/// <summary> 临床科室 </summary>
[Description("临床科室")]
临床科室 = 2,
/// <summary> 临床科室 </summary>
[Description("医技科室")]
医技科室 = 3,
/// <summary> 行政高层 </summary>
[Description("行政高层")]
行政高层 = 4,
/// <summary> 临床科室 </summary>
[Description("行政中层")]
行政中层 = 5,
/// <summary> 临床科室 </summary>
[Description("行政工勤")]
行政工勤 = 6,
}
/// <summary> 临床科室主任人均绩效 (绩效标准取 科室主任人均绩效) </summary>
public enum PerforType
{
[Description("临床科室主任人均绩效")]
ReferenceDirector = 4,
/// <summary> 临床科室中层人均绩效 (绩效标准取 科室主任/护士长/科室副主任/医技主任 平均值) </summary>
[Description("临床科室中层人均绩效")]
ReferenceDirectorAvg = 5,
/// <summary> 临床科室护士人均绩效的95% (绩效标准取 护理组临床科室单元核算表 平均值) </summary>
[Description("临床科室护士人均绩效的95%")]
ReferenceNurseAvg95 = 6,
/// <summary> 临床科室护士长人均绩效 (绩效标准取 护士长 平均值)</summary>
[Description("临床科室护士长人均绩效")]
ReferenceHeadNurse = 7,
临床主任,
[Description("临床科室副主任人均绩效")]
临床副主任,
[Description("医技科室主任人均绩效")]
医技主任,
[Description("医技科室副主任人均绩效")]
医技副主任,
[Description("护士长人均绩效")]
护士长,
[Description("护士人均绩效")]
护士,
[Description("临床主任护士长平均")]
临床主任护士长平均,
[Description("临床医生人均绩效")]
临床医生,
[Description("医技医生人均绩效")]
医技医生,
[Description("行政高层人均绩效")]
行政高层,
[Description("行政中层人均绩效")]
行政中层,
[Description("行政工勤人均绩效")]
行政工勤,
[Description("医生护士平均绩效")]
医生护士平均,
}
/// <summary>
/// 当前枚举为效率绩效、规模绩效中系数中文名称
/// 对应表cof_director中JobTitle 全文字匹配
/// </summary>
public enum DirectorType
{
临床科室主任,
临床科室副主任,
医技科室主任,
医技科室副主任,
临床科室护士长,
}
}
......@@ -84,6 +84,6 @@ public class PerDataAccount : IPerData
/// <summary>
/// 实发绩效
/// </summary>
public Nullable<decimal> GiveFee { get; set; }
public Nullable<decimal> RealGiveFee { get; set; }
}
}
......@@ -7,9 +7,14 @@ namespace Performance.DtoModels
public class PerDataAccountBaisc : IPerData
{
/// <summary>
/// 核算单元
/// 核算单元(医生组)
/// </summary>
public string AccountingUnit { get; set; }
public string DoctorAccountingUnit { get; set; }
/// <summary>
/// 核算单元(护理组)
/// </summary>
public string NurseAccountingUnit { get; set; }
/// <summary>
/// 科室名称
......@@ -17,6 +22,11 @@ public class PerDataAccountBaisc : IPerData
public string Department { get; set; }
/// <summary>
/// 科主任数量
/// </summary>
public decimal DoctorDirectorNumber { get; set; }
/// <summary>
/// 核算单元医生数量
/// </summary>
public decimal DoctorNumber { get; set; }
......@@ -56,6 +66,11 @@ public class PerDataAccountBaisc : IPerData
public decimal DoctorAdjustFactor { get; set; }
/// <summary>
/// 护士长人数
/// </summary>
public decimal NurseHeadNumber { get; set; }
/// <summary>
/// 核算单元护士数量
/// </summary>
public decimal NurseNumber { get; set; }
......@@ -98,5 +113,34 @@ public class PerDataAccountBaisc : IPerData
/// </summary>
public int RowNumber { get; set; }
/// <summary>
/// 规模绩效系数
/// </summary>
public Nullable<decimal> DoctorScale { get; set; }
/// <summary>
/// 效率绩效系数
/// </summary>
public Nullable<decimal> DoctorEffic { get; set; }
/// <summary>
/// 发放系数
/// </summary>
public Nullable<decimal> DoctorGrant { get; set; }
/// <summary>
/// 规模绩效系数
/// </summary>
public Nullable<decimal> NurseScale { get; set; }
/// <summary>
/// 效率绩效系数
/// </summary>
public Nullable<decimal> NurseEffic { get; set; }
/// <summary>
/// 发放系数
/// </summary>
public Nullable<decimal> NurseGrant { get; set; }
}
}
......@@ -60,36 +60,27 @@ public class PerDataAccountDoctor : IPerData
/// </summary>
public decimal Income { get; set; }
/// <summary>
/// 工作量绩效
/// </summary>
public decimal WorkloadFee { get; set; }
private decimal perforFee;
private decimal perforTotal;
private decimal avg;
private decimal giveFee;
/// <summary>
/// 绩效合计
/// </summary>
public decimal PerforTotal { get => PerforFee + WorkloadFee + OtherPerfor1; set => perforTotal = value; }
public decimal PerforTotal { get; set; }
/// <summary>
/// 业绩绩效
/// </summary>
public decimal PerforFee { get => Income * (BasicFactor + (BasicFactor * SlopeFactor)); set => perforFee = value; }
public decimal PerforFee { get; set; }
/// <summary>
/// 实发绩效
/// </summary>
public decimal GiveFee { get => (PerforTotal * ScoringAverage + Extra + OtherPerfor2) * AdjustFactor; set => giveFee = value; }
public decimal RealGiveFee { get; set; }
/// <summary>
/// 人均绩效
/// </summary>
public decimal Avg { get => Number == 0 ? 0 : PerforTotal / Number; set => avg = value; }
public decimal Avg { get; set; }
}
}
......@@ -65,30 +65,23 @@ public class PerDataAccountNurse : IPerData
/// </summary>
public decimal WorkloadFee { get; set; }
private decimal perforFee;
private decimal perforTotal;
private decimal avg;
private decimal giveFee;
/// <summary>
/// 绩效合计
/// </summary>
public decimal PerforTotal { get => PerforFee + WorkloadFee + OtherPerfor1; set => perforTotal = value; }
public decimal PerforTotal { get; set; }
/// <summary>
/// 业绩绩效
/// </summary>
public decimal PerforFee { get => Income * (BasicFactor + (BasicFactor * SlopeFactor)); set => perforFee = value; }
public decimal PerforFee { get; set; }
/// <summary>
/// 实发绩效
/// </summary>
public decimal GiveFee { get => (PerforTotal * ScoringAverage + Extra + OtherPerfor2) * AdjustFactor; set => giveFee = value; }
public decimal RealGiveFee { get; set; }
/// <summary>
/// 人均绩效
/// </summary>
public decimal Avg { get => Number == 0 ? 0 : PerforTotal / Number; set => avg = value; }
public decimal Avg { get; set; }
}
}
......@@ -22,6 +22,11 @@ public class PerDataEmployee : IPerData
public string FitPeople { get; set; }
/// <summary>
/// 绩效基数核算参考对象取值比例(如临床科室护士*95%)
/// </summary>
public Nullable<decimal> FitPeopleRatio { get; set; }
/// <summary>
/// 科室类别(例如 医技科室 临床科室 其他科室)
/// </summary>
public string AccountType { get; set; }
......@@ -56,15 +61,10 @@ public class PerDataEmployee : IPerData
/// </summary>
public Nullable<decimal> Attendance { get; set; }
/// <summary>
/// 核算单元医生数
/// </summary>
public Nullable<int> PeopleNumber { get; set; }
/// <summary>
/// 工作量绩效
/// </summary>
public Nullable<decimal> Workload { get; set; }
///// <summary>
///// 工作量绩效
///// </summary>
//public Nullable<decimal> Workload { get; set; }
/// <summary>
/// 其他绩效
......@@ -81,10 +81,10 @@ public class PerDataEmployee : IPerData
/// </summary>
public Nullable<decimal> Adjust { get; set; }
/// <summary>
/// 发放系数
/// </summary>
public Nullable<decimal> Grant { get; set; }
///// <summary>
///// 发放系数
///// </summary>
//public Nullable<decimal> Grant { get; set; }
/// <summary>
/// 行号
......
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class PerAgainData
{
/// <summary>
/// 行号
/// </summary>
public Nullable<int> RowNumber { get; set; }
/// <summary>
/// 列头类型名称
/// </summary>
public string TypeName { get; set; }
/// <summary>
/// 单元格value
/// </summary>
public Nullable<decimal> CellValue { get; set; }
/// <summary>
/// 1 汇总 2原始数据
/// </summary>
public Nullable<int> IsTotal { get; set; }
/// <summary>
/// 是否带入系数计算 1 带入 2 不带入
/// </summary>
public Nullable<int> IsFactor { get; set; }
/// <summary>
/// 系数值
/// </summary>
public Nullable<decimal> FactorValue { get; set; }
/// <summary>
/// 单元格注释
/// </summary>
public string Annotation { get; set; }
/// <summary>
/// 单元格备注
/// </summary>
public string Remark { get; set; }
/// <summary>
///
/// </summary>
public string SignID { get; set; }
public PerAgainData() { }
public PerAgainData(int rowNumber, string typeName, decimal? cellValue, int isTotal, int isFactor,
decimal? factorValue, string annotation, string remark, string signID)
{
this.RowNumber = rowNumber;
this.TypeName = typeName;
this.CellValue = cellValue;
this.IsTotal = isTotal;
this.IsFactor = isFactor;
this.FactorValue = factorValue;
this.Annotation = annotation;
this.Remark = remark;
this.SignID = signID;
}
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class PerAgainEmployee
{
/// <summary>
/// 姓名
/// </summary>
public string Name { get; set; }
/// <summary>
/// 职务
/// </summary>
public string JobTitle { get; set; }
/// <summary>
/// 职称系数
/// </summary>
public Nullable<decimal> JobFactor { get; set; }
/// <summary>
/// 出勤
/// </summary>
public Nullable<decimal> Attendance { get; set; }
/// <summary>
/// 年资
/// </summary>
public Nullable<decimal> YearFactor { get; set; }
/// <summary>
/// 重点奖励
/// </summary>
public Nullable<decimal> Award { get; set; }
/// <summary>
/// 管理津贴
/// </summary>
public Nullable<decimal> Allowance { get; set; }
/// <summary>
/// 单独核算人员绩效
/// </summary>
public Nullable<decimal> AlonePerfor { get; set; }
/// <summary>
/// 夜班费
/// </summary>
public Nullable<decimal> NightShift { get; set; }
/// <summary>
/// 职称出勤系数(需计算)
/// </summary>
public Nullable<decimal> JobAttendanceFactor { get; set; }
/// <summary>
/// 年资出勤系数(需计算)
/// </summary>
public Nullable<decimal> YearAttendanceFactor { get; set; }
/// <summary>
/// 职称出勤绩效(需计算)
/// </summary>
public Nullable<decimal> JobAttendancePerfor { get; set; }
/// <summary>
/// 应发绩效(需计算)
/// </summary>
public Nullable<decimal> GiveFee { get; set; }
/// <summary>
/// 实发绩效(需计算)
/// </summary>
public Nullable<decimal> RealGiveFee { get; set; }
public int RowNumber { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class PerAgainExcel
{
public PerHeader Header { get; set; }
public List<PerAgainData> AgainData { get; set; }
public List<PerAgainEmployee> AgainEmployee { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class PerAgainSituation
{
/// <summary>
/// 夜班费
/// </summary>
public Nullable<decimal> NightShift { get; set; }
/// <summary>
/// 科室总绩效
/// </summary>
public Nullable<decimal> DepartmentTotal { get; set; }
/// <summary>
/// 护士长或科主任基础绩效
/// </summary>
public Nullable<decimal> BossPerfor { get; set; }
/// <summary>
/// 重点奖励
/// </summary>
public Nullable<decimal> Award { get; set; }
/// <summary>
/// 管理津贴
/// </summary>
public Nullable<decimal> Allowance { get; set; }
/// <summary>
/// 业绩分配绩效
/// </summary>
public Nullable<decimal> AllotPerfor { get; set; }
/// <summary>
/// 职称绩效
/// </summary>
public Nullable<decimal> JobPerfor { get; set; }
/// <summary>
/// 工作量绩效
/// </summary>
public Nullable<decimal> WorkloadPerfor { get; set; }
/// <summary>
/// 单独核算人员绩效
/// </summary>
public Nullable<decimal> AlonePerfor { get; set; }
/// <summary>
/// 出勤
/// </summary>
public Nullable<decimal> Attendance { get; set; }
/// <summary>
/// 科室系数人均
/// </summary>
public Nullable<decimal> DepartmentFactorAvg { get; set; }
}
}
......@@ -15,6 +15,7 @@
<ItemGroup>
<ProjectReference Include="..\Performance.EntityModels\Performance.EntityModels.csproj" />
<ProjectReference Include="..\Performance.Infrastructure\Performance.Infrastructure.csproj" />
</ItemGroup>
</Project>
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
/// <summary>
/// 二次分配请求
/// </summary>
public class AgainAllotRequest : ApiRequest
{
/// <summary>
/// 二次分配ID
/// </summary>
public int AgainAllotID { get; set; }
}
public class AgainAllotRequestValidator : AbstractValidator<AgainAllotRequest>
{
public AgainAllotRequestValidator()
{
RuleSet("Generate", () =>
{
RuleFor(x => x.AgainAllotID).NotNull().GreaterThan(0);
});
}
}
}
......@@ -23,6 +23,16 @@ public class AllotRequest : ApiRequest
/// 绩效发放月
/// </summary>
public int Month { get; set; }
/// <summary>
/// 邮箱
/// </summary>
public string Mail { get; set; }
/// <summary>
/// 路径
/// </summary>
public string Path { get; set; }
}
public class AllotRequestValidator : AbstractValidator<AllotRequest>
......@@ -48,6 +58,12 @@ public AllotRequestValidator()
{
RuleFor(x => x.ID).NotNull().GreaterThan(0);
});
RuleSet("Template", () =>
{
RuleFor(x => x.ID).NotNull().GreaterThan(0);
RuleFor(x => x.HospitalId).NotNull().GreaterThan(0);
});
}
}
}
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class AssessColumnRequest : ApiRequest
{
public int ColumnID { get; set; }
public int AssessID { get; set; }
public int ParentID { get; set; }
public string ColumnName { get; set; }
public int Sort { get; set; }
}
public class AssessColumnRequestValidator : AbstractValidator<AssessColumnRequest>
{
public AssessColumnRequestValidator()
{
RuleSet("Del", () =>
{
RuleFor(t => t.ColumnID).NotNull().GreaterThan(0);
});
RuleSet("Update", () =>
{
RuleFor(t => t.ColumnID).NotNull().GreaterThan(0);
RuleFor(t => t.ColumnName).NotNull().NotEmpty();
});
RuleSet("Add", () =>
{
RuleFor(t => t.AssessID).NotNull().GreaterThan(0);
RuleFor(t => t.ParentID).NotNull().GreaterThan(-1);
RuleFor(t => t.ColumnName).NotNull().NotEmpty();
});
RuleSet("List", () =>
{
RuleFor(t => t.AssessID).NotNull().GreaterThan(0);
});
}
}
}
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class AssessDataRequest : ApiRequest
{
public int AssessID { get; set; }
public List<AssessRow> AssessRow { get; set; }
}
public class AssessRow
{
public int DataID { get; set; }
public string DataValue { get; set; }
}
public class AssessDataRequestValidator : AbstractValidator<AssessDataRequest>
{
public AssessDataRequestValidator()
{
RuleSet("List", () =>
{
RuleFor(t => t.AssessID).NotNull().GreaterThan(0);
});
RuleSet("Edit", () =>
{
RuleFor(t => t.AssessRow).NotNull().Must(p => p != null && p.Count > 0);
});
}
}
}
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class AssessRequest : ApiRequest
{
public int AssessID { get; set; }
public int AllotID { get; set; }
public string AssessName { get; set; }
}
public class AssessRequestValidator : AbstractValidator<AssessRequest>
{
public AssessRequestValidator()
{
RuleSet("Del", () =>
{
RuleFor(t => t.AssessID).NotNull().GreaterThan(0);
});
RuleSet("Update", () =>
{
RuleFor(t => t.AssessID).NotNull().GreaterThan(0);
RuleFor(t => t.AssessName).NotNull().NotEmpty();
});
RuleSet("Add", () =>
{
RuleFor(t => t.AllotID).NotNull().NotEmpty();
RuleFor(t => t.AssessName).NotNull().NotEmpty();
});
RuleSet("List", () =>
{
RuleFor(t => t.AllotID).NotNull().NotEmpty();
});
RuleSet("Use", () =>
{
RuleFor(t => t.AllotID).NotNull().NotEmpty();
RuleFor(t => t.AssessID).NotNull().NotEmpty();
});
}
}
}
using System;
using FluentValidation;
namespace Performance.DtoModels
{
public class CofAgainRequest: ApiRequest
{
public int ID { get; set; }
/// <summary>
///
/// </summary>
public int AllotID { get; set; }
/// <summary>
/// 1 职称绩效 2 工作量绩效 3 满勤天数
/// </summary>
public int Type { get; set; }
/// <summary>
/// 参数名称
/// </summary>
public string TypeName { get; set; }
/// <summary>
/// 参数值
/// </summary>
public Nullable<decimal> Value { get; set; }
public class CofAgainRequestValidator : AbstractValidator<CofAgainRequest>
{
public CofAgainRequestValidator()
{
RuleSet("Select", () =>
{
RuleFor(x => x.AllotID).NotNull().NotEmpty().GreaterThan(0);
});
RuleSet("Insert", () =>
{
RuleFor(x => x.AllotID).NotNull().GreaterThan(0);
});
RuleSet("Update", () =>
{
RuleFor(x => x.ID).NotNull().GreaterThan(0);
});
RuleSet("Delete", () =>
{
RuleFor(x => x.ID).NotNull().GreaterThan(0);
});
}
}
}
}
......@@ -8,6 +8,16 @@ namespace Performance.DtoModels
public class ComputerRequest : ApiRequest
{
/// <summary>
/// 绩效数据id
/// </summary>
public int ComputeId { get; set; }
/// <summary>
/// 实发绩效
/// </summary>
public decimal? RealGiveFee { get; set; }
/// <summary>
/// 绩效id
/// </summary>
public int AllotId { get; set; }
......@@ -27,6 +37,12 @@ public ComputerRequestValidator()
{
RuleFor(x => x.Type).NotNull().NotEmpty();
});
RuleSet("UpdateReal", () =>
{
RuleFor(x => x.ComputeId).NotNull().GreaterThan(0);
RuleFor(x => x.RealGiveFee).NotNull();
});
}
}
}
......@@ -11,6 +11,10 @@ public class DirectorRequest : ApiRequest
public int AllotID { get; set; }
/// <summary>
/// 科室
/// </summary>
public string Department { get; set; }
/// <summary>
/// 绩效类型
/// </summary>
public string TypeName { get; set; }
......@@ -33,6 +37,11 @@ public DirectorRequestValidator()
RuleFor(x => x.AllotID).NotNull().NotEmpty().GreaterThan(0);
});
RuleSet("Insert", () =>
{
RuleFor(x => x.AllotID).NotNull().GreaterThan(0);
});
RuleSet("Update", () =>
{
RuleFor(x => x.ID).NotNull().GreaterThan(0);
......
......@@ -22,6 +22,10 @@ public class DrugpropRequest : ApiRequest
/// 药占比对应系数
/// </summary>
public decimal Value { get; set; }
/// <summary>
/// 费用名称
/// </summary>
public string Charge { get; set; }
public class DrugpropRequestValidator : AbstractValidator<DrugpropRequest>
......@@ -33,6 +37,11 @@ public DrugpropRequestValidator()
RuleFor(x => x.AllotID).NotNull().NotEmpty().GreaterThan(0);
});
RuleSet("Insert", () =>
{
RuleFor(x => x.AllotID).NotNull().GreaterThan(0);
});
RuleSet("Update", () =>
{
RuleFor(x => x.ID).NotNull().GreaterThan(0);
......
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class EmployeeRequest
{
/// <summary>
///
/// </summary>
public int ID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
/// sheet页id
/// </summary>
public Nullable<int> SheetID { get; set; }
/// <summary>
/// 科室类别(例如 医技科室 临床科室 其他科室)
/// </summary>
public string AccountType { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 科室名称
/// </summary>
public string Department { get; set; }
/// <summary>
/// 绩效基数核算参考对象
/// </summary>
public string FitPeople { 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 string WorkTime { get; set; }
/// <summary>
/// 考核得分率
/// </summary>
public Nullable<decimal> ScoreAverageRate { get; set; }
/// <summary>
/// 出勤率
/// </summary>
public Nullable<decimal> Attendance { get; set; }
/// <summary>
/// 核算单元医生数
/// </summary>
public Nullable<int> PeopleNumber { get; set; }
/// <summary>
/// 工作量绩效
/// </summary>
public Nullable<decimal> Workload { get; set; }
/// <summary>
/// 其他绩效
/// </summary>
public Nullable<decimal> OtherPerfor { get; set; }
/// <summary>
/// 医院奖罚
/// </summary>
public Nullable<decimal> Punishment { get; set; }
/// <summary>
/// 调节系数
/// </summary>
public Nullable<decimal> Adjust { get; set; }
/// <summary>
/// 发放系数
/// </summary>
public Nullable<decimal> Grant { get; set; }
public class EmployeeRequestValidator : AbstractValidator<EmployeeRequest>
{
public EmployeeRequestValidator()
{
Action action = () =>
{
RuleFor(x => x.AllotID).NotNull().NotEmpty();
RuleFor(x => x.SheetID).NotNull().NotEmpty();
RuleFor(x => x.AccountingUnit).NotNull().NotEmpty();
RuleFor(x => x.DoctorName).NotNull().NotEmpty();
};
RuleSet("Select", () =>
{
RuleFor(x => x.AllotID).NotNull().GreaterThan(0);
});
RuleSet("Insert", () =>
{
RuleFor(x => x.AllotID).NotNull().NotEmpty();
RuleFor(x => x.AccountingUnit).NotNull().NotEmpty();
RuleFor(x => x.DoctorName).NotNull().NotEmpty();
});
RuleSet("Update", () =>
{
action();
RuleFor(x => x.ID).NotNull().GreaterThan(0);
});
RuleSet("Delete", () =>
{
RuleFor(x => x.ID).NotNull().GreaterThan(0);
});
}
}
}
}
......@@ -32,9 +32,25 @@ public class HospitalRequest : ApiRequest
/// </summary>
public string HosType { get; set; }
/// <summary>
///
/// 医院状态 1 启用 2 禁用
/// </summary>
public Nullable<int> States { get; set; }
/// <summary>
/// 是否开启年资系数 1 启用 2 禁用
/// </summary>
public Nullable<int> IsOpenWorkYear { get; set; }
/// <summary>
/// 是否开启药占比系数 1 启用 2 禁用
/// </summary>
public Nullable<int> IsOpenDrugprop { get; set; }
/// <summary>
/// 是否开启ICU有效收入系数 1 启用 2 禁用
/// </summary>
public Nullable<int> IsOpenIncome { get; set; }
/// <summary>
/// 是否开启规模/效率绩效 1 启用 2 禁用
/// </summary>
public Nullable<int> IsOpenDirector { get; set; }
}
public class HospitalRequestValidator : AbstractValidator<HospitalRequest>
......@@ -47,6 +63,7 @@ public HospitalRequestValidator()
RuleFor(x => x.AreaCode).NotNull().NotEmpty().Length(1, 50);
RuleFor(x => x.HosLevel).NotNull().NotEmpty().Length(1, 50);
RuleFor(x => x.HosType).NotNull().NotEmpty().Length(1, 50);
RuleFor(x => x.IsOpenWorkYear).NotNull().InclusiveBetween(1, 2);
};
RuleSet("Insert", () =>
......
......@@ -33,6 +33,11 @@ public IncomeRequestValidator()
RuleFor(x => x.AllotID).NotNull().NotEmpty().GreaterThan(0);
});
RuleSet("Insert", () =>
{
RuleFor(x => x.AllotID).NotNull().GreaterThan(0);
});
RuleSet("Update", () =>
{
RuleFor(x => x.ID).NotNull().GreaterThan(0);
......
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class ReportRequest : ApiRequest
{
public int HospitalId { get; set; }
public int IsIndex { get; set; }
}
public class ReportRequestValidator : AbstractValidator<ReportRequest>
{
public ReportRequestValidator()
{
RuleSet("Query", () =>
{
RuleFor(x => x.HospitalId).NotNull().GreaterThan(0);
});
}
}
}
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Performance.DtoModels
{
public class SetAssessRequest
{
public int AllotID { get; set; }
public int AssessID { get; set; }
public List<string> Department { get; set; }
}
public class SetAssessRequestValidator : AbstractValidator<SetAssessRequest>
{
public SetAssessRequestValidator()
{
RuleFor(t => t.AllotID).NotNull().GreaterThan(0);
RuleFor(t => t.AssessID).NotNull().GreaterThan(0);
RuleFor(t => t.Department).NotNull().Must(p =>
{
return p != null && p.Count > 0 && !p.Any(t => t.Trim() == "");
});
}
}
}
......@@ -8,17 +8,16 @@ namespace Performance.DtoModels
/// <summary>
/// 登录请求
/// </summary>
public class SetHospitalRequest : ApiRequest
public class SetDepartmentRequest : ApiRequest
{
public int UserID { get; set; }
public int[] HosIDArray { get; set; }
public int HospitalID { get; set; }
}
public class SetHospitalRequestValidator : AbstractValidator<SetHospitalRequest>
public class SetDepartmentRequestValidator : AbstractValidator<SetDepartmentRequest>
{
public SetHospitalRequestValidator()
public SetDepartmentRequestValidator()
{
RuleFor(x => x.UserID).GreaterThan(0);
RuleFor(x => x.HospitalID).GreaterThan(0);
}
}
}
......@@ -37,6 +37,21 @@ public class UserRequest : ApiRequest
/// 用户状态 1启用 2禁用
/// </summary>
public Nullable<int> States { get; set; }
/// <summary>
/// 角色
/// </summary>
public int Role { get; set; }
/// <summary>
/// 用户医院ID
/// </summary>
public int[] HosIDArray { get; set; }
/// <summary>
/// 用户科室
/// </summary>
public string Department { get; set; }
}
public class UserRequestValidator : AbstractValidator<UserRequest>
......@@ -54,7 +69,9 @@ public UserRequestValidator()
RuleSet("Insert", () =>
{
action();
RuleFor(x => x.Role).NotNull().NotEmpty().GreaterThan(0);
RuleFor(x => x.Password).NotNull().NotEmpty().Length(4, 20);
RuleFor(x => x.HosIDArray).NotNull().NotEmpty().Must(f => f.Length > 0);
});
RuleSet("Update", () =>
......@@ -63,6 +80,13 @@ public UserRequestValidator()
RuleFor(x => x.ID).NotNull().NotEmpty().GreaterThan(0);
RuleFor(x => x.States).InclusiveBetween(1, 2);
RuleFor(x => x.Password).Length(4, 20);
RuleFor(x => x.Role).NotNull().NotEmpty().GreaterThan(0);
RuleFor(x => x.HosIDArray).NotNull().NotEmpty().Must(f => f.Length > 0);
});
RuleSet("Delete", () =>
{
RuleFor(x => x.ID).NotNull().NotEmpty().GreaterThan(0);
});
RuleSet("Self", () =>
......
......@@ -34,6 +34,11 @@ public WorkyearRequestValidator()
RuleFor(x => x.AllotID).NotNull().NotEmpty().GreaterThan(0);
});
RuleSet("Insert", () =>
{
RuleFor(x => x.AllotID).NotNull().GreaterThan(0);
});
RuleSet("Update", () =>
{
RuleFor(x => x.ID).NotNull().GreaterThan(0);
......
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class AgainAllotResponse
{
/// <summary>
///
/// </summary>
public int ID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
/// 绩效发放年
/// </summary>
public int Year { get; set; }
/// <summary>
/// 绩效发放月
/// </summary>
public int Month { get; set; }
/// <summary>
/// 科室名称
/// </summary>
public string Department { get; set; }
/// <summary>
/// 上传时间
/// </summary>
public Nullable<DateTime> UploadDateTime { get; set; }
/// <summary>
/// 文件路径
/// </summary>
public string Path { get; set; }
/// <summary>
/// 二次分配状态 0 数据未上传 1 数据已上传 2 正在生成绩效 3 绩效生成成功 4 绩效生成失败 5 归档
/// </summary>
public Nullable<int> States { get; set; }
}
}
......@@ -39,8 +39,23 @@ public class AllotResponse
public Nullable<DateTime> UploadDate { get; set; }
/// <summary>
///
/// 0 数据未上传 1 数据已上传 2 正在校验数据 3 数据验证通过 4 数据错误
/// 5 正在生成绩效 6 绩效结果解析成功 7 绩效解析失败 8 归档
/// </summary>
public int States { get; set; }
/// <summary>
/// 科室
/// </summary>
public string Department { get; set; }
/// <summary>
/// 提取绩效数据文件生成路径
/// </summary>
public string ExtractPath { get; set; }
/// <summary>
/// 是否可以下载
/// </summary>
public bool IsDown { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class AssessDataResponse
{
public int ID { get; set; }
/// <summary>
/// 考核类别ID
/// </summary>
public Nullable<int> AssessID { get; set; }
/// <summary>
/// 科室
/// </summary>
public string Department { get; set; }
public string RowData { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class ComputeResponse
{
/// <summary>
/// 来源
/// </summary>
public string Source { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 人员名称
/// </summary>
public string EmployeeName { get; set; }
/// <summary>
/// 职位
/// </summary>
public string JobTitle { get; set; }
/// <summary>
/// 实发绩效
/// </summary>
public Nullable<decimal> RealGiveFee { get; set; }
}
}
......@@ -25,7 +25,7 @@ public class DoctorResponse
/// 分组名称(医生、护士)
/// </summary>
public string UnitName { get; set; }
/// <summary>
/// 核算单元
/// </summary>
......@@ -104,6 +104,6 @@ public class DoctorResponse
/// <summary>
/// 实发绩效
/// </summary>
public Nullable<decimal> GiveFee { get; set; }
public Nullable<decimal> RealGiveFee { get; set; }
}
}
......@@ -13,5 +13,10 @@ public class HospitalResponse
public string HosLevel { get; set; }
public string HosType { get; set; }
public int States { get; set; }
public int HasConfig { get; set; }
public int IsOpenWorkYear { get; set; }
public int IsOpenDrugprop { get; set; }
public int IsOpenIncome { get; set; }
public int IsOpenDirector { get; set; }
}
}
......@@ -104,6 +104,6 @@ public class NurseResponse
/// <summary>
/// 实发绩效
/// </summary>
public Nullable<decimal> GiveFee { get; set; }
public Nullable<decimal> RealGiveFee { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class ResComputeResponse
{
/// <summary>
///
/// </summary>
public int ID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
/// sheet页id
/// </summary>
public Nullable<int> SheetID { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 绩效基数核算参考对象
/// </summary>
public string FitPeople { get; set; }
/// <summary>
/// 人员姓名
/// </summary>
public string EmployeeName { get; set; }
/// <summary>
/// 职称
/// </summary>
public string JobTitle { get; set; }
/// <summary>
/// 绩效合计(来自科室经济测算表)
/// </summary>
public Nullable<decimal> PerforTotal { get; set; }
/// <summary>
/// 核算单元医生数量(来自科室经济测算表)
/// </summary>
public Nullable<decimal> Number { get; set; }
/// <summary>
/// 人均绩效(来自科室经济测算表)
/// </summary>
public Nullable<decimal> Avg { get; set; }
/// <summary>
/// 效率绩效(需计算)
/// </summary>
public Nullable<decimal> Efficiency { get; set; }
/// <summary>
/// 规模绩效(需计算)
/// </summary>
public Nullable<decimal> Scale { get; set; }
/// <summary>
/// 岗位系数
/// </summary>
public Nullable<decimal> PostCoefficient { get; set; }
/// <summary>
/// 发放系数(来自人员名单)
/// </summary>
public Nullable<decimal> Grant { get; set; }
/// <summary>
/// 应发管理绩效(需计算,科主任护士长独有)
/// </summary>
public Nullable<decimal> ShouldGiveFee { get; set; }
/// <summary>
/// 绩效合计(需计算)
/// </summary>
public Nullable<decimal> PerforSumFee { get; set; }
/// <summary>
/// 考核对分率(来自人员名单)
/// </summary>
public Nullable<decimal> ScoreAverageRate { get; set; }
/// <summary>
/// 医院奖罚(来自人员名单)
/// </summary>
public Nullable<decimal> Punishment { get; set; }
/// <summary>
/// 其他绩效(来自人员名单)
/// </summary>
public Nullable<decimal> OtherPerfor { get; set; }
/// <summary>
/// 应发绩效(需计算)
/// </summary>
public Nullable<decimal> GiveFee { get; set; }
/// <summary>
/// 出勤率(来自人员名单)
/// </summary>
public Nullable<decimal> Attendance { get; set; }
/// <summary>
/// 参加工作时间(来自人员名单)
/// </summary>
public string WorkTime { get; set; }
/// <summary>
/// 绩效基础金额(计算)
/// </summary>
public Nullable<decimal> BaiscNormValue { get; set; }
/// <summary>
/// 年资系数(来自人员名单)
/// </summary>
public Nullable<decimal> WorkYear { get; set; }
/// <summary>
/// 调节系数
/// </summary>
public Nullable<decimal> Adjust { get; set; }
/// <summary>
/// 工作量绩效
/// </summary>
public Nullable<decimal> Workload { get; set; }
/// <summary>
/// 实发绩效
/// </summary>
public Nullable<decimal> RealGiveFee { get; set; }
}
}
using System;
using Performance.Infrastructure;
using System;
using System.Collections.Generic;
using System.Text;
......@@ -29,7 +30,17 @@ public class SheetExportResponse
/// </summary>
public List<Row> Row { get; set; }
public SheetExportResponse() { }
public SheetExportResponse()
{
Header = new List<Row>();
Row = new List<Row>();
}
public SheetExportResponse(string sheetName)
{
SheetName = sheetName;
Header = new List<Row>();
Row = new List<Row>();
}
public SheetExportResponse(int sheetID, string sheetName, int sheetType)
{
......@@ -57,7 +68,22 @@ public Row(int rownumber)
public class Cell
{
public int PointCell { get; set; }
public object CellValue { get; set; }
private object cellValue;
public object CellValue
{
get
{
var value = ConvertHelper.To<decimal?>(cellValue);
if (value.HasValue && value.Value > 0)
return Math.Round(value.Value, 2);
return cellValue;
}
set
{
cellValue = value;
}
}
public int MergeRow { get; set; }
public int MergeCell { get; set; }
public bool IsTotal { get; set; }
......
......@@ -15,8 +15,21 @@ public class UserIdentity
public string Mail { get; set; }
public string Mobile { get; set; }
public int States { get; set; }
public bool IsHome { get; set; }
/// <summary>
/// 是否是二次绩效管理 是为true 否则为false
/// </summary>
public bool IsAgainAdmin { get; set; }
/// <summary>
/// 用户科室
/// </summary>
public string Department { get; set; }
public List<HospitalResponse> Hospital { get; set; }
public List<RoleResponse> Role { get; set; }
public List<RoleResponse> Role { get; set; }
public UserIdentity()
{
Hospital = new List<HospitalResponse>();
Role = new List<RoleResponse>();
}
}
}
......@@ -15,5 +15,7 @@ public class UserResponse
public string Mobile { get; set; }
public int States { get; set; }
public string Hospital { get; set; }
public int Role { get; set; }
public string Department { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
/// <summary>
/// title value
/// </summary>
public class TitleValue<T>
{
/// <summary>
/// Title
/// </summary>
public string Title { get; set; }
/// <summary>
/// Value
/// </summary>
public T Value { get; set; }
/// <summary>
/// 1、已选,2、未选,3、已被选择
/// </summary>
public int State { get; set; }
}
/// <summary>
/// title value
/// </summary>
public class TitleValue : TitleValue<string>
{
}
}
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
using System;
......@@ -11,29 +12,93 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
{
}
public virtual DbSet<sys_user> Sys_User { get; set; }
public virtual DbSet<sys_hospital> Sys_Hospital { get; set; }
public virtual DbSet<sys_sms> Sys_Sms { get; set; }
public virtual DbSet<sys_user_hospital> Sys_User_Hospital { get; set; }
public virtual DbSet<sys_menu> Sys_Menu { get; set; }
public virtual DbSet<sys_role> Sys_Role { get; set; }
public virtual DbSet<sys_role_menu> Sys_Role_Menu { get; set; }
public virtual DbSet<sys_user_role> Sys_User_Role { get; set; }
public virtual DbSet<per_allot> Per_Allot { get; set; }
public virtual DbSet<per_sheet> Per_Sheet { get; set; }
public virtual DbSet<im_employee> Im_Employee { get; set; }
public virtual DbSet<im_header> Im_Header { get; set; }
public virtual DbSet<im_data> Im_Data { get; set; }
public virtual DbSet<im_accountbasic> Im_AccountBasic { get; set; }
public virtual DbSet<res_accountdoctor> Res_Accountdoctor { get; set; }
public virtual DbSet<res_accountnurse> Res_Accountnurse { get; set; }
public virtual DbSet<cof_drugprop> Cof_DrugProp { get; set; }
public virtual DbSet<cof_income> Cof_Income { get; set; }
public virtual DbSet<cof_director> Cof_Director { get; set; }
public virtual DbSet<res_baiscnorm> Res_Baiscnorm { get; set; }
public virtual DbSet<res_compute> Res_Compute { get; set; }
public virtual DbSet<cof_workyear> Cof_Workyear { get; set; }
public virtual DbSet<im_specialunit> Im_SpecialUnit { get; set; }
public virtual DbSet<res_specialunit> Res_SpecialUnit { get; set; }
/// <summary> 二次分配概览 <summary>
public virtual DbSet<ag_againsituation> ag_againsituation { get; set; }
/// <summary> 二次分配不固定数据 <summary>
public virtual DbSet<ag_data> ag_data { get; set; }
/// <summary> 二次分配人员名单 <summary>
public virtual DbSet<ag_employee> ag_employee { get; set; }
/// <summary> 二次分配不固定列头数据 <summary>
public virtual DbSet<ag_header> ag_header { get; set; }
/// <summary> 考核类别 <summary>
public virtual DbSet<as_assess> as_assess { get; set; }
/// <summary> 考核列头 <summary>
public virtual DbSet<as_columns> as_columns { get; set; }
/// <summary> 考核数据 <summary>
public virtual DbSet<as_data> as_data { get; set; }
/// <summary> 考核类别 <summary>
public virtual DbSet<as_tempassess> as_tempassess { get; set; }
/// <summary> 考核列头 <summary>
public virtual DbSet<as_tempcolumns> as_tempcolumns { get; set; }
/// <summary> <summary>
public virtual DbSet<cof_again> cof_again { get; set; }
/// <summary> 上传excel文件校验配置 <summary>
public virtual DbSet<cof_check> cof_check { get; set; }
/// <summary> 规模绩效、效率绩效计算系数配置 <summary>
public virtual DbSet<cof_director> cof_director { get; set; }
/// <summary> 工作量门诊药占比系数 <summary>
public virtual DbSet<cof_drugprop> cof_drugprop { get; set; }
/// <summary> 药占比费用列头名称 <summary>
public virtual DbSet<cof_drugtype> cof_drugtype { get; set; }
/// <summary> ICU医生护士有效收入汇总计算系数 <summary>
public virtual DbSet<cof_income> cof_income { get; set; }
/// <summary> 工龄对应绩效系数配置 <summary>
public virtual DbSet<cof_workyear> cof_workyear { get; set; }
/// <summary> <summary>
public virtual DbSet<hos_personfee> hos_personfee { get; set; }
/// <summary> 科室核算导入信息 <summary>
public virtual DbSet<im_accountbasic> im_accountbasic { get; set; }
/// <summary> <summary>
public virtual DbSet<im_data> im_data { get; set; }
/// <summary> <summary>
public virtual DbSet<im_employee> im_employee { get; set; }
/// <summary> <summary>
public virtual DbSet<im_header> im_header { get; set; }
/// <summary> 特殊科室核算 <summary>
public virtual DbSet<im_specialunit> im_specialunit { get; set; }
/// <summary> <summary>
public virtual DbSet<log_check> log_check { get; set; }
/// <summary> <summary>
public virtual DbSet<log_dbug> log_dbug { get; set; }
/// <summary> <summary>
public virtual DbSet<per_againallot> per_againallot { get; set; }
/// <summary> 医院绩效分配 <summary>
public virtual DbSet<per_allot> per_allot { get; set; }
/// <summary> 首次上传文件地址(当医院存在标准库时,首次上传用户提交固定格式的excel,开发人员配置SQL脚本) <summary>
public virtual DbSet<per_first> per_first { get; set; }
/// <summary> 上传数据解析 <summary>
public virtual DbSet<per_sheet> per_sheet { get; set; }
/// <summary> 医生科室核算结果 <summary>
public virtual DbSet<res_accountdoctor> res_accountdoctor { get; set; }
/// <summary> 护理科室核算结果 <summary>
public virtual DbSet<res_accountnurse> res_accountnurse { get; set; }
/// <summary> 核算基础标准 <summary>
public virtual DbSet<res_baiscnorm> res_baiscnorm { get; set; }
/// <summary> <summary>
public virtual DbSet<res_compute> res_compute { get; set; }
/// <summary> <summary>
public virtual DbSet<res_specialunit> res_specialunit { get; set; }
/// <summary> 医院数据提取脚本 <summary>
public virtual DbSet<sys_extract> sys_extract { get; set; }
/// <summary> 医院信息 <summary>
public virtual DbSet<sys_hospital> sys_hospital { get; set; }
/// <summary> <summary>
public virtual DbSet<sys_hospitalconfig> sys_hospitalconfig { get; set; }
/// <summary> 菜单表 <summary>
public virtual DbSet<sys_menu> sys_menu { get; set; }
/// <summary> 角色表 <summary>
public virtual DbSet<sys_role> sys_role { get; set; }
/// <summary> 角色菜单关联表 <summary>
public virtual DbSet<sys_role_menu> sys_role_menu { get; set; }
/// <summary> <summary>
public virtual DbSet<sys_sms> sys_sms { get; set; }
/// <summary> <summary>
public virtual DbSet<sys_task> sys_task { get; set; }
/// <summary> <summary>
public virtual DbSet<sys_user> sys_user { get; set; }
/// <summary> <summary>
public virtual DbSet<sys_user_hospital> sys_user_hospital { get; set; }
/// <summary> 用户角色关联表 <summary>
public virtual DbSet<sys_user_role> sys_user_role { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" sys_user.cs">
// * FileName: sys_user.cs
// * history : 2019-03-25 11:33:14
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using System;
......@@ -11,7 +10,7 @@
namespace Performance.EntityModels
{
/// <summary>
/// sys_user Entity Model
///
/// </summary>
[Table("sys_user")]
public class sys_user
......@@ -61,5 +60,15 @@ public class sys_user
/// 用户状态 1启用 2禁用
/// </summary>
public Nullable<int> States { get; set; }
/// <summary>
/// 用户科室
/// </summary>
public string Department { get; set; }
/// <summary>
/// 删除状态 1可用 2删除
/// </summary>
public Nullable<int> IsDelete { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" ag_againsituation.cs">
// * FileName: 二次分配概览.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
/// 二次分配概览
/// </summary>
[Table("ag_againsituation")]
public class ag_againsituation
{
/// <summary>
///
/// </summary>
[Key]
public int ID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AgainAllotID { get; set; }
/// <summary>
/// 夜班费
/// </summary>
public Nullable<decimal> NightShift { get; set; }
/// <summary>
/// 科室总绩效
/// </summary>
public Nullable<decimal> DepartmentTotal { get; set; }
/// <summary>
/// 护士长或科主任基础绩效
/// </summary>
public Nullable<decimal> BossPerfor { get; set; }
/// <summary>
/// 重点奖励
/// </summary>
public Nullable<decimal> Award { get; set; }
/// <summary>
/// 管理津贴
/// </summary>
public Nullable<decimal> Allowance { get; set; }
/// <summary>
/// 业绩分配绩效
/// </summary>
public Nullable<decimal> AllotPerfor { get; set; }
/// <summary>
/// 职称绩效
/// </summary>
public Nullable<decimal> JobPerfor { get; set; }
/// <summary>
/// 工作量绩效
/// </summary>
public Nullable<decimal> WorkloadPerfor { get; set; }
/// <summary>
/// 单独核算人员绩效
/// </summary>
public decimal AlonePerfor { get; set; }
/// <summary>
/// 出勤
/// </summary>
public Nullable<decimal> Attendance { get; set; }
/// <summary>
/// 科室系数人均
/// </summary>
public Nullable<decimal> DepartmentFactorAvg { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" ag_data.cs">
// * FileName: 二次分配不固定数据.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
/// 二次分配不固定数据
/// </summary>
[Table("ag_data")]
public class ag_data
{
/// <summary>
///
/// </summary>
[Key]
public int ID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AgainAllotID { get; set; }
/// <summary>
/// 行号
/// </summary>
public Nullable<int> RowNumber { get; set; }
/// <summary>
/// 列头类型名称
/// </summary>
public string TypeName { get; set; }
/// <summary>
/// 单元格value
/// </summary>
public Nullable<decimal> CellValue { get; set; }
/// <summary>
/// 1 汇总 2原始数据
/// </summary>
public Nullable<int> IsTotal { get; set; }
/// <summary>
/// 是否带入系数计算 1 带入 2 不带入
/// </summary>
public Nullable<int> IsFactor { get; set; }
/// <summary>
/// 系数值
/// </summary>
public Nullable<decimal> FactorValue { get; set; }
/// <summary>
/// 单元格注释
/// </summary>
public string Annotation { get; set; }
/// <summary>
/// 单元格备注
/// </summary>
public string Remark { get; set; }
/// <summary>
///
/// </summary>
public string SignID { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" ag_employee.cs">
// * FileName: 二次分配人员名单.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
/// 二次分配人员名单
/// </summary>
[Table("ag_employee")]
public class ag_employee
{
/// <summary>
///
/// </summary>
[Key]
public int ID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AgainAllotID { get; set; }
/// <summary>
/// 行号
/// </summary>
public Nullable<int> RowNumber { get; set; }
/// <summary>
/// 姓名
/// </summary>
public string Name { get; set; }
/// <summary>
/// 职务
/// </summary>
public string JobTitle { get; set; }
/// <summary>
/// 职称系数
/// </summary>
public Nullable<decimal> JobFactor { get; set; }
/// <summary>
/// 出勤
/// </summary>
public Nullable<decimal> Attendance { get; set; }
/// <summary>
/// 年资
/// </summary>
public Nullable<decimal> YearFactor { get; set; }
/// <summary>
/// 重点奖励
/// </summary>
public Nullable<decimal> Award { get; set; }
/// <summary>
/// 管理津贴
/// </summary>
public Nullable<decimal> Allowance { get; set; }
/// <summary>
/// 单独核算人员绩效
/// </summary>
public Nullable<decimal> AlonePerfor { get; set; }
/// <summary>
/// 夜班费
/// </summary>
public Nullable<decimal> NightShift { get; set; }
/// <summary>
/// 职称出勤系数(需计算)
/// </summary>
public Nullable<decimal> JobAttendanceFactor { get; set; }
/// <summary>
/// 年资出勤系数(需计算)
/// </summary>
public Nullable<decimal> YearAttendanceFactor { get; set; }
/// <summary>
/// 职称出勤绩效(需计算)
/// </summary>
public Nullable<decimal> JobAttendancePerfor { get; set; }
/// <summary>
/// 应发绩效(需计算)
/// </summary>
public Nullable<decimal> GiveFee { get; set; }
/// <summary>
/// 实发绩效(需计算)
/// </summary>
public Nullable<decimal> RealGiveFee { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" ag_header.cs">
// * FileName: 二次分配不固定列头数据.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
/// 二次分配不固定列头数据
/// </summary>
[Table("ag_header")]
public class ag_header
{
/// <summary>
///
/// </summary>
[Key]
public int ID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AgainAllotID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> ParentID { get; set; }
/// <summary>
/// 行坐标
/// </summary>
public Nullable<int> PointRow { get; set; }
/// <summary>
/// 列坐标
/// </summary>
public Nullable<int> PointCell { get; set; }
/// <summary>
/// 是否合并 1 合并 2 不合并
/// </summary>
public Nullable<int> IsMerge { get; set; }
/// <summary>
/// 合并行
/// </summary>
public Nullable<int> MergeRow { get; set; }
/// <summary>
/// 合并列
/// </summary>
public Nullable<int> MergeCell { get; set; }
/// <summary>
/// 单元格内容
/// </summary>
public string CellValue { get; set; }
/// <summary>
///
/// </summary>
public string SignID { get; set; }
/// <summary>
/// 1 汇总 2原始数据
/// </summary>
public Nullable<int> IsTotal { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" as_assess.cs">
// * FileName: 考核类别.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
/// 考核类别
/// </summary>
[Table("as_assess")]
public class as_assess
{
/// <summary>
///
/// </summary>
[Key]
public int ID { get; set; }
/// <summary>
/// 绩效ID
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
/// 考核类别
/// </summary>
public string AssessName { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" as_columns.cs">
// * FileName: 考核列头.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
/// 考核列头
/// </summary>
[Table("as_columns")]
public class as_columns
{
/// <summary>
///
/// </summary>
[Key]
public int ID { get; set; }
/// <summary>
/// 考核类别
/// </summary>
public Nullable<int> AssessID { get; set; }
/// <summary>
/// 父级列头ID
/// </summary>
public Nullable<int> ParentID { get; set; }
/// <summary>
/// 列头名称
/// </summary>
public string ColumnName { get; set; }
/// <summary>
/// 原始模板ID
/// </summary>
public Nullable<int> TempColumnID { get; set; }
/// <summary>
/// 排序
/// </summary>
public Nullable<int> Sort { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" as_data.cs">
// * FileName: 考核数据.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
/// 考核数据
/// </summary>
[Table("as_data")]
public class as_data
{
/// <summary>
///
/// </summary>
[Key]
public int ID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
/// 考核类别ID
/// </summary>
public Nullable<int> AssessID { get; set; }
/// <summary>
/// 科室
/// </summary>
public string Department { get; set; }
/// <summary>
/// 行数据JSON
/// </summary>
public string RowData { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" as_tempassess.cs">
// * FileName: 考核类别.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
/// 考核类别
/// </summary>
[Table("as_tempassess")]
public class as_tempassess
{
/// <summary>
///
/// </summary>
[Key]
public int ID { get; set; }
/// <summary>
/// 考核类别
/// </summary>
public string AssessName { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" as_tempcolumns.cs">
// * FileName: 考核列头.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
/// 考核列头
/// </summary>
[Table("as_tempcolumns")]
public class as_tempcolumns
{
/// <summary>
///
/// </summary>
[Key]
public int ID { get; set; }
/// <summary>
/// 考核类别
/// </summary>
public Nullable<int> AssessID { get; set; }
/// <summary>
/// 父级列头ID
/// </summary>
public Nullable<int> ParentID { get; set; }
/// <summary>
/// 列头名称
/// </summary>
public string ColumnName { get; set; }
/// <summary>
/// 排序
/// </summary>
public Nullable<int> Sort { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" cof_again.cs">
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
///
/// </summary>
[Table("cof_again")]
public class cof_again
{
/// <summary>
///
/// </summary>
[Key]
public int ID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
/// 1 职称绩效 2 工作量绩效 3 满勤天数
/// </summary>
public Nullable<int> Type { get; set; }
/// <summary>
/// 参数名称
/// </summary>
public string TypeName { get; set; }
/// <summary>
/// 参数值
/// </summary>
public Nullable<decimal> Value { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" cof_check.cs">
// * FileName: 上传excel文件校验配置.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
/// 上传excel文件校验配置
/// </summary>
[Table("cof_check")]
public class cof_check
{
/// <summary>
///
/// </summary>
[Key]
public int ID { get; set; }
/// <summary>
/// sheet类型。1、无法识别,2、医院人员名单,3、收入,4、其他收入,5、支出,6、加班,7、工作量,8、特殊核算单元,9、临床科室医护绩效测算基础
/// </summary>
public Nullable<int> Type { get; set; }
/// <summary>
/// 单元格列头名称
/// </summary>
public string CellName { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" cof_director.cs">
// * FileName: cof_director.cs
// * history : 2019-03-25 11:33:14
// * FileName: 规模绩效、效率绩效计算系数配置.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
......@@ -11,7 +10,7 @@
namespace Performance.EntityModels
{
/// <summary>
/// cof_director Entity Model
/// 规模绩效、效率绩效计算系数配置
/// </summary>
[Table("cof_director")]
public class cof_director
......@@ -21,24 +20,29 @@ public class cof_director
/// </summary>
[Key]
public int ID { get; set; }
/// <summary>
/// 绩效id
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
/// 绩效类型
/// 科室
/// </summary>
public string Department { get; set; }
/// <summary>
/// 绩效类型
/// </summary>
public string TypeName { get; set; }
/// <summary>
/// 务名称
/// 职务名称
/// </summary>
public string JobTitle { get; set; }
/// <summary>
/// 绩效系数
/// 绩效系数
/// </summary>
public Nullable<decimal> Value { get; set; }
}
......
//-----------------------------------------------------------------------
// <copyright file=" cof_drugprop.cs">
// * FileName: cof_drugprop.cs
// * history : 2019-03-25 11:33:14
// * FileName: 工作量门诊药占比系数.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
......@@ -11,7 +10,7 @@
namespace Performance.EntityModels
{
/// <summary>
/// cof_drugprop Entity Model
/// 工作量门诊药占比系数
/// </summary>
[Table("cof_drugprop")]
public class cof_drugprop
......@@ -26,19 +25,19 @@ public class cof_drugprop
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
/// 药占比最大范围(小于)
/// 药占比最大范围(小于)
/// </summary>
public Nullable<decimal> MaxRange { get; set; }
/// <summary>
/// 药占比最小范围(大于等于)
/// 药占比最小范围(大于等于)
/// </summary>
public Nullable<decimal> MinRange { get; set; }
/// <summary>
/// 药占比对应系数
/// 药占比对应系数
/// </summary>
public Nullable<decimal> Value { get; set; }
}
......
//-----------------------------------------------------------------------
// <copyright file=" cof_drugtype.cs">
// * FileName: 药占比费用列头名称.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
/// 药占比费用列头名称
/// </summary>
[Table("cof_drugtype")]
public class cof_drugtype
{
/// <summary>
///
/// </summary>
[Key]
public int ID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
/// 费用名称
/// </summary>
public string Charge { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" cof_income.cs">
// * FileName: cof_income.cs
// * history : 2019-03-25 11:33:14
// * FileName: ICU医生护士有效收入汇总计算系数.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
namespace Performance.EntityModels
{
/// <summary>
/// cof_income Entity Model
/// ICU医生护士有效收入汇总计算系数
/// </summary>
[Table("cof_income")]
public class cof_income
public class cof_income
{
/// <summary>
///
/// </summary>
[Key]
public int ID { get; set; }
public int ID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
/// 关键字匹配
/// </summary>
public string SheetNameKeyword { get; set; }
/// <summary>
/// 分组名称(医生、护理)
/// </summary>
public string UnitName { get; set; }
/// <summary>
/// 有效收入占比
/// </summary>
......
//-----------------------------------------------------------------------
// <copyright file=" cof_singlefactor.cs">
// * FileName: 特殊绩效项指标.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
/// 特殊绩效项指标
/// </summary>
[Table("cof_singlefactor")]
public class cof_singlefactor
{
/// <summary>
///
/// </summary>
[Key]
public int Id { get; set; }
/// <summary>
/// 1 工作量
/// </summary>
public Nullable<int> Type { get; set; }
/// <summary>
/// 类型名称
/// </summary>
public string TypeName { get; set; }
/// <summary>
/// 绩效核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 绩效项系数
/// </summary>
public string ItemName { get; set; }
/// <summary>
/// 系数值
/// </summary>
public Nullable<decimal> FactorValue { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" cof_workyear.cs">
// * FileName: 工龄对应绩效系数配置.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
namespace Performance.EntityModels
{
/// <summary>
/// 工龄对应绩效系数配置
/// </summary>
[Table("cof_workyear")]
public class cof_workyear
public class cof_workyear
{
/// <summary>
///
/// </summary>
[Key]
public int ID { get; set; }
public int ID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
/// 最大工龄范围(小于)
/// 最大工龄范围(小于)
/// </summary>
public Nullable<decimal> MaxRange { get; set; }
/// <summary>
/// 最小工龄范围(大于等于)
/// 最小工龄范围(大于等于)
/// </summary>
public Nullable<decimal> MinRange { get; set; }
/// <summary>
/// 绩效系数
/// 绩效系数
/// </summary>
public Nullable<decimal> Value { get; set; }
}
......
//-----------------------------------------------------------------------
// <copyright file=" hos_personfee.cs">
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
///
/// </summary>
[Table("hos_personfee")]
public class hos_personfee
{
/// <summary>
///
/// </summary>
[Key]
public int Id { get; set; }
/// <summary>
///
/// </summary>
public int HospitalId { get; set; }
/// <summary>
///
/// </summary>
public int Year { get; set; }
/// <summary>
///
/// </summary>
public int Month { get; set; }
/// <summary>
/// 来源 门诊 住院
/// </summary>
public string Source { get; set; }
/// <summary>
/// 开单科室
/// </summary>
public string DeptName { get; set; }
/// <summary>
/// 费用类型
/// </summary>
public string Category { get; set; }
/// <summary>
/// 人次
/// </summary>
public Nullable<int> PersonTime { get; set; }
/// <summary>
/// 费用
/// </summary>
public Nullable<decimal> Fee { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" im_accountbasic.cs">
// * FileName: im_accountbasic.cs
// * history : 2019-03-25 11:33:14
// * FileName: 科室核算导入信息.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
......@@ -11,7 +10,7 @@
namespace Performance.EntityModels
{
/// <summary>
/// im_accountbasic Entity Model
/// 科室核算导入信息
/// </summary>
[Table("im_accountbasic")]
public class im_accountbasic
......@@ -33,9 +32,14 @@ public class im_accountbasic
public Nullable<int> SheetID { get; set; }
/// <summary>
/// 核算单元
/// 核算单元(医生组)
/// </summary>
public string AccountingUnit { get; set; }
public string DoctorAccountingUnit { get; set; }
/// <summary>
/// 核算单元(护理组)
/// </summary>
public string NurseAccountingUnit { get; set; }
/// <summary>
/// 科室
......@@ -43,6 +47,11 @@ public class im_accountbasic
public string Department { get; set; }
/// <summary>
/// 科主任数量
/// </summary>
public Nullable<decimal> DoctorDirectorNumber { get; set; }
/// <summary>
/// 核算单元医生数量
/// </summary>
public Nullable<decimal> DoctorNumber { get; set; }
......@@ -58,6 +67,21 @@ public class im_accountbasic
public Nullable<decimal> DoctorSlopeFactor { get; set; }
/// <summary>
/// 规模绩效系数
/// </summary>
public Nullable<decimal> DoctorScale { get; set; }
/// <summary>
/// 效率绩效系数
/// </summary>
public Nullable<decimal> DoctorEffic { get; set; }
/// <summary>
/// 发放系数
/// </summary>
public Nullable<decimal> DoctorGrant { get; set; }
/// <summary>
/// 其他绩效1
/// </summary>
public Nullable<decimal> DoctorOtherPerfor1 { get; set; }
......@@ -83,9 +107,14 @@ public class im_accountbasic
public Nullable<decimal> DoctorAdjustFactor { get; set; }
/// <summary>
/// 护士长人数
/// </summary>
public Nullable<decimal> NurseHeadNumber { get; set; }
/// <summary>
/// 护士人数
/// </summary>
public Nullable<int> NurseNumber { get; set; }
public Nullable<decimal> NurseNumber { get; set; }
/// <summary>
/// 护理基础系数
......@@ -98,6 +127,21 @@ public class im_accountbasic
public Nullable<decimal> NurseSlopeFactor { get; set; }
/// <summary>
/// 规模绩效系数
/// </summary>
public Nullable<decimal> NurseScale { get; set; }
/// <summary>
/// 效率绩效系数
/// </summary>
public Nullable<decimal> NurseEffic { get; set; }
/// <summary>
/// 发放系数
/// </summary>
public Nullable<decimal> NurseGrant { get; set; }
/// <summary>
/// 其他绩效1
/// </summary>
public Nullable<decimal> NurseOtherPerfor1 { get; set; }
......
//-----------------------------------------------------------------------
// <copyright file=" im_data.cs">
// * FileName: im_data.cs
// * history : 2019-03-25 11:33:14
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using System;
......@@ -11,7 +10,7 @@
namespace Performance.EntityModels
{
/// <summary>
/// im_data Entity Model
///
/// </summary>
[Table("im_data")]
public class im_data
......
//-----------------------------------------------------------------------
// <copyright file=" im_employee.cs">
// * FileName: im_employee.cs
// * history : 2019-03-25 11:33:14
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using System;
......@@ -11,7 +10,7 @@
namespace Performance.EntityModels
{
/// <summary>
/// im_employee Entity Model
///
/// </summary>
[Table("im_employee")]
public class im_employee
......@@ -33,9 +32,12 @@ public class im_employee
public Nullable<int> SheetID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> RowNumber { get; set; }
/// <summary>
/// 科室类别(例如 医技科室 临床科室 其他科室)
/// </summary>
public string AccountType { get; set; }
......@@ -55,6 +57,11 @@ public class im_employee
public string FitPeople { get; set; }
/// <summary>
/// 绩效基数核算参考对象取值比例(如临床科室护士*95%)
/// </summary>
public Nullable<decimal> FitPeopleRatio { get; set; }
/// <summary>
/// 医生姓名
/// </summary>
public string DoctorName { get; set; }
......
//-----------------------------------------------------------------------
// <copyright file=" im_header.cs">
// * FileName: im_header.cs
// * history : 2019-03-25 11:33:14
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using System;
......@@ -11,7 +10,7 @@
namespace Performance.EntityModels
{
/// <summary>
/// im_header Entity Model
///
/// </summary>
[Table("im_header")]
public class im_header
......
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