Commit d85d1415 by 钟博

人员字典保存修改,预算管理错误修改

parent 8e927fdb
......@@ -379,7 +379,7 @@ private decimal GetMedicineProportion(int hospitalid, int year, int month)
string sql = @"select ifnull(sum(cellvalue),0) as fee
from report_original_income t1
join cof_drugtype t2 on t1.allotid = t2.allotid and t2.chargetype = '药费'
where hospitalid=@hospitalid and year=@year and month=@month";
where t1.hospitalid=@hospitalid and t1.year=@year and t1.month=@month";
return perbudgetresultRepository.DapperQueryFirstOrDefault<decimal>(sql, new { hospitalid, year, month });
}
///材料支出
......@@ -388,7 +388,7 @@ private decimal GetMaterialCosts(int hospitalid, int year, int month)
string sql = @"select ifnull(sum(cellvalue),0) as fee
from report_original_income t1
join cof_drugtype t2 on t1.allotid = t2.allotid and t2.chargetype = '材料费'
where hospitalid=@hospitalid and year=@year and month=@month";
where t1.hospitalid=@hospitalid and t1.year=@year and t1.month=@month";
return perbudgetresultRepository.DapperQueryFirstOrDefault<decimal>(sql, new { hospitalid, year, month });
}
}
......
......@@ -748,13 +748,14 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
return false;
}
if (persons != null)
if (persons.Any(t => t.PersonnelNumber?.Trim() == data.PersonnelNumber?.Trim())) delPersonsNum.Add(data.PersonnelNumber);
var any = employees.Any(w => w.Department?.Trim() == data.Department?.Trim() && w.DoctorName?.Trim() == data.DoctorName?.Trim());
if (!string.IsNullOrEmpty(data.Department?.Trim()) && !string.IsNullOrEmpty(data.AccountingUnit?.Trim()) && !string.IsNullOrEmpty(data.DoctorName?.Trim()) && !any)
{
if (persons != null)
if (persons.Any(t => t.PersonnelNumber?.Trim() == data.PersonnelNumber?.Trim()))
delPersonsNum.Add(data.PersonnelNumber);
data.HospitalId = HospitalId;
data.AllotId = AllotId;
data.DoctorName = data.DoctorName?.Trim();
......@@ -1135,7 +1136,7 @@ public void SaveQueryRole(int hospitalId, SaveCollectData request)
if (hospital.IsOwnerQuery == 1)
{
var isNewRole = !string.IsNullOrEmpty(data.PersonnelNumber?.Trim()) && !string.IsNullOrEmpty(item["Password"]);
var isRepeat = users != null && users.Any(t => t.RealName == data.DoctorName?.Trim() && t.Login == data.PersonnelNumber?.Trim());
var isRepeat = users != null && users.Any(t => t.Login == data.PersonnelNumber?.Trim());
if (isNewRole && !isRepeat)
{
newUsers.Add(new[] { $"{data.DoctorName?.Trim()}", $"{data.PersonnelNumber?.Trim()}", $"{item["Password"]}", "", "", "绩效查询", $"{hospital.HosName}", $"{data.AccountingUnit?.Trim()}" });
......
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