Commit 8a353df6 by ruyun.zhang

科室详情显示设置接口

parent 3f959877
......@@ -168,6 +168,33 @@ public ApiResponse<List<DeptResponse>> GetAdminPerformance([FromBody] ComputerRe
}
/// <summary>
/// 科室绩效详情显示隐藏设置--加载
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
[Route("unite/deptdetail/setting/get")]
[HttpPost]
public ApiResponse GetUniteDeptDetailSetting([FromQuery] int allotId)
{
var response = _computeService.GetUniteDeptDetailSetting(allotId);
return new ApiResponse(ResponseType.OK, response);
}
/// <summary>
/// 科室绩效详情显示隐藏设置--保存
/// </summary>
/// <param name="allotId"></param>
/// <param name="request"></param>
/// <returns></returns>
[Route("unite/deptdetail/setting/save")]
[HttpPost]
public ApiResponse SaveUniteDeptDetailSetting([FromQuery] int allotId, [FromBody] UniteDeptSetting request)
{
_computeService.SaveUniteDeptDetailSetting(allotId, request);
return new ApiResponse(ResponseType.OK, "保存成功");
}
/// <summary>
/// 科室绩效详情
/// </summary>
/// <param name="request"></param>
......@@ -176,51 +203,6 @@ public ApiResponse<List<DeptResponse>> GetAdminPerformance([FromBody] ComputerRe
[HttpPost]
public ApiResponse UniteDeptDetail([FromBody] UniteDeptDetailRequest request)
{
/*
[
{
"type":"1",
"title":"护理组工作量绩效测算表",
"items":[
{
"项目":"柳州市医保工作量(48H以上)",
"数量":"123",
"系数":"40",
"工作量倾斜":"1",
"金额":"23423"
}
]
},
{
"type":"1",
"title":"护理组工作量绩效测算表",
"items":[
{
"项目":"柳州市医保工作量(48H以上)",
"数量":"123",
"系数":"40",
"工作量倾斜":"1",
"金额":"23423"
}
]
},
{
"type":"1",
"title":"护理组工作量绩效测算表",
"items":[
{
"项目":"柳州市医保工作量(48H以上)",
"数量":"123",
"系数":"40",
"工作量倾斜":"1",
"金额":"23423"
}
]
}
]
*/
if (!Enum.TryParse(request.UnitType, ignoreCase: true, out UnitType unitType))
return new ApiResponse(ResponseType.ParameterError, "核算组别错误");
var userid = _claim.GetUserId();
......@@ -274,7 +256,7 @@ public ApiResponse DeptDetail([FromBody] DeptDetailRequest request)
var response = _computeService.DeptDetail(request.AccountID);
return new ApiResponse(ResponseType.OK, response);
}
}
}
#endregion
/// <summary>
......
......@@ -1045,6 +1045,21 @@
<param name="request"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ComputeController.GetUniteDeptDetailSetting(System.Int32)">
<summary>
科室绩效详情显示隐藏设置
</summary>
<param name="allotId"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ComputeController.SaveUniteDeptDetailSetting(System.Int32,Performance.DtoModels.UniteDeptSetting)">
<summary>
科室绩效详情显示隐藏设置
</summary>
<param name="allotId"></param>
<param name="request"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ComputeController.UniteDeptDetail(Performance.DtoModels.UniteDeptDetailRequest)">
<summary>
科室绩效详情
......
......@@ -85,6 +85,9 @@
<member name="P:Performance.EntityModels.PerformanceDbContext.cof_cmi">
<summary> </summary>
</member>
<member name="P:Performance.EntityModels.PerformanceDbContext.cof_dept_detail">
<summary> </summary>
</member>
<member name="P:Performance.EntityModels.PerformanceDbContext.cof_depttype">
<summary> 科室类型 </summary>
</member>
......@@ -1850,6 +1853,31 @@
可是分类
</summary>
</member>
<member name="T:Performance.EntityModels.cof_dept_detail">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.cof_dept_detail.Id">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.cof_dept_detail.AllotId">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.cof_dept_detail.Settings">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.cof_dept_detail.CreateTime">
<summary>
</summary>
</member>
<member name="T:Performance.EntityModels.cof_director">
<summary>
规模绩效、效率绩效计算系数配置
......
......@@ -200,21 +200,36 @@ public enum Type
}
public enum Title
{
[Description("整数")] 业绩分值 = 2100,
[Description("百分比")] 预算比例 = 2110,
[Description("整数")] 业绩绩效 = 2120,
[Description("整数")] 工作量绩效 = 2130,
[Description("整数")] 考核前其他绩效 = 2140,
[Description("整数")] 考核前绩效 = 2150,
[Description("百分比")] 考核得分率 = 2160,
[Description("整数")] 药占比奖罚 = 2170,
[Description("整数")] 材料占比奖罚 = 2180,
[Description("整数")] 医院奖罚 = 2190,
[Description("整数")] 考核后绩效 = 2200,
[Description("整数")] 考核后其他绩效 = 2210,
[Description("百分比")] 调节系数 = 2220,
[Description("整数")] 调节后其他绩效 = 2230,
[Description("整数")] 实发绩效 = 2240,
业绩分值 = 2100,
预算比例 = 2110,
业绩绩效 = 2120,
工作量绩效 = 2130,
考核前其他绩效 = 2140,
考核前绩效 = 2150,
考核得分率 = 2160,
药占比奖罚 = 2170,
材料占比奖罚 = 2180,
医院奖罚 = 2190,
考核后绩效 = 2200,
考核后其他绩效 = 2210,
调节系数 = 2220,
调节后其他绩效 = 2230,
实发绩效 = 2240,
}
public enum DisplayRule
{
始终显示,
下发显示,
}
public enum Format
{
,
整数,
一位小数,
两位小数,
三位小数,
四位小数,
百分比,
}
}
}
......@@ -12,20 +12,6 @@ public class UniteDeptDetailResponse
}
public class DeptDetailItem
{
//public DeptDetailItem(int type, string title, decimal total, string remark, int sort)
// : this(type, title, total, remark, sort, new List<Dictionary<string, object>>())
//{
//}
//public DeptDetailItem(int type, string title, decimal total, string remark, int sort, List<Dictionary<string, object>> items)
//{
// Type = type;
// Title = title;
// Total = total;
// Remark = remark;
// Sort = sort;
// Items = items;
//}
public int Type { get; set; }
public string Title { get; set; }
public decimal Total { get; set; }
......
using System;
using System.Collections.Generic;
namespace Performance.DtoModels
{
public class UniteDeptSetting
{
public List<UniteDeptDetailItem> DetailItems { get; set; } = new List<UniteDeptDetailItem>();
}
public class UniteDeptDetailItem
{
public int Type { get; set; }
public int SheetType { get; set; }
public string Title { get; set; }
public string Remark { get; set; }
public string Format { get; set; }
public int Sort { get; set; }
public string Display { get; set; }
public List<UniteDeptDetailItem> Items { get; set; }
}
}
......@@ -69,6 +69,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
public virtual DbSet<cof_check> cof_check { get; set; }
/// <summary> </summary>
public virtual DbSet<cof_cmi> cof_cmi { get; set; }
/// <summary> </summary>
public virtual DbSet<cof_dept_detail> cof_dept_detail { get; set; }
/// <summary> 科室类型 </summary>
public virtual DbSet<cof_depttype> cof_depttype { get; set; }
/// <summary> 规模绩效、效率绩效计算系数配置 </summary>
......
//-----------------------------------------------------------------------
// <copyright file=" cof_dept_detail.cs">
// * FileName: cof_dept_detail.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
///
/// </summary>
[Table("cof_dept_detail")]
public class cof_dept_detail
{
/// <summary>
///
/// </summary>
[Key]
public int Id { get; set; }
/// <summary>
///
/// </summary>
public int AllotId { get; set; }
/// <summary>
///
/// </summary>
public string Settings { get; set; }
/// <summary>
///
/// </summary>
public DateTime CreateTime { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file="cof_dept_detail.cs">
// * FileName: cof_dept_detail.cs
// </copyright>
//-----------------------------------------------------------------------
using Performance.EntityModels;
namespace Performance.Repository
{
/// <summary>
/// cof_cmi Repository
/// </summary>
public partial class PerforCofDeptDetailRepository : PerforRepository<cof_dept_detail>
{
public PerforCofDeptDetailRepository(PerformanceDbContext context) : base(context)
{
}
}
}
......@@ -6,6 +6,8 @@
using Performance.DtoModels;
using Performance.EntityModels;
using Performance.Infrastructure;
using Performance.Repository;
using static Performance.Services.ExtractExcelService.WriteDataHelper;
namespace Performance.Services
{
......@@ -62,9 +64,9 @@ public UniteDeptDetailResponse UniteDeptDetail(int allotId, UnitType unitType, s
{ "工号", item.JobNumber },
{ "姓名", item.EmployeeName },
{ "系数", ValueFormating(item.PostCoefficient,"") },
{ "出勤", ValueFormating(item.Attendance, DataFormat.百分比.ToString()) },
{ "出勤", ValueFormating(item.Attendance, UniteDept.Format.百分比.ToString()) },
{ "其他绩效", ValueFormating(item.OtherPerfor,"") },
{ "绩效合计", ValueFormating(item.PerforTotal,DataFormat.小数2.ToString()) },
{ "绩效合计", ValueFormating(item.PerforTotal,UniteDept.Format.两位小数.ToString()) },
});
}
......@@ -125,7 +127,7 @@ public UniteDeptDetailResponse UniteDeptDetail(int allotId, UnitType unitType, s
{ "量化指标", item.QuantitativeIndicators },
{ "数量", ValueFormating(item.Quantity, "") },
{ "量化指标绩效分值", ValueFormating(item.QuantitativeIndicatorsValue, "") },
{ "工作量绩效", ValueFormating(item.QuantitativeFee, DataFormat.小数2.ToString()) },
{ "工作量绩效", ValueFormating(item.QuantitativeFee, UniteDept.Format.两位小数.ToString()) },
});
}
......@@ -168,7 +170,7 @@ public UniteDeptDetailResponse UniteDeptDetail(int allotId, UnitType unitType, s
{
{ "量化指标", post.Key.TypeName },
{ "量化分值", ValueFormating(lhfz, "") },
{ "核算比例", ValueFormating(post.FirstOrDefault().FactorValue, DataFormat.百分比.ToString()) },
{ "核算比例", ValueFormating(post.FirstOrDefault().FactorValue, UniteDept.Format.百分比.ToString()) },
{ "核算分值", ValueFormating(hsfz, "") },
};
items.Add(row);
......@@ -287,8 +289,7 @@ public UniteDeptDetailResponse UniteDeptDetail(int allotId, UnitType unitType, s
foreach (var sheet in persheet.Where(t => t.SheetType == (int)map.SheetType))
{
var type = TypeConversion(account.UnitType);
var sheetName = new Regex("[0-9]*").Replace(sheet.SheetName, "", 5).Replace(".", "").Replace(" ", "");
sheetName = sheetName != "科室考核" ? sheetName.Replace("科室绩效", "").Replace("科室", "") : sheetName;
var sheetName = BeautifulName(sheet.SheetName);
var items = new List<Dictionary<string, object>>();
var postDatas = basicData.Where(t => t.SheetID == sheet.ID && t.IsTotal != 1 && t.UnitType == (int)type);
......@@ -312,41 +313,27 @@ public UniteDeptDetailResponse UniteDeptDetail(int allotId, UnitType unitType, s
}
#endregion
// Display = 0 全部可见 Display = 1 管理员可见,科室需要下发后才能看到
var detailConfig = new[]
{
new { Display = 1, Format = DataFormat.整数, Title = UniteDept.Title.业绩分值 },
new { Display = 1, Format = DataFormat.百分比, Title = UniteDept.Title.预算比例 },
new { Display = 1, Format = DataFormat.整数, Title = UniteDept.Title.业绩绩效 },
new { Display = 1, Format = DataFormat.整数, Title = UniteDept.Title.工作量绩效 },
new { Display = 1, Format = DataFormat.整数, Title = UniteDept.Title.考核前其他绩效 },
new { Display = 0, Format = DataFormat.整数, Title = UniteDept.Title.考核前绩效 },
new { Display = 1, Format = DataFormat.百分比, Title = UniteDept.Title.考核得分率 },
new { Display = 1, Format = DataFormat.整数, Title = UniteDept.Title.药占比奖罚 },
new { Display = 1, Format = DataFormat.整数, Title = UniteDept.Title.材料占比奖罚 },
new { Display = 1, Format = DataFormat.整数, Title = UniteDept.Title.医院奖罚 },
new { Display = 1, Format = DataFormat.整数, Title = UniteDept.Title.考核后绩效 },
new { Display = 1, Format = DataFormat.整数, Title = UniteDept.Title.考核后其他绩效 },
new { Display = 0, Format = DataFormat.百分比, Title = UniteDept.Title.调节系数 },
new { Display = 0, Format = DataFormat.整数, Title = UniteDept.Title.调节后其他绩效 },
new { Display = 1, Format = DataFormat.整数, Title = UniteDept.Title.实发绩效 },
};
//当角色对应时过滤
var userInfo = _userRepository.GetUser(userId);
// 应用用户设置的显示规则
var settings = GetUniteDeptDetailSetting(allotId);
foreach (var detail in response.DetailItems)
{
detail.Display = true;
var cfg = detailConfig.FirstOrDefault(w => w.Title.ToString() == detail.Title);
var cfg = settings.DetailItems.FirstOrDefault(w => w.Title == detail.Title);
// 部分左右侧显示全部格式化
detail.TotalFormat = ValueFormating(detail.Total, cfg?.Format.ToString());
detail.TotalFormat = ValueFormating(detail.Total, cfg?.Format);
// 只对右侧设置排序
detail.Sort = detail.Type == (int)UniteDept.Type.左侧下拉 || cfg == null ? detail.Sort : (int)cfg.Title;
detail.Sort = detail.Type == (int)UniteDept.Type.左侧下拉 || cfg == null ? detail.Sort : cfg.Sort;
// 备注
detail.Remark = allot.ShowFormula == 1 ? cfg?.Remark : null;
// 只对科室查看时右侧并且未下发隐藏内容
if (userInfo.IsSecondAdmin && detail.Type == (int)UniteDept.Type.右侧收缩 && cfg?.Display == 1 && allot.States != (int)AllotStates.绩效下发 && allot.States != (int)AllotStates.归档)
if (userInfo.IsSecondAdmin
&& detail.Type == (int)UniteDept.Type.右侧收缩
&& cfg?.Display == UniteDept.DisplayRule.下发显示.ToString()
&& allot.States != (int)AllotStates.绩效下发
&& allot.States != (int)AllotStates.归档)
{
detail.Display = false;
}
......@@ -356,7 +343,7 @@ public UniteDeptDetailResponse UniteDeptDetail(int allotId, UnitType unitType, s
return response;
}
// 详情页面数值格式化
private string ValueFormating(decimal? value, string format)
{
var total = value ?? 0;
......@@ -364,24 +351,39 @@ private string ValueFormating(decimal? value, string format)
{
return string.Format("{0:0.####}", total);
}
else if (Math.Abs(total) < 1.5m)
{
return string.Format("{0:0.####}", total);
}
else
{
if (format == DataFormat.整数.ToString())
if (format == UniteDept.Format.百分比.ToString())
{
return string.Format("{0:P}", total);
}
else if (Math.Abs(total) < 1.5m)
{
return string.Format("{0:0.####}", total);
}
else if (format == UniteDept.Format.整数.ToString())
{
return Math.Round(total, 0, MidpointRounding.AwayFromZero).ToString();
}
else if (format == DataFormat.小数2.ToString())
else if (format == UniteDept.Format.一位小数.ToString())
{
total = Math.Round(total, 1, MidpointRounding.AwayFromZero);
return string.Format("{0:0.####}", total);
}
else if (format == UniteDept.Format.两位小数.ToString())
{
total = Math.Round(total, 2, MidpointRounding.AwayFromZero);
return string.Format("{0:0.####}", total);
}
else if (format == DataFormat.百分比.ToString())
else if (format == UniteDept.Format.三位小数.ToString())
{
return string.Format("{0:P}", total);
total = Math.Round(total, 3, MidpointRounding.AwayFromZero);
return string.Format("{0:0.####}", total);
}
else if (format == UniteDept.Format.四位小数.ToString())
{
total = Math.Round(total, 3, MidpointRounding.AwayFromZero);
return string.Format("{0:0.####}", total);
}
return string.Format("{0:0.####}", total);
}
......@@ -392,5 +394,99 @@ private string BeautifulName(string sheetName)
sheetName = sheetName != "科室考核" ? sheetName.Replace("科室绩效", "").Replace("科室", "") : sheetName;
return sheetName;
}
/// <summary>
/// 查询显示设置内容
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
/// <exception cref="PerformanceException"></exception>
public UniteDeptSetting GetUniteDeptDetailSetting(int allotId)
{
var entity = _perforCofDeptDetailRepository.GetEntity(w => w.AllotId == allotId);
if (!string.IsNullOrEmpty(entity?.Settings))
{
return JsonHelper.Deserialize<UniteDeptSetting>(entity.Settings);
}
var allot = perforPerallotRepository.GetEntity(t => t.ID == allotId);
if (allot == null) throw new PerformanceException("绩效月信息错误");
var ignore = new string[] { "合计", "汇总", "总计" };
var persheet = _perforPerSheetRepository.GetEntities(t => t.AllotID == allotId) ?? new List<per_sheet>();
var headers = _perforImheaderRepository.GetEntities(t => t.AllotID == allotId) ?? new List<im_header>();
var basicData = _perforImDataRepository.GetEntities(t => t.AllotID == allotId) ?? new List<im_data>();
var response = new UniteDeptSetting() { };
response.DetailItems.Add(new UniteDeptDetailItem { Title = UniteDept.Title.业绩分值.ToString(), Type = (int)UniteDept.Type.右侧收缩, Format = UniteDept.Format.整数.ToString(), });
response.DetailItems.Add(new UniteDeptDetailItem { Title = UniteDept.Title.业绩绩效.ToString(), Type = (int)UniteDept.Type.右侧收缩, Format = UniteDept.Format.整数.ToString(), });
response.DetailItems.Add(new UniteDeptDetailItem { Title = UniteDept.Title.工作量绩效.ToString(), Type = (int)UniteDept.Type.右侧收缩, Format = UniteDept.Format.整数.ToString(), });
response.DetailItems.Add(new UniteDeptDetailItem { Title = UniteDept.Title.考核前绩效.ToString(), Type = (int)UniteDept.Type.右侧收缩, Format = UniteDept.Format.整数.ToString(), });
// 只显示合计没有详情
response.DetailItems.Add(new UniteDeptDetailItem { Title = UniteDept.Title.考核后绩效.ToString(), Type = (int)UniteDept.Type.右侧收缩, Format = UniteDept.Format.整数.ToString(), Remark = "考核前绩效 × 考核得分率 + 药占比奖罚 + 材料占比奖罚 + 医院奖罚 + 考核后其他绩效" });
response.DetailItems.Add(new UniteDeptDetailItem { Title = UniteDept.Title.考核后其他绩效.ToString(), Type = (int)UniteDept.Type.右侧收缩, Format = UniteDept.Format.整数.ToString(), });
response.DetailItems.Add(new UniteDeptDetailItem { Title = UniteDept.Title.调节系数.ToString(), Type = (int)UniteDept.Type.右侧收缩, Format = UniteDept.Format.百分比.ToString(), });
response.DetailItems.Add(new UniteDeptDetailItem { Title = UniteDept.Title.实发绩效.ToString(), Type = (int)UniteDept.Type.右侧收缩, Format = UniteDept.Format.整数.ToString(), Remark = "考核后绩效 × 调节系数 + 调节后其他绩效" });
// 显示详情
#region 补全公共附属表明细
{
var rightSheetTypeMaps = new List<UniteDeptDetailItem>()
{
new UniteDeptDetailItem { Title = UniteDept.Title.预算比例.ToString(), SheetType = (int)SheetType.BudgetRatio, Format = UniteDept.Format.百分比.ToString(), },
new UniteDeptDetailItem { Title = UniteDept.Title.医院奖罚.ToString(), SheetType = (int)SheetType.AccountExtra, Format = UniteDept.Format.整数.ToString(), },
new UniteDeptDetailItem { Title = UniteDept.Title.考核前其他绩效.ToString(), SheetType = (int)SheetType.AssessBeforeOtherFee, Format = UniteDept.Format.整数.ToString(), },
new UniteDeptDetailItem { Title = UniteDept.Title.药占比奖罚.ToString(), SheetType = (int)SheetType.AccountDrugAssess, Format = UniteDept.Format.整数.ToString(), },
new UniteDeptDetailItem { Title = UniteDept.Title.材料占比奖罚.ToString(), SheetType = (int)SheetType.AccountMaterialsAssess, Format = UniteDept.Format.整数.ToString(), },
new UniteDeptDetailItem { Title = UniteDept.Title.考核得分率.ToString(), SheetType = (int)SheetType.AccountScoreAverage, Format = UniteDept.Format.百分比.ToString(), },
new UniteDeptDetailItem { Title = UniteDept.Title.调节后其他绩效.ToString(), SheetType = (int)SheetType.AccountAdjustLaterOtherFee, Format = UniteDept.Format.整数.ToString(), },
};
foreach (var detail in rightSheetTypeMaps)
{
foreach (var sheet in persheet.Where(t => t.SheetType == detail.SheetType))
{
var sheetName = BeautifulName(sheet.SheetName);
var items = new List<UniteDeptDetailItem>();
var postDatas = basicData.Where(t => t.SheetID == sheet.ID && t.IsTotal != 1);
foreach (var post in postDatas.GroupBy(t => new { t.TypeName }))
{
if (ignore.Contains(post.Key.TypeName)) continue;
items.Add(new UniteDeptDetailItem { Title = post.Key.TypeName, Type = (int)UniteDept.Type.右侧收缩 });
}
detail.Items = items;
response.DetailItems.Add(detail);
}
}
}
#endregion
var enumItems = EnumHelper.GetItems<UniteDept.Title>();
foreach (var detail in response.DetailItems)
{
detail.Display = UniteDept.DisplayRule.始终显示.ToString();
var cfg = enumItems.FirstOrDefault(w => w.Name == detail.Title);
// 只对右侧设置排序
detail.Sort = detail.Type == (int)UniteDept.Type.左侧下拉 || cfg == null ? detail.Sort : cfg.Value;
}
response.DetailItems = response.DetailItems.OrderBy(w => w.Type).ThenBy(w => w.Sort).ToList();
return response;
}
public void SaveUniteDeptDetailSetting(int allotId, UniteDeptSetting request)
{
var entity = _perforCofDeptDetailRepository.GetEntity(w => w.AllotId == allotId);
if (entity == null)
{
entity = new cof_dept_detail { AllotId = allotId, CreateTime = DateTime.Now, Settings = JsonHelper.Serialize(request) };
_perforCofDeptDetailRepository.Add(entity);
}
else
{
entity.Settings = JsonHelper.Serialize(request);
_perforCofDeptDetailRepository.Update(entity);
}
}
}
}
......@@ -38,6 +38,7 @@ public partial class ComputeService : IAutoInjection
private readonly PerforCofaccountingRepository _cofaccountingRepository;
private readonly PerforCofaliasRepository cofaliasRepository;
private readonly PerforReportRepository reportRepository;
private readonly PerforCofDeptDetailRepository _perforCofDeptDetailRepository;
public ComputeService(
IMapper mapper,
......@@ -62,7 +63,8 @@ public partial class ComputeService : IAutoInjection
PerforCofworkitemRepository cofworkitemRepository,
PerforCofaccountingRepository cofaccountingRepository,
PerforCofaliasRepository cofaliasRepository,
PerforReportRepository reportRepository)
PerforReportRepository reportRepository,
PerforCofDeptDetailRepository perforCofDeptDetailRepository)
{
_mapper = mapper;
_userRepository = userRepository;
......@@ -87,6 +89,7 @@ public partial class ComputeService : IAutoInjection
_cofaccountingRepository = cofaccountingRepository;
this.cofaliasRepository = cofaliasRepository;
this.reportRepository = reportRepository;
_perforCofDeptDetailRepository = perforCofDeptDetailRepository;
}
public int IsShowManage(int allotId)
......@@ -1676,7 +1679,7 @@ public ag_secondallot GetSecondByAccountId(int accountId)
Department = special.AccountingUnit,
UnitType = UnitType.特殊核算组.ToString()
};
}
}
#endregion
public DeptDataDetails GetDoctorDetail(int computeId)
......@@ -1735,7 +1738,7 @@ public DeptDataDetails GetDoctorDetail(int computeId)
var data = _perforImDataRepository.GetEntities(t => t.AllotID == resCompute.AllotID && sheets.Select(s => s.ID).Contains(t.SheetID.Value)
&& t.JobNumber == resCompute.JobNumber) ?? new List<im_data>();
data = data.Where(t => t.UnitType != null && Enum.IsDefined(typeof(UnitType), t.UnitType ) == true && ((UnitType)t.UnitType).ToString() == resCompute.UnitType && t.AccountingUnit == resCompute.AccountingUnit).ToList();
data = data.Where(t => t.UnitType != null && Enum.IsDefined(typeof(UnitType), t.UnitType) == true && ((UnitType)t.UnitType).ToString() == resCompute.UnitType && t.AccountingUnit == resCompute.AccountingUnit).ToList();
foreach (var sheet in sheets)
{
......
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