Commit 5ed08789 by Licx

1.获取其他绩效详情添加时间条件

2.审核驳回获取等待审核、审核通过的数据
parent b04e7959
......@@ -663,7 +663,7 @@ public ApiResponse GetAprHideDetail([FromBody] per_apr_amount request)
if (request.AllotId == 0)
return new ApiResponse(ResponseType.ParameterError, "参数AllotId无效!");
var employee = employeeService.GetAprHideList(request.AllotId, request.TypeInDepartment);
var employee = employeeService.GetAprHideList(request.AllotId, request.TypeInDepartment, date: request.CreateDate);
if (employee == null || !employee.Any())
return new ApiResponse(ResponseType.OK, "ok", employee);
......
......@@ -64,7 +64,7 @@ public partial class PerforPerapramountRepository : PerforRepository<per_apr_amo
//}
public List<view_per_apr_amount> GetFullAmount(int? allotId, int? status, string typeInDepartment = "")
public List<view_per_apr_amount> GetFullAmount(int? allotId, int? status, string typeInDepartment = "", DateTime? date = null)
{
string sql = "select AllotId, PersonnelNumber, Trim(AccountingUnit) AccountingUnit, UnitType, DoctorName, PerforType, Amount, TypeInDepartment, Status, Remark from view_other_amount where ifnull(amount,0)<>0 ";
......@@ -85,6 +85,11 @@ public List<view_per_apr_amount> GetFullAmount(int? allotId, int? status, string
sql += " and typeInDepartment = @typeInDepartment";
parameters.Add(name: "typeInDepartment", typeInDepartment);
}
if (date.HasValue)
{
sql += " and createDate = @createDate";
parameters.Add(name: "createDate", date);
}
return DapperQuery<view_per_apr_amount>(sql, parameters).ToList();
}
......
......@@ -460,7 +460,7 @@ public List<per_apr_amount> GetAprList(int allotId, int userId, int isAudit)
/// <returns></returns>
public List<view_per_apr_amount> GetAprList(int allotId, string department, int? status = null, DateTime? date = null)
{
var list = perapramountRepository.GetFullAmount(allotId, status, department);
var list = perapramountRepository.GetFullAmount(allotId, status, department, date);
if (list != null && list.Any())
list = list.OrderBy(t => t.DoctorName).ToList();
......@@ -587,7 +587,7 @@ public ApiResponse ConfirmAudit(int userid, AprAmountAuditRequest request)
var allApramounts = request.IsPass == 1
? GetAprByTypeInDepartment(request.AllotId, request.TypeInDepartment, request.CreateDate, 2) // 获取等待审核的数据
: GetAprByTypeInDepartment(request.AllotId, request.TypeInDepartment, request.CreateDate, 3); // 获取审核通过的数据
: GetAprByTypeInDepartment(request.AllotId, request.TypeInDepartment, request.CreateDate, 2, 3); // 获取等待审核、审核通过的数据
foreach (var member in request.Members)
{
var apramounts = allApramounts?.Where(t => (t.PersonnelNumber ?? "") == member.PersonnelNumber);
......@@ -926,7 +926,7 @@ public List<per_apr_amount_hide> GetAprHideList(int allotId, int userId, int isA
/// <param name="allotId"></param>
/// <param name="department"></param>
/// <returns></returns>
public List<view_per_apr_amount> GetAprHideList(int allotId, string department, int? status = null, string date = null)
public List<view_per_apr_amount> GetAprHideList(int allotId, string department, int? status = null, DateTime? date = null)
{
Expression<Func<per_apr_amount_hide, bool>> predicate = w => w.AllotId == allotId && w.Amount.HasValue && w.Amount != 0;
if (!string.IsNullOrEmpty(department))
......@@ -935,8 +935,8 @@ public List<view_per_apr_amount> GetAprHideList(int allotId, string department,
if (status.HasValue)
predicate = predicate.And(w => w.Status == status);
if (!string.IsNullOrEmpty(date))
predicate = predicate.And(w => w.CreateDate.ToString("yyyy-MM-dd HH:mm:ss") == date);
if (date.HasValue)
predicate = predicate.And(w => w.CreateDate == date);
var list = _hideRepository.GetFullAmount(predicate);
if (list != null && list.Any())
......@@ -1066,7 +1066,7 @@ public ApiResponse ConfirmAuditHide(int userid, AprAmountAuditRequest request)
var allApramounts = request.IsPass == 1
? GetAprHideByTypeInDepartment(request.AllotId, request.TypeInDepartment, request.CreateDate, 2) // 获取等待审核的数据
: GetAprHideByTypeInDepartment(request.AllotId, request.TypeInDepartment, request.CreateDate, 3); // 获取审核通过的数据
: GetAprHideByTypeInDepartment(request.AllotId, request.TypeInDepartment, request.CreateDate, 2, 3); // 获取等待审核、审核通过的数据
foreach (var member in request.Members)
{
var apramounts = allApramounts?.Where(t => (t.PersonnelNumber ?? "") == member.PersonnelNumber);
......
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