Skip to content

Commit

Permalink
FIX geco
Browse files Browse the repository at this point in the history
  • Loading branch information
mspasiano committed Oct 4, 2018
1 parent 68cd0fd commit a8b86a5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 125 deletions.
Expand Up @@ -622,7 +622,7 @@ public void aggiornaGECO(UserContext userContext) throws ComponentException {
try {
//L'aggiornamento parte solo se attivo informix
Parametri_enteBulk parEnte = Utility.createParametriEnteComponentSession().getParametriEnte(userContext);
if (parEnte.getFl_informix() && parEnte.getTipo_db().equals(Parametri_enteBulk.DB_PRODUZIONE)) {
if (parEnte.getFl_informix()) {
ProgettoHome progettoHome = ((ProgettoHome) getHome(userContext, ProgettoBulk.class));
progettoHome.aggiornaGeco(userContext, null);
DipartimentoHome dipartimentoHome = ((DipartimentoHome) getHome(userContext, DipartimentoBulk.class));
Expand Down
Expand Up @@ -570,6 +570,11 @@ public void verificaCommesse(UserContext userContext, ProgettoBulk progetto, Cla
progetto_other_fieldBulk.setToBeCreated();
progetto_other_fieldHome.insert(progetto_other_fieldBulk, userContext);

progetto_sip = (Progetto_sipBulk)progetto_sip_home.findByPrimaryKey(userContext, new Progetto_sipBulk(new Integer(geco_commessa.getEsercizio().intValue()),new Integer(geco_commessa.getId_comm().intValue()),geco_commessa.getFase()));
progetto_sip.setOtherField(progetto_other_fieldBulk);
progetto_sip.setToBeUpdated();
progetto_sip_home.update(progetto_sip, userContext);

}
}
}
Expand Down
Expand Up @@ -275,128 +275,4 @@ public Progetto_other_fieldBulk getOtherField() {
return otherField;
}

public String getStato() {
return Optional.ofNullable(this.getOtherField()).flatMap(el->Optional.ofNullable(el.getStato())).orElse(null);
}

public void setStato(String stato) {
if (getOtherField()==null) {
Progetto_other_fieldBulk bulk = new Progetto_other_fieldBulk(this.getPg_progetto());
bulk.setToBeCreated();
setOtherField(bulk);
}
if (getStato()!=null && stato!=null &&
getStato()!=stato) {
getOtherField().setStato(stato);
getOtherField().setToBeUpdated();
}
}

public TipoFinanziamentoBulk getTipoFinanziamento(){
return Optional.ofNullable(this.getOtherField()).flatMap(el->Optional.ofNullable(el.getTipoFinanziamento())).orElse(null);
}

public void setTipoFinanziamento(TipoFinanziamentoBulk tipoFinanziamento) {
if (getOtherField()==null) {
Progetto_other_fieldBulk bulk = new Progetto_other_fieldBulk(this.getPg_progetto());
bulk.setToBeCreated();
setOtherField(bulk);
}
if (getTipoFinanziamento()!=null && tipoFinanziamento!=null &&
getTipoFinanziamento()!=tipoFinanziamento) {
getOtherField().setTipoFinanziamento(tipoFinanziamento);
getOtherField().setToBeUpdated();
}
}

@Override
public Timestamp getDt_inizio() {
return Optional.ofNullable(this.getOtherField()).flatMap(el->Optional.ofNullable(el.getDtInizio())).orElse(null);
}

@Override
public void setDt_inizio(Timestamp dt_inizio) {
if (getOtherField()==null) {
Progetto_other_fieldBulk bulk = new Progetto_other_fieldBulk(this.getPg_progetto());
bulk.setToBeCreated();
setOtherField(bulk);
}
if (getDt_inizio()!=null && dt_inizio!=null &&
getDt_inizio()!=dt_inizio) {
getOtherField().setDtInizio(dt_inizio);
getOtherField().setToBeUpdated();
}
}

@Override
public Timestamp getDt_fine() {
return Optional.ofNullable(this.getOtherField()).flatMap(el->Optional.ofNullable(el.getDtFine())).orElse(null);
}

@Override
public void setDt_fine(Timestamp dt_fine) {
if (getOtherField()==null) {
Progetto_other_fieldBulk bulk = new Progetto_other_fieldBulk(this.getPg_progetto());
bulk.setToBeCreated();
setOtherField(bulk);
}
if (getDt_fine()!=null && dt_fine!=null &&
getDt_fine()!=dt_fine) {
getOtherField().setDtFine(dt_fine);
getOtherField().setToBeUpdated();
}
}

@Override
public Timestamp getDt_proroga() {
return Optional.ofNullable(this.getOtherField()).flatMap(el->Optional.ofNullable(el.getDtProroga())).orElse(null);
}

@Override
public void setDt_proroga(Timestamp dt_proroga) {
if (getOtherField()==null) {
Progetto_other_fieldBulk bulk = new Progetto_other_fieldBulk(this.getPg_progetto());
bulk.setToBeCreated();
setOtherField(bulk);
}
if (getDt_proroga()!=null && dt_proroga!=null &&
getDt_proroga()!=dt_proroga) {
getOtherField().setDtProroga(dt_proroga);
getOtherField().setToBeUpdated();
}
}

public BigDecimal getImFinanziato() {
return Optional.ofNullable(this.getOtherField()).flatMap(el->Optional.ofNullable(el.getImFinanziato())).orElse(null);
}

public void setImFinanziato(BigDecimal imFinanziato) {
if (getOtherField()==null) {
Progetto_other_fieldBulk bulk = new Progetto_other_fieldBulk(this.getPg_progetto());
bulk.setToBeCreated();
setOtherField(bulk);
}
if (getImFinanziato()!=null && imFinanziato!=null &&
getImFinanziato()!=imFinanziato) {
getOtherField().setImFinanziato(imFinanziato);
getOtherField().setToBeUpdated();
}
}

public BigDecimal getImCofinanziato() {
return Optional.ofNullable(this.getOtherField()).flatMap(el->Optional.ofNullable(el.getImCofinanziato())).orElse(null);
}

public void setImCofinanziato(BigDecimal imCofinanziato) {
if (getOtherField()==null) {
Progetto_other_fieldBulk bulk = new Progetto_other_fieldBulk(this.getPg_progetto());
bulk.setToBeCreated();
setOtherField(bulk);
}
if (getImCofinanziato()!=null && imCofinanziato!=null &&
getImCofinanziato()!=imCofinanziato) {
getOtherField().setImCofinanziato(imCofinanziato);
getOtherField().setToBeUpdated();
}
}
}

0 comments on commit a8b86a5

Please sign in to comment.