上传文件复制配置bug修改

parent 6e63e344
......@@ -356,12 +356,12 @@ public List<AgainAllotResponse> GetAllotList(int userid)
var hospital = perforUserhospitalRepository.GetEntity(t => t.UserID == userid);
if (hospital == null)
throw new NotImplementedException("人员未选择医院");
var allot = perforPerallotRepository.GetEntities(t => t.HospitalId == hospital.HospitalID && t.CreateUser == userid);
var allot = perforPerallotRepository.GetEntities(t => t.HospitalId == hospital.HospitalID);
if (allot == null)
throw new NotImplementedException("该医院未生成绩效");
var allotId = allot.Select(t => t.ID).ToList();
var again = perforPeragainallotRepository.GetEntities(t => allotId.Contains(t.AllotID.Value) && t.CreateUser == userid);
var again = perforPeragainallotRepository.GetEntities(t => allotId.Contains(t.AllotID.Value) && t.Department == user.Department);
var arrId = again == null ? new List<int>() : again.Select(t => t.AllotID.Value).ToList();
//取得未生成二次绩效的绩效id
var exceptId = allotId.Except(arrId).ToList();
......
......@@ -424,13 +424,15 @@ public void CopyAgain(int againid)
if (list[i].ID == allot.ID && (i - 1) >= 0)
allot = list[i - 1];
}
List<cof_again> record = new List<cof_again>();
//根据上月绩效获取二次绩效信息
var beforeAgain = perforPeragainallotRepository.GetEntity(t => t.AllotID == allot.ID && t.CreateUser == again.CreateUser);
var record = _againRepository.GetEntities(t => t.AgainAllotID == -1);
var beforeAgain = perforPeragainallotRepository.GetEntity(t => t.AllotID == allot.ID);
if (again.AllotID != allot.ID && beforeAgain != null)
record = _againRepository.GetEntities(t => t.AgainAllotID == beforeAgain.ID);
//int days = DateTime.DaysInMonth(allot.Year, allot.Month);
if (record == null || record.Count == 0)
record = _againRepository.GetEntities(t => t.AgainAllotID == -1);
var againList = record.Select(t => new cof_again
{
AllotID = allot.ID,
......
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