Sfoglia il codice sorgente

update header of instance

feature/kafka-integrator
E-A 2 anni fa
parent
commit
00417262e7
  1. 1
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/.classpath
  2. BIN
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/commons-logging.jar
  3. BIN
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/jstl-api.jar
  4. BIN
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/jstl-impl.jar
  5. BIN
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/log4j.jar
  6. BIN
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/schedulatore-portos-pratiche-portlet-service.jar
  7. BIN
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/util-bridges.jar
  8. BIN
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/util-taglib.jar
  9. 4
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service.xml
  10. 2
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/ext-spring.xml
  11. 4
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml
  12. 4
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml
  13. 28
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/integratore/IntegratoreSchedulato.java
  14. 4
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/ScheduledActionsModelImpl.java
  15. 4
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/SportelloModelImpl.java
  16. 2
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/impl/ScheduledActionsLocalServiceImpl.java
  17. 4
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/service.properties

1
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/.classpath

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="docroot/WEB-INF/src"/>
<classpathentry kind="src" path="docroot/WEB-INF/service"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre">
<attributes>
<attribute name="owner.project.facets" value="java"/>

BIN
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/commons-logging.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/jstl-api.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/jstl-impl.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/log4j.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/schedulatore-portos-pratiche-portlet-service.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/util-bridges.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/util-taglib.jar

File binario non mostrato.

4
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service.xml

@ -11,7 +11,7 @@
<column name="application" type="String" db-name="application"/>
<column name="clientId" type="String" db-name="client_id" />
<column name="context" type="String" db-name="context" />
<column name="instanceId" type="String" db-name="instance_id" />
<column name="instanceId" type="String" db-name="instanceid" />
<column name="ipaCode" type="String" db-name="ipa_code" />
<column name="proceedingType" type="String" db-name="proceeding_type" />
<column name="url" type="String" db-name="url" />
@ -52,7 +52,7 @@
<column name="headers" type="String" db-name="headers"></column>
<column name="errorLog" type="String" db-name="error_log"></column>
<column name="errorFlag" type="boolean" db-name="error_flag"></column>
<column name="intPraticaId" type="long" db-name="int_pratica_id" />
<column name="intPraticaId" type="long" db-name="intpraticaid" />
<column name="context" type="String" db-name="context" />
<finder return-type="Collection" name="IntPraticaId">
<finder-column name="intPraticaId" />

2
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/ext-spring.xml

@ -25,7 +25,7 @@
class="org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy">
<property name="targetDataSource">
<bean class="com.liferay.portal.dao.jdbc.util.DataSourceFactoryBean">
<property name="propertyPrefix" value="jdbc.sue-suap." />
<property name="propertyPrefix" value="jdbc.suesuap." />
</bean>
</property>
</bean>

4
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml

@ -30,7 +30,7 @@
<property name="headers" type="com.liferay.portal.dao.orm.hibernate.StringType" />
<property name="errorLog" type="com.liferay.portal.dao.orm.hibernate.StringType" column="error_log" />
<property name="errorFlag" type="com.liferay.portal.dao.orm.hibernate.BooleanType" column="error_flag" />
<property name="intPraticaId" type="com.liferay.portal.dao.orm.hibernate.LongType" column="int_pratica_id" />
<property name="intPraticaId" type="com.liferay.portal.dao.orm.hibernate.LongType" column="intpraticaid" />
<property name="context" type="com.liferay.portal.dao.orm.hibernate.StringType" />
</class>
<class name="portos.nextmind.model.impl.SportelloImpl" table="sportello">
@ -41,7 +41,7 @@
<property name="application" type="com.liferay.portal.dao.orm.hibernate.StringType" />
<property name="clientId" type="com.liferay.portal.dao.orm.hibernate.StringType" column="client_id" />
<property name="context" type="com.liferay.portal.dao.orm.hibernate.StringType" />
<property name="instanceId" type="com.liferay.portal.dao.orm.hibernate.StringType" column="instance_id" />
<property name="instanceId" type="com.liferay.portal.dao.orm.hibernate.StringType" column="instanceid" />
<property name="ipaCode" type="com.liferay.portal.dao.orm.hibernate.StringType" column="ipa_code" />
<property name="proceedingType" type="com.liferay.portal.dao.orm.hibernate.StringType" column="proceeding_type" />
<property name="url" type="com.liferay.portal.dao.orm.hibernate.StringType" />

4
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml

@ -59,7 +59,7 @@
<column name="ERROR_FLAG" />
</basic>
<basic name="intPraticaId">
<column name="INT_PRATICA_ID" />
<column name="INTPRATICAID" />
</basic>
<basic name="context" />
<transient name="modelAttributes" />
@ -76,7 +76,7 @@
</basic>
<basic name="context" />
<basic name="instanceId">
<column name="INSTANCE_ID" />
<column name="INSTANCEID" />
</basic>
<basic name="ipaCode">
<column name="IPA_CODE" />

28
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/integratore/IntegratoreSchedulato.java

@ -13,17 +13,12 @@ import com.liferay.portal.service.CompanyLocalServiceUtil;
import com.liferay.portal.service.RoleLocalServiceUtil;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portal.util.PortalUtil;
import it.tref.liferay.portos.bo.model.Comune;
import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Territorio;
import it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.persistence.DettPraticaUtil;
import java.util.List;
import portos.nextmind.model.ScheduledActions;
@ -61,7 +56,6 @@ public class IntegratoreSchedulato implements MessageListener {
for (ScheduledActions scheduledActions : listSA) {
Sportello sport = SportelloLocalServiceUtil.fetchSportello(scheduledActions.getShopId());
sport.getContext();
sport.getIpaCode();
if (scheduledActions.getRequestAction() == 2){
Comune comune = ComuneLocalServiceUtil.findByC_CP(
company.getCompanyId(),
@ -69,7 +63,10 @@ public class IntegratoreSchedulato implements MessageListener {
long comuneId = comune.getComuneId();
Territorio territorio = TerritorioLocalServiceUtil.findByComuneId(comuneId, 0, 1).get(0);
String tipoProcedura = sport.getProceedingType();
User user = UserLocalServiceUtil.fetchUserByScreenName(company.getCompanyId(), sport.getDigitalHolderTaxCode());
User user = UserLocalServiceUtil
.fetchUserByScreenName(
company.getCompanyId(),
sport.getDigitalHolderTaxCode());
if (user == null) {
long userIdAdmin = UserLocalServiceUtil.getRoleUsers(
RoleLocalServiceUtil.getRole(company.getCompanyId(), RoleConstants.ADMINISTRATOR).getRoleId()).get(0).getUserId();
@ -90,6 +87,23 @@ public class IntegratoreSchedulato implements MessageListener {
serviceContext.setUserId(user.getUserId());
IntPratica newIntestazione = IntPraticaLocalServiceUtil.addIntPratica(
territorio.getTerritorioId(), tipoProcedura, new ServiceContext());
ScheduledActionsLocalServiceUtil
.updateScheduledActions(scheduledActions)
.setIntPraticaId(newIntestazione.getIntPraticaId()
);
Comune comuneDaAggiornare = ComuneLocalServiceUtil.updateComune(comune);
comuneDaAggiornare.setCodiceIstat(sport.getIpaCode());
comuneDaAggiornare.setCodiceBelfiore(sport.getInstanceId());
comuneDaAggiornare.setCodiceIstat(sport.getCadastralCode());
IntPratica intestazioneDaAggiornare = IntPraticaLocalServiceUtil
.updateIntPratica(newIntestazione);
intestazioneDaAggiornare
.setNumeroProgetto(sport.getInstanceId());
intestazioneDaAggiornare.setCreateDate(sport.getCreationDate());
intestazioneDaAggiornare.setTipoProcedura(sport.getProceedingType());
intestazioneDaAggiornare
.setCodiceFiscaleDelegatoCollaudo(sport.getDigitalHolderTaxCode());
intestazioneDaAggiornare.setModifiedDate(sport.getLastUpdateDate());
}
System.out.println(scheduledActions.getRequestAction());
System.out.println(sport.getUrl());

4
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/ScheduledActionsModelImpl.java

@ -63,10 +63,10 @@ public class ScheduledActionsModelImpl extends BaseModelImpl<ScheduledActions>
{ "headers", Types.VARCHAR },
{ "error_log", Types.VARCHAR },
{ "error_flag", Types.BOOLEAN },
{ "int_pratica_id", Types.BIGINT },
{ "intpraticaid", Types.BIGINT },
{ "context", Types.VARCHAR }
};
public static final String TABLE_SQL_CREATE = "create table scheduled_actions (shop_id LONG not null primary key,request_action INTEGER,headers VARCHAR(75) null,error_log VARCHAR(75) null,error_flag BOOLEAN,int_pratica_id LONG,context VARCHAR(75) null)";
public static final String TABLE_SQL_CREATE = "create table scheduled_actions (shop_id LONG not null primary key,request_action INTEGER,headers VARCHAR(75) null,error_log VARCHAR(75) null,error_flag BOOLEAN,intpraticaid LONG,context VARCHAR(75) null)";
public static final String TABLE_SQL_DROP = "drop table scheduled_actions";
public static final String ORDER_BY_JPQL = " ORDER BY scheduledActions.shopId ASC";
public static final String ORDER_BY_SQL = " ORDER BY scheduled_actions.shop_id ASC";

4
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/SportelloModelImpl.java

@ -63,7 +63,7 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
{ "application", Types.VARCHAR },
{ "client_id", Types.VARCHAR },
{ "context", Types.VARCHAR },
{ "instance_id", Types.VARCHAR },
{ "instanceid", Types.VARCHAR },
{ "ipa_code", Types.VARCHAR },
{ "proceeding_type", Types.VARCHAR },
{ "url", Types.VARCHAR },
@ -79,7 +79,7 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
{ "last_update_date", Types.TIMESTAMP },
{ "sent_to_portos_date", Types.TIMESTAMP }
};
public static final String TABLE_SQL_CREATE = "create table sportello (id LONG not null primary key,application VARCHAR(75) null,client_id VARCHAR(75) null,context VARCHAR(75) null,instance_id VARCHAR(75) null,ipa_code VARCHAR(75) null,proceeding_type VARCHAR(75) null,url VARCHAR(75) null,content_type VARCHAR(75) null,operation VARCHAR(75) null,cadastral_code VARCHAR(75) null,digital_holder_tax_code VARCHAR(75) null,name VARCHAR(75) null,surname VARCHAR(75) null,address VARCHAR(75) null,stato BOOLEAN,creation_date DATE null,last_update_date DATE null,sent_to_portos_date DATE null)";
public static final String TABLE_SQL_CREATE = "create table sportello (id LONG not null primary key,application VARCHAR(75) null,client_id VARCHAR(75) null,context VARCHAR(75) null,instanceid VARCHAR(75) null,ipa_code VARCHAR(75) null,proceeding_type VARCHAR(75) null,url VARCHAR(75) null,content_type VARCHAR(75) null,operation VARCHAR(75) null,cadastral_code VARCHAR(75) null,digital_holder_tax_code VARCHAR(75) null,name VARCHAR(75) null,surname VARCHAR(75) null,address VARCHAR(75) null,stato BOOLEAN,creation_date DATE null,last_update_date DATE null,sent_to_portos_date DATE null)";
public static final String TABLE_SQL_DROP = "drop table sportello";
public static final String ORDER_BY_JPQL = " ORDER BY sportello.id ASC";
public static final String ORDER_BY_SQL = " ORDER BY sportello.id ASC";

2
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/impl/ScheduledActionsLocalServiceImpl.java

@ -61,7 +61,7 @@ public class ScheduledActionsLocalServiceImpl
@SuppressWarnings("unchecked")
public List<ScheduledActions> findAzioniDaSvolgere(String context,int start, int end) throws SystemException{
DynamicQuery dq = scheduledActionsLocalService.dynamicQuery();
dq.add(RestrictionsFactoryUtil.eq("intPraticaId", 0));
dq.add(RestrictionsFactoryUtil.eq("intPraticaId", 0L));
dq.add(RestrictionsFactoryUtil.eq("context", context));
return (List<ScheduledActions>)scheduledActionsLocalService.dynamicQuery(dq,start,end);
}

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

@ -13,8 +13,8 @@
##
build.namespace=portos_ss
build.number=47
build.date=1683728676774
build.number=56
build.date=1683794074173
build.auto.upgrade=true
##

Caricamento…
Annulla
Salva