Commit 6b602c3d by Licx

其他绩效自动带出规则添加医生姓名

parent 16d54b6b
......@@ -612,10 +612,10 @@ public ApiResponse<List<TitleValue>> ClearAprData([FromBody] AprAmountAuditReque
/// <param name="request"></param>
/// <returns></returns>
[HttpPost("autocomplate")]
public ApiResponse<per_apr_amount> GetEmployeeMessage([FromBody] per_apr_amount request)
public ApiResponse<List<view_per_apr_amount>> GetEmployeeMessage([FromBody] per_apr_amount request)
{
var result = employeeService.GetEmployeeMessage(request.AllotId, request.PersonnelNumber, claim.GetUserId());
return new ApiResponse<per_apr_amount>(ResponseType.OK, "人员信息", result);
var result = employeeService.GetEmployeeMessage(request.AllotId, request.PersonnelNumber, request.DoctorName, claim.GetUserId());
return new ApiResponse<List<view_per_apr_amount>>(ResponseType.OK, "人员信息", result);
}
/// <summary>
......@@ -928,7 +928,7 @@ public IActionResult AprHideOverviewDownload(int allotId)
if (!amounts?.Any() == true)
return Ok(new ApiResponse(ResponseType.Fail, "数据为空"));
var filepath = employeeService.AprListDownload("不公示其他绩效统计表下载",userid,amounts);
var filepath = employeeService.AprListDownload("不公示其他绩效统计表下载", userid, amounts);
var memoryStream = new MemoryStream();
using (var stream = new FileStream(filepath, FileMode.Open))
......
......@@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<DeleteExistingFiles>false</DeleteExistingFiles>
<DeleteExistingFiles>true</DeleteExistingFiles>
<ExcludeApp_Data>false</ExcludeApp_Data>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
......
......@@ -870,26 +870,48 @@ public List<TitleValue> GetPerforTypeDict(int allotId)
/// 根据人员工号获取人员信息
/// </summary>
/// <param name="allotId"></param>
/// <param name="jobNumber"></param>
/// <param name="personnelNumber"></param>
/// <param name="doctorName"></param>
/// <param name="userId"></param>
/// <returns></returns>
public view_per_apr_amount GetEmployeeMessage(int allotId, string personnelNumber, int userId)
public List<view_per_apr_amount> GetEmployeeMessage(int allotId, string personnelNumber, string doctorName, int userId)
{
if (string.IsNullOrEmpty(personnelNumber)) return new view_per_apr_amount();
if (string.IsNullOrEmpty(personnelNumber) && string.IsNullOrEmpty(doctorName)) return new List<view_per_apr_amount>();
var user = userRepository.GetEntity(w => w.ID == userId && w.IsDelete == 1);
if (user == null) throw new PerformanceException("操作用户不存在或用户信息错误!");
var employee = peremployeeRepository.GetEntity(w => w.AllotId == allotId && w.PersonnelNumber != null && w.PersonnelNumber.Trim() == personnelNumber.Trim());
if (employee == null) return new view_per_apr_amount();
var employees = new List<per_employee>();
var employeeId = 0;
if (!string.IsNullOrEmpty(personnelNumber))
{
var employee = peremployeeRepository.GetEntity(w => w.AllotId == allotId && w.PersonnelNumber != null
&& w.PersonnelNumber.Trim() == personnelNumber.Trim());
if (employee != null)
{
employees.Add(employee);
employeeId = employee.Id;
}
}
return new view_per_apr_amount
if (!string.IsNullOrEmpty(doctorName))
{
var filterEmployees = peremployeeRepository.GetEntities(w => w.AllotId == allotId && w.DoctorName != null
&& w.DoctorName.Trim() == doctorName.Trim() && w.Id != employeeId);
if (filterEmployees != null && filterEmployees.Any()) employees.AddRange(filterEmployees);
}
if (employees == null || !employees.Any())
return new List<view_per_apr_amount>();
return employees.Select(t => new view_per_apr_amount
{
AllotId = allotId,
PersonnelNumber = employee.PersonnelNumber,
DoctorName = employee.DoctorName,
PersonnelNumber = t.PersonnelNumber,
DoctorName = t.DoctorName,
TypeInDepartment = user.Department,
AccountingUnit = employee.AccountingUnit
};
AccountingUnit = t.AccountingUnit
}).ToList();
}
/// <summary>
......
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