Fix su ExchangeColli e job da caricare all'avvio
This commit is contained in:
16
.idea/runConfigurations/Tomcat__1__Rosso_Gargano_.xml
generated
Normal file
16
.idea/runConfigurations/Tomcat__1__Rosso_Gargano_.xml
generated
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Tomcat #1 (Rosso Gargano)" type="Remote" folderName="Rosso Gargano">
|
||||||
|
<module name="ems-engine" />
|
||||||
|
<option name="USE_SOCKET_TRANSPORT" value="true" />
|
||||||
|
<option name="SERVER_MODE" value="false" />
|
||||||
|
<option name="SHMEM_ADDRESS" />
|
||||||
|
<option name="HOST" value="192.168.1.13" />
|
||||||
|
<option name="PORT" value="8001" />
|
||||||
|
<option name="AUTO_RESTART" value="false" />
|
||||||
|
<RunnerSettings RunnerId="Debug">
|
||||||
|
<option name="DEBUG_PORT" value="8001" />
|
||||||
|
<option name="LOCAL" value="false" />
|
||||||
|
</RunnerSettings>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
package it.integry.ems.schedule.new_cron_job.service;
|
package it.integry.ems.schedule.new_cron_job.service;
|
||||||
|
|
||||||
import com.annimon.stream.Optional;
|
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
import it.integry.annotations.PostContextAutowired;
|
import it.integry.annotations.PostContextAutowired;
|
||||||
import it.integry.annotations.PostWebServerConstruct;
|
import it.integry.annotations.PostWebServerConstruct;
|
||||||
@@ -22,6 +21,8 @@ import org.springframework.web.context.ContextLoader;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class DefaultAutomatedOperationHandlerComponent {
|
public class DefaultAutomatedOperationHandlerComponent {
|
||||||
@@ -45,13 +46,16 @@ public class DefaultAutomatedOperationHandlerComponent {
|
|||||||
|
|
||||||
if (!UtilityDebug.isDebugExecution() && !UtilityDebug.isIntegryServer()) {
|
if (!UtilityDebug.isDebugExecution() && !UtilityDebug.isIntegryServer()) {
|
||||||
deleteJobFileDeleter(multiDBTransactionManager);
|
deleteJobFileDeleter(multiDBTransactionManager);
|
||||||
initServerInfoCheckJob();
|
|
||||||
initRemoveFpxInvioFilesJob();
|
|
||||||
initChkAutofatture();
|
|
||||||
initChkInvioFE();
|
|
||||||
initMinioOrphanFileCleaner(multiDBTransactionManager);
|
|
||||||
initPassaggioAnno(multiDBTransactionManager);
|
|
||||||
deleteChkScadenze(multiDBTransactionManager);
|
deleteChkScadenze(multiDBTransactionManager);
|
||||||
|
|
||||||
|
if (settingsModel.isPrimaryInstance()) {
|
||||||
|
initServerInfoCheckJob();
|
||||||
|
initRemoveFpxInvioFilesJob();
|
||||||
|
initMinioOrphanFileCleaner(multiDBTransactionManager);
|
||||||
|
initPassaggioAnno(multiDBTransactionManager);
|
||||||
|
initChkAutofatture();
|
||||||
|
initChkInvioFE();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
@@ -126,6 +130,7 @@ public class DefaultAutomatedOperationHandlerComponent {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initPassaggioAnno(MultiDBTransactionManager data) {
|
private void initPassaggioAnno(MultiDBTransactionManager data) {
|
||||||
try {
|
try {
|
||||||
List<AdvancedDataSource> activeConnections = data.getActiveConnections();
|
List<AdvancedDataSource> activeConnections = data.getActiveConnections();
|
||||||
@@ -176,15 +181,16 @@ public class DefaultAutomatedOperationHandlerComponent {
|
|||||||
if (!activeOperations.containsKey(AutomatedOperationTypeEnum.METHOD_CALLS))
|
if (!activeOperations.containsKey(AutomatedOperationTypeEnum.METHOD_CALLS))
|
||||||
activeOperations.put(AutomatedOperationTypeEnum.METHOD_CALLS, new ArrayList<>());
|
activeOperations.put(AutomatedOperationTypeEnum.METHOD_CALLS, new ArrayList<>());
|
||||||
|
|
||||||
activeConnections = Stream.of(activeConnections)
|
activeConnections = activeConnections.stream()
|
||||||
.filter(x -> x.isInternalDb() && x.getDataSource().getProfile().equalsIgnoreCase(x.getDataSource().getDbName()))
|
.filter(x -> x.isInternalDb() && x.getDataSource().getProfile().equalsIgnoreCase(x.getDataSource().getDbName()))
|
||||||
.toList();
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
for (AdvancedDataSource activeConnection : activeConnections) {
|
for (AdvancedDataSource activeConnection : activeConnections) {
|
||||||
final String operationName = "Controllo Scadenze " + activeConnection.getProfileName().toUpperCase();
|
final String operationName = "Controllo Scadenze " + activeConnection.getProfileName().toUpperCase();
|
||||||
|
|
||||||
Optional<BaseAutomatedOperationDTO> first = Stream.of(activeOperations.get(AutomatedOperationTypeEnum.METHOD_CALLS))
|
Optional<BaseAutomatedOperationDTO> first = activeOperations.get(AutomatedOperationTypeEnum.METHOD_CALLS).stream()
|
||||||
.filter(iScheduledOperation -> iScheduledOperation.getName().equals(operationName)).findFirst();
|
.filter(iScheduledOperation -> iScheduledOperation.getName().equals(operationName))
|
||||||
|
.findFirst();
|
||||||
|
|
||||||
if (first.isPresent()) {
|
if (first.isPresent()) {
|
||||||
automatedOperationHandlerComponent.remove(first.get().getId());
|
automatedOperationHandlerComponent.remove(first.get().getId());
|
||||||
@@ -199,6 +205,7 @@ public class DefaultAutomatedOperationHandlerComponent {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void deleteJobFileDeleter(MultiDBTransactionManager data) {
|
private void deleteJobFileDeleter(MultiDBTransactionManager data) {
|
||||||
try {
|
try {
|
||||||
List<AdvancedDataSource> activeConnections = data.getActiveConnections();
|
List<AdvancedDataSource> activeConnections = data.getActiveConnections();
|
||||||
@@ -207,18 +214,18 @@ public class DefaultAutomatedOperationHandlerComponent {
|
|||||||
if (!activeOperations.containsKey(AutomatedOperationTypeEnum.METHOD_CALLS))
|
if (!activeOperations.containsKey(AutomatedOperationTypeEnum.METHOD_CALLS))
|
||||||
activeOperations.put(AutomatedOperationTypeEnum.METHOD_CALLS, new ArrayList<>());
|
activeOperations.put(AutomatedOperationTypeEnum.METHOD_CALLS, new ArrayList<>());
|
||||||
|
|
||||||
activeConnections = Stream.of(activeConnections)
|
activeConnections = activeConnections.stream()
|
||||||
.filter(x -> x.isInternalDb() && x.getDataSource().getProfile().equalsIgnoreCase(x.getDataSource().getDbName()))
|
.filter(x -> x.isInternalDb() && x.getDataSource().getProfile().equalsIgnoreCase(x.getDataSource().getDbName()))
|
||||||
.toList();
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
for (AdvancedDataSource activeConnection : activeConnections) {
|
for (AdvancedDataSource activeConnection : activeConnections) {
|
||||||
final String filesDeleterOperationName = "File deleter " + activeConnection.getProfileName().toUpperCase();
|
final String filesDeleterOperationName = "File deleter " + activeConnection.getProfileName().toUpperCase();
|
||||||
|
|
||||||
List<BaseAutomatedOperationDTO> list = Stream.of(activeOperations.get(AutomatedOperationTypeEnum.METHOD_CALLS))
|
List<BaseAutomatedOperationDTO> list = activeOperations.get(AutomatedOperationTypeEnum.METHOD_CALLS).stream()
|
||||||
.filter(iScheduledOperation -> iScheduledOperation.getName().equalsIgnoreCase(filesDeleterOperationName))
|
.filter(iScheduledOperation -> iScheduledOperation.getName().equalsIgnoreCase(filesDeleterOperationName))
|
||||||
.toList();
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
if (list != null && list.size() > 0) {
|
if (!list.isEmpty()) {
|
||||||
for (BaseAutomatedOperationDTO operationDTO : list) {
|
for (BaseAutomatedOperationDTO operationDTO : list) {
|
||||||
automatedOperationHandlerComponent.remove(operationDTO.getId());
|
automatedOperationHandlerComponent.remove(operationDTO.getId());
|
||||||
}
|
}
|
||||||
@@ -263,7 +270,7 @@ public class DefaultAutomatedOperationHandlerComponent {
|
|||||||
|
|
||||||
SettingsModel settingsModel = ContextLoader.getCurrentWebApplicationContext().getBean(SettingsModel.class);
|
SettingsModel settingsModel = ContextLoader.getCurrentWebApplicationContext().getBean(SettingsModel.class);
|
||||||
|
|
||||||
Stream.of(settingsModel.getAvailableConnections())
|
settingsModel.getAvailableConnections().stream()
|
||||||
.filter(x -> x.getInternalDb() && x.getProfileName().equalsIgnoreCase(x.getDbName()))
|
.filter(x -> x.getInternalDb() && x.getProfileName().equalsIgnoreCase(x.getDbName()))
|
||||||
.map(AvailableConnectionsModel::getProfileName)
|
.map(AvailableConnectionsModel::getProfileName)
|
||||||
.forEach(profileDb -> {
|
.forEach(profileDb -> {
|
||||||
|
|||||||
@@ -708,6 +708,14 @@ public class MtbColt extends EntityBase implements EquatableEntityInterface<MtbC
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object obj) {
|
||||||
|
if (this == obj) return true;
|
||||||
|
if (!(obj instanceof MtbColt)) return false;
|
||||||
|
MtbColt mtbColt = (MtbColt) obj;
|
||||||
|
return equalsContent(mtbColt);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equalsKey(MtbColt other) {
|
public boolean equalsKey(MtbColt other) {
|
||||||
if (this == other) return true;
|
if (this == other) return true;
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ public class ContabilController {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RossoGarganoSyncService rossoGarganoSyncService;
|
private RossoGarganoSyncService rossoGarganoSyncService;
|
||||||
|
|
||||||
@RequestMapping(value = "/contabil/status", method = RequestMethod.GET)
|
@RequestMapping(value = "/contabil/status", method = RequestMethod.GET)
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
List<StatusResponse> status(HttpServletRequest request) {
|
List<StatusResponse> status(HttpServletRequest request) {
|
||||||
@@ -98,7 +99,7 @@ public class ContabilController {
|
|||||||
@RequestParam("dataDist") String dataDist, @RequestParam("rifDist") Integer rifDist) {
|
@RequestParam("dataDist") String dataDist, @RequestParam("rifDist") Integer rifDist) {
|
||||||
ServiceRestResponse resp = null;
|
ServiceRestResponse resp = null;
|
||||||
try {
|
try {
|
||||||
resp =SEPAService.getSepaXml(UtilityString.parseDate(dataDist), rifDist);
|
resp = SEPAService.getSepaXml(UtilityString.parseDate(dataDist), rifDist);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error(request.getRequestURI(), e);
|
logger.error(request.getRequestURI(), e);
|
||||||
resp = new ServiceRestResponse(EsitoType.KO, configuration, e);
|
resp = new ServiceRestResponse(EsitoType.KO, configuration, e);
|
||||||
@@ -304,141 +305,81 @@ public class ContabilController {
|
|||||||
@RequestMapping(value = "cancellaAutofattura", method = RequestMethod.POST)
|
@RequestMapping(value = "cancellaAutofattura", method = RequestMethod.POST)
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
ServiceRestResponse cancellaAutofattura(HttpServletRequest request,
|
ServiceRestResponse cancellaAutofattura(HttpServletRequest request,
|
||||||
@RequestParam(CommonConstants.PROFILE_DB) String configuration,
|
@RequestParam(CommonConstants.PROFILE_DB) String configuration,
|
||||||
@RequestBody AutofatturaDTO autofatturaDTO) throws Exception {
|
@RequestBody AutofatturaDTO autofatturaDTO) throws Exception {
|
||||||
|
|
||||||
return ServiceRestResponse.createPositiveResponse(autofatturaService.cancellaAutofattura(autofatturaDTO));
|
return ServiceRestResponse.createPositiveResponse(autofatturaService.cancellaAutofattura(autofatturaDTO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = EmsRestConstants.PATH_CHK_AUTOFATTURA, method = RequestMethod.POST)
|
@RequestMapping(value = EmsRestConstants.PATH_CHK_AUTOFATTURA, method = RequestMethod.POST)
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
ServiceRestResponse chkAutofattura(HttpServletRequest request) {
|
ServiceRestResponse chkAutofattura(HttpServletRequest request) throws Exception {
|
||||||
|
autofatturaService.chkAutofattura();
|
||||||
ServiceRestResponse response;
|
return ServiceRestResponse.createPositiveResponse();
|
||||||
try {
|
|
||||||
autofatturaService.chkAutofattura();
|
|
||||||
response = ServiceRestResponse.createPositiveResponse();
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error(request.getRequestURI(), e);
|
|
||||||
response = new ServiceRestResponse(EsitoType.KO, "", e);
|
|
||||||
}
|
|
||||||
return response;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "chkScadenze", method = RequestMethod.POST)
|
@RequestMapping(value = "chkScadenze", method = RequestMethod.POST)
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
ServiceRestResponse chkScadenze(HttpServletRequest request) {
|
ServiceRestResponse chkScadenze(HttpServletRequest request) throws Exception {
|
||||||
|
scadenzeService.chkScadenze();
|
||||||
ServiceRestResponse response;
|
return ServiceRestResponse.createPositiveResponse();
|
||||||
try {
|
|
||||||
scadenzeService.chkScadenze();
|
|
||||||
response = ServiceRestResponse.createPositiveResponse();
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error(request.getRequestURI(), e);
|
|
||||||
response = new ServiceRestResponse(EsitoType.KO, "", e);
|
|
||||||
}
|
|
||||||
return response;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = EmsRestConstants.PATH_PASSAGGIO_ANNO, method = RequestMethod.POST)
|
@RequestMapping(value = EmsRestConstants.PATH_PASSAGGIO_ANNO, method = RequestMethod.POST)
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
ServiceRestResponse checkYear(HttpServletRequest request, @RequestParam(CommonConstants.PROFILE_DB) String configuration) {
|
ServiceRestResponse checkYear(HttpServletRequest request, @RequestParam(CommonConstants.PROFILE_DB) String configuration) throws Exception {
|
||||||
|
|
||||||
ServiceRestResponse response;
|
ServiceRestResponse response;
|
||||||
try {
|
if (passaggioAnno.checkYear()) {
|
||||||
if (passaggioAnno.checkYear()) {
|
response = ServiceRestResponse.createPositiveResponse();
|
||||||
response = ServiceRestResponse.createPositiveResponse();
|
} else {
|
||||||
} else {
|
response = ServiceRestResponse.createNegativeResponse();
|
||||||
response = ServiceRestResponse.createNegativeResponse();
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error(request.getRequestURI(), e);
|
|
||||||
response = new ServiceRestResponse(EsitoType.KO, "", e);
|
|
||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "SyncDulciar", method = RequestMethod.POST)
|
@RequestMapping(value = "SyncDulciar", method = RequestMethod.POST)
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
ServiceRestResponse syncDulciar(HttpServletRequest request, @RequestParam(CommonConstants.PROFILE_DB) String configuration) {
|
ServiceRestResponse syncDulciar(HttpServletRequest request, @RequestParam(CommonConstants.PROFILE_DB) String configuration) throws Exception {
|
||||||
try {
|
dulciarSincronizzazione.sync();
|
||||||
dulciarSincronizzazione.sync();
|
return ServiceRestResponse.createPositiveResponse();
|
||||||
return ServiceRestResponse.createPositiveResponse();
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error(request.getRequestURI(), e);
|
|
||||||
return ServiceRestResponse.createNegativeResponse(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = "syncRossoGargano", method = RequestMethod.POST)
|
@RequestMapping(value = "syncRossoGargano", method = RequestMethod.POST)
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
ServiceRestResponse syncRossoGargano(HttpServletRequest request, @RequestParam(CommonConstants.PROFILE_DB) String configuration) {
|
ServiceRestResponse syncRossoGargano(HttpServletRequest request, @RequestParam(CommonConstants.PROFILE_DB) String configuration) throws Exception {
|
||||||
try {
|
|
||||||
rossoGarganoSyncService.sync();
|
|
||||||
return ServiceRestResponse.createPositiveResponse();
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error(request.getRequestURI(), e);
|
|
||||||
return ServiceRestResponse.createNegativeResponse(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
rossoGarganoSyncService.sync();
|
||||||
|
return ServiceRestResponse.createPositiveResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = EmsRestConstants.PATH_CALCOLA_AMMORTAMENTI, method = RequestMethod.POST)
|
@RequestMapping(value = EmsRestConstants.PATH_CALCOLA_AMMORTAMENTI, method = RequestMethod.POST)
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
ServiceRestResponse calcolaAmmortamenti(HttpServletRequest request,
|
ServiceRestResponse calcolaAmmortamenti(HttpServletRequest request,
|
||||||
@RequestParam(CommonConstants.PROFILE_DB) String configuration,
|
@RequestParam(CommonConstants.PROFILE_DB) String configuration,
|
||||||
@RequestBody CalcAmmortamentoDTO calcAmmortamentoDTO) {
|
@RequestBody CalcAmmortamentoDTO calcAmmortamentoDTO) throws Exception {
|
||||||
|
|
||||||
ServiceRestResponse response;
|
return ServiceRestResponse.createPositiveResponse(ammortamentiService.calcAmmortamento(calcAmmortamentoDTO));
|
||||||
try {
|
|
||||||
ServiceRestResponse.createPositiveResponse(ammortamentiService.calcAmmortamento(calcAmmortamentoDTO));
|
|
||||||
response = ServiceRestResponse.createPositiveResponse();
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error(request.getRequestURI(), e);
|
|
||||||
response = new ServiceRestResponse(EsitoType.KO, configuration, e);
|
|
||||||
}
|
|
||||||
return response;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = EmsRestConstants.PATH_REGISTRA_MOVCONV_AMMORTAMENTI, method = RequestMethod.POST)
|
@RequestMapping(value = EmsRestConstants.PATH_REGISTRA_MOVCONV_AMMORTAMENTI, method = RequestMethod.POST)
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
ServiceRestResponse registraMovContAmmortamenti(HttpServletRequest request,
|
ServiceRestResponse registraMovContAmmortamenti(HttpServletRequest request,
|
||||||
@RequestParam(CommonConstants.PROFILE_DB) String configuration,
|
@RequestParam(CommonConstants.PROFILE_DB) String configuration,
|
||||||
@RequestBody RegMovConAmmortamentoDTO regMovConAmmortamentoDTO) {
|
@RequestBody RegMovConAmmortamentoDTO regMovConAmmortamentoDTO) throws Exception {
|
||||||
|
|
||||||
ServiceRestResponse response;
|
|
||||||
try {
|
|
||||||
ServiceRestResponse.createPositiveResponse(ammortamentiService.registraMovContAmmortamenti(regMovConAmmortamentoDTO));
|
|
||||||
response = ServiceRestResponse.createPositiveResponse();
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error(request.getRequestURI(), e);
|
|
||||||
response = new ServiceRestResponse(EsitoType.KO, configuration, e);
|
|
||||||
}
|
|
||||||
return response;
|
|
||||||
|
|
||||||
|
return ServiceRestResponse.createPositiveResponse(ammortamentiService.registraMovContAmmortamenti(regMovConAmmortamentoDTO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "allineaPartiteContabili", method = RequestMethod.POST)
|
@RequestMapping(value = "allineaPartiteContabili", method = RequestMethod.POST)
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
ServiceRestResponse allineaPartiteContabili(HttpServletRequest request,
|
ServiceRestResponse allineaPartiteContabili(HttpServletRequest request,
|
||||||
@RequestParam(CommonConstants.PROFILE_DB) String configuration) {
|
@RequestParam(CommonConstants.PROFILE_DB) String configuration) throws Exception {
|
||||||
|
|
||||||
|
|
||||||
try {
|
|
||||||
contabilService.allineaPartitaContabili();
|
|
||||||
return ServiceRestResponse.createPositiveResponse();
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error(request.getRequestURI(), e);
|
|
||||||
return ServiceRestResponse.createNegativeResponse(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
contabilService.allineaPartitaContabili();
|
||||||
|
return ServiceRestResponse.createPositiveResponse();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -767,14 +767,10 @@ public class DocumentController {
|
|||||||
@RequestMapping(value = EmsRestConstants.PATH_REMOVE_FPX_INVIO_FILES, method = RequestMethod.POST)
|
@RequestMapping(value = EmsRestConstants.PATH_REMOVE_FPX_INVIO_FILES, method = RequestMethod.POST)
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
ServiceRestResponse removeFpxInvioFiles(HttpServletRequest request,
|
ServiceRestResponse removeFpxInvioFiles(HttpServletRequest request,
|
||||||
@RequestParam(CommonConstants.PROFILE_DB) String profileDb) {
|
@RequestParam(CommonConstants.PROFILE_DB) String profileDb) throws Exception {
|
||||||
try {
|
|
||||||
documentService.removeFpxInvioFiles();
|
documentService.removeFpxInvioFiles();
|
||||||
return ServiceRestResponse.createPositiveResponse();
|
return ServiceRestResponse.createPositiveResponse();
|
||||||
} catch (Exception ex) {
|
|
||||||
logger.error(request.getRequestURI(), ex);
|
|
||||||
return new ServiceRestResponse(EsitoType.KO, profileDb, ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -998,16 +994,17 @@ public class DocumentController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "updateDtbDoctPrevistaFat", method = RequestMethod.POST)
|
@RequestMapping(value = "updateDtbDoctPrevistaFat", method = RequestMethod.POST)
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
ServiceRestResponse updateDtbDoctPrevistaFat(HttpServletRequest request,
|
ServiceRestResponse updateDtbDoctPrevistaFat(HttpServletRequest request,
|
||||||
@RequestParam(CommonConstants.PROFILE_DB) String configuration,
|
@RequestParam(CommonConstants.PROFILE_DB) String configuration,
|
||||||
@RequestParam String codDtip,
|
@RequestParam String codDtip,
|
||||||
@RequestParam String codAnag,
|
@RequestParam String codAnag,
|
||||||
@RequestParam Date dataDoc,
|
@RequestParam Date dataDoc,
|
||||||
@RequestParam String serDoc,
|
@RequestParam String serDoc,
|
||||||
@RequestParam Integer numDoc,
|
@RequestParam Integer numDoc,
|
||||||
@RequestParam String previstaFat) {
|
@RequestParam String previstaFat) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return ServiceRestResponse.createPositiveResponse(documentService.updateDtbDoctPrevistaFat(codDtip, codAnag, dataDoc, serDoc, numDoc, previstaFat));
|
return ServiceRestResponse.createPositiveResponse(documentService.updateDtbDoctPrevistaFat(codDtip, codAnag, dataDoc, serDoc, numDoc, previstaFat));
|
||||||
|
|||||||
@@ -171,14 +171,16 @@ public class ExchangeColliImportService {
|
|||||||
mtbColrLavTableName, null, retrieveAlreadyImported);
|
mtbColrLavTableName, null, retrieveAlreadyImported);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mtbColtLav
|
mtbColtLav
|
||||||
|
.parallelStream()
|
||||||
.forEach(x -> {
|
.forEach(x -> {
|
||||||
x.setMtbColr(mtbColrLav.stream()
|
mtbColrLav.stream()
|
||||||
.filter(y -> y.getDataCollo().equals(x.getDataCollo()) &&
|
.filter(y -> y.getDataCollo().equals(x.getDataCollo()) &&
|
||||||
y.getGestione().equalsIgnoreCase(x.getGestione()) &&
|
y.getGestione().equalsIgnoreCase(x.getGestione()) &&
|
||||||
y.getNumCollo().equals(x.getNumCollo()) &&
|
y.getNumCollo().equals(x.getNumCollo()) &&
|
||||||
y.getSerCollo().equalsIgnoreCase(x.getSerCollo()))
|
y.getSerCollo().equalsIgnoreCase(x.getSerCollo()))
|
||||||
.collect(Collectors.toList()));
|
.forEach(mtbColr -> x.getMtbColr().add(mtbColr));
|
||||||
});
|
});
|
||||||
|
|
||||||
return mtbColtLav;
|
return mtbColtLav;
|
||||||
|
|||||||
Reference in New Issue
Block a user