Commit a81b9382 by lcx

抽取数据前检查科室、收费类型是否缺失,配置成本收入抽取项时根据sheettype返回相应的数据

parent b4ee3f44
......@@ -44,7 +44,7 @@ public ApiResponse Extract([CustomizeValidator(RuleSet = "Query"), FromBody] Mod
if (request.ExecuteType == null || !request.ExecuteType.Any())
return new ApiResponse(ResponseType.ParameterError, "ExecuteType 不存在,请重新选择!");
var list = configService.ExtractScheme(request.HospitalId.Value, request.ExecuteType);
var list = configService.ExtractScheme(request.HospitalId.Value, request.ExecuteType, request.SheetType);
return new ApiResponse(ResponseType.OK, list);
}
......
......@@ -31,9 +31,8 @@ public class TemplateController : Controller
private readonly WebapiUrl url;
private readonly Application application;
private readonly TemplateService templateService;
private readonly DFExtractService extractService;
private readonly ExtractIncomeService extractIncomeService;
private readonly ExtractService extractEService;
private readonly ExConfigService configService;
private readonly HospitalService hospitalService;
private readonly AllotService allotService;
private readonly LogManageService logService;
......@@ -46,9 +45,8 @@ public class TemplateController : Controller
IOptions<WebapiUrl> url,
IOptions<Application> options,
TemplateService templateService,
DFExtractService extractService,
ExtractIncomeService extractIncomeService,
ExtractService extractEService,
ExConfigService configService,
HospitalService hospitalService,
AllotService allotService,
LogManageService logService,
......@@ -60,9 +58,8 @@ public class TemplateController : Controller
this.url = url.Value;
this.application = options.Value;
this.templateService = templateService;
this.extractService = extractService;
this.extractIncomeService = extractIncomeService;
this.extractEService = extractEService;
this.configService = configService;
this.hospitalService = hospitalService;
this.allotService = allotService;
this.logService = logService;
......@@ -184,7 +181,7 @@ public ApiResponse NewExtractData([CustomizeValidator, FromBody] ExtractRequest
try
{
bool isSingle = false;
string message = extractService.Judge(request.AllotId, request.HospitalId, request.UseScheme, ref isSingle, out string filePath);
string message = configService.Judge(request.AllotId, request.HospitalId, request.UseScheme, ref isSingle, out string filePath);
if (!string.IsNullOrEmpty(message))
return new ApiResponse(ResponseType.Fail, message);
......
......@@ -180,11 +180,11 @@
<summary> 日期 </summary>
</member>
<member name="M:Performance.DtoModels.HandsonTable.SetRowData(System.Collections.Generic.IEnumerable{Performance.DtoModels.HandsonRowData},System.Boolean)">
<summary>
<summary>
</summary>
<param name="datas"></param>
<param name="isTypein">是否是用户录入的 是:true 不是:false</param>
</summary>
<param name="datas"></param>
<param name="isTypein">是否是用户录入的 是:true 不是:false</param>
</member>
<member name="P:Performance.DtoModels.HistoryData.Year">
<summary>
......
......@@ -16,6 +16,7 @@ public class ModExtractController : Controller
{
private readonly ILogger<ModExtractController> logger;
private ExConfigService service;
public ModExtractController(
ILogger<ModExtractController> logger,
ExConfigService service)
......@@ -24,34 +25,38 @@ public class ModExtractController : Controller
this.service = service;
}
/// <summary>
/// 绩效数据抽取模板
/// </summary>
/// <returns></returns>
[Route("scheme")]
[HttpPost]
public ApiResponse Extract([CustomizeValidator(RuleSet = "Query"), FromBody]ModModuleRequest request)
{
if (request.HospitalId == null || request.HospitalId.Value == 0)
return new ApiResponse(ResponseType.ParameterError, "HospitalId 不存在,请重新选择!");
if (request.ExecuteType == null || !request.ExecuteType.Any())
return new ApiResponse(ResponseType.ParameterError, "ExecuteType 不存在,请重新选择!");
#region 弃用
var list = service.ExtractScheme(request.HospitalId.Value, request.ExecuteType);
return new ApiResponse(ResponseType.OK, list);
}
///// <summary>
///// 绩效数据抽取模板
///// </summary>
///// <returns></returns>
//[Route("scheme")]
//[HttpPost]
//public ApiResponse Extract([CustomizeValidator(RuleSet = "Query"), FromBody]ModModuleRequest request)
//{
// if (request.HospitalId == null || request.HospitalId.Value == 0)
// return new ApiResponse(ResponseType.ParameterError, "HospitalId 不存在,请重新选择!");
// if (request.ExecuteType == null || !request.ExecuteType.Any())
// return new ApiResponse(ResponseType.ParameterError, "ExecuteType 不存在,请重新选择!");
/// <summary>
/// 费用类型
/// </summary>
/// <returns></returns>
[Route("type")]
[HttpPost]
public ApiResponse FeeType()
{
var list = service.FeeType();
return new ApiResponse(ResponseType.OK, list);
}
// var list = service.ExtractScheme(request.HospitalId.Value, request.ExecuteType);
// return new ApiResponse(ResponseType.OK, list);
//}
///// <summary>
///// 费用类型
///// </summary>
///// <returns></returns>
//[Route("type")]
//[HttpPost]
//public ApiResponse FeeType()
//{
// var list = service.FeeType();
// return new ApiResponse(ResponseType.OK, list);
//}
#endregion 弃用
/// <summary>
/// 绩效考核项费用来源
......@@ -59,7 +64,7 @@ public ApiResponse FeeType()
/// <returns></returns>
[Route("source")]
[HttpPost]
public ApiResponse FeeSource([FromBody]ModModuleRequest request)
public ApiResponse FeeSource([FromBody] ModModuleRequest request)
{
if (request.HospitalId == null || request.HospitalId.Value == 0)
return new ApiResponse(ResponseType.ParameterError, "HospitalId 参数错误!");
......@@ -75,11 +80,11 @@ public ApiResponse FeeSource([FromBody]ModModuleRequest request)
/// <returns></returns>
[Route("items")]
[HttpPost]
public ApiResponse Items([FromBody]ModItemRequest request)
public ApiResponse Items([FromBody] ModItemRequest request)
{
logger.LogInformation($"绩效收入模板配置项列表:{JsonHelper.Serialize(request)}");
service.AddItems(request.ModuleId.Value);
return new ApiResponse(ResponseType.OK);
}
}
}
\ No newline at end of file
}
......@@ -367,7 +367,7 @@ private List<ex_result> ExtractSpecialData(per_allot allot, string groupName, bo
/// <param name="source"></param>
/// <param name="category"></param>
/// <returns></returns>
private IEnumerable<ExtractDto> QueryData(sys_hospitalconfig config, per_allot allot, string execsql)
public IEnumerable<ExtractDto> QueryData(sys_hospitalconfig config, per_allot allot, string execsql)
{
var parameters = GetParameters(allot);
using (var connection = ConnectionBuilder.Create((DatabaseType)config.DataBaseType, config.DbSource, config.DbName, config.DbUser, config.DbPassword))
......
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