Commit 06d34934 by lcx

Merge branch '科室分配' into 单元格修改

# Conflicts:
#	performance/Performance.EntityModels/Entity/im_data.cs
#	performance/Performance.EntityModels/Entity/im_employee.cs
#	performance/Performance.EntityModels/Entity/im_employee_clinic.cs
#	performance/Performance.EntityModels/Entity/im_header.cs
#	performance/Performance.EntityModels/Entity/im_specialunit.cs
parents 2f2e0955 8c41b20b
...@@ -25,6 +25,7 @@ public ConfigController(ConfigService configService, AllotService allotService) ...@@ -25,6 +25,7 @@ public ConfigController(ConfigService configService, AllotService allotService)
_configService = configService; _configService = configService;
_allotService = allotService; _allotService = allotService;
} }
#region 弃用
//#region director //#region director
///// <summary> ///// <summary>
...@@ -81,116 +82,6 @@ public ConfigController(ConfigService configService, AllotService allotService) ...@@ -81,116 +82,6 @@ public ConfigController(ConfigService configService, AllotService allotService)
//} //}
//#endregion //#endregion
#region drugprop
/// <summary>
/// 获取 药占比配置信息列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("drugproplist")]
[HttpPost]
public ApiResponse<List<DrugpropResponse>> GetDrugList([CustomizeValidator(RuleSet = "Select"), FromBody]DrugpropRequest request)
{
var list = _configService.GetDrugList(request.AllotID);
return new ApiResponse<List<DrugpropResponse>>(ResponseType.OK, "ok", list);
}
/// <summary>
/// 新增药占比配置
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("druginsert")]
[HttpPost]
public ApiResponse<DrugpropResponse> DrugInsert([CustomizeValidator(RuleSet = "Insert"), FromBody]DrugpropRequest request)
{
var drugprop = _configService.DrugInsert(request);
return new ApiResponse<DrugpropResponse>(ResponseType.OK, drugprop);
}
/// <summary>
/// 修改药占比配置
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("drugupdate")]
[HttpPost]
public ApiResponse<DrugpropResponse> Update([CustomizeValidator(RuleSet = "Update"), FromBody]DrugpropRequest request)
{
var drugprop = _configService.DrugUpdate(request);
return new ApiResponse<DrugpropResponse>(ResponseType.OK, drugprop);
}
/// <summary>
/// 删除药占比配置
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("drugdelete")]
[HttpPost]
public ApiResponse Delete([CustomizeValidator(RuleSet = "Delete"), FromBody]DrugpropRequest request)
{
if (!_configService.DrugDelete(request))
return new ApiResponse(ResponseType.Fail);
return new ApiResponse(ResponseType.OK);
}
#endregion
#region drugtype
/// <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 //#region income
///// <summary> ///// <summary>
///// 获取ICU有效收入配置列表 ///// 获取ICU有效收入配置列表
...@@ -300,6 +191,117 @@ public ApiResponse DrugtypeDelete([CustomizeValidator(RuleSet = "Delete"), FromB ...@@ -300,6 +191,117 @@ public ApiResponse DrugtypeDelete([CustomizeValidator(RuleSet = "Delete"), FromB
// return new ApiResponse(ResponseType.OK); // return new ApiResponse(ResponseType.OK);
//} //}
//#endregion //#endregion
#endregion
#region drugprop
/// <summary>
/// 获取 药占比配置信息列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("drugproplist")]
[HttpPost]
public ApiResponse<List<DrugpropResponse>> GetDrugList([CustomizeValidator(RuleSet = "Select"), FromBody] DrugpropRequest request)
{
var list = _configService.GetDrugList(request.AllotID);
return new ApiResponse<List<DrugpropResponse>>(ResponseType.OK, "ok", list);
}
/// <summary>
/// 新增药占比配置
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("druginsert")]
[HttpPost]
public ApiResponse<DrugpropResponse> DrugInsert([CustomizeValidator(RuleSet = "Insert"), FromBody] DrugpropRequest request)
{
var drugprop = _configService.DrugInsert(request);
return new ApiResponse<DrugpropResponse>(ResponseType.OK, drugprop);
}
/// <summary>
/// 修改药占比配置
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("drugupdate")]
[HttpPost]
public ApiResponse<DrugpropResponse> Update([CustomizeValidator(RuleSet = "Update"), FromBody] DrugpropRequest request)
{
var drugprop = _configService.DrugUpdate(request);
return new ApiResponse<DrugpropResponse>(ResponseType.OK, drugprop);
}
/// <summary>
/// 删除药占比配置
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("drugdelete")]
[HttpPost]
public ApiResponse Delete([CustomizeValidator(RuleSet = "Delete"), FromBody] DrugpropRequest request)
{
if (!_configService.DrugDelete(request))
return new ApiResponse(ResponseType.Fail);
return new ApiResponse(ResponseType.OK);
}
#endregion
#region drugtype
/// <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 cofagain #region cofagain
/// <summary> /// <summary>
...@@ -309,7 +311,7 @@ public ApiResponse DrugtypeDelete([CustomizeValidator(RuleSet = "Delete"), FromB ...@@ -309,7 +311,7 @@ public ApiResponse DrugtypeDelete([CustomizeValidator(RuleSet = "Delete"), FromB
/// <returns></returns> /// <returns></returns>
[Route("cofagainlist")] [Route("cofagainlist")]
[HttpPost] [HttpPost]
public ApiResponse GetAgainList([CustomizeValidator(RuleSet = "Select"), FromBody]CofAgainRequest request) public ApiResponse GetAgainList([CustomizeValidator(RuleSet = "Select"), FromBody] CofAgainRequest request)
{ {
var list = _configService.GetAgainList(request.AllotID); var list = _configService.GetAgainList(request.AllotID);
return new ApiResponse(ResponseType.OK, "ok", list); return new ApiResponse(ResponseType.OK, "ok", list);
...@@ -322,7 +324,7 @@ public ApiResponse GetAgainList([CustomizeValidator(RuleSet = "Select"), FromBod ...@@ -322,7 +324,7 @@ public ApiResponse GetAgainList([CustomizeValidator(RuleSet = "Select"), FromBod
/// <returns></returns> /// <returns></returns>
[Route("cofagaininsert")] [Route("cofagaininsert")]
[HttpPost] [HttpPost]
public ApiResponse AgainInsert([CustomizeValidator(RuleSet = "Insert"), FromBody]CofAgainRequest request) public ApiResponse AgainInsert([CustomizeValidator(RuleSet = "Insert"), FromBody] CofAgainRequest request)
{ {
var workyear = _configService.AgainInsert(request); var workyear = _configService.AgainInsert(request);
return new ApiResponse(ResponseType.OK, workyear); return new ApiResponse(ResponseType.OK, workyear);
...@@ -335,7 +337,7 @@ public ApiResponse AgainInsert([CustomizeValidator(RuleSet = "Insert"), FromBody ...@@ -335,7 +337,7 @@ public ApiResponse AgainInsert([CustomizeValidator(RuleSet = "Insert"), FromBody
/// <returns></returns> /// <returns></returns>
[Route("cofagainupdate")] [Route("cofagainupdate")]
[HttpPost] [HttpPost]
public ApiResponse AgainUpdate([CustomizeValidator(RuleSet = "Update"), FromBody]CofAgainRequest request) public ApiResponse AgainUpdate([CustomizeValidator(RuleSet = "Update"), FromBody] CofAgainRequest request)
{ {
var workyear = _configService.AgainUpdate(request); var workyear = _configService.AgainUpdate(request);
return new ApiResponse(ResponseType.OK, workyear); return new ApiResponse(ResponseType.OK, workyear);
...@@ -348,7 +350,7 @@ public ApiResponse AgainUpdate([CustomizeValidator(RuleSet = "Update"), FromBody ...@@ -348,7 +350,7 @@ public ApiResponse AgainUpdate([CustomizeValidator(RuleSet = "Update"), FromBody
/// <returns></returns> /// <returns></returns>
[Route("cofagaindelete")] [Route("cofagaindelete")]
[HttpPost] [HttpPost]
public ApiResponse AgainDelete([CustomizeValidator(RuleSet = "Delete"), FromBody]CofAgainRequest request) public ApiResponse AgainDelete([CustomizeValidator(RuleSet = "Delete"), FromBody] CofAgainRequest request)
{ {
if (!_configService.AgainDelete(request)) if (!_configService.AgainDelete(request))
return new ApiResponse(ResponseType.Fail); return new ApiResponse(ResponseType.Fail);
...@@ -364,7 +366,7 @@ public ApiResponse AgainDelete([CustomizeValidator(RuleSet = "Delete"), FromBody ...@@ -364,7 +366,7 @@ public ApiResponse AgainDelete([CustomizeValidator(RuleSet = "Delete"), FromBody
/// <returns></returns> /// <returns></returns>
[Route("workitemlist")] [Route("workitemlist")]
[HttpPost] [HttpPost]
public ApiResponse<List<cof_workitem>> GetWorkItems([CustomizeValidator(RuleSet = "Select"), FromBody]WorkItemRequest request) public ApiResponse<List<cof_workitem>> GetWorkItems([CustomizeValidator(RuleSet = "Select"), FromBody] WorkItemRequest request)
{ {
var list = _configService.GetWorkItems(request.AllotID); var list = _configService.GetWorkItems(request.AllotID);
return new ApiResponse<List<cof_workitem>>(ResponseType.OK, "ok", list); return new ApiResponse<List<cof_workitem>>(ResponseType.OK, "ok", list);
...@@ -377,7 +379,7 @@ public ApiResponse<List<cof_workitem>> GetWorkItems([CustomizeValidator(RuleSet ...@@ -377,7 +379,7 @@ public ApiResponse<List<cof_workitem>> GetWorkItems([CustomizeValidator(RuleSet
/// <returns></returns> /// <returns></returns>
[Route("workiteminsert")] [Route("workiteminsert")]
[HttpPost] [HttpPost]
public ApiResponse<cof_workitem> WorkItemInsert([CustomizeValidator(RuleSet = "Insert"), FromBody]WorkItemRequest request) public ApiResponse<cof_workitem> WorkItemInsert([CustomizeValidator(RuleSet = "Insert"), FromBody] WorkItemRequest request)
{ {
var workyear = _configService.WorkItemInsert(request); var workyear = _configService.WorkItemInsert(request);
return new ApiResponse<cof_workitem>(ResponseType.OK, workyear); return new ApiResponse<cof_workitem>(ResponseType.OK, workyear);
...@@ -390,7 +392,7 @@ public ApiResponse<cof_workitem> WorkItemInsert([CustomizeValidator(RuleSet = "I ...@@ -390,7 +392,7 @@ public ApiResponse<cof_workitem> WorkItemInsert([CustomizeValidator(RuleSet = "I
/// <returns></returns> /// <returns></returns>
[Route("workitemupdate")] [Route("workitemupdate")]
[HttpPost] [HttpPost]
public ApiResponse<cof_workitem> WorkItemUpdate([CustomizeValidator(RuleSet = "Update"), FromBody]WorkItemRequest request) public ApiResponse<cof_workitem> WorkItemUpdate([CustomizeValidator(RuleSet = "Update"), FromBody] WorkItemRequest request)
{ {
var workyear = _configService.WorkItemUpdate(request); var workyear = _configService.WorkItemUpdate(request);
return new ApiResponse<cof_workitem>(ResponseType.OK, workyear); return new ApiResponse<cof_workitem>(ResponseType.OK, workyear);
...@@ -403,7 +405,7 @@ public ApiResponse<cof_workitem> WorkItemUpdate([CustomizeValidator(RuleSet = "U ...@@ -403,7 +405,7 @@ public ApiResponse<cof_workitem> WorkItemUpdate([CustomizeValidator(RuleSet = "U
/// <returns></returns> /// <returns></returns>
[Route("workitemdelete")] [Route("workitemdelete")]
[HttpPost] [HttpPost]
public ApiResponse WorkItemDelete([CustomizeValidator(RuleSet = "Delete"), FromBody]WorkItemRequest request) public ApiResponse WorkItemDelete([CustomizeValidator(RuleSet = "Delete"), FromBody] WorkItemRequest request)
{ {
if (!_configService.WorkItemkDelete(request)) if (!_configService.WorkItemkDelete(request))
return new ApiResponse(ResponseType.Fail); return new ApiResponse(ResponseType.Fail);
...@@ -411,6 +413,61 @@ public ApiResponse WorkItemDelete([CustomizeValidator(RuleSet = "Delete"), FromB ...@@ -411,6 +413,61 @@ public ApiResponse WorkItemDelete([CustomizeValidator(RuleSet = "Delete"), FromB
} }
#endregion #endregion
#region depttype
/// <summary>
/// 获取 药占比类型信息列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("deptlist")]
[HttpPost]
public ApiResponse GetDepttypeList([CustomizeValidator(RuleSet = "Select"), FromBody] DrugpropRequest request)
{
var list = _configService.GetDepttypeList(request.AllotID);
return new ApiResponse(ResponseType.OK, "ok", list);
}
/// <summary>
/// 新增药占比类型
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("deptinsert")]
[HttpPost]
public ApiResponse DepttypeInsert([CustomizeValidator(RuleSet = "Insert"), FromBody] DrugpropRequest request)
{
var drugprop = _configService.DepttypeInsert(request);
return new ApiResponse(ResponseType.OK, drugprop);
}
/// <summary>
/// 修改药占比类型
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("deptupdate")]
[HttpPost]
public ApiResponse DepttypeUpdate([CustomizeValidator(RuleSet = "Update"), FromBody] DrugpropRequest request)
{
var drugprop = _configService.DepttypeUpdate(request);
return new ApiResponse(ResponseType.OK, drugprop);
}
/// <summary>
/// 删除药占比类型
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("deptdelete")]
[HttpPost]
public ApiResponse DepttypeDelete([CustomizeValidator(RuleSet = "Delete"), FromBody] DrugpropRequest request)
{
if (!_configService.DepttypeDelete(request))
return new ApiResponse(ResponseType.Fail);
return new ApiResponse(ResponseType.OK);
}
#endregion
/// <summary> /// <summary>
/// 获取工作量绩效列头 /// 获取工作量绩效列头
/// </summary> /// </summary>
...@@ -418,7 +475,7 @@ public ApiResponse WorkItemDelete([CustomizeValidator(RuleSet = "Delete"), FromB ...@@ -418,7 +475,7 @@ public ApiResponse WorkItemDelete([CustomizeValidator(RuleSet = "Delete"), FromB
/// <returns></returns> /// <returns></returns>
[Route("workheader")] [Route("workheader")]
[HttpPost] [HttpPost]
public ApiResponse WorkHeader([CustomizeValidator(RuleSet = "Select"), FromBody]WorkItemRequest request) public ApiResponse WorkHeader([CustomizeValidator(RuleSet = "Select"), FromBody] WorkItemRequest request)
{ {
var list = _configService.WorkHeader(request.AllotID); var list = _configService.WorkHeader(request.AllotID);
return new ApiResponse(ResponseType.OK, "ok", list); return new ApiResponse(ResponseType.OK, "ok", list);
......
...@@ -54,6 +54,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options) ...@@ -54,6 +54,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
public virtual DbSet<cof_again> cof_again { get; set; } public virtual DbSet<cof_again> cof_again { get; set; }
/// <summary> 上传excel文件校验配置 </summary> /// <summary> 上传excel文件校验配置 </summary>
public virtual DbSet<cof_check> cof_check { get; set; } public virtual DbSet<cof_check> cof_check { get; set; }
/// <summary> 科室类型 </summary>
public virtual DbSet<cof_depttype> cof_depttype { get; set; }
/// <summary> 规模绩效、效率绩效计算系数配置 </summary> /// <summary> 规模绩效、效率绩效计算系数配置 </summary>
public virtual DbSet<cof_director> cof_director { get; set; } public virtual DbSet<cof_director> cof_director { get; set; }
/// <summary> 工作量门诊药占比系数 </summary> /// <summary> 工作量门诊药占比系数 </summary>
......
//-----------------------------------------------------------------------
// <copyright file=" cof_depttype.cs">
// * FileName: 科室类型.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
/// 科室类型
/// </summary>
[Table("cof_depttype")]
public class cof_depttype
{
/// <summary>
///
/// </summary>
[Key]
public int ID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
/// 科室
/// </summary>
public string Charge { get; set; }
/// <summary>
/// 可是分类
/// </summary>
public string ChargeType { get; set; }
}
}
...@@ -205,5 +205,15 @@ public class im_accountbasic ...@@ -205,5 +205,15 @@ public class im_accountbasic
/// 工作量倾斜系数 /// 工作量倾斜系数
/// </summary> /// </summary>
public Nullable<decimal> WorkSlopeFactor { get; set; } public Nullable<decimal> WorkSlopeFactor { get; set; }
/// <summary>
///
/// </summary>
public Nullable<DateTime> UpdateDate { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> UpdateUser { get; set; }
} }
} }
...@@ -96,8 +96,14 @@ public class im_data ...@@ -96,8 +96,14 @@ public class im_data
/// </summary> /// </summary>
public string SignID { get; set; } public string SignID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<DateTime> UpdateDate { get; set; } public Nullable<DateTime> UpdateDate { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> UpdateUser { get; set; } public Nullable<int> UpdateUser { get; set; }
} }
} }
...@@ -126,8 +126,14 @@ public class im_employee ...@@ -126,8 +126,14 @@ public class im_employee
/// </summary> /// </summary>
public Nullable<decimal> Grant { get; set; } public Nullable<decimal> Grant { get; set; }
/// <summary>
///
/// </summary>
public Nullable<DateTime> UpdateDate { get; set; } public Nullable<DateTime> UpdateDate { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> UpdateUser { get; set; } public Nullable<int> UpdateUser { get; set; }
} }
} }
...@@ -131,8 +131,14 @@ public class im_employee_clinic ...@@ -131,8 +131,14 @@ public class im_employee_clinic
/// </summary> /// </summary>
public Nullable<decimal> Grant { get; set; } public Nullable<decimal> Grant { get; set; }
/// <summary>
///
/// </summary>
public Nullable<DateTime> UpdateDate { get; set; } public Nullable<DateTime> UpdateDate { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> UpdateUser { get; set; } public Nullable<int> UpdateUser { get; set; }
} }
} }
...@@ -76,8 +76,14 @@ public class im_header ...@@ -76,8 +76,14 @@ public class im_header
/// </summary> /// </summary>
public Nullable<int> IsTotal { get; set; } public Nullable<int> IsTotal { get; set; }
/// <summary>
///
/// </summary>
public Nullable<DateTime> UpdateDate { get; set; } public Nullable<DateTime> UpdateDate { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> UpdateUser { get; set; } public Nullable<int> UpdateUser { get; set; }
} }
} }
...@@ -81,8 +81,14 @@ public class im_specialunit ...@@ -81,8 +81,14 @@ public class im_specialunit
/// </summary> /// </summary>
public Nullable<decimal> Adjust { get; set; } public Nullable<decimal> Adjust { get; set; }
/// <summary>
///
/// </summary>
public Nullable<DateTime> UpdateDate { get; set; } public Nullable<DateTime> UpdateDate { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> UpdateUser { get; set; } public Nullable<int> UpdateUser { get; set; }
} }
} }
//-----------------------------------------------------------------------
// <copyright file=" cof_depttype.cs">
// * FileName: cof_depttype.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using Performance.EntityModels;
namespace Performance.Repository
{
/// <summary>
/// cof_depttype Repository
/// </summary>
public partial class PerforCofdepttypeRepository : PerforRepository<cof_depttype>
{
public PerforCofdepttypeRepository(PerformanceDbContext context) : base(context)
{
}
}
}
...@@ -26,6 +26,7 @@ public class ConfigService : IAutoInjection ...@@ -26,6 +26,7 @@ public class ConfigService : IAutoInjection
private PerforHospitalRepository perforHospitalRepository; private PerforHospitalRepository perforHospitalRepository;
private PerforPersheetRepository perforPersheetRepository; private PerforPersheetRepository perforPersheetRepository;
private PerforImheaderRepository perforImheaderRepository; private PerforImheaderRepository perforImheaderRepository;
private PerforCofdepttypeRepository perforCofdepttypeRepository;
//private PerforLogdbugRepository logdbug; //private PerforLogdbugRepository logdbug;
private readonly LogManageService logManageService; private readonly LogManageService logManageService;
public ConfigService(PerforCofdirectorRepository cofdirectorRepository, public ConfigService(PerforCofdirectorRepository cofdirectorRepository,
...@@ -40,6 +41,7 @@ public class ConfigService : IAutoInjection ...@@ -40,6 +41,7 @@ public class ConfigService : IAutoInjection
PerforCofworkitemRepository workitemRepository, PerforCofworkitemRepository workitemRepository,
PerforPersheetRepository perforPersheetRepository, PerforPersheetRepository perforPersheetRepository,
PerforImheaderRepository perforImheaderRepository, PerforImheaderRepository perforImheaderRepository,
PerforCofdepttypeRepository perforCofdepttypeRepository,
//PerforLogdbugRepository logdbug //PerforLogdbugRepository logdbug
LogManageService logManageService) LogManageService logManageService)
{ {
...@@ -55,6 +57,7 @@ public class ConfigService : IAutoInjection ...@@ -55,6 +57,7 @@ public class ConfigService : IAutoInjection
this.perforHospitalRepository = perforHospitalRepository; this.perforHospitalRepository = perforHospitalRepository;
this.perforPersheetRepository = perforPersheetRepository; this.perforPersheetRepository = perforPersheetRepository;
this.perforImheaderRepository = perforImheaderRepository; this.perforImheaderRepository = perforImheaderRepository;
this.perforCofdepttypeRepository = perforCofdepttypeRepository;
//this.logdbug = logdbug; //this.logdbug = logdbug;
this.logManageService = logManageService; this.logManageService = logManageService;
} }
...@@ -416,6 +419,69 @@ public bool WorkItemkDelete(WorkItemRequest request) ...@@ -416,6 +419,69 @@ public bool WorkItemkDelete(WorkItemRequest request)
} }
#endregion #endregion
#region cof_depttype 科室别配置
/// <summary>
/// 获取cof_drugprop列表
/// </summary>
/// <returns></returns>
public List<cof_depttype> GetDepttypeList(int allotId)
{
var list = perforCofdepttypeRepository.GetEntities(t => t.AllotID == allotId);
return list;
}
/// <summary>
/// 添加数据
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public cof_depttype DepttypeInsert(DrugpropRequest request)
{
var entity = new cof_depttype
{
AllotID = request.AllotID,
Charge = request.Charge,
ChargeType = request.ChargeType
};
if (!perforCofdepttypeRepository.Add(entity))
throw new PerformanceException("保存失败");
return entity;
}
/// <summary>
/// 更新数据
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public cof_depttype DepttypeUpdate(DrugpropRequest request)
{
var entity = perforCofdepttypeRepository.GetEntity(t => t.ID == request.ID);
if (null == entity)
throw new PerformanceException($"ID不存在 :{request.ID}");
entity.Charge = request.Charge;
entity.ChargeType = request.ChargeType;
if (!perforCofdepttypeRepository.Update(entity))
throw new PerformanceException("保存失败");
return entity;
}
/// <summary>
/// 删除数据
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public bool DepttypeDelete(DrugpropRequest request)
{
var entity = perforCofdepttypeRepository.GetEntity(t => t.ID == request.ID);
if (null == entity)
throw new PerformanceException($"ID不存在 :{request.ID}");
return perforCofdepttypeRepository.Remove(entity);
}
#endregion
#region Copy #region Copy
/// <summary> /// <summary>
/// 复制报表基础配置 /// 复制报表基础配置
...@@ -480,6 +546,15 @@ public void Copy(per_allot allot) ...@@ -480,6 +546,15 @@ public void Copy(per_allot allot)
_drugtypeRepository.AddRange(newAgains.ToArray()); _drugtypeRepository.AddRange(newAgains.ToArray());
} }
var cofDepttype = perforCofdepttypeRepository.GetEntities(t => t.AllotID == allot.ID);
if (cofDepttype == null || cofDepttype.Count == 0)
{
var depttype = perforCofdepttypeRepository.GetEntities(t => t.AllotID == allotId)
?? perforCofdepttypeRepository.GetEntities(t => t.AllotID == -1);
var newAgains = depttype.Select(t => new cof_depttype { AllotID = allot.ID, Charge = t.Charge, ChargeType = t.ChargeType });
perforCofdepttypeRepository.AddRange(newAgains.ToArray());
}
var workItem = _workitemRepository.GetEntities(t => t.AllotID == allot.ID); var workItem = _workitemRepository.GetEntities(t => t.AllotID == allot.ID);
if (hospital != null && hospital?.IsOpenDrugprop == 1 && (workItem == null || workItem.Count == 0)) if (hospital != null && hospital?.IsOpenDrugprop == 1 && (workItem == null || workItem.Count == 0))
{ {
......
...@@ -441,7 +441,7 @@ private void SupplyHeaderByWorkItem(UseTempRequest request, SecondResponse resul ...@@ -441,7 +441,7 @@ private void SupplyHeaderByWorkItem(UseTempRequest request, SecondResponse resul
if (workitem == null || !workitem.Any(t => t.Id > 0)) if (workitem == null || !workitem.Any(t => t.Id > 0))
return; return;
var deptHeader = perforAgworkloadtypeRepository.GetEntities(t => request.HospitalId == t.HospitalId); var deptHeader = perforAgworkloadtypeRepository.GetEntities(t => new List<int> { request.HospitalId, 0 }.Contains(t.HospitalId));
if (deptHeader == null || !deptHeader.Any()) if (deptHeader == null || !deptHeader.Any())
return; return;
...@@ -489,6 +489,14 @@ private void SupplyHeaderByWorkItem(UseTempRequest request, SecondResponse resul ...@@ -489,6 +489,14 @@ private void SupplyHeaderByWorkItem(UseTempRequest request, SecondResponse resul
} }
} }
var defauleHeader = deptHeader.Where(t => t.HospitalId == 0).ToList();
defauleHeader.Add(new ag_workload_type { Id = 2, TypeName = "工作量分配绩效金额" });
foreach (var item in defauleHeader)
{
result.HeadItems.Where(t => t.FiledName == item.TypeName).ToList()?.ForEach(t => t.WorkType = item.Id);
result.BodyItems.Where(t => t.FiledName == item.TypeName).ToList()?.ForEach(t => t.WorkType = item.Id);
}
var rownumber = result.BodyItems.Any(t => t.RowNumber == -1) ? -1 : 0; var rownumber = result.BodyItems.Any(t => t.RowNumber == -1) ? -1 : 0;
foreach (var item in headerItems) foreach (var item in headerItems)
{ {
......
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