Commit fcaba510 by 钟博

Merge branch 'release/v20210519'

parents c91751fb c9754264
...@@ -529,7 +529,7 @@ public ApiResponse DepttypeDelete([CustomizeValidator(RuleSet = "Delete"), FromB ...@@ -529,7 +529,7 @@ public ApiResponse DepttypeDelete([CustomizeValidator(RuleSet = "Delete"), FromB
/// </summary> /// </summary>
/// <param name="request"></param> /// <param name="request"></param>
/// <returns></returns> /// <returns></returns>
[Route("accountinglist/{allotId}/{type}")] [Route("accountinglist")]
[HttpPost] [HttpPost]
public ApiResponse GetAccountingList([FromBody] AccoungingRequest request) public ApiResponse GetAccountingList([FromBody] AccoungingRequest request)
{ {
...@@ -594,6 +594,19 @@ public ApiResponse AccountingDelete([FromRoute] int accountingId) ...@@ -594,6 +594,19 @@ public ApiResponse AccountingDelete([FromRoute] int accountingId)
return new ApiResponse(ResponseType.Fail); return new ApiResponse(ResponseType.Fail);
return new ApiResponse(ResponseType.OK); return new ApiResponse(ResponseType.OK);
} }
/// <summary>
/// 核算单元及组别数据验证
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
[Route("accountingverify/{allotId}")]
[HttpPost]
public ApiResponse AccountingVerify([FromRoute] int allotId)
{
_configService.AccoungtingVerify(allotId);
return new ApiResponse(ResponseType.OK);
}
#endregion #endregion
/// <summary> /// <summary>
......
...@@ -284,5 +284,9 @@ public class PerDataAccountBaisc : IPerData ...@@ -284,5 +284,9 @@ public class PerDataAccountBaisc : IPerData
/// </summary> /// </summary>
public Nullable<decimal> PostCoefficient { get; set; } public Nullable<decimal> PostCoefficient { get; set; }
/// <summary>
/// 考核后绩效
/// </summary>
public Nullable<decimal> GiveFee { get; set; }
} }
} }
...@@ -219,5 +219,11 @@ union all ...@@ -219,5 +219,11 @@ union all
return flag; return flag;
} }
} }
public int VerifyAccountingAndUnittype(int allotId)
{
return Execute("call proc_verify_accoungingunit_unittype(@allotId);", new { allotId });
}
} }
} }
...@@ -1646,7 +1646,7 @@ public DeptDataDetails GetDoctorDetail(int computeId) ...@@ -1646,7 +1646,7 @@ public DeptDataDetails GetDoctorDetail(int computeId)
var itemName = Regex.Replace(sheet.SheetName, @"\d", ""); var itemName = Regex.Replace(sheet.SheetName, @"\d", "");
var detail = new DetailDtos var detail = new DetailDtos
{ {
ItemName = itemName.Replace(".", "").Replace(" ", ""), ItemName = itemName.Replace(".", "").Replace(" ", ""),
IncomeType = sheet.SheetType == (int)SheetType.PersonExtra ? 5 : 8, IncomeType = sheet.SheetType == (int)SheetType.PersonExtra ? 5 : 8,
OriginalType = sheet.SheetType ?? 0, OriginalType = sheet.SheetType ?? 0,
...@@ -1667,40 +1667,37 @@ public DeptDataDetails GetAdministration(int computeId) ...@@ -1667,40 +1667,37 @@ public DeptDataDetails GetAdministration(int computeId)
var resCompute = _perforRescomputeRepository.GetEntity(t => t.ID == computeId); var resCompute = _perforRescomputeRepository.GetEntity(t => t.ID == computeId);
if (resCompute == null) return new DeptDataDetails(); if (resCompute == null) return new DeptDataDetails();
var employee = _perforImemployeeRepository.GetEntity(t => t.AllotID == resCompute.AllotID && t.AccountingUnit == resCompute.AccountingUnit && t.PersonnelNumber == resCompute.JobNumber); //var employee = _perforImemployeeRepository.GetEntity(t => t.AllotID == resCompute.AllotID && t.AccountingUnit == resCompute.AccountingUnit && t.PersonnelNumber == resCompute.JobNumber);
DeptDataDetails doctorDetails = new DeptDataDetails DeptDataDetails doctorDetails = new DeptDataDetails
{ {
ShowFormula = 0, ShowFormula = 0,
Pandect = new PerDataAccountBaisc Pandect = new PerDataAccountBaisc
{ {
EmployeeName = employee.DoctorName,//医生姓名 EmployeeName = resCompute.EmployeeName,//医生姓名
JobNumber = employee.PersonnelNumber,//工号 JobNumber = resCompute.JobNumber,//工号
AccountingUnit = employee.AccountingUnit,//核算单元 AccountingUnit = resCompute.AccountingUnit,//核算单元
AccountType = employee.AccountType,//核算单元类型 AccountType = resCompute.AccountType,//核算单元类型
JobTitle = employee.JobTitle,//职称 JobTitle = resCompute.JobTitle,//职称
FitPeople = employee.FitPeople,//绩效基数核算参考对象 FitPeople = resCompute.FitPeople,//绩效基数核算参考对象
FitPeopleValue = employee.FitPeopleValue ?? 0,//绩效基础核算参考值 FitPeopleValue = resCompute.FitPeopleValue ?? 0,//绩效基础核算参考值
FitPeopleRatio = employee.FitPeopleRatio,//绩效基础核算系数 FitPeopleRatio = resCompute.FitPeopleRatio,//绩效基础核算系数
PostCoefficient = employee.PostCoefficient,//岗位系数 PostCoefficient = resCompute.PostCoefficient,//岗位系数
Attendance = employee.Attendance,//出勤率 Attendance = resCompute.Attendance,//出勤率
ScoringAverage = employee?.ScoreAverageRate,//考核得分率 ScoringAverage = resCompute?.ScoreAverageRate,//考核得分率
AssessBeforeOtherFee = employee.AssessBeforeOtherFee ?? 0, AssessBeforeOtherFee = resCompute.AssessBeforeOtherFee ?? 0,
Extra = employee.Punishment,//医院奖罚 Extra = resCompute.Punishment,//医院奖罚
NightShiftWorkPerforFee = employee.NightWorkPerfor,//夜班费 NightShiftWorkPerforFee = resCompute.NightWorkPerfor,//夜班费
AdjustFactor = employee.Adjust,//调节系数 AdjustFactor = resCompute.Adjust,//调节系数
AdjustLaterOtherFee = employee?.AdjustLaterOtherFee ?? 0,//调解后其他绩效 AdjustLaterOtherFee = resCompute?.AdjustLaterOtherFee ?? 0,//调解后其他绩效
PerforTotal = Math.Round(employee.FitPeopleValue ?? 0 * employee.PostCoefficient ?? 0 * employee.Attendance + employee.AssessBeforeOtherFee ?? 0), PerforTotal = resCompute.PerforTotal,//考核前绩效
//考核前绩效 GiveFee = resCompute.GiveFee,//考核后绩效
RealGiveFee = resCompute.RealGiveFee //实发绩效
}, },
Detail = new List<DetailDtos>() Detail = new List<DetailDtos>()
}; };
var pandect = doctorDetails.Pandect;
//考核后绩效
doctorDetails.Pandect.AssessLaterPerforTotal = Math.Round(pandect.PerforTotal * pandect.ScoringAverage + pandect.Extra ?? 0);
//实发绩效
doctorDetails.Pandect.RealGiveFee = Math.Round((pandect.AssessLaterPerforTotal * pandect.AdjustFactor + pandect.AdjustLaterOtherFee) ?? 0);
var isShowManage = IsShowManage(resCompute.AllotID.Value); var isShowManage = IsShowManage(resCompute.AllotID.Value);
// 开启 显示管理绩效 // 开启 显示管理绩效
......
...@@ -643,9 +643,15 @@ public bool AgainDelete(CofAgainRequest request) ...@@ -643,9 +643,15 @@ public bool AgainDelete(CofAgainRequest request)
/// <returns></returns> /// <returns></returns>
public List<cof_accounting> GetAccountingList(AccoungingRequest request) public List<cof_accounting> GetAccountingList(AccoungingRequest request)
{ {
var list = request.Type != 2 ? cofaccountingRepository.GetEntities(t => t.AllotId == request.AllotId) switch (request.Type)
: cofaccountingRepository.GetEntities(t => t.AllotId == request.AllotId && t.UnitType == request.UnitType); {
return list; case 1: //返回accounting列表
case 2: //返回核算单元类型
default:
return cofaccountingRepository.GetEntities(t => t.AllotId == request.AllotId);
case 3: //返回核算单元
return cofaccountingRepository.GetEntities(t => t.AllotId == request.AllotId && t.UnitType == request.UnitType);
}
} }
/// <summary> /// <summary>
...@@ -700,6 +706,17 @@ public bool AccountingDelete(int accountingId) ...@@ -700,6 +706,17 @@ public bool AccountingDelete(int accountingId)
return cofaccountingRepository.Remove(entity); return cofaccountingRepository.Remove(entity);
} }
/// <summary>
/// 删除数据
/// </summary>
/// <param name="accountingId"></param>
/// <returns></returns>
public void AccoungtingVerify(int allotId)
{
_directorRepository.VerifyAccountingAndUnittype(allotId);
}
#endregion #endregion
#region Copy #region Copy
......
...@@ -25,25 +25,34 @@ public void WriteCollectData(ISheet sheet, PerSheetPoint point, SheetType sheetT ...@@ -25,25 +25,34 @@ public void WriteCollectData(ISheet sheet, PerSheetPoint point, SheetType sheetT
public void WriteSheetData(ISheet sheet, PerSheetPoint point, SheetType sheetType, ExcelStyle style, object data, Dictionary<ExDataDict, object> exdict = null) public void WriteSheetData(ISheet sheet, PerSheetPoint point, SheetType sheetType, ExcelStyle style, object data, Dictionary<ExDataDict, object> exdict = null)
{ {
if (data != null && data is List<per_dept_dic> departments && departments.Any()) try
{ {
int dataFirstRowNum = point.DataFirstRowNum.Value; if (!exdict.ContainsKey(ExDataDict.AccountingBasic))
exdict.Add(ExDataDict.AccountingBasic, new List<Account>());
var accountingUnits = departments.Select(t => new Account var accountingUnits = new List<Account>();
if (data != null && data is List<per_dept_dic> departments && departments.Any())
{ {
UnitType = t.UnitType.NoBlank(), logger.LogInformation("4.1所有系统科室: " + JsonHelper.Serialize(departments));
AccountingUnit = t.AccountingUnit.NoBlank()
}).ToList(); int dataFirstRowNum = point.DataFirstRowNum.Value;
var tuples = GetAccountingUnitDataNonexistent(sheet, point, accountingUnits); accountingUnits = departments.Select(t => new Account
{
UnitType = t.UnitType.NoBlank(),
AccountingUnit = t.AccountingUnit.NoBlank()
}).ToList();
accountingUnits = accountingUnits.Where(t => !t.AccountingUnit.Contains("非核算"))?.ToList(); var tuples = GetAccountingUnitDataNonexistent(sheet, point, accountingUnits);
if (accountingUnits == null || !accountingUnits.Any()) return; accountingUnits = accountingUnits.Where(t => !t.AccountingUnit.Contains("非核算"))?.ToList();
logger.LogInformation("4.1所有科室: " + JsonHelper.Serialize(accountingUnits)); if (accountingUnits != null && accountingUnits.Any())
WriteAccountingUnitDataNonexistent(sheet, point, style, accountingUnits, tuples);
}
WriteAccountingUnitDataNonexistent(sheet, point, style, accountingUnits, tuples); logger.LogInformation("4.1所有科室: " + JsonHelper.Serialize(accountingUnits));
var accountBasic = new List<Account>(); var accountBasic = new List<Account>();
...@@ -59,7 +68,11 @@ public void WriteSheetData(ISheet sheet, PerSheetPoint point, SheetType sheetTyp ...@@ -59,7 +68,11 @@ public void WriteSheetData(ISheet sheet, PerSheetPoint point, SheetType sheetTyp
}); });
} }
exdict.Add(ExDataDict.AccountingBasic, accountBasic); exdict[ExDataDict.AccountingBasic] = accountBasic;
}
catch (Exception ex)
{
logger.LogError("4.1所有科室被获取时发生异常:" + ex.ToString());
} }
} }
......
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