Commit a7bd8716 by ruyun.zhang

Merge branch 'feature/考核' into develop

parents 7e9e1e15 99c264e7
......@@ -902,6 +902,7 @@ public ApiResponse CopyDropDown()
new CopyDrop{Label="支出费用类别",Value="drugTypeDisburses"},
new CopyDrop{Label="费用类别系数",Value="drugTypeFactors"},
new CopyDrop{Label="考勤类型",Value="attendanceType"},
new CopyDrop{Label="绩效考核",Value="assessType"},
//new CopyDrop{Label="科室类型",Value="deptTypes"},
new CopyDrop{Label="二次绩效配置",Value="agains"},
};
......
......@@ -3,6 +3,7 @@
using Performance.DtoModels.Response;
using Performance.EntityModels;
using Performance.EntityModels.Entity;
using Performance.EntityModels.Other;
using Performance.Infrastructure;
using System.Linq;
......@@ -278,6 +279,20 @@ public AutoMapperConfigs()
.ReverseMap();
CreateMap<cof_again, CofAgainRequest>().ReverseMap();
CreateMap<AddAssessSchemeItemsRequest, per_assess_scheme_items>()
.ReverseMap();
CreateMap<per_assess_scheme_items, PerAssessmentStatisticsResponse>()
.ReverseMap();
CreateMap<cof_accounting, AssessSchemeTargetResponse>()
.ReverseMap();
CreateMap<AssessSchemeTargetResponse, per_assess_scheme_target>()
.ReverseMap();
CreateMap<per_assess_issue_scheme, AssessSchemeEnterDetaiListResponse>()
.ReverseMap();
CreateMap<per_assess_scheme, AssessSchemeDataResponse>()
.ReverseMap();
CreateMap<AttendanceData, per_attendance>().ReverseMap();
CreateMap<AttendanceVacationData, per_attendance_vacation>().ReverseMap();
}
......
......@@ -142,6 +142,25 @@ public enum OperationType
删除 = 3,
}
}
public class Assess
{
public enum SchemeItemsTarget
{
全部 = 0,
已设置其他方案 = 1,
未设置方案 = 2,
已设置方案 = 4,
}
public enum AssessState
{
未提交 = 1,
待审核 = 2,
审核通过 = 3,
驳回 = 4,
}
}
public class SecondAllot
{
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Performance.DtoModels.Request
{
public class AddAssessCategoryRequest
{
public int AllotId { get; set; }
public string Category { get; set; }
}
public class UpdateAssessCategoryRequest : AddAssessCategoryRequest
{
public int SchemeId { get; set; }
public int CategoryId { get; set; }
}
public class BatchAssessCategoryRequest
{
public int[] CategoryId { get; set; }
public int AllotId { get; set; }
}
}
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Text;
//using FluentValidation;
//using System;
//using System.Collections.Generic;
//using System.Text;
namespace Performance.DtoModels
{
public class AssessColumnRequest
{
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; }
}
//namespace Performance.DtoModels
//{
// public class AssessColumnRequest
// {
// 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);
});
// 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("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("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);
});
}
}
}
// RuleSet("List", () =>
// {
// RuleFor(t => t.AssessID).NotNull().GreaterThan(0);
// });
// }
// }
//}
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Text;
//using FluentValidation;
//using System;
//using System.Collections.Generic;
//using System.Text;
namespace Performance.DtoModels
{
public class AssessDataRequest
{
public int AssessID { get; set; }
public List<AssessRow> AssessRow { get; set; }
//namespace Performance.DtoModels
//{
// public class AssessDataRequest
// {
// 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 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);
});
// 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);
});
}
}
}
// 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;
//using FluentValidation;
//using System;
//using System.Collections.Generic;
//using System.Text;
namespace Performance.DtoModels
{
public class AssessRequest
{
public int AssessID { get; set; }
public int AllotID { get; set; }
public string AssessName { get; set; }
}
//namespace Performance.DtoModels
//{
// public class AssessRequest
// {
// 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);
});
// 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("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("Add", () =>
// {
// RuleFor(t => t.AllotID).NotNull().NotEmpty();
// RuleFor(t => t.AssessName).NotNull().NotEmpty();
// });
RuleSet("List", () =>
{
RuleFor(t => t.AllotID).NotNull().NotEmpty();
});
// RuleSet("List", () =>
// {
// RuleFor(t => t.AllotID).NotNull().NotEmpty();
// });
RuleSet("Use", () =>
{
RuleFor(t => t.AllotID).NotNull().NotEmpty();
RuleFor(t => t.AssessID).NotNull().NotEmpty();
});
}
}
}
// RuleSet("Use", () =>
// {
// RuleFor(t => t.AllotID).NotNull().NotEmpty();
// RuleFor(t => t.AssessID).NotNull().NotEmpty();
// });
// }
// }
//}
namespace Performance.DtoModels.Request
{
public class QuerySchemeResultList
{
///// <summary>
///// 核算组别(页面带进来)
///// </summary>
//public string UnitType { get; set; }
///// <summary>
///// 核算单元(页面带进来)
///// </summary>
//public string AccountingUnit { get; set; }
public int SchemeId { get; set; }
public int AllotId { get; set; }
public string? TargetUnitType { get; set; }
public string? TargetAccountingUnit { get; set; }
public string? ItemName2 { get; set; }
public int Page { get; set; } = 1;
public int PageSize { get; set; } = 20;
}
public class QuerySchemeEnterDetailList
{
public int AllotId { get; set; }
public int ItemId { get; set; }
/// <summary>
/// 考核目标核算组别
/// </summary>
public string? TargetUnitType { get; set; }
/// <summary>
/// 考核目标核算单元
/// </summary>
public string? TargetAccountingUnit { get; set; }
/// <summary>
/// 操作类型 未提交 = 1,待审核 = 2,审核通过 = 3,驳回 = 4,
/// </summary>
public Assess.AssessState State { get; set; }
/// <summary>
/// 二级指标名称
/// </summary>
public string? ItemName2 { get; set; }
public int Page { get; set; } = 1;
public int PageSize { get; set; } = 20;
}
public class EditSchemeEnterAudit
{
public int AllotId { get; set; }
public int IssueId { get; set; }
public int ItemId { get; set; }
/// <summary>
/// 操作类型 未提交 = 1,待审核 = 2,审核通过 = 3,驳回 = 4,
/// </summary>
public Assess.AssessState State { get; set; }
/// <summary>
/// 审核或驳回原因
/// </summary>
public string? AuditRemark { get; set; }
}
public class EditAssessSchemeEnterRequest
{
public int IssueId { get; set; }
/// <summary>
/// 考核扣分
/// </summary>
public decimal? Score { get; set; }
/// <summary>
/// 扣分原因
/// </summary>
public string? ScoreRemark { get; set; }
}
}
using System.Collections.Generic;
namespace Performance.DtoModels.Request
{
public class AddAssessSchemeItemsRequest
{
public int AllotId { get; set; }
/// <summary>
/// 方案ID
/// </summary>
public int SchemeId { get; set; }
/// <summary>
/// 一级指标名称
/// </summary>
public string ItemName1 { get; set; }
/// <summary>
/// 二级指标名称
/// </summary>
public string ItemName2 { get; set; }
/// <summary>
/// 考核分值
/// </summary>
public decimal AssessScore { get; set; }
/// <summary>
/// 考核标准
/// </summary>
public string AssessNorm { get; set; }
/// <summary>
/// <summary>
/// 责任部门核算组别
/// </summary>
public string UnitType { get; set; }
/// <summary>
/// 责任部门核算单元
/// </summary>
public string AccountingUnit { get; set; }
}
public class UpdateAssessSchemeItemsRequest : AddAssessSchemeItemsRequest
{
public int SchemeItemsId { get; set; }
}
public class BatchAssessSchemeItemsRequest
{
public int[] SchemeItemsId { get; set; }
}
public class QuerySchemeItemsTargetList
{
public int AllotId { get; set; }
public int AssessId { get; set; }
public int SchemeId { get; set; }
public Assess.SchemeItemsTarget SchemeItemsTarget { get; set; }
public string UnitType { get; set; }
public string AccountingUnit { get; set; }
public int Page { get; set; } = 1;
public int PageSize { get; set; } = 20;
}
public class QuerySchemeItemsList
{
public int AllotId { get; set; }
public int SchemeId { get; set; }
/// <summary>
/// 核算组别
/// </summary>
public string? UnitType { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string? AccountingUnit { get; set; }
/// <summary>
/// 二级指标名称
/// </summary>
public string? ItemName2 { get; set; }
public int Page { get; set; } = 1;
public int PageSize { get; set; } = 20;
}
public class TargetAssessSchemeItemsRequest
{
public List<AssessSchemeTargetResponse> SchemeTargetResponse { get; set; }
public int SchemeId { get; set; }
}
public class TargetSchemeItemsTargetEdit
{
public int AllotId { get; set; }
public int TargetId { get; set; }
public string UnitType { get; set; }
public string AccountingUnit { get; set; }
}
public class TargetSchemeItemsTargetDelete
{
public int[] TargetId { get; set; }
}
}
namespace Performance.DtoModels.Request
{
public class AddAssessSchemeRequest
{
public int AllotId { get; set; }
public int CategoryId { get; set; }
public string SchemeName { get; set; }
public string SchemeRemarks { get; set; }
}
public class UpdateAssessSchemeRequest : AddAssessSchemeRequest
{
public int SchemeId { get; set; }
}
public class BatchAssessSchemeRequest
{
public int[] SchemeId { get; set; }
}
public class QuerySchemeList : AddAssessSchemeRequest
{
public int Page { get; set; } = 1;
public int PageSize { get; set; } = 20;
}
public class RecordAssessScheme : AssessSchemeDataResponse
{
public string AssessSchemeName { get; set; }
}
}
using Performance.EntityModels;
using Performance.EntityModels.Other;
using System;
namespace Performance.DtoModels
{
/// <summary>
/// 考核下发结果统计
/// </summary>
public class PerAssessmentStatisticsResponse
{
public PerAssessmentStatisticsResponse() { }
public PerAssessmentStatisticsResponse(view_assess_issue item)
{
Id = 0;
AllotId = item.AllotId;
AssessId = item.AssessId;
AssessCode = item.AssessCode;
AssessName = item.AssessName;
SchemeId = item.SchemeId;
SchemeCode = item.SchemeCode;
SchemeName = item.SchemeName;
ItemId = item.ItemId;
ItemCode = item.ItemCode;
ItemName1 = item.ItemName1;
ItemName2 = item.ItemName2;
AssessScore = item.AssessScore;
AssessNorm = item.AssessNorm;
UnitCode = item.UnitCode;
UnitType = item.UnitType;
AccountingUnit = item.AccountingUnit;
TargetUnitCode = item.TargetUnitCode;
TargetUnitType = item.TargetUnitType;
TargetAccountingUnit = item.TargetAccountingUnit;
OperationType = (int)Attendance.OperationType.新增;
Describe = "添加数据";
}
public PerAssessmentStatisticsResponse(per_assess_issue_scheme item)
{
Id = item.Id;
AllotId = item.AllotId;
AssessId = item.AssessId;
AssessCode = item.AssessCode;
AssessName = item.AssessName;
SchemeId = item.SchemeId ?? 0;
SchemeCode = item.SchemeCode;
SchemeName = item.SchemeName;
ItemId = item.ItemId ?? 0;
ItemCode = item.ItemCode;
ItemName1 = item.ItemName1;
ItemName2 = item.ItemName2;
AssessScore = item.AssessScore;
AssessNorm = item.AssessNorm;
UnitCode = item.UnitCode;
UnitType = item.UnitType;
AccountingUnit = item.AccountingUnit;
TargetUnitCode = item.TargetUnitCode;
TargetUnitType = item.TargetUnitType;
TargetAccountingUnit = item.TargetAccountingUnit;
OperationType = (int)Attendance.OperationType.删除;
Describe = "删除数据";
}
/// <summary>
///
/// </summary>
public int? Id { get; set; }
/// <summary>
/// 绩效ID
/// </summary>
public Nullable<int> AllotId { get; set; }
/// <summary>
/// 考核类型ID
/// </summary>
public int AssessId { get; set; }
/// <summary>
/// 考核类型编码
/// </summary>
public string AssessCode { get; set; }
/// <summary>
/// 考核类型名称
/// </summary>
public string AssessName { get; set; }
/// <summary>
/// 考核方案ID
/// </summary>
public int SchemeId { get; set; }
/// <summary>
/// 考核方案编码
/// </summary>
public string SchemeCode { get; set; }
/// <summary>
/// 考核方案名称
/// </summary>
public string SchemeName { get; set; }
/// <summary>
/// 考核指标Id
/// </summary>
public int ItemId { get; set; }
/// <summary>
/// 指标编码
/// </summary>
public string ItemCode { get; set; }
/// <summary>
/// 一级指标名称
/// </summary>
public string ItemName1 { get; set; }
/// <summary>
/// 二级指标名称
/// </summary>
public string ItemName2 { get; set; }
/// <summary>
/// 考核分值
/// </summary>
public decimal AssessScore { get; set; }
/// <summary>
/// 考核标准
/// </summary>
public string AssessNorm { get; set; }
/// <summary>
/// 责任部门核算单元编码
/// </summary>
public string UnitCode { get; set; }
/// <summary>
/// 责任部门核算组别
/// </summary>
public string UnitType { get; set; }
/// <summary>
/// 责任部门核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 考核目标核算单元编码
/// </summary>
public string TargetUnitCode { get; set; }
/// <summary>
/// 考核目标核算组别
/// </summary>
public string TargetUnitType { get; set; }
/// <summary>
/// 考核目标核算单元
/// </summary>
public string TargetAccountingUnit { get; set; }
/// <summary>
/// 操作类型 新增 = 1, 修改 = 2, 删除 = 3,
/// </summary>
public int OperationType { get; set; }
/// <summary>
/// 操作描述
/// </summary>
public string Describe { get; set; }
}
}
......@@ -212,6 +212,7 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
public virtual DbSet<report_performance_tags> report_performance_tags { get; set; }
/// <summary> </summary>
public virtual DbSet<report_statistics> report_statistics { get; set; }
/// <summary> </summary>
public virtual DbSet<report_statistics_selection> report_statistics_selection { get; set; }
public virtual DbSet<report_statistics_selection_record> report_statistics_selection_record { get; set; }
public virtual DbSet<report_statistics_store> report_statistics_store { get; set; }
......@@ -252,17 +253,33 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
public virtual DbSet<sys_user_hospital> sys_user_hospital { get; set; }
/// <summary> 用户角色关联表 </summary>
public virtual DbSet<sys_user_role> sys_user_role { get; set; }
/// <summary></summary>
public virtual DbSet<sys_version> sys_version { get; set; }
/// <summary>调动记录表</summary>
public virtual DbSet<per_attendance> per_attendance { get; set; }
/// <summary>考勤结果</summary>
public virtual DbSet<per_attendance_dept> per_attendance_dept { get; set; }
public virtual DbSet<per_attendance_dept_report> per_attendance_dept_report { get; set; }
public virtual DbSet<per_attendance_issue> per_attendance_issue { get; set; }
/// <summary>考勤类型</summary>
public virtual DbSet<per_attendance_type> per_attendance_type { get; set; }
/// <summary>考勤记录表</summary>
public virtual DbSet<per_attendance_vacation> per_attendance_vacation { get; set; }
/// <summary>绩效分配操作记录表</summary>
public virtual DbSet<per_allot_action> per_allot_action { get; set; }
/// <summary>医院其他绩效类型</summary>
public virtual DbSet<per_apr_amount_type> per_apr_amount_type { get; set; }
/// <summary>不公示其他绩效类型</summary>
public virtual DbSet<per_apr_amount_hide_type> per_apr_amount_hide_type { get; set; }
/// <summary>考核分类</summary>
public virtual DbSet<per_assess_category> per_assess_category { get; set; }
/// <summary>考核方案</summary>
public virtual DbSet<per_assess_scheme> per_assess_scheme { get; set; }
/// <summary>考核方案下发到责任科室指标清单</summary>
public virtual DbSet<per_assess_issue_scheme> per_assess_issue_scheme { get; set; }
/// <summary>考核方案指标项</summary>
public virtual DbSet<per_assess_scheme_items> per_assess_scheme_items { get; set; }
/// <summary>被考核对象</summary>
public virtual DbSet<per_assess_scheme_target> per_assess_scheme_target { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" per_assess_category.cs">
// * FileName: 考核类别.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
/// 考核类别
/// </summary>
[Table("per_assess_category")]
public class per_assess_category
{
/// <summary>
/// 考核类别Id
/// </summary>
[Key]
public int Id { get; set; }
/// <summary>
/// 绩效ID
/// </summary>
public Nullable<int> AllotId { get; set; }
/// <summary>
/// 考核类型编码
/// </summary>
public string AssessCode { get; set; }
/// <summary>
/// 考核类型
/// </summary>
public string AssessName { get; set; }
/// <summary>
/// 创建人
/// </summary>
public int CreateBy { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime? CreateTime { get; set; }
/// <summary>
/// 最后修改人
/// </summary>
public int UpdateBy { get; set; }
/// <summary>
/// 修改时间
/// </summary>
public DateTime? UpdateTime { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" per_assess_scheme.cs">
// * FileName: 考核方案.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
/// 考核方案下发到责任科室指标清单
/// </summary>
[Table("per_assess_issue_scheme")]
public class per_assess_issue_scheme
{
/// <summary>
/// 考核方案下发到责任科室指标清单Id
/// </summary>
[Key]
public int Id { get; set; }
/// <summary>
/// 绩效ID
/// </summary>
public Nullable<int> AllotId { get; set; }
/// <summary>
/// 考核类型ID
/// </summary>
public int AssessId { get; set; }
/// <summary>
/// 考核类型编码
/// </summary>
public string AssessCode { get; set; }
/// <summary>
/// 考核类型名称
/// </summary>
public string AssessName { get; set; }
/// <summary>
/// 考核方案ID
/// </summary>
public int? SchemeId { get; set; }
/// <summary>
/// 考核方案编码
/// </summary>
public string SchemeCode { get; set; }
/// <summary>
/// 考核方案名称
/// </summary>
public string SchemeName { get; set; }
/// <summary>
/// 考核指标Id
/// </summary>
public int? ItemId { get; set; }
/// <summary>
/// 指标编码
/// </summary>
public string? ItemCode { get; set; }
/// <summary>
/// 一级指标名称
/// </summary>
public string ItemName1 { get; set; }
/// <summary>
/// 二级指标名称
/// </summary>
public string ItemName2 { get; set; }
/// <summary>
/// 考核分值
/// </summary>
public decimal AssessScore { get; set; }
/// <summary>
/// 考核标准
/// </summary>
public string AssessNorm { get; set; }
/// <summary>
/// 责任部门核算单元编码
/// </summary>
public string UnitCode { get; set; }
/// <summary>
/// 责任部门核算组别
/// </summary>
public string UnitType { get; set; }
/// <summary>
/// 责任部门核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 状态
/// </summary>
public int State { get; set; }
/// <summary>
/// 创建人
/// </summary>
public int CreateBy { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime? CreateTime { get; set; }
/// <summary>
/// 最后修改人
/// </summary>
public int UpdateBy { get; set; }
/// <summary>
/// 修改时间
/// </summary>
public DateTime? UpdateTime { get; set; }
/// <summary>
/// 考核扣分
/// </summary>
public decimal? Score { get; set; }
/// <summary>
/// 扣分原因
/// </summary>
public string? ScoreRemark { get; set; }
/// <summary>
/// 考核目标核算单元编码
/// </summary>
public string TargetUnitCode { get; set; }
/// <summary>
/// 考核目标核算组别
/// </summary>
public string TargetUnitType { get; set; }
/// <summary>
/// 考核目标核算单元
/// </summary>
public string TargetAccountingUnit { get; set; }
/// <summary>
/// 提交人
/// </summary>
public int? SubmitBy { get; set; }
/// <summary>
/// 提交时间
/// </summary>
public DateTime? SubmitTime { get; set; }
/// <summary>
/// 审核人
/// </summary>
public string? AuditBy { get; set; }
/// <summary>
/// 审核时间
/// </summary>
public DateTime? AuditTime { get; set; }
/// <summary>
/// 审核或驳回原因
/// </summary>
public string? AuditRemark { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" per_assess_scheme.cs">
// * FileName: 考核方案.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
/// 考核方案
/// </summary>
[Table("per_assess_scheme")]
public class per_assess_scheme
{
/// <summary>
/// 考核方案Id
/// </summary>
[Key]
public int Id { get; set; }
/// <summary>
/// 绩效ID
/// </summary>
public Nullable<int> AllotId { get; set; }
/// <summary>
/// 考核类型ID
/// </summary>
public int AssessId { get; set; }
/// <summary>
/// 考核方案编码
/// </summary>
public string SchemeCode { get; set; }
/// <summary>
/// 考核方案名称
/// </summary>
public string SchemeName { get; set; }
/// <summary>
/// 考核方案备注
/// </summary>
public string SchemeRemarks { get; set; }
/// <summary>
/// 创建人
/// </summary>
public int CreateBy { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime? CreateTime { get; set; }
/// <summary>
/// 最后修改人
/// </summary>
public int UpdateBy { get; set; }
/// <summary>
/// 修改时间
/// </summary>
public DateTime? UpdateTime { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" per_assess_scheme_items.cs">
// * FileName: 考核方案指标项.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
/// 考核方案指标项
/// </summary>
[Table("per_assess_scheme_items")]
public class per_assess_scheme_items
{
/// <summary>
/// 指标项Id
/// </summary>
[Key]
public int Id { get; set; }
/// <summary>
/// 绩效ID
/// </summary>
public Nullable<int> AllotId { get; set; }
/// <summary>
/// 考核类型ID
/// </summary>
public int AssessId { get; set; }
/// <summary>
/// 考核方案Id
/// </summary>
public int SchemeId { get; set; }
/// <summary>
/// 指标编码
/// </summary>
public string ItemCode { get; set; }
/// <summary>
/// 一级指标名称
/// </summary>
public string ItemName1 { get; set; }
/// <summary>
/// 二级指标名称
/// </summary>
public string ItemName2 { get; set; }
/// <summary>
/// 考核分值
/// </summary>
public decimal AssessScore { get; set; }
/// <summary>
/// 考核标准
/// </summary>
public string AssessNorm { get; set; }
/// <summary>
/// 责任部门核算单元编码
/// </summary>
public string UnitCode { get; set; }
/// <summary>
/// 责任部门核算组别
/// </summary>
public string UnitType { get; set; }
/// <summary>
/// 责任部门核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 创建人
/// </summary>
public int CreateBy { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime? CreateTime { get; set; }
/// <summary>
/// 最后修改人
/// </summary>
public int UpdateBy { get; set; }
/// <summary>
/// 修改时间
/// </summary>
public DateTime? UpdateTime { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" per_assess_scheme_target.cs">
// * FileName: 被考核对象.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
/// 被考核对象
/// </summary>
[Table("per_assess_scheme_target")]
public class per_assess_scheme_target
{
/// <summary>
/// 被考核对象Id
/// </summary>
[Key]
public int Id { get; set; }
/// <summary>
/// 绩效ID
/// </summary>
public Nullable<int> AllotId { get; set; }
/// <summary>
/// 考核类型ID
/// </summary>
public int AssessId { get; set; }
/// <summary>
/// 考核方案Id
/// </summary>
public int SchemeId { get; set; }
/// <summary>
/// 考核目标核算单元编码
/// </summary>
public string UnitCode { get; set; }
/// <summary>
/// 考核目标核算组别
/// </summary>
public string UnitType { get; set; }
/// <summary>
/// 考核目标核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 创建人
/// </summary>
public int CreateBy { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime? CreateTime { get; set; }
/// <summary>
/// 最后修改人
/// </summary>
public int UpdateBy { get; set; }
/// <summary>
/// 修改时间
/// </summary>
public DateTime? UpdateTime { get; set; }
}
}
using Performance.EntityModels.Entity;
using System;
namespace Performance.EntityModels.Other
{
public class view_assess_issue
{
/// <summary>
/// 绩效ID
/// </summary>
public Nullable<int> AllotId { get; set; }
/// <summary>
/// 考核类型编码
/// </summary>
public string AssessCode { get; set; }
/// <summary>
/// 考核类型
/// </summary>
public string AssessName { get; set; }
/// <summary>
/// 考核类型ID
/// </summary>
public int AssessId { get; set; }
/// <summary>
/// 考核方案ID
/// </summary>
public int SchemeId { get; set; }
/// <summary>
/// 考核方案编码
/// </summary>
public string SchemeCode { get; set; }
/// <summary>
/// 考核方案名称
/// </summary>
public string SchemeName { get; set; }
/// <summary>
/// 指标Id
/// </summary>
public int ItemId { get; set; }
/// <summary>
/// 指标编码
/// </summary>
public string ItemCode { get; set; }
/// <summary>
/// 一级指标名称
/// </summary>
public string ItemName1 { get; set; }
/// <summary>
/// 二级指标名称
/// </summary>
public string ItemName2 { get; set; }
/// <summary>
/// 考核分值
/// </summary>
public decimal AssessScore { get; set; }
/// <summary>
/// 考核标准
/// </summary>
public string AssessNorm { get; set; }
/// <summary>
/// 责任部门核算单元编码
/// </summary>
public string UnitCode { get; set; }
/// <summary>
/// 责任部门核算组别
/// </summary>
public string UnitType { get; set; }
/// <summary>
/// 责任部门核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 考核目标核算单元编码
/// </summary>
public string TargetUnitCode { get; set; }
/// <summary>
/// 考核目标核算组别
/// </summary>
public string TargetUnitType { get; set; }
/// <summary>
/// 考核目标核算单元
/// </summary>
public string TargetAccountingUnit { get; set; }
}
}
using Performance.EntityModels.Entity;
using System;
namespace Performance.EntityModels.Other
{
public class view_assess_result
{
/// <summary>
/// 绩效ID
/// </summary>
public Nullable<int> AllotId { get; set; }
/// <summary>
/// 考核类型ID
/// </summary>
public int AssessId { get; set; }
/// <summary>
/// 考核方案ID
/// </summary>
public int SchemeId { get; set; }
/// <summary>
/// 指标Id
/// </summary>
public int ItemId { get; set; }
/// 二级指标名称
/// </summary>
public string ItemName2 { get; set; }
/// <summary>
/// 状态
/// </summary>
public int State { get; set; }
/// <summary>
/// 分值标准
/// </summary>
public decimal? AssessScore { get; set; }
/// <summary>
/// 扣分值
/// </summary>
public decimal? Score { get; set; }
/// <summary>
/// 责任部门核算单元编码
/// </summary>
public string UnitCode { get; set; }
/// <summary>
/// 责任部门核算组别
/// </summary>
public string UnitType { get; set; }
/// <summary>
/// 责任部门核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 考核目标核算单元编码
/// </summary>
public string TargetUnitCode { get; set; }
/// <summary>
/// 考核目标核算组别
/// </summary>
public string TargetUnitType { get; set; }
/// <summary>
/// 考核目标核算单元
/// </summary>
public string TargetAccountingUnit { get; set; }
}
}
......@@ -7,6 +7,8 @@
<ItemGroup>
<PackageReference Include="Dapper" Version="2.0.123" />
<PackageReference Include="Dapper.Contrib" Version="2.0.78" />
<PackageReference Include="EPPlus" Version="4.5.3.2" />
<PackageReference Include="Masuit.Tools.Core" Version="2.4.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.10" />
<PackageReference Include="MySql.Data" Version="8.0.27" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="5.0.1" />
......@@ -15,7 +17,6 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="AutoMapper" Version="10.1.1" />
<PackageReference Include="FluentValidation.AspNetCore" Version="10.3.3" />
<PackageReference Include="EPPlus" Version="4.5.3.2" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="8.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.10" />
......
......@@ -17,7 +17,7 @@
namespace Performance.Repository
{
/// <summary>
/// sys_allot Repository
/// sys_allot(per_allot) Repository
/// </summary>
public partial class PerforPerallotRepository : PerforRepository<per_allot>
{
......@@ -316,7 +316,11 @@ public IEnumerable<string> GetSecondWorkloadMaps(int hospitalId)
/// <summary>
/// 考勤视图
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
public IEnumerable<view_attendance> GetAttendance(int allotId)
{
var connection = context.Database.GetDbConnection();
......@@ -332,6 +336,47 @@ public IEnumerable<view_attendance> GetAttendance(int allotId)
throw;
}
}
/// <summary>
/// 考核视图
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
public IEnumerable<view_assess_issue> GetAssessIssue(int allotId)
{
var connection = context.Database.GetDbConnection();
if (connection.State != ConnectionState.Open) connection.Open();
try
{
string query = $@"SELECT * FROM view_assess_issue where AllotId = @allotId";
return connection.Query<view_assess_issue>(query, new { allotId }, commandTimeout: 60 * 60);
}
catch (Exception)
{
throw;
}
}
/// <summary>
/// 考核结果视图
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
public IEnumerable<view_assess_result> GetAssessResult(int allotId)
{
var connection = context.Database.GetDbConnection();
if (connection.State != ConnectionState.Open) connection.Open();
try
{
string query = $@"SELECT * FROM view_assess_result where AllotId = @allotId";
return connection.Query<view_assess_result>(query, new { allotId }, commandTimeout: 60 * 60);
}
catch (Exception)
{
throw;
}
}
/// <summary>
/// 查询人员字典
/// </summary>
......@@ -428,5 +473,26 @@ public void PerAttendanceIssueBackup(int allotId)
}
}
}
/// <summary>
/// 考核-考核下发备份
/// </summary>
/// <param name="allot"></param>
public void PerAssessIssueSchemeBackup(int allotId)
{
using (var connection = context.Database.GetDbConnection())
{
if (connection.State != ConnectionState.Open) connection.Open();
try
{
connection.Execute("call proc_assess_issue_scheme_backup(@allotId);", new { allotId }, commandTimeout: 60 * 60);
}
catch (Exception)
{
throw;
}
}
}
}
}
\ No newline at end of file
......@@ -8,11 +8,11 @@
namespace Performance.Repository.Repository
{
public partial class PerfoPperAttendanceTypeRepository : PerforRepository<per_attendance_type>
{
/// <summary>
/// per_attendance_type Repository
/// </summary>
public partial class PerfoPperAttendanceTypeRepository : PerforRepository<per_attendance_type>
{
public PerfoPperAttendanceTypeRepository(PerformanceDbContext context) : base(context)
{
}
......
//-----------------------------------------------------------------------
// <copyright file=" per_assess_category.cs">
// * FileName: per_assess_category.cs
// </copyright>
//-----------------------------------------------------------------------
using Performance.EntityModels;
namespace Performance.Repository
{
/// <summary>
/// per_assess_category Repository
/// </summary>
public partial class PerforPerAssessCategoryRepository : PerforRepository<per_assess_category>
{
public PerforPerAssessCategoryRepository(PerformanceDbContext context) : base(context)
{
}
}
}
//-----------------------------------------------------------------------
// <copyright file=" per_assess_issue_scheme.cs">
// * FileName: per_assess_issue_scheme.cs
// </copyright>
//-----------------------------------------------------------------------
using Performance.EntityModels;
namespace Performance.Repository
{
/// <summary>
/// per_assess_issue_scheme Repository
/// </summary>
public partial class PerforPerAssessIssueSchemeRepository : PerforRepository<per_assess_issue_scheme>
{
public PerforPerAssessIssueSchemeRepository(PerformanceDbContext context) : base(context)
{
}
}
}
//-----------------------------------------------------------------------
// <copyright file=" per_assess_scheme_items.cs">
// * FileName: per_assess_scheme_items.cs
// </copyright>
//-----------------------------------------------------------------------
using Performance.EntityModels;
namespace Performance.Repository
{
/// <summary>
/// per_assess_scheme_items Repository
/// </summary>
public partial class PerforPerAssessSchemeItemsRepository : PerforRepository<per_assess_scheme_items>
{
public PerforPerAssessSchemeItemsRepository(PerformanceDbContext context) : base(context)
{
}
}
}
//-----------------------------------------------------------------------
// <copyright file=" per_assess_scheme.cs">
// * FileName: per_assess_scheme.cs
// </copyright>
//-----------------------------------------------------------------------
using Performance.EntityModels;
namespace Performance.Repository
{
/// <summary>
/// per_assess_scheme Repository
/// </summary>
public partial class PerforPerAssessSchemeRepository : PerforRepository<per_assess_scheme>
{
public PerforPerAssessSchemeRepository(PerformanceDbContext context) : base(context)
{
}
}
}
//-----------------------------------------------------------------------
// <copyright file=" per_assess_scheme_target.cs">
// * FileName: per_assess_scheme_target.cs
// </copyright>
//-----------------------------------------------------------------------
using Performance.EntityModels;
namespace Performance.Repository
{
/// <summary>
/// per_assess_scheme_target Repository
/// </summary>
public partial class PerforPerAssessSchemeTargetRepository : PerforRepository<per_assess_scheme_target>
{
public PerforPerAssessSchemeTargetRepository(PerformanceDbContext context) : base(context)
{
}
}
}
......@@ -2629,6 +2629,5 @@ public string ExcelDownload(List<Dictionary<string, object>> rows, string name,
return filepath;
}
#endregion
}
}
......@@ -741,7 +741,7 @@ public void Copy(per_allot allot)
NewCopy(new CopyRequest()
{
AllotId = allot.ID,
Type = new[] { "personnels", "workItems", "drugTypeDisburses", "drugTypeFactors", "deptTypes", "agains", "accountings", "department", "attendanceType" }
Type = new[] { "personnels", "workItems", "drugTypeDisburses", "drugTypeFactors", "deptTypes", "agains", "accountings", "department", "attendanceType", "assessType" }
});
}
......@@ -769,6 +769,7 @@ public void NewCopy(CopyRequest request)
{ "agains", (allot, prevAllotId) =>_copyService.Copy_Agains(allot, prevAllotId, delHistotyData:true) },
{ "accountings", (allot, prevAllotId) =>_copyService.Copy_Accountings(allot, prevAllotId, delHistotyData:true) },
{ "attendanceType", (allot, prevAllotId) =>_copyService.Copy_AttendanceType(allot, prevAllotId, delHistotyData:true) },
{ "assessType", (allot, prevAllotId) =>_copyService.Copy_AssessType(allot, prevAllotId, delHistotyData:true) },
{ "department", (allot, prevAllotId) =>_copyService.Copy_DeptDic(allot, prevAllotId, delHistotyData:true) },
};
......
......@@ -245,7 +245,7 @@ public string AllComputerDown(sys_hospital hospital, List<dynamic> dynamics, str
{
var temp = data.ElementAt(row);
var low = temp.Keys.ToString().ToLower();
var value = temp[headList[col].Name.ToLower()];
var value = temp.GetValue(headList[col].Name, "");
worksheet.Cells[row + 3, col + 1].Value = value;
}
......
......@@ -4,6 +4,7 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime;
using Performance.DtoModels;
using Performance.DtoModels.AppSettings;
using Performance.EntityModels;
......@@ -184,6 +185,24 @@ public List<SecondListResponse> GetSecondList(int userId)
secondList.AddRange(histroys.Where(w => !sids.Contains(w.Id)));
}
foreach (var item in allotList)
{
if (!secondList.Any(w => w.AllotId == item.ID && w.Year == item.Year && w.Month == item.Month))
{
secondList.Add(new ag_secondallot
{
AllotId = item.ID,
UseTempId = null,
Year = item.Year,
Month = item.Month,
UnitType = unitType.FirstOrDefault(),
Department = userInfo.User.Department,
RealGiveFee = 0,
PreRealGiveFee = 0,
Status = 0,
});
}
}
var list = _mapper.Map<List<SecondListResponse>>(secondList);
// 二次分配只支持单医院
......
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