Commit 44911792 by ruyun.zhang@suvalue.com

Merge branch '钟博' into v2020morge

parents 0211ae40 87891ac7
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "5.0.1",
"commands": [
"dotnet-ef"
]
}
}
}
\ No newline at end of file
...@@ -446,7 +446,9 @@ public ApiResponse SecondPrint(int secondid) ...@@ -446,7 +446,9 @@ public ApiResponse SecondPrint(int secondid)
public ApiResponse DeptComputeDetail(int allotId) public ApiResponse DeptComputeDetail(int allotId)
{ {
var userId = claimService.GetUserId(); var userId = claimService.GetUserId();
var data = secondAllotService.DeptComputeDetail(userId, allotId, out int isShowManage); //var data = secondAllotService.DeptComputeDetail(userId, allotId, out int isShowManage);
var data = secondAllotService.DeptComputeDetailList(userId, allotId, out int isShowManage);
return new ApiResponse(ResponseType.OK, new { isShowManage, data }); return new ApiResponse(ResponseType.OK, new { isShowManage, data });
} }
} }
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
<PropertyGroup> <PropertyGroup>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest> <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
<UserSecretsId>e732666b-5531-4cd8-b713-2fe3db31126c</UserSecretsId>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<ProjectGuid>3ae00ff5-f0ba-4d72-a23b-770186309327</ProjectGuid> <ProjectGuid>3ae00ff5-f0ba-4d72-a23b-770186309327</ProjectGuid>
<SelfContained>false</SelfContained> <SelfContained>false</SelfContained>
<_IsPortable>true</_IsPortable> <_IsPortable>true</_IsPortable>
<publishUrl>E:\release\jx.suvalue.com</publishUrl> <publishUrl>D:\release</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles> <DeleteExistingFiles>True</DeleteExistingFiles>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
\ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
}, },
"AppConnection": { "AppConnection": {
//"PerformanceConnectionString": "server=112.124.13.17;database=db_performance;uid=suvalue;pwd=suvalue2016;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;", //"PerformanceConnectionString": "server=112.124.13.17;database=db_performance;uid=suvalue;pwd=suvalue2016;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;",
"PerformanceConnectionString": "server=192.168.18.166;database=db_performance;uid=root;pwd=1234qwer;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;", "PerformanceConnectionString": "server=192.168.18.166;database=db_yubei;uid=root;pwd=1234qwer;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;",
"HangfireConnectionString": "server=192.168.18.166;database=db_hangfire;uid=root;pwd=1234qwer;port=3306;allow user variables=true;", "HangfireConnectionString": "server=192.168.18.166;database=db_hangfire;uid=root;pwd=1234qwer;port=3306;allow user variables=true;",
"RedisConnectionString": "116.62.245.55:6379,defaultDatabase=2" "RedisConnectionString": "116.62.245.55:6379,defaultDatabase=2"
}, },
......
...@@ -40,6 +40,8 @@ public void SetRowData(IEnumerable<HandsonRowData> datas, bool isTypein) ...@@ -40,6 +40,8 @@ public void SetRowData(IEnumerable<HandsonRowData> datas, bool isTypein)
dic[item.Name.ToLower()] = item.Value?.ToString() ?? ""; dic[item.Name.ToLower()] = item.Value?.ToString() ?? "";
else if (dic.ContainsKey(item.Name.ToLower()) && _permissions.Any(w => w.HeadName.ToLower() == item.Name.ToLower() && w.AttachLast > 0)) else if (dic.ContainsKey(item.Name.ToLower()) && _permissions.Any(w => w.HeadName.ToLower() == item.Name.ToLower() && w.AttachLast > 0))
dic[item.Name.ToLower()] = item.Value?.ToString() ?? ""; dic[item.Name.ToLower()] = item.Value?.ToString() ?? "";
else if (dic.ContainsKey(item.Name.ToLower()) && _permissions.Any(w => w.HeadName.ToLower() == item.Name.ToLower()))
dic[item.Name.ToLower()] = item.Value?.ToString() ?? "";
} }
_data.Add(dic); _data.Add(dic);
} }
......
...@@ -119,7 +119,7 @@ public class im_accountbasic ...@@ -119,7 +119,7 @@ public class im_accountbasic
///// <summary> ///// <summary>
///// 医院奖罚 ///// 医院奖罚
///// </summary> ///// </summary>
//public Nullable<decimal> DoctorExtra { get; set; } public Nullable<decimal> DoctorExtra { get; set; }
/// <summary> /// <summary>
/// 考核对分率 /// 考核对分率
......
...@@ -78,8 +78,13 @@ public bool SaveBudgetData(int mainYear, List<BudgetResponse> request, int userI ...@@ -78,8 +78,13 @@ public bool SaveBudgetData(int mainYear, List<BudgetResponse> request, int userI
if (amounts != null && perbudgetamountRepository.AddRange(amounts.ToArray())) if (amounts != null && perbudgetamountRepository.AddRange(amounts.ToArray()))
{ {
var ratios = Mapper.Map<List<per_budget_ratio>>(request.Where(t => t.Type == 2)); var ratios = Mapper.Map<List<per_budget_ratio>>(request.Where(t => t.Type == 2));
var budgetData = request.FirstOrDefault(t => t.Type == 2);
ratios.ForEach(t => ratios.ForEach(t =>
{ {
t.HospitalRevenue = budgetData?.HospitalRevenue;
t.MeritPayIncrement = budgetData?.MeritPayIncrement;
t.TheDrugIncomeBudget = budgetData?.TheDrugIncomeBudget;
t.MaterialIncomeBudget = budgetData?.MaterialIncomeBudget;
t.MainYear = mainYear; t.MainYear = mainYear;
t.CreateTime = DateTime.Now; t.CreateTime = DateTime.Now;
t.CreateUser = userId; t.CreateUser = userId;
...@@ -136,19 +141,20 @@ public bool ModifyBudgetData(List<BudgetResponse> request) ...@@ -136,19 +141,20 @@ public bool ModifyBudgetData(List<BudgetResponse> request)
foreach (var item in ratios) foreach (var item in ratios)
{ {
var data = request.FirstOrDefault(t => t.Type == 2 && t.Id == item.Id); var data = request.FirstOrDefault(t => t.Type == 2 && t.Id == item.Id);
var budgetData = request.FirstOrDefault(t => t.Type == 2);
if (data == null) continue; if (data == null) continue;
item.HospitalRevenue = data.HospitalRevenue; item.HospitalRevenue = data.HospitalRevenue == 0 ? budgetData?.HospitalRevenue:data.HospitalRevenue;
item.TotalLaborCost = data.TotalLaborCost; item.TotalLaborCost = data.TotalLaborCost;
item.StaffSpendingFixed = data.StaffSpendingFixed; item.StaffSpendingFixed = data.StaffSpendingFixed;
item.StaffSpendingBonus = data.StaffSpendingBonus; item.StaffSpendingBonus = data.StaffSpendingBonus;
item.MeritPayIncrement = data.MeritPayIncrement; item.MeritPayIncrement = data.MeritPayIncrement==0?budgetData?.MeritPayIncrement:data.MeritPayIncrement;
item.TotalMeritPay = data.TotalMeritPay; item.TotalMeritPay = data.TotalMeritPay;
item.Amplification = data.Amplification; item.Amplification = data.Amplification;
item.IncrementCapitaRatio = data.IncrementCapitaRatio; item.IncrementCapitaRatio = data.IncrementCapitaRatio;
item.TheDrugIncome = data.TheDrugIncome; item.TheDrugIncome = data.TheDrugIncome;
item.TheDrugIncomeBudget = data.TheDrugIncomeBudget; item.TheDrugIncomeBudget = data.TheDrugIncomeBudget==0?budgetData?.TheDrugIncomeBudget:data.TheDrugIncomeBudget;
item.MaterialIncome = data.MaterialIncome; item.MaterialIncome = data.MaterialIncome;
item.MaterialIncomeBudget = data.MaterialIncomeBudget; item.MaterialIncomeBudget = data.MaterialIncomeBudget==0?budgetData?.MaterialIncomeBudget:data.MaterialIncomeBudget;
item.TheCostInTotal = data.TheCostInTotal; item.TheCostInTotal = data.TheCostInTotal;
item.DepreOfFixedAssets = data.DepreOfFixedAssets; item.DepreOfFixedAssets = data.DepreOfFixedAssets;
item.AmortOfIntangibleAssets = data.AmortOfIntangibleAssets; item.AmortOfIntangibleAssets = data.AmortOfIntangibleAssets;
......
...@@ -7,9 +7,12 @@ ...@@ -7,9 +7,12 @@
using Performance.Repository; using Performance.Repository;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization;
using System.Linq; using System.Linq;
using System.Linq.Expressions; using System.Linq.Expressions;
using System.Text; using System.Text;
using Google.Protobuf.WellKnownTypes;
using HandsonRowData = Performance.DtoModels.HandsonRowData;
namespace Performance.Services namespace Performance.Services
{ {
...@@ -26,6 +29,8 @@ public class CollectService : IAutoInjection ...@@ -26,6 +29,8 @@ public class CollectService : IAutoInjection
private readonly PerforcollectdataRepository perforcollectdataRepository; private readonly PerforcollectdataRepository perforcollectdataRepository;
private readonly PerforcollectpermissionRepository perforcollectpermissionRepository; private readonly PerforcollectpermissionRepository perforcollectpermissionRepository;
private readonly PerforUserroleRepository userroleRepository; private readonly PerforUserroleRepository userroleRepository;
private readonly PerforImaccountbasicRepository perforImaccountbasicRepository;
private readonly SheetSevice sheetSevice;
private readonly Application options; private readonly Application options;
public CollectService( public CollectService(
...@@ -40,6 +45,8 @@ public class CollectService : IAutoInjection ...@@ -40,6 +45,8 @@ public class CollectService : IAutoInjection
PerforcollectdataRepository perforcollectdataRepository, PerforcollectdataRepository perforcollectdataRepository,
PerforcollectpermissionRepository perforcollectpermissionRepository, PerforcollectpermissionRepository perforcollectpermissionRepository,
PerforUserroleRepository userroleRepository, PerforUserroleRepository userroleRepository,
PerforImaccountbasicRepository perforImaccountbasicRepository,
SheetSevice sheetSevice,
IOptions<Application> options) IOptions<Application> options)
{ {
this.userRepository = userRepository; this.userRepository = userRepository;
...@@ -53,6 +60,8 @@ public class CollectService : IAutoInjection ...@@ -53,6 +60,8 @@ public class CollectService : IAutoInjection
this.perforcollectdataRepository = perforcollectdataRepository; this.perforcollectdataRepository = perforcollectdataRepository;
this.perforcollectpermissionRepository = perforcollectpermissionRepository; this.perforcollectpermissionRepository = perforcollectpermissionRepository;
this.userroleRepository = userroleRepository; this.userroleRepository = userroleRepository;
this.perforImaccountbasicRepository = perforImaccountbasicRepository;
this.sheetSevice = sheetSevice;
this.options = options.Value; this.options = options.Value;
} }
...@@ -220,7 +229,7 @@ private IEnumerable<collect_permission> GetCollectSheetByAllot(int hospitalId, i ...@@ -220,7 +229,7 @@ private IEnumerable<collect_permission> GetCollectSheetByAllot(int hospitalId, i
var types = new[] { (int)SheetType.Employee, (int)SheetType.OtherIncome, (int)SheetType.Expend, (int)SheetType.Workload, var types = new[] { (int)SheetType.Employee, (int)SheetType.OtherIncome, (int)SheetType.Expend, (int)SheetType.Workload,
(int)SheetType.ClinicEmployee, (int)SheetType.AccountExtra, (int)SheetType.PersonExtra, (int)SheetType.LogisticsEmployee, (int)SheetType.ClinicEmployee, (int)SheetType.AccountExtra, (int)SheetType.PersonExtra, (int)SheetType.LogisticsEmployee,
(int)SheetType.AccountDrugAssess, (int)SheetType.AccountMaterialsAssess, (int)SheetType.AccountScoreAverage, (int)SheetType.AccountDrugAssess, (int)SheetType.AccountMaterialsAssess, (int)SheetType.AccountScoreAverage,
(int)SheetType.BudgetRatio, (int)SheetType.AssessBeforeOtherFee }; (int)SheetType.BudgetRatio, (int)SheetType.AssessBeforeOtherFee,(int)SheetType.AccountBasic };
var sheets = perforPersheetRepository.GetEntities(w => w.AllotID == allot.ID && types.Contains((w.SheetType ?? 0))); var sheets = perforPersheetRepository.GetEntities(w => w.AllotID == allot.ID && types.Contains((w.SheetType ?? 0)));
var headers = perforImheaderRepository.GetEntities(w => w.AllotID == allot.ID); var headers = perforImheaderRepository.GetEntities(w => w.AllotID == allot.ID);
...@@ -295,7 +304,7 @@ public HandsonTable GetCollectData(int userId, int allotId, string sheetName) ...@@ -295,7 +304,7 @@ public HandsonTable GetCollectData(int userId, int allotId, string sheetName)
var types = new[] { (int)SheetType.Employee, (int)SheetType.OtherIncome, (int)SheetType.Expend, (int)SheetType.Workload, var types = new[] { (int)SheetType.Employee, (int)SheetType.OtherIncome, (int)SheetType.Expend, (int)SheetType.Workload,
(int)SheetType.ClinicEmployee, (int)SheetType.AccountExtra, (int)SheetType.PersonExtra, (int)SheetType.LogisticsEmployee, (int)SheetType.ClinicEmployee, (int)SheetType.AccountExtra, (int)SheetType.PersonExtra, (int)SheetType.LogisticsEmployee,
(int)SheetType.AccountDrugAssess, (int)SheetType.AccountMaterialsAssess, (int)SheetType.AccountScoreAverage, (int)SheetType.AccountDrugAssess, (int)SheetType.AccountMaterialsAssess, (int)SheetType.AccountScoreAverage,
(int)SheetType.BudgetRatio, (int)SheetType.AssessBeforeOtherFee }; (int)SheetType.BudgetRatio, (int)SheetType.AssessBeforeOtherFee,(int)SheetType.AccountBasic};
var sheet = perforPersheetRepository var sheet = perforPersheetRepository
.GetEntity(w => w.AllotID == allot.ID && w.SheetName == sheetName && types.Contains((w.SheetType ?? 0))); .GetEntity(w => w.AllotID == allot.ID && w.SheetName == sheetName && types.Contains((w.SheetType ?? 0)));
...@@ -325,6 +334,8 @@ public HandsonTable GetCollectData(int userId, int allotId, string sheetName) ...@@ -325,6 +334,8 @@ public HandsonTable GetCollectData(int userId, int allotId, string sheetName)
config = CollectDataConfig.LogisticsEmployee; config = CollectDataConfig.LogisticsEmployee;
else if (sheet.SheetType == (int)SheetType.PersonExtra) else if (sheet.SheetType == (int)SheetType.PersonExtra)
config = CollectDataConfig.PersonExtra; config = CollectDataConfig.PersonExtra;
else if (sheet.SheetType == (int)SheetType.AccountBasic)
config = CollectDataConfig.AccountBasic;
else else
config = CollectDataConfig.Default; config = CollectDataConfig.Default;
...@@ -354,6 +365,8 @@ public HandsonTable GetCollectData(int userId, int allotId, string sheetName) ...@@ -354,6 +365,8 @@ public HandsonTable GetCollectData(int userId, int allotId, string sheetName)
rowDatas = GetClinicEmployee(sheet); rowDatas = GetClinicEmployee(sheet);
else if (sheet.SheetType == (int)SheetType.LogisticsEmployee) else if (sheet.SheetType == (int)SheetType.LogisticsEmployee)
rowDatas = GetLogisticsEmployee(sheet); rowDatas = GetLogisticsEmployee(sheet);
else if (sheet.SheetType == (int)SheetType.AccountBasic)
rowDatas = GetAccountBasic(sheet);
else else
rowDatas = GetCommonData(sheet); rowDatas = GetCommonData(sheet);
} }
...@@ -384,12 +397,21 @@ private List<HandsonRowData> GetCommonData(per_sheet sheet) ...@@ -384,12 +397,21 @@ private List<HandsonRowData> GetCommonData(per_sheet sheet)
var units = rowdata.Where(w => w.UnitType.HasValue).Select(w => new { w.UnitType, w.AccountingUnit }).Distinct(); var units = rowdata.Where(w => w.UnitType.HasValue).Select(w => new { w.UnitType, w.AccountingUnit }).Distinct();
foreach (var item in units) foreach (var item in units)
{ {
if ((new[] { (int)UnitType.医生组, (int)UnitType.其他医生组 }).Contains(item.UnitType.Value)) if ((new[] {(int) UnitType.医生组, (int) UnitType.其他医生组}).Contains(item.UnitType.Value))
{
setdata.Add(new HandsonCellData("核算单元(医生组)", item.AccountingUnit)); setdata.Add(new HandsonCellData("核算单元(医生组)", item.AccountingUnit));
else if ((new[] { (int)UnitType.医技组, (int)UnitType.其他医技组 }).Contains(item.UnitType.Value)) GetUnitClassification(setdata,UnitType.医生组,sheet);
}
else if ((new[] {(int) UnitType.医技组, (int) UnitType.其他医技组}).Contains(item.UnitType.Value))
{
setdata.Add(new HandsonCellData("核算单元(医技组)", item.AccountingUnit)); setdata.Add(new HandsonCellData("核算单元(医技组)", item.AccountingUnit));
else if ((new[] { (int)UnitType.护理组, (int)UnitType.其他护理组 }).Contains(item.UnitType.Value)) GetUnitClassification(setdata,UnitType.医技组,sheet);
}
else if ((new[] {(int) UnitType.护理组, (int) UnitType.其他护理组}).Contains(item.UnitType.Value))
{
setdata.Add(new HandsonCellData("核算单元(护理组)", item.AccountingUnit)); setdata.Add(new HandsonCellData("核算单元(护理组)", item.AccountingUnit));
GetUnitClassification(setdata,UnitType.护理组,sheet);
}
setdata.Add(new HandsonCellData("核算单元", item.AccountingUnit)); setdata.Add(new HandsonCellData("核算单元", item.AccountingUnit));
} }
if (sheet.SheetType == (int)SheetType.PersonExtra) if (sheet.SheetType == (int)SheetType.PersonExtra)
...@@ -444,7 +466,64 @@ private HandsonRowData CreateRowData(int row, ColumnInfo[] columns, SortedDictio ...@@ -444,7 +466,64 @@ private HandsonRowData CreateRowData(int row, ColumnInfo[] columns, SortedDictio
var setdata = from cfg in columns var setdata = from cfg in columns
join d in dic.Keys on cfg.Field.ToUpper() equals d.ToUpper() join d in dic.Keys on cfg.Field.ToUpper() equals d.ToUpper()
select new HandsonCellData(cfg.Description, dic[d]); select new HandsonCellData(cfg.Description, dic[d]);
return new HandsonRowData(row, setdata); var xx = new HandsonRowData(row, setdata);
return xx;
}
private List<HandsonRowData> GetAccountBasic(per_sheet sheet)
{
//var accounts = sheetSevice.SheetExport(sheet.ID);
var result = new List<HandsonRowData>();
var groupAccount = perforImdataRepository.GetEntities(t => t.SheetID == sheet.ID); //.OrderBy(c=>c.RowNumber).GroupBy(c => c.RowNumber);
if (groupAccount != null && groupAccount.Any())
{
foreach (var rowNumber in groupAccount.Select(t=>t.RowNumber).Distinct())
{
var numberData = groupAccount.Where(t => t.RowNumber == rowNumber);
var accountUnit = new HandsonCellData("核算单元",numberData.First().AccountingUnit);
var data = numberData?.Select(t => new HandsonCellData(t.TypeName, t.CellValue)).ToList();
data.Add(accountUnit);
switch (numberData.First().UnitType)
{
case (int)UnitType.医技组:
var unitType = new HandsonCellData("核算单元类型", UnitType.医技组);
data.Add(unitType);
break;
case (int)UnitType.医生组:
unitType = new HandsonCellData("核算单元类型", UnitType.医生组);
data.Add(unitType);
break;
case (int)UnitType.护理组:
unitType = new HandsonCellData("核算单元类型", UnitType.护理组);
data.Add(unitType);
break;
case (int)UnitType.特殊核算组:
unitType = new HandsonCellData("核算单元类型", UnitType.特殊核算组);
data.Add(unitType);
break;
}
var rowData = new HandsonRowData(rowNumber.Value,data);
result.Add(rowData);
}
//var temps = accounts.Row.Select(item => new { row = item.Rownumber, dic = JsonHelper.Deserialize(item) });
//return new List<HandsonRowData>(temps.Select(temp => CreateRowData(temp.row, ExcelReadConfig.AccountBaisc, temp.dic)));
}
return result;
}
private void GetUnitClassification(List<HandsonCellData> setdata,UnitType unitType,per_sheet sheet)
{
if (sheet.SheetType == (int)SheetType.AccountExtra)
setdata.Add(new HandsonCellData("核算组别", unitType));
else if (sheet.SheetType == (int)SheetType.PersonExtra)
setdata.Add(new HandsonCellData("核算单元分类", unitType));
else if (sheet.SheetType == (int)SheetType.BudgetRatio)
setdata.Add(new HandsonCellData("核算单元类型", unitType));
} }
#endregion #endregion
...@@ -580,6 +659,15 @@ public class CollectDataConfig ...@@ -580,6 +659,15 @@ public class CollectDataConfig
{ nameof(collect_data.EmployeeName), "医生姓名" }, { nameof(collect_data.EmployeeName), "医生姓名" },
}; };
public static Dictionary<string, string> AccountBasic { get; } = new Dictionary<string, string>
{
{ nameof(collect_data.UnitType), "核算单元分类" },
{ nameof(collect_data.AccountingUnitDoctor), "核算单元" },
{ nameof(collect_data.Department), "核算单元" },
{ nameof(collect_data.JobNumber), "人员工号" },
{ nameof(collect_data.EmployeeName), "医生姓名" },
};
public static Dictionary<string, string> Default { get; } = new Dictionary<string, string> public static Dictionary<string, string> Default { get; } = new Dictionary<string, string>
{ {
{ nameof(collect_data.UnitType), "核算单元分类" }, { nameof(collect_data.UnitType), "核算单元分类" },
......
...@@ -107,7 +107,7 @@ public SecondResponse GetSecondDetails(int userId, int secondId, int hospitalId, ...@@ -107,7 +107,7 @@ public SecondResponse GetSecondDetails(int userId, int secondId, int hospitalId,
SupplyHeaderByWorkItem(hospitalId, result, secondAllot, savedDataList); SupplyHeaderByWorkItem(hospitalId, result, secondAllot, savedDataList);
result.HeadItems = result.HeadItems.OrderBy(t => t.Type).ThenBy(t => t.WorkType).ThenBy(t => t.Sort).ThenBy(t => t.FiledName).ToList(); result.HeadItems = result.HeadItems.OrderBy(t => t.Type).ThenBy(t => t.WorkType).ThenBy(t => t.Sort).ThenBy(t => t.FiledName).ToList();
result.BodyItems = result.BodyItems.OrderBy(t => t.RowNumber).ThenBy(t => t.Type).ThenBy(t => t.Sort).ToList(); result.BodyItems = result.BodyItems.OrderBy(t => t.RowNumber).ToList();
return result; return result;
} }
...@@ -628,14 +628,15 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is ...@@ -628,14 +628,15 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is
// 如果已经保存>>走保存加载逻辑 // 如果已经保存>>走保存加载逻辑
if (employeeSource == (int)EmployeeSource.Initial) if (employeeSource == (int)EmployeeSource.Initial)
{ {
result = savedDataList.OrderBy(t => t.Id).ToList(); result = savedDataList.OrderBy(t => t.WorkNumber).ToList();
} }
// 如果没保存>>走加载im_employee_logistics人员名单逻辑 // 如果没保存>>走加载im_employee_logistics人员名单逻辑
else else
{ {
var types = new string[] { "行政后勤", "行政工勤" }; var types = new string[] { "行政后勤", "行政工勤" };
var logistics = _imemployeelogisticsRepository.GetEntities(w => w.AllotID == secondAllot.AllotId && types.Contains(w.AccountType) && w.AccountingUnit == secondAllot.Department); var logistics = _imemployeelogisticsRepository.GetEntities(w => w.AllotID == secondAllot.AllotId && types.Contains(w.AccountType) && w.AccountingUnit == secondAllot.Department);
result = (logistics ?? new List<im_employee_logistics>()).Select(w => new ag_othersource result = (logistics ?? new List<im_employee_logistics>())
.OrderBy(t=>Convert.ToInt32(t.PersonnelNumber)).Select(w => new ag_othersource
{ {
SecondId = secondId, SecondId = secondId,
WorkNumber = w.PersonnelNumber, WorkNumber = w.PersonnelNumber,
...@@ -651,12 +652,12 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is ...@@ -651,12 +652,12 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is
switch (employeeSource) switch (employeeSource)
{ {
case (int)EmployeeSource.Initial: case (int)EmployeeSource.Initial:
result = savedDataList.OrderBy(t => t.Id).ToList(); result = savedDataList.OrderBy(t => Convert.ToInt32(t.WorkNumber)).ToList();
break; break;
case (int)EmployeeSource.EmployeeDict: case (int)EmployeeSource.EmployeeDict:
if (employees == null || !employees.Any()) return new List<ag_othersource>(); if (employees == null || !employees.Any()) return new List<ag_othersource>();
result = employees.Select(t => new ag_othersource result = employees.OrderBy(t=>Convert.ToInt32(t.PersonnelNumber)).Select(t => new ag_othersource
{ {
SecondId = secondId, SecondId = secondId,
WorkNumber = t.PersonnelNumber, WorkNumber = t.PersonnelNumber,
...@@ -671,7 +672,7 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is ...@@ -671,7 +672,7 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is
isSupplementTitlePerformance = prevSavedDataList == null || !prevSavedDataList.Any(); isSupplementTitlePerformance = prevSavedDataList == null || !prevSavedDataList.Any();
if (prevSavedDataList != null && prevSavedDataList.Any()) if (prevSavedDataList != null && prevSavedDataList.Any())
{ {
result = prevSavedDataList.OrderBy(t => t.Id) result = prevSavedDataList.OrderBy(t => Convert.ToInt32(t.WorkNumber))
.Select(t => new ag_othersource .Select(t => new ag_othersource
{ {
SecondId = secondId, SecondId = secondId,
......
...@@ -1818,6 +1818,37 @@ public List<SecondPerforResponse> DeptComputeDetail(int userId, int allotId, out ...@@ -1818,6 +1818,37 @@ public List<SecondPerforResponse> DeptComputeDetail(int userId, int allotId, out
return result; return result;
} }
public List<DeptDataDetails> DeptComputeDetailList(int userId, int allotId, out int isShowManage)
{
var user = perforUserRepository.GetEntity(t => t.ID == userId);
if (user == null)
throw new NotImplementedException("人员ID无效");
var deptDatas = new List<DeptDataDetails>();
var allot = perforPerallotRepository.GetEntity(t => t.ID == allotId);
isShowManage = computeService.IsShowManage(allotId);
var userrole = userroleRepository.GetEntity(t => t.UserID == userId);
var role = roleRepository.GetEntity(t => t.ID == userrole.RoleID);
Dictionary<int, string> dict = new Dictionary<int, string>
{
{ application.DirectorRole, AccountUnitType.科主任.ToString() },
{ application.NurseRole, AccountUnitType.护士长.ToString() },
{ application.OfficeRole, AccountUnitType.行政中层.ToString() },
{ application.SpecialRole, AccountUnitType.科主任.ToString() },
};
if (!dict.Keys.Contains(role.Type.Value)) return new List<DeptDataDetails>();
var computes = rescomputeRepository.GetEntities(t => t.AllotID == allotId && t.AccountingUnit == user.Department && t.AccountType == dict[role.Type.Value]);
if (computes == null || !computes.Any()) return new List<DeptDataDetails>();
foreach (var item in computes)
{
deptDatas.Add(computeService.GetDoctorDetail(item.ID));
}
return deptDatas;
}
/// <summary> /// <summary>
/// 获取一次次绩效结果 /// 获取一次次绩效结果
/// </summary> /// </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