Commit 0bcf471a by lcx

抽取相关修改

parent 04817020
...@@ -17,11 +17,11 @@ namespace Performance.Api.Controllers ...@@ -17,11 +17,11 @@ namespace Performance.Api.Controllers
[ApiController] [ApiController]
public class ExConfigController : Controller public class ExConfigController : Controller
{ {
private readonly ILogger<ModExtractController> logger; private readonly ILogger<ExConfigController> logger;
private ExConfigService configService; private ExConfigService configService;
private WebapiUrl url; private WebapiUrl url;
public ExConfigController( public ExConfigController(
ILogger<ModExtractController> logger, ILogger<ExConfigController> logger,
ExConfigService configService, ExConfigService configService,
IOptions<WebapiUrl> url) IOptions<WebapiUrl> url)
{ {
......
...@@ -24,8 +24,7 @@ namespace Performance.Api.Controllers ...@@ -24,8 +24,7 @@ namespace Performance.Api.Controllers
public class TemplateController : Controller public class TemplateController : Controller
{ {
private readonly TemplateService templateService; private readonly TemplateService templateService;
private readonly ExtractService extractService; private readonly DFExtractService extractService;
private readonly NewExtractService newExtractService;
private HospitalService hospitalService; private HospitalService hospitalService;
private IHostingEnvironment env; private IHostingEnvironment env;
private ClaimService claim; private ClaimService claim;
...@@ -36,8 +35,7 @@ public class TemplateController : Controller ...@@ -36,8 +35,7 @@ public class TemplateController : Controller
public TemplateController(TemplateService templateService, public TemplateController(TemplateService templateService,
HospitalService hospitalService, HospitalService hospitalService,
ExtractService extractService, DFExtractService extractService,
NewExtractService newExtractService,
IHostingEnvironment env, IHostingEnvironment env,
ClaimService claim, ClaimService claim,
IOptions<Application> options, IOptions<Application> options,
...@@ -47,7 +45,6 @@ public class TemplateController : Controller ...@@ -47,7 +45,6 @@ public class TemplateController : Controller
{ {
this.templateService = templateService; this.templateService = templateService;
this.extractService = extractService; this.extractService = extractService;
this.newExtractService = newExtractService;
this.hospitalService = hospitalService; this.hospitalService = hospitalService;
this.env = env; this.env = env;
this.claim = claim; this.claim = claim;
...@@ -145,66 +142,66 @@ public ApiResponse Import([FromForm] IFormCollection form) ...@@ -145,66 +142,66 @@ public ApiResponse Import([FromForm] IFormCollection form)
} }
#region 老版提取 #region 老版提取
/// <summary> ///// <summary>
/// 提取绩效数据 ///// 提取绩效数据
/// </summary> ///// </summary>
/// <param name="request"></param> ///// <param name="request"></param>
/// <returns></returns> ///// <returns></returns>
[Route("extractdata")] //[Route("extractdata")]
[HttpPost] //[HttpPost]
public ApiResponse ExtractData([CustomizeValidator(RuleSet = "Template"), FromBody]AllotRequest request) //public ApiResponse ExtractData([CustomizeValidator(RuleSet = "Template"), FromBody]AllotRequest request)
{ //{
try // try
{ // {
var allot = allotService.GetAllot(request.ID); // var allot = allotService.GetAllot(request.ID);
if (allot == null) // if (allot == null)
return new ApiResponse(ResponseType.Fail, "该绩效无效"); // return new ApiResponse(ResponseType.Fail, "该绩效无效");
allot.IsExtracting = allot.IsExtracting ?? 0; // allot.IsExtracting = allot.IsExtracting ?? 0;
if (allot.IsExtracting == 1) // if (allot.IsExtracting == 1)
return new ApiResponse(ResponseType.Fail, "正在提取数据,请稍等。"); // return new ApiResponse(ResponseType.Fail, "正在提取数据,请稍等。");
var hospital = hospitalService.GetHopital(request.HospitalId.Value); // var hospital = hospitalService.GetHopital(request.HospitalId.Value);
if (hospital == null) // if (hospital == null)
return new ApiResponse(ResponseType.Fail, "医院无效"); // return new ApiResponse(ResponseType.Fail, "医院无效");
var email = claim.GetUserClaim(JwtClaimTypes.Mail); // var email = claim.GetUserClaim(JwtClaimTypes.Mail);
allot.IsExtracting = 1; // allot.IsExtracting = 1;
allotService.Update(allot); // allotService.Update(allot);
string path = extractService.GetFilepath(hospital.ID, out int type); // string path = extractService.GetFilepath(hospital.ID, out int type);
if (!string.IsNullOrEmpty(path) && type != 0) // if (!string.IsNullOrEmpty(path) && type != 0)
{ // {
//发送请求,返回路径 // //发送请求,返回路径
string retJson = HttpHelper.HttpClient(url.ImportFirst + $"?type={type}&hospitalId={hospital.ID}&year={allot.Year}&month={allot.Month}", path); // string retJson = HttpHelper.HttpClient(url.ImportFirst + $"?type={type}&hospitalId={hospital.ID}&year={allot.Year}&month={allot.Month}", path);
var ret = JsonHelper.Deserialize<ApiResponse>(retJson); // var ret = JsonHelper.Deserialize<ApiResponse>(retJson);
if ((int)ret.State != 1) // if ((int)ret.State != 1)
return new ApiResponse(ResponseType.Fail, "首次模板地址无效!"); // return new ApiResponse(ResponseType.Fail, "首次模板地址无效!");
path = ret.Message; // path = ret.Message;
} // }
string param = JsonHelper.Serialize(new // string param = JsonHelper.Serialize(new
{ // {
id = request.ID, // id = request.ID,
hospitalId = hospital.ID, // hospitalId = hospital.ID,
mail = email, // mail = email,
path = path // path = path
}); // });
HttpHelper.HttpPostNoRequest(url.ExtractData, param, true); // HttpHelper.HttpPostNoRequest(url.ExtractData, param, true);
//extractService.ExtractData(request.ID, user.Mail, hospital); // //extractService.ExtractData(request.ID, user.Mail, hospital);
//BackgroundJob.Enqueue(() => extractService.ExtractData(request.ID, user.Mail, hospital)); // //BackgroundJob.Enqueue(() => extractService.ExtractData(request.ID, user.Mail, hospital));
return new ApiResponse(ResponseType.OK, "HIS绩效数据提取任务正在执行,稍后我们将以邮件的通知您!"); // return new ApiResponse(ResponseType.OK, "HIS绩效数据提取任务正在执行,稍后我们将以邮件的通知您!");
} // }
catch (Exception ex) // catch (Exception ex)
{ // {
var allot = allotService.GetAllot(request.ID); // var allot = allotService.GetAllot(request.ID);
if (allot != null) // if (allot != null)
{ // {
allot.IsExtracting = 3; // allot.IsExtracting = 3;
allotService.Update(allot); // allotService.Update(allot);
} // }
throw ex; // throw ex;
} // }
} //}
#endregion #endregion
#region 新版提取 #region 新版提取
...@@ -223,7 +220,7 @@ public ApiResponse NewExtractData([CustomizeValidator, FromBody]ExtractRequest r ...@@ -223,7 +220,7 @@ public ApiResponse NewExtractData([CustomizeValidator, FromBody]ExtractRequest r
// 判断是那种抽取 // 判断是那种抽取
try try
{ {
string message = newExtractService.Judge(request.AllotId, request.HospitalId, request.UseScheme, out string filePath); string message = extractService.Judge(request.AllotId, request.HospitalId, request.UseScheme, out string filePath);
if (!string.IsNullOrEmpty(message)) if (!string.IsNullOrEmpty(message))
return new ApiResponse(ResponseType.Fail, message); return new ApiResponse(ResponseType.Fail, message);
......
...@@ -21,6 +21,6 @@ public class SpecialListRequest ...@@ -21,6 +21,6 @@ public class SpecialListRequest
public int HospitalId { get; set; } public int HospitalId { get; set; }
/// <summary> 特殊考核项 </summary> /// <summary> 特殊考核项 </summary>
public List<mod_special> Items { get; set; } public List<ex_special> Items { get; set; }
} }
} }
...@@ -30,5 +30,15 @@ public class ag_workload_type ...@@ -30,5 +30,15 @@ public class ag_workload_type
/// ///
/// </summary> /// </summary>
public string TypeName { get; set; } public string TypeName { get; set; }
/// <summary>
/// 科室
/// </summary>
public string Department { get; set; }
/// <summary>
/// 科室类型
/// </summary>
public string UnitType { get; set; }
} }
} }
//-----------------------------------------------------------------------
// <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; }
}
}
...@@ -7,43 +7,53 @@ ...@@ -7,43 +7,53 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels namespace Performance.EntityModels
{ {
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
[Table("ex_result")] [Table("ex_result")]
public class ex_result public class ex_result
{ {
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
[Key] [Key]
public int Id { get; set; } public int Id { get; set; }
/// <summary>
///
/// </summary>
public int AllotId { get; set; }
/// <summary> /// <summary>
/// 科室 /// 科室
/// </summary> /// </summary>
public string Department { get; set; } public string Department { get; set; }
/// <summary> /// <summary>
/// 费用类型 /// 费用类型
/// </summary> /// </summary>
public string Category { get; set; } public string Category { get; set; }
/// <summary> /// <summary>
/// 费用 /// 费用
/// </summary> /// </summary>
public Nullable<decimal> Fee { get; set; } public Nullable<decimal> Fee { get; set; }
/// <summary> /// <summary>
/// 来源 /// 来源
/// </summary> /// </summary>
public int Source { get; set; } public string Source { get; set; }
/// <summary> /// <summary>
/// 数据库类型1、Sql Server 2、Orcale /// 数据库类型1、Sql Server 2、Orcale
/// </summary> /// </summary>
public int DatabaseType { get; set; } public int DatabaseType { get; set; }
/// <summary>
/// 数据库配置Id
/// </summary>
public int ConfigId { get; set; }
} }
} }
//-----------------------------------------------------------------------
// <copyright file=" ex_special.cs">
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
///
/// </summary>
[Table("ex_special")]
public class ex_special
{
/// <summary>
///
/// </summary>
[Key]
public int Id { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> HospitalId { get; set; }
/// <summary>
/// 科室
/// </summary>
public string Department { get; set; }
/// <summary>
/// 量化指标
/// </summary>
public string Target { get; set; }
/// <summary>
/// 量化指标绩效分值
/// </summary>
public Nullable<decimal> TargetFactor { get; set; }
/// <summary>
/// 调节系数
/// </summary>
public Nullable<decimal> AdjustFactor { get; set; }
/// <summary>
/// 抽取绩效值SQL
/// </summary>
public Nullable<int> TypeId { get; set; }
/// <summary>
/// 数据库地址
/// </summary>
public Nullable<int> ConfigId { 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; }
} }
} }
...@@ -95,5 +95,15 @@ public class im_data ...@@ -95,5 +95,15 @@ public class im_data
/// ///
/// </summary> /// </summary>
public string SignID { get; set; } public string SignID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<DateTime> UpdateDate { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> UpdateUser { get; set; }
} }
} }
...@@ -125,5 +125,15 @@ public class im_employee ...@@ -125,5 +125,15 @@ 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; }
/// <summary>
///
/// </summary>
public Nullable<int> UpdateUser { get; set; }
} }
} }
...@@ -130,5 +130,15 @@ public class im_employee_clinic ...@@ -130,5 +130,15 @@ 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; }
/// <summary>
///
/// </summary>
public Nullable<int> UpdateUser { get; set; }
} }
} }
...@@ -75,5 +75,15 @@ public class im_header ...@@ -75,5 +75,15 @@ public class im_header
/// 1 汇总 2原始数据 /// 1 汇总 2原始数据
/// </summary> /// </summary>
public Nullable<int> IsTotal { get; set; } public Nullable<int> IsTotal { get; set; }
/// <summary>
///
/// </summary>
public Nullable<DateTime> UpdateDate { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> UpdateUser { get; set; }
} }
} }
...@@ -80,5 +80,15 @@ public class im_specialunit ...@@ -80,5 +80,15 @@ 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; }
/// <summary>
///
/// </summary>
public Nullable<int> UpdateUser { get; set; }
} }
} }
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
// <copyright file=" mod_extract.cs"> //// <copyright file=" mod_extract.cs">
// * FileName: 医院数据提取脚本.cs //// * FileName: 医院数据提取脚本.cs
// </copyright> //// </copyright>
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
using System; //using System;
using System.ComponentModel.DataAnnotations; //using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; //using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels //namespace Performance.EntityModels
{ //{
/// <summary> // /// <summary>
/// 医院数据提取脚本 // /// 医院数据提取脚本
/// </summary> // /// </summary>
[Table("mod_extract")] // [Table("mod_extract")]
public class mod_extract // public class mod_extract
{ // {
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
[Key] // [Key]
public int Id { get; set; } // public int Id { get; set; }
/// <summary> // /// <summary>
/// 医院ID // /// 医院ID
/// </summary> // /// </summary>
public Nullable<int> HospitalId { get; set; } // public Nullable<int> HospitalId { get; set; }
/// <summary> // /// <summary>
/// 当前脚本提取内容名称 // /// 当前脚本提取内容名称
/// </summary> // /// </summary>
public string EName { get; set; } // public string EName { get; set; }
/// <summary> // /// <summary>
/// 执行脚本 // /// 执行脚本
/// </summary> // /// </summary>
public string ExecuteScript { get; set; } // public string ExecuteScript { get; set; }
/// <summary> // /// <summary>
/// 当前脚本类型 1 收入整表 2 单项数据提取 // /// 当前脚本类型 1 收入整表 2 单项数据提取
/// </summary> // /// </summary>
public Nullable<int> ExecuteType { get; set; } // public Nullable<int> ExecuteType { get; set; }
/// <summary> // /// <summary>
/// 数据库来源类型 1 标准库 2 绩效库 // /// 数据库来源类型 1 标准库 2 绩效库
/// </summary> // /// </summary>
public Nullable<int> SourceType { get; set; } // public Nullable<int> SourceType { get; set; }
/// <summary> // /// <summary>
/// 描述 // /// 描述
/// </summary> // /// </summary>
public string Description { get; set; } // public string Description { get; set; }
/// <summary> // /// <summary>
/// 是否可用 1 可用 2 不可用 // /// 是否可用 1 可用 2 不可用
/// </summary> // /// </summary>
public Nullable<int> IsEnable { get; set; } // public Nullable<int> IsEnable { get; set; }
} // }
} //}
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
// <copyright file=" mod_item.cs"> //// <copyright file=" mod_item.cs">
// * FileName: .cs //// * FileName: .cs
// </copyright> //// </copyright>
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
using System; //using System;
using System.ComponentModel.DataAnnotations; //using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; //using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels //namespace Performance.EntityModels
{ //{
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
[Table("mod_item")] // [Table("mod_item")]
public class mod_item // public class mod_item
{ // {
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
[Key] // [Key]
public int Id { get; set; } // public int Id { get; set; }
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
public Nullable<int> ModuleId { get; set; } // public Nullable<int> ModuleId { get; set; }
/// <summary> // /// <summary>
/// 绩效考核项 // /// 绩效考核项
/// </summary> // /// </summary>
public string ItemName { get; set; } // public string ItemName { get; set; }
/// <summary> // /// <summary>
/// 默认系数或医生系数 // /// 默认系数或医生系数
/// </summary> // /// </summary>
public Nullable<decimal> FactorValue1 { get; set; } // public Nullable<decimal> FactorValue1 { get; set; }
/// <summary> // /// <summary>
/// 护理系数 // /// 护理系数
/// </summary> // /// </summary>
public Nullable<decimal> FactorValue2 { get; set; } // public Nullable<decimal> FactorValue2 { get; set; }
/// <summary> // /// <summary>
/// 医技系数 // /// 医技系数
/// </summary> // /// </summary>
public Nullable<decimal> FactorValue3 { get; set; } // public Nullable<decimal> FactorValue3 { get; set; }
/// <summary> // /// <summary>
/// 抽取绩效值SQL // /// 抽取绩效值SQL
/// </summary> // /// </summary>
public Nullable<int> ExtractId { get; set; } // public Nullable<int> ExtractId { get; set; }
/// <summary> // /// <summary>
/// 数据库地址 // /// 数据库地址
/// </summary> // /// </summary>
public Nullable<int> ConfigId { get; set; } // public Nullable<int> ConfigId { get; set; }
/// <summary> // /// <summary>
/// 用户选定抽取范围 // /// 用户选定抽取范围
/// </summary> // /// </summary>
public string SelectionRange { get; set; } // public string SelectionRange { get; set; }
/// <summary> // /// <summary>
/// 只读 0、否 1、是 // /// 只读 0、否 1、是
/// </summary> // /// </summary>
public Nullable<int> ReadOnly { get; set; } // public Nullable<int> ReadOnly { get; set; }
} // }
} //}
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
// <copyright file=" mod_module.cs"> //// <copyright file=" mod_module.cs">
// * FileName: .cs //// * FileName: .cs
// </copyright> //// </copyright>
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
using System; //using System;
using System.ComponentModel.DataAnnotations; //using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; //using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels //namespace Performance.EntityModels
{ //{
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
[Table("mod_module")] // [Table("mod_module")]
public class mod_module // public class mod_module
{ // {
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
[Key] // [Key]
public int Id { get; set; } // public int Id { get; set; }
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
public Nullable<int> HospitalId { get; set; } // public Nullable<int> HospitalId { get; set; }
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
public Nullable<int> SheetType { get; set; } // public Nullable<int> SheetType { get; set; }
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
public string ModuleName { get; set; } // public string ModuleName { get; set; }
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
public string Description { get; set; } // public string Description { get; set; }
/// <summary> // /// <summary>
/// 提取脚本ID // /// 提取脚本ID
/// </summary> // /// </summary>
public Nullable<int> ExtractId { get; set; } // public Nullable<int> ExtractId { get; set; }
/// <summary> // /// <summary>
/// 数据库地址 // /// 数据库地址
/// </summary> // /// </summary>
public Nullable<int> ConfigId { get; set; } // public Nullable<int> ConfigId { get; set; }
/// <summary> // /// <summary>
/// 只读 0、否 1、是 // /// 只读 0、否 1、是
/// </summary> // /// </summary>
public Nullable<int> ReadOnly { get; set; } // public Nullable<int> ReadOnly { get; set; }
/// <summary> // /// <summary>
/// 是否生成Item 0、否 1、是 // /// 是否生成Item 0、否 1、是
/// </summary> // /// </summary>
public Nullable<int> IsGenerated { get; set; } // public Nullable<int> IsGenerated { get; set; }
} // }
} //}
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
// <copyright file=" mod_special.cs"> //// <copyright file=" mod_special.cs">
// * FileName: .cs //// * FileName: .cs
// </copyright> //// </copyright>
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
using System; //using System;
using System.ComponentModel.DataAnnotations; //using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; //using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels //namespace Performance.EntityModels
{ //{
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
[Table("mod_special")] // [Table("mod_special")]
public class mod_special // public class mod_special
{ // {
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
[Key] // [Key]
public int Id { get; set; } // public int Id { get; set; }
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
public Nullable<int> HospitalId { get; set; } // public Nullable<int> HospitalId { get; set; }
/// <summary> // /// <summary>
/// 科室 // /// 科室
/// </summary> // /// </summary>
public string Department { get; set; } // public string Department { get; set; }
/// <summary> // /// <summary>
/// 量化指标 // /// 量化指标
/// </summary> // /// </summary>
public string Target { get; set; } // public string Target { get; set; }
/// <summary> // /// <summary>
/// 量化指标绩效分值 // /// 量化指标绩效分值
/// </summary> // /// </summary>
public Nullable<decimal> TargetFactor { get; set; } // public Nullable<decimal> TargetFactor { get; set; }
/// <summary> // /// <summary>
/// 调节系数 // /// 调节系数
/// </summary> // /// </summary>
public Nullable<decimal> AdjustFactor { get; set; } // public Nullable<decimal> AdjustFactor { get; set; }
/// <summary> // /// <summary>
/// 抽取绩效值SQL // /// 抽取绩效值SQL
/// </summary> // /// </summary>
public Nullable<int> ExtractId { get; set; } // public Nullable<int> ExtractId { get; set; }
/// <summary> // /// <summary>
/// 数据库地址 // /// 数据库地址
/// </summary> // /// </summary>
public Nullable<int> ConfigId { get; set; } // public Nullable<int> ConfigId { get; set; }
} // }
} //}
...@@ -80,9 +80,9 @@ public class per_allot ...@@ -80,9 +80,9 @@ public class per_allot
/// 是否在抽取数据0 否、1 是、2 抽取成功、3 抽取失败 /// 是否在抽取数据0 否、1 是、2 抽取成功、3 抽取失败
/// </summary> /// </summary>
public Nullable<int> IsExtracting { get; set; } public Nullable<int> IsExtracting { get; set; }
/// <summary> /// <summary>
/// 1、人事科提交重新生成 /// 1、人事科提交重新生成 2、生成成功 3、原始数据修改
/// </summary> /// </summary>
public int Generate { get; set; } public int Generate { get; set; }
......
...@@ -80,7 +80,7 @@ public class sys_hospital ...@@ -80,7 +80,7 @@ public class sys_hospital
/// 是否开启规模/效率绩效 1 启用 2 禁用 /// 是否开启规模/效率绩效 1 启用 2 禁用
/// </summary> /// </summary>
public Nullable<int> IsOpenDirector { get; set; } public Nullable<int> IsOpenDirector { get; set; }
/// <summary> /// <summary>
/// 是否显示绩效合计 1 显示绩效合计 2 显示管理绩效 /// 是否显示绩效合计 1 显示绩效合计 2 显示管理绩效
/// </summary> /// </summary>
......
...@@ -21,24 +21,18 @@ namespace Performance.Extract.Api.Controllers ...@@ -21,24 +21,18 @@ namespace Performance.Extract.Api.Controllers
[Route("api/[controller]")] [Route("api/[controller]")]
public class ExtractController : Controller public class ExtractController : Controller
{ {
private readonly ExtractService extractService; private readonly DFExtractService extractService;
private readonly NewExtractService newExtractService;
private readonly DFExtractService dfExtractService;
private readonly HospitalService hospitalService; private readonly HospitalService hospitalService;
private readonly WebapiUrl url; private readonly WebapiUrl url;
private readonly ILogger<ExtractController> logger; private readonly ILogger<ExtractController> logger;
private readonly IHostingEnvironment evn; private readonly IHostingEnvironment evn;
public ExtractController(ExtractService extractService, public ExtractController(DFExtractService extractService,
NewExtractService newExtractService,
DFExtractService dfExtractService,
HospitalService hospitalService, HospitalService hospitalService,
IOptions<WebapiUrl> url, IOptions<WebapiUrl> url,
ILogger<ExtractController> logger, ILogger<ExtractController> logger,
IHostingEnvironment evn) IHostingEnvironment evn)
{ {
this.extractService = extractService; this.extractService = extractService;
this.newExtractService = newExtractService;
this.dfExtractService = dfExtractService;
this.hospitalService = hospitalService; this.hospitalService = hospitalService;
this.url = url.Value; this.url = url.Value;
this.logger = logger; this.logger = logger;
...@@ -80,34 +74,34 @@ public ApiResponse Import([FromForm] IFormCollection form, int type, int hospita ...@@ -80,34 +74,34 @@ public ApiResponse Import([FromForm] IFormCollection form, int type, int hospita
return new ApiResponse(ResponseType.Error, "获取首次文件失败!"); return new ApiResponse(ResponseType.Error, "获取首次文件失败!");
} }
/// <summary> ///// <summary>
/// 提取数据 ///// 提取数据
/// </summary> ///// </summary>
/// <param name="request"></param> ///// <param name="request"></param>
[HttpPost] //[HttpPost]
[Route("index")] //[Route("index")]
public void Index([FromBody]AllotRequest request) //public void Index([FromBody]AllotRequest request)
{ //{
var token = Guid.NewGuid().ToString("N"); // var token = Guid.NewGuid().ToString("N");
logger.LogInformation(token + ",开始提取数据,请求参数:" + JsonHelper.Serialize(request)); // logger.LogInformation(token + ",开始提取数据,请求参数:" + JsonHelper.Serialize(request));
var hospital = hospitalService.GetHopital(request.HospitalId.Value); // var hospital = hospitalService.GetHopital(request.HospitalId.Value);
var filepath = extractService.ExtractData(request.ID, request.Mail, hospital, request.Path); // var filepath = extractService.ExtractData(request.ID, request.Mail, hospital, request.Path);
if (!string.IsNullOrEmpty(filepath) && FileHelper.IsExistFile(filepath)) // if (!string.IsNullOrEmpty(filepath) && FileHelper.IsExistFile(filepath))
{ // {
int i = 1; // int i = 1;
while (i <= 5) // while (i <= 5)
{ // {
string retJson = HttpHelper.HttpClient(url.ImportFile + $"?allotId={request.ID}&hospitalId={hospital.ID}", filepath); // string retJson = HttpHelper.HttpClient(url.ImportFile + $"?allotId={request.ID}&hospitalId={hospital.ID}", filepath);
logger.LogInformation(retJson); // logger.LogInformation(retJson);
var ret = JsonHelper.Deserialize<ApiResponse>(retJson); // var ret = JsonHelper.Deserialize<ApiResponse>(retJson);
if ((int)ret.State == 1) // if ((int)ret.State == 1)
break; // break;
i++; // i++;
} // }
} // }
logger.LogInformation(token + ",提取结束,请求参数:" + JsonHelper.Serialize(request)); // logger.LogInformation(token + ",提取结束,请求参数:" + JsonHelper.Serialize(request));
} //}
#region 新版提取 #region 新版提取
...@@ -155,7 +149,7 @@ public void ExtractData([FromForm] IFormCollection form, int allotId, int hospit ...@@ -155,7 +149,7 @@ public void ExtractData([FromForm] IFormCollection form, int allotId, int hospit
#endregion #endregion
//string filePath = newExtractService.ExtractData(allotId, request.Email, hospitalId); //string filePath = newExtractService.ExtractData(allotId, request.Email, hospitalId);
string filePath = dfExtractService.ExtractData(allotId, email, hospitalId, path); //抽取 string filePath = extractService.ExtractData(allotId, email, hospitalId, path); //抽取
#region 保存文件到网站下 #region 保存文件到网站下
......
...@@ -15,13 +15,13 @@ namespace Performance.Extract.Api.Controllers ...@@ -15,13 +15,13 @@ namespace Performance.Extract.Api.Controllers
public class ModExtractController : Controller public class ModExtractController : Controller
{ {
private readonly ILogger<ModExtractController> logger; private readonly ILogger<ModExtractController> logger;
private ModExtractService modExtractService; private ExConfigService service;
public ModExtractController( public ModExtractController(
ILogger<ModExtractController> logger, ILogger<ModExtractController> logger,
ModExtractService modExtractService) ExConfigService service)
{ {
this.logger = logger; this.logger = logger;
this.modExtractService = modExtractService; this.service = service;
} }
/// <summary> /// <summary>
...@@ -37,7 +37,7 @@ public ApiResponse Extract([CustomizeValidator(RuleSet = "Query"), FromBody]ModM ...@@ -37,7 +37,7 @@ public ApiResponse Extract([CustomizeValidator(RuleSet = "Query"), FromBody]ModM
if (request.ExecuteType == null || !request.ExecuteType.Any()) if (request.ExecuteType == null || !request.ExecuteType.Any())
return new ApiResponse(ResponseType.ParameterError, "ExecuteType 不存在,请重新选择!"); return new ApiResponse(ResponseType.ParameterError, "ExecuteType 不存在,请重新选择!");
var list = modExtractService.ExtractScheme(request.HospitalId.Value, request.ExecuteType); var list = service.ExtractScheme(request.HospitalId.Value, request.ExecuteType);
return new ApiResponse(ResponseType.OK, list); return new ApiResponse(ResponseType.OK, list);
} }
...@@ -49,7 +49,7 @@ public ApiResponse Extract([CustomizeValidator(RuleSet = "Query"), FromBody]ModM ...@@ -49,7 +49,7 @@ public ApiResponse Extract([CustomizeValidator(RuleSet = "Query"), FromBody]ModM
[HttpPost] [HttpPost]
public ApiResponse FeeType() public ApiResponse FeeType()
{ {
var list = modExtractService.FeeType(); var list = service.FeeType();
return new ApiResponse(ResponseType.OK, list); return new ApiResponse(ResponseType.OK, list);
} }
...@@ -65,7 +65,7 @@ public ApiResponse FeeSource([FromBody]ModModuleRequest request) ...@@ -65,7 +65,7 @@ public ApiResponse FeeSource([FromBody]ModModuleRequest request)
return new ApiResponse(ResponseType.ParameterError, "HospitalId 参数错误!"); return new ApiResponse(ResponseType.ParameterError, "HospitalId 参数错误!");
logger.LogInformation($"请求参数绩效考核项费用来源:{JsonHelper.Serialize(request)}"); logger.LogInformation($"请求参数绩效考核项费用来源:{JsonHelper.Serialize(request)}");
var list = modExtractService.FeeSource(request); var list = service.FeeSource(request);
return new ApiResponse(ResponseType.OK, list); return new ApiResponse(ResponseType.OK, list);
} }
...@@ -78,7 +78,7 @@ public ApiResponse FeeSource([FromBody]ModModuleRequest request) ...@@ -78,7 +78,7 @@ public ApiResponse FeeSource([FromBody]ModModuleRequest request)
public ApiResponse Items([FromBody]ModItemRequest request) public ApiResponse Items([FromBody]ModItemRequest request)
{ {
logger.LogInformation($"绩效收入模板配置项列表:{JsonHelper.Serialize(request)}"); logger.LogInformation($"绩效收入模板配置项列表:{JsonHelper.Serialize(request)}");
modExtractService.AddItems(request.ModuleId.Value); service.AddItems(request.ModuleId.Value);
return new ApiResponse(ResponseType.OK); return new ApiResponse(ResponseType.OK);
} }
} }
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" /> <PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.2.0" /> <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="2.2.0" /> <PackageReference Include="Microsoft.Extensions.Options" Version="2.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" /> <PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
......
//-----------------------------------------------------------------------
// <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)
{
}
}
}
//-----------------------------------------------------------------------
// <copyright file=" ex_special.cs">
// * FileName: ex_special.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using Performance.EntityModels;
namespace Performance.Repository
{
/// <summary>
/// ex_special Repository
/// </summary>
public partial class PerforExspecialRepository : PerforRepository<ex_special>
{
public PerforExspecialRepository(PerformanceDbContext context) : base(context)
{
}
}
}
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
// <copyright file=" mod_extract.cs"> //// <copyright file=" mod_extract.cs">
// * FileName: mod_extract.cs //// * FileName: mod_extract.cs
// </copyright> //// </copyright>
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
using System; //using System;
using Performance.EntityModels; //using Performance.EntityModels;
namespace Performance.Repository //namespace Performance.Repository
{ //{
/// <summary> // /// <summary>
/// mod_extract Repository // /// mod_extract Repository
/// </summary> // /// </summary>
public partial class PerforModextractRepository : PerforRepository<mod_extract> // public partial class PerforModextractRepository : PerforRepository<mod_extract>
{ // {
public PerforModextractRepository(PerformanceDbContext context) : base(context) // public PerforModextractRepository(PerformanceDbContext context) : base(context)
{ // {
} // }
} // }
} //}
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
// <copyright file=" mod_item.cs"> //// <copyright file=" mod_item.cs">
// * FileName: mod_item.cs //// * FileName: mod_item.cs
// </copyright> //// </copyright>
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
using System; //using System;
using Performance.EntityModels; //using Performance.EntityModels;
namespace Performance.Repository //namespace Performance.Repository
{ //{
/// <summary> // /// <summary>
/// mod_item Repository // /// mod_item Repository
/// </summary> // /// </summary>
public partial class PerforModitemRepository : PerforRepository<mod_item> // public partial class PerforModitemRepository : PerforRepository<mod_item>
{ // {
public PerforModitemRepository(PerformanceDbContext context) : base(context) // public PerforModitemRepository(PerformanceDbContext context) : base(context)
{ // {
} // }
} // }
} //}
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
// <copyright file=" mod_module.cs"> //// <copyright file=" mod_module.cs">
// * FileName: mod_module.cs //// * FileName: mod_module.cs
// </copyright> //// </copyright>
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
using System; //using System;
using Performance.EntityModels; //using Performance.EntityModels;
namespace Performance.Repository //namespace Performance.Repository
{ //{
/// <summary> // /// <summary>
/// mod_module Repository // /// mod_module Repository
/// </summary> // /// </summary>
public partial class PerforModmoduleRepository : PerforRepository<mod_module> // public partial class PerforModmoduleRepository : PerforRepository<mod_module>
{ // {
public PerforModmoduleRepository(PerformanceDbContext context) : base(context) // public PerforModmoduleRepository(PerformanceDbContext context) : base(context)
{ // {
} // }
} // }
} //}
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
// <copyright file=" mod_special.cs"> //// <copyright file=" mod_special.cs">
// * FileName: mod_special.cs //// * FileName: mod_special.cs
// </copyright> //// </copyright>
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
using System; //using System;
using Performance.EntityModels; //using Performance.EntityModels;
namespace Performance.Repository //namespace Performance.Repository
{ //{
/// <summary> // /// <summary>
/// mod_special Repository // /// mod_special Repository
/// </summary> // /// </summary>
public partial class PerforModspecialRepository : PerforRepository<mod_special> // public partial class PerforModspecialRepository : PerforRepository<mod_special>
{ // {
public PerforModspecialRepository(PerformanceDbContext context) : base(context) // public PerforModspecialRepository(PerformanceDbContext context) : base(context)
{ // {
} // }
} // }
} //}
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -19,7 +19,7 @@ public class ExConfigService : IAutoInjection ...@@ -19,7 +19,7 @@ public class ExConfigService : IAutoInjection
private readonly PerforExscriptRepository exscriptRepository; private readonly PerforExscriptRepository exscriptRepository;
private readonly PerforExmoduleRepository exmoduleRepository; private readonly PerforExmoduleRepository exmoduleRepository;
private readonly PerforExitemRepository exitemRepository; private readonly PerforExitemRepository exitemRepository;
private readonly PerforModspecialRepository modspecialRepository; private readonly PerforExspecialRepository exspecialRepository;
private readonly PerforPerallotRepository perallotRepository; private readonly PerforPerallotRepository perallotRepository;
private readonly PerforHospitalconfigRepository hospitalconfigRepository; private readonly PerforHospitalconfigRepository hospitalconfigRepository;
private readonly PerforExtractRepository extractRepository; private readonly PerforExtractRepository extractRepository;
...@@ -30,7 +30,7 @@ public class ExConfigService : IAutoInjection ...@@ -30,7 +30,7 @@ public class ExConfigService : IAutoInjection
PerforExscriptRepository exscriptRepository, PerforExscriptRepository exscriptRepository,
PerforExmoduleRepository exmoduleRepository, PerforExmoduleRepository exmoduleRepository,
PerforExitemRepository exitemRepository, PerforExitemRepository exitemRepository,
PerforModspecialRepository modspecialRepository, PerforExspecialRepository exspecialRepository,
PerforPerallotRepository perallotRepository, PerforPerallotRepository perallotRepository,
PerforHospitalconfigRepository hospitalconfigRepository, PerforHospitalconfigRepository hospitalconfigRepository,
PerforExtractRepository extractRepository, PerforExtractRepository extractRepository,
...@@ -41,7 +41,7 @@ public class ExConfigService : IAutoInjection ...@@ -41,7 +41,7 @@ public class ExConfigService : IAutoInjection
this.exscriptRepository = exscriptRepository; this.exscriptRepository = exscriptRepository;
this.exmoduleRepository = exmoduleRepository; this.exmoduleRepository = exmoduleRepository;
this.exitemRepository = exitemRepository; this.exitemRepository = exitemRepository;
this.modspecialRepository = modspecialRepository; this.exspecialRepository = exspecialRepository;
this.perallotRepository = perallotRepository; this.perallotRepository = perallotRepository;
this.hospitalconfigRepository = hospitalconfigRepository; this.hospitalconfigRepository = hospitalconfigRepository;
this.extractRepository = extractRepository; this.extractRepository = extractRepository;
...@@ -185,9 +185,9 @@ public void DelModule(int moduleId) ...@@ -185,9 +185,9 @@ public void DelModule(int moduleId)
} }
else else
{ {
var specialList = modspecialRepository.GetEntities(t => t.HospitalId == entity.HospitalId); var specialList = exspecialRepository.GetEntities(t => t.HospitalId == entity.HospitalId);
if (specialList != null && specialList.Any()) if (specialList != null && specialList.Any())
modspecialRepository.RemoveRange(specialList.ToArray()); exspecialRepository.RemoveRange(specialList.ToArray());
} }
} }
...@@ -254,9 +254,9 @@ public void DelItem(int itemId) ...@@ -254,9 +254,9 @@ public void DelItem(int itemId)
/// 特殊科室模板配置项列表 /// 特殊科室模板配置项列表
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public List<mod_special> QuerySpecial(int hospitalId) public List<ex_special> QuerySpecial(int hospitalId)
{ {
var list = modspecialRepository.GetEntities(t => t.HospitalId == hospitalId); var list = exspecialRepository.GetEntities(t => t.HospitalId == hospitalId);
return list; return list;
} }
...@@ -264,11 +264,11 @@ public List<mod_special> QuerySpecial(int hospitalId) ...@@ -264,11 +264,11 @@ public List<mod_special> QuerySpecial(int hospitalId)
/// 特殊科室模板配置项新增 /// 特殊科室模板配置项新增
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public List<mod_special> AddSpecial(SpecialListRequest request) public List<ex_special> AddSpecial(SpecialListRequest request)
{ {
var list = request.Items; var list = request.Items;
list.ForEach(t => t.HospitalId = request.HospitalId); list.ForEach(t => t.HospitalId = request.HospitalId);
if (!modspecialRepository.AddRange(list.ToArray())) if (!exspecialRepository.AddRange(list.ToArray()))
throw new PerformanceException("添加失败!"); throw new PerformanceException("添加失败!");
return list; return list;
...@@ -278,9 +278,9 @@ public List<mod_special> AddSpecial(SpecialListRequest request) ...@@ -278,9 +278,9 @@ public List<mod_special> AddSpecial(SpecialListRequest request)
/// 特殊科室模板配置项修改 /// 特殊科室模板配置项修改
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public mod_special EditSpecial(mod_special entity) public ex_special EditSpecial(ex_special entity)
{ {
var special = modspecialRepository.GetEntity(t => t.Id == entity.Id); var special = exspecialRepository.GetEntity(t => t.Id == entity.Id);
if (special == null) if (special == null)
throw new PerformanceException("选择修改的数据不存在!"); throw new PerformanceException("选择修改的数据不存在!");
...@@ -288,9 +288,9 @@ public mod_special EditSpecial(mod_special entity) ...@@ -288,9 +288,9 @@ public mod_special EditSpecial(mod_special entity)
special.Target = entity.Target; special.Target = entity.Target;
special.TargetFactor = entity.TargetFactor; special.TargetFactor = entity.TargetFactor;
special.AdjustFactor = entity.AdjustFactor; special.AdjustFactor = entity.AdjustFactor;
special.ExtractId = entity.ExtractId; special.TypeId = entity.TypeId;
special.ConfigId = entity.ConfigId; special.ConfigId = entity.ConfigId;
if (!modspecialRepository.Update(special)) if (!exspecialRepository.Update(special))
throw new PerformanceException("修改失败!"); throw new PerformanceException("修改失败!");
return special; return special;
...@@ -302,11 +302,11 @@ public mod_special EditSpecial(mod_special entity) ...@@ -302,11 +302,11 @@ public mod_special EditSpecial(mod_special entity)
/// <returns></returns> /// <returns></returns>
public void DelSpecial(int specialId) public void DelSpecial(int specialId)
{ {
var special = modspecialRepository.GetEntity(t => t.Id == specialId); var special = exspecialRepository.GetEntity(t => t.Id == specialId);
if (special == null) if (special == null)
throw new PerformanceException("需要删除的项不存在!"); throw new PerformanceException("需要删除的项不存在!");
modspecialRepository.Remove(special); exspecialRepository.Remove(special);
} }
#endregion #endregion
...@@ -472,26 +472,51 @@ public List<TitleValue> FeeType() ...@@ -472,26 +472,51 @@ public List<TitleValue> FeeType()
return titlevalue; return titlevalue;
} }
public enum ExtractResultClassify /// <summary>
/// 绩效考核项费用来源
/// </summary>
/// <returns></returns>
public ModFeeResponse FeeSource(ModModuleRequest request)
{ {
[Description("门诊开单")] var configList = hospitalconfigRepository.GetEntities(t => t.HospitalId == request.HospitalId);
OutIncome = 1, if (configList != null && configList.Any())
[Description("门诊执行")] {
OutExecIncome = 2, var hospitalConfig = configList.First();
[Description("住院开单")] var connection = ConnectionBuilder.Create(DatabaseType.SqlServer, hospitalConfig.DbSource, hospitalConfig.DbName, hospitalConfig.DbUser, hospitalConfig.DbPassword);
InpatIncome = 3, int pagesize = 500, pagenum = 0;
[Description("住院执行")] if (request.PageNum != 0)
InpatExecIncome = 4, pagenum = request.PageNum - 1;
[Description("额外收入")] if (request.PageSize >= 500 && request.PageSize <= 10000)
OtherIncome = 5, pagesize = request.PageSize;
[Description("支出")]
Expend = 6, string sql = $"select top {pagesize} t1.* from (select row_number() over(order by charge_name) as rownumber,* from (select min(code) code,charge_name from dic_fee where charge_name is not null and charge_name != '' group by charge_name)t )t1 where rownumber> {pagenum} * {pagesize};";
[Description("医生工作量")] var dataList = extractRepository.ExecuteScript(connection, sql, null);
DoctorWorkload = 7, if (dataList != null && dataList.Any())
[Description("护理工作量")] {
NurseWorkload = 8, var list = new List<TitleValue>();
[Description("特殊核算科室")] foreach (var num in dataList.Select(t => t.RowNumber).Distinct())
SpecialUnit = 7, {
var data = new TitleValue
{
Title = dataList.First(t => t.RowNumber == num && t.ColumnName.ToLower() == "charge_name").Value.ToString(),
Value = dataList.First(t => t.RowNumber == num && t.ColumnName.ToLower() == "code").Value.ToString(),
};
list.Add(data);
}
sql = $"select count(*) num from (select min(code) code,charge_name from dic_fee where charge_name is not null and charge_name != '' group by charge_name)t ;";
connection = ConnectionBuilder.Create(DatabaseType.SqlServer, hospitalConfig.DbSource, hospitalConfig.DbName, hospitalConfig.DbUser, hospitalConfig.DbPassword);
dataList = extractRepository.ExecuteScript(connection, sql, null);
return new ModFeeResponse
{
Total = (int)dataList.FirstOrDefault().Value,
PageNum = pagenum + 1,
PageSize = pagesize,
Data = list
};
}
}
return new ModFeeResponse();
} }
} }
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment