Completata revisione gesstione cert malattia da ADM nuovo
This commit is contained in:
@@ -169,7 +169,7 @@ namespace GPW.CORE.ADM.Components.Compo
|
||||
sendDataVal = 5;
|
||||
sendDataNextVal = 90;
|
||||
await Task.Delay(1);
|
||||
await GDataServ.RegMalattieUpsert(currRecord);
|
||||
await GDataServ.RegMalattieAppRif(currRecord);
|
||||
// effettuo insert...
|
||||
sendDataVal = 100;
|
||||
sendDataNextVal = 100;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>4.1.2409.1610</Version>
|
||||
<Version>4.1.2409.1611</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1474,14 +1474,14 @@ namespace GPW.CORE.Data.Controllers
|
||||
using (GPWContext localDbCtx = new GPWContext(_configuration))
|
||||
{
|
||||
SqlParameter parInizio = new SqlParameter("@inizio", inizio);
|
||||
SqlParameter parFine = new SqlParameter("@pCodGiust", fine);
|
||||
SqlParameter parFine = new SqlParameter("@pCodCert", fine);
|
||||
SqlParameter parNotOkApp = new SqlParameter("@notOkApp", notOkApp);
|
||||
SqlParameter parNotOkTim = new SqlParameter("@notOkTim", notOkTim);
|
||||
SqlParameter parNotOkLav = new SqlParameter("@notOkLav", notOkLav);
|
||||
|
||||
var rawResult = localDbCtx
|
||||
.DbSetDipAndAnom
|
||||
.FromSqlRaw("EXEC stp_DipendentiAndAnomalie @inizio,@pCodGiust,@notOkApp,@notOkTim,@notOkLav", parInizio, parFine, parNotOkApp, parNotOkTim, parNotOkLav)
|
||||
.FromSqlRaw("EXEC stp_DipendentiAndAnomalie @inizio,@pCodCert,@notOkApp,@notOkTim,@notOkLav", parInizio, parFine, parNotOkApp, parNotOkTim, parNotOkLav)
|
||||
.ToList();
|
||||
if (rawResult == null)
|
||||
{
|
||||
@@ -1944,12 +1944,12 @@ namespace GPW.CORE.Data.Controllers
|
||||
{
|
||||
var idxDipendente = new SqlParameter("@IdxDip", idxDip);
|
||||
var inizio = new SqlParameter("@inizio", dataStart);
|
||||
var fine = new SqlParameter("@pCodGiust", dataEnd);
|
||||
var fine = new SqlParameter("@pCodCert", dataEnd);
|
||||
var maxRes = new SqlParameter("@maxRes", maxResult);
|
||||
|
||||
dbResult = localDbCtx
|
||||
.DbSetParetoRegAtt
|
||||
.FromSqlRaw("EXEC stp_freqProjByDipPeriodo @IdxDip, @inizio,@pCodGiust,@maxRes", idxDipendente, inizio, fine, maxRes)
|
||||
.FromSqlRaw("EXEC stp_freqProjByDipPeriodo @IdxDip, @inizio,@pCodCert,@maxRes", idxDipendente, inizio, fine, maxRes)
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
@@ -2203,6 +2203,37 @@ namespace GPW.CORE.Data.Controllers
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiorna record registro malattie approvando o rifiutando la richiesta e gestendo i
|
||||
/// giustificativi associati Da impiegare con pagiina ADM
|
||||
/// </summary>
|
||||
/// <param name="currItem"></param>
|
||||
public bool RegMalattieAppRif(RegMalattieModel currItem)
|
||||
{
|
||||
bool answ = false;
|
||||
using (GPWContext localDbCtx = new GPWContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
// versione stored-based che sistema tutti i record dipendenti
|
||||
SqlParameter pIdxRich = new SqlParameter("@Original_IdxRegMal", currItem.IdxRegMal);
|
||||
SqlParameter pCodCert = new SqlParameter("@CodCert", currItem.CodCert);
|
||||
SqlParameter pNumGG = new SqlParameter("@NumGG", currItem.NumGG);
|
||||
SqlParameter pConf = new SqlParameter("@Conf", currItem.Conf);
|
||||
|
||||
int result = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("EXEC stp_RM_updateQuery @Original_IdxRegMal, @CodCert, @NumGG, @Conf", pIdxRich, pCodCert, pNumGG, pConf);
|
||||
answ = result != 0;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione in RegMalattieAppRif{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elimina record registro malattie (SE non confermato)
|
||||
/// </summary>
|
||||
@@ -2357,7 +2388,6 @@ namespace GPW.CORE.Data.Controllers
|
||||
.Add(currItem);
|
||||
}
|
||||
|
||||
|
||||
localDbCtx.SaveChanges();
|
||||
answ = true;
|
||||
}
|
||||
@@ -2370,8 +2400,8 @@ namespace GPW.CORE.Data.Controllers
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiorna record registro richieste approvando o rifiutando la richiesta e gestendo i giustificativi associati
|
||||
/// Da impiegare con pagiina ADM
|
||||
/// Aggiorna record registro richieste approvando o rifiutando la richiesta e gestendo i
|
||||
/// giustificativi associati Da impiegare con pagiina ADM
|
||||
/// </summary>
|
||||
/// <param name="currItem"></param>
|
||||
public bool RegRichiesteAppRif(RegRichiesteModel currItem)
|
||||
@@ -2391,7 +2421,6 @@ namespace GPW.CORE.Data.Controllers
|
||||
.Database
|
||||
.ExecuteSqlRaw("EXEC stp_RR_updateQuery @Original_IdxRegRich, @Conf, @CodGiust, @Note", pIdxRich, pConf, pCodGiust, pNote);
|
||||
answ = result != 0;
|
||||
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
@@ -2467,7 +2496,6 @@ namespace GPW.CORE.Data.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var currRec = localDbCtx
|
||||
.DbSetRegRichieste
|
||||
.FirstOrDefault(x => x.IdxRegRich == currItem.IdxRegRich);
|
||||
@@ -2702,11 +2730,11 @@ namespace GPW.CORE.Data.Controllers
|
||||
{
|
||||
SqlParameter parIdxDip = new SqlParameter("@IdxDip", idxDipendente);
|
||||
SqlParameter parInizio = new SqlParameter("@inizio", inizio);
|
||||
SqlParameter parFine = new SqlParameter("@pCodGiust", fine);
|
||||
SqlParameter parFine = new SqlParameter("@pCodCert", fine);
|
||||
|
||||
dbResult = localDbCtx
|
||||
.DbSetTimbratureExpl
|
||||
.FromSqlRaw("EXEC stp_timbratureExpl_getContinuato @IdxDip,@inizio,@pCodGiust", parIdxDip, parInizio, parFine)
|
||||
.FromSqlRaw("EXEC stp_timbratureExpl_getContinuato @IdxDip,@inizio,@pCodCert", parIdxDip, parInizio, parFine)
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
|
||||
@@ -2171,6 +2171,65 @@ namespace GPW.CORE.Data.Services
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registra o aggiorna record registro malattie
|
||||
/// </summary>
|
||||
/// <param name="currItem"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> RegMalattieAppRif(RegMalattieModel currItem)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
// scrivo su DB
|
||||
answ = dbController.RegMalattieAppRif(currItem);
|
||||
if (answ)
|
||||
{
|
||||
// recupero info dipendente
|
||||
var listDip = await DipendentiGetAll();
|
||||
var currDip = listDip.FirstOrDefault(x => x.IdxDipendente == currItem.IdxDipendente);
|
||||
// gestisco email notifica...
|
||||
string emailDest = _configuration.GetValue<string>("MailDest:InfoMal") ?? "info@egalware.com";
|
||||
if (!emailDest.Contains(currDip.Email))
|
||||
{
|
||||
emailDest += $",{currDip.Email}";
|
||||
}
|
||||
if (currDip.idxResp > 0)
|
||||
{
|
||||
string mailResp = await emailResp(currDip.idxResp);
|
||||
if (!string.IsNullOrEmpty(mailResp) && !emailDest.Contains(mailResp))
|
||||
{
|
||||
emailDest += $",{mailResp}";
|
||||
}
|
||||
}
|
||||
string urlRedir = _configuration.GetValue<string>("AdmApp:LinkMal") ?? "";
|
||||
StringBuilder sbMain = new StringBuilder();
|
||||
DateTime adesso = DateTime.Now;
|
||||
sbMain.AppendLine($"Il giorno {adesso:yyyy.MM.dd} alle ore {adesso:HH:mm:ss} è stato inserito/modificato un record di registrazione malattia");
|
||||
sbMain.AppendLine("");
|
||||
sbMain.Append("<div style=\"font-size: 1.3em;\">");
|
||||
sbMain.Append($"<b>{currDip.Cognome}</b> {currDip.Nome} ({currDip.Matricola})");
|
||||
sbMain.Append("</div>");
|
||||
sbMain.AppendLine("<hr/>");
|
||||
string stato = currItem.Conf ? "CONFERMATA" : "RICHIESTA";
|
||||
sbMain.AppendLine($"Stato: <b>{stato}</b>");
|
||||
sbMain.AppendLine($"Data Inizio: <b>{currItem.DtInizio}</b>");
|
||||
sbMain.AppendLine($"Numero Giorni: <b>{currItem.NumGG}</b>");
|
||||
sbMain.AppendLine($"Certificato: <b>{currItem.CodCert}</b>");
|
||||
sbMain.AppendLine("<hr/>");
|
||||
sbMain.AppendLine($"Cliccare sul <a href=\"{urlRedir}\">seguente link</a> per accedere alla pagina di gestione");
|
||||
|
||||
string msgBody = sbMain.ToString();
|
||||
await sendEmail(emailDest, "Aggiornamento record Malattia Dipendente", msgBody.Replace($"{Environment.NewLine}", "<br/>"));
|
||||
}
|
||||
// invalido la cache...
|
||||
await ExecFlushRedisPattern($"{rKeyDipendenti}:*");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registra o aggiorna record registro malattie
|
||||
/// </summary>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>GPW - Gestione Presenze Web</i>
|
||||
<h4>Versione: 4.1.2409.1610</h4>
|
||||
<h4>Versione: 4.1.2409.1611</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
4.1.2409.1610
|
||||
4.1.2409.1611
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>4.1.2409.1610</version>
|
||||
<version>4.1.2409.1611</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user