Commit 66916752 by 钟博

admin科室数据带出、数据录入4.1显示、二次绩效按照工号排序

parent 58a80761
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "5.0.1",
"commands": [
"dotnet-ef"
]
}
}
}
\ No newline at end of file
......@@ -8,7 +8,7 @@
},
"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=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;",
"RedisConnectionString": "116.62.245.55:6379,defaultDatabase=2"
},
......
......@@ -119,7 +119,7 @@ public class im_accountbasic
///// <summary>
///// 医院奖罚
///// </summary>
//public Nullable<decimal> DoctorExtra { get; set; }
public Nullable<decimal> DoctorExtra { get; set; }
/// <summary>
/// 考核对分率
......
......@@ -7,9 +7,12 @@
using Performance.Repository;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using Google.Protobuf.WellKnownTypes;
using HandsonRowData = Performance.DtoModels.HandsonRowData;
namespace Performance.Services
{
......@@ -26,6 +29,8 @@ public class CollectService : IAutoInjection
private readonly PerforcollectdataRepository perforcollectdataRepository;
private readonly PerforcollectpermissionRepository perforcollectpermissionRepository;
private readonly PerforUserroleRepository userroleRepository;
private readonly PerforImaccountbasicRepository perforImaccountbasicRepository;
private readonly SheetSevice sheetSevice;
private readonly Application options;
public CollectService(
......@@ -40,6 +45,8 @@ public class CollectService : IAutoInjection
PerforcollectdataRepository perforcollectdataRepository,
PerforcollectpermissionRepository perforcollectpermissionRepository,
PerforUserroleRepository userroleRepository,
PerforImaccountbasicRepository perforImaccountbasicRepository,
SheetSevice sheetSevice,
IOptions<Application> options)
{
this.userRepository = userRepository;
......@@ -53,6 +60,8 @@ public class CollectService : IAutoInjection
this.perforcollectdataRepository = perforcollectdataRepository;
this.perforcollectpermissionRepository = perforcollectpermissionRepository;
this.userroleRepository = userroleRepository;
this.perforImaccountbasicRepository = perforImaccountbasicRepository;
this.sheetSevice = sheetSevice;
this.options = options.Value;
}
......@@ -325,6 +334,8 @@ public HandsonTable GetCollectData(int userId, int allotId, string sheetName)
config = CollectDataConfig.LogisticsEmployee;
else if (sheet.SheetType == (int)SheetType.PersonExtra)
config = CollectDataConfig.PersonExtra;
else if (sheet.SheetType == (int)SheetType.AccountBasic)
config = CollectDataConfig.AccountBasic;
else
config = CollectDataConfig.Default;
......@@ -354,6 +365,8 @@ public HandsonTable GetCollectData(int userId, int allotId, string sheetName)
rowDatas = GetClinicEmployee(sheet);
else if (sheet.SheetType == (int)SheetType.LogisticsEmployee)
rowDatas = GetLogisticsEmployee(sheet);
else if (sheet.SheetType == (int)SheetType.AccountBasic)
rowDatas = GetAccountBasic(sheet);
else
rowDatas = GetCommonData(sheet);
}
......@@ -444,7 +457,54 @@ private HandsonRowData CreateRowData(int row, ColumnInfo[] columns, SortedDictio
var setdata = from cfg in columns
join d in dic.Keys on cfg.Field.ToUpper() equals d.ToUpper()
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;
}
#endregion
......@@ -580,6 +640,15 @@ public class CollectDataConfig
{ 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>
{
{ nameof(collect_data.UnitType), "核算单元分类" },
......
......@@ -107,7 +107,7 @@ public SecondResponse GetSecondDetails(int userId, int secondId, int hospitalId,
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.BodyItems = result.BodyItems.OrderBy(t => t.RowNumber).ThenBy(t => t.Type).ThenBy(t => t.Sort).ToList();
result.BodyItems = result.BodyItems.OrderBy(t => t.RowNumber).ThenBy(t => t.Value).ThenBy(t => t.Type).ThenBy(t => t.Sort).ToList();
return result;
}
......
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