Finish Hotfix-1
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:
@@ -226,6 +226,8 @@ public class OrtoFruttaProductionService {
|
||||
String serDocLavCar = setupGest.getSetup(multiDBTransactionManager.getPrimaryConnection(), "CRUSCOTTO_PRODUZIONE",
|
||||
"SETUP",
|
||||
"SER_DOC_CAR");
|
||||
//se esiste un certificato per il carico in salvataggio con un numero diverso da quello selezionato lo vado a cancellare
|
||||
deleteOldCertificatoIfExists(activityId,codDtipLavCar,dto);
|
||||
|
||||
DtbDoct docLav = new DtbDoct();
|
||||
docLav
|
||||
@@ -405,6 +407,18 @@ public class OrtoFruttaProductionService {
|
||||
return collo;
|
||||
}
|
||||
|
||||
private boolean deleteOldCertificatoIfExists(String activityId, String codDtipLavCar, AccettazioneOrtoFruttaDTO dto) throws Exception{
|
||||
String sql = "SELECT * from dtb_doct where activity_id = {} and cod_dtip = {} and cod_anag = {} and num_doc <> {}";
|
||||
|
||||
DtbDoct oldDoc = UtilityDB.executeSimpleQueryOnlyFirstRowDTO(multiDBTransactionManager.getPrimaryConnection(),Query.format(sql,activityId,codDtipLavCar,dto.getCodAnag(),dto.getNumDoc()),DtbDoct.class);
|
||||
if(oldDoc == null)
|
||||
return false;
|
||||
|
||||
oldDoc.setOperation(OperationType.DELETE);
|
||||
entityProcessor.processEntity(oldDoc,true,multiDBTransactionManager);
|
||||
return true;
|
||||
}
|
||||
|
||||
private DtbOrdt getOrdineAcquistoCollegato(String gestione, Date dataOrd, Integer numOrd) throws Exception {
|
||||
String sql = "WITH ordrLav AS (SELECT dtb_ordr.data_ord,\n" +
|
||||
" dtb_ordr.gestione,\n" +
|
||||
|
||||
Reference in New Issue
Block a user