Commit 8c88e7dd by lcx

二次绩效详情带出人员工号字段修改、工作量、门诊收入sql修改

parent 8d0ae4b1
...@@ -165,8 +165,8 @@ public IEnumerable<report_original_workload> QueryWorkloadData(int allotid, stri ...@@ -165,8 +165,8 @@ public IEnumerable<report_original_workload> QueryWorkloadData(int allotid, stri
if (connection.State != ConnectionState.Open) connection.Open(); if (connection.State != ConnectionState.Open) connection.Open();
try try
{ {
string clear = @"SELECT DISTINCT t3.AccountingUnit as Department,t1.DoctorName,if(ifnull(t2.PersonnelNumber,'')='', t2.JobNumber, t2.PersonnelNumber) PersonnelNumber,t1.Category,t1.Fee FROM ex_result t1 string clear = @"SELECT DISTINCT t3.AccountingUnit as Department,ifnull(t1.DoctorName, '未知') DoctorName,if(ifnull(t2.PersonnelNumber,'')='', t2.JobNumber, t2.PersonnelNumber) PersonnelNumber,t1.Category,t1.Fee FROM ex_result t1
JOIN per_employee t2 on t1.doctorname = t2.doctorname and t1.personnelnumber = t2.jobnumber LEFT JOIN per_employee t2 on t1.personnelnumber = t2.jobnumber
JOIN (select distinct AccountingUnit,HISDeptName,unittype from per_dept_dic where HospitalId = @hospitalid) t3 ON t1.Department = t3.HISDeptName JOIN (select distinct AccountingUnit,HISDeptName,unittype from per_dept_dic where HospitalId = @hospitalid) t3 ON t1.Department = t3.HISDeptName
WHERE t1.allotid = @allotid WHERE t1.allotid = @allotid
AND t2.allotid = @allotid AND t2.allotid = @allotid
...@@ -195,8 +195,8 @@ public IEnumerable<ex_result> QueryIncomeData(int allotid, string accountingunit ...@@ -195,8 +195,8 @@ public IEnumerable<ex_result> QueryIncomeData(int allotid, string accountingunit
if (connection.State != ConnectionState.Open) connection.Open(); if (connection.State != ConnectionState.Open) connection.Open();
try try
{ {
string clear = @"SELECT DISTINCT t3.AccountingUnit as Department,t1.DoctorName,if(ifnull(t2.PersonnelNumber,'')='', t2.JobNumber, t2.PersonnelNumber) PersonnelNumber,t1.Category,t1.Fee FROM ex_result t1 string clear = @"SELECT DISTINCT t3.AccountingUnit as Department,ifnull(t1.DoctorName, '未知') DoctorName,if(ifnull(t2.PersonnelNumber,'')='', t2.JobNumber, t2.PersonnelNumber) PersonnelNumber,t1.Category,t1.Fee FROM ex_result t1
JOIN per_employee t2 on t1.doctorname = t2.doctorname and t1.personnelnumber = t2.jobnumber LEFT JOIN per_employee t2 on t1.personnelnumber = t2.jobnumber
JOIN (select distinct AccountingUnit,HISDeptName,unittype from per_dept_dic where HospitalId = @hospitalid) t3 ON t1.Department = t3.HISDeptName JOIN (select distinct AccountingUnit,HISDeptName,unittype from per_dept_dic where HospitalId = @hospitalid) t3 ON t1.Department = t3.HISDeptName
WHERE t1.allotid = @allotid WHERE t1.allotid = @allotid
AND t2.allotid = @allotid AND t2.allotid = @allotid
......
...@@ -402,7 +402,7 @@ private List<BodyItem> GetEmployees(List<per_employee> employees, int allotId, i ...@@ -402,7 +402,7 @@ private List<BodyItem> GetEmployees(List<per_employee> employees, int allotId, i
Dictionary<(string, string), Func<per_employee, object>> dict = new Dictionary<(string, string), Func<per_employee, object>> Dictionary<(string, string), Func<per_employee, object>> dict = new Dictionary<(string, string), Func<per_employee, object>>
{ {
{ ("人员工号", "PersonnelNumber"), (t) => t.PersonnelNumber }, { ("人员工号", "PersonnelNumber"), (t) => t.JobNumber },
{ ("姓名", "FullName"), (t) => t.DoctorName }, { ("姓名", "FullName"), (t) => t.DoctorName },
{ ("岗位", "Post"), (t) => !string.IsNullOrEmpty(t.Duty) && (t.Duty.IndexOf("主任") > -1 || t.Duty.IndexOf("护士长") > -1) ? "主任" : "其他" }, { ("岗位", "Post"), (t) => !string.IsNullOrEmpty(t.Duty) && (t.Duty.IndexOf("主任") > -1 || t.Duty.IndexOf("护士长") > -1) ? "主任" : "其他" },
{ ("出勤", "ActualAttendance"), (t) => t.AttendanceDay }, { ("出勤", "ActualAttendance"), (t) => t.AttendanceDay },
......
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