Sfoglia il codice sorgente

Asseverazione del solo collaudatore principale

master
Salvatore La Manna 3 anni fa
parent
commit
d6f7582743
  1. 45
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java
  2. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  3. 11
      liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/persistence/EmailAttachmentPersistence.java
  4. 11
      liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/persistence/EmailAttachmentUtil.java
  5. 4
      liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/service.properties

45
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java

@ -126,14 +126,15 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
private String testoAsseverazione(String tipo, String codiceFiscale, DettPratica dettPratica, String relazioni, private String testoAsseverazione(String tipo, String codiceFiscale, DettPratica dettPratica, String relazioni,
boolean anteprima) throws SystemException, PortalException, IOException { boolean anteprima) throws SystemException, PortalException, IOException {
Soggetto soggetto = SoggettoLocalServiceUtil.getValidTmpByIntPratica_CodiceFiscale_TipologiaSoggetto(dettPratica.getIntPraticaId(), codiceFiscale, tipo); Soggetto soggetto = SoggettoLocalServiceUtil.getValidTmpByIntPratica_CodiceFiscale_TipologiaSoggetto(
dettPratica.getIntPraticaId(), codiceFiscale, tipo);
if (Validator.isNotNull(soggetto)) { if (Validator.isNotNull(soggetto)) {
String nome = Validator.isNull(soggetto.getCognome()) ? soggetto.getLegaleRap() : soggetto.getNome(); String nome = Validator.isNull(soggetto.getCognome()) ? soggetto.getLegaleRap() : soggetto.getNome();
String cognome = Validator.isNull(soggetto.getCognome()) ? StringPool.BLANK : soggetto.getCognome(); String cognome = Validator.isNull(soggetto.getCognome()) ? StringPool.BLANK : soggetto.getCognome();
String albo = soggetto.getAlbo(); String albo = soggetto.getAlbo();
String albon = soggetto.getNumIscrAlbo(); String albon = soggetto.getNumIscrAlbo();
String albop = soggetto.getProvinciaAlbo(); String albop = soggetto.getProvinciaAlbo();
return testoAsseverazione(tipo, nome, cognome, codiceFiscale, soggetto.getAmbitoProfessione(), dettPratica, return testoAsseverazione(tipo, nome, cognome, codiceFiscale, soggetto.getAmbitoProfessione(), dettPratica,
relazioni, false, albo, albon, albop); relazioni, false, albo, albon, albop);
} }
@ -148,11 +149,10 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
private String testoAsseverazione(String tipo, String nome, String cognome, String codiceFiscale, private String testoAsseverazione(String tipo, String nome, String cognome, String codiceFiscale,
String ambitoProfessione, DettPratica dettPratica, String relazioni, boolean anteprima, String albo, String ambitoProfessione, DettPratica dettPratica, String relazioni, boolean anteprima, String albo,
String albon, String albop) throws IOException, String albon, String albop) throws IOException, SystemException, PortalException {
SystemException, PortalException {
IntPratica intpratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId()); IntPratica intpratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
String file = null; String file = null;
switch (tipo) { switch (tipo) {
case TipoSoggettoUtil.COLLAUDATORE: case TipoSoggettoUtil.COLLAUDATORE:
@ -171,9 +171,9 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
file = "geologo"; file = "geologo";
break; break;
case TipoSoggettoUtil.PROGETTISTA: case TipoSoggettoUtil.PROGETTISTA:
if(intpratica.getTipoProcedura().equalsIgnoreCase(Constants.PROCEDURA_C)){ if (intpratica.getTipoProcedura().equalsIgnoreCase(Constants.PROCEDURA_C)) {
file = "progettista_c"; file = "progettista_c";
}else if(ambitoProfessione.equalsIgnoreCase("architettonico")) { } else if (ambitoProfessione.equalsIgnoreCase("architettonico")) {
file = "progettista_architettonico"; file = "progettista_architettonico";
} else { } else {
file = "calcolista"; file = "calcolista";
@ -244,10 +244,8 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
.replace("{{riparazioni}}", riparazioni ? CHECKED : StringPool.SPACE) .replace("{{riparazioni}}", riparazioni ? CHECKED : StringPool.SPACE)
.replace("{{rischio}}", rischio ? CHECKED : StringPool.SPACE) .replace("{{rischio}}", rischio ? CHECKED : StringPool.SPACE)
.replace("{{!rischio}}", rischio ? StringPool.SPACE : CHECKED) .replace("{{!rischio}}", rischio ? StringPool.SPACE : CHECKED)
.replace("{{strategico}}", strategico ? CHECKED : StringPool.SPACE) .replace("{{strategico}}", strategico ? CHECKED : StringPool.SPACE).replace("{{albo}}", albo)
.replace("{{albo}}", albo) .replace("{{albop}}", albop).replace("{{albon}}", albon);
.replace("{{albop}}", albop)
.replace("{{albon}}", albon);
if (null == relazioni) { if (null == relazioni) {
html = html.replace("{{coniugio}}", StringPool.SPACE).replace("{{!coniugio}}", StringPool.SPACE) html = html.replace("{{coniugio}}", StringPool.SPACE).replace("{{!coniugio}}", StringPool.SPACE)
.replace("{{relazioni}}", StringPool.BLANK); .replace("{{relazioni}}", StringPool.BLANK);
@ -344,16 +342,27 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
} }
} else { } else {
List<Soggetto> soggetti = soggettoLocalService.getValidTmpByIntPratica(dettPratica.getIntPraticaId()); List<Soggetto> soggetti = soggettoLocalService.getValidTmpByIntPratica(dettPratica.getIntPraticaId());
boolean collaudatoreInserito = false;
for (Soggetto soggetto : soggetti) { for (Soggetto soggetto : soggetti) {
if ((TipoSoggettoUtil.COMMITTENTE.equalsIgnoreCase(soggetto.getTipologiaSoggetto()) && !ValidazionePraticaUtil if (TipoSoggettoUtil.COLLAUDATORE.equalsIgnoreCase(soggetto.getTipologiaSoggetto())
.isA98Required(dettPratica)) && dettPratica.getCodiceFiscalePrincipaleCollaudatore().equalsIgnoreCase(
|| TipoSoggettoUtil.DITTA.equalsIgnoreCase(soggetto.getTipologiaSoggetto()) soggetto.getCodiceFiscale())) {
|| TipoSoggettoUtil.DIRETTORE_LAVORI.equalsIgnoreCase(soggetto.getTipologiaSoggetto())
|| TipoSoggettoUtil.PROGETTISTA.equalsIgnoreCase(soggetto.getTipologiaSoggetto())
|| (TipoSoggettoUtil.COLLAUDATORE.equalsIgnoreCase(soggetto.getTipologiaSoggetto()) && !soggetto
.isAggiuntivo())) {
addAsseverazione(serviceContext.getUserId(), dettPratica.getIntPraticaId(), dettPraticaId, addAsseverazione(serviceContext.getUserId(), dettPratica.getIntPraticaId(), dettPraticaId,
soggetto.getTipologiaSoggetto(), soggetto.getCodiceFiscale(), serviceContext); soggetto.getTipologiaSoggetto(), soggetto.getCodiceFiscale(), serviceContext);
collaudatoreInserito = true;
break;
}
}
for (Soggetto soggetto : soggetti) {
String tipologia = soggetto.getTipologiaSoggetto();
if ((TipoSoggettoUtil.COMMITTENTE.equalsIgnoreCase(tipologia) && !ValidazionePraticaUtil
.isA98Required(dettPratica))
|| TipoSoggettoUtil.DITTA.equalsIgnoreCase(tipologia)
|| TipoSoggettoUtil.DIRETTORE_LAVORI.equalsIgnoreCase(tipologia)
|| TipoSoggettoUtil.PROGETTISTA.equalsIgnoreCase(tipologia)
|| (TipoSoggettoUtil.COLLAUDATORE.equalsIgnoreCase(tipologia) && !collaudatoreInserito)) {
addAsseverazione(serviceContext.getUserId(), dettPratica.getIntPraticaId(), dettPraticaId,
tipologia, soggetto.getCodiceFiscale(), serviceContext);
} }
} }
} }

4
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties

@ -13,8 +13,8 @@
## ##
build.namespace=portos_bo build.namespace=portos_bo
build.number=2673 build.number=2675
build.date=1625581980142 build.date=1629722017169
build.auto.upgrade=true build.auto.upgrade=true
## ##

11
liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/persistence/EmailAttachmentPersistence.java

@ -151,8 +151,7 @@ public interface EmailAttachmentPersistence extends BasePersistence<EmailAttachm
* @throws SystemException if a system exception occurred * @throws SystemException if a system exception occurred
*/ */
public it.tref.liferay.portos.mailmanager.model.EmailAttachment[] findByEmailId_PrevAndNext( public it.tref.liferay.portos.mailmanager.model.EmailAttachment[] findByEmailId_PrevAndNext(
it.tref.liferay.portos.mailmanager.service.persistence.EmailAttachmentPK emailAttachmentPK, EmailAttachmentPK emailAttachmentPK, long emailId,
long emailId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator) com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException, throws com.liferay.portal.kernel.exception.SystemException,
it.tref.liferay.portos.mailmanager.NoSuchEmailAttachmentException; it.tref.liferay.portos.mailmanager.NoSuchEmailAttachmentException;
@ -257,7 +256,7 @@ public interface EmailAttachmentPersistence extends BasePersistence<EmailAttachm
* @return the new email attachment * @return the new email attachment
*/ */
public it.tref.liferay.portos.mailmanager.model.EmailAttachment create( public it.tref.liferay.portos.mailmanager.model.EmailAttachment create(
it.tref.liferay.portos.mailmanager.service.persistence.EmailAttachmentPK emailAttachmentPK); EmailAttachmentPK emailAttachmentPK);
/** /**
* Removes the email attachment with the primary key from the database. Also notifies the appropriate model listeners. * Removes the email attachment with the primary key from the database. Also notifies the appropriate model listeners.
@ -268,7 +267,7 @@ public interface EmailAttachmentPersistence extends BasePersistence<EmailAttachm
* @throws SystemException if a system exception occurred * @throws SystemException if a system exception occurred
*/ */
public it.tref.liferay.portos.mailmanager.model.EmailAttachment remove( public it.tref.liferay.portos.mailmanager.model.EmailAttachment remove(
it.tref.liferay.portos.mailmanager.service.persistence.EmailAttachmentPK emailAttachmentPK) EmailAttachmentPK emailAttachmentPK)
throws com.liferay.portal.kernel.exception.SystemException, throws com.liferay.portal.kernel.exception.SystemException,
it.tref.liferay.portos.mailmanager.NoSuchEmailAttachmentException; it.tref.liferay.portos.mailmanager.NoSuchEmailAttachmentException;
@ -285,7 +284,7 @@ public interface EmailAttachmentPersistence extends BasePersistence<EmailAttachm
* @throws SystemException if a system exception occurred * @throws SystemException if a system exception occurred
*/ */
public it.tref.liferay.portos.mailmanager.model.EmailAttachment findByPrimaryKey( public it.tref.liferay.portos.mailmanager.model.EmailAttachment findByPrimaryKey(
it.tref.liferay.portos.mailmanager.service.persistence.EmailAttachmentPK emailAttachmentPK) EmailAttachmentPK emailAttachmentPK)
throws com.liferay.portal.kernel.exception.SystemException, throws com.liferay.portal.kernel.exception.SystemException,
it.tref.liferay.portos.mailmanager.NoSuchEmailAttachmentException; it.tref.liferay.portos.mailmanager.NoSuchEmailAttachmentException;
@ -297,7 +296,7 @@ public interface EmailAttachmentPersistence extends BasePersistence<EmailAttachm
* @throws SystemException if a system exception occurred * @throws SystemException if a system exception occurred
*/ */
public it.tref.liferay.portos.mailmanager.model.EmailAttachment fetchByPrimaryKey( public it.tref.liferay.portos.mailmanager.model.EmailAttachment fetchByPrimaryKey(
it.tref.liferay.portos.mailmanager.service.persistence.EmailAttachmentPK emailAttachmentPK) EmailAttachmentPK emailAttachmentPK)
throws com.liferay.portal.kernel.exception.SystemException; throws com.liferay.portal.kernel.exception.SystemException;
/** /**

11
liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/persistence/EmailAttachmentUtil.java

@ -239,8 +239,7 @@ public class EmailAttachmentUtil {
* @throws SystemException if a system exception occurred * @throws SystemException if a system exception occurred
*/ */
public static it.tref.liferay.portos.mailmanager.model.EmailAttachment[] findByEmailId_PrevAndNext( public static it.tref.liferay.portos.mailmanager.model.EmailAttachment[] findByEmailId_PrevAndNext(
it.tref.liferay.portos.mailmanager.service.persistence.EmailAttachmentPK emailAttachmentPK, EmailAttachmentPK emailAttachmentPK, long emailId,
long emailId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator) com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException, throws com.liferay.portal.kernel.exception.SystemException,
it.tref.liferay.portos.mailmanager.NoSuchEmailAttachmentException { it.tref.liferay.portos.mailmanager.NoSuchEmailAttachmentException {
@ -368,7 +367,7 @@ public class EmailAttachmentUtil {
* @return the new email attachment * @return the new email attachment
*/ */
public static it.tref.liferay.portos.mailmanager.model.EmailAttachment create( public static it.tref.liferay.portos.mailmanager.model.EmailAttachment create(
it.tref.liferay.portos.mailmanager.service.persistence.EmailAttachmentPK emailAttachmentPK) { EmailAttachmentPK emailAttachmentPK) {
return getPersistence().create(emailAttachmentPK); return getPersistence().create(emailAttachmentPK);
} }
@ -381,7 +380,7 @@ public class EmailAttachmentUtil {
* @throws SystemException if a system exception occurred * @throws SystemException if a system exception occurred
*/ */
public static it.tref.liferay.portos.mailmanager.model.EmailAttachment remove( public static it.tref.liferay.portos.mailmanager.model.EmailAttachment remove(
it.tref.liferay.portos.mailmanager.service.persistence.EmailAttachmentPK emailAttachmentPK) EmailAttachmentPK emailAttachmentPK)
throws com.liferay.portal.kernel.exception.SystemException, throws com.liferay.portal.kernel.exception.SystemException,
it.tref.liferay.portos.mailmanager.NoSuchEmailAttachmentException { it.tref.liferay.portos.mailmanager.NoSuchEmailAttachmentException {
return getPersistence().remove(emailAttachmentPK); return getPersistence().remove(emailAttachmentPK);
@ -402,7 +401,7 @@ public class EmailAttachmentUtil {
* @throws SystemException if a system exception occurred * @throws SystemException if a system exception occurred
*/ */
public static it.tref.liferay.portos.mailmanager.model.EmailAttachment findByPrimaryKey( public static it.tref.liferay.portos.mailmanager.model.EmailAttachment findByPrimaryKey(
it.tref.liferay.portos.mailmanager.service.persistence.EmailAttachmentPK emailAttachmentPK) EmailAttachmentPK emailAttachmentPK)
throws com.liferay.portal.kernel.exception.SystemException, throws com.liferay.portal.kernel.exception.SystemException,
it.tref.liferay.portos.mailmanager.NoSuchEmailAttachmentException { it.tref.liferay.portos.mailmanager.NoSuchEmailAttachmentException {
return getPersistence().findByPrimaryKey(emailAttachmentPK); return getPersistence().findByPrimaryKey(emailAttachmentPK);
@ -416,7 +415,7 @@ public class EmailAttachmentUtil {
* @throws SystemException if a system exception occurred * @throws SystemException if a system exception occurred
*/ */
public static it.tref.liferay.portos.mailmanager.model.EmailAttachment fetchByPrimaryKey( public static it.tref.liferay.portos.mailmanager.model.EmailAttachment fetchByPrimaryKey(
it.tref.liferay.portos.mailmanager.service.persistence.EmailAttachmentPK emailAttachmentPK) EmailAttachmentPK emailAttachmentPK)
throws com.liferay.portal.kernel.exception.SystemException { throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().fetchByPrimaryKey(emailAttachmentPK); return getPersistence().fetchByPrimaryKey(emailAttachmentPK);
} }

4
liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/service.properties

@ -13,8 +13,8 @@
## ##
build.namespace=portos_Mail build.namespace=portos_Mail
build.number=79 build.number=80
build.date=1620662460162 build.date=1629721086258
build.auto.upgrade=true build.auto.upgrade=true
## ##

Caricamento…
Annulla
Salva