Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.IntegryCustomerDB;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20240312161313 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
String value = "N";
|
||||
|
||||
if (isCustomerDb(IntegryCustomerDB.Gramm_Gramm)){
|
||||
value = "S";
|
||||
}
|
||||
|
||||
createSetup("PICKING", "SETUP", "FLAG_WARNING_NEW_PARTITA_MAG", value,
|
||||
"Questo flag permette di avvisare l'utente se è stato inserito un nuovo lotto per quell'articolo",
|
||||
"SI_NO");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -74,7 +74,7 @@ public class ImportListiniAcquistoApuliaCarrefourService {
|
||||
}
|
||||
|
||||
Date dataInizVarizioni = UtilityString.parseDate(setup.get("DATA_INIZ_VARIAZIONI"));
|
||||
// importFileCsv(conn, pathFile, type, format, setup);
|
||||
importFileCsv(conn, pathFile, type, format, setup);
|
||||
|
||||
//INSERIMENTO TESTATE
|
||||
List<EntityBase> entityList = new ArrayList<>();
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package it.integry.ems.retail.wms.generic.controller;
|
||||
|
||||
import it.integry.common.var.CommonConstants;
|
||||
import it.integry.ems.response.ServiceRestResponse;
|
||||
import it.integry.ems.retail.wms.generic.service.WMSPartitaMagazzinoService;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@Scope("request")
|
||||
@RequestMapping("wms/partita-magazzino")
|
||||
public class WMSPartitaMagazzinoController {
|
||||
|
||||
private final Logger logger = LogManager.getLogger();
|
||||
|
||||
@Autowired
|
||||
private WMSPartitaMagazzinoService wmsPartitaMagazzinoService;
|
||||
|
||||
@RequestMapping(value = "retrievePartitaMag", method = RequestMethod.GET)
|
||||
public @ResponseBody
|
||||
ServiceRestResponse retrievePartitaMag(@RequestParam(CommonConstants.PROFILE_DB) String profileDB,
|
||||
@RequestParam String codMart,
|
||||
@RequestParam String partitaMag) throws Exception {
|
||||
|
||||
return ServiceRestResponse.createPositiveResponse(wmsPartitaMagazzinoService.retrievePartitaMag(codMart, partitaMag));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package it.integry.ems.retail.wms.generic.service;
|
||||
|
||||
import it.integry.ems.service.EntityProcessor;
|
||||
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||
import it.integry.ems_model.entity.MtbPartitaMag;
|
||||
import it.integry.ems_model.types.OperationType;
|
||||
import it.integry.ems_model.utility.Query;
|
||||
import it.integry.ems_model.utility.UtilityDB;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Scope("request")
|
||||
public class WMSPartitaMagazzinoService {
|
||||
|
||||
@Autowired
|
||||
private MultiDBTransactionManager multiDBTransactionManager;
|
||||
|
||||
@Autowired
|
||||
private EntityProcessor entityProcessor;
|
||||
|
||||
public MtbPartitaMag retrievePartitaMag(String codMart, String partitaMag) throws Exception {
|
||||
String sql = Query.format(
|
||||
"SELECT *\n" +
|
||||
"FROM mtb_partita_mag\n" +
|
||||
"WHERE cod_mart = %s\n" +
|
||||
" AND partita_mag = %s",
|
||||
codMart,
|
||||
partitaMag
|
||||
);
|
||||
|
||||
return UtilityDB.executeSimpleQueryOnlyFirstRowDTO(multiDBTransactionManager.getPrimaryConnection(), sql, MtbPartitaMag.class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user