Merge branch 'hotfix/Hotfix-1' into develop
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:
13
.idea/inspectionProfiles/Project_Default.xml
generated
13
.idea/inspectionProfiles/Project_Default.xml
generated
@@ -4,5 +4,18 @@
|
||||
<inspection_tool class="AutoCloseableResource" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="METHOD_MATCHER_CONFIG" value="java.util.Formatter,format,java.io.Writer,append,com.google.common.base.Preconditions,checkNotNull,org.hibernate.Session,close,java.io.PrintWriter,printf,java.io.PrintStream,printf,java.lang.foreign.Arena,ofAuto,java.lang.foreign.Arena,global,com.annimon.stream.Stream,of" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="UnusedLabel" enabled="true" level="WEAK WARNING" enabled_by_default="true" editorAttributes="INFO_ATTRIBUTES" />
|
||||
<inspection_tool class="unused" enabled="true" level="WEAK WARNING" enabled_by_default="true" editorAttributes="INFO_ATTRIBUTES" checkParameterExcludingHierarchy="false">
|
||||
<option name="LOCAL_VARIABLE" value="true" />
|
||||
<option name="FIELD" value="true" />
|
||||
<option name="METHOD" value="true" />
|
||||
<option name="CLASS" value="true" />
|
||||
<option name="PARAMETER" value="true" />
|
||||
<option name="REPORT_PARAMETER_FOR_PUBLIC_METHODS" value="true" />
|
||||
<option name="ADD_MAINS_TO_ENTRIES" value="true" />
|
||||
<option name="ADD_APPLET_TO_ENTRIES" value="true" />
|
||||
<option name="ADD_SERVLET_TO_ENTRIES" value="true" />
|
||||
<option name="ADD_NONJAVA_TO_ENTRIES" value="true" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
||||
2
.idea/runConfigurations/Tomcat__FAST_.xml
generated
2
.idea/runConfigurations/Tomcat__FAST_.xml
generated
@@ -17,7 +17,7 @@
|
||||
<predefined_log_file enabled="true" id="Tomcat" />
|
||||
<predefined_log_file enabled="true" id="Tomcat Catalina" />
|
||||
<RunnerSettings RunnerId="AppServerDebuggerRunner">
|
||||
<option name="DEBUG_PORT" value="javadebug" />
|
||||
<option name="DEBUG_PORT" value="63868" />
|
||||
</RunnerSettings>
|
||||
<RunnerSettings RunnerId="Debug">
|
||||
<option name="DEBUG_PORT" value="javadebug" />
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.List;
|
||||
|
||||
public class UtilityEntity {
|
||||
public static List<EntityBase> toEntityBaseList(List<? extends EntityBase> entities) {
|
||||
List<EntityBase> processedEntities = new ArrayList<EntityBase>();
|
||||
List<EntityBase> processedEntities = new ArrayList<>();
|
||||
if (entities != null) {
|
||||
for (EntityBase entity : entities) {
|
||||
if (entity != null) {
|
||||
@@ -31,7 +31,7 @@ public class UtilityEntity {
|
||||
}
|
||||
|
||||
public static List<ServiceRestResponse> toServiceRestResponse(List<EntityBase> entities) {
|
||||
List<ServiceRestResponse> respList = new ArrayList<ServiceRestResponse>();
|
||||
List<ServiceRestResponse> respList = new ArrayList<>();
|
||||
|
||||
if (entities != null) {
|
||||
for (EntityBase obj : entities) {
|
||||
@@ -51,7 +51,7 @@ public class UtilityEntity {
|
||||
|
||||
|
||||
public static <T extends EntityBase> List<T> toCustomEntity(List<? extends EntityBase> entities) {
|
||||
List<T> respList = new ArrayList<T>();
|
||||
List<T> respList = new ArrayList<>();
|
||||
|
||||
for (EntityBase entity : entities) {
|
||||
if (entity != null) {
|
||||
@@ -112,11 +112,11 @@ public class UtilityEntity {
|
||||
return StringUtils.join(fieldsPK, "~");
|
||||
}
|
||||
|
||||
|
||||
public <T extends EntityBase> String calculateWhereCond(T entity, boolean onlyPK) {
|
||||
|
||||
|
||||
return null;
|
||||
public static boolean anyNull(Object... fieldsToCheck) {
|
||||
for (Object field : fieldsToCheck) {
|
||||
if (isNull(field)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import it.integry.ems_model.types.ApplicationName;
|
||||
import it.integry.ems_model.types.OperationType;
|
||||
import it.integry.ems_model.utility.Query;
|
||||
import it.integry.ems_model.utility.UtilityDB;
|
||||
import it.integry.ems_model.utility.UtilityLocalDate;
|
||||
import it.integry.ems_model.utility.UtilityString;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
@@ -481,6 +482,13 @@ public class DtbOrdt extends DtbDocOrdT implements EquatableEntityInterface<DtbO
|
||||
super(logger);
|
||||
}
|
||||
|
||||
public DtbOrdt(String gestione, LocalDate dataOrd,Integer numOrd) {
|
||||
super(logger);
|
||||
this.gestione = gestione;
|
||||
this.dataOrd = UtilityLocalDate.localDateToDate(dataOrd);
|
||||
this.numOrd = numOrd;
|
||||
}
|
||||
|
||||
public Date getDataOrd() {
|
||||
return dataOrd;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package it.integry.ems_model.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import it.integry.common.var.CommonConstants;
|
||||
import it.integry.ems.utility.UtilityEntity;
|
||||
import it.integry.ems_model.annotation.*;
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
import it.integry.ems_model.base.EquatableEntityInterface;
|
||||
@@ -709,7 +709,7 @@ public class MtbColt extends EntityBase implements EquatableEntityInterface<MtbC
|
||||
StoredProcedure.setString(1, gestione);
|
||||
StoredProcedure.setTimestamp(2, Timestamp.valueOf(dataCollo.atStartOfDay()));
|
||||
StoredProcedure.setString(3, serCollo);
|
||||
StoredProcedure.setInt(4, numCollo.intValue());
|
||||
StoredProcedure.setInt(4, numCollo);
|
||||
StoredProcedure.execute();
|
||||
StoredProcedure.close();
|
||||
}
|
||||
@@ -765,4 +765,12 @@ public class MtbColt extends EntityBase implements EquatableEntityInterface<MtbC
|
||||
public static MtbColt fromMtbColr(MtbColr mtbColr){
|
||||
return new MtbColt(mtbColr.getGestione(),mtbColr.getDataCollo(),mtbColr.getNumCollo(),mtbColr.getSerCollo());
|
||||
}
|
||||
|
||||
public DtbOrdt getOrdine(){
|
||||
if (UtilityEntity.anyNull(this.getGestione(),this.getDataOrd(),this.getNumOrd())){
|
||||
return null;
|
||||
}
|
||||
|
||||
return new DtbOrdt(this.getGestione(),this.getDataOrd(),this.getNumOrd());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -825,23 +825,12 @@ public class MesProductionServiceV2 {
|
||||
if (UtilityString.isNullOrEmpty(reportName)) {
|
||||
if (firstChildCodMart != null) {
|
||||
|
||||
query = "SELECT jrl_cicl_disegni.cod_disegno, jtb_disegni_files.file_name " +
|
||||
"FROM jrl_cicl_disegni, " +
|
||||
" jtb_disegni_files " +
|
||||
"WHERE " +
|
||||
" jrl_cicl_disegni.cod_disegno = jtb_disegni_files.cod_disegno AND " +
|
||||
" cod_prod = " + UtilityDB.valueToString(firstChildCodMart) + " AND " +
|
||||
" file_type = 'ETICHETTA_UL'";
|
||||
|
||||
HashMap<String, Object> disegno = UtilityDB.executeSimpleQueryOnlyFirstRow(multiDBTransactionManager.getPrimaryConnection(), query);
|
||||
if (disegno != null) {
|
||||
reportName = UtilityHashMap.getValueIfExists(disegno, "file_name");
|
||||
reportName = reportName.substring(0, reportName.lastIndexOf("."));
|
||||
reportName = reportName.replaceAll("_", "");
|
||||
logger.debug("Eseguita stampa SSCC del report " + reportName);
|
||||
} else {
|
||||
logger.error("Nessun disegno trovato con il cod_prod " + firstChildCodMart);
|
||||
}
|
||||
reportName = wmsLavorazioneService.getEtichettaSSCCArticolo(firstChildCodMart);
|
||||
if (UtilityString.hasContent(reportName)) {
|
||||
logger.debug("Eseguita stampa SSCC del report " + reportName);
|
||||
}else {
|
||||
logger.error("Nessun disegno trovato con il cod_prod " + firstChildCodMart);
|
||||
}
|
||||
|
||||
} else {
|
||||
logger.error("Il collo " + mtbColtToPrint.getNumCollo() + " del " + CommonConstants.DATETIME_DMY_SLASHED_FORMATTER.format(mtbColtToPrint.getDataCollo()) + " non ha una riga prodotto al suo interno");
|
||||
|
||||
@@ -49,9 +49,6 @@ public class WMSGenericController {
|
||||
|
||||
private final Logger logger = LogManager.getLogger();
|
||||
|
||||
@Autowired
|
||||
private EmsProperties emsProperties;
|
||||
|
||||
@Autowired
|
||||
private WMSGenericService wmsGenericService;
|
||||
|
||||
@@ -682,4 +679,9 @@ public class WMSGenericController {
|
||||
SearchArtFromEanResponseDTO response = wmsGenericService.getArticoloFromEan128(barcode);
|
||||
return ServiceRestResponse.createPositiveResponse(response);
|
||||
}
|
||||
|
||||
@GetMapping("wms/getEtichettaUL")
|
||||
ServiceRestResponse getEtichettaUL(@RequestBody MtbColt ul) throws Exception {
|
||||
return ServiceRestResponse.createPositiveResponse(wmsGenericService.getEtichettaUL(ul));
|
||||
}
|
||||
}
|
||||
@@ -3038,4 +3038,27 @@ public class WMSGenericService {
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
public String getEtichettaUL(MtbColt ul) throws Exception {
|
||||
ul.setOperation(OperationType.SELECT_OBJECT);
|
||||
entityProcessor.processEntity(ul,true,multiDBTransactionManager);
|
||||
|
||||
//<editor-fold desc="Etichetta SSCC per le ul create da ordine di lavorazione">
|
||||
if (ul.getGestione().equalsIgnoreCase("L")&& ul.getSegno() == 1 && ul.getOrdine() != null){
|
||||
String reportName = wmsLavorazioneService.getEtichettaSSCCOrdine(ul.getOrdine());
|
||||
if (UtilityString.hasContent(reportName))
|
||||
return reportName;
|
||||
}
|
||||
//</editor-fold>
|
||||
|
||||
//<editor-fold desc="Etichetta anonima per colli con serie UL">
|
||||
if (ul.getSerCollo().equalsIgnoreCase("UL")){
|
||||
String reportName = setupGest.getSetup(multiDBTransactionManager.getPrimaryConnection(),"PICKING","SETUP","REPORT_NAME_ETICHETTA_ANONIMA");
|
||||
if (UtilityString.hasContent(reportName))
|
||||
return reportName;
|
||||
}
|
||||
//</editor-fold>
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -811,10 +811,10 @@ public class WMSLavorazioneService {
|
||||
//<editor-fold desc="per ogni articolo ripartisco gli scarichi">
|
||||
for (ScarichiArticoloDTO scarichiMp : scarichiArticoli.values()) {
|
||||
String codMart = scarichiMp.getCodMart();
|
||||
BigDecimal cifreDec = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn( multiDBTransactionManager.getPrimaryConnection(),
|
||||
BigDecimal cifreDec = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(),
|
||||
Query.format("select mtb_unt_mis.cifre_dec from mtb_unt_mis inner join mtb_aart on mtb_unt_mis.unt_mis = mtb_aart.unt_mis and cod_mart = {}", codMart)
|
||||
);
|
||||
BigDecimal qtaDaScaricare = UtilityBigDecimal.calculatePercentage(scarichiMp.getQtaScaricata(), produzione.getPesoProduzione().doubleValue(),cifreDec.intValue());
|
||||
BigDecimal qtaDaScaricare = UtilityBigDecimal.calculatePercentage(scarichiMp.getQtaScaricata(), produzione.getPesoProduzione().doubleValue(), cifreDec.intValue());
|
||||
if (UtilityBigDecimal.equalsTo(qtaDaScaricare, BigDecimal.ZERO)) {
|
||||
continue;
|
||||
}
|
||||
@@ -850,4 +850,33 @@ public class WMSLavorazioneService {
|
||||
|
||||
return produzioniOrdine;
|
||||
}
|
||||
|
||||
public String getEtichettaSSCCOrdine(DtbOrdt ordine) throws Exception {
|
||||
ordine.setOperation(OperationType.SELECT_OBJECT);
|
||||
entityProcessor.processEntity(ordine,true,multiDBTransactionManager);
|
||||
if (UtilityString.isNullOrEmpty(ordine.getCodProd())) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return getEtichettaSSCCArticolo(ordine.getCodProd());
|
||||
}
|
||||
|
||||
public String getEtichettaSSCCArticolo(String codProd) throws Exception {
|
||||
String query = "SELECT jrl_cicl_disegni.cod_disegno, jtb_disegni_files.file_name " +
|
||||
"FROM jrl_cicl_disegni, " +
|
||||
" jtb_disegni_files " +
|
||||
"WHERE " +
|
||||
" jrl_cicl_disegni.cod_disegno = jtb_disegni_files.cod_disegno AND " +
|
||||
" cod_prod = " + UtilityDB.valueToString(codProd) + " AND " +
|
||||
" file_type = 'ETICHETTA_UL'";
|
||||
|
||||
HashMap<String, Object> disegno = UtilityDB.executeSimpleQueryOnlyFirstRow(multiDBTransactionManager.getPrimaryConnection(), query);
|
||||
if (disegno != null) {
|
||||
String reportName = UtilityHashMap.getValueIfExists(disegno, "file_name");
|
||||
reportName = reportName.substring(0, reportName.lastIndexOf("."));
|
||||
reportName = reportName.replaceAll("_", "");
|
||||
return reportName;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user