Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -332,7 +332,6 @@
|
||||
<file url="file://$PROJECT_DIR$/ems-contabil/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/ems-core" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/ems-core/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/ems-core/src/main/java/it/integry/ems/migration/model/Migration_20240311154604.java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/ems-core/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/ems-document" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/ems-document/src/main/java" charset="UTF-8" />
|
||||
@@ -1070,6 +1069,7 @@
|
||||
</component>
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
<component name="WebServicesPlugin" addRequiredLibraries="true" />
|
||||
<component name="libraryTable">
|
||||
|
||||
@@ -245,6 +245,36 @@ public abstract class BaseMigration implements MigrationModelInterface {
|
||||
ps.executeUpdate();
|
||||
}
|
||||
}
|
||||
protected void createSetup(String gestName, String section, String keySection, String value, String description, boolean flagSync,
|
||||
String codQuery, boolean flagUserView, boolean flagSetupDepo, boolean flagSetupUserWeb,
|
||||
boolean flagTipoJson, boolean flagTipoColore, String tipoSetup, boolean flagMultiValue ) throws Exception {
|
||||
if (existsSetup(gestName, section, keySection))
|
||||
return;
|
||||
|
||||
String insertSql = "INSERT INTO " + StbGestSetup.ENTITY +
|
||||
" (gest_name, section, key_section, value, description, flag_sync, query_default,\n" +
|
||||
"flag_user_view, flag_setup_depo, flag_setup_user_web,\n" +
|
||||
"flag_tipo_json, flag_tipo_colore, tipo_setup, flag_multi_value) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
||||
|
||||
try (PreparedStatement ps = advancedDataSource.getConnection().prepareStatement(insertSql)) {
|
||||
ps.setString(1, gestName);
|
||||
ps.setString(2, section);
|
||||
ps.setString(3, keySection);
|
||||
ps.setString(4, value);
|
||||
ps.setString(5, description);
|
||||
ps.setString(6, (flagSync?"S":"N"));
|
||||
ps.setString(7, codQuery);
|
||||
ps.setString(8, (flagUserView?"S":"N"));
|
||||
ps.setString(9, (flagSetupDepo?"S":"N"));
|
||||
ps.setString(10, (flagSetupUserWeb?"S":"N"));
|
||||
ps.setString(11, (flagTipoJson?"S":"N"));
|
||||
ps.setString(12, (flagTipoColore?"S":"N"));
|
||||
ps.setString(13, tipoSetup);
|
||||
ps.setBoolean(14, flagMultiValue);
|
||||
|
||||
ps.executeUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
protected void deleteSetup(String gestName, String section, String keySection) throws Exception {
|
||||
StbGestSetup stbGestSetup = new StbGestSetup()
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20240314133221 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
executeInsertStatement("INSERT INTO stb_gest_setup_query (cod_query, query_default, description)" +
|
||||
" VALUES (N'TIPI_DEPO', N'SELECT cod_tipo_depo FROM mtb_depo_tipi', N'Tipi deposito');");
|
||||
|
||||
createSetup("PVM", "PIAN_ACC_ROSSG", "TIPI_DEPO_LAV", null,
|
||||
"Identifica i tipi di deposito dove è possibile far arrivare la materia prima per la produzione.",
|
||||
"TIPI_DEPO", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,7 +3,7 @@ package it.integry.ems.migration.model;
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20240322152820 extends BaseMigration implements MigrationModelInterface {
|
||||
public class Migration_20240322152821 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
@@ -1,16 +1,22 @@
|
||||
package it.integry.ems.migration.model;import it.integry.ems.migration._base.BaseMigration;
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20240326221910 extends BaseMigration implements MigrationModelInterface{
|
||||
public class Migration_20240326221910 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up()throws Exception {
|
||||
if(isHistoryDB())
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
createSetup("PVM", "DOC_INTERNI", "GG_CHK_RESO", null,
|
||||
"Range di date per verificare la data di scadenza della partita di magazzino", true,
|
||||
null, true, false, false, false, false, "mtb_grup", false );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down()throws Exception{
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.IntegryCustomer;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20240327101005 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (isCustomer(IntegryCustomer.Tosca,
|
||||
IntegryCustomer.Biolevante,
|
||||
IntegryCustomer.Cosmapack,
|
||||
IntegryCustomer.Dulciar,
|
||||
IntegryCustomer.Lamonarca,
|
||||
IntegryCustomer.RossoGargano))
|
||||
{
|
||||
updateSetupValue("DATI_AZIENDA", "SETUP", "DELIMITED_IDENTIFIER", "1");
|
||||
updateSetupValue("DATI_AZIENDA", "SETUP", "FLAG_ANSI_PADDING", "S");
|
||||
updateSetupValue("DATI_AZIENDA", "SETUP", "FLAG_CONCAT_NULL_YIELDS_NULL", "S");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,8 +10,9 @@ import it.integry.ems_model.annotation.Table;
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
import it.integry.ems_model.entity._enum.IBaseEnum;
|
||||
import org.kie.api.definition.type.PropertyReactive;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import it.integry.ems_model.annotation.FK;
|
||||
|
||||
@PropertyReactive
|
||||
@Table(MtbCols.ENTITY)
|
||||
@@ -24,7 +25,7 @@ public class MtbCols extends EntityBase {
|
||||
|
||||
@PK
|
||||
@SqlField(value = "data_collo", nullable = false)
|
||||
private Date dataCollo;
|
||||
private LocalDate dataCollo;
|
||||
|
||||
@PK
|
||||
@SqlField(value = "gestione", maxLength = 1, nullable = false)
|
||||
@@ -62,11 +63,11 @@ public class MtbCols extends EntityBase {
|
||||
super();
|
||||
}
|
||||
|
||||
public Date getDataCollo() {
|
||||
public LocalDate getDataCollo() {
|
||||
return dataCollo;
|
||||
}
|
||||
|
||||
public MtbCols setDataCollo(Date dataCollo) {
|
||||
public MtbCols setDataCollo(LocalDate dataCollo) {
|
||||
this.dataCollo = dataCollo;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.time.DateUtils;
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
import javax.persistence.criteria.CriteriaBuilder;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
@@ -140,7 +139,6 @@ public class UtilityString {
|
||||
|
||||
public static LocalDate parseLocalDate(String value) throws IOException {
|
||||
String format = determineDateFormat(value);
|
||||
|
||||
if (format == null) {
|
||||
try {
|
||||
return LocalDate.parse(value, DateTimeFormatter.ISO_DATE_TIME);
|
||||
@@ -150,6 +148,9 @@ public class UtilityString {
|
||||
|
||||
if (format == null)
|
||||
throw new IOException("Impossibile riconoscere il formato data per " + value);
|
||||
//A differenza di SimpleDateFormat il DateFormatter necessita di sapere se deve formattare la timezone (Es. 2024-03-22T16:00:00+01:00)
|
||||
if (format.equalsIgnoreCase("yyyy-MM-dd'T'HH:mm:ss") && value.length() > 19)
|
||||
format += "z";
|
||||
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(format)
|
||||
.withZone(ZoneId.systemDefault());
|
||||
@@ -230,7 +231,7 @@ public class UtilityString {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isIntNumber(String number){
|
||||
public static boolean isIntNumber(String number) {
|
||||
try {
|
||||
Integer.parseInt(number);
|
||||
return true;
|
||||
|
||||
@@ -434,7 +434,7 @@ public class ActivityService {
|
||||
" FROM stb_activity " +
|
||||
" WHERE stb_activity.parent_activity_id = %s AND " +
|
||||
"stb_activity.user_name = %s AND " +
|
||||
"stb_activity.estimated_time = %s",
|
||||
"( stb_activity.estimated_time = %s OR (stb_activity.effective_date is null AND stb_activity.activity_result_id = 'DA FARE'))",
|
||||
stbActivity.getParentActivityId(),
|
||||
stbActivity.getUserName(),
|
||||
stbActivity.getEstimatedTime());
|
||||
@@ -609,7 +609,8 @@ public class ActivityService {
|
||||
.setActivityType(activityTypeId)
|
||||
.setFlagTipologia("A")
|
||||
.setActivityDescription(description)
|
||||
.setUserCreator(userCreator);
|
||||
.setUserCreator(userCreator)
|
||||
.setActivityResultId("DA FARE");
|
||||
|
||||
entityList.add(newStbActivity);
|
||||
|
||||
|
||||
@@ -89,14 +89,14 @@ public class RossoGarganoSyncService {
|
||||
saveCtbMovt(rgExchange.getConnection(), "(PNOTA.PN_SEZIONALE_IVA <> '' AND PN_CAUSALE_MOVIMENTO <> '998')", dataIniz, dataFine);
|
||||
logger.info("Importazione fatture attive e passive: Timing " + ((new Date().getTime() - startDate.getTime()) / 1000) + " secs");
|
||||
|
||||
sql =
|
||||
"SELECT CAST(FORMAT(DATEPART(YEAR, data_fine), '0000') +\n" +
|
||||
" FORMAT(DATEPART(MONTH, data_fine), '00') +\n" +
|
||||
" FORMAT(DATEPART(DAY, data_fine), '00') AS NUMERIC) as data_fine\n" +
|
||||
"FROM azienda\n" +
|
||||
" CROSS APPLY dbo.getperiodoannofisc(azienda.anno_contab)";
|
||||
|
||||
dataFine = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
// sql =
|
||||
// "SELECT CAST(FORMAT(DATEPART(YEAR, data_fine), '0000') +\n" +
|
||||
// " FORMAT(DATEPART(MONTH, data_fine), '00') +\n" +
|
||||
// " FORMAT(DATEPART(DAY, data_fine), '00') AS NUMERIC) as data_fine\n" +
|
||||
// "FROM azienda\n" +
|
||||
// " CROSS APPLY dbo.getperiodoannofisc(azienda.anno_contab)";
|
||||
//
|
||||
// dataFine = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
|
||||
saveCtbMovt(rgExchange.getConnection(), "(PN_CAUSALE_MOVIMENTO <> '998')", dataIniz, dataFine);
|
||||
logger.info("Importazione altri movimenti contabili: Timing " + ((new Date().getTime() - startDate.getTime()) / 1000) + " secs");
|
||||
|
||||
@@ -23,9 +23,17 @@ public class EmsCustomRestConstants {
|
||||
|
||||
public static final String PATH_LICOR_CHIUSURA_ORDINE_CONFEZIONATI = "confezionati/ordine/termina";
|
||||
public static final String PATH_LICOR_RETTIFICA_PRODUZIONE = "produzione/rettifica";
|
||||
|
||||
/**
|
||||
* DULCIAR
|
||||
*/
|
||||
|
||||
public static final String PATH_DULCIAR_CHIUSURA_ORDINE = "ordine/termina";
|
||||
|
||||
|
||||
/**
|
||||
* ROSSO GARGANO
|
||||
*/
|
||||
public static final String PATH_ROSSO_GARGANO_CAMBIO_LOTTO_PROD = "cambioLottoProd";
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package it.integry.ems.customizations.production.controller;
|
||||
|
||||
import it.integry.common.var.CommonConstants;
|
||||
import it.integry.ems.customizations.constant.EmsCustomRestConstants;
|
||||
import it.integry.ems.customizations.production.service.RossoGarganoProductionService;
|
||||
import it.integry.ems.response.EsitoType;
|
||||
import it.integry.ems.response.ServiceRestResponse;
|
||||
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||
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.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@RestController
|
||||
@Scope(value = "request")
|
||||
@RequestMapping("rossogargano/mes")
|
||||
public class RossoGarganoProductionController {
|
||||
|
||||
private final Logger logger = LogManager.getLogger();
|
||||
|
||||
@Autowired
|
||||
public RossoGarganoProductionService rossoGarganoProductionService;
|
||||
|
||||
@Autowired
|
||||
public MultiDBTransactionManager multiDBTransactionManager;
|
||||
|
||||
|
||||
@RequestMapping(value = EmsCustomRestConstants.PATH_ROSSO_GARGANO_CAMBIO_LOTTO_PROD, method = RequestMethod.POST)
|
||||
public @ResponseBody
|
||||
ServiceRestResponse cambioLottoProduzione(HttpServletRequest request,
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String profileDB) {
|
||||
try {
|
||||
rossoGarganoProductionService.cambioLottoProduzione();
|
||||
return ServiceRestResponse.createPositiveResponse();
|
||||
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
multiDBTransactionManager.rollbackAll();
|
||||
} catch (Exception ex) {
|
||||
logger.error(request.getRequestURI(), e);
|
||||
}
|
||||
|
||||
logger.error(request.getRequestURI(), e);
|
||||
return new ServiceRestResponse(EsitoType.KO, profileDB, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
package it.integry.ems.customizations.production.service;
|
||||
|
||||
import it.integry.ems.production.service.MesProductionServiceV2;
|
||||
import it.integry.ems.service.EntityProcessor;
|
||||
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@Scope("request")
|
||||
public class RossoGarganoProductionService {
|
||||
|
||||
@Autowired
|
||||
private MultiDBTransactionManager multiDBTransactionManager;
|
||||
|
||||
@Autowired
|
||||
private EntityProcessor entityProcessor;
|
||||
|
||||
@Autowired
|
||||
private MesProductionServiceV2 mesProductionServiceV2;
|
||||
|
||||
public void cambioLottoProduzione() throws Exception {
|
||||
|
||||
// Date dataOrd = new Date();
|
||||
//
|
||||
// String sql = "SELECT cod_anag FROM " + MtbDepo.ENTITY + " WHERE cod_mdep = " + UtilityDB.valueToString(codMdep);
|
||||
// String codAnag = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
//
|
||||
// sql = "SELECT ISNULL(MAX(num_ord), -1) FROM " + DtbOrdt.ENTITY + " " +
|
||||
// "WHERE gestione = 'L' " +
|
||||
// "AND cod_anag = " + UtilityDB.valueToString(codAnag) + " " +
|
||||
// "AND cod_jfas = " + UtilityDB.valueToString(codJfas) + " " +
|
||||
// "AND data_ord = " + UtilityDB.valueToString(dataOrd);
|
||||
//
|
||||
// Integer numOrd = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
//
|
||||
// List<DtbOrdSteps> openedSteps = mesProductionServiceV2.getOpenedSteps(codJfas);
|
||||
//
|
||||
// if (openedSteps != null) {
|
||||
// for (DtbOrdSteps dtbOrdStep : openedSteps) {
|
||||
// mesProductionServiceV2.closeStep(dtbOrdStep.getDataOrd(), dtbOrdStep.getNumOrd(), dtbOrdStep.getGestione(), codJfas, dtbOrdStep.getIdStep(), dtbOrdStep.getIdRiga());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// sql = "SELECT data_ord, num_ord, gestione " +
|
||||
// "FROM dtb_ordt " +
|
||||
// "WHERE num_ord <> " + UtilityDB.valueToString(numOrd) + " and flag_evaso_forzato <> 'S' and flag_evaso_prod <> 'E' AND cod_jfas = " + UtilityDB.valueToString(codJfas);
|
||||
// List<DtbOrdt> dtbOrdtsToClose = UtilityDB.executeSimpleQueryDTO(multiDBTransactionManager.getPrimaryConnection(), sql, DtbOrdt.class);
|
||||
//
|
||||
// if (dtbOrdtsToClose != null && !dtbOrdtsToClose.isEmpty()) {
|
||||
// for (DtbOrdt dtbOrdtToClose : dtbOrdtsToClose) {
|
||||
// dtbOrdtToClose
|
||||
// .setFlagEvasoProd("E")
|
||||
// .setFlagEvasoForzato("S");
|
||||
//
|
||||
// dtbOrdtToClose.setOperation(OperationType.UPDATE);
|
||||
// entityProcessor.processEntity(dtbOrdtToClose, false, multiDBTransactionManager);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// String sqlLastWorkedOrder = "SELECT TOP 1 note, descrizione_attivita, num_ord, data_ord\n" +
|
||||
// "FROM dtb_ord_steps\n" +
|
||||
// "WHERE gestione = 'L'\n" +
|
||||
// " AND cod_jfas = " + UtilityDB.valueToString(codJfas) +
|
||||
// " ORDER BY data_ord DESC, num_ord DESC, id_riga desc";
|
||||
// final HashMap<String, Object> stringObjectHashMap = UtilityDB.executeSimpleQueryOnlyFirstRow(multiDBTransactionManager.getPrimaryConnection(), sqlLastWorkedOrder);
|
||||
// String lastFormato = UtilityHashMap.getValueIfExists(stringObjectHashMap, "descrizione_attivita");
|
||||
// String lastTurno = UtilityHashMap.getValueIfExists(stringObjectHashMap, "note");
|
||||
//
|
||||
// /*lastFormato = null;
|
||||
// lastFormato = "WOOD";
|
||||
// lastFormato = "GREEN";
|
||||
//
|
||||
//
|
||||
// formato = null;
|
||||
// formato = "WOOD";
|
||||
// formato = "GREEN";*/
|
||||
//
|
||||
// boolean rotateTurno = formato == null || (lastFormato != null && lastFormato.equalsIgnoreCase(formato));
|
||||
//
|
||||
// if (!rotateTurno) lastFormato = formato;
|
||||
//
|
||||
// DtbOrdt dtbOrdtToInsert = new DtbOrdt()
|
||||
// .setCodMdep(codMdep)
|
||||
// .setCodAnag(codAnag)
|
||||
// .setDataOrd(dataOrd)
|
||||
// .setCodJfas(codJfas)
|
||||
// .setGestione("L")
|
||||
// .setQtaProd(BigDecimal.ONE)
|
||||
// .setRapConvProd(BigDecimal.ONE)
|
||||
// .setDtbOrdr(new ArrayList<>())
|
||||
// .setDtbOrdSteps(new ArrayList<>());
|
||||
//
|
||||
//
|
||||
// DtbOrdSteps dtbOrdStep = new DtbOrdSteps()
|
||||
// .setCodJfas(codJfas)
|
||||
// .setDataIniz(dataOrd);
|
||||
// dtbOrdStep.setOperation(OperationType.INSERT);
|
||||
//
|
||||
// Integer idRigaStep = 1;
|
||||
// if (numOrd >= 0) {
|
||||
// sql = "SELECT MAX(id_riga) FROM " + DtbOrdSteps.ENTITY +
|
||||
// " WHERE gestione = 'L'" +
|
||||
// " AND data_ord = " + UtilityDB.valueToString(dataOrd) +
|
||||
// " AND num_ord = " + UtilityDB.valueToString(numOrd);
|
||||
//
|
||||
// idRigaStep = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
// dtbOrdStep.setIdStep(idRigaStep);
|
||||
// int lastTurnoInt = Integer.parseInt(lastTurno.split(" ")[1]);
|
||||
//
|
||||
// if (rotateTurno) ++lastTurnoInt;
|
||||
// dtbOrdStep.setNote("Turno " + lastTurnoInt);
|
||||
// } else {
|
||||
// DtbOrdSteps dtbOrdStepZero = new DtbOrdSteps()
|
||||
// .setCodJfas(codJfas)
|
||||
// .setIdStep(0);
|
||||
//
|
||||
// dtbOrdStepZero.setOperation(OperationType.INSERT);
|
||||
// dtbOrdtToInsert.getDtbOrdSteps().add(dtbOrdStepZero);
|
||||
//
|
||||
// dtbOrdStep.setIdStep(1)
|
||||
// .setNote("Turno " + idRigaStep);
|
||||
// }
|
||||
//
|
||||
// dtbOrdStep.setDescrizioneAttivita(lastFormato);
|
||||
//
|
||||
// dtbOrdtToInsert.getDtbOrdSteps().add(dtbOrdStep);
|
||||
// dtbOrdtToInsert.setOperation(OperationType.INSERT_OR_UPDATE);
|
||||
//
|
||||
// if (numOrd >= 0) dtbOrdtToInsert.setNumOrd(numOrd);
|
||||
// else {
|
||||
// DtbOrdr dtbOrdr = new DtbOrdr()
|
||||
// .setCodJfas(codJfas)
|
||||
// .setDataInizProd(dataOrd)
|
||||
// .setQtaOrd(BigDecimal.ONE)
|
||||
// .setNumCnf(BigDecimal.ONE)
|
||||
// .setQtaCnf(BigDecimal.ONE)
|
||||
// .setDescrizione("Cassette da lavare");
|
||||
// dtbOrdr.setOperation(OperationType.INSERT);
|
||||
//
|
||||
// dtbOrdtToInsert.getDtbOrdr().add(dtbOrdr);
|
||||
// }
|
||||
//
|
||||
// entityProcessor.processEntity(dtbOrdtToInsert, multiDBTransactionManager);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -465,6 +465,7 @@ public class DocumentiDialogoImportServices {
|
||||
rigaDoc
|
||||
.setValUnt(przVend)
|
||||
.setQtaCnf(UtilityBigDecimal.isNullOrZero(rows.get(i).getQtaCnf()) ? null : rows.get(i).getQtaCnf())
|
||||
.setNumCnf(UtilityBigDecimal.isNullOrZero(rows.get(i).getNumCnf()) ? null : rows.get(i).getNumCnf())
|
||||
.setSconto5(rows.get(i).getPercSco1())
|
||||
.setSconto6(rows.get(i).getPercSco2())
|
||||
.setSconto7(rows.get(i).getPercSco3())
|
||||
|
||||
@@ -319,9 +319,7 @@ public class MrpDailyMaterialReqService {
|
||||
|
||||
private String getElencoDepositi(MrpDailyMaterialInputDTO mrpDailyMaterialInputDTO, HashMap<String, String> setupSection) throws Exception {
|
||||
String whereCondDepo = "";
|
||||
if (mrpDailyMaterialInputDTO != null && mrpDailyMaterialInputDTO.getDepositi() != null && mrpDailyMaterialInputDTO.getDepositi().
|
||||
|
||||
size() > 0) {
|
||||
if (mrpDailyMaterialInputDTO != null && mrpDailyMaterialInputDTO.getDepositi() != null && mrpDailyMaterialInputDTO.getDepositi().size() > 0) {
|
||||
whereCondDepo = "mtb_depo.cod_mdep in ('" + StringUtils.join(mrpDailyMaterialInputDTO.getDepositi(), "','") + "')";
|
||||
} else {
|
||||
String listCodMdep = setupSection.get("LIST_COD_MDEP");
|
||||
|
||||
@@ -2726,7 +2726,7 @@ public class PvmService {
|
||||
" dtb_docr.cod_anag,\n" +
|
||||
" dtb_docr.cod_mart,\n" +
|
||||
" CASE WHEN dtb_tipi.segno_qta_car > 0 THEN dtb_doct.data_doc ELSE NULL END AS data_doc,\n" +
|
||||
" mtb_partita_mag.data_scad,\n" +
|
||||
" CASE WHEN dtb_tipi.segno_qta_car > 0 THEN mtb_partita_mag.data_scad ELSE NULL END AS data_scad ,\n" +
|
||||
" (dtb_tipi.segno_qta_car * dtb_docr.qta_doc * dtb_docr.rap_conv) AS qta_doc,\n" +
|
||||
" dtb_docr.data_ord,\n" +
|
||||
" dtb_docr.num_ord\n" +
|
||||
|
||||
Reference in New Issue
Block a user