Nei documenti di perdita inserite le informazioni del documento di reso di riferimento
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -64,6 +64,7 @@ import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Statement;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
|
||||
import static it.integry.common.var.CommonConstants.DATE_FORMAT_YMD;
|
||||
@@ -848,6 +849,7 @@ public class PvmServiceSave {
|
||||
PreparedStatement ps;
|
||||
ResultSet rs;
|
||||
String codDtip = null;
|
||||
String descrDocReso = null;
|
||||
List<AnomalieResiDTO> anomalieResiDTOS = new ArrayList<>();
|
||||
|
||||
if ("V".equalsIgnoreCase(gestione)) {
|
||||
@@ -898,6 +900,15 @@ public class PvmServiceSave {
|
||||
docFromPickingDTO.setCodAnag(codAnag);
|
||||
}
|
||||
|
||||
query = UtilityDB.addwhereCond("SELECT data_doc_provv, num_doc_provv FROM mtb_colt ", whereCondColli, false);
|
||||
queryValues = UtilityDB.executeSimpleQueryOnlyFirstRow(multiDBTransactionManager.getPrimaryConnection(), query);
|
||||
if (queryValues != null) {
|
||||
Date dataDocProvv = (Date) queryValues.get("data_doc_provv");
|
||||
Integer numDocProvv = (Integer) queryValues.get("num_doc_provv");
|
||||
|
||||
descrDocReso = String.format("Documento di reso del %s n.%s", UtilityDate.formatDate(dataDocProvv, CommonConstants.DATE_FORMAT_DMY), numDocProvv);
|
||||
}
|
||||
|
||||
} else if ("T".equals(docFromPickingDTO.getTipoLista())) {
|
||||
query =
|
||||
"SELECT case when gtb_anag.part_iva = azienda.part_iva then 'L' ELSE 'V' END AS gestione " +
|
||||
@@ -1136,6 +1147,12 @@ public class PvmServiceSave {
|
||||
}
|
||||
dtbDoct.setMtbColt(loadColli.getColli());
|
||||
|
||||
if (descrDocReso != null){
|
||||
DtbDocr dtbDocr = new DtbDocr();
|
||||
dtbDocr.setDescrizione(descrDocReso);
|
||||
dtbDoct.getDtbDocr().add(dtbDocr);
|
||||
}
|
||||
|
||||
//Salvataggio documento
|
||||
try {
|
||||
entityProcessor.processEntity(dtbDoct, multiDBTransactionManager);
|
||||
|
||||
Reference in New Issue
Block a user