Commit 2fcf5b0b by 钟博

新增人员字典列头

parent cc23b62f
......@@ -18,4 +18,9 @@ public class PerEmployeeResponse : per_employee
/// </summary>
public new string BirthDate { get; set; }
}
public class PersonePassword : per_employee
{
public string Password { get; set; }
}
}
......@@ -120,5 +120,10 @@ public class sys_hospital
/// 行政后勤是否显示管理绩效按钮 1 是 2 否
/// </summary>
public Nullable<int> IsShowManageButton { get; set; }
/// <summary>
/// 是否开启个人绩效查询账号创建 1 是 2 否
/// </summary>
public Nullable<int> IsOwnerQuery { get; set; }
}
}
......@@ -32,6 +32,7 @@ public class PersonService : IAutoInjection
private readonly PerforUserroleRepository perforUserroleRepository;
private readonly PerforRoleRepository perforRoleRepository;
private readonly PerforAgsecondallotRepository agsecondallotRepository;
private readonly PerforHospitalRepository perforHospitalRepository;
private readonly Application application;
private readonly IHostingEnvironment evn;
......@@ -55,6 +56,7 @@ public class PersonService : IAutoInjection
PerforUserroleRepository perforUserroleRepository,
PerforRoleRepository perforRoleRepository,
PerforAgsecondallotRepository agsecondallotRepository,
PerforHospitalRepository perforHospitalRepository,
IOptions<Application> application,
IHostingEnvironment evn
)
......@@ -67,6 +69,7 @@ IHostingEnvironment evn
this.perforUserroleRepository = perforUserroleRepository;
this.perforRoleRepository = perforRoleRepository;
this.agsecondallotRepository = agsecondallotRepository;
this.perforHospitalRepository = perforHospitalRepository;
this.application = application.Value;
this.evn = evn;
}
......@@ -635,7 +638,7 @@ private string[] GetUnitType(int userId)
public HandsonTable GetBatchPersonStructrue(int hospitalId)
{
var result = new HandsonTable((int)SheetType.Unidentifiable, Person.Select(t => t.Item2).ToArray(), Person.Select(t => new collect_permission
var result = new HandsonTable((int)SheetType.Unidentifiable, PonsePassword.Select(t => t.Item2).ToArray(), PonsePassword.Select(t => new collect_permission
{
HeadName = t.Item2,
Visible = 1
......@@ -720,9 +723,17 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
var dicData = CreateDataRow(request, dict);
List<per_employee> employees = new List<per_employee>();
var persons = peremployeeRepository.GetEntities(t => t.HospitalId == HospitalId && t.AllotId == AllotId);
var hospital = perforHospitalRepository.GetEntity(t => t.ID == HospitalId);
var delPersonsNum = new List<string>();
foreach (var item in dicData)
{
var isNewRole = !string.IsNullOrEmpty(item["PersonnelNumber"]) && !string.IsNullOrEmpty(item["Password"]);
if(hospital.IsOwnerQuery==1 && isNewRole)
{
}
if (!string.IsNullOrEmpty(item["AttendanceDay"]) && !string.IsNullOrEmpty(item["ReservedRatio"]))
{
decimal attendanceDay = ConvertHelper.To<decimal>(item["AttendanceDay"]), reservedRatio = ConvertHelper.To<decimal>(item["ReservedRatio"]);
......@@ -911,6 +922,23 @@ private void DeptDicList(int HospitalId, List<per_dept_dic> deptDics, DeptdicHan
return result;
}
public static List<(string, string, Func<PersonePassword, object>)> PonsePassword { get; } = new List<(string, string, Func<PersonePassword, object>)>
{
(nameof(PersonePassword.AccountingUnit), "核算单元", t => t.AccountingUnit),
(nameof(PersonePassword.Department), "科室名称", t => t.Department),
(nameof(PersonePassword.DoctorName), "姓名" ,t => t.DoctorName),
(nameof(PersonePassword.PersonnelNumber), "员工工号", t => t.PersonnelNumber),
(nameof(PersonePassword.JobCategory), "正式/临聘", t => t.JobCategory),
(nameof(PersonePassword.Duty), "职务", t => t.Duty),
(nameof(PersonePassword.JobTitle), "职称", t => t.JobTitle),
(nameof(PersonePassword.UnitType), "人员类别", t => t.UnitType),
(nameof(PersonePassword.AttendanceDay), "出勤天数", t => t.AttendanceDay),
(nameof(PersonePassword.ReservedRatio), "预留比例", t => t.ReservedRatio),
(nameof(PersonePassword.BankCard), "银行卡号", t => t.BankCard),
(nameof(PersonePassword.Password), "密码", t => t.Password),
(nameof(PersonePassword.Remark), "备注", t => t.Remark),
};
public static List<(string, string, Func<per_employee, object>)> Person { get; } = new List<(string, string, Func<per_employee, object>)>
{
(nameof(per_employee.AccountingUnit), "核算单元", t => t.AccountingUnit),
......
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