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)
_allotService.UpdateAllotStates(allot.ID, (int)AllotStates.GenerateSucceed, EnumHelper.GetDescription(AllotStates.GenerateSucceed));
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
/// 提取绩效数据文件生成路径
/// </summary>
public string ExtractPath { get; set; }
/// <summary>
/// 是否可以下载
/// </summary>
public bool IsDown { get; set; }
/// <summary>
/// 3 提取数据
/// </summary>
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
/// <summary> 收入明细 </summary>
public List<DetailDtos> Detail { get; set; }
/// <summary> 0 不显示 1 显示 </summary>
public int ShowFormula { get; set; }
}
public class DetailDtos
......
......@@ -82,8 +82,13 @@ public class per_allot
public Nullable<int> IsExtracting { get; set; }
/// <summary>
/// 1、人事科提交重新生成 2、生成成功
/// 1、人事科提交重新生成
/// </summary>
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
_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>
......
......@@ -30,6 +30,7 @@ public class ComputeService : IAutoInjection
private readonly PerforAgcomputeRepository _perforAgcomputeRepository;
private readonly PerforImemployeeclinicRepository _perforImemployeeclinicRepository;
private readonly PerforImemployeeRepository _perforImemployeeRepository;
private readonly PerforPerallotRepository perforPerallotRepository;
public ComputeService(PerforResaccountRepository perforResaccountRepository,
//PerforResaccountnurseRepository perforResAccountnurseRepository,
......@@ -46,7 +47,8 @@ public class ComputeService : IAutoInjection
PerforAgsecondallotRepository perforAgsecondallotRepository,
PerforAgcomputeRepository perforAgcomputeRepository,
PerforImemployeeclinicRepository perforImemployeeclinicRepository,
PerforImemployeeRepository perforImemployeeRepository)
PerforImemployeeRepository perforImemployeeRepository,
PerforPerallotRepository perforPerallotRepository)
{
this.perforResaccountRepository = perforResaccountRepository;
//this._perforResAccountnurseRepository = perforResAccountnurseRepository;
......@@ -64,6 +66,7 @@ public class ComputeService : IAutoInjection
this._perforAgcomputeRepository = perforAgcomputeRepository;
this._perforImemployeeclinicRepository = perforImemployeeclinicRepository;
this._perforImemployeeRepository = perforImemployeeRepository;
this.perforPerallotRepository = perforPerallotRepository;
}
/// <summary>
......@@ -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 doctor = perforResaccountRepository.GetEntity(t => t.ID == accountId);
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
{
ShowFormula = allot.ShowFormula,
Pandect = Mapper.Map<PerDataAccountBaisc>(doctor),
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