Merge branch 'develop' into feature/JDK11
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
This commit is contained in:
@@ -116,6 +116,7 @@ public class EmsRestConstants {
|
||||
public static final String PATH_USERS = PATH + "getUser";
|
||||
public static final String PATH_EXPORT_ORDINI_ACQ = PATH + "exportOrdiniAcquisto";
|
||||
public static final String PATH_PROCESS_REPORT = PATH + "processReport";
|
||||
public static final String PATH_DOWNLOAD_REPORT_LIST = PATH + "downloadReportList";
|
||||
public static final String PATH_DOWNLOAD_REPORT = PATH + "downloadReport";
|
||||
public static final String PATH_PROCESS_REPORT_TYPE = PATH + "processReportType";
|
||||
public static final String PATH_PRINT_REPORT_TYPE = PATH + "printReportType";
|
||||
|
||||
@@ -14,6 +14,7 @@ import it.integry.ems.response.ServiceRestResponse;
|
||||
import it.integry.ems.service.PrinterService;
|
||||
import it.integry.ems.service.ReportProcessor;
|
||||
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||
import it.integry.ems.utility.UtilityPdf;
|
||||
import it.integry.ems_model.config.EmsRestConstants;
|
||||
import it.integry.ems_model.entity.GrlAnagJrept;
|
||||
import it.integry.ems_model.entity.JtbDisegniFiles;
|
||||
@@ -88,6 +89,7 @@ public class EmsEngineController {
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_REPORT, method = RequestMethod.POST)
|
||||
public @ResponseBody
|
||||
ServiceRestResponse downloadReport(HttpServletRequest request,
|
||||
@@ -100,6 +102,27 @@ public class EmsEngineController {
|
||||
return ServiceRestResponse.createNegativeResponse("Nessun report generato!");
|
||||
}
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_REPORT_LIST, method = RequestMethod.POST)
|
||||
public @ResponseBody
|
||||
ServiceRestResponse downloadReportList(HttpServletRequest request,
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String configuration,
|
||||
@RequestBody JasperDTO[] jasperDTOList)throws Exception {
|
||||
|
||||
FileItem fi = new FileItem();
|
||||
List<byte[]> pdfList = new ArrayList<>();
|
||||
for (JasperDTO jasperDTO : jasperDTOList) {
|
||||
pdfList.add(emsEngineService.processReport(jasperDTO));
|
||||
}
|
||||
byte[] bytes = UtilityPdf.merge(pdfList);
|
||||
|
||||
if (bytes != null && bytes.length > 0) {
|
||||
return ServiceRestResponse.createPositiveResponse(downloadFileHandlerService.generateDownloadItem(new Date().getTime() + ".pdf", bytes));
|
||||
} else {
|
||||
return ServiceRestResponse.createNegativeResponse("Nessun report generato!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_PROCESS_REPORT_TYPE, method = RequestMethod.POST)
|
||||
public @ResponseBody
|
||||
ServiceRestResponse processReportTypeList(HttpServletRequest request,
|
||||
@@ -122,14 +145,9 @@ public class EmsEngineController {
|
||||
public @ResponseBody
|
||||
ServiceRestResponse printReportTypeList(HttpServletRequest request,
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String configuration,
|
||||
@RequestBody ReportTypeDTO reportTypeDTO) {
|
||||
try {
|
||||
@RequestBody ReportTypeDTO reportTypeDTO) throws Exception {
|
||||
printerService.printReportType(reportTypeDTO);
|
||||
return ServiceRestResponse.createPositiveResponse();
|
||||
} catch (Exception e) {
|
||||
logger.error(request.getRequestURI(), e);
|
||||
return ServiceRestResponse.createNegativeResponse(configuration, e);
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_GET_SETUP_REPORT_TYPE, method = RequestMethod.POST)
|
||||
|
||||
@@ -557,8 +557,11 @@ public class WMSGenericController {
|
||||
ServiceRestResponse spostaULInPosizione(@RequestParam(CommonConstants.PROFILE_DB) String configuration,
|
||||
@RequestBody SpostaUlRequestDTO requestDTO) throws Exception {
|
||||
try {
|
||||
wmsGenericService.spostaUL(requestDTO);
|
||||
return ServiceRestResponse.createPositiveResponse();
|
||||
MtbColt mtbColt = wmsGenericService.spostaUL(requestDTO);
|
||||
if (mtbColt != null) {
|
||||
mtbColt.setOnlyPkMaster(false);
|
||||
}
|
||||
return ServiceRestResponse.createPositiveResponse(mtbColt);
|
||||
} catch (Exception e) {
|
||||
multiDBTransactionManager.rollbackAll();
|
||||
throw e;
|
||||
|
||||
@@ -2027,7 +2027,7 @@ public class WMSGenericService {
|
||||
UtilityEntity.throwEntitiesException(entitiesToSave);
|
||||
}
|
||||
|
||||
public void spostaUL(SpostaUlRequestDTO requestDTO) throws Exception {
|
||||
public MtbColt spostaUL(SpostaUlRequestDTO requestDTO) throws Exception {
|
||||
if (UtilityString.isNullOrEmpty(requestDTO.getCodMdep()))
|
||||
throw new Exception("Nessun deposito di arrivo selezionato");
|
||||
|
||||
@@ -2194,6 +2194,8 @@ public class WMSGenericService {
|
||||
|
||||
entityProcessor.processEntityList(entitiesToSave, true);
|
||||
UtilityEntity.throwEntitiesException(entitiesToSave);
|
||||
|
||||
return mtbCotlList.stream().findFirst().orElse(null);
|
||||
}
|
||||
|
||||
public void spostaULInPosizione(MtbColt mtbColtToMove, MtbDepoPosizioni mtbDepoPosizioni) throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user