二次分配工作量配置下拉内容修改

parent 7198cd26
...@@ -842,6 +842,9 @@ ...@@ -842,6 +842,9 @@
<member name="F:Performance.DtoModels.SheetType.Assess"> <member name="F:Performance.DtoModels.SheetType.Assess">
<summary> 考核 </summary> <summary> 考核 </summary>
</member> </member>
<member name="F:Performance.DtoModels.SheetType.OnlyExtract">
<summary> 抽取数据,不写入 </summary>
</member>
<member name="T:Performance.DtoModels.AccountUnitType"> <member name="T:Performance.DtoModels.AccountUnitType">
<summary> <summary>
核算单元类型 核算单元类型
......
...@@ -261,17 +261,20 @@ public IEnumerable<view_second_workload_result> GetSecondWorkload(int allotid, s ...@@ -261,17 +261,20 @@ public IEnumerable<view_second_workload_result> GetSecondWorkload(int allotid, s
/// <param name="unittype"></param> /// <param name="unittype"></param>
/// <param name="accountingunit"></param> /// <param name="accountingunit"></param>
/// <returns></returns> /// <returns></returns>
public IEnumerable<string> GetSecondWorkloadMaps(int allotid, string unittype, string accountingunit) public IEnumerable<string> GetSecondWorkloadMaps(int hospitalId)
{ {
using (var connection = context.Database.GetDbConnection()) using (var connection = context.Database.GetDbConnection())
{ {
if (connection.State != ConnectionState.Open) connection.Open(); if (connection.State != ConnectionState.Open) connection.Open();
try try
{ {
string query = $@"SELECT DISTINCT Category FROM view_second_workload_his his string query = $@"SELECT DISTINCT Category FROM (
INNER JOIN per_dept_dic dic ON his.HospitalId = dic.HospitalId and his.UnitType = dic.UnitType and his.Department = dic.HISDeptName SELECT IF(Source = 102,EName,ItemName) Category FROM ex_type t1
WHERE AllotId = @allotid AND dic.UnitType = @unittype AND dic.AccountingUnit = @accountingunit"; LEFT JOIN ex_item t2 ON t1.Id = t2.TypeId
return connection.Query<string>(query, new { allotid, unittype, accountingunit }, commandTimeout: 60 * 60); WHERE Source IN (102,7) AND HospitalId = @hospitalId
)TAB
WHERE IFNULL(Category,'')<>''";
return connection.Query<string>(query, new { hospitalId }, commandTimeout: 60 * 60);
} }
catch (Exception ex) catch (Exception ex)
{ {
......
...@@ -1063,7 +1063,10 @@ public List<string> WorkloadMap(int secondId) ...@@ -1063,7 +1063,10 @@ public List<string> WorkloadMap(int secondId)
var second = agsecondallotRepository.GetEntity(t => t.Id == secondId); var second = agsecondallotRepository.GetEntity(t => t.Id == secondId);
if (second == null) throw new PerformanceException("参数错误"); if (second == null) throw new PerformanceException("参数错误");
var worktypes = perallotRepository.GetSecondWorkloadMaps(second.AllotId.Value, second.UnitType, second.Department); var allot = perallotRepository.GetEntity(t => t.ID == second.AllotId);
if (allot == null) throw new PerformanceException("参数错误");
var worktypes = perallotRepository.GetSecondWorkloadMaps(allot.HospitalId);
return (worktypes != null && worktypes.Any()) ? worktypes.ToList() : new List<string>(); return (worktypes != null && worktypes.Any()) ? worktypes.ToList() : new List<string>();
} }
......
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