Sfoglia il codice sorgente

Fix jrxml accettata integrazione

master
Salvatore La Manna 4 anni fa
parent
commit
b823d474ed
  1. BIN
      liferay-plugins-sdk-6.2/dist/tref-mapit-shared-6.2.0.1.jar
  2. 102
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/ManutenzioneDatabase.java
  3. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/scheduler/SchedulerGeneraDocumento.java
  4. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  5. 4
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/.settings/org.eclipse.wst.common.component
  6. 4
      liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/service.properties

BIN
liferay-plugins-sdk-6.2/dist/tref-mapit-shared-6.2.0.1.jar vendored

File binario non mostrato.

102
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/ManutenzioneDatabase.java

@ -15,6 +15,7 @@ import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.DocAggiuntiva; import it.tref.liferay.portos.bo.model.DocAggiuntiva;
import it.tref.liferay.portos.bo.model.DocPratica; import it.tref.liferay.portos.bo.model.DocPratica;
import it.tref.liferay.portos.bo.model.FineLavori; import it.tref.liferay.portos.bo.model.FineLavori;
import it.tref.liferay.portos.bo.model.HistoryWorkflowAction;
import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Pagamento; import it.tref.liferay.portos.bo.model.Pagamento;
import it.tref.liferay.portos.bo.model.ParereGeologo; import it.tref.liferay.portos.bo.model.ParereGeologo;
@ -33,6 +34,7 @@ import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.DocAggiuntivaLocalServiceUtil; import it.tref.liferay.portos.bo.service.DocAggiuntivaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.FineLavoriLocalServiceUtil; import it.tref.liferay.portos.bo.service.FineLavoriLocalServiceUtil;
import it.tref.liferay.portos.bo.service.HistoryWorkflowActionLocalServiceUtil;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.PagamentoLocalServiceUtil; import it.tref.liferay.portos.bo.service.PagamentoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.ParereGeologoLocalServiceUtil; import it.tref.liferay.portos.bo.service.ParereGeologoLocalServiceUtil;
@ -45,7 +47,6 @@ import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants;
import it.tref.liferay.portos.bo.shared.util.UnitaOperativeUtil; import it.tref.liferay.portos.bo.shared.util.UnitaOperativeUtil;
import it.tref.liferay.portos.bo.util.AvvisoUtil; import it.tref.liferay.portos.bo.util.AvvisoUtil;
import it.tref.liferay.portos.bo.util.Constants; import it.tref.liferay.portos.bo.util.Constants;
import it.tref.liferay.portos.bo.util.WorkflowUtil;
import it.tref.liferay.portos.mailmanager.model.Email; import it.tref.liferay.portos.mailmanager.model.Email;
import it.tref.liferay.portos.mailmanager.model.EmailAttachment; import it.tref.liferay.portos.mailmanager.model.EmailAttachment;
import it.tref.liferay.portos.mailmanager.model.EmailConstants; import it.tref.liferay.portos.mailmanager.model.EmailConstants;
@ -79,11 +80,7 @@ import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.kernel.workflow.WorkflowInstance; import com.liferay.portal.kernel.workflow.WorkflowInstance;
import com.liferay.portal.kernel.workflow.WorkflowInstanceManagerUtil; import com.liferay.portal.kernel.workflow.WorkflowInstanceManagerUtil;
import com.liferay.portal.kernel.workflow.WorkflowLog; import com.liferay.portal.kernel.workflow.WorkflowLog;
import com.liferay.portal.kernel.workflow.WorkflowLogManager;
import com.liferay.portal.kernel.workflow.WorkflowLogManagerUtil; import com.liferay.portal.kernel.workflow.WorkflowLogManagerUtil;
import com.liferay.portal.kernel.workflow.WorkflowTask;
import com.liferay.portal.kernel.workflow.WorkflowTaskManager;
import com.liferay.portal.kernel.workflow.WorkflowTaskManagerUtil;
import com.liferay.portal.model.Company; import com.liferay.portal.model.Company;
import com.liferay.portal.model.Contact; import com.liferay.portal.model.Contact;
import com.liferay.portal.model.EmailAddress; import com.liferay.portal.model.EmailAddress;
@ -116,8 +113,6 @@ import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.SystemEventLocalServiceUtil; import com.liferay.portal.service.SystemEventLocalServiceUtil;
import com.liferay.portal.service.UserLocalServiceUtil; import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portal.service.WorkflowInstanceLinkLocalServiceUtil; import com.liferay.portal.service.WorkflowInstanceLinkLocalServiceUtil;
import com.liferay.portal.workflow.kaleo.model.KaleoInstance;
import com.liferay.portal.workflow.kaleo.service.KaleoInstanceLocalServiceUtil;
import com.liferay.portlet.asset.model.AssetEntry; import com.liferay.portlet.asset.model.AssetEntry;
import com.liferay.portlet.asset.model.AssetTag; import com.liferay.portlet.asset.model.AssetTag;
import com.liferay.portlet.asset.model.AssetVocabulary; import com.liferay.portlet.asset.model.AssetVocabulary;
@ -150,7 +145,9 @@ import com.liferay.portlet.messageboards.model.MBThread;
import com.liferay.portlet.messageboards.service.MBDiscussionLocalServiceUtil; import com.liferay.portlet.messageboards.service.MBDiscussionLocalServiceUtil;
import com.liferay.portlet.messageboards.service.MBMessageLocalServiceUtil; import com.liferay.portlet.messageboards.service.MBMessageLocalServiceUtil;
import com.liferay.portlet.messageboards.service.MBThreadLocalServiceUtil; import com.liferay.portlet.messageboards.service.MBThreadLocalServiceUtil;
import com.liferay.portlet.ratings.model.RatingsEntry;
import com.liferay.portlet.ratings.model.RatingsStats; import com.liferay.portlet.ratings.model.RatingsStats;
import com.liferay.portlet.ratings.service.RatingsEntryLocalServiceUtil;
import com.liferay.portlet.ratings.service.RatingsStatsLocalServiceUtil; import com.liferay.portlet.ratings.service.RatingsStatsLocalServiceUtil;
import com.liferay.portlet.wiki.model.WikiNode; import com.liferay.portlet.wiki.model.WikiNode;
import com.liferay.portlet.wiki.service.WikiNodeLocalServiceUtil; import com.liferay.portlet.wiki.service.WikiNodeLocalServiceUtil;
@ -235,8 +232,10 @@ public class ManutenzioneDatabase {
.getWorkflowInstanceLink(companyId, groupId, .getWorkflowInstanceLink(companyId, groupId,
ControlloPratica.class.getName(), controllo.getPrimaryKey()); ControlloPratica.class.getName(), controllo.getPrimaryKey());
long workflowInstanceId = workflowInstancelink.getWorkflowInstanceId(); long workflowInstanceId = workflowInstancelink.getWorkflowInstanceId();
WorkflowInstance workflowInstance = WorkflowInstanceManagerUtil // WorkflowInstance workflowInstance =
.getWorkflowInstance(controllo.getCompanyId(), workflowInstanceId); // WorkflowInstanceManagerUtil
// .getWorkflowInstance(controllo.getCompanyId(),
// workflowInstanceId);
List<Integer> types = new ArrayList<>(); List<Integer> types = new ArrayList<>();
types.add(WorkflowLog.TASK_ASSIGN); types.add(WorkflowLog.TASK_ASSIGN);
logs = WorkflowLogManagerUtil.getWorkflowLogsByWorkflowInstance(companyId, logs = WorkflowLogManagerUtil.getWorkflowLogsByWorkflowInstance(companyId,
@ -299,11 +298,13 @@ public class ManutenzioneDatabase {
esitoLog(esito, svuotaEmailAttachment()); esitoLog(esito, svuotaEmailAttachment());
esitoLog(esito, svuotaFineLavori()); esitoLog(esito, svuotaFineLavori());
esitoLog(esito, svuotaGroup(companyId)); esitoLog(esito, svuotaGroup(companyId));
esitoLog(esito, svuotaHistoryWorkflowAction());
esitoLog(esito, svuotaMBDiscussion(companyId)); esitoLog(esito, svuotaMBDiscussion(companyId));
esitoLog(esito, svuotaMBMessage(companyId)); esitoLog(esito, svuotaMBMessage(companyId));
esitoLog(esito, svuotaMBThread()); esitoLog(esito, svuotaMBThread());
esitoLog(esito, svuotaPagamento(companyId)); esitoLog(esito, svuotaPagamento(companyId));
esitoLog(esito, svuotaParereGeologo()); esitoLog(esito, svuotaParereGeologo());
esitoLog(esito, svuotaRatingsEntry());
esitoLog(esito, svuotaRatingsStats(companyId)); esitoLog(esito, svuotaRatingsStats(companyId));
esitoLog(esito, svuotaResourcePermission(companyId)); esitoLog(esito, svuotaResourcePermission(companyId));
esitoLog(esito, svuotaSoggetto()); esitoLog(esito, svuotaSoggetto());
@ -311,6 +312,7 @@ public class ManutenzioneDatabase {
esitoLog(esito, svuotaSyncDLObject()); esitoLog(esito, svuotaSyncDLObject());
esitoLog(esito, svuotaSystemEvent(companyId)); esitoLog(esito, svuotaSystemEvent(companyId));
esitoLog(esito, svuotaTempistica()); esitoLog(esito, svuotaTempistica());
esitoLog(esito, svuotaWorkflowInstance());
return esito; return esito;
} }
@ -417,7 +419,8 @@ public class ManutenzioneDatabase {
int rimossi = 0; int rimossi = 0;
fileEntries = DLAppServiceUtil.getFileEntries(repositoryId, folderId, start, start + SLICE); fileEntries = DLAppServiceUtil.getFileEntries(repositoryId, folderId, start, start + SLICE);
for (FileEntry fileEntry : fileEntries) { for (FileEntry fileEntry : fileEntries) {
String[] parti = StringUtil.split(fileEntry.getTitle(), '_'); String[] parti = StringUtil.split(fileEntry.getTitle()
.replaceAll("\\.p7m$", StringPool.BLANK), '_');
String strId1 = parti[0]; String strId1 = parti[0];
String tipo = StringPool.BLANK; String tipo = StringPool.BLANK;
String strId2 = StringPool.BLANK; String strId2 = StringPool.BLANK;
@ -430,6 +433,11 @@ public class ManutenzioneDatabase {
tipo = parti[1] + StringPool.UNDERLINE + parti[2]; tipo = parti[1] + StringPool.UNDERLINE + parti[2];
strId2 = parti[3]; strId2 = parti[3];
break; break;
case 5:
if (parti[4].equals("protocollato")) {
tipo = parti[1] + StringPool.UNDERLINE + parti[2];
strId2 = parti[3];
}
} }
if ((strId1.length() == 10) && (strId2.length() > 0) && SismicaUtil.isLong(strId1) if ((strId1.length() == 10) && (strId2.length() > 0) && SismicaUtil.isLong(strId1)
&& SismicaUtil.isLong(strId2)) { && SismicaUtil.isLong(strId2)) {
@ -442,7 +450,11 @@ public class ManutenzioneDatabase {
rimossi++; rimossi++;
} }
break; break;
case "AI_B":
case "CO_B": case "CO_B":
case "IN_B":
case "IN_F":
case "MA_F":
if (!avvisiFileEntries.contains(fileEntry.getFileEntryId())) { if (!avvisiFileEntries.contains(fileEntry.getFileEntryId())) {
DLAppLocalServiceUtil.deleteFileEntry(fileEntry.getFileEntryId()); DLAppLocalServiceUtil.deleteFileEntry(fileEntry.getFileEntryId());
cancellati++; cancellati++;
@ -781,6 +793,26 @@ public class ManutenzioneDatabase {
return "Cancellati " + cancellati + " Group"; return "Cancellati " + cancellati + " Group";
} }
private static String svuotaHistoryWorkflowAction() throws SystemException {
int start = 0;
int cancellati = 0;
List<HistoryWorkflowAction> actions = null;
do {
int rimossi = 0;
actions = HistoryWorkflowActionLocalServiceUtil.getHistoryWorkflowActions(start, start + SLICE);
for (HistoryWorkflowAction action : actions) {
if (!esiste(INTPRATICA_CLASS_NAME, action.getIntPraticaId())
|| !esiste(DETTPRATICA_CLASS_NAME, action.getDettPraticaId())) {
HistoryWorkflowActionLocalServiceUtil.deleteHistoryWorkflowAction(action);
cancellati++;
rimossi++;
}
}
start += SLICE - rimossi;
} while (actions.size() > 0);
return "Cancellati " + cancellati + " HistoryWorkflowAction";
}
private static String svuotaMBDiscussion(long companyId) throws SystemException { private static String svuotaMBDiscussion(long companyId) throws SystemException {
int start = 0; int start = 0;
int cancellati = 0; int cancellati = 0;
@ -885,6 +917,25 @@ public class ManutenzioneDatabase {
return "Cancellati " + cancellati + " ParereGeologo"; return "Cancellati " + cancellati + " ParereGeologo";
} }
private static String svuotaRatingsEntry() throws SystemException {
int start = 0;
int cancellati = 0;
List<RatingsEntry> entries = null;
do {
int rimossi = 0;
entries = RatingsEntryLocalServiceUtil.getRatingsEntries(start, start + SLICE);
for (RatingsEntry entry : entries) {
if (!esiste(entry.getClassName(), entry.getClassPK())) {
RatingsEntryLocalServiceUtil.deleteRatingsEntry(entry);
cancellati++;
rimossi++;
}
}
start += SLICE - rimossi;
} while (entries.size() > 0);
return "Cancellati " + cancellati + " RatingsEntry";
}
private static String svuotaRatingsStats(long companyId) throws SystemException { private static String svuotaRatingsStats(long companyId) throws SystemException {
int start = 0; int start = 0;
int cancellati = 0; int cancellati = 0;
@ -1075,6 +1126,37 @@ public class ManutenzioneDatabase {
return "Cancellati " + cancellati + " User"; return "Cancellati " + cancellati + " User";
} }
private static String svuotaWorkflowInstance() throws SystemException, PortalException {
int start = 0;
int cancellati = 0;
List<WorkflowInstanceLink> links = null;
do {
int rimossi = 0;
links = WorkflowInstanceLinkLocalServiceUtil.getWorkflowInstanceLinks(start, start + SLICE);
for (WorkflowInstanceLink link : links) {
if (!esiste(link.getClassName(), link.getClassPK())) {
_log.info("Manca " + link.getClassName() + " " + link.getClassPK());
WorkflowInstance instance = null;
try {
instance = WorkflowInstanceManagerUtil.getWorkflowInstance(link.getCompanyId(),
link.getWorkflowInstanceId());
} catch (PortalException e) {
}
if (Validator.isNull(instance)) {
WorkflowInstanceLinkLocalServiceUtil.deleteWorkflowInstanceLink(link);
} else {
WorkflowInstanceManagerUtil.deleteWorkflowInstance(link.getCompanyId(),
instance.getWorkflowInstanceId());
}
cancellati++;
rimossi++;
}
}
start += SLICE - rimossi;
} while (links.size() > 0);
return "Cancellati " + cancellati + " WorkflowInstance";
}
private static boolean esiste(String className, long classPK) throws SystemException { private static boolean esiste(String className, long classPK) throws SystemException {
return esiste(className, classPK, 0); return esiste(className, classPK, 0);
} }

4
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/scheduler/SchedulerGeneraDocumento.java

@ -49,6 +49,7 @@ public class SchedulerGeneraDocumento implements MessageListener {
private static final int SIZE = 10; private static final int SIZE = 10;
@Override
public void receive(Message message) throws MessageListenerException { public void receive(Message message) throws MessageListenerException {
if (lock.tryLock()) { if (lock.tryLock()) {
@ -181,9 +182,6 @@ public class SchedulerGeneraDocumento implements MessageListener {
_log.info("generaDocumento: generateReport: " + fileEntryIdTemplate); _log.info("generaDocumento: generateReport: " + fileEntryIdTemplate);
ReportResultDto result = ReportUtil.generateReport(companyId, userId, reportDto, bean); ReportResultDto result = ReportUtil.generateReport(companyId, userId, reportDto, bean);
idFileEntry = result.getFileEntryIds()[0]; idFileEntry = result.getFileEntryIds()[0];
// idFileEntry = (Long)
// MessageBusUtil.sendSynchronousMessage(ReportDestinationNames.SYNC,
// messageReport, 1);
if (Validator.isNotNull(idFileEntry)) { if (Validator.isNotNull(idFileEntry)) {
if (avviso.getTipoAvviso().equalsIgnoreCase(AvvisoUtil.TIPO_AVVISO_DIRETTO)) { if (avviso.getTipoAvviso().equalsIgnoreCase(AvvisoUtil.TIPO_AVVISO_DIRETTO)) {

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=2900 build.number=2901
build.date=1614856738177 build.date=1614956751482
build.auto.upgrade=true build.auto.upgrade=true
## ##

4
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/.settings/org.eclipse.wst.common.component

@ -2,10 +2,10 @@
<wb-module deploy-name="portos-fe-portlet"> <wb-module deploy-name="portos-fe-portlet">
<wb-resource deploy-path="/" source-path="/docroot" tag="defaultRootSource"/> <wb-resource deploy-path="/" source-path="/docroot" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/docroot/WEB-INF/src"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/docroot/WEB-INF/src"/>
<dependent-module archiveName="portos-bo-portlet-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar"> <dependent-module archiveName="hms-taglib-hook-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/hms-taglib-hook/docroot/WEB-INF/lib/hms-taglib-hook-service.jar">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>
<dependent-module archiveName="hms-taglib-hook-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/hms-taglib-hook/docroot/WEB-INF/lib/hms-taglib-hook-service.jar"> <dependent-module archiveName="portos-bo-portlet-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>
<property name="context-root" value="portos-fe-portlet"/> <property name="context-root" value="portos-fe-portlet"/>

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

@ -13,8 +13,8 @@
## ##
build.namespace=portos_rep build.namespace=portos_rep
build.number=26 build.number=27
build.date=1611761568046 build.date=1614958757312
build.auto.upgrade=true build.auto.upgrade=true
## ##

Caricamento…
Annulla
Salva