BUG修复

parent 164745ef
......@@ -70,7 +70,7 @@ public AutoMapperConfigs()
CreateMap<PerData, im_data>()
.ForMember(dest => dest.IsFactor, opt => opt.MapFrom(src => src.IsFactor ? 1 : 2))
.ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => EnumHelper.GetItems<UnitType>().FirstOrDefault(t => t.Name == src.UnitType).Value));
.ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => EnumHelper.GetItems<UnitType>().FirstOrDefault(t => t.Name == src.UnitType.Replace("行政工勤", "行政后勤")).Value));
CreateMap<im_header, PerHeader>()
.ForMember(dest => dest.IsMerge, opt => opt.MapFrom(src => src.IsMerge == 1 ? true : false));
......@@ -108,7 +108,7 @@ public AutoMapperConfigs()
//CreateMap<PerDataAccountBaisc, im_accountbasic>();
//CreateMap<im_accountbasic, PerDataAccountBaisc>();
CreateMap<PerDataAccountBaisc, im_accountbasic>()
.ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => EnumHelper.GetItems<UnitType>().First(t => t.Name == src.UnitType).Value))
.ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => EnumHelper.GetItems<UnitType>().First(t => t.Name == src.UnitType.Replace("行政工勤", "行政后勤")).Value))
.ForMember(dest => dest.DoctorAccountingUnit, opt => opt.MapFrom(src => src.AccountingUnit))
//.ForMember(dest => dest.Department, opt => opt.MapFrom(src => src.Department))
.ForMember(dest => dest.DoctorDirectorNumber, opt => opt.MapFrom(src => src.ManagerNumber))
......@@ -150,7 +150,7 @@ public AutoMapperConfigs()
CreateMap<res_account, PerDataAccountBaisc>()
.ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => src.UnitType.HasValue ? ((UnitType)src.UnitType).ToString() : ""));
CreateMap<PerDataAccountBaisc, res_account>()
.ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => string.IsNullOrEmpty(src.UnitType) ? -1 : EnumHelper.GetItems<UnitType>().First(t => t.Name == src.UnitType).Value));
.ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => string.IsNullOrEmpty(src.UnitType) ? -1 : EnumHelper.GetItems<UnitType>().First(t => t.Name == src.UnitType.Replace("行政工勤", "行政后勤")).Value));
//CreateMap<PerDataAccountBaisc, res_accountnurse>();
//CreateMap<res_accountdoctor, ComputeSource>();
......@@ -230,5 +230,10 @@ public AutoMapperConfigs()
CreateMap<res_compute, SecondPerforResponse>()
.ReverseMap();
}
public void xx()
{
}
}
}
......@@ -479,13 +479,14 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
};
decimal? baiscnorm = compute?.FitPeopleValue ?? 0;
if (compute?.FitPeopleValue == 0)
if (baiscnorm == 0)
{
var perforTypeItem = perforTypeArray.FirstOrDefault(t => t.Description == item.FitPeople);
if (perforTypeItem != null)
{
var perforType = (PerforType)perforTypeItem.Value;
baiscnorm = item.FitPeopleValue ?? baiscNormService.GetBaiscNorm(baiscnormList, perforType);
compute.FitPeopleValue = baiscnorm;
}
}
// 行政高层 行政中层 夜班费
......
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