Commit 7289fd1c by 纪旭 韦

科室字典修改

parent 3df483a5
...@@ -135,7 +135,7 @@ public IActionResult DownloadCurrentCalculationTable([FromRoute] int allotId) ...@@ -135,7 +135,7 @@ public IActionResult DownloadCurrentCalculationTable([FromRoute] int allotId)
[HttpPost] [HttpPost]
public ApiResponse GetDepartments(int hospitalId) public ApiResponse GetDepartments(int hospitalId)
{ {
var list = personService.GetDepartments(hospitalId); var list = personService.GetDepartments(hospitalId, isDefault: false);
return new ApiResponse(ResponseType.OK, list); return new ApiResponse(ResponseType.OK, list);
} }
......
...@@ -420,16 +420,17 @@ private void CheckAccountingDept(int hosapitalId, string accountingUnit, string ...@@ -420,16 +420,17 @@ private void CheckAccountingDept(int hosapitalId, string accountingUnit, string
/// 获取给医院所有的 /// 获取给医院所有的
/// </summary> /// </summary>
/// <param name="hospitalId"></param> /// <param name="hospitalId"></param>
/// <param name="isDefault">未true时住院不存在则默认门诊</param>
/// <returns></returns> /// <returns></returns>
public IEnumerable<DeptdicResponse> GetDepartments(int hospitalId) public IEnumerable<DeptdicResponse> GetDepartments(int hospitalId, bool isDefault = true)
{ {
var depts = perdeptdicRepository.GetEntities(t => t.HospitalId == hospitalId); var depts = perdeptdicRepository.GetEntities(t => t.HospitalId == hospitalId);
if (depts == null || !depts.Any()) return null; if (depts == null || !depts.Any()) return null;
Deptdic GetDeptdic(List<per_dept_dic> dics, string department, string hISDeptName, UnitType unitType, string source = "") Deptdic GetDeptdic(List<per_dept_dic> dics, string department, string hISDeptName, UnitType unitType, string source = null)
{ {
var dic = dics.FirstOrDefault(group => group.Department == department && group.HISDeptName == hISDeptName && group.UnitType == unitType.ToString() && group.Source == source); var dic = dics.FirstOrDefault(group => group.Department == department && group.HISDeptName == hISDeptName && group.UnitType == unitType.ToString() && group.Source == source);
if (dic == null) if (dic == null && isDefault)
dic = dics.FirstOrDefault(group => group.Department == department && group.HISDeptName == hISDeptName && group.UnitType == unitType.ToString()); dic = dics.FirstOrDefault(group => group.Department == department && group.HISDeptName == hISDeptName && group.UnitType == unitType.ToString());
if (dic == null) return new Deptdic() { IsVerify = 1 }; if (dic == null) return new Deptdic() { IsVerify = 1 };
return new Deptdic { Id = dic.Id, AccountingUnit = dic.AccountingUnit, IsVerify = dic.IsVerify ?? 1, VerifyMessage = dic.VerifyMessage, }; return new Deptdic { Id = dic.Id, AccountingUnit = dic.AccountingUnit, IsVerify = dic.IsVerify ?? 1, VerifyMessage = dic.VerifyMessage, };
...@@ -1019,7 +1020,7 @@ private void DeptDicList(int HospitalId, List<per_dept_dic> deptDics, DeptdicHan ...@@ -1019,7 +1020,7 @@ private void DeptDicList(int HospitalId, List<per_dept_dic> deptDics, DeptdicHan
Department = data.Department?.Trim(), Department = data.Department?.Trim(),
HISDeptName = data.HISDeptName?.Trim(), HISDeptName = data.HISDeptName?.Trim(),
CreateTime = nowTime, CreateTime = nowTime,
AccountingUnit = data.LogisticsAccounting?.Trim(), AccountingUnit = data.SpecialAccounting?.Trim(),
UnitType = "特殊核算组" UnitType = "特殊核算组"
}; };
deptDics.Add(deptDic); deptDics.Add(deptDic);
......
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