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:
@@ -112,6 +112,7 @@ public class WMSAccettazioneBollaService {
|
||||
" (SELECT CAST(count(*) as bit) FROM mtb_comp WHERE wdtb_docr.cod_mart = mtb_comp.cod_comp)as componente\n" +
|
||||
" FROM Wdtb_docr left outer join mtb_aart on Wdtb_docr.cod_mart = mtb_aart.cod_mart \n" +
|
||||
" left outer join mtb_grup on mtb_aart.cod_mgrp = mtb_grup.cod_mgrp \n" +
|
||||
" left outer join mtb_grup on mtb_aart.cod_mgrp = mtb_grup.cod_mgrp \n" +
|
||||
" WHERE wdtb_docr.cod_art_for is not null AND \n" +
|
||||
" wdtb_docr.cod_mart is not null AND \n" +
|
||||
" ( mtb_grup.tipo_mgrp is null or mtb_grup.tipo_mgrp <> 'FTT') \n" +
|
||||
|
||||
@@ -10,6 +10,7 @@ import it.integry.ems.retail.wms.generic.dto.articolo.SaveArticoloRequestDTO;
|
||||
import it.integry.ems.retail.wms.generic.dto.articolo.SaveArticoloResponseDTO;
|
||||
import it.integry.ems.retail.wms.generic.service.WMSArticoloService;
|
||||
import it.integry.ems.user.UserSession;
|
||||
import it.integry.ems_model.entity.MtbAart;
|
||||
import it.integry.ems_model.entity.MtbGrup;
|
||||
import it.integry.ems_model.entity.MtbUntMis;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
@@ -38,8 +39,6 @@ public class WMSArticoloController {
|
||||
private UserSession userSession;
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "", method = RequestMethod.GET)
|
||||
public @ResponseBody
|
||||
ServiceRestResponse retrieve(@RequestParam(CommonConstants.PROFILE_DB) String profileDB,
|
||||
@@ -65,9 +64,6 @@ public class WMSArticoloController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "searchByCodArtFornOrDescrizione", method = RequestMethod.POST)
|
||||
public @ResponseBody
|
||||
ServiceRestResponse searchByCodArtFornOrDescrizione(@RequestParam(CommonConstants.PROFILE_DB) String profileDB,
|
||||
@@ -132,4 +128,10 @@ public class WMSArticoloController {
|
||||
return ServiceRestResponse.createPositiveResponse(response);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "findIfIsKit", method = RequestMethod.POST)
|
||||
public @ResponseBody
|
||||
ServiceRestResponse findIfIsKit(@RequestParam(CommonConstants.PROFILE_DB) String profileDB,
|
||||
@RequestBody MtbAart mtbAart) throws Exception {
|
||||
return ServiceRestResponse.createPositiveResponse(wmsArticoloService.findIfIsKit(mtbAart));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,5 +236,17 @@ public class WMSArticoloService {
|
||||
return UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
}
|
||||
|
||||
public MtbAart findIfIsKit(MtbAart mtbAart) throws Exception {
|
||||
String sql = Query.format(
|
||||
"SELECT *\n" +
|
||||
"FROM mtb_aart\n" +
|
||||
"WHERE cod_mart = (SELECT IIF(%s = cod_mart, cod_comp, cod_mart) AS cod_mart\n" +
|
||||
" FROM mtb_comp\n" +
|
||||
" WHERE cod_mart = %s\n" +
|
||||
" OR cod_comp = %s)",
|
||||
mtbAart.getCodMart(), mtbAart.getCodMart(), mtbAart.getCodMart()
|
||||
);
|
||||
|
||||
return UtilityDB.executeSimpleQueryOnlyFirstRowDTO(multiDBTransactionManager.getPrimaryConnection(), sql, MtbAart.class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user