Commit 45af3feb by Licx

Merge branch 'release/v22.4.18-Beta-wuzhou' into develop

parents 829748d3 56185588
......@@ -10,14 +10,14 @@ public class DeptdicResponse
public int HospitalId { get; set; }
public string HISDeptName { get; set; }
public string Department { get; set; }
public Deptdic OutDoctorAccounting { get; set; }
public Deptdic OutNurseAccounting { get; set; }
public Deptdic OutTechnicAccounting { get; set; }
public Deptdic InpatDoctorAccounting { get; set; }
public Deptdic InpatNurseAccounting { get; set; }
public Deptdic InpatTechnicAccounting { get; set; }
public Deptdic LogisticsAccounting { get; set; }
public Deptdic SpecialAccounting { get; set; }
public Deptdic OutDoctorAccounting { get; set; } = new Deptdic();
public Deptdic OutNurseAccounting { get; set; } = new Deptdic();
public Deptdic OutTechnicAccounting { get; set; } = new Deptdic();
public Deptdic InpatDoctorAccounting { get; set; } = new Deptdic();
public Deptdic InpatNurseAccounting { get; set; } = new Deptdic();
public Deptdic InpatTechnicAccounting { get; set; } = new Deptdic();
public Deptdic LogisticsAccounting { get; set; } = new Deptdic();
public Deptdic SpecialAccounting { get; set; } = new Deptdic();
public DateTime? CreateTime { get; set; }
public int IsVerify { get; set; }
}
......
......@@ -11,6 +11,7 @@
using System.Data;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
namespace Performance.Services.ExtractExcelService
{
......@@ -321,7 +322,32 @@ private List<ExtractTransDto> StandDataFormat(int hospitalId, int allotId, List<
.GroupJoin(dict, outer => new { Department = outer.Department }, inner => new { Department = inner.HISDeptName }, (outer, inner) => new { outer, inner })
.Select(t =>
{
var dept = !string.IsNullOrEmpty(t.inner.FirstOrDefault()?.Department) ? t.inner.FirstOrDefault()?.Department : t.outer.Department;
Func<DeptdicResponse, bool> exp =
t.outer.Source.StartsWith("3.1")
? (e) => !string.IsNullOrEmpty(e.InpatDoctorAccounting.AccountingUnit)
|| !string.IsNullOrEmpty(e.OutDoctorAccounting.AccountingUnit)
|| !string.IsNullOrEmpty(e.InpatTechnicAccounting.AccountingUnit)
|| !string.IsNullOrEmpty(e.OutTechnicAccounting.AccountingUnit)
: (
exp = t.outer.Source.StartsWith("3.2")
? (e) => !string.IsNullOrEmpty(e.InpatNurseAccounting.AccountingUnit) || !string.IsNullOrEmpty(e.OutNurseAccounting.AccountingUnit)
: (e) => true
);
#region 根据sheet区分医生或者护理(暂时不做处理)
//Func<DeptdicResponse, bool> exp =
// exp = (t.outer.Source.Contains("护士") || t.outer.Source.Contains("护理"))
// ? (e) => !string.IsNullOrEmpty(e.InpatNurseAccounting.AccountingUnit) || !string.IsNullOrEmpty(e.OutNurseAccounting.AccountingUnit)
// : (e) => !string.IsNullOrEmpty(e.InpatDoctorAccounting.AccountingUnit)
// || !string.IsNullOrEmpty(e.OutDoctorAccounting.AccountingUnit)
// || !string.IsNullOrEmpty(e.InpatTechnicAccounting.AccountingUnit)
// || !string.IsNullOrEmpty(e.OutTechnicAccounting.AccountingUnit)
// || !string.IsNullOrEmpty(e.SpecialAccounting.AccountingUnit);
#endregion
var dept = !string.IsNullOrEmpty(t.inner.FirstOrDefault(exp)?.Department) ? t.inner.FirstOrDefault(exp)?.Department : t.outer.Department;
if (scripts.Any(w => w.TypeId == t.outer.TypeId && w.IsOrgDepartment == 1))
dept = t.outer.Department;
......
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