Commit 7f4e7a9a by lcx

Merge branch '公式显示' into 科室取值

# Conflicts:
#	performance/Performance.EntityModels/Entity/per_allot.cs
parents dce4e258 94a5b145
...@@ -266,5 +266,20 @@ public ApiResponse Issued([FromBody]AllotRequest request) ...@@ -266,5 +266,20 @@ public ApiResponse Issued([FromBody]AllotRequest request)
_allotService.UpdateAllotStates(allot.ID, (int)AllotStates.GenerateSucceed, EnumHelper.GetDescription(AllotStates.GenerateSucceed)); _allotService.UpdateAllotStates(allot.ID, (int)AllotStates.GenerateSucceed, EnumHelper.GetDescription(AllotStates.GenerateSucceed));
return new ApiResponse(ResponseType.OK); return new ApiResponse(ResponseType.OK);
} }
/// <summary>
/// 绩效详情计算公式显示/隐藏
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("update/showformula")]
[HttpPost]
public ApiResponse UpdateAllotShowFormula([FromBody]AllotRequest request)
{
if (request.ID < 1)
return new ApiResponse(ResponseType.ParameterError, "绩效信息无效");
var result = _allotService.UpdateAllotShowFormula(request.ID);
return new ApiResponse(ResponseType.OK, result);
}
} }
} }
...@@ -53,13 +53,25 @@ public class AllotResponse ...@@ -53,13 +53,25 @@ public class AllotResponse
/// 提取绩效数据文件生成路径 /// 提取绩效数据文件生成路径
/// </summary> /// </summary>
public string ExtractPath { get; set; } public string ExtractPath { get; set; }
/// <summary> /// <summary>
/// 是否可以下载 /// 是否可以下载
/// </summary> /// </summary>
public bool IsDown { get; set; } public bool IsDown { get; set; }
/// <summary> /// <summary>
/// 3 提取数据 /// 3 提取数据
/// </summary> /// </summary>
public int HasConfig { get; set; } public int HasConfig { get; set; }
/// <summary>
/// 1、人事科提交重新生成
/// </summary>
public int Generate { get; set; }
/// <summary>
/// 0 不显示 1 显示
/// </summary>
public int ShowFormula { get; set; }
} }
} }
...@@ -25,6 +25,9 @@ public class DeptDataDetails ...@@ -25,6 +25,9 @@ public class DeptDataDetails
/// <summary> 收入明细 </summary> /// <summary> 收入明细 </summary>
public List<DetailDtos> Detail { get; set; } public List<DetailDtos> Detail { get; set; }
/// <summary> 0 不显示 1 显示 </summary>
public int ShowFormula { get; set; }
} }
public class DetailDtos public class DetailDtos
......
...@@ -82,8 +82,13 @@ public class per_allot ...@@ -82,8 +82,13 @@ public class per_allot
public Nullable<int> IsExtracting { get; set; } public Nullable<int> IsExtracting { get; set; }
/// <summary> /// <summary>
/// 1、人事科提交重新生成 2、生成成功 /// 1、人事科提交重新生成
/// </summary> /// </summary>
public int Generate { get; set; } public int Generate { get; set; }
/// <summary>
/// 0 不显示 1 显示
/// </summary>
public int ShowFormula { get; set; }
} }
} }
...@@ -248,6 +248,16 @@ public void UpdateAllotStates(int allotId, int states, string remark, bool succe ...@@ -248,6 +248,16 @@ public void UpdateAllotStates(int allotId, int states, string remark, bool succe
_allotRepository.UpdateAllotStates(allotId, states, remark, success); _allotRepository.UpdateAllotStates(allotId, states, remark, success);
} }
public per_allot UpdateAllotShowFormula(int allotId)
{
var allot = _allotRepository.GetEntity(t => t.ID == allotId);
if (allot == null)
return null;
allot.ShowFormula = allot.ShowFormula == 0 ? 1 : 0;
_allotRepository.Update(allot);
return allot;
}
/// <summary> /// <summary>
/// 生成绩效 /// 生成绩效
/// </summary> /// </summary>
......
...@@ -30,6 +30,7 @@ public class ComputeService : IAutoInjection ...@@ -30,6 +30,7 @@ public class ComputeService : IAutoInjection
private readonly PerforAgcomputeRepository _perforAgcomputeRepository; private readonly PerforAgcomputeRepository _perforAgcomputeRepository;
private readonly PerforImemployeeclinicRepository _perforImemployeeclinicRepository; private readonly PerforImemployeeclinicRepository _perforImemployeeclinicRepository;
private readonly PerforImemployeeRepository _perforImemployeeRepository; private readonly PerforImemployeeRepository _perforImemployeeRepository;
private readonly PerforPerallotRepository perforPerallotRepository;
public ComputeService(PerforResaccountRepository perforResaccountRepository, public ComputeService(PerforResaccountRepository perforResaccountRepository,
//PerforResaccountnurseRepository perforResAccountnurseRepository, //PerforResaccountnurseRepository perforResAccountnurseRepository,
...@@ -46,7 +47,8 @@ public class ComputeService : IAutoInjection ...@@ -46,7 +47,8 @@ public class ComputeService : IAutoInjection
PerforAgsecondallotRepository perforAgsecondallotRepository, PerforAgsecondallotRepository perforAgsecondallotRepository,
PerforAgcomputeRepository perforAgcomputeRepository, PerforAgcomputeRepository perforAgcomputeRepository,
PerforImemployeeclinicRepository perforImemployeeclinicRepository, PerforImemployeeclinicRepository perforImemployeeclinicRepository,
PerforImemployeeRepository perforImemployeeRepository) PerforImemployeeRepository perforImemployeeRepository,
PerforPerallotRepository perforPerallotRepository)
{ {
this.perforResaccountRepository = perforResaccountRepository; this.perforResaccountRepository = perforResaccountRepository;
//this._perforResAccountnurseRepository = perforResAccountnurseRepository; //this._perforResAccountnurseRepository = perforResAccountnurseRepository;
...@@ -64,6 +66,7 @@ public class ComputeService : IAutoInjection ...@@ -64,6 +66,7 @@ public class ComputeService : IAutoInjection
this._perforAgcomputeRepository = perforAgcomputeRepository; this._perforAgcomputeRepository = perforAgcomputeRepository;
this._perforImemployeeclinicRepository = perforImemployeeclinicRepository; this._perforImemployeeclinicRepository = perforImemployeeclinicRepository;
this._perforImemployeeRepository = perforImemployeeRepository; this._perforImemployeeRepository = perforImemployeeRepository;
this.perforPerallotRepository = perforPerallotRepository;
} }
/// <summary> /// <summary>
...@@ -489,8 +492,10 @@ public DeptDataDetails DeptDetail(int accountId) ...@@ -489,8 +492,10 @@ public DeptDataDetails DeptDetail(int accountId)
var sheetType = new List<int> { (int)SheetType.Income, (int)SheetType.OtherIncome, (int)SheetType.Expend, (int)SheetType.Workload }; var sheetType = new List<int> { (int)SheetType.Income, (int)SheetType.OtherIncome, (int)SheetType.Expend, (int)SheetType.Workload };
var doctor = perforResaccountRepository.GetEntity(t => t.ID == accountId); var doctor = perforResaccountRepository.GetEntity(t => t.ID == accountId);
string typeValue = EnumHelper.GetItems<UnitType>().FirstOrDefault(t => t.Value == doctor.UnitType).Name.ToString(); string typeValue = EnumHelper.GetItems<UnitType>().FirstOrDefault(t => t.Value == doctor.UnitType).Name.ToString();
var allot = perforPerallotRepository.GetEntity(t => t.ID == doctor.AllotID);
DeptDataDetails deptDetails = new DeptDataDetails DeptDataDetails deptDetails = new DeptDataDetails
{ {
ShowFormula = allot.ShowFormula,
Pandect = Mapper.Map<PerDataAccountBaisc>(doctor), Pandect = Mapper.Map<PerDataAccountBaisc>(doctor),
Detail = new List<DetailDtos>() Detail = new List<DetailDtos>()
}; };
......
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