Gestita creazione della commessa direttamente nel preventivo
This commit is contained in:
@@ -25,6 +25,7 @@ public class CrmCompletaOrd {
|
|||||||
public String flagTipologia;
|
public String flagTipologia;
|
||||||
public CrmCliente cliente;
|
public CrmCliente cliente;
|
||||||
public CrmDestinazione destinazione;
|
public CrmDestinazione destinazione;
|
||||||
|
public CrmCommessa commessa;
|
||||||
public List<CrmPersRif> persRif;
|
public List<CrmPersRif> persRif;
|
||||||
public List<CrmSpese> spese;
|
public List<CrmSpese> spese;
|
||||||
BigDecimal acconto;
|
BigDecimal acconto;
|
||||||
@@ -111,6 +112,16 @@ public class CrmCompletaOrd {
|
|||||||
this.destinazione = destinazione;
|
this.destinazione = destinazione;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CrmCommessa getCommessa() {
|
||||||
|
return commessa;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonProperty("CRMCommessa")
|
||||||
|
public CrmCompletaOrd setCommessa(CrmCommessa commessa) {
|
||||||
|
this.commessa = commessa;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public List<CrmPersRif> getPersRif() {
|
public List<CrmPersRif> getPersRif() {
|
||||||
return persRif;
|
return persRif;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -716,6 +716,31 @@ public class CrmService {
|
|||||||
entityProcessor.processEntity(wdtbOrdsDelete, true, multiDBTransactionManager);
|
entityProcessor.processEntity(wdtbOrdsDelete, true, multiDBTransactionManager);
|
||||||
|
|
||||||
if (activityId == null) { // SE NON HA ATTIVITA PREVENTIVAZIONE, NE CREA UNA
|
if (activityId == null) { // SE NON HA ATTIVITA PREVENTIVAZIONE, NE CREA UNA
|
||||||
|
if (codJcom == null) {
|
||||||
|
CrmCommessa crmCommessa = completaOrd.getCommessa();
|
||||||
|
|
||||||
|
if (crmCommessa != null) {
|
||||||
|
JtbComt jtbComt = new JtbComt();
|
||||||
|
jtbComt.setOperation(OperationType.INSERT);
|
||||||
|
jtbComt.setPrecode("C");
|
||||||
|
jtbComt.setTipoAnag(tipoAnag);
|
||||||
|
jtbComt.setCodAnag(codAnag);
|
||||||
|
jtbComt.setCodVdes(codVdes);
|
||||||
|
jtbComt.setDescrizione(crmCommessa.getDescrizione());
|
||||||
|
jtbComt.setDescrizioneEstesa(crmCommessa.getDescrizioneEstesa());
|
||||||
|
jtbComt.setNote(crmCommessa.getNote());
|
||||||
|
jtbComt.setCodJflav(crmCommessa.getCodJflav());
|
||||||
|
jtbComt.setCodJfas(crmCommessa.getCodJfas());
|
||||||
|
jtbComt.setStatoCommessa(crmCommessa.getStatoCommessa());
|
||||||
|
|
||||||
|
entityProcessor.processEntity(jtbComt, true, multiDBTransactionManager);
|
||||||
|
entityBaseList.add(jtbComt);
|
||||||
|
codJcom = jtbComt.getCodJcom();
|
||||||
|
} else {
|
||||||
|
throw new Exception("Dati di commessa da creare inesistenti");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Acquisizione processo padre
|
// Acquisizione processo padre
|
||||||
String parentActivityId = null;
|
String parentActivityId = null;
|
||||||
String activityDescription = "PREVENTIVO N. " + numOrd + " DEL " + new SimpleDateFormat(CommonConstants.DATE_FORMAT_DMY).format(dataOrd);
|
String activityDescription = "PREVENTIVO N. " + numOrd + " DEL " + new SimpleDateFormat(CommonConstants.DATE_FORMAT_DMY).format(dataOrd);
|
||||||
|
|||||||
Reference in New Issue
Block a user