Commit a9313aa8 by ruyun.zhang@suvalue.com

Merge branch 'v2020morge-graphql' into v2020morge-second

parents cd52fcaa 29f6d530
......@@ -349,6 +349,7 @@ public void ComputeOffice(per_allot allot, PerExcel excel)
{
//取出科室
var accountList = excel.PerSheet.FirstOrDefault(t => t.SheetType == SheetType.AccountBasic)?.PerData?.Select(t => (PerDataAccountBaisc)t);
var accountExtraData = excel.PerSheet.FirstOrDefault(t => t.SheetType == SheetType.AccountExtra)?.PerData?.Select(t => (PerData)t);
List<string> involves = new List<string>
{
......@@ -382,7 +383,11 @@ public void ComputeOffice(per_allot allot, PerExcel excel)
dept.NeedSecondAllot = empolyees.Any(w => w.NeedSecondAllot == "是") ? "是" : "否";
if (UnitTypeUtil.IsOffice(resAccount?.UnitType) && dept.NeedSecondAllot == "是")
{
{
// 夜班绩效 从医院奖罚的明细项中获取
var nightShift = accountExtraData?.FirstOrDefault(w => w.UnitType == resAccount?.UnitType && w.AccountingUnit == dept.AccountingUnit && w.TypeName?.Trim() == "夜班绩效")?.CellValue ?? 0;
dept.NightShiftWorkPerforFee = 0;
dept.ScoringAverage = resAccount?.ScoringAverage == null ? 0 : resAccount.ScoringAverage;
dept.AdjustFactor = (isBudget ? adjust : resAccount?.AdjustFactor) ?? 1;
dept.Extra = resAccount?.Extra ?? 0;
......
......@@ -386,7 +386,7 @@ public HandsonTable GetCollectData(int userId, int allotId, string sheetName)
if (sTypes.Contains((int)sheet.SheetType) || sTypeName.Contains(sheet.SheetName))
{
List<HandsonCellData> cells = new List<HandsonCellData>();
var perSheet = perforPersheetRepository.GetEntity(t=>t.AllotID==allotId && t.SheetName=="4.1 临床科室医护绩效测算表");
var perSheet = perforPersheetRepository.GetEntity(t => t.AllotID == allotId && t.SheetName == "4.1 临床科室医护绩效测算表");
var dept = perforPerdeptdicRepository.GetAccountBasicAccountingUnit(allot.HospitalId);
GetAccountBasic(perSheet, dept, cells);
UnitFit(rowDatas, cells, sheet);
......@@ -751,10 +751,6 @@ private void UnitFit(List<HandsonRowData> rowDatas, List<HandsonCellData> cellDa
bool exists = false;
bool exists2 = false;
var cells = new List<HandsonCellData>();
if (cell.Name == "总务科")
{
var ss = 1;
}
foreach (var rowData in rowDatas)
{
foreach (var cellData in rowData.CellData)
......@@ -787,7 +783,7 @@ private void UnitFit(List<HandsonRowData> rowDatas, List<HandsonCellData> cellDa
if (exists == false || (exists == false && exists2 == false) || exists2 == false)
{
cells.Add(new HandsonCellData("核算单元", cell.Name));
if (sheet.SheetName == "5.2业务中层行政中高层医院奖罚")
{
......@@ -801,7 +797,7 @@ private void UnitFit(List<HandsonRowData> rowDatas, List<HandsonCellData> cellDa
{
cells.Add(new HandsonCellData("核算单元类型", cell.Value));
}
suppRowDatas.Add(new HandsonRowData(++rowCount, cells));
}
}
......
......@@ -1112,6 +1112,12 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
}
}
// 展示额外处理,根据禅道057
deptDetails.Pandect.ScoringAverage = deptDetails.Detail?.FirstOrDefault(w => w.OriginalType == (int)SheetType.AccountScoreAverage)?.Amount ?? deptDetails.Pandect.ScoringAverage;
deptDetails.Pandect.Extra = deptDetails.Detail?.FirstOrDefault(w => w.OriginalType == (int)SheetType.AccountExtra)?.Amount ?? deptDetails.Pandect.Extra;
deptDetails.Pandect.MaterialsExtra = deptDetails.Detail?.FirstOrDefault(w => w.OriginalType == (int)SheetType.AccountMaterialsAssess)?.Amount ?? deptDetails.Pandect.MaterialsExtra;
deptDetails.Pandect.MedicineExtra = deptDetails.Detail?.FirstOrDefault(w => w.OriginalType == (int)SheetType.AccountDrugAssess)?.Amount ?? deptDetails.Pandect.MedicineExtra;
return MergeDetails(deptDetails);
//return deptDetails;
}
......@@ -1403,6 +1409,11 @@ public DeptDataDetails DeptOfficeDetail(int accountId)
}
}
}
// 展示额外处理,根据禅道057
deptDetails.Pandect.ScoringAverage = deptDetails.Detail?.FirstOrDefault(w => w.OriginalType == (int)SheetType.AccountScoreAverage)?.Amount ?? deptDetails.Pandect.ScoringAverage;
deptDetails.Pandect.Extra = deptDetails.Detail?.FirstOrDefault(w => w.OriginalType == (int)SheetType.AccountExtra)?.Amount ?? deptDetails.Pandect.Extra;
deptDetails.Pandect.MaterialsExtra = deptDetails.Detail?.FirstOrDefault(w => w.OriginalType == (int)SheetType.AccountMaterialsAssess)?.Amount ?? deptDetails.Pandect.MaterialsExtra;
deptDetails.Pandect.MedicineExtra = deptDetails.Detail?.FirstOrDefault(w => w.OriginalType == (int)SheetType.AccountDrugAssess)?.Amount ?? deptDetails.Pandect.MedicineExtra;
return deptDetails;
}
......@@ -1494,6 +1505,12 @@ public DeptDataDetails SpecialDeptDetail(ag_secondallot second)
}
}
// 展示额外处理,根据禅道057
deptDetails.Pandect.ScoringAverage = deptDetails.Detail?.FirstOrDefault(w => w.OriginalType == (int)SheetType.AccountScoreAverage)?.Amount ?? deptDetails.Pandect.ScoringAverage;
deptDetails.Pandect.Extra = deptDetails.Detail?.FirstOrDefault(w => w.OriginalType == (int)SheetType.AccountExtra)?.Amount ?? deptDetails.Pandect.Extra;
deptDetails.Pandect.MaterialsExtra = deptDetails.Detail?.FirstOrDefault(w => w.OriginalType == (int)SheetType.AccountMaterialsAssess)?.Amount ?? deptDetails.Pandect.MaterialsExtra;
deptDetails.Pandect.MedicineExtra = deptDetails.Detail?.FirstOrDefault(w => w.OriginalType == (int)SheetType.AccountDrugAssess)?.Amount ?? deptDetails.Pandect.MedicineExtra;
return deptDetails;
}
......
......@@ -175,7 +175,7 @@ public static void CloseAutoFilter(string path)
package.Save();
}
}
catch (Exception ex)
catch (Exception)
{
}
}
......
......@@ -1562,14 +1562,14 @@ public bool AuditSubmit(ag_secondallot second, int userId)
if (temp == null)
throw new PerformanceException("选择模板不可用,请确定模板及数据是否存在!");
bool method(decimal? submitDataAmount, decimal? realGiveFee)
{
if (!submitDataAmount.HasValue || !realGiveFee.HasValue)
return false;
//bool method(decimal? submitDataAmount, decimal? realGiveFee)
//{
// if (!submitDataAmount.HasValue || !realGiveFee.HasValue)
// return false;
decimal floatValue = 0.5m;
return submitDataAmount >= (realGiveFee - floatValue) && submitDataAmount <= (realGiveFee + floatValue);
}
// decimal floatValue = 0.5m;
// return submitDataAmount >= (realGiveFee - floatValue) && submitDataAmount <= (realGiveFee + floatValue);
//}
if (temp.UseTempId == 6)
{
......
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