non far scaricare la griglia al termine dell'ispezione se si tratta di rotture di stock no freschi
This commit is contained in:
@@ -96,7 +96,7 @@ public class SteUPController {
|
||||
) {
|
||||
ServiceRestResponse response = new ServiceRestResponse();
|
||||
try {
|
||||
response.setJsonObject(steUPService.getGrigliaPluRepo(codMdep, codJfas, activityTypeId, codCmac, UtilityDate.getTodayWithoutTime()));
|
||||
response.setJsonObject(steUPService.getGrigliaPluRepo(codMdep, codJfas, activityTypeId, codCmac, UtilityDate.getTodayWithoutTime(), false));
|
||||
response.setEsito(EsitoType.OK);
|
||||
} catch (Exception e) {
|
||||
logger.error(request.getRequestURI(), e);
|
||||
|
||||
@@ -692,8 +692,7 @@ public class SteUPService {
|
||||
boolean verificaVolantino = UtilityString.equalsIgnoreCase(tipoAttivitaVerificaVolantino, activityTypeId);
|
||||
barcodes = chkVolantino(codJfas, codMdep, barcodes, verificaVolantino, dataCreation);
|
||||
} else if (activityTypeId.equalsIgnoreCase(tipoAttivitaRotturaStock)) {
|
||||
|
||||
List<HashMap<String, Object>> pluRepo = getGrigliaPluRepo(codMdep, codJfas, activityTypeId, null, dataCreation);
|
||||
List<HashMap<String, Object>> pluRepo = getGrigliaPluRepo(codMdep, codJfas, activityTypeId, null, dataCreation, true);
|
||||
if (repartiFreschi != null && repartiFreschi.contains(codJfas)) {
|
||||
List<String> finalBarcodes = barcodes;
|
||||
barcodes = new ArrayList<>();
|
||||
@@ -814,7 +813,9 @@ public class SteUPService {
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
public List<HashMap<String, Object>> getGrigliaPluRepo(String codMdep, String codJfas, String activityTypeId, String codCmac, Date dataCreation) throws Exception {
|
||||
public List<HashMap<String, Object>> getGrigliaPluRepo(String codMdep, String codJfas,
|
||||
String activityTypeId, String codCmac, Date dataCreation,
|
||||
boolean chkRotturaStock) throws Exception {
|
||||
String sql = "SELECT dbo.steup_getListinoDepo( " + UtilityDB.valueToString(codMdep) + ") as cod_vlis";
|
||||
String codVlis = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
if (UtilityString.isNullOrEmpty(codVlis))
|
||||
@@ -853,7 +854,7 @@ public class SteUPService {
|
||||
} else if (activityTypeId.equalsIgnoreCase(tipoAttivitaRotturaStock)) {
|
||||
if (repartiFreschi.contains(codJfas)) {
|
||||
sql = "Select cod_mart,descrizione,bar_code as barcode,cod_msgr from steup_getGrigliaVendita(" + UtilityDB.valueToString(codMdep) + "," + UtilityDB.valueToString(codJfas) + ")";
|
||||
} else {
|
||||
} else if (chkRotturaStock) {
|
||||
sql = "SELECT cod_mart,descrizione,bar_code as barcode,cod_msgr\n" +
|
||||
"FROM steup_getAssortimento(" + UtilityDB.valueToString(codMdep) + "," + UtilityDB.valueToString(codJfas) + ")\n" +
|
||||
"WHERE cod_mart NOT IN (SELECT cod_mart\n" +
|
||||
@@ -879,6 +880,8 @@ public class SteUPService {
|
||||
" AND g.tipo_variazione = 'I'\n" +
|
||||
" UNION " +
|
||||
" SELECT cod_mart FROM dbo.steup_getInevasi(" + UtilityDB.valueToString(codMdep) + ", " + UtilityDB.valueToString(codJfas) + ", " + UtilityDB.valueToString(dataCreation) + "))";
|
||||
} else {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user