二次分配

parent 05252f98
......@@ -26,8 +26,10 @@ namespace Performance.Api.Controllers
[Route("api/[controller]")]
public class AgainAllotController : Controller
{
public AgainAllotController()
private AgainAllotService againAllotService;
public AgainAllotController(AgainAllotService againAllotService)
{
this.againAllotService = againAllotService;
}
/// <summary>
......@@ -51,7 +53,7 @@ public ApiResponse AllotList()
{
throw new NotImplementedException();
}
/// <summary>
/// 上传文件
/// </summary>
......@@ -66,8 +68,12 @@ public ApiResponse Import([FromForm] IFormCollection form)
[Route("generate")]
[HttpPost]
public ApiResponse Generate()
public ApiResponse Generate([CustomizeValidator(RuleSet = "Generate"), FromBody]AgainAllotRequest request)
{
againAllotService.Generate(request);
throw new NotImplementedException();
}
}
......
......@@ -6,6 +6,7 @@
<ItemGroup>
<Compile Remove="PerExcel\PerComputeData.cs" />
<Compile Remove="TitleValue.cs" />
</ItemGroup>
<ItemGroup>
......
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
/// <summary>
/// 二次分配请求
/// </summary>
public class AgainAllotRequest
{
/// <summary>
/// 二次分配ID
/// </summary>
public int AgainAllotID { get; set; }
}
public class AgainAllotRequestValidator : AbstractValidator<AgainAllotRequest>
{
public AgainAllotRequestValidator()
{
RuleSet("Generate", () =>
{
RuleFor(x => x.AgainAllotID).NotNull().GreaterThan(0);
});
}
}
}
......@@ -12,16 +12,6 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
{
}
/// <summary> 医院表 <summary>
public virtual DbSet<sys_hospital> sys_hospital { get; set; }
/// <summary> 菜单表 <summary>
public virtual DbSet<sys_menu> sys_menu { 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_role> sys_role { get; set; }
/// <summary> 规模绩效、效率绩效计算系数配置 <summary>
public virtual DbSet<cof_director> cof_director { get; set; }
/// <summary> 工作量门诊药占比系数 <summary>
......@@ -42,6 +32,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
public virtual DbSet<im_specialunit> im_specialunit { 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> 上传数据解析 <summary>
......@@ -56,10 +48,20 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
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_hospital> sys_hospital { 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_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: .cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......@@ -61,5 +60,10 @@ public class sys_user
/// 用户状态 1启用 2禁用
/// </summary>
public Nullable<int> States { get; set; }
/// <summary>
/// 用户科室
/// </summary>
public string Department { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" cof_director.cs">
// * FileName: 规模绩效、效率绩效计算系数配置.cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" cof_drugprop.cs">
// * FileName: 工作量门诊药占比系数.cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" cof_income.cs">
// * FileName: ICU医生护士有效收入汇总计算系数.cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" cof_workyear.cs">
// * FileName: 工龄对应绩效系数配置.cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" im_accountbasic.cs">
// * FileName: 科室核算导入信息.cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" im_data.cs">
// * FileName: .cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" im_employee.cs">
// * FileName: .cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" im_header.cs">
// * FileName: .cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" im_specialunit.cs">
// * FileName: 特殊科室核算.cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" log_dbug.cs">
// * FileName: .cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
namespace Performance.EntityModels
{
/// <summary>
///
/// </summary>
[Table("log_dbug")]
public class log_dbug
public class log_dbug
{
/// <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<DateTime> CreateTime { get; set; }
/// <summary>
///
/// </summary>
public string Titile { get; set; }
/// <summary>
///
/// </summary>
......
//-----------------------------------------------------------------------
// <copyright file=" per_againallot.cs">
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
///
/// </summary>
[Table("per_againallot")]
public class per_againallot
{
/// <summary>
///
/// </summary>
[Key]
public int ID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
/// 用户ID
/// </summary>
public Nullable<int> CreateUser { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public Nullable<DateTime> CreateDateTime { get; set; }
/// <summary>
/// 科室名称
/// </summary>
public string Department { get; set; }
/// <summary>
/// 文件路径
/// </summary>
public string Path { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" per_allot.cs">
// * FileName: 医院绩效分配.cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" per_sheet.cs">
// * FileName: 上传数据解析.cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" res_accountdoctor.cs">
// * FileName: 医生科室核算结果.cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" res_accountnurse.cs">
// * FileName: 护理科室核算结果.cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" res_baiscnorm.cs">
// * FileName: 核算基础标准.cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" res_compute.cs">
// * FileName: .cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" res_specialunit.cs">
// * FileName: .cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" sys_hospital.cs">
// * FileName: 医院信息.cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" sys_menu.cs">
// * FileName: 菜单表.cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" sys_role.cs">
// * FileName: 角色表.cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" sys_role_menu.cs">
// * FileName: 角色菜单关联表.cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" sys_sms.cs">
// * FileName: .cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" sys_user_hospital.cs">
// * FileName: .cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" sys_user_role.cs">
// * FileName: 用户角色关联表.cs
// * history : 2019-03-29 12:36:44
// </copyright>
//-----------------------------------------------------------------------
using System;
......
......@@ -22,7 +22,6 @@
//-----------------------------------------------------------------------
// <copyright file=" <#= entity.EntityName #>.cs">
// * FileName: <#= entity.EntityComment #>.cs
// * history : <#= DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") #>
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" cof_director.cs">
// * FileName: cof_director.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" cof_drugprop.cs">
// * FileName: cof_drugprop.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" cof_income.cs">
// * FileName: cof_income.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" cof_workyear.cs">
// * FileName: cof_workyear.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" sys_hospital.cs">
// * FileName: sys_hospital.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" im_accountbasic.cs">
// * FileName: im_accountbasic.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" im_data.cs">
// * FileName: im_data.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" im_employee.cs">
// * FileName: im_employee.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" im_header.cs">
// * FileName: im_header.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" im_specialunit.cs">
// * FileName: im_specialunit.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" log_dbug.cs">
// * FileName: log_dbug.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" sys_menu.cs">
// * FileName: sys_menu.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" per_againallot.cs">
// * FileName: per_againallot.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using Performance.EntityModels;
namespace Performance.Repository
{
/// <summary>
/// per_againallot Repository
/// </summary>
public partial class PerforPeragainallotRepository : PerforRepository<per_againallot>
{
public PerforPeragainallotRepository(PerformanceDbContext context) : base(context)
{
}
}
}
//-----------------------------------------------------------------------
// <copyright file=" per_allot.cs">
// * FileName: per_allot.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" per_sheet.cs">
// * FileName: per_sheet.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" res_accountdoctor.cs">
// * FileName: res_accountdoctor.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" res_accountnurse.cs">
// * FileName: res_accountnurse.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" res_baiscnorm.cs">
// * FileName: res_baiscnorm.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" res_compute.cs">
// * FileName: res_compute.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" res_specialunit.cs">
// * FileName: res_specialunit.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" sys_role.cs">
// * FileName: sys_role.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" sys_role_menu.cs">
// * FileName: sys_role_menu.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" sys_sms.cs">
// * FileName: sys_sms.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" sys_user.cs">
// * FileName: sys_user.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" sys_user_hospital.cs">
// * FileName: sys_user_hospital.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
//-----------------------------------------------------------------------
// <copyright file=" sys_user_role.cs">
// * FileName: sys_user_role.cs
// * history : Created by T4 2019-03-29 11:36:36
// </copyright>
//-----------------------------------------------------------------------
using System;
......
......@@ -24,7 +24,6 @@
//-----------------------------------------------------------------------
// <copyright file=" <#= entity.EntityName #>.cs">
// * FileName: <#= entity.EntityName #>.cs
// * history : Created by T4 <#= DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") #>
// </copyright>
//-----------------------------------------------------------------------
using System;
......
using Performance.DtoModels;
using Performance.Repository;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.Services
{
public class AgainAllotService : IAutoInjection
{
private PerforPeragainallotRepository perforPeragainallotRepository;
public AgainAllotService(PerforPeragainallotRepository perforPeragainallotRepository)
{
this.perforPeragainallotRepository = perforPeragainallotRepository;
}
/// <summary>
/// 生成二次绩效
/// </summary>
/// <param name="request"></param>
public void Generate(AgainAllotRequest request)
{
var againAllot = perforPeragainallotRepository.GetEntity(t => t.ID == request.AgainAllotID);
if (againAllot == null || againAllot.ID == 0)
throw new PerformanceException("绩效二次分配不存在");
//获取科室实发绩效
//计算二次分配汇总信息
//对二次分配分别开计算
//固定数据计算
//动态数据计算
throw new NotImplementedException();
}
}
}
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