Commit d636d27c by lcx

Merge branch 'v2020morge' into v2020morge-graphql

parents 96ef7e43 08cbd670
...@@ -58,7 +58,6 @@ public AutoMapperConfigs() ...@@ -58,7 +58,6 @@ public AutoMapperConfigs()
CreateMap<AllotResponse, per_allot>(); CreateMap<AllotResponse, per_allot>();
CreateMap<per_allot, AllotResponse>(); CreateMap<per_allot, AllotResponse>();
// sheet 响应 // sheet 响应
CreateMap<SheetResponse, per_sheet>() CreateMap<SheetResponse, per_sheet>()
.ForMember(dest => dest.ID, opt => opt.MapFrom(src => src.SheetID)); .ForMember(dest => dest.ID, opt => opt.MapFrom(src => src.SheetID));
...@@ -125,7 +124,6 @@ public AutoMapperConfigs() ...@@ -125,7 +124,6 @@ public AutoMapperConfigs()
.ForMember(dest => dest.DoctorGrant, opt => opt.MapFrom(src => src.Grant)) .ForMember(dest => dest.DoctorGrant, opt => opt.MapFrom(src => src.Grant))
.ReverseMap(); .ReverseMap();
//CreateMap<im_accountbasic, PerDataAccountBaisc>() //CreateMap<im_accountbasic, PerDataAccountBaisc>()
// .ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => ((UnitType)src.UnitType).ToString())) // .ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => ((UnitType)src.UnitType).ToString()))
// .ForMember(dest => dest.AccountingUnit, opt => opt.MapFrom(src => src.DoctorAccountingUnit)) // .ForMember(dest => dest.AccountingUnit, opt => opt.MapFrom(src => src.DoctorAccountingUnit))
...@@ -162,7 +160,6 @@ public AutoMapperConfigs() ...@@ -162,7 +160,6 @@ public AutoMapperConfigs()
CreateMap<res_account, DeptResponse>(); CreateMap<res_account, DeptResponse>();
//CreateMap<res_account, NurseResponse>(); //CreateMap<res_account, NurseResponse>();
//二次绩效 //二次绩效
CreateMap<ag_header, PerHeader>(); CreateMap<ag_header, PerHeader>();
CreateMap<PerHeader, ag_header>(); CreateMap<PerHeader, ag_header>();
...@@ -222,7 +219,7 @@ public AutoMapperConfigs() ...@@ -222,7 +219,7 @@ public AutoMapperConfigs()
.ReverseMap(); .ReverseMap();
CreateMap<ag_othersource, SecPrintResponse>() CreateMap<ag_othersource, SecPrintResponse>()
.ForMember(dest => dest.WorkPost, opt => opt.MapFrom(src => src.WorkNumber)) .ForMember(dest => dest.JobNumber, opt => opt.MapFrom(src => src.WorkNumber))
.ForMember(dest => dest.PersonName, opt => opt.MapFrom(src => src.Name)) .ForMember(dest => dest.PersonName, opt => opt.MapFrom(src => src.Name))
.ForMember(dest => dest.TitlePerfor, opt => opt.MapFrom(src => src.TitlePerformance)) .ForMember(dest => dest.TitlePerfor, opt => opt.MapFrom(src => src.TitlePerformance))
.ReverseMap(); .ReverseMap();
...@@ -243,7 +240,6 @@ public AutoMapperConfigs() ...@@ -243,7 +240,6 @@ public AutoMapperConfigs()
public void xx() public void xx()
{ {
} }
} }
} }
using AutoMapper; using AutoMapper;
using Microsoft.Extensions.Logging;
using Performance.DtoModels; using Performance.DtoModels;
using Performance.EntityModels; using Performance.EntityModels;
using Performance.Infrastructure;
using Performance.Repository; using Performance.Repository;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -11,6 +13,7 @@ namespace Performance.Services ...@@ -11,6 +13,7 @@ namespace Performance.Services
{ {
public class SecondAllotDetails : IAutoInjection public class SecondAllotDetails : IAutoInjection
{ {
private readonly ILogger<SecondAllotDetails> _logger;
private readonly PerforAgsecondallotRepository agsecondallotRepository; private readonly PerforAgsecondallotRepository agsecondallotRepository;
private readonly PerforAgusetempRepository agusetempRepository; private readonly PerforAgusetempRepository agusetempRepository;
private readonly PerforAgtempitemRepository agtempitemRepository; private readonly PerforAgtempitemRepository agtempitemRepository;
...@@ -25,6 +28,7 @@ public class SecondAllotDetails : IAutoInjection ...@@ -25,6 +28,7 @@ public class SecondAllotDetails : IAutoInjection
private readonly PersonService personService; private readonly PersonService personService;
public SecondAllotDetails( public SecondAllotDetails(
ILogger<SecondAllotDetails> logger,
PerforAgsecondallotRepository agsecondallotRepository, PerforAgsecondallotRepository agsecondallotRepository,
PerforAgusetempRepository agusetempRepository, PerforAgusetempRepository agusetempRepository,
PerforAgtempitemRepository agtempitemRepository, PerforAgtempitemRepository agtempitemRepository,
...@@ -39,6 +43,7 @@ public class SecondAllotDetails : IAutoInjection ...@@ -39,6 +43,7 @@ public class SecondAllotDetails : IAutoInjection
PersonService personService PersonService personService
) )
{ {
_logger = logger;
this.agsecondallotRepository = agsecondallotRepository; this.agsecondallotRepository = agsecondallotRepository;
this.agusetempRepository = agusetempRepository; this.agusetempRepository = agusetempRepository;
this.agtempitemRepository = agtempitemRepository; this.agtempitemRepository = agtempitemRepository;
...@@ -147,6 +152,17 @@ public List<BodyItem> GetBodyItems(int userId, int employeeSource, ag_secondallo ...@@ -147,6 +152,17 @@ public List<BodyItem> GetBodyItems(int userId, int employeeSource, ag_secondallo
if (headItems == null || !headItems.Any()) return bodyItems; if (headItems == null || !headItems.Any()) return bodyItems;
var otherShowColumns = headItems.Where(w => w.Type != (int)TempColumnType.TopFixedColumns)?.ToList();
if (otherShowColumns != null && employeeSource == (int)EmployeeSource.Initial)
{
// 保存过数据,从保存的数据中心带出信息
// 未保存过数据,带入初始数据(首次填写二次绩效,人员信息来自人员字典,有历史二次绩效记录时,人员信息来自上次二次绩效填写记录)
if (savedDataList == null || !savedDataList.Any())
{
employeeSource = prevSecondAllot == null ? (int)EmployeeSource.EmployeeDict : (int)EmployeeSource.PrevSecondAllot;
}
}
var topFixedColumns = headItems.Where(w => w.Type == (int)TempColumnType.TopFixedColumns)?.ToList(); var topFixedColumns = headItems.Where(w => w.Type == (int)TempColumnType.TopFixedColumns)?.ToList();
if (topFixedColumns != null) if (topFixedColumns != null)
{ {
...@@ -162,22 +178,12 @@ public List<BodyItem> GetBodyItems(int userId, int employeeSource, ag_secondallo ...@@ -162,22 +178,12 @@ public List<BodyItem> GetBodyItems(int userId, int employeeSource, ag_secondallo
topFixedData.RowNumber = -1; topFixedData.RowNumber = -1;
topFixedDataList.Add(topFixedData); topFixedDataList.Add(topFixedData);
} }
SupplementFixedData(secondAllot, topFixedDataList); SupplementFixedData(secondAllot, topFixedDataList, prevSecondAllot, employeeSource);
bodyItems.AddRange(topFixedDataList); bodyItems.AddRange(topFixedDataList);
} }
var otherShowColumns = headItems.Where(w => w.Type != (int)TempColumnType.TopFixedColumns)?.ToList();
if (otherShowColumns != null) if (otherShowColumns != null)
{ {
if (employeeSource == (int)EmployeeSource.Initial)
{
// 保存过数据,从保存的数据中心带出信息
// 未保存过数据,带入初始数据(首次填写二次绩效,人员信息来自人员字典,有历史二次绩效记录时,人员信息来自上次二次绩效填写记录)
if (savedDataList == null || !savedDataList.Any())
{
employeeSource = prevSecondAllot == null ? (int)EmployeeSource.EmployeeDict : (int)EmployeeSource.PrevSecondAllot;
}
}
var tableFixedDataList = GetBodyItemsByEmployeeSource(userId, employeeSource, secondAllot, prevSecondAllot, savedDataList, otherShowColumns); var tableFixedDataList = GetBodyItemsByEmployeeSource(userId, employeeSource, secondAllot, prevSecondAllot, savedDataList, otherShowColumns);
bodyItems.AddRange(tableFixedDataList); bodyItems.AddRange(tableFixedDataList);
} }
...@@ -370,7 +376,7 @@ public List<BodyItem> GetEmployeeFromPrevData(int userId, ag_secondallot secondA ...@@ -370,7 +376,7 @@ public List<BodyItem> GetEmployeeFromPrevData(int userId, ag_secondallot secondA
/// </summary> /// </summary>
/// <param name="secondAllot"></param> /// <param name="secondAllot"></param>
/// <param name="bodyItems"></param> /// <param name="bodyItems"></param>
private void SupplementFixedData(ag_secondallot secondAllot, List<BodyItem> bodyItems) private void SupplementFixedData(ag_secondallot secondAllot, List<BodyItem> bodyItems, ag_secondallot prevSecondAllot, int employeeSource)
{ {
if (bodyItems == null || !bodyItems.Any(w => w.RowNumber == -1)) return; if (bodyItems == null || !bodyItems.Any(w => w.RowNumber == -1)) return;
...@@ -381,26 +387,57 @@ private void SupplementFixedData(ag_secondallot secondAllot, List<BodyItem> body ...@@ -381,26 +387,57 @@ private void SupplementFixedData(ag_secondallot secondAllot, List<BodyItem> body
{ "满勤天数", DateTime.DaysInMonth(secondAllot.Year.Value, secondAllot.Month.Value).ToString() }, { "满勤天数", DateTime.DaysInMonth(secondAllot.Year.Value, secondAllot.Month.Value).ToString() },
}; };
var configs = cofagainRepository.GetEntities(t => t.AllotID == secondAllot.AllotId); var pairs = new Dictionary<string, string>
if (configs != null && configs.Any())
{ {
var pairs = new Dictionary<string, string> { "职称绩效", "年资职称绩效占比" },
{ { "工作量绩效", "工作量绩效占比" },
{ "职称绩效", "年资职称绩效占比" }, };
{ "工作量绩效", "工作量绩效占比" },
};
foreach (var config in configs) if (employeeSource == (int)EmployeeSource.PrevSecondAllot)
{
var savedDataList = agfixatitemRepository.GetEntities(w => w.SecondId == prevSecondAllot.Id && w.RowNumber.HasValue && w.RowNumber == -1);
if (savedDataList != null && savedDataList.Any())
{ {
var key = pairs.ContainsKey(config.TypeName) ? pairs[config.TypeName] : config.TypeName; foreach (var item in pairs)
if (!keyValue.Keys.Contains(key)) keyValue.Add(key, config.Value.ToString()); {
var savedData = savedDataList.FirstOrDefault(w => w.Type == (int)TempColumnType.TopFixedColumns && w.ItemName == item.Value);
if (!string.IsNullOrEmpty(savedData?.ItemValue) && !keyValue.Keys.Contains(item.Value))
keyValue.Add(item.Value, savedData.ItemValue);
}
}
}
else if (employeeSource == (int)EmployeeSource.Initial)
{
var savedDataList = agfixatitemRepository.GetEntities(w => w.SecondId == secondAllot.Id && w.RowNumber.HasValue && w.RowNumber == -1);
if (savedDataList != null && savedDataList.Any())
{
foreach (var item in pairs)
{
var savedData = savedDataList.FirstOrDefault(w => w.Type == (int)TempColumnType.TopFixedColumns && w.ItemName == item.Value);
if (!string.IsNullOrEmpty(savedData?.ItemValue) && !keyValue.Keys.Contains(item.Value))
keyValue.Add(item.Value, savedData.ItemValue);
}
}
}
else
{
var configs = cofagainRepository.GetEntities(t => t.AllotID == secondAllot.AllotId);
if (configs != null && configs.Any())
{
foreach (var config in configs)
{
var key = pairs.ContainsKey(config.TypeName) ? pairs[config.TypeName] : config.TypeName;
if (!keyValue.Keys.Contains(key))
keyValue.Add(key, config.Value.ToString());
}
} }
} }
foreach (var item in keyValue) foreach (var item in keyValue)
{ {
var field = bodyItems.FirstOrDefault(w => w.RowNumber == -1 && w.FiledName == item.Key); var field = bodyItems.FirstOrDefault(w => w.RowNumber == -1 && w.FiledName == item.Key);
if (field != null && string.IsNullOrEmpty(field.Value) && !string.IsNullOrEmpty(item.Value)) field.Value = item.Value; if (field != null && !string.IsNullOrEmpty(item.Value))
field.Value = item.Value;
} }
} }
...@@ -425,7 +462,7 @@ private void SupplementOtherPerfor(ag_secondallot secondAllot, List<BodyItem> bo ...@@ -425,7 +462,7 @@ private void SupplementOtherPerfor(ag_secondallot secondAllot, List<BodyItem> bo
if (employee == null) continue; if (employee == null) continue;
var amount = secondAllot.Department == employee.AccountingUnit ? perapramounts var amount = secondAllot.Department == employee.AccountingUnit ? perapramounts
?.Where(w => w.AccountingUnit?.Trim() == secondAllot.Department?.Trim() && w.PersonnelNumber?.Trim() == personnelNumber?.Trim()) ?.Where(w => w.PersonnelNumber?.Trim() == personnelNumber?.Trim())
?.Sum(w => w.Amount) : 0; ?.Sum(w => w.Amount) : 0;
var otherPerfor = rowData.FirstOrDefault(w => w.FiledId == "OtherPerformance"); var otherPerfor = rowData.FirstOrDefault(w => w.FiledId == "OtherPerformance");
...@@ -533,11 +570,9 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is ...@@ -533,11 +570,9 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is
var isSupplementTitlePerformance = savedDataList == null || !savedDataList.Any(); var isSupplementTitlePerformance = savedDataList == null || !savedDataList.Any();
if (employeeSource == (int)EmployeeSource.Initial) if (employeeSource == (int)EmployeeSource.Initial && isSupplementTitlePerformance)
{ {
employeeSource = (savedDataList == null || !savedDataList.Any()) && prevSecondAllot == null employeeSource = prevSecondAllot == null ? (int)EmployeeSource.EmployeeDict : (int)EmployeeSource.PrevSecondAllot;
? (int)EmployeeSource.EmployeeDict
: (int)EmployeeSource.PrevSecondAllot;
} }
if (isArchive == 1 || new List<int> { (int)SecondAllotStatus.WaitReview, (int)SecondAllotStatus.PassAudit }.Contains(secondAllot.Status ?? (int)SecondAllotStatus.Uncommitted)) if (isArchive == 1 || new List<int> { (int)SecondAllotStatus.WaitReview, (int)SecondAllotStatus.PassAudit }.Contains(secondAllot.Status ?? (int)SecondAllotStatus.Uncommitted))
...@@ -584,7 +619,8 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is ...@@ -584,7 +619,8 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is
break; break;
} }
SupplementSecondDetail(secondAllot, employees, result, isSupplementTitlePerformance); var originalEmployees = personService.GetPerEmployee(secondAllot.AllotId.Value);
SupplementSecondDetail(secondAllot, originalEmployees, result, isSupplementTitlePerformance);
return result; return result;
} }
...@@ -598,24 +634,24 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is ...@@ -598,24 +634,24 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is
/// <param name="isTitlePerformance">是否补全职称绩效</param> /// <param name="isTitlePerformance">是否补全职称绩效</param>
private void SupplementSecondDetail(ag_secondallot second, List<per_employee> employees, List<ag_othersource> result, bool isTitlePerformance = true) private void SupplementSecondDetail(ag_secondallot second, List<per_employee> employees, List<ag_othersource> result, bool isTitlePerformance = true)
{ {
if (employees == null || !employees.Any(t => t.UnitType == second.UnitType)) //if (employees == null || !employees.Any(t => t.UnitType == second.UnitType))
return; // return;
// 补充医院其他绩效 及 预留比例 // 补充医院其他绩效 及 预留比例
var perapramounts = perapramountRepository.GetEntities(t => t.AllotId == second.AllotId && t.Status == 3); var perapramounts = perapramountRepository.GetEntities(t => t.AllotId == second.AllotId && t.Status == 3);
Func<per_employee, decimal?> getAprAmount = (t) => second.Department == t.AccountingUnit ? perapramounts Func<per_employee, decimal?> getAprAmount = (t) => second.Department == t.AccountingUnit ? perapramounts
?.Where(w => w.DoctorName?.Trim() == t.DoctorName?.Trim() && w.PersonnelNumber?.Trim() == t.PersonnelNumber?.Trim()) ?.Where(w => w.PersonnelNumber?.Trim() == t.PersonnelNumber?.Trim())
?.Sum(w => w.Amount) : 0; ?.Sum(w => w.Amount) : 0;
var distPerformance = rescomputeRepository.GetEntities(t => t.AllotID == second.AllotId && employees.Select(s => s.DoctorName).Contains(t.EmployeeName)); var distPerformance = rescomputeRepository.GetEntities(t => t.AllotID == second.AllotId && employees.Select(s => s.PersonnelNumber).Contains(t.JobNumber));
Func<per_employee, decimal?> getDistPerformance = (t) => 0; Func<per_employee, decimal?> getDistPerformance = (t) => 0;
if (second.UnitType == UnitType.行政后勤.ToString()) if (second.UnitType == UnitType.行政后勤.ToString())
getDistPerformance = (t) => second.Department == t.AccountingUnit ? distPerformance getDistPerformance = (t) => second.Department == t.AccountingUnit ? distPerformance
?.Where(w => w.EmployeeName?.Trim() == t.DoctorName?.Trim() && w.JobNumber?.Trim() == t.PersonnelNumber?.Trim()) ?.Where(w => w.JobNumber?.Trim() == t.PersonnelNumber?.Trim())
?.Sum(w => w.GiveFee) : 0; ?.Sum(w => w.GiveFee) : 0;
foreach (var item in result) foreach (var item in result)
{ {
var empl = employees.FirstOrDefault(w => w.PersonnelNumber?.Trim() == item.WorkNumber?.Trim() && w.DoctorName?.Trim() == item.Name?.Trim()); var empl = employees.FirstOrDefault(w => w.PersonnelNumber?.Trim() == item.WorkNumber?.Trim());
if (empl != null) if (empl != null)
{ {
item.ReservedRatio = empl.ReservedRatio; item.ReservedRatio = empl.ReservedRatio;
......
...@@ -394,7 +394,7 @@ private List<BodyItem> GetEmployees(List<per_employee> employees, ag_secondallot ...@@ -394,7 +394,7 @@ private List<BodyItem> GetEmployees(List<per_employee> employees, ag_secondallot
var list = new List<BodyItem>(); var list = new List<BodyItem>();
//var employees = personService.GetPersons(allotId, userId); //var employees = personService.GetPersons(allotId, userId);
if (employees == null || !employees.Any(t => t.UnitType == unittype)) return list; //if (employees == null || !employees.Any(t => t.UnitType == unittype)) return list;
var hospital = hospitalRepository.GetEntity(t => t.ID == employees.First().HospitalId); var hospital = hospitalRepository.GetEntity(t => t.ID == employees.First().HospitalId);
if (hospital == null) return list; if (hospital == null) return list;
...@@ -409,7 +409,7 @@ private List<BodyItem> GetEmployees(List<per_employee> employees, ag_secondallot ...@@ -409,7 +409,7 @@ private List<BodyItem> GetEmployees(List<per_employee> employees, ag_secondallot
var perapramounts = perapramountRepository.GetEntities(t => t.AllotId == second.AllotId && t.Status == 3); var perapramounts = perapramountRepository.GetEntities(t => t.AllotId == second.AllotId && t.Status == 3);
Func<per_employee, decimal?> getAprAmount = (t) => second.Department == t.AccountingUnit ? perapramounts Func<per_employee, decimal?> getAprAmount = (t) => second.Department == t.AccountingUnit ? perapramounts
?.Where(w => w.DoctorName?.Trim() == t.DoctorName?.Trim() && w.PersonnelNumber?.Trim() == t.PersonnelNumber?.Trim()) ?.Where(w => w.PersonnelNumber?.Trim() == t.PersonnelNumber?.Trim())
?.Sum(w => w.Amount) : 0; ?.Sum(w => w.Amount) : 0;
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>>
...@@ -1610,24 +1610,24 @@ public List<ag_othersource> OtherAutoComplete(SecondEmpRequest request, int user ...@@ -1610,24 +1610,24 @@ public List<ag_othersource> OtherAutoComplete(SecondEmpRequest request, int user
/// <param name="isTitlePerformance">是否补全职称绩效</param> /// <param name="isTitlePerformance">是否补全职称绩效</param>
private void SupplementSecondDetail(ag_secondallot second, List<per_employee> employees, List<ag_othersource> result, bool isTitlePerformance = true) private void SupplementSecondDetail(ag_secondallot second, List<per_employee> employees, List<ag_othersource> result, bool isTitlePerformance = true)
{ {
if (employees == null || !employees.Any(t => t.UnitType == second.UnitType)) //if (employees == null || !employees.Any(t => t.UnitType == second.UnitType))
return; // return;
// 补充医院其他绩效 及 预留比例 // 补充医院其他绩效 及 预留比例
var perapramounts = perapramountRepository.GetEntities(t => t.AllotId == second.AllotId && t.Status == 3); var perapramounts = perapramountRepository.GetEntities(t => t.AllotId == second.AllotId && t.Status == 3);
Func<per_employee, decimal?> getAprAmount = (t) => second.Department == t.AccountingUnit ? perapramounts Func<per_employee, decimal?> getAprAmount = (t) => second.Department == t.AccountingUnit ? perapramounts
?.Where(w => w.DoctorName?.Trim() == t.DoctorName?.Trim() && w.PersonnelNumber?.Trim() == t.PersonnelNumber?.Trim()) ?.Where(w => w.PersonnelNumber?.Trim() == t.PersonnelNumber?.Trim())
?.Sum(w => w.Amount) : 0; ?.Sum(w => w.Amount) : 0;
var distPerformance = rescomputeRepository.GetEntities(t => t.AllotID == second.AllotId && employees.Select(s => s.DoctorName).Contains(t.EmployeeName)); var distPerformance = rescomputeRepository.GetEntities(t => t.AllotID == second.AllotId && employees.Select(s => s.PersonnelNumber).Contains(t.JobNumber));
Func<per_employee, decimal?> getDistPerformance = (t) => 0; Func<per_employee, decimal?> getDistPerformance = (t) => 0;
if (second.UnitType == UnitType.行政后勤.ToString()) if (second.UnitType == UnitType.行政后勤.ToString())
getDistPerformance = (t) => second.Department == t.AccountingUnit ? distPerformance getDistPerformance = (t) => second.Department == t.AccountingUnit ? distPerformance
?.Where(w => w.EmployeeName?.Trim() == t.DoctorName?.Trim() && w.JobNumber?.Trim() == t.PersonnelNumber?.Trim()) ?.Where(w => w.JobNumber?.Trim() == t.PersonnelNumber?.Trim())
?.Sum(w => w.GiveFee) : 0; ?.Sum(w => w.GiveFee) : 0;
foreach (var item in result) foreach (var item in result)
{ {
var empl = employees.FirstOrDefault(w => w.PersonnelNumber?.Trim() == item.WorkNumber?.Trim() && w.DoctorName?.Trim() == item.Name?.Trim()); var empl = employees.FirstOrDefault(w => w.PersonnelNumber?.Trim() == item.WorkNumber?.Trim());
if (empl != null) if (empl != null)
{ {
item.ReservedRatio = empl.ReservedRatio; item.ReservedRatio = empl.ReservedRatio;
...@@ -1716,7 +1716,7 @@ public List<SecPrintResponse> Print(int secondId) ...@@ -1716,7 +1716,7 @@ public List<SecPrintResponse> Print(int secondId)
var itemname = new List<string> { "人员工号", "姓名", "职称", "职称绩效", "工作量绩效工资", "单项奖励小计", "可分配绩效", "医院其他绩效", "夜班工作量绩效" }; var itemname = new List<string> { "人员工号", "姓名", "职称", "职称绩效", "工作量绩效工资", "单项奖励小计", "可分配绩效", "医院其他绩效", "夜班工作量绩效" };
var fixaitems = perforAgfixatitemRepository.GetEntities(t => t.SecondId == secondId && itemname.Contains(t.ItemName)); var fixaitems = perforAgfixatitemRepository.GetEntities(t => t.SecondId == secondId && itemname.Contains(t.ItemName));
if (fixaitems == null && !fixaitems.Any(t => t.RowNumber.HasValue && t.RowNumber != -1)) return new List<SecPrintResponse>(); if (fixaitems == null || !fixaitems.Any(t => t.RowNumber.HasValue && t.RowNumber != -1)) return new List<SecPrintResponse>();
var rownumbers = fixaitems.Where(t => t.RowNumber.HasValue && t.RowNumber != -1).Select(t => t.RowNumber.Value).Distinct().OrderBy(t => t).ToList(); var rownumbers = fixaitems.Where(t => t.RowNumber.HasValue && t.RowNumber != -1).Select(t => t.RowNumber.Value).Distinct().OrderBy(t => t).ToList();
var result = new List<SecPrintResponse>(); var result = new List<SecPrintResponse>();
...@@ -1762,6 +1762,7 @@ public List<SecondPerforResponse> DeptComputeDetail(int userId, int allotId, out ...@@ -1762,6 +1762,7 @@ public List<SecondPerforResponse> DeptComputeDetail(int userId, int allotId, out
{ application.DirectorRole, AccountUnitType.科主任.ToString() }, { application.DirectorRole, AccountUnitType.科主任.ToString() },
{ application.NurseRole, AccountUnitType.护士长.ToString() }, { application.NurseRole, AccountUnitType.护士长.ToString() },
{ application.OfficeRole, AccountUnitType.行政中层.ToString() }, { application.OfficeRole, AccountUnitType.行政中层.ToString() },
{ application.SpecialRole, AccountUnitType.科主任.ToString() },
}; };
if (!dict.Keys.Contains(role.Type.Value)) return new List<SecondPerforResponse>(); if (!dict.Keys.Contains(role.Type.Value)) return new List<SecondPerforResponse>();
......
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