Commit 378f2bec by lcx

Merge branch 'hotfix/显式管理绩效按钮'

parents 0dfb30cc 90b1cef8
......@@ -8,7 +8,7 @@
},
"AppConnection": {
//"PerformanceConnectionString": "server=112.124.13.17;database=db_performance;uid=suvalue;pwd=suvalue2016;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;",
"PerformanceConnectionString": "server=192.168.18.166;database=db_performance_screen;uid=root;pwd=1234qwer;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;",
"PerformanceConnectionString": "server=192.168.18.166;database=db_test_wujiang;uid=root;pwd=1234qwer;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;",
"HangfireConnectionString": "server=192.168.18.166;database=db_hangfire;uid=root;pwd=1234qwer;port=3306;allow user variables=true;",
"RedisConnectionString": "116.62.245.55:6379,defaultDatabase=2"
},
......
......@@ -1831,7 +1831,7 @@
</member>
<member name="P:Performance.DtoModels.AccoungingRequest.Type">
<summary>
1 返回accounting列表 2 返回核算单元类型 3 返回核算单元
1 返回accounting列表 2 返回核算单元 3 返回核算单元类型
</summary>
</member>
<member name="P:Performance.DtoModels.AccoungingRequest.UnitType">
......@@ -2221,6 +2221,11 @@
是否开启科室CMI占比 1 启用 2 禁用
</summary>
</member>
<member name="P:Performance.DtoModels.HospitalRequest.IsShowManageButton">
<summary>
行政后勤是否显示管理绩效按钮 1 是 2 否
</summary>
</member>
<member name="P:Performance.DtoModels.IncomeRequest.SheetNameKeyword">
<summary>
关键字匹配
......@@ -2915,6 +2920,11 @@
</summary>
</member>
<member name="P:Performance.DtoModels.ComputeResponse.BankCard">
<summary>
银行卡号
</summary>
</member>
<member name="P:Performance.DtoModels.DeptDataDetails`1.Pandect">
<summary> 概览</summary>
</member>
......@@ -3229,6 +3239,11 @@
是否开启行政后勤二次绩效分配 1 启用 2 禁用
</summary>
</member>
<member name="P:Performance.DtoModels.HospitalResponse.IsShowManageButton">
<summary>
行政后勤是否显示管理绩效按钮 1 是 2 否
</summary>
</member>
<member name="P:Performance.DtoModels.IncomeResponse.SheetNameKeyword">
<summary>
关键字匹配
......
......@@ -4961,6 +4961,11 @@
预留比例
</summary>
</member>
<member name="P:Performance.EntityModels.per_employee.BankCard">
<summary>
银行卡号
</summary>
</member>
<member name="P:Performance.EntityModels.per_employee.Remark">
<summary>
备注
......@@ -6891,6 +6896,11 @@
抽取项目是否在同一环境 1 是 2 否
</summary>
</member>
<member name="P:Performance.EntityModels.sys_hospital.IsShowManageButton">
<summary>
行政后勤是否显示管理绩效按钮 1 是 2 否
</summary>
</member>
<member name="T:Performance.EntityModels.sys_hospitalconfig">
<summary>
......
......@@ -64,6 +64,11 @@ public class HospitalRequest
///// 是否开启行政后勤二次绩效分配 1 启用 2 禁用
///// </summary>
//public Nullable<int> IsOpenLogisticsSecondAllot { get; set; }
/// <summary>
/// 行政后勤是否显示管理绩效按钮 1 是 2 否
/// </summary>
public Nullable<int> IsShowManageButton { get; set; }
}
public class HospitalRequestValidator : AbstractValidator<HospitalRequest>
......
......@@ -32,5 +32,10 @@ public class HospitalResponse
/// 是否开启行政后勤二次绩效分配 1 启用 2 禁用
/// </summary>
public Nullable<int> IsOpenLogisticsSecondAllot { get; set; }
/// <summary>
/// 行政后勤是否显示管理绩效按钮 1 是 2 否
/// </summary>
public Nullable<int> IsShowManageButton { get; set; }
}
}
......@@ -21,5 +21,10 @@ public class SecondListResponse : ag_secondallot
/// 0 不显示 1 显示
/// </summary>
public int ShowFormula { get; set; }
/// <summary>
/// 行政后勤是否显示管理绩效按钮 1 是 2 否
/// </summary>
public Nullable<int> IsShowManageButton { get; set; }
}
}
\ No newline at end of file
......@@ -115,5 +115,10 @@ public class sys_hospital
/// 抽取项目是否在同一环境 1 是 2 否
/// </summary>
public Nullable<int> IsSingleProject { get; set; }
/// <summary>
/// 行政后勤是否显示管理绩效按钮 1 是 2 否
/// </summary>
public Nullable<int> IsShowManageButton { get; set; }
}
}
......@@ -107,6 +107,7 @@ public HospitalResponse Insert(HospitalRequest request, int userid)
hospital.CreateDate = DateTime.Now;
hospital.CreateUser = userid;
hospital.States = (int)States.Enabled;
hospital.IsShowManageButton = (int)States.Disabled;
if (!_hospitalRepository.Add(hospital))
throw new PerformanceException("保存失败");
......@@ -136,6 +137,7 @@ public HospitalResponse Update(HospitalRequest request)
//hospital.IsOpenCMIPercent = request.IsOpenCMIPercent;
//hospital.IsOpenLogisticsSecondAllot = request.IsOpenLogisticsSecondAllot;
//hospital.IsOpenIncome = request.IsOpenIncome;
hospital.IsShowManageButton = request.IsShowManageButton;
if (!_hospitalRepository.Update(hospital))
throw new PerformanceException("保存失败");
......
......@@ -824,7 +824,7 @@ private void SupplementSecondDetail(ag_secondallot second, List<per_employee> em
}
// 必须是相同核算单元类型才能带出医院其他绩效
if (second.UnitType.Replace("其他", "").Replace("医技", "医生")
== empl.UnitType.Replace("其他", "").Replace("医技", "医生"))
== (empl?.UnitType ?? "").Replace("其他", "").Replace("医技", "医生"))
{
if (second.UnitType == UnitType.行政后勤.ToString())
{
......
......@@ -130,10 +130,10 @@ public List<SecondListResponse> GetSecondList(int userId)
throw new NotImplementedException("人员ID无效");
var userrole = userroleRepository.GetEntity(t => t.UserID == userId);
var role = roleRepository.GetEntity(t => t.ID == userrole.RoleID);
var hospital = userhospitalRepository.GetEntity(t => t.UserID == userId);
if (hospital == null)
var userhospital = userhospitalRepository.GetEntity(t => t.UserID == userId);
if (userhospital == null)
throw new NotImplementedException("人员未选择医院");
var allotList = perallotRepository.GetEntities(t => t.HospitalId == hospital.HospitalID && new List<int> { 6, 8, 10 }.Contains(t.States));
var allotList = perallotRepository.GetEntities(t => t.HospitalId == userhospital.HospitalID && new List<int> { 6, 8, 10 }.Contains(t.States));
if (allotList == null || allotList.Count == 0)
return new List<SecondListResponse>();
......@@ -150,6 +150,7 @@ public List<SecondListResponse> GetSecondList(int userId)
var secondList = agsecondallotRepository.GetEntities(exp);
var list = Mapper.Map<List<SecondListResponse>>(secondList);
var hospital = hospitalRepository.GetEntity(t => t.ID == userhospital.HospitalID);
list?.ForEach(t =>
{
var allot = allotList.FirstOrDefault(a => a.ID == t.AllotId);
......@@ -159,19 +160,20 @@ public List<SecondListResponse> GetSecondList(int userId)
t.States = allot.States;
t.ShowFormula = allot.ShowFormula;
}
t.IsShowManageButton = hospital?.IsShowManageButton ?? (int)States.Disabled;
});
if (secondList != null && secondList.Any())
{
// 暂时在加载列表时补充信息
var worktypes = agworkloadtypeRepository.GetEntities(t => t.HospitalId == hospital.HospitalID && t.Department == secondList.First().Department && t.UnitType == secondList.First().UnitType);
var worktypes = agworkloadtypeRepository.GetEntities(t => t.HospitalId == userhospital.HospitalID && t.Department == secondList.First().Department && t.UnitType == secondList.First().UnitType);
if (worktypes != null && worktypes.Any())
{
worktypes.ForEach(t => AddWorkTypeDefaultValues(t));
}
// 补充默认工作量项
CheckDefaultWorkload(hospital.HospitalID ?? 0, secondList.First().Department, secondList.First().UnitType);
CheckDefaultWorkload(userhospital.HospitalID ?? 0, secondList.First().Department, secondList.First().UnitType);
}
return list;
......
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