Commit 1d4c85e1 by 钟博

Merge branch 'feature/自定义列头' into develop

parents 11df8604 c725609b
......@@ -310,7 +310,10 @@ public ApiResponse AllComputeByPM([FromBody] ComputerRequest request)
RealGiveFee = t.Sum(s => s.RealGiveFee),
ReservedRatio = t.Sum(s => s.ReservedRatio),
ReservedRatioFee = t.Sum(s => s.ReservedRatioFee),
BankCard = t.FirstOrDefault()?.BankCard
BankCard = t.FirstOrDefault(s=>s.JobNumber==t.Key.JobNumber)?.BankCard,
JobCategory=t.FirstOrDefault(s=>s.JobNumber==t.Key.JobNumber)?.JobCategory,
Duty=t.FirstOrDefault(s=>s.JobNumber==t.Key.JobNumber)?.Duty,
TitlePosition=t.FirstOrDefault(s=>s.JobNumber==t.Key.JobNumber)?.TitlePosition
}).OrderBy(t =>
{
string value = t.JobNumber;
......@@ -396,5 +399,18 @@ public ApiResponse<res_baiscnorm> EditHospitalAvg([FromBody] ComputerAvgRequest
}
#endregion
/// <summary>
/// 自定义列头
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("customcolumnheaders")]
[HttpPost]
public ApiResponse CustomColumnHeaders([FromBody] ComputerAliasRequest request)
{
var result = _computeService.CustomColumnHeaders(request);
return new ApiResponse(ResponseType.OK,result);
}
}
}
\ No newline at end of file
......@@ -509,6 +509,13 @@
<param name="request"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ComputeController.CustomColumnHeaders(Performance.DtoModels.ComputerAliasRequest)">
<summary>
自定义列头
</summary>
<param name="request"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ConfigController.GetDrugtypeList(Performance.DtoModels.DrugpropRequest)">
<summary>
获取 药占比类型信息列表
......
......@@ -2962,6 +2962,21 @@
银行卡号
</summary>
</member>
<member name="P:Performance.DtoModels.ComputeResponse.JobCategory">
<summary>
正式/临聘
</summary>
</member>
<member name="P:Performance.DtoModels.ComputeResponse.Duty">
<summary>
职务
</summary>
</member>
<member name="P:Performance.DtoModels.ComputeResponse.TitlePosition">
<summary>
职称
</summary>
</member>
<member name="P:Performance.DtoModels.DeptDataDetails`1.Pandect">
<summary> 概览</summary>
</member>
......
......@@ -45,4 +45,11 @@ public ComputerRequestValidator()
});
}
}
public class ComputerAliasRequest
{
public int HospitalId { get; set; }
public string Route { get; set; }
}
}
......@@ -113,5 +113,21 @@ public ComputeResponse(string source, string accountingUnit, string employeeName
/// 银行卡号
/// </summary>
public string BankCard { get; set; }
/// <summary>
/// 正式/临聘
/// </summary>
public string JobCategory { get; set; }
/// <summary>
/// 职务
/// </summary>
public string Duty { get; set; }
/// <summary>
/// 职称
/// </summary>
public string TitlePosition { get; set; }
}
}
......@@ -2,7 +2,6 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
using System;
using Performance.EntityModels.Entity;
namespace Performance.EntityModels
{
......
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels.Entity
namespace Performance.EntityModels
{
[Table("cof_alias")]
public class cof_alias
{
[Key]
public int Id { get; set; }
public int HospitalId { get; set; }
public string Route { get; set; }
public string Name { get; set; }
public string OriginalName { get; set; }
......
using Performance.EntityModels;
using Performance.EntityModels.Entity;
namespace Performance.Repository.Repository
namespace Performance.Repository
{
public class PerforCofaliasRepository: PerforRepository<cof_alias>
{
......
......@@ -34,6 +34,7 @@ public class ComputeService : IAutoInjection
private readonly PerforPeremployeeRepository perforPeremployeeRepository;
private readonly PerforPerapramounthideRepository _hideRepository;
private readonly PerforCofworkitemRepository cofworkitemRepository;
private readonly PerforCofaliasRepository cofaliasRepository;
public ComputeService(
PerforResaccountRepository perforResaccountRepository,
......@@ -52,7 +53,8 @@ public class ComputeService : IAutoInjection
PerforPerapramountRepository perapramountRepository,
PerforPeremployeeRepository perforPeremployeeRepository,
PerforPerapramounthideRepository hideRepository,
PerforCofworkitemRepository cofworkitemRepository)
PerforCofworkitemRepository cofworkitemRepository,
PerforCofaliasRepository cofaliasRepository)
{
this.perforResaccountRepository = perforResaccountRepository;
this._perforPerSheetRepository = perforPerSheetRepository;
......@@ -71,6 +73,7 @@ public class ComputeService : IAutoInjection
this.perforPeremployeeRepository = perforPeremployeeRepository;
_hideRepository = hideRepository;
this.cofworkitemRepository = cofworkitemRepository;
this.cofaliasRepository = cofaliasRepository;
}
public int IsShowManage(int allotId)
......@@ -887,12 +890,18 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM
item.ShouldGiveFee = Math.Round(real + (item.OthePerfor ?? 0) + (item.HideOtherPerfor ?? 0) + (item.NightWorkPerfor ?? 0), 2, MidpointRounding.AwayFromZero);
item.ReservedRatio = employees?.FirstOrDefault(w => w.PersonnelNumber == item.JobNumber)?.ReservedRatio ?? 0;
var emps = employees?.FirstOrDefault(w => w.PersonnelNumber == item.JobNumber);
item.ReservedRatio = emps?.ReservedRatio ?? 0;
item.ReservedRatioFee = Math.Round(real * (item.ReservedRatio ?? 0), 2, MidpointRounding.AwayFromZero);
item.RealGiveFee = Math.Round(item.ShouldGiveFee - (item.ReservedRatioFee ?? 0) ?? 0, 2, MidpointRounding.AwayFromZero);
// 姓名始终按人员字典显示
//item.EmployeeName = employees?.FirstOrDefault(w => w.PersonnelNumber == item.JobNumber)?.DoctorName ?? "";
item.BankCard = employees?.FirstOrDefault(w => w.PersonnelNumber == item.JobNumber)?.BankCard ?? "";
item.BankCard = emps?.BankCard ?? "";
item.JobCategory=emps?.JobCategory ?? "";
item.Duty=emps?.Duty ?? "";
item.TitlePosition=emps?.JobTitle ?? "";
// 人员信息使用人员字典中数据
if (isEmpDic)
{
......@@ -1904,5 +1913,12 @@ private decimal GetDecimal(decimal? value, decimal _ = 0)
int decimals = Math.Abs(value.Value) > 100 ? 0 : 2;
return Math.Round(value.Value, decimals, MidpointRounding.AwayFromZero);
}
public List<cof_alias> CustomColumnHeaders(ComputerAliasRequest request)
{
var result= cofaliasRepository.GetEntities(t => t.HospitalId == request.HospitalId && t.Route == request.Route && t.States==1);
if (result == null || !result.Any()) return new List<cof_alias>();
return result;
}
}
}
......@@ -9,7 +9,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Performance.EntityModels.Entity;
using Performance.Repository.Repository;
using System.Linq.Expressions;
......
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