二次分配模板修复

parent 92f5b65d
...@@ -700,6 +700,7 @@ public bool IssuedChangeSecond(per_allot allot, List<ag_secondallot> secondList) ...@@ -700,6 +700,7 @@ public bool IssuedChangeSecond(per_allot allot, List<ag_secondallot> secondList)
second.NursingDeptRemark = "科室绩效结果发生变更,需要重新提交"; second.NursingDeptRemark = "科室绩效结果发生变更,需要重新提交";
} }
_service.FreezeAllotSync(allot.ID); _service.FreezeAllotSync(allot.ID);
_service.SecondUseTempRestoreSync();
} }
} }
perforAgsecondallotRepository.UpdateRange(updSeconds.ToArray()); perforAgsecondallotRepository.UpdateRange(updSeconds.ToArray());
......
...@@ -449,6 +449,7 @@ public void Generate(per_allot allot) ...@@ -449,6 +449,7 @@ public void Generate(per_allot allot)
// 科室创建但不下发 // 科室创建但不下发
resultComputeService.GenerateSecondAllot(allot); resultComputeService.GenerateSecondAllot(allot);
_service.FreezeAllotSync(allot.ID); _service.FreezeAllotSync(allot.ID);
_service.SecondUseTempRestoreSync();
UpdateAllotStates(allot.ID, (int)AllotStates.绩效结果解析成功, EnumHelper.GetDescription(AllotStates.绩效结果解析成功), generate); UpdateAllotStates(allot.ID, (int)AllotStates.绩效结果解析成功, EnumHelper.GetDescription(AllotStates.绩效结果解析成功), generate);
perforCofdirectorRepository.SupplementaryData(allot.ID); perforCofdirectorRepository.SupplementaryData(allot.ID);
......
...@@ -17,6 +17,7 @@ public DapperService(IOptions<AppConnection> options) ...@@ -17,6 +17,7 @@ public DapperService(IOptions<AppConnection> options)
_options = options; _options = options;
} }
#region 数据静态存储
/// <summary> /// <summary>
/// 数据静态存储 /// 数据静态存储
/// </summary> /// </summary>
...@@ -48,5 +49,39 @@ public void FreezeAllot(int allotId) ...@@ -48,5 +49,39 @@ public void FreezeAllot(int allotId)
} }
} }
} }
#endregion
#region 二次分配模板修复
/// <summary>
/// 二次分配模板修复
/// </summary>
/// <param name="allotId"></param>
public void SecondUseTempRestoreSync()
{
Task.Factory.StartNew(() => SecondUseTempRestore());
}
/// <summary>
/// 数据静态存储
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
public void SecondUseTempRestore()
{
using (var connection = new MySqlConnection(_options.Value.PerformanceConnectionString))
{
if (connection.State != ConnectionState.Open) connection.Open();
try
{
string sql = $@"call proc_second_restore()";
connection.Execute(sql, commandTimeout: 60 * 60);
}
catch (Exception)
{
throw;
}
}
}
#endregion
} }
} }
...@@ -1729,7 +1729,7 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request) ...@@ -1729,7 +1729,7 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
agsecondallotRepository.DeleteComputeHistory(request.SecondId); agsecondallotRepository.DeleteComputeHistory(request.SecondId);
if (request.IsPass == 1) if (request.IsPass == 1)
_service.FreezeAllotSync(second.AllotId.Value); _service.FreezeAllotSync(second.AllotId.Value);
_service.SecondUseTempRestoreSync();
return result; 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