Commit 2b44bef5 by ruyun.zhang@suvalue.com

Merge branch 'hotfix/9.10打印缺失'

parents 18d994a8 cd6a235b
......@@ -2083,9 +2083,7 @@ public List<SecPrintResponse> Print(int secondId)
//if (computes == null || !computes.Any())
// return new List<SecPrintResponse>();
bool isOtherTemp = second.UseTempId.HasValue && second.UseTempId == 6;
if (isOtherTemp)
if (second.UseTempId.HasValue && second.UseTempId == 6)
{
var data = agothersourceRepository.GetEntities(t => t.SecondId == secondId);
if (data == null || !data.Any()) return new List<SecPrintResponse>();
......@@ -2093,6 +2091,31 @@ public List<SecPrintResponse> Print(int secondId)
var result = Mapper.Map<List<SecPrintResponse>>(data);
return result.OrderBy(t => t.JobNumber).ThenBy(t => t.PersonName).ToList();
}
else if (second.UseTempId.HasValue && (new int[] { 9, 10 }).Contains(second.UseTempId.Value))
{
var data = agbodysourceRepository.GetEntities(t => t.SecondId == secondId);
if (data == null || !data.Any()) return new List<SecPrintResponse>();
var bodyDynamic = agworkloadsourceRepository.GetEntities(t => data.Select(w => w.Id).Contains(t.BodyId));
if (data == null || !data.Any()) return new List<SecPrintResponse>();
var result = data.Select(w => new SecPrintResponse
{
JobNumber = w.WorkNumber,
PersonName = w.Name,
Department = w.Department,
RealAmount = w.RealAmount,
WorkPost = w.Post,
TitlePerfor = w.TitlePerformance,
WorkPerformance = bodyDynamic?.Where(b => b.BodyId == w.Id && b.ItemId.StartsWith("WorkPerformance_")).Sum(b => b.Value) ?? 0,
DeptReward = w.DeptReward,
DistPerformance = w.DistPerformance,
OtherPerformance = w.OtherPerformance,
NightWorkPerformance = w.NightWorkPerformance,
}).ToList();
return result.OrderBy(t => t.JobNumber).ThenBy(t => t.PersonName).ToList();
}
else
{
var itemname = new List<string> { "人员工号", "姓名", "职称", "职称绩效", "工作量绩效工资", "单项奖励小计", "可分配绩效", "医院其他绩效", "夜班工作量绩效" };
......
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