医院其他绩效审核

parent 209c0c0e
...@@ -8,7 +8,7 @@ namespace Performance.DtoModels ...@@ -8,7 +8,7 @@ namespace Performance.DtoModels
public class AprAmountAuditRequest public class AprAmountAuditRequest
{ {
/// <summary> 二次绩效Id </summary> /// <summary> 二次绩效Id </summary>
public int Id { get; set; } public int[] Id { get; set; }
/// <summary> 审核结果 1、审核通过 2、驳回 </summary> /// <summary> 审核结果 1、审核通过 2、驳回 </summary>
public int IsPass { get; set; } public int IsPass { get; set; }
...@@ -20,7 +20,6 @@ public class AprAmountAuditRequestValidator : AbstractValidator<AprAmountAuditRe ...@@ -20,7 +20,6 @@ public class AprAmountAuditRequestValidator : AbstractValidator<AprAmountAuditRe
{ {
public AprAmountAuditRequestValidator() public AprAmountAuditRequestValidator()
{ {
RuleFor(x => x.Id).NotNull().NotEmpty().GreaterThan(0);
RuleFor(x => x.IsPass).NotNull().NotEmpty().InclusiveBetween(1, 2); RuleFor(x => x.IsPass).NotNull().NotEmpty().InclusiveBetween(1, 2);
} }
} }
......
...@@ -792,6 +792,7 @@ private void CopyAprData(int prevAllotId, int allotId) ...@@ -792,6 +792,7 @@ private void CopyAprData(int prevAllotId, int allotId)
{ {
var data = list.Select(t => new per_apr_amount var data = list.Select(t => new per_apr_amount
{ {
Status = 2,
AllotId = allotId, AllotId = allotId,
PersonnelNumber = t.PersonnelNumber, PersonnelNumber = t.PersonnelNumber,
DoctorName = t.DoctorName, DoctorName = t.DoctorName,
......
...@@ -391,7 +391,7 @@ public bool InsertApr(per_apr_amount request, int userId) ...@@ -391,7 +391,7 @@ public bool InsertApr(per_apr_amount request, int userId)
//var data = perapramountRepository.GetEntity(t => t.PersonnelNumber == request.PersonnelNumber && t.AllotId == request.AllotId); //var data = perapramountRepository.GetEntity(t => t.PersonnelNumber == request.PersonnelNumber && t.AllotId == request.AllotId);
//if (data != null) //if (data != null)
// throw new PerformanceException("人员工号已存在"); // throw new PerformanceException("人员工号已存在");
request.Status = 2;
request.CreateDate = DateTime.Now; request.CreateDate = DateTime.Now;
request.CreateUser = userId; request.CreateUser = userId;
return perapramountRepository.Add(request); return perapramountRepository.Add(request);
...@@ -406,6 +406,7 @@ public bool UpdateApr(per_apr_amount request) ...@@ -406,6 +406,7 @@ public bool UpdateApr(per_apr_amount request)
if (data == null) if (data == null)
throw new PerformanceException("修改数据无效"); throw new PerformanceException("修改数据无效");
data.Status = 2;
data.PersonnelNumber = request.PersonnelNumber; data.PersonnelNumber = request.PersonnelNumber;
data.DoctorName = request.DoctorName; data.DoctorName = request.DoctorName;
data.PerforType = request.PerforType; data.PerforType = request.PerforType;
...@@ -433,15 +434,19 @@ public bool DeleteApr(int id) ...@@ -433,15 +434,19 @@ public bool DeleteApr(int id)
/// <returns></returns> /// <returns></returns>
public bool ConfirmAudit(int userid, AprAmountAuditRequest request) public bool ConfirmAudit(int userid, AprAmountAuditRequest request)
{ {
var apramount = perapramountRepository.GetEntity(t => t.Id == request.Id); if (request.Id.Length == 0)
if (apramount.Status != 2) throw new PerformanceException("审核信息无效,请确认");
throw new PerformanceException("该绩效未提交至审核,请确认");
var apramounts = perapramountRepository.GetEntities(t => request.Id.Contains(t.Id));
foreach (var item in apramounts)
{
item.Status = (request.IsPass == 1) ? 3 : 4;
item.AuditUser = userid;
item.AuditTime = DateTime.Now;
item.Remark = request.Remark;
}
apramount.Status = (request.IsPass == 1) ? 3 : 4; return perapramountRepository.UpdateRange(apramounts.ToArray());
apramount.AuditUser = userid;
apramount.AuditTime = DateTime.Now;
apramount.Remark = request.Remark;
return perapramountRepository.Update(apramount);
} }
public void ImpoerAprEmployees(int allotid, string path, int userid) public void ImpoerAprEmployees(int allotid, string path, int userid)
...@@ -504,6 +509,7 @@ public void ImpoerAprEmployees(int allotid, string path, int userid) ...@@ -504,6 +509,7 @@ public void ImpoerAprEmployees(int allotid, string path, int userid)
var entity = new per_apr_amount var entity = new per_apr_amount
{ {
Status = 2,
PersonnelNumber = row.GetCell(dict["人员工号"]).GetValue(), PersonnelNumber = row.GetCell(dict["人员工号"]).GetValue(),
DoctorName = row.GetCell(dict["姓名"]).GetValue(), DoctorName = row.GetCell(dict["姓名"]).GetValue(),
PerforType = row.GetCell(dict["绩效类型"]).GetValue(), PerforType = row.GetCell(dict["绩效类型"]).GetValue(),
......
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