www in docker support
This commit is contained in:
parent
539a848e95
commit
c227fce036
2145 changed files with 399596 additions and 58 deletions
|
|
@ -0,0 +1,113 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class Armatura extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1468228167115L;
|
||||
|
||||
private long id_armatura;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private long numLicci;
|
||||
|
||||
private long numColpi;
|
||||
|
||||
private long partenza;
|
||||
|
||||
public Armatura(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public Armatura() {}
|
||||
|
||||
public long getId_armatura() {
|
||||
return this.id_armatura;
|
||||
}
|
||||
|
||||
public void setId_armatura(long id_armatura) {
|
||||
this.id_armatura = id_armatura;
|
||||
}
|
||||
|
||||
public void setDescrizione(String descrizione) {
|
||||
this.descrizione = descrizione;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<Armatura> findByCR(ArmaturaCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from ARMATURA AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty())
|
||||
wc.addWc("A.descrizione like '%" + CR.getSearchTxt().trim() + "%'");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public long getNumLicci() {
|
||||
return this.numLicci;
|
||||
}
|
||||
|
||||
public void setNumLicci(long numLicci) {
|
||||
this.numLicci = numLicci;
|
||||
}
|
||||
|
||||
public long getNumColpi() {
|
||||
return this.numColpi;
|
||||
}
|
||||
|
||||
public void setNumColpi(long numColpi) {
|
||||
this.numColpi = numColpi;
|
||||
}
|
||||
|
||||
public long getPartenza() {
|
||||
return this.partenza;
|
||||
}
|
||||
|
||||
public void setPartenza(long partenza) {
|
||||
this.partenza = partenza;
|
||||
}
|
||||
|
||||
public ResParm salvaDettaglio(Vectumerator<ArmaturaDettaglio> vec) {
|
||||
ResParm rp = new ResParm(true);
|
||||
while (vec.hasMoreElements()) {
|
||||
ArmaturaDettaglio row = (ArmaturaDettaglio)vec.nextElement();
|
||||
rp = row.save();
|
||||
}
|
||||
return rp;
|
||||
}
|
||||
|
||||
public boolean isCellaSelezionata(long riga, long colonna) {
|
||||
boolean ret = false;
|
||||
ArmaturaDettaglio row = new ArmaturaDettaglio(getApFull());
|
||||
row.findByArmaturaRiga(getId_armatura(), riga);
|
||||
if (row.getDBState() == 1) {
|
||||
String col = row.getArmaturaRiga().substring((int)colonna - 1, (int)colonna);
|
||||
if (col.equals("1"))
|
||||
ret = true;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ArmaturaCR extends CRAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1468228167115L;
|
||||
|
||||
private long id_armatura;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private long numLicci;
|
||||
|
||||
private long numColpi;
|
||||
|
||||
private long partenza;
|
||||
|
||||
public ArmaturaCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArmaturaCR() {}
|
||||
|
||||
public long getId_armatura() {
|
||||
return this.id_armatura;
|
||||
}
|
||||
|
||||
public void setId_armatura(long id_armatura) {
|
||||
this.id_armatura = id_armatura;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public long getNumLicci() {
|
||||
return this.numLicci;
|
||||
}
|
||||
|
||||
public void setNumLicci(long numLicci) {
|
||||
this.numLicci = numLicci;
|
||||
}
|
||||
|
||||
public long getNumColpi() {
|
||||
return this.numColpi;
|
||||
}
|
||||
|
||||
public void setNumColpi(long numColpi) {
|
||||
this.numColpi = numColpi;
|
||||
}
|
||||
|
||||
public long getPartenza() {
|
||||
return this.partenza;
|
||||
}
|
||||
|
||||
public void setPartenza(long partenza) {
|
||||
this.partenza = partenza;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class ArmaturaDettaglio extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 4648124288665405351L;
|
||||
|
||||
private long id_armaturaDettaglio;
|
||||
|
||||
private long id_armatura;
|
||||
|
||||
private long nRiga;
|
||||
|
||||
private String armaturaRiga;
|
||||
|
||||
public ArmaturaDettaglio(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArmaturaDettaglio() {}
|
||||
|
||||
public long getId_armatura() {
|
||||
return this.id_armatura;
|
||||
}
|
||||
|
||||
public void setId_armatura(long id_armatura) {
|
||||
this.id_armatura = id_armatura;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<ArmaturaDettaglio> findByCR(ArmaturaDettaglioCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from ARMATURA_DETTAGLIO AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty())
|
||||
wc.addWc("A.descrizione like '%" + CR.getSearchTxt().trim() + "%'");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public long getId_armaturaDettaglio() {
|
||||
return this.id_armaturaDettaglio;
|
||||
}
|
||||
|
||||
public void setId_armaturaDettaglio(long id_armaturaDettaglio) {
|
||||
this.id_armaturaDettaglio = id_armaturaDettaglio;
|
||||
}
|
||||
|
||||
public long getNRiga() {
|
||||
return this.nRiga;
|
||||
}
|
||||
|
||||
public void setNRiga(long nRiga) {
|
||||
this.nRiga = nRiga;
|
||||
}
|
||||
|
||||
public String getArmaturaRiga() {
|
||||
return (this.armaturaRiga == null) ? "" : this.armaturaRiga;
|
||||
}
|
||||
|
||||
public void setArmaturaRiga(String armaturaRiga) {
|
||||
this.armaturaRiga = armaturaRiga;
|
||||
}
|
||||
|
||||
public Vectumerator<ArmaturaDettaglio> findByArmatura(long l_id_armatura) {
|
||||
String s_Sql_Find = "select A.* from ARMATURA_DETTAGLIO AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_armatura = " + l_id_armatura);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public void findByArmaturaRiga(long l_id_armatura, long l_nRiga) {
|
||||
String s_Sql_Find = "select A.* from ARMATURA_DETTAGLIO AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_armatura = " + l_id_armatura);
|
||||
wc.addWc("A.nRiga = " + l_nRiga);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
findFirstRecord(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ArmaturaDettaglioCR extends CRAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 4648124288665405351L;
|
||||
|
||||
private long id_armaturaDettaglio;
|
||||
|
||||
private long id_armatura;
|
||||
|
||||
private long nRiga;
|
||||
|
||||
private String armaturaRiga;
|
||||
|
||||
public ArmaturaDettaglioCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArmaturaDettaglioCR() {}
|
||||
|
||||
public long getId_armatura() {
|
||||
return this.id_armatura;
|
||||
}
|
||||
|
||||
public void setId_armatura(long id_armatura) {
|
||||
this.id_armatura = id_armatura;
|
||||
}
|
||||
|
||||
public long getId_armaturaDettaglio() {
|
||||
return this.id_armaturaDettaglio;
|
||||
}
|
||||
|
||||
public void setId_armaturaDettaglio(long id_armaturaDettaglio) {
|
||||
this.id_armaturaDettaglio = id_armaturaDettaglio;
|
||||
}
|
||||
|
||||
public long getnRiga() {
|
||||
return this.nRiga;
|
||||
}
|
||||
|
||||
public void setnRiga(long nRiga) {
|
||||
this.nRiga = nRiga;
|
||||
}
|
||||
|
||||
public String getArmaturaRiga() {
|
||||
return (this.armaturaRiga == null) ? AB_EMPTY_STRING : this.armaturaRiga;
|
||||
}
|
||||
|
||||
public void setArmaturaRiga(String armaturaRiga) {
|
||||
this.armaturaRiga = armaturaRiga;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,302 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.art.Articolo;
|
||||
import it.acxent.art.ArticoloVariante;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.DoubleOperator;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class ArticoloArticoloTessuto extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1553527279921L;
|
||||
|
||||
private long id_articoloArticoloTessuto;
|
||||
|
||||
private long id_articolo;
|
||||
|
||||
private long id_articoloTessuto;
|
||||
|
||||
private ArticoloVariante articoloVariante;
|
||||
|
||||
private ArticoloTessuto articoloTessuto;
|
||||
|
||||
private long id_articoloVariante;
|
||||
|
||||
private Articolo articolo;
|
||||
|
||||
private long bordaturaMm;
|
||||
|
||||
private ArticoloTessutoColore articoloTessutoColore;
|
||||
|
||||
private long flgPrincipale;
|
||||
|
||||
private long mmATT;
|
||||
|
||||
private long id_articoloTessutoColore;
|
||||
|
||||
public ArticoloArticoloTessuto(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloArticoloTessuto() {}
|
||||
|
||||
public void setId_articoloArticoloTessuto(long newId_articoloArticoloTessuto) {
|
||||
this.id_articoloArticoloTessuto = newId_articoloArticoloTessuto;
|
||||
}
|
||||
|
||||
public void setId_articolo(long newId_articolo) {
|
||||
this.id_articolo = newId_articolo;
|
||||
setArticolo(null);
|
||||
}
|
||||
|
||||
public void setId_articoloTessuto(long newId_articoloTessuto) {
|
||||
this.id_articoloTessuto = newId_articoloTessuto;
|
||||
setArticoloTessuto(null);
|
||||
}
|
||||
|
||||
public long getId_articoloArticoloTessuto() {
|
||||
return this.id_articoloArticoloTessuto;
|
||||
}
|
||||
|
||||
public long getId_articolo() {
|
||||
return this.id_articolo;
|
||||
}
|
||||
|
||||
public long getId_articoloTessuto() {
|
||||
return this.id_articoloTessuto;
|
||||
}
|
||||
|
||||
public double getMtATT() {
|
||||
DoubleOperator dop = new DoubleOperator((float)getMmATT());
|
||||
dop.setScale(4, 1);
|
||||
dop.divide(1000.0F);
|
||||
return dop.getResult();
|
||||
}
|
||||
|
||||
public void setArticolo(Articolo newArticolo) {
|
||||
this.articolo = newArticolo;
|
||||
}
|
||||
|
||||
public Articolo getArticolo() {
|
||||
this.articolo = (Articolo)getSecondaryObject(this.articolo, Articolo.class, getId_articolo());
|
||||
return this.articolo;
|
||||
}
|
||||
|
||||
public void setArticoloTessuto(ArticoloTessuto newArticoloTessuto) {
|
||||
this.articoloTessuto = newArticoloTessuto;
|
||||
}
|
||||
|
||||
public ArticoloTessuto getArticoloTessuto() {
|
||||
this.articoloTessuto = (ArticoloTessuto)getSecondaryObject(this.articoloTessuto, ArticoloTessuto.class, getId_articoloTessuto());
|
||||
return this.articoloTessuto;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<ArticoloArticoloTessuto> findByCR(ArticoloArticoloTessutoCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_ARTICOLO_TESSUTO AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (CR.getId_articoloTessuto() > 0L)
|
||||
wc.addWc("A.id_articoloTessuto=" + CR.getId_articoloTessuto());
|
||||
if (CR.getId_articoloVariante() > 0L) {
|
||||
wc.addWc("A.id_articoloVariante=" + CR.getId_articoloVariante());
|
||||
} else if (CR.getId_articoloVariante() == 0L) {
|
||||
wc.addWc("(A.id_articoloVariante is null or A.id_articoloVariante=0)");
|
||||
}
|
||||
if (CR.getId_articolo() > 0L)
|
||||
wc.addWc("A.id_articolo=" + CR.getId_articolo());
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public ArticoloVariante getArticoloVariante() {
|
||||
this.articoloVariante = (ArticoloVariante)getSecondaryObject(this.articoloVariante, ArticoloVariante.class, getId_articoloVariante());
|
||||
return this.articoloVariante;
|
||||
}
|
||||
|
||||
public void setArticoloVariante(ArticoloVariante articoloVariante) {
|
||||
this.articoloVariante = articoloVariante;
|
||||
}
|
||||
|
||||
public long getId_articoloVariante() {
|
||||
return this.id_articoloVariante;
|
||||
}
|
||||
|
||||
public void setId_articoloVariante(long id_articoloVariante) {
|
||||
this.id_articoloVariante = id_articoloVariante;
|
||||
setArticoloVariante(null);
|
||||
}
|
||||
|
||||
public Vectumerator<ArticoloArticoloTessuto> findByArticolo(long l_id_articolo) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_ARTICOLO_TESSUTO AS A inner join ARTICOLO_TESSUTO as B ON A.id_articoloTessuto= B.id_articoloTessuto";
|
||||
String s_Sql_Order = " order by B.descrizione";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_articolo=" + l_id_articolo);
|
||||
wc.addWc("A.id_articoloVariante is null");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public Vectumerator<ArticoloArticoloTessuto> findByArticoloVariante(long l_id_articoloVariante) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_ARTICOLO_TESSUTO AS A inner join ARTICOLO_TESSUTO as B ON A.id_articoloTessuto= B.id_articoloTessuto";
|
||||
String s_Sql_Order = " order by B.descrizione";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_articoloVariante=" + l_id_articoloVariante);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public long getId_articoloTessutoColore() {
|
||||
return this.id_articoloTessutoColore;
|
||||
}
|
||||
|
||||
public void setId_articoloTessutoColore(long id_articoloTessutoColore) {
|
||||
this.id_articoloTessutoColore = id_articoloTessutoColore;
|
||||
setArticoloTessutoColore(null);
|
||||
}
|
||||
|
||||
public ArticoloTessutoColore getArticoloTessutoColore() {
|
||||
this.articoloTessutoColore = (ArticoloTessutoColore)getSecondaryObject(this.articoloTessutoColore, ArticoloTessutoColore.class,
|
||||
getId_articoloTessutoColore());
|
||||
return this.articoloTessutoColore;
|
||||
}
|
||||
|
||||
public void setArticoloTessutoColore(ArticoloTessutoColore articoloTessutoColore) {
|
||||
this.articoloTessutoColore = articoloTessutoColore;
|
||||
}
|
||||
|
||||
public void findByArticoloVarianteArticoloTessutoColore(long l_id_articoloVariante, long l_id_articolotessuto, long l_id_articolotessutoColore) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_ARTICOLO_TESSUTO AS A inner join ARTICOLO_TESSUTO as B ON A.id_articoloTessuto= B.id_articoloTessuto";
|
||||
String s_Sql_Order = " order by B.descrizione";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_articoloVariante=" + l_id_articoloVariante);
|
||||
if (l_id_articolotessuto > 0L)
|
||||
wc.addWc("A.id_articoloTessuto=" + l_id_articolotessuto);
|
||||
if (l_id_articolotessutoColore > 0L)
|
||||
wc.addWc("A.id_articoloTessutoColore=" + l_id_articolotessutoColore);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
findFirstRecord(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void findByArticoloArticoloTessutoBase(long l_id_articolo, long l_id_articolotessuto) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_ARTICOLO_TESSUTO AS A inner join ARTICOLO_TESSUTO as B ON A.id_articoloTessuto= B.id_articoloTessuto";
|
||||
String s_Sql_Order = " order by B.descrizione";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_articolo=" + l_id_articolo);
|
||||
wc.addWc("A.id_articoloTessuto=" + l_id_articolotessuto);
|
||||
wc.addWc("(A.id_articoloTessutoColore is null or A.id_articoloTessutoColore=0) ");
|
||||
wc.addWc("A.id_articoloVariante is null");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
findFirstRecord(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void findByArticoloArticoloTessutoColoreBase(long l_id_articolo, long l_id_articolotessutoColore) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_ARTICOLO_TESSUTO AS A inner join ARTICOLO_TESSUTO as B ON A.id_articoloTessuto= B.id_articoloTessuto";
|
||||
String s_Sql_Order = " order by B.descrizione";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_articolo=" + l_id_articolo);
|
||||
wc.addWc("A.id_articoloTessutoColore=" + l_id_articolotessutoColore);
|
||||
wc.addWc("A.id_articoloVariante is null");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
findFirstRecord(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
}
|
||||
}
|
||||
|
||||
public String getDescrizioneTessuto(String lang) {
|
||||
if (getId_articoloTessutoColore() > 0L)
|
||||
return getArticoloTessutoColore().getDescrizioneCompleta(lang);
|
||||
if (getId_articoloTessuto() > 0L)
|
||||
return getArticoloTessuto().getDescrizioneCompleta(lang);
|
||||
return "";
|
||||
}
|
||||
|
||||
public String getDescrizioneArticolo(String lang) {
|
||||
if (getId_articoloTessutoColore() > 0L)
|
||||
return getArticoloVariante().getDescrizioneCompleta(lang);
|
||||
if (getId_articolo() > 0L)
|
||||
return getArticolo().getDescrizioneCompleta(lang);
|
||||
return "";
|
||||
}
|
||||
|
||||
public long getFlgPrincipale() {
|
||||
return this.flgPrincipale;
|
||||
}
|
||||
|
||||
public void setFlgPrincipale(long flgPrincipale) {
|
||||
this.flgPrincipale = flgPrincipale;
|
||||
}
|
||||
|
||||
public ResParm save() {
|
||||
if (getFlgPrincipale() == 1L)
|
||||
resetPrincipaleByArticolo(getId_articolo(), getId_articoloVariante());
|
||||
return super.save();
|
||||
}
|
||||
|
||||
protected ResParm resetPrincipaleByArticolo(long l_id_articolo, long l_id_articoloVariante) {
|
||||
String sql = "update ARTICOLO_ARTICOLO_TESSUTO set flgPrincipale = null where id_articolo=" + l_id_articolo;
|
||||
if (l_id_articoloVariante > 0L) {
|
||||
sql = sql + " and id_articoloVariante=" + sql;
|
||||
} else {
|
||||
sql = sql + " and (id_articoloVariante is null or id_articoloVariante=0)";
|
||||
}
|
||||
return update(sql);
|
||||
}
|
||||
|
||||
public long getMmATT() {
|
||||
return this.mmATT;
|
||||
}
|
||||
|
||||
public void setMmATT(long mmATT) {
|
||||
this.mmATT = mmATT;
|
||||
}
|
||||
|
||||
public long getBordaturaMm() {
|
||||
return this.bordaturaMm;
|
||||
}
|
||||
|
||||
public void setBordaturaMm(long bordaturaMm) {
|
||||
this.bordaturaMm = bordaturaMm;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.art.Articolo;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
public class ArticoloArticoloTessutoCR extends CRAdapter {
|
||||
private long id_articoloArticoloTessuto;
|
||||
|
||||
private long id_articolo;
|
||||
|
||||
private long id_articoloTessuto;
|
||||
|
||||
private double mtATT;
|
||||
|
||||
private Articolo articolo;
|
||||
|
||||
private ArticoloTessuto articoloTessuto;
|
||||
|
||||
private long id_articoloVariante = -1L;
|
||||
|
||||
public ArticoloArticoloTessutoCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloArticoloTessutoCR() {}
|
||||
|
||||
public void setId_articoloArticoloTessuto(long newId_articoloArticoloTessuto) {
|
||||
this.id_articoloArticoloTessuto = newId_articoloArticoloTessuto;
|
||||
}
|
||||
|
||||
public void setId_articolo(long newId_articolo) {
|
||||
this.id_articolo = newId_articolo;
|
||||
setArticolo(null);
|
||||
}
|
||||
|
||||
public void setId_articoloTessuto(long newId_articoloTessuto) {
|
||||
this.id_articoloTessuto = newId_articoloTessuto;
|
||||
setArticoloTessuto(null);
|
||||
}
|
||||
|
||||
public void setMtATT(double newMtATT) {
|
||||
this.mtATT = newMtATT;
|
||||
}
|
||||
|
||||
public long getId_articoloArticoloTessuto() {
|
||||
return this.id_articoloArticoloTessuto;
|
||||
}
|
||||
|
||||
public long getId_articolo() {
|
||||
return this.id_articolo;
|
||||
}
|
||||
|
||||
public long getId_articoloTessuto() {
|
||||
return this.id_articoloTessuto;
|
||||
}
|
||||
|
||||
public double getMtATT() {
|
||||
return this.mtATT;
|
||||
}
|
||||
|
||||
public void setArticolo(Articolo newArticolo) {
|
||||
this.articolo = newArticolo;
|
||||
}
|
||||
|
||||
public Articolo getArticolo() {
|
||||
this.articolo = (Articolo)getSecondaryObject(this.articolo, Articolo.class,
|
||||
|
||||
getId_articolo());
|
||||
return this.articolo;
|
||||
}
|
||||
|
||||
public void setArticoloTessuto(ArticoloTessuto newArticoloTessuto) {
|
||||
this.articoloTessuto = newArticoloTessuto;
|
||||
}
|
||||
|
||||
public ArticoloTessuto getArticoloTessuto() {
|
||||
this.articoloTessuto = (ArticoloTessuto)getSecondaryObject(this.articoloTessuto, ArticoloTessuto.class,
|
||||
|
||||
getId_articoloTessuto());
|
||||
return this.articoloTessuto;
|
||||
}
|
||||
|
||||
public long getId_articoloVariante() {
|
||||
return this.id_articoloVariante;
|
||||
}
|
||||
|
||||
public void setId_articoloVariante(long id_articoloVariante) {
|
||||
this.id_articoloVariante = id_articoloVariante;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,410 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.anag.Iva;
|
||||
import it.acxent.anag.MagFisico;
|
||||
import it.acxent.anag._AnagAdapter;
|
||||
import it.acxent.art.Articolo;
|
||||
import it.acxent.art.Tipo;
|
||||
import it.acxent.art.TipologiaArticolo;
|
||||
import it.acxent.contab.RigaDocumento;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.DoubleOperator;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.Date;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
public class ArticoloFilato extends _AnagAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1468228166479L;
|
||||
|
||||
private long id_articoloFilato;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private long titolo;
|
||||
|
||||
private long nCapi;
|
||||
|
||||
private long flgNaturaTinto;
|
||||
|
||||
private long id_tipo;
|
||||
|
||||
private Tipo tipo;
|
||||
|
||||
private long id_iva;
|
||||
|
||||
private Iva iva;
|
||||
|
||||
private long flgDispo;
|
||||
|
||||
private boolean quantitaCalcolate;
|
||||
|
||||
private double quantitaEffettiva;
|
||||
|
||||
private double quantitaImpegnata;
|
||||
|
||||
private double quantitaInArrivo;
|
||||
|
||||
private String quantitaMagazzinoMovimentoHtml;
|
||||
|
||||
private double quantitaW;
|
||||
|
||||
private String codiceAF;
|
||||
|
||||
private double quantita;
|
||||
|
||||
private long id_magFisico;
|
||||
|
||||
private MagFisico magFisico;
|
||||
|
||||
public ArticoloFilato(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloFilato() {}
|
||||
|
||||
public void setId_articoloFilato(long newId_articoloFilato) {
|
||||
this.id_articoloFilato = newId_articoloFilato;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public void setTitolo(long newTitolo) {
|
||||
this.titolo = newTitolo;
|
||||
}
|
||||
|
||||
public void setNCapi(long newNCapi) {
|
||||
this.nCapi = newNCapi;
|
||||
}
|
||||
|
||||
public void setFlgNaturaTinto(long newFlgNaturaTinto) {
|
||||
this.flgNaturaTinto = newFlgNaturaTinto;
|
||||
}
|
||||
|
||||
public long getId_articoloFilato() {
|
||||
return this.id_articoloFilato;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? getCodiceAF() : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public long getTitolo() {
|
||||
return this.titolo;
|
||||
}
|
||||
|
||||
public long getNCapi() {
|
||||
return this.nCapi;
|
||||
}
|
||||
|
||||
public long getFlgNaturaTinto() {
|
||||
return this.flgNaturaTinto;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<ArticoloFilato> findByCR(ArticoloFilatoCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_FILATO AS A ";
|
||||
String s_Sql_Order = " order by A.codiceAF,A.descrizione";
|
||||
if ((!CR.getSearchTxt().isEmpty() && !CR.getSearchTxt().equals("*")) || CR.getFlgQta() == 1L)
|
||||
s_Sql_Find = s_Sql_Find + " LEFT JOIN ARTICOLO_FILATO_COLORE AS B ON A.id_articoloFilato=B.id_articoloFilato";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.descrizione like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
if (CR.getId_tipo() > 0L)
|
||||
wc.addWc("A.id_tipo=" + CR.getId_tipo());
|
||||
if (CR.getFlgQta() == 1L)
|
||||
if (CR.getQtaDa() == 0L) {
|
||||
wc.addWc("(A.quantitaW<=" + CR.getQtaA() + " or B.quantitaAfc<=" + CR.getQtaA() + ")");
|
||||
} else {
|
||||
wc.addWc("(A.quantitaW>=" + CR.getQtaDa() + " or B.quantitaAfc>=" + CR.getQtaDa() + ")");
|
||||
wc.addWc("(A.quantitaW<=" + CR.getQtaA() + " or B.quantitaAfc<=" + CR.getQtaA() + ")");
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public long getId_tipo() {
|
||||
return this.id_tipo;
|
||||
}
|
||||
|
||||
public Tipo getTipo() {
|
||||
this.tipo = (Tipo)getSecondaryObject(this.tipo, Tipo.class, getId_tipo());
|
||||
return this.tipo;
|
||||
}
|
||||
|
||||
public void setId_tipo(long id_tipo) {
|
||||
this.id_tipo = id_tipo;
|
||||
setTipo(null);
|
||||
}
|
||||
|
||||
public void setTipo(Tipo tipo) {
|
||||
this.tipo = tipo;
|
||||
}
|
||||
|
||||
public TipologiaArticolo getTipologiaArticolo() {
|
||||
return getTipo().getTipologiaArticolo();
|
||||
}
|
||||
|
||||
public long getId_iva() {
|
||||
return this.id_iva;
|
||||
}
|
||||
|
||||
public Iva getIva() {
|
||||
this.iva = (Iva)getSecondaryObject(this.iva, Iva.class, getId_iva());
|
||||
return this.iva;
|
||||
}
|
||||
|
||||
public void setId_iva(long newId_iva) {
|
||||
this.id_iva = newId_iva;
|
||||
setIva(null);
|
||||
}
|
||||
|
||||
public void setIva(Iva newIva) {
|
||||
this.iva = newIva;
|
||||
}
|
||||
|
||||
public Iva getIva(it.acxent.anag.Clifor l_clifor) {
|
||||
this.iva = null;
|
||||
if (l_clifor == null || l_clifor.getId_clifor() == 0L) {
|
||||
this.iva = (Iva)getSecondaryObject(this.iva, Iva.class, new Long(getId_iva()));
|
||||
} else {
|
||||
this.iva = new Iva(getApFull());
|
||||
this.iva.findByPrimaryKey(getId_iva(l_clifor));
|
||||
}
|
||||
return this.iva;
|
||||
}
|
||||
|
||||
public long getId_iva(it.acxent.anag.Clifor l_clifor) {
|
||||
if (l_clifor != null && l_clifor.getId_clifor() != 0L) {
|
||||
if (l_clifor.getFlgArt8() == 1L)
|
||||
return getCodiceIvaArt8_A();
|
||||
return this.id_iva;
|
||||
}
|
||||
return this.id_iva;
|
||||
}
|
||||
|
||||
public ResParm superSave() {
|
||||
return save();
|
||||
}
|
||||
|
||||
private synchronized void calcolaQuantita() {
|
||||
if ((!isQuantitaCalcolate() ? true : false) & ((this.id_articoloFilato != 0L) ? true : false)) {
|
||||
long l_flgDispo;
|
||||
RigaDocumento rd = new RigaDocumento(getApFull());
|
||||
rd.findMagFilatoDisponibilita(0L, getId_articoloFilato(), 0L, null, 0L, 0L, 0L, null);
|
||||
double q = rd.getQuantita();
|
||||
double nr = rd.getNr();
|
||||
double kg = rd.getKg();
|
||||
double mt = rd.getMt();
|
||||
setQuantitaW(q);
|
||||
setQuantita(q);
|
||||
setQuantitaImpegnata(new RigaDocumento(getApFull()).getQuantitaImpegnataFilatoByArticoloFilatoColoreSeriale(0L,
|
||||
getId_articoloFilato(), 0L, ""));
|
||||
double q1 = new RigaDocumento(getApFull()).getQuantitaFilatoInArrivoByArticoloFilatoColoreSeriale(0L, getId_articoloFilato(), 0L, "");
|
||||
setQuantitaInArrivo(q1);
|
||||
if (getTipo().getFlgTipoMagazzino() != 9L && getTipo().getFlgTipoMagazzino() != 9L) {
|
||||
DoubleOperator dop = new DoubleOperator(q);
|
||||
dop.add(this.quantitaInArrivo);
|
||||
dop.subtract(this.quantitaImpegnata);
|
||||
setQuantitaEffettiva(dop.getResult());
|
||||
}
|
||||
this.quantitaMagazzinoMovimentoHtml = Articolo.getMovimentoHtmlDesc(getTipologiaArticolo(), q, nr, kg, mt, this.quantitaInArrivo, this.quantitaImpegnata, this.quantitaEffettiva,
|
||||
usaMagazzino(), getParm("USA_MAGAZZINO").isTrue(),
|
||||
getNf());
|
||||
if (!usaMagazzino()) {
|
||||
l_flgDispo = 1L;
|
||||
} else {
|
||||
l_flgDispo = (this.quantitaW > 0.0D) ? 1L : 0L;
|
||||
}
|
||||
String temp = "update ARTICOLO_FILATO set quantitaMagazzinoMovimentoHtml='" + this.quantitaMagazzinoMovimentoHtml + "', quantitaW=" + this.quantitaW + ", quantitaEffettiva=" + this.quantitaEffettiva + ", quantitaImpegnata=" + this.quantitaImpegnata + ", quantitaCalcolate=true, flgDispo=" + l_flgDispo + " where id_articoloFilato=" +
|
||||
|
||||
getId_articoloFilato();
|
||||
update(temp);
|
||||
setQuantitaCalcolate(true);
|
||||
}
|
||||
}
|
||||
|
||||
public double getQuantitaEffettiva() {
|
||||
if (!isQuantitaCalcolate() && this.id_articoloFilato != 0L)
|
||||
calcolaQuantita();
|
||||
return this.quantitaEffettiva;
|
||||
}
|
||||
|
||||
public double getQuantitaImpegnata() {
|
||||
if (!isQuantitaCalcolate() && this.id_articoloFilato != 0L)
|
||||
calcolaQuantita();
|
||||
return this.quantitaImpegnata;
|
||||
}
|
||||
|
||||
public double getQuantitaInArrivo() {
|
||||
if (!isQuantitaCalcolate() && this.id_articoloFilato != 0L)
|
||||
calcolaQuantita();
|
||||
return this.quantitaInArrivo;
|
||||
}
|
||||
|
||||
public String getQuantitaMagazzinoMovimentoHtml() {
|
||||
if (getParm("USA_MAGAZZINO").isTrue())
|
||||
return "--";
|
||||
if (!isQuantitaCalcolate() && this.id_articoloFilato != 0L)
|
||||
calcolaQuantita();
|
||||
return (this.quantitaMagazzinoMovimentoHtml == null) ? "" : this.quantitaMagazzinoMovimentoHtml;
|
||||
}
|
||||
|
||||
public double getQuantitaW() {
|
||||
if (!isQuantitaCalcolate() && this.id_articoloFilato != 0L)
|
||||
calcolaQuantita();
|
||||
return this.quantitaW;
|
||||
}
|
||||
|
||||
public boolean isQuantitaCalcolate() {
|
||||
return this.quantitaCalcolate;
|
||||
}
|
||||
|
||||
public void setQuantitaCalcolate(boolean quantitaCalcolate) {
|
||||
this.quantitaCalcolate = quantitaCalcolate;
|
||||
}
|
||||
|
||||
public void setQuantitaEffettiva(double quantitaEffettiva) {
|
||||
this.quantitaEffettiva = quantitaEffettiva;
|
||||
}
|
||||
|
||||
public void setQuantitaImpegnata(double quantitaImpegnata) {
|
||||
this.quantitaImpegnata = quantitaImpegnata;
|
||||
}
|
||||
|
||||
public void setQuantitaInArrivo(double quantitaInArrivo) {
|
||||
this.quantitaInArrivo = quantitaInArrivo;
|
||||
}
|
||||
|
||||
public void setQuantitaMagazzinoMovimentoHtml(String quantitaMagazzinoMovimentoHtml) {
|
||||
this.quantitaMagazzinoMovimentoHtml = quantitaMagazzinoMovimentoHtml;
|
||||
}
|
||||
|
||||
public void setQuantitaW(double quantitaW) {
|
||||
this.quantitaW = quantitaW;
|
||||
}
|
||||
|
||||
public long getFlgDispo() {
|
||||
return this.flgDispo;
|
||||
}
|
||||
|
||||
public void setFlgDispo(long flgDispo) {
|
||||
this.flgDispo = flgDispo;
|
||||
}
|
||||
|
||||
public void resetCalcoloQuantita() {
|
||||
if (getId_articoloFilato() > 0L) {
|
||||
update("update ARTICOLO_FILATO set quantitaCalcolate=false where id_articoloFilato=" + getId_articoloFilato());
|
||||
setQuantitaCalcolate(false);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean usaMagazzino() {
|
||||
if (getTipo().getFlgTipoMagazzino() == 9L || getTipo().getFlgTipoMagazzino() == 0L)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public String getCodiceAF() {
|
||||
return (this.codiceAF == null) ? "" : this.codiceAF.trim();
|
||||
}
|
||||
|
||||
public void setCodiceAF(String nota) {
|
||||
this.codiceAF = nota;
|
||||
}
|
||||
|
||||
public String getDescrizioneCompleta() {
|
||||
return getCodiceAF() + " " + getCodiceAF();
|
||||
}
|
||||
|
||||
public void findByCodice(String l_codiceAF) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_FILATO AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.codiceAF='" + l_codiceAF + "'");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
findFirstRecord(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
}
|
||||
}
|
||||
|
||||
public double getQuantita() {
|
||||
return getQuantita(null);
|
||||
}
|
||||
|
||||
public void setQuantita(double quantita) {
|
||||
this.quantita = quantita;
|
||||
}
|
||||
|
||||
public double getQuantita(Date data) {
|
||||
if (!usaMagazzino())
|
||||
return 0.0D;
|
||||
if (getParm("USA_MAGAZZINO").isFalse()) {
|
||||
RigaDocumento rd = new RigaDocumento(getApFull());
|
||||
rd.findMagFilatoDisponibilita(0L, getId_articoloFilato(), 0L, null, 0L, getId_magFisico(), 0L, data);
|
||||
return rd.getQuantita();
|
||||
}
|
||||
return this.quantita;
|
||||
}
|
||||
|
||||
public long getId_magFisico() {
|
||||
return this.id_magFisico;
|
||||
}
|
||||
|
||||
public MagFisico getMagFisico() {
|
||||
this.magFisico = (MagFisico)getSecondaryObject(this.magFisico, MagFisico.class, getId_magFisico());
|
||||
return this.magFisico;
|
||||
}
|
||||
|
||||
public void setId_magFisico(long id_magFisico) {
|
||||
this.id_magFisico = id_magFisico;
|
||||
setMagFisico(null);
|
||||
}
|
||||
|
||||
public void setMagFisico(MagFisico magFisico) {
|
||||
this.magFisico = magFisico;
|
||||
}
|
||||
|
||||
protected void fillFields(ResultSet rst) {
|
||||
super.fillFields(rst);
|
||||
try {
|
||||
if (isColumnInResultSet(rst, "id_magFisico"))
|
||||
setId_magFisico(rst.getLong("id_magFisico"));
|
||||
if (isColumnInResultSet(rst, "quantita"))
|
||||
setQuantita(rst.getDouble("quantita"));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.art.Tipo;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
public class ArticoloFilatoCR extends CRAdapter {
|
||||
private long id_articoloFilato;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private long titolo;
|
||||
|
||||
private long nCapi;
|
||||
|
||||
private long flgNaturaTinto;
|
||||
|
||||
private long id_tipo;
|
||||
|
||||
private Tipo tipo;
|
||||
|
||||
private long flgQta;
|
||||
|
||||
private long qtaA = 9999L;
|
||||
|
||||
private long qtaDa = 1L;
|
||||
|
||||
public ArticoloFilatoCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloFilatoCR() {}
|
||||
|
||||
public void setId_articoloFilato(long newId_articoloFilato) {
|
||||
this.id_articoloFilato = newId_articoloFilato;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public void setTitolo(long newTitolo) {
|
||||
this.titolo = newTitolo;
|
||||
}
|
||||
|
||||
public void setNCapi(long newNCapi) {
|
||||
this.nCapi = newNCapi;
|
||||
}
|
||||
|
||||
public void setFlgNaturaTinto(long newFlgNaturaTinto) {
|
||||
this.flgNaturaTinto = newFlgNaturaTinto;
|
||||
}
|
||||
|
||||
public long getId_articoloFilato() {
|
||||
return this.id_articoloFilato;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public long getTitolo() {
|
||||
return this.titolo;
|
||||
}
|
||||
|
||||
public long getNCapi() {
|
||||
return this.nCapi;
|
||||
}
|
||||
|
||||
public long getFlgNaturaTinto() {
|
||||
return this.flgNaturaTinto;
|
||||
}
|
||||
|
||||
public long getId_tipo() {
|
||||
return this.id_tipo;
|
||||
}
|
||||
|
||||
public Tipo getTipo() {
|
||||
this.tipo = (Tipo)getSecondaryObject(this.tipo, Tipo.class, getId_tipo());
|
||||
return this.tipo;
|
||||
}
|
||||
|
||||
public void setId_tipo(long id_tipo) {
|
||||
this.id_tipo = id_tipo;
|
||||
setTipo(null);
|
||||
}
|
||||
|
||||
public void setTipo(Tipo tipo) {
|
||||
this.tipo = tipo;
|
||||
}
|
||||
|
||||
public long getFlgQta() {
|
||||
return this.flgQta;
|
||||
}
|
||||
|
||||
public void setFlgQta(long flgQta) {
|
||||
this.flgQta = flgQta;
|
||||
}
|
||||
|
||||
public long getQtaA() {
|
||||
return this.qtaA;
|
||||
}
|
||||
|
||||
public void setQtaA(long qtaA) {
|
||||
this.qtaA = qtaA;
|
||||
}
|
||||
|
||||
public long getQtaDa() {
|
||||
return this.qtaDa;
|
||||
}
|
||||
|
||||
public void setQtaDa(long qtaDa) {
|
||||
this.qtaDa = qtaDa;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,565 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.anag.Iva;
|
||||
import it.acxent.anag.MagFisico;
|
||||
import it.acxent.anag._AnagAdapter;
|
||||
import it.acxent.art.Articolo;
|
||||
import it.acxent.art.TipologiaArticolo;
|
||||
import it.acxent.contab.RigaDocumento;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.DoubleOperator;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.Date;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
public class ArticoloFilatoColore extends _AnagAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1468228166501L;
|
||||
|
||||
private long id_articoloFilatoColore;
|
||||
|
||||
private long id_articoloFilato;
|
||||
|
||||
private long id_coloreFilato;
|
||||
|
||||
private long id_magFisico;
|
||||
|
||||
private MagFisico magFisico;
|
||||
|
||||
private double perc;
|
||||
|
||||
private double quantitaInArrivo;
|
||||
|
||||
private double quantitaImpegnata;
|
||||
|
||||
private ArticoloFilato articoloFilato;
|
||||
|
||||
private ColoreFilato coloreFilato;
|
||||
|
||||
private boolean quantitaCalcolate;
|
||||
|
||||
private String quantitaMagazzinoMovimentoHtml;
|
||||
|
||||
private double quantitaEffettiva;
|
||||
|
||||
private long flgDispo;
|
||||
|
||||
private String seriale;
|
||||
|
||||
private double quantitaAfc;
|
||||
|
||||
private boolean quantitaDataCalcolate = false;
|
||||
|
||||
private double quantitaData;
|
||||
|
||||
private double quantitaAfcW;
|
||||
|
||||
public ArticoloFilatoColore(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloFilatoColore() {}
|
||||
|
||||
public long getId_articoloFilatoColore() {
|
||||
return this.id_articoloFilatoColore;
|
||||
}
|
||||
|
||||
public void setId_articoloFilatoColore(long id_articoloFilatoColore) {
|
||||
this.id_articoloFilatoColore = id_articoloFilatoColore;
|
||||
}
|
||||
|
||||
public void setId_articoloFilato(long newId_articoloFilato) {
|
||||
this.id_articoloFilato = newId_articoloFilato;
|
||||
setArticoloFilato(null);
|
||||
}
|
||||
|
||||
public void setId_coloreFilato(long newId_coloreFilato) {
|
||||
this.id_coloreFilato = newId_coloreFilato;
|
||||
setColoreFilato(null);
|
||||
}
|
||||
|
||||
public void setPerc(double newPerc) {
|
||||
this.perc = newPerc;
|
||||
}
|
||||
|
||||
public long getId_articoloFilato() {
|
||||
return this.id_articoloFilato;
|
||||
}
|
||||
|
||||
public long getId_coloreFilato() {
|
||||
return this.id_coloreFilato;
|
||||
}
|
||||
|
||||
public double getPerc() {
|
||||
return this.perc;
|
||||
}
|
||||
|
||||
public void setArticoloFilato(ArticoloFilato newArticoloFilato) {
|
||||
this.articoloFilato = newArticoloFilato;
|
||||
}
|
||||
|
||||
public ArticoloFilato getArticoloFilato() {
|
||||
this.articoloFilato = (ArticoloFilato)getSecondaryObject(this.articoloFilato, ArticoloFilato.class, getId_articoloFilato());
|
||||
return this.articoloFilato;
|
||||
}
|
||||
|
||||
public void setColoreFilato(ColoreFilato newColoreFilato) {
|
||||
this.coloreFilato = newColoreFilato;
|
||||
}
|
||||
|
||||
public ColoreFilato getColoreFilato() {
|
||||
this.coloreFilato = (ColoreFilato)getSecondaryObject(this.coloreFilato, ColoreFilato.class, getId_coloreFilato());
|
||||
return this.coloreFilato;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<ArticoloFilatoColore> findByCR(ArticoloFilatoColoreCR CR, int pageNumber, int pageRows) {
|
||||
if (CR.getFlgTipoRicerca() == 1L)
|
||||
return findByCRDispoMagazzino(CR, pageNumber, pageRows);
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_FILATO_COLORE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
s_Sql_Find = s_Sql_Find + " inner join ARTICOLO_FILATO AS B ON A.id_articoloFilato=B.id_articoloFilato inner join COLORE_FILATO AS C ON A.id_coloreFilato=C.id_coloreFilato";
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(B.descrizione like '%" + token + "%' or C.descrizione like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public Vectumerator<ArticoloFilatoColore> findByArticoloFilato(long id_articoloFilato) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_FILATO_COLORE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc(" A.id_articoloFilato = " + id_articoloFilato);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public void findByFilatoColore(long id_articoloFilato, long id_coloreFilato) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_FILATO_COLORE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc(" A.id_articoloFilato = " + id_articoloFilato);
|
||||
wc.addWc(" A.id_coloreFilato = " + id_coloreFilato);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
findFirstRecord(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
}
|
||||
}
|
||||
|
||||
public Vectumerator findByCRSerMagazzino(ArticoloFilatoColoreCR CR, int pageNumber, int pageRows) {
|
||||
try {
|
||||
Vectumerator vec = new Vectumerator();
|
||||
String sql = "SELECT M.id_magFisico as id_magFisico,M.id_articoloFilatoColore as id_artmov, A.id_articoloFilatoColore,A.id_articoloFilato,A.id_ColoreFilato, M.id_clifor, M.seriale, SUM(segnoMov*kg) as quantitaAfc, SUM(segnoMov*kg) as kg, SUM(segnoMov*mt) as mt, SUM(segnoMov*nr) as nr, B.id_tipo,B.percSconto,B.id_iva,B.prezzoOfferta,B.prezzoPubblico FROM RIGA_DOCUMENTO AS M INNER JOIN ARTICOLO_FILATO_COLORE AS A ON A.id_articoloFilatoColore=M.id_articoloFilatoColore inner join ARTICOLO_FILATO AS B ON A.id_articoloFilato=B.id_articoloFilato";
|
||||
String s_Sql_GrouBy = " group by M.id_articoloFilatoColore, M.id_clifor, M.seriale ,M.id_magFisico ";
|
||||
String s_Sql_Having = " HAVING ( kg>0 and A.id_articoloFilatoColore>0 and M.seriale is not null ) ";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
String star = "";
|
||||
String temp = CR.getSearchTxt().trim();
|
||||
StringTokenizer st = new StringTokenizer(temp.trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = star + star;
|
||||
token = prepareInputMySqlString(token, false);
|
||||
token = token.replace("*", "%");
|
||||
txt.append("(B.descrizione like '%" + token + "%' )");
|
||||
if (st.hasMoreTokens()) {
|
||||
txt.append(" and ");
|
||||
star = "%";
|
||||
}
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
if (isDeleteLogic())
|
||||
if (CR.getFlgShowDeleteLogic() == 0L) {
|
||||
wc.addWc("A.dataFineVld is null");
|
||||
} else {
|
||||
wc.addWc("A.dataFineVld is not null");
|
||||
}
|
||||
if (CR.getId_clifor() != 0L && CR.getMagFisico().getFlgTipo() == 0L) {
|
||||
wc.addWc("(M.id_clifor=" + CR.getId_clifor() + ")");
|
||||
} else {
|
||||
wc.addWc("(M.id_clifor=0 or M.id_clifor is null )");
|
||||
}
|
||||
if (CR.getId_magFisico() > 0L)
|
||||
wc.addWc(" M.id_magFisico=" + CR.getId_magFisico());
|
||||
String s_Sql_Find1 = "select 0 as id_magFisico, 0 as id_artmov, A.id_articoloFilatoColore,A.id_articoloFilato,A.id_ColoreFilato,0 as id_clifor,null as seriale,0 as quantitaAfc,0 as kg, 0 as mt, 0 as nr, B.id_tipo,B.percSconto,B.id_iva,B.prezzoOfferta,B.prezzoPubblico from ARTICOLO_FILATO_COLORE AS A inner join ARTICOLO_FILATO AS B ON A.id_articoloFilato=B.id_articoloFilato inner join TIPO as T on B.id_tipo=T.id_tipo";
|
||||
String s_Sql_Order = " ";
|
||||
WcString wc1 = new WcString();
|
||||
wc1.addWc("(T.flgTipoMagazzino!=2 AND T.flgTipoMagazzino!=3)");
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
String star = "";
|
||||
String temp = CR.getSearchTxt().trim();
|
||||
StringTokenizer st = new StringTokenizer(temp.trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = star + star;
|
||||
token = prepareInputMySqlString(token, false);
|
||||
token = token.replace("*", "%");
|
||||
txt.append("(B.descrizione like '%" + token + "%')");
|
||||
if (st.hasMoreTokens()) {
|
||||
txt.append(" and ");
|
||||
star = "%";
|
||||
}
|
||||
}
|
||||
txt.append(")");
|
||||
wc1.addWc(txt.toString());
|
||||
}
|
||||
if (isDeleteLogic())
|
||||
if (CR.getFlgShowDeleteLogic() == 0L) {
|
||||
wc1.addWc("A.dataFineVld is null");
|
||||
} else {
|
||||
wc1.addWc("A.dataFineVld is not null");
|
||||
}
|
||||
wc1.addWc(" (A.flgDispo > 0 ) ");
|
||||
PreparedStatement stmt = getConn().prepareStatement("(" + sql + wc.toString() + s_Sql_GrouBy + s_Sql_Having + ") union (" + s_Sql_Find1 +
|
||||
wc1.toString() + s_Sql_Order + ")");
|
||||
return findRows(stmt, pageNumber, 50);
|
||||
} catch (SQLException e) {
|
||||
handleDebug(e);
|
||||
e.printStackTrace();
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void calcolaQuantita() {
|
||||
if ((!isQuantitaCalcolate() ? true : false) & ((this.id_articoloFilatoColore != 0L) ? true : false)) {
|
||||
long l_flgDispo;
|
||||
RigaDocumento rd = new RigaDocumento(getApFull());
|
||||
rd.findMagFilatoDisponibilita(getId_articoloFilatoColore(), 0L, 0L, null, 0L, 0L, 0L, null);
|
||||
double q = rd.getQuantita();
|
||||
double nr = rd.getNr();
|
||||
double kg = rd.getKg();
|
||||
double mt = rd.getMt();
|
||||
setQuantitaAfcW(q);
|
||||
setQuantitaAfc(q);
|
||||
setQuantitaImpegnata(new RigaDocumento(getApFull())
|
||||
.getQuantitaImpegnataFilatoByArticoloFilatoColoreSeriale(getId_articoloFilatoColore(), 0L, 0L, ""));
|
||||
double q1 = new RigaDocumento(getApFull()).getQuantitaFilatoInArrivoByArticoloFilatoColoreSeriale(getId_articoloFilatoColore(), 0L, 0L, "");
|
||||
setQuantitaInArrivo(q1);
|
||||
if (getArticoloFilato().usaMagazzino()) {
|
||||
DoubleOperator dop = new DoubleOperator(q);
|
||||
dop.add(this.quantitaInArrivo);
|
||||
dop.subtract(this.quantitaImpegnata);
|
||||
setQuantitaEffettiva(dop.getResult());
|
||||
}
|
||||
this.quantitaMagazzinoMovimentoHtml = Articolo.getMovimentoHtmlDesc(getTipologiaArticolo(), q, nr, kg, mt, this.quantitaInArrivo, this.quantitaImpegnata, this.quantitaEffettiva,
|
||||
getArticoloFilato().usaMagazzino(),
|
||||
getParm("USA_MAGAZZINO").isTrue(), getNf());
|
||||
if (!getArticoloFilato().usaMagazzino()) {
|
||||
l_flgDispo = 1L;
|
||||
} else {
|
||||
l_flgDispo = (this.quantitaAfc > 0.0D) ? 1L : 0L;
|
||||
}
|
||||
String temp = "update ARTICOLO_FILATO_COLORE set quantitaMagazzinoMovimentoHtml='" + this.quantitaMagazzinoMovimentoHtml + "', quantitaAfc=" + this.quantitaAfc + ", quantitaEffettiva=" + this.quantitaEffettiva + ", quantitaImpegnata=" + this.quantitaImpegnata + ", quantitaCalcolate=true, flgDispo=" + l_flgDispo + " where id_articoloFilatoColore=" +
|
||||
|
||||
|
||||
getId_articoloFilatoColore();
|
||||
update(temp);
|
||||
setQuantitaCalcolate(true);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isQuantitaCalcolate() {
|
||||
return this.quantitaCalcolate;
|
||||
}
|
||||
|
||||
public void setQuantitaCalcolate(boolean quantitaCalcolate) {
|
||||
this.quantitaCalcolate = quantitaCalcolate;
|
||||
}
|
||||
|
||||
public String getQuantitaMagazzinoMovimentoHtml() {
|
||||
if (getParm("USA_MAGAZZINO").isTrue())
|
||||
return "--";
|
||||
if (!isQuantitaCalcolate() && this.id_articoloFilatoColore != 0L)
|
||||
calcolaQuantita();
|
||||
return (this.quantitaMagazzinoMovimentoHtml == null) ? "" : this.quantitaMagazzinoMovimentoHtml;
|
||||
}
|
||||
|
||||
public void setQuantitaMagazzinoMovimentoHtml(String quantitaMagazzinoMovimentoHtml) {
|
||||
this.quantitaMagazzinoMovimentoHtml = quantitaMagazzinoMovimentoHtml;
|
||||
}
|
||||
|
||||
public String getDescrizioneCompleta() {
|
||||
if (getId_articoloFilato() == 0L)
|
||||
return "";
|
||||
return getArticoloFilato().getDescrizione() + " - " + getArticoloFilato().getDescrizione();
|
||||
}
|
||||
|
||||
public double getQuantitaInArrivo() {
|
||||
if (!isQuantitaCalcolate() && this.id_articoloFilatoColore != 0L)
|
||||
calcolaQuantita();
|
||||
return this.quantitaInArrivo;
|
||||
}
|
||||
|
||||
public void setQuantitaInArrivo(double quantitaInArrivo) {
|
||||
this.quantitaInArrivo = quantitaInArrivo;
|
||||
}
|
||||
|
||||
public double getQuantitaImpegnata() {
|
||||
if (!isQuantitaCalcolate() && this.id_articoloFilatoColore != 0L)
|
||||
calcolaQuantita();
|
||||
return this.quantitaImpegnata;
|
||||
}
|
||||
|
||||
public void setQuantitaImpegnata(double quantitaImpegnata) {
|
||||
this.quantitaImpegnata = quantitaImpegnata;
|
||||
}
|
||||
|
||||
public TipologiaArticolo getTipologiaArticolo() {
|
||||
return getArticoloFilato().getTipo().getTipologiaArticolo();
|
||||
}
|
||||
|
||||
public double getQuantitaEffettiva() {
|
||||
if (!isQuantitaCalcolate() && this.id_articoloFilatoColore != 0L)
|
||||
calcolaQuantita();
|
||||
return this.quantitaEffettiva;
|
||||
}
|
||||
|
||||
public void setQuantitaEffettiva(double quantitaEffettiva) {
|
||||
this.quantitaEffettiva = quantitaEffettiva;
|
||||
}
|
||||
|
||||
public long getFlgDispo() {
|
||||
return this.flgDispo;
|
||||
}
|
||||
|
||||
public void setFlgDispo(long flgDispo) {
|
||||
this.flgDispo = flgDispo;
|
||||
}
|
||||
|
||||
public Iva getIva(it.acxent.anag.Clifor l_clifor) {
|
||||
return getArticoloFilato().getIva(l_clifor);
|
||||
}
|
||||
|
||||
public long getId_iva(it.acxent.anag.Clifor l_clifor) {
|
||||
return getArticoloFilato().getId_iva(l_clifor);
|
||||
}
|
||||
|
||||
public boolean isUsaSeriale() {
|
||||
return (getArticoloFilato().getTipo().getFlgTipoMagazzino() == 2L);
|
||||
}
|
||||
|
||||
public boolean isUsaMagazzino() {
|
||||
return (isUsaLotti() || isUsaSeriale());
|
||||
}
|
||||
|
||||
public ResParm superSave() {
|
||||
return save();
|
||||
}
|
||||
|
||||
public boolean isUsaLotti() {
|
||||
return (getArticoloFilato().getTipo().getFlgTipoMagazzino() == 3L);
|
||||
}
|
||||
|
||||
public String getSeriale() {
|
||||
return (this.seriale == null) ? "" : this.seriale.trim();
|
||||
}
|
||||
|
||||
public void setSeriale(String seriale) {
|
||||
this.seriale = seriale;
|
||||
}
|
||||
|
||||
public void setQuantitaAfc(double quantita) {
|
||||
this.quantitaAfc = quantita;
|
||||
}
|
||||
|
||||
protected void fillFields(ResultSet rst) {
|
||||
super.fillFields(rst);
|
||||
try {
|
||||
if (isColumnInResultSet(rst, "seriale"))
|
||||
setSeriale(rst.getString("seriale"));
|
||||
if (isColumnInResultSet(rst, "id_magFisico"))
|
||||
setId_magFisico(rst.getLong("id_magFisico"));
|
||||
if (isColumnInResultSet(rst, "quantitaAfc"))
|
||||
setQuantitaAfc(rst.getDouble("quantitaAfc"));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public Vectumerator<ArticoloFilatoColore> findByCRDispoMagazzino(ArticoloFilatoColoreCR CR, int pageNumber, int pageRows) {
|
||||
try {
|
||||
String sql = "SELECT M.id_magFisico, M.id_articoloFilatoColore as id_artmov, A.id_articoloFilatoColore,A.id_articoloFilato,A.id_ColoreFilato, M.id_clifor, M.seriale, SUM(segnoMov*kg) as quantitaAfc, SUM(segnoMov*kg) as kg, SUM(segnoMov*mt) as mt, SUM(segnoMov*nr) as nr, B.id_tipo,B.percSconto,B.id_iva,B.prezzoOfferta,B.prezzoPubblico FROM RIGA_DOCUMENTO AS M INNER JOIN ARTICOLO_FILATO_COLORE AS A ON A.id_articoloFilatoColore=M.id_articoloFilatoColore inner join ARTICOLO_FILATO AS B ON A.id_articoloFilato=B.id_articoloFilato";
|
||||
String s_Sql_GrouBy = " group by M.id_articoloFilatoColore, M.id_clifor, M.seriale ,M.id_magFisico";
|
||||
String s_Sql_Having = " HAVING ( kg>0 and A.id_articoloFilatoColore>0 and M.seriale is not null ) ";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
String star = "";
|
||||
String temp = CR.getSearchTxt().trim();
|
||||
StringTokenizer st = new StringTokenizer(temp.trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = star + star;
|
||||
token = prepareInputMySqlString(token, false);
|
||||
token = token.replace("*", "%");
|
||||
txt.append("(B.descrizione like '%" + token + "%' )");
|
||||
if (st.hasMoreTokens()) {
|
||||
txt.append(" and ");
|
||||
star = "%";
|
||||
}
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
if (isDeleteLogic())
|
||||
if (CR.getFlgShowDeleteLogic() == 0L) {
|
||||
wc.addWc("A.dataFineVld is null");
|
||||
} else {
|
||||
wc.addWc("A.dataFineVld is not null");
|
||||
}
|
||||
if (CR.getId_clifor() != 0L && CR.getMagFisico().getFlgTipo() != 1L) {
|
||||
wc.addWc("(M.id_clifor=" + CR.getId_clifor() + ")");
|
||||
} else {
|
||||
wc.addWc("(M.id_clifor=0 or M.id_clifor is null )");
|
||||
}
|
||||
if (CR.getId_magFisico() > 0L)
|
||||
wc.addWc(" M.id_magFisico=" + CR.getId_magFisico());
|
||||
if (CR.getId_articoloFilato() > 0L)
|
||||
wc.addWc(" A.id_articoloFilato=" + CR.getId_articoloFilato());
|
||||
if (CR.getId_articoloFilatoColore() > 0L)
|
||||
wc.addWc(" M.id_articoloFilatoColore=" + CR.getId_articoloFilatoColore());
|
||||
PreparedStatement stmt = getConn().prepareStatement(sql + sql + wc.toString() + s_Sql_GrouBy);
|
||||
return findRows(stmt, pageNumber, 50);
|
||||
} catch (SQLException e) {
|
||||
handleDebug(e);
|
||||
e.printStackTrace();
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public double getRealTimeQuantitaImpegnata() {
|
||||
return new RigaDocumento(getApFull()).getQuantitaImpegnataFilatoByArticoloFilatoColoreSeriale(getId_articoloFilatoColore(), 0L, 0L,
|
||||
getSeriale());
|
||||
}
|
||||
|
||||
public double getRealTimeQuantitaInArrivo() {
|
||||
double q1 = new RigaDocumento(getApFull()).getQuantitaFilatoInArrivoByArticoloFilatoColoreSeriale(getId_articoloFilatoColore(), 0L, 0L,
|
||||
getSeriale());
|
||||
return q1;
|
||||
}
|
||||
|
||||
public void resetCalcoloQuantita() {
|
||||
if (getId_articoloFilatoColore() > 0L) {
|
||||
update("update ARTICOLO_FILATO_COLORE set quantitaCalcolate=false where id_articoloFilatoColore=" +
|
||||
getId_articoloFilatoColore());
|
||||
setQuantitaCalcolate(false);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean usaMagazzino() {
|
||||
if (getArticoloFilato().getTipo().getFlgTipoMagazzino() == 9L ||
|
||||
getArticoloFilato().getTipo().getFlgTipoMagazzino() == 0L)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public double getQuantitaV() {
|
||||
return this.quantitaAfc;
|
||||
}
|
||||
|
||||
public double getQuantitaAfc(Date data) {
|
||||
if (!usaMagazzino())
|
||||
return 0.0D;
|
||||
if (getParm("USA_MAGAZZINO").isFalse()) {
|
||||
RigaDocumento rd = new RigaDocumento(getApFull());
|
||||
rd.findMagFilatoDisponibilita(getId_articoloFilatoColore(), 0L, 0L, getSeriale(), 0L,
|
||||
getId_magFisico(), 0L, data);
|
||||
return rd.getQuantita();
|
||||
}
|
||||
return this.quantitaAfc;
|
||||
}
|
||||
|
||||
public double getQuantitaData(Date data) {
|
||||
if (!isQuantitaDataCalcolate()) {
|
||||
this.quantitaData = getQuantitaAfc(data);
|
||||
setQuantitaDataCalcolate(true);
|
||||
}
|
||||
return this.quantitaData;
|
||||
}
|
||||
|
||||
public boolean isQuantitaDataCalcolate() {
|
||||
return this.quantitaDataCalcolate;
|
||||
}
|
||||
|
||||
public void setQuantitaDataCalcolate(boolean quantitaDataCalcolate) {
|
||||
this.quantitaDataCalcolate = quantitaDataCalcolate;
|
||||
}
|
||||
|
||||
public double getQuantitaData() {
|
||||
return this.quantitaData;
|
||||
}
|
||||
|
||||
public void setQuantitaData(double quantitaData) {
|
||||
this.quantitaData = quantitaData;
|
||||
}
|
||||
|
||||
public double getQuantitaAfc() {
|
||||
return getQuantitaAfc(null);
|
||||
}
|
||||
|
||||
public long getId_magFisico() {
|
||||
return this.id_magFisico;
|
||||
}
|
||||
|
||||
public void setId_magFisico(long id_magFisico) {
|
||||
this.id_magFisico = id_magFisico;
|
||||
setMagFisico(null);
|
||||
}
|
||||
|
||||
public MagFisico getMagFisico() {
|
||||
this.magFisico = (MagFisico)getSecondaryObject(this.magFisico, MagFisico.class, getId_magFisico());
|
||||
return this.magFisico;
|
||||
}
|
||||
|
||||
public void setMagFisico(MagFisico magFisico) {
|
||||
this.magFisico = magFisico;
|
||||
}
|
||||
|
||||
public double getQuantitaAfcW() {
|
||||
if (!isQuantitaCalcolate() && this.id_articoloFilatoColore != 0L)
|
||||
calcolaQuantita();
|
||||
return this.quantitaAfcW;
|
||||
}
|
||||
|
||||
public void setQuantitaAfcW(double quantitaAfcW) {
|
||||
this.quantitaAfcW = quantitaAfcW;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,134 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.anag.MagFisico;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ArticoloFilatoColoreCR extends CRAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1468228166501L;
|
||||
|
||||
private long id_articoloFilatoColore;
|
||||
|
||||
private long id_articoloFilato;
|
||||
|
||||
private long id_coloreFilato;
|
||||
|
||||
private double perc;
|
||||
|
||||
private ArticoloFilato articoloFilato;
|
||||
|
||||
private ColoreFilato coloreFilato;
|
||||
|
||||
private long flgTipoRicerca = 0L;
|
||||
|
||||
private long id_clifor;
|
||||
|
||||
private long id_magFisico;
|
||||
|
||||
private MagFisico magFisico;
|
||||
|
||||
private it.acxent.anag.Clifor clifor;
|
||||
|
||||
public ArticoloFilatoColoreCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloFilatoColoreCR() {}
|
||||
|
||||
public long getId_articoloFilatoColore() {
|
||||
return this.id_articoloFilatoColore;
|
||||
}
|
||||
|
||||
public void setId_articoloFilatoColore(long id_articoloFilatoColore) {
|
||||
this.id_articoloFilatoColore = id_articoloFilatoColore;
|
||||
}
|
||||
|
||||
public void setId_articoloFilato(long newId_articoloFilato) {
|
||||
this.id_articoloFilato = newId_articoloFilato;
|
||||
setArticoloFilato(null);
|
||||
}
|
||||
|
||||
public void setId_coloreFilato(long newId_coloreFilato) {
|
||||
this.id_coloreFilato = newId_coloreFilato;
|
||||
setColoreFilato(null);
|
||||
}
|
||||
|
||||
public void setPerc(double newPerc) {
|
||||
this.perc = newPerc;
|
||||
}
|
||||
|
||||
public long getId_articoloFilato() {
|
||||
return this.id_articoloFilato;
|
||||
}
|
||||
|
||||
public long getId_coloreFilato() {
|
||||
return this.id_coloreFilato;
|
||||
}
|
||||
|
||||
public double getPerc() {
|
||||
return this.perc;
|
||||
}
|
||||
|
||||
public void setArticoloFilato(ArticoloFilato newArticoloFilato) {
|
||||
this.articoloFilato = newArticoloFilato;
|
||||
}
|
||||
|
||||
public ArticoloFilato getArticoloFilato() {
|
||||
this.articoloFilato = (ArticoloFilato)getSecondaryObject(this.articoloFilato, ArticoloFilato.class, getId_articoloFilato());
|
||||
return this.articoloFilato;
|
||||
}
|
||||
|
||||
public void setColoreFilato(ColoreFilato newColoreFilato) {
|
||||
this.coloreFilato = newColoreFilato;
|
||||
}
|
||||
|
||||
public ColoreFilato getColoreFilato() {
|
||||
this.coloreFilato = (ColoreFilato)getSecondaryObject(this.coloreFilato, ColoreFilato.class, getId_coloreFilato());
|
||||
return this.coloreFilato;
|
||||
}
|
||||
|
||||
public long getFlgTipoRicerca() {
|
||||
return this.flgTipoRicerca;
|
||||
}
|
||||
|
||||
public void setFlgTipoRicerca(long flgTipoRicerca) {
|
||||
this.flgTipoRicerca = flgTipoRicerca;
|
||||
}
|
||||
|
||||
public long getId_clifor() {
|
||||
return this.id_clifor;
|
||||
}
|
||||
|
||||
public void setId_clifor(long id_clifor) {
|
||||
this.id_clifor = id_clifor;
|
||||
setClifor(null);
|
||||
}
|
||||
|
||||
public long getId_magFisico() {
|
||||
return this.id_magFisico;
|
||||
}
|
||||
|
||||
public void setId_magFisico(long id_magFisico) {
|
||||
this.id_magFisico = id_magFisico;
|
||||
setMagFisico(null);
|
||||
}
|
||||
|
||||
public MagFisico getMagFisico() {
|
||||
this.magFisico = (MagFisico)getSecondaryObject(this.magFisico, MagFisico.class, new Long(getId_magFisico()));
|
||||
return this.magFisico;
|
||||
}
|
||||
|
||||
public void setMagFisico(MagFisico magFisico) {
|
||||
this.magFisico = magFisico;
|
||||
}
|
||||
|
||||
public it.acxent.anag.Clifor getClifor() {
|
||||
this.clifor = (it.acxent.anag.Clifor)getSecondaryObject(this.clifor, it.acxent.anag.Clifor.class, getId_clifor());
|
||||
return this.clifor;
|
||||
}
|
||||
|
||||
public void setClifor(it.acxent.anag.Clifor clifor) {
|
||||
this.clifor = clifor;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
public class ArticoloFilatoColoreRitorto extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1468228166501L;
|
||||
|
||||
private long id_articoloFilatoColoreRitorto;
|
||||
|
||||
private long id_articoloFilatoTestata;
|
||||
|
||||
private long id_coloreFilatoTestata;
|
||||
|
||||
private long id_articoloFilato;
|
||||
|
||||
private long id_coloreFilato;
|
||||
|
||||
private double perc;
|
||||
|
||||
private ArticoloFilato articoloFilatoTestata;
|
||||
|
||||
private ColoreFilato coloreFilatoTestata;
|
||||
|
||||
private ArticoloFilato articoloFilato;
|
||||
|
||||
private ColoreFilato coloreFilato;
|
||||
|
||||
public ArticoloFilatoColoreRitorto(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloFilatoColoreRitorto() {}
|
||||
|
||||
public void setId_articoloFilatoColoreRitorto(long newId_articoloFilatoColoreRitorto) {
|
||||
this.id_articoloFilatoColoreRitorto = newId_articoloFilatoColoreRitorto;
|
||||
}
|
||||
|
||||
public void setId_articoloFilatoTestata(long newId_articoloFilatoTestata) {
|
||||
this.id_articoloFilatoTestata = newId_articoloFilatoTestata;
|
||||
setArticoloFilato(null);
|
||||
}
|
||||
|
||||
public void setId_coloreFilatoTestata(long newId_coloreFilatoTestata) {
|
||||
this.id_coloreFilatoTestata = newId_coloreFilatoTestata;
|
||||
setColoreFilato(null);
|
||||
}
|
||||
|
||||
public void setId_articoloFilato(long newId_articoloFilato) {
|
||||
this.id_articoloFilato = newId_articoloFilato;
|
||||
setArticoloFilato(null);
|
||||
}
|
||||
|
||||
public void setId_coloreFilato(long newId_coloreFilato) {
|
||||
this.id_coloreFilato = newId_coloreFilato;
|
||||
setColoreFilato(null);
|
||||
}
|
||||
|
||||
public void setPerc(double newPerc) {
|
||||
this.perc = newPerc;
|
||||
}
|
||||
|
||||
public long getId_articoloFilatoColoreRitorto() {
|
||||
return this.id_articoloFilatoColoreRitorto;
|
||||
}
|
||||
|
||||
public long getId_articoloFilatoTestata() {
|
||||
return this.id_articoloFilatoTestata;
|
||||
}
|
||||
|
||||
public long getId_coloreFilatoTestata() {
|
||||
return this.id_coloreFilatoTestata;
|
||||
}
|
||||
|
||||
public long getId_articoloFilato() {
|
||||
return this.id_articoloFilato;
|
||||
}
|
||||
|
||||
public long getId_coloreFilato() {
|
||||
return this.id_coloreFilato;
|
||||
}
|
||||
|
||||
public double getPerc() {
|
||||
return this.perc;
|
||||
}
|
||||
|
||||
public void setArticoloFilatoTestata(ArticoloFilato newArticoloFilatoTestata) {
|
||||
this.articoloFilatoTestata = newArticoloFilatoTestata;
|
||||
}
|
||||
|
||||
public ArticoloFilato getArticoloFilatoTestata() {
|
||||
this.articoloFilatoTestata = (ArticoloFilato)getSecondaryObject(this.articoloFilatoTestata, ArticoloFilato.class,
|
||||
getId_articoloFilatoTestata());
|
||||
return this.articoloFilatoTestata;
|
||||
}
|
||||
|
||||
public void setColoreFilatoTestata(ColoreFilato newColoreFilatoTestata) {
|
||||
this.coloreFilatoTestata = newColoreFilatoTestata;
|
||||
}
|
||||
|
||||
public ColoreFilato getColoreFilatoTestata() {
|
||||
this.coloreFilatoTestata = (ColoreFilato)getSecondaryObject(this.coloreFilatoTestata, ColoreFilato.class, getId_coloreFilatoTestata());
|
||||
return this.coloreFilatoTestata;
|
||||
}
|
||||
|
||||
public void setArticoloFilato(ArticoloFilato newArticoloFilato) {
|
||||
this.articoloFilato = newArticoloFilato;
|
||||
}
|
||||
|
||||
public ArticoloFilato getArticoloFilato() {
|
||||
this.articoloFilato = (ArticoloFilato)getSecondaryObject(this.articoloFilato, ArticoloFilato.class, getId_articoloFilato());
|
||||
return this.articoloFilato;
|
||||
}
|
||||
|
||||
public void setColoreFilato(ColoreFilato newColoreFilato) {
|
||||
this.coloreFilato = newColoreFilato;
|
||||
}
|
||||
|
||||
public ColoreFilato getColoreFilato() {
|
||||
this.coloreFilato = (ColoreFilato)getSecondaryObject(this.coloreFilato, ColoreFilato.class, getId_coloreFilato());
|
||||
return this.coloreFilato;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<ArticoloFilatoColoreRitorto> findByCR(ArticoloFilatoColoreRitortoCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_FILATO_COLORE_RITORTO AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
public class ArticoloFilatoColoreRitortoCR extends CRAdapter {
|
||||
private long id_articoloFilatoColoreRitorto;
|
||||
|
||||
private long id_articoloFilatoTestata;
|
||||
|
||||
private long id_coloreFilatoTestata;
|
||||
|
||||
private long id_articoloFilato;
|
||||
|
||||
private long id_coloreFilato;
|
||||
|
||||
private double perc;
|
||||
|
||||
private ArticoloFilato articoloFilatoTestata;
|
||||
|
||||
private ColoreFilato coloreFilatoTestata;
|
||||
|
||||
private ArticoloFilato articoloFilato;
|
||||
|
||||
private ColoreFilato coloreFilato;
|
||||
|
||||
public ArticoloFilatoColoreRitortoCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloFilatoColoreRitortoCR() {}
|
||||
|
||||
public void setId_articoloFilatoColoreRitorto(long newId_articoloFilatoColoreRitorto) {
|
||||
this.id_articoloFilatoColoreRitorto = newId_articoloFilatoColoreRitorto;
|
||||
}
|
||||
|
||||
public void setId_articoloFilatoTestata(long newId_articoloFilatoTestata) {
|
||||
this.id_articoloFilatoTestata = newId_articoloFilatoTestata;
|
||||
setArticoloFilatoTestata(null);
|
||||
}
|
||||
|
||||
public void setId_coloreFilatoTestata(long newId_coloreFilatoTestata) {
|
||||
this.id_coloreFilatoTestata = newId_coloreFilatoTestata;
|
||||
setColoreFilatoTestata(null);
|
||||
}
|
||||
|
||||
public void setId_articoloFilato(long newId_articoloFilato) {
|
||||
this.id_articoloFilato = newId_articoloFilato;
|
||||
setArticoloFilato(null);
|
||||
}
|
||||
|
||||
public void setId_coloreFilato(long newId_coloreFilato) {
|
||||
this.id_coloreFilato = newId_coloreFilato;
|
||||
setColoreFilato(null);
|
||||
}
|
||||
|
||||
public void setPerc(double newPerc) {
|
||||
this.perc = newPerc;
|
||||
}
|
||||
|
||||
public long getId_articoloFilatoColoreRitorto() {
|
||||
return this.id_articoloFilatoColoreRitorto;
|
||||
}
|
||||
|
||||
public long getId_articoloFilatoTestata() {
|
||||
return this.id_articoloFilatoTestata;
|
||||
}
|
||||
|
||||
public long getId_coloreFilatoTestata() {
|
||||
return this.id_coloreFilatoTestata;
|
||||
}
|
||||
|
||||
public long getId_articoloFilato() {
|
||||
return this.id_articoloFilato;
|
||||
}
|
||||
|
||||
public long getId_coloreFilato() {
|
||||
return this.id_coloreFilato;
|
||||
}
|
||||
|
||||
public double getPerc() {
|
||||
return this.perc;
|
||||
}
|
||||
|
||||
public void setArticoloFilatoTestata(ArticoloFilato newArticoloFilatoTestata) {
|
||||
this.articoloFilatoTestata = newArticoloFilatoTestata;
|
||||
}
|
||||
|
||||
public ArticoloFilato getArticoloFilatoTestata() {
|
||||
this.articoloFilatoTestata = (ArticoloFilato)getSecondaryObject(this.articoloFilatoTestata, ArticoloFilato.class,
|
||||
|
||||
getId_articoloFilatoTestata());
|
||||
return this.articoloFilatoTestata;
|
||||
}
|
||||
|
||||
public void setColoreFilatoTestata(ColoreFilato newColoreFilatoTestata) {
|
||||
this.coloreFilatoTestata = newColoreFilatoTestata;
|
||||
}
|
||||
|
||||
public ColoreFilato getColoreFilatoTestata() {
|
||||
this.coloreFilatoTestata = (ColoreFilato)getSecondaryObject(this.coloreFilatoTestata, ColoreFilato.class,
|
||||
|
||||
getId_coloreFilatoTestata());
|
||||
return this.coloreFilatoTestata;
|
||||
}
|
||||
|
||||
public void setArticoloFilato(ArticoloFilato newArticoloFilato) {
|
||||
this.articoloFilato = newArticoloFilato;
|
||||
}
|
||||
|
||||
public ArticoloFilato getArticoloFilato() {
|
||||
this.articoloFilato = (ArticoloFilato)getSecondaryObject(this.articoloFilato, ArticoloFilato.class,
|
||||
|
||||
getId_articoloFilato());
|
||||
return this.articoloFilato;
|
||||
}
|
||||
|
||||
public void setColoreFilato(ColoreFilato newColoreFilato) {
|
||||
this.coloreFilato = newColoreFilato;
|
||||
}
|
||||
|
||||
public ColoreFilato getColoreFilato() {
|
||||
this.coloreFilato = (ColoreFilato)getSecondaryObject(this.coloreFilato, ColoreFilato.class,
|
||||
|
||||
getId_coloreFilato());
|
||||
return this.coloreFilato;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,164 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.art.Componente;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.DoubleOperator;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
public class ArticoloFilatoComponente extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1468228166523L;
|
||||
|
||||
private long id_articoloFilatoComponente;
|
||||
|
||||
private long id_componente;
|
||||
|
||||
private long id_articoloFilato;
|
||||
|
||||
private double percentuale;
|
||||
|
||||
private Componente componente;
|
||||
|
||||
private ArticoloFilato articoloFilato;
|
||||
|
||||
public ArticoloFilatoComponente(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloFilatoComponente() {}
|
||||
|
||||
public void setId_articoloFilatoComponente(long newId_articoloFilatoComponente) {
|
||||
this.id_articoloFilatoComponente = newId_articoloFilatoComponente;
|
||||
}
|
||||
|
||||
public void setId_componente(long newId_componente) {
|
||||
this.id_componente = newId_componente;
|
||||
setComponente(null);
|
||||
}
|
||||
|
||||
public void setId_articoloFilato(long newId_articoloFilato) {
|
||||
this.id_articoloFilato = newId_articoloFilato;
|
||||
setArticoloFilato(null);
|
||||
}
|
||||
|
||||
public void setPercentuale(double newPercentuale) {
|
||||
this.percentuale = newPercentuale;
|
||||
}
|
||||
|
||||
public long getId_articoloFilatoComponente() {
|
||||
return this.id_articoloFilatoComponente;
|
||||
}
|
||||
|
||||
public long getId_componente() {
|
||||
return this.id_componente;
|
||||
}
|
||||
|
||||
public long getId_articoloFilato() {
|
||||
return this.id_articoloFilato;
|
||||
}
|
||||
|
||||
public double getPercentuale() {
|
||||
return this.percentuale;
|
||||
}
|
||||
|
||||
public void setComponente(Componente newComponente) {
|
||||
this.componente = newComponente;
|
||||
}
|
||||
|
||||
public Componente getComponente() {
|
||||
this.componente = (Componente)getSecondaryObject(this.componente, Componente.class, getId_componente());
|
||||
return this.componente;
|
||||
}
|
||||
|
||||
public void setArticoloFilato(ArticoloFilato newArticoloFilato) {
|
||||
this.articoloFilato = newArticoloFilato;
|
||||
}
|
||||
|
||||
public ArticoloFilato getArticoloFilato() {
|
||||
this.articoloFilato = (ArticoloFilato)getSecondaryObject(this.articoloFilato, ArticoloFilato.class, getId_articoloFilato());
|
||||
return this.articoloFilato;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<ArticoloFilatoComponente> findByCR(ArticoloFilatoComponenteCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_FILATO_COMPONENTE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public Vectumerator<ArticoloFilatoComponente> findByArticoloFilato(long l_id_articoloFilato) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_FILATO_COMPONENTE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc(" A.id_articoloFilato = " + l_id_articoloFilato);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, 0, 0);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public ResParm save() {
|
||||
ResParm rp = isSalvabile();
|
||||
if (rp.getStatus())
|
||||
return super.save();
|
||||
return rp;
|
||||
}
|
||||
|
||||
private ResParm isSalvabile() {
|
||||
boolean checkComponente = false;
|
||||
DoubleOperator dop = new DoubleOperator();
|
||||
ArticoloFilatoComponente afc = new ArticoloFilatoComponente(getApFull());
|
||||
if (getId_articoloFilato() == 0L)
|
||||
return new ResParm(false, "ERRORE! Filato non valido!");
|
||||
if (getPercentuale() == 0.0D)
|
||||
return new ResParm(false, "ERRORE! Percentuale non valida!");
|
||||
Vectumerator<ArticoloFilatoComponente> vec = afc.findByArticoloFilato(getId_articoloFilato());
|
||||
while (vec.hasMoreElements()) {
|
||||
afc = (ArticoloFilatoComponente)vec.nextElement();
|
||||
if (afc.getId_componente() == getId_componente())
|
||||
checkComponente = true;
|
||||
dop.add(afc.getPercentuale());
|
||||
}
|
||||
dop.add(getPercentuale());
|
||||
if (dop.getResult() <= 100.0D && !checkComponente)
|
||||
return new ResParm(true);
|
||||
if (dop.getResult() > 100.0D)
|
||||
return new ResParm(false, "Percentuale errata!");
|
||||
return new ResParm(false, "Componente già selezionato!");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.art.Componente;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
public class ArticoloFilatoComponenteCR extends CRAdapter {
|
||||
private long id_articoloFilatoComponente;
|
||||
|
||||
private long id_componente;
|
||||
|
||||
private long id_articoloFilato;
|
||||
|
||||
private double percentuale;
|
||||
|
||||
private Componente componente;
|
||||
|
||||
private ArticoloFilato articoloFilato;
|
||||
|
||||
public ArticoloFilatoComponenteCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloFilatoComponenteCR() {}
|
||||
|
||||
public void setId_articoloFilatoComponente(long newId_articoloFilatoComponente) {
|
||||
this.id_articoloFilatoComponente = newId_articoloFilatoComponente;
|
||||
}
|
||||
|
||||
public void setId_componente(long newId_componente) {
|
||||
this.id_componente = newId_componente;
|
||||
setComponente(null);
|
||||
}
|
||||
|
||||
public void setId_articoloFilato(long newId_articoloFilato) {
|
||||
this.id_articoloFilato = newId_articoloFilato;
|
||||
setArticoloFilato(null);
|
||||
}
|
||||
|
||||
public void setPercentuale(double newPercentuale) {
|
||||
this.percentuale = newPercentuale;
|
||||
}
|
||||
|
||||
public long getId_articoloFilatoComponente() {
|
||||
return this.id_articoloFilatoComponente;
|
||||
}
|
||||
|
||||
public long getId_componente() {
|
||||
return this.id_componente;
|
||||
}
|
||||
|
||||
public long getId_articoloFilato() {
|
||||
return this.id_articoloFilato;
|
||||
}
|
||||
|
||||
public double getPercentuale() {
|
||||
return this.percentuale;
|
||||
}
|
||||
|
||||
public void setComponente(Componente newComponente) {
|
||||
this.componente = newComponente;
|
||||
}
|
||||
|
||||
public Componente getComponente() {
|
||||
this.componente = (Componente)getSecondaryObject(this.componente, Componente.class,
|
||||
|
||||
getId_componente());
|
||||
return this.componente;
|
||||
}
|
||||
|
||||
public void setArticoloFilato(ArticoloFilato newArticoloFilato) {
|
||||
this.articoloFilato = newArticoloFilato;
|
||||
}
|
||||
|
||||
public ArticoloFilato getArticoloFilato() {
|
||||
this.articoloFilato = (ArticoloFilato)getSecondaryObject(this.articoloFilato, ArticoloFilato.class,
|
||||
|
||||
getId_articoloFilato());
|
||||
return this.articoloFilato;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
public class ArticoloFilatoFornitore extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1468228166546L;
|
||||
|
||||
private long id_articoloFilatoFornitore;
|
||||
|
||||
private long id_articoloFilato;
|
||||
|
||||
private long id_clifor;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private ArticoloFilato articoloFilato;
|
||||
|
||||
private it.acxent.anag.Clifor clifor;
|
||||
|
||||
public ArticoloFilatoFornitore(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloFilatoFornitore() {}
|
||||
|
||||
public void setId_articoloFilatoFornitore(long newId_articoloFilatoFornitore) {
|
||||
this.id_articoloFilatoFornitore = newId_articoloFilatoFornitore;
|
||||
}
|
||||
|
||||
public void setId_articoloFilato(long newId_articoloFilato) {
|
||||
this.id_articoloFilato = newId_articoloFilato;
|
||||
setArticoloFilato(null);
|
||||
}
|
||||
|
||||
public void setId_clifor(long newId_clifor) {
|
||||
this.id_clifor = newId_clifor;
|
||||
setClifor(null);
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public long getId_articoloFilatoFornitore() {
|
||||
return this.id_articoloFilatoFornitore;
|
||||
}
|
||||
|
||||
public long getId_articoloFilato() {
|
||||
return this.id_articoloFilato;
|
||||
}
|
||||
|
||||
public long getId_clifor() {
|
||||
return this.id_clifor;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public void setArticoloFilato(ArticoloFilato newArticoloFilato) {
|
||||
this.articoloFilato = newArticoloFilato;
|
||||
}
|
||||
|
||||
public ArticoloFilato getArticoloFilato() {
|
||||
this.articoloFilato = (ArticoloFilato)getSecondaryObject(this.articoloFilato, ArticoloFilato.class,
|
||||
|
||||
getId_articoloFilato());
|
||||
return this.articoloFilato;
|
||||
}
|
||||
|
||||
public void setClifor(it.acxent.anag.Clifor newClifor) {
|
||||
this.clifor = newClifor;
|
||||
}
|
||||
|
||||
public it.acxent.anag.Clifor getClifor() {
|
||||
this.clifor = (it.acxent.anag.Clifor)getSecondaryObject(this.clifor, it.acxent.anag.Clifor.class,
|
||||
|
||||
getId_clifor());
|
||||
return this.clifor;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<ArticoloFilatoFornitore> findByCR(ArticoloFilatoFornitoreCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_FILATO_FORNITORE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
public class ArticoloFilatoFornitoreCR extends CRAdapter {
|
||||
private long id_articoloFilatoFornitore;
|
||||
|
||||
private long id_articoloFilato;
|
||||
|
||||
private long id_clifor;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private ArticoloFilato articoloFilato;
|
||||
|
||||
private it.acxent.anag.Clifor clifor;
|
||||
|
||||
public ArticoloFilatoFornitoreCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloFilatoFornitoreCR() {}
|
||||
|
||||
public void setId_articoloFilatoFornitore(long newId_articoloFilatoFornitore) {
|
||||
this.id_articoloFilatoFornitore = newId_articoloFilatoFornitore;
|
||||
}
|
||||
|
||||
public void setId_articoloFilato(long newId_articoloFilato) {
|
||||
this.id_articoloFilato = newId_articoloFilato;
|
||||
setArticoloFilato(null);
|
||||
}
|
||||
|
||||
public void setId_clifor(long newId_clifor) {
|
||||
this.id_clifor = newId_clifor;
|
||||
setClifor(null);
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public long getId_articoloFilatoFornitore() {
|
||||
return this.id_articoloFilatoFornitore;
|
||||
}
|
||||
|
||||
public long getId_articoloFilato() {
|
||||
return this.id_articoloFilato;
|
||||
}
|
||||
|
||||
public long getId_clifor() {
|
||||
return this.id_clifor;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public void setArticoloFilato(ArticoloFilato newArticoloFilato) {
|
||||
this.articoloFilato = newArticoloFilato;
|
||||
}
|
||||
|
||||
public ArticoloFilato getArticoloFilato() {
|
||||
this.articoloFilato = (ArticoloFilato)getSecondaryObject(this.articoloFilato, ArticoloFilato.class,
|
||||
|
||||
getId_articoloFilato());
|
||||
return this.articoloFilato;
|
||||
}
|
||||
|
||||
public void setClifor(it.acxent.anag.Clifor newClifor) {
|
||||
this.clifor = newClifor;
|
||||
}
|
||||
|
||||
public it.acxent.anag.Clifor getClifor() {
|
||||
this.clifor = (it.acxent.anag.Clifor)getSecondaryObject(this.clifor, it.acxent.anag.Clifor.class,
|
||||
|
||||
getId_clifor());
|
||||
return this.clifor;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,123 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.StringTokenizer;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class ArticoloTessutoAccoppiato extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1487851616034L;
|
||||
|
||||
private long id_articoloTessutoAccoppiato;
|
||||
|
||||
private long id_articoloTessuto;
|
||||
|
||||
private long id_articoloTessutoComponente;
|
||||
|
||||
private ArticoloTessuto articoloTessuto;
|
||||
|
||||
private ArticoloTessuto articoloTessutoComponente;
|
||||
|
||||
public ArticoloTessutoAccoppiato(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloTessutoAccoppiato() {}
|
||||
|
||||
public void setId_articoloTessutoAccoppiato(long newId_articoloTessutoAccoppiato) {
|
||||
this.id_articoloTessutoAccoppiato = newId_articoloTessutoAccoppiato;
|
||||
}
|
||||
|
||||
public void setId_articoloTessuto(long newId_articoloTessuto) {
|
||||
this.id_articoloTessuto = newId_articoloTessuto;
|
||||
setArticoloTessuto(null);
|
||||
}
|
||||
|
||||
public void setId_articoloTessutoComponente(long newId_articoloTessutoComponente) {
|
||||
this.id_articoloTessutoComponente = newId_articoloTessutoComponente;
|
||||
setArticoloTessutoComponente(null);
|
||||
}
|
||||
|
||||
public long getId_articoloTessutoAccoppiato() {
|
||||
return this.id_articoloTessutoAccoppiato;
|
||||
}
|
||||
|
||||
public long getId_articoloTessuto() {
|
||||
return this.id_articoloTessuto;
|
||||
}
|
||||
|
||||
public long getId_articoloTessutoComponente() {
|
||||
return this.id_articoloTessutoComponente;
|
||||
}
|
||||
|
||||
public void setArticoloTessuto(ArticoloTessuto newArticoloTessuto) {
|
||||
this.articoloTessuto = newArticoloTessuto;
|
||||
}
|
||||
|
||||
public ArticoloTessuto getArticoloTessuto() {
|
||||
this.articoloTessuto = (ArticoloTessuto)getSecondaryObject(this.articoloTessuto, ArticoloTessuto.class, getId_articoloTessuto());
|
||||
return this.articoloTessuto;
|
||||
}
|
||||
|
||||
public void setArticoloTessutoComponente(ArticoloTessuto newArticoloTessutoComponente) {
|
||||
this.articoloTessutoComponente = newArticoloTessutoComponente;
|
||||
}
|
||||
|
||||
public ArticoloTessuto getArticoloTessutoComponente() {
|
||||
this.articoloTessutoComponente = (ArticoloTessuto)getSecondaryObject(this.articoloTessutoComponente, ArticoloTessuto.class,
|
||||
getId_articoloTessutoComponente());
|
||||
return this.articoloTessutoComponente;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<ArticoloTessutoAccoppiato> findByCR(ArticoloTessutoAccoppiatoCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_TESSUTO_ACCOPPIATO AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public Vectumerator<ArticoloTessutoAccoppiato> findByArticoloTessuto(long l_id_articoloTessuto) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_TESSUTO_ACCOPPIATO AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_articoloTessuto=" + l_id_articoloTessuto);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
public class ArticoloTessutoAccoppiatoCR extends CRAdapter {
|
||||
private long id_articoloTessutoAccoppiato;
|
||||
|
||||
private long id_articoloTessuto;
|
||||
|
||||
private long id_articoloTessutoComponente;
|
||||
|
||||
private ArticoloTessuto articoloTessuto;
|
||||
|
||||
private ArticoloTessuto articoloTessutoComponente;
|
||||
|
||||
public ArticoloTessutoAccoppiatoCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloTessutoAccoppiatoCR() {}
|
||||
|
||||
public void setId_articoloTessutoAccoppiato(long newId_articoloTessutoAccoppiato) {
|
||||
this.id_articoloTessutoAccoppiato = newId_articoloTessutoAccoppiato;
|
||||
}
|
||||
|
||||
public void setId_articoloTessuto(long newId_articoloTessuto) {
|
||||
this.id_articoloTessuto = newId_articoloTessuto;
|
||||
setArticoloTessuto(null);
|
||||
}
|
||||
|
||||
public void setId_articoloTessutoComponente(long newId_articoloTessutoComponente) {
|
||||
this.id_articoloTessutoComponente = newId_articoloTessutoComponente;
|
||||
setArticoloTessutoComponente(null);
|
||||
}
|
||||
|
||||
public long getId_articoloTessutoAccoppiato() {
|
||||
return this.id_articoloTessutoAccoppiato;
|
||||
}
|
||||
|
||||
public long getId_articoloTessuto() {
|
||||
return this.id_articoloTessuto;
|
||||
}
|
||||
|
||||
public long getId_articoloTessutoComponente() {
|
||||
return this.id_articoloTessutoComponente;
|
||||
}
|
||||
|
||||
public void setArticoloTessuto(ArticoloTessuto newArticoloTessuto) {
|
||||
this.articoloTessuto = newArticoloTessuto;
|
||||
}
|
||||
|
||||
public ArticoloTessuto getArticoloTessuto() {
|
||||
this.articoloTessuto = (ArticoloTessuto)getSecondaryObject(this.articoloTessuto, ArticoloTessuto.class,
|
||||
|
||||
getId_articoloTessuto());
|
||||
return this.articoloTessuto;
|
||||
}
|
||||
|
||||
public void setArticoloTessutoComponente(ArticoloTessuto newArticoloTessutoComponente) {
|
||||
this.articoloTessutoComponente = newArticoloTessutoComponente;
|
||||
}
|
||||
|
||||
public ArticoloTessuto getArticoloTessutoComponente() {
|
||||
this.articoloTessutoComponente = (ArticoloTessuto)getSecondaryObject(this.articoloTessutoComponente, ArticoloTessuto.class,
|
||||
|
||||
getId_articoloTessutoComponente());
|
||||
return this.articoloTessutoComponente;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,316 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.anag.Iva;
|
||||
import it.acxent.anag.MagFisico;
|
||||
import it.acxent.art.Tipo;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
public class ArticoloTessutoCR extends CRAdapter {
|
||||
private long id_articoloTessuto;
|
||||
|
||||
private long id_iva;
|
||||
|
||||
private long id_stagione;
|
||||
|
||||
private long flgStato;
|
||||
|
||||
private long altezzaMin;
|
||||
|
||||
private long altezzaMax;
|
||||
|
||||
private long lunghezzaFinita;
|
||||
|
||||
private double pesoMin;
|
||||
|
||||
private double pesoMax;
|
||||
|
||||
private double pesoMq;
|
||||
|
||||
private long lavaggio;
|
||||
|
||||
private long candeggio;
|
||||
|
||||
private long stiratura;
|
||||
|
||||
private long asciugatura;
|
||||
|
||||
private long pulituraSecco;
|
||||
|
||||
private String codiceDoganale;
|
||||
|
||||
private long flgUdm;
|
||||
|
||||
private double prezzoBase;
|
||||
|
||||
private Iva iva;
|
||||
|
||||
private Stagione stagione;
|
||||
|
||||
private long flgTipoTessutoM = -1L;
|
||||
|
||||
private long id_tipo;
|
||||
|
||||
private Tipo tipo;
|
||||
|
||||
public static final long TIPO_RICERCA_USA_MAG = 1L;
|
||||
|
||||
public static final long TIPO_RICERCA_VAR = 2L;
|
||||
|
||||
private long flgTipoRicerca = 0L;
|
||||
|
||||
private it.acxent.anag.Clifor clifor;
|
||||
|
||||
private long id_clifor;
|
||||
|
||||
private long id_magFisico;
|
||||
|
||||
private MagFisico magFisico;
|
||||
|
||||
public ArticoloTessutoCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloTessutoCR() {}
|
||||
|
||||
public void setId_articoloTessuto(long newId_articoloTessuto) {
|
||||
this.id_articoloTessuto = newId_articoloTessuto;
|
||||
}
|
||||
|
||||
public void setId_iva(long newId_iva) {
|
||||
this.id_iva = newId_iva;
|
||||
setIva(null);
|
||||
}
|
||||
|
||||
public void setId_stagione(long newId_stagione) {
|
||||
this.id_stagione = newId_stagione;
|
||||
setStagione(null);
|
||||
}
|
||||
|
||||
public void setFlgStato(long newFlgStato) {
|
||||
this.flgStato = newFlgStato;
|
||||
}
|
||||
|
||||
public void setAltezzaMin(long newAltezzaMin) {
|
||||
this.altezzaMin = newAltezzaMin;
|
||||
}
|
||||
|
||||
public void setAltezzaMax(long newAltezzaMax) {
|
||||
this.altezzaMax = newAltezzaMax;
|
||||
}
|
||||
|
||||
public void setLunghezzaFinita(long newLunghezzaFinita) {
|
||||
this.lunghezzaFinita = newLunghezzaFinita;
|
||||
}
|
||||
|
||||
public void setPesoMin(double newPesoMin) {
|
||||
this.pesoMin = newPesoMin;
|
||||
}
|
||||
|
||||
public void setPesoMax(double newPesoMax) {
|
||||
this.pesoMax = newPesoMax;
|
||||
}
|
||||
|
||||
public void setPesoMq(double newPesoMq) {
|
||||
this.pesoMq = newPesoMq;
|
||||
}
|
||||
|
||||
public void setLavaggio(long newLavaggio) {
|
||||
this.lavaggio = newLavaggio;
|
||||
}
|
||||
|
||||
public void setCandeggio(long newCandeggio) {
|
||||
this.candeggio = newCandeggio;
|
||||
}
|
||||
|
||||
public void setStiratura(long newStiratura) {
|
||||
this.stiratura = newStiratura;
|
||||
}
|
||||
|
||||
public void setAsciugatura(long newAsciugatura) {
|
||||
this.asciugatura = newAsciugatura;
|
||||
}
|
||||
|
||||
public void setPulituraSecco(long newPulituraSecco) {
|
||||
this.pulituraSecco = newPulituraSecco;
|
||||
}
|
||||
|
||||
public void setCodiceDoganale(String newCodiceDoganale) {
|
||||
this.codiceDoganale = newCodiceDoganale;
|
||||
}
|
||||
|
||||
public void setFlgUdm(long newFlgUdm) {
|
||||
this.flgUdm = newFlgUdm;
|
||||
}
|
||||
|
||||
public void setPrezzoBase(double newPrezzoBase) {
|
||||
this.prezzoBase = newPrezzoBase;
|
||||
}
|
||||
|
||||
public long getId_articoloTessuto() {
|
||||
return this.id_articoloTessuto;
|
||||
}
|
||||
|
||||
public long getId_iva() {
|
||||
return this.id_iva;
|
||||
}
|
||||
|
||||
public long getId_stagione() {
|
||||
return this.id_stagione;
|
||||
}
|
||||
|
||||
public long getFlgStato() {
|
||||
return this.flgStato;
|
||||
}
|
||||
|
||||
public long getAltezzaMin() {
|
||||
return this.altezzaMin;
|
||||
}
|
||||
|
||||
public long getAltezzaMax() {
|
||||
return this.altezzaMax;
|
||||
}
|
||||
|
||||
public long getLunghezzaFinita() {
|
||||
return this.lunghezzaFinita;
|
||||
}
|
||||
|
||||
public double getPesoMin() {
|
||||
return this.pesoMin;
|
||||
}
|
||||
|
||||
public double getPesoMax() {
|
||||
return this.pesoMax;
|
||||
}
|
||||
|
||||
public double getPesoMq() {
|
||||
return this.pesoMq;
|
||||
}
|
||||
|
||||
public long getLavaggio() {
|
||||
return this.lavaggio;
|
||||
}
|
||||
|
||||
public long getCandeggio() {
|
||||
return this.candeggio;
|
||||
}
|
||||
|
||||
public long getStiratura() {
|
||||
return this.stiratura;
|
||||
}
|
||||
|
||||
public long getAsciugatura() {
|
||||
return this.asciugatura;
|
||||
}
|
||||
|
||||
public long getPulituraSecco() {
|
||||
return this.pulituraSecco;
|
||||
}
|
||||
|
||||
public String getCodiceDoganale() {
|
||||
return (this.codiceDoganale == null) ? "" : this.codiceDoganale.trim();
|
||||
}
|
||||
|
||||
public long getFlgUdm() {
|
||||
return this.flgUdm;
|
||||
}
|
||||
|
||||
public double getPrezzoBase() {
|
||||
return this.prezzoBase;
|
||||
}
|
||||
|
||||
public void setIva(Iva newIva) {
|
||||
this.iva = newIva;
|
||||
}
|
||||
|
||||
public Iva getIva() {
|
||||
this.iva = (Iva)getSecondaryObject(this.iva, Iva.class, getId_iva());
|
||||
return this.iva;
|
||||
}
|
||||
|
||||
public void setStagione(Stagione newStagione) {
|
||||
this.stagione = newStagione;
|
||||
}
|
||||
|
||||
public Stagione getStagione() {
|
||||
this.stagione = (Stagione)getSecondaryObject(this.stagione, Stagione.class, getId_stagione());
|
||||
return this.stagione;
|
||||
}
|
||||
|
||||
public long getFlgTipoTessutoM() {
|
||||
return this.flgTipoTessutoM;
|
||||
}
|
||||
|
||||
public void setFlgTipoTessutoM(long flgTipoTessutoM) {
|
||||
this.flgTipoTessutoM = flgTipoTessutoM;
|
||||
}
|
||||
|
||||
public long getId_tipo() {
|
||||
return this.id_tipo;
|
||||
}
|
||||
|
||||
public Tipo getTipo() {
|
||||
this.tipo = (Tipo)getSecondaryObject(this.tipo, Tipo.class, getId_tipo());
|
||||
return this.tipo;
|
||||
}
|
||||
|
||||
public void setId_tipo(long id_tipo) {
|
||||
this.id_tipo = id_tipo;
|
||||
setTipo(null);
|
||||
}
|
||||
|
||||
public void setTipo(Tipo tipo) {
|
||||
this.tipo = tipo;
|
||||
}
|
||||
|
||||
public static final String getTipoTessutoM(long l_flgTipoTessutoM) {
|
||||
return ArticoloTessuto.getTipoTessutoM(l_flgTipoTessutoM);
|
||||
}
|
||||
|
||||
public String getTipoTessutoM() {
|
||||
return ArticoloTessuto.getTipoTessutoM(getFlgTipoTessutoM());
|
||||
}
|
||||
|
||||
public long getFlgTipoRicerca() {
|
||||
return this.flgTipoRicerca;
|
||||
}
|
||||
|
||||
public void setFlgTipoRicerca(long flgTipoRicerca) {
|
||||
this.flgTipoRicerca = flgTipoRicerca;
|
||||
}
|
||||
|
||||
public it.acxent.anag.Clifor getClifor() {
|
||||
this.clifor = (it.acxent.anag.Clifor)getSecondaryObject(this.clifor, it.acxent.anag.Clifor.class, getId_clifor());
|
||||
return this.clifor;
|
||||
}
|
||||
|
||||
public long getId_clifor() {
|
||||
return this.id_clifor;
|
||||
}
|
||||
|
||||
public long getId_magFisico() {
|
||||
return this.id_magFisico;
|
||||
}
|
||||
|
||||
public MagFisico getMagFisico() {
|
||||
this.magFisico = (MagFisico)getSecondaryObject(this.magFisico, MagFisico.class, new Long(getId_magFisico()));
|
||||
return this.magFisico;
|
||||
}
|
||||
|
||||
public void setClifor(it.acxent.anag.Clifor clifor) {
|
||||
this.clifor = clifor;
|
||||
}
|
||||
|
||||
public void setId_clifor(long id_clifor) {
|
||||
this.id_clifor = id_clifor;
|
||||
setClifor(null);
|
||||
}
|
||||
|
||||
public void setId_magFisico(long id_magFisico) {
|
||||
this.id_magFisico = id_magFisico;
|
||||
}
|
||||
|
||||
public void setMagFisico(MagFisico magFisico) {
|
||||
this.magFisico = magFisico;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,570 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.anag.MagFisico;
|
||||
import it.acxent.anag._AnagAdapter;
|
||||
import it.acxent.art.Articolo;
|
||||
import it.acxent.art.ArticoloVariante;
|
||||
import it.acxent.art.Colore;
|
||||
import it.acxent.art.TipologiaArticolo;
|
||||
import it.acxent.contab.RigaDocumento;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.DoubleOperator;
|
||||
import it.acxent.util.StringTokenizer;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.Date;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
|
||||
public class ArticoloTessutoColore extends _AnagAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1554215588008L;
|
||||
|
||||
private long id_articoloTessutoColore;
|
||||
|
||||
private long id_articoloTessuto;
|
||||
|
||||
private long id_colore;
|
||||
|
||||
private double quantitaAtc;
|
||||
|
||||
private boolean quantitaCalcolate;
|
||||
|
||||
private double quantitaEffettiva;
|
||||
|
||||
private double quantitaImpegnata;
|
||||
|
||||
private double quantitaInArrivo;
|
||||
|
||||
private double quantitaLavorazione;
|
||||
|
||||
private String quantitaMagazzinoMovimentoHtml;
|
||||
|
||||
private ArticoloTessuto articoloTessuto;
|
||||
|
||||
private Colore colore;
|
||||
|
||||
private double mtLavorazioneTaglio;
|
||||
|
||||
private String seriale;
|
||||
|
||||
private long flgDispo;
|
||||
|
||||
private double quantitaAtcW;
|
||||
|
||||
private long id_magFisico;
|
||||
|
||||
private MagFisico magFisico;
|
||||
|
||||
public ArticoloTessutoColore(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloTessutoColore() {}
|
||||
|
||||
public void setId_articoloTessutoColore(long newId_articoloTessutoColore) {
|
||||
this.id_articoloTessutoColore = newId_articoloTessutoColore;
|
||||
}
|
||||
|
||||
public void setId_articoloTessuto(long newId_articoloTessuto) {
|
||||
this.id_articoloTessuto = newId_articoloTessuto;
|
||||
setArticoloTessuto(null);
|
||||
}
|
||||
|
||||
public void setId_colore(long newId_colore) {
|
||||
this.id_colore = newId_colore;
|
||||
setColore(null);
|
||||
}
|
||||
|
||||
public void setQuantitaAtc(double newQuantita) {
|
||||
this.quantitaAtc = newQuantita;
|
||||
}
|
||||
|
||||
public void setQuantitaCalcolate(boolean newQuantitaCalcolate) {
|
||||
this.quantitaCalcolate = newQuantitaCalcolate;
|
||||
}
|
||||
|
||||
public void setQuantitaEffettiva(double newQuantitaEffettiva) {
|
||||
this.quantitaEffettiva = newQuantitaEffettiva;
|
||||
}
|
||||
|
||||
public void setQuantitaImpegnata(double newQuantitaImpegnata) {
|
||||
this.quantitaImpegnata = newQuantitaImpegnata;
|
||||
}
|
||||
|
||||
public void setQuantitaInArrivo(double newQuantitaInArrivo) {
|
||||
this.quantitaInArrivo = newQuantitaInArrivo;
|
||||
}
|
||||
|
||||
public void setQuantitaMagazzinoMovimentoHtml(String newQuantitaMagazzinoMovimentoHtml) {
|
||||
this.quantitaMagazzinoMovimentoHtml = newQuantitaMagazzinoMovimentoHtml;
|
||||
}
|
||||
|
||||
public long getId_articoloTessutoColore() {
|
||||
return this.id_articoloTessutoColore;
|
||||
}
|
||||
|
||||
public long getId_articoloTessuto() {
|
||||
return this.id_articoloTessuto;
|
||||
}
|
||||
|
||||
public long getId_colore() {
|
||||
return this.id_colore;
|
||||
}
|
||||
|
||||
public boolean isQuantitaCalcolate() {
|
||||
return this.quantitaCalcolate;
|
||||
}
|
||||
|
||||
public double getQuantitaEffettiva() {
|
||||
if (!isQuantitaCalcolate() && getId_articoloTessuto() != 0L)
|
||||
calcolaQuantita();
|
||||
return this.quantitaEffettiva;
|
||||
}
|
||||
|
||||
public double getQuantitaImpegnata() {
|
||||
if (!isQuantitaCalcolate() && getId_articoloTessuto() != 0L)
|
||||
calcolaQuantita();
|
||||
return this.quantitaImpegnata;
|
||||
}
|
||||
|
||||
public double getQuantitaInArrivo() {
|
||||
if (!isQuantitaCalcolate() && getId_articoloTessuto() != 0L)
|
||||
calcolaQuantita();
|
||||
return this.quantitaInArrivo;
|
||||
}
|
||||
|
||||
public String getQuantitaMagazzinoMovimentoHtml() {
|
||||
if (!isQuantitaCalcolate() && getId_articoloTessuto() != 0L)
|
||||
calcolaQuantita();
|
||||
return (this.quantitaMagazzinoMovimentoHtml == null) ? "" : this.quantitaMagazzinoMovimentoHtml.trim();
|
||||
}
|
||||
|
||||
public void setArticoloTessuto(ArticoloTessuto newArticoloTessuto) {
|
||||
this.articoloTessuto = newArticoloTessuto;
|
||||
}
|
||||
|
||||
public ArticoloTessuto getArticoloTessuto() {
|
||||
this.articoloTessuto = (ArticoloTessuto)getSecondaryObject(this.articoloTessuto, ArticoloTessuto.class, getId_articoloTessuto());
|
||||
return this.articoloTessuto;
|
||||
}
|
||||
|
||||
public void setColore(Colore newColore) {
|
||||
this.colore = newColore;
|
||||
}
|
||||
|
||||
public Colore getColore() {
|
||||
this.colore = (Colore)getSecondaryObject(this.colore, Colore.class, getId_colore());
|
||||
return this.colore;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<ArticoloTessutoColore> findByCR(ArticoloTessutoColoreCR CR, int pageNumber, int pageRows) {
|
||||
if (CR.getFlgTipoRicerca() == 1L)
|
||||
return findByCRDispoMagazzino(CR, pageNumber, pageRows);
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_TESSUTO_COLORE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public void findByArticoloTessutoColore(long l_id_articoloTessuto, long l_id_colore) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_TESSUTO_COLORE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc(" A.id_articoloTessuto = " + l_id_articoloTessuto);
|
||||
wc.addWc(" A.id_colore = " + l_id_colore);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
findFirstRecord(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void calcolaQuantita() {
|
||||
if ((!isQuantitaCalcolate() ? true : false) & ((getId_articoloTessuto() != 0L) ? true : false)) {
|
||||
long l_flgDispo;
|
||||
RigaDocumento rd = new RigaDocumento(getApFull());
|
||||
rd.findMagTessutoDisponibilita(getId_articoloTessuto(), getId_articoloTessutoColore(), Articolo.SERIALE_NULL, 0L, 0L, -1L, 0L, "", DATA_NULL);
|
||||
double q = rd.getQuantita();
|
||||
double nr = rd.getNr();
|
||||
double kg = rd.getKg();
|
||||
double mt = rd.getMt();
|
||||
setQuantitaAtcW(q);
|
||||
setQuantitaAtc(q);
|
||||
setQuantitaLavorazione(new RigaDocumento(getApFull()).getQuantitaTessutoLavorazioneByArticoloTessutoColoreSeriale(
|
||||
getId_articoloTessutoColore(), 0L, 0L, Articolo.SERIALE_NULL));
|
||||
if (usaMagazzino()) {
|
||||
DoubleOperator dop = new DoubleOperator(q);
|
||||
dop.add(this.quantitaInArrivo);
|
||||
dop.add(this.quantitaLavorazione);
|
||||
dop.subtract(this.quantitaImpegnata);
|
||||
setQuantitaEffettiva(dop.getResult());
|
||||
}
|
||||
this.quantitaMagazzinoMovimentoHtml = getMovimentoHtmlDesc(getArticoloTessuto().getTipologiaArticolo(), q, nr, kg, mt, this.quantitaInArrivo, this.quantitaImpegnata, this.quantitaEffettiva, this.quantitaLavorazione,
|
||||
usaMagazzino(),
|
||||
getParm("USA_MAGAZZINO").isTrue(), getNf());
|
||||
if (!usaMagazzino()) {
|
||||
l_flgDispo = 1L;
|
||||
} else {
|
||||
l_flgDispo = (this.quantitaAtc > 0.0D) ? 1L : 0L;
|
||||
}
|
||||
String temp = "update ARTICOLO_TESSUTO_COLORE set quantitaMagazzinoMovimentoHtml='" + this.quantitaMagazzinoMovimentoHtml + "', quantitaAtc=" + this.quantitaAtc + ", quantitaEffettiva=" + this.quantitaEffettiva + ", quantitaImpegnata=" + this.quantitaImpegnata + ", quantitaLavorazione=" + this.quantitaLavorazione + ", quantitaCalcolate=true, flgDispo=" + l_flgDispo + " where id_articoloTessuto=" +
|
||||
|
||||
|
||||
getId_articoloTessuto();
|
||||
update(temp);
|
||||
setQuantitaCalcolate(true);
|
||||
}
|
||||
}
|
||||
|
||||
public static final String getMovimentoHtmlDesc(TipologiaArticolo tipologiaArticolo, double q, double nr, double kg, double mt, double quantitaInArrivo, double quantitaImpegnata, double quantitaEffettiva, double quantitaLavorazione, boolean usaMagazzino, boolean usaMagazzinoSuArticoli, NumberFormat nf) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (!usaMagazzino) {
|
||||
sb.append("No magazzino");
|
||||
} else if (!usaMagazzinoSuArticoli) {
|
||||
sb.append(" <span class=\"text-primary\">");
|
||||
if (tipologiaArticolo.getFlgNr() == 1L &&
|
||||
tipologiaArticolo.getFlgUdm() == 1L && nr < 0.0D) {
|
||||
sb.append("n ");
|
||||
sb.append(nf.format(nr));
|
||||
}
|
||||
if (tipologiaArticolo.getFlgMt() == 1L) {
|
||||
if (sb.length() > 0)
|
||||
sb.append(" ");
|
||||
sb.append("mt ");
|
||||
sb.append(nf.format(mt));
|
||||
}
|
||||
if (tipologiaArticolo.getFlgKg() == 1L) {
|
||||
if (sb.length() > 0)
|
||||
sb.append(" ");
|
||||
sb.append("kg ");
|
||||
sb.append(nf.format(kg));
|
||||
}
|
||||
sb.append("</span>");
|
||||
sb.append(" + ");
|
||||
sb.append(" <span class=\"text-purple\">");
|
||||
sb.append(nf.format(quantitaLavorazione));
|
||||
sb.append("</span>");
|
||||
sb.append(" + ");
|
||||
sb.append(" <span class=\"text-green\">");
|
||||
sb.append(nf.format(quantitaInArrivo));
|
||||
sb.append("</span>");
|
||||
sb.append(" - ");
|
||||
sb.append(" <span class=\"text-danger\">");
|
||||
sb.append(nf.format(quantitaImpegnata));
|
||||
sb.append("</span>");
|
||||
sb.append(" = ");
|
||||
sb.append(tipologiaArticolo.getUdm());
|
||||
sb.append(" <b><span class=\"text bold\">");
|
||||
sb.append(nf.format(quantitaEffettiva));
|
||||
sb.append("</span></b>");
|
||||
} else {
|
||||
DoubleOperator dp = new DoubleOperator(q);
|
||||
dp.subtract(quantitaImpegnata);
|
||||
sb.append(tipologiaArticolo.getUdm());
|
||||
sb.append(" ");
|
||||
if (q < 0.0D) {
|
||||
sb.append(" <span class=\"alert text-danger\">");
|
||||
sb.append(nf.format(q));
|
||||
sb.append("</span>");
|
||||
} else {
|
||||
sb.append(nf.format(q));
|
||||
}
|
||||
sb.append(" - ");
|
||||
sb.append(" <span class=\"text-danger\">");
|
||||
sb.append(nf.format(quantitaImpegnata));
|
||||
sb.append("</span>");
|
||||
sb.append(" = ");
|
||||
sb.append(" <b><span class=\"text\">");
|
||||
sb.append(nf.format(dp.getResult()));
|
||||
sb.append("</span></b>");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public boolean usaMagazzino() {
|
||||
if (getArticoloTessuto().getTipo().getFlgTipoMagazzino() == 9L ||
|
||||
getArticoloTessuto().getTipo().getFlgTipoMagazzino() == 0L)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public String getDescrizioneCompleta() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getArticoloTessuto().getDescrizioneCompleta());
|
||||
sb.append(" ");
|
||||
sb.append(getColore().getDescrizioneCompleta());
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public String getDescrizioneCompleta(String lang) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getArticoloTessuto().getDescrizioneCompleta(lang));
|
||||
sb.append(" ");
|
||||
sb.append(getColore().getDescrizioneCompleta(lang));
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public Vectumerator<ArticoloTessutoColore> findTessutiPerTaglioByArticolo(long l_id_articolo) {
|
||||
ResParm rp = new ResParm(true);
|
||||
boolean debug = false;
|
||||
String debugIngo = "findTessutiPerTaglioByArticolo";
|
||||
HashMap<Long, ArticoloTessutoColore> hmTess = new HashMap<>();
|
||||
Articolo articolo = new Articolo(this.apFull);
|
||||
articolo.findByPrimaryKey(l_id_articolo);
|
||||
if (articolo.getId_articolo() > 0L) {
|
||||
Vectumerator<ArticoloArticoloTessuto> vecAAT = new Vectumerator();
|
||||
if (articolo.getFlgUsaVarianti() == 1L) {
|
||||
Vectumerator<ArticoloVariante> vecVar = articolo.findArticoliVarianti(-1L, -1L);
|
||||
while (vecVar.hasMoreElements()) {
|
||||
ArticoloVariante rowAV = (ArticoloVariante)vecVar.nextElement();
|
||||
vecAAT = rowAV.findArticoliTessuto();
|
||||
while (vecAAT.hasMoreElements()) {
|
||||
ArticoloArticoloTessuto rowAAT = (ArticoloArticoloTessuto)vecAAT.nextElement();
|
||||
if (!hmTess.containsKey(Long.valueOf(rowAAT.getId_articoloTessutoColore())))
|
||||
hmTess.put(Long.valueOf(rowAAT.getId_articoloTessutoColore()), rowAAT.getArticoloTessutoColore());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
vecAAT = articolo.findArticoliTessuto();
|
||||
while (vecAAT.hasMoreElements()) {
|
||||
ArticoloArticoloTessuto rowAAT = (ArticoloArticoloTessuto)vecAAT.nextElement();
|
||||
if (!hmTess.containsKey(Long.valueOf(rowAAT.getId_articoloTessutoColore())))
|
||||
hmTess.put(Long.valueOf(rowAAT.getId_articoloTessutoColore()), rowAAT.getArticoloTessutoColore());
|
||||
}
|
||||
}
|
||||
}
|
||||
Vectumerator<ArticoloTessutoColore> vecRes = new Vectumerator();
|
||||
Set<Long> keySet = hmTess.keySet();
|
||||
for (Long key : keySet)
|
||||
vecRes.add(hmTess.get(key));
|
||||
return vecRes;
|
||||
}
|
||||
|
||||
public double getMtLavorazioneTaglio() {
|
||||
return this.mtLavorazioneTaglio;
|
||||
}
|
||||
|
||||
public void setMtLavorazioneTaglio(double mtLavorazioneTaglio) {
|
||||
this.mtLavorazioneTaglio = mtLavorazioneTaglio;
|
||||
}
|
||||
|
||||
public Vectumerator<ArticoloTessutoColore> findByArticoloTessuto(long l_id_articoloTessuto) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_TESSUTO_COLORE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc(" A.id_articoloTessuto = " + l_id_articoloTessuto);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, 0, 0);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public double getQuantitaV() {
|
||||
return this.quantitaAtc;
|
||||
}
|
||||
|
||||
public double getRealTimeQuantitaImpegnata() {
|
||||
return new RigaDocumento(getApFull()).getQuantitaImpegnataTessutoByArticoloTessutoColoreSeriale(getId_articoloTessutoColore(), 0L, 0L,
|
||||
getSeriale());
|
||||
}
|
||||
|
||||
public double getRealTimeQuantitaInArrivo() {
|
||||
double q1 = new RigaDocumento(getApFull()).getQuantitaTessutoInArrivoByArticoloTessutoColoreSeriale(getId_articoloTessutoColore(), 0L, 0L,
|
||||
getSeriale());
|
||||
return q1;
|
||||
}
|
||||
|
||||
public String getSeriale() {
|
||||
return this.seriale;
|
||||
}
|
||||
|
||||
public void setSeriale(String seriale) {
|
||||
this.seriale = seriale;
|
||||
}
|
||||
|
||||
protected void fillFields(ResultSet rst) {
|
||||
super.fillFields(rst);
|
||||
try {
|
||||
if (isColumnInResultSet(rst, "seriale"))
|
||||
setSeriale(rst.getString("seriale"));
|
||||
if (isColumnInResultSet(rst, "id_magFisico"))
|
||||
setId_magFisico(rst.getLong("id_magFisico"));
|
||||
if (isColumnInResultSet(rst, "quantitaAtc"))
|
||||
setQuantitaAtc(rst.getDouble("quantitaAtc"));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public Vectumerator<ArticoloTessutoColore> findByCRDispoMagazzino(ArticoloTessutoColoreCR CR, int pageNumber, int pageRows) {
|
||||
try {
|
||||
String sql = "SELECT M.id_magFisico, M.id_articoloTessutoColore as id_artmov, A.id_articoloTessutoColore,A.id_articoloTessuto,A.id_colore, M.id_clifor, M.seriale, SUM(segnoMov*kg) as quantitaAtc, SUM(segnoMov*kg) as kg, SUM(segnoMov*mt) as mt, SUM(segnoMov*nr) as nr, B.id_tipo FROM RIGA_DOCUMENTO AS M INNER JOIN ARTICOLO_TESSUTO_COLORE AS A ON A.id_articoloTessutoColore=M.id_articoloTessutoColore INNER JOIN COLORE AS CO ON CO.id_colore=A.id_colore inner join ARTICOLO_TESSUTO AS B ON A.id_articoloTessuto=B.id_articoloTessuto";
|
||||
String s_Sql_GrouBy = " group by M.id_articoloTessutoColore, M.id_clifor, M.seriale ,M.id_magFisico";
|
||||
String s_Sql_Having = " HAVING ( kg>0 and A.id_articoloTessutoColore>0 and M.seriale is not null ) ";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
String star = "";
|
||||
String temp = CR.getSearchTxt().trim();
|
||||
StringTokenizer st = new StringTokenizer(temp.trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = star + star;
|
||||
token = prepareInputMySqlString(token, false);
|
||||
token = token.replace("*", "%");
|
||||
txt.append("(B.descrizione like '%" + token + "%' or CO.descrizione like '%" + token + "%' or CO.codiceColore like '%" + token + "%')");
|
||||
if (st.hasMoreTokens()) {
|
||||
txt.append(" and ");
|
||||
star = "%";
|
||||
}
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
if (isDeleteLogic())
|
||||
if (CR.getFlgShowDeleteLogic() == 0L) {
|
||||
wc.addWc("A.dataFineVld is null");
|
||||
} else {
|
||||
wc.addWc("A.dataFineVld is not null");
|
||||
}
|
||||
if (CR.getId_clifor() != 0L && CR.getMagFisico().getFlgTipo() == 0L) {
|
||||
wc.addWc("(M.id_clifor=" + CR.getId_clifor() + ")");
|
||||
} else {
|
||||
wc.addWc("(M.id_clifor=0 or M.id_clifor is null )");
|
||||
}
|
||||
if (CR.getId_magFisico() > 0L)
|
||||
wc.addWc(" M.id_magFisico=" + CR.getId_magFisico());
|
||||
if (CR.getId_articoloTessuto() > 0L)
|
||||
wc.addWc(" A.id_articoloTessuto=" + CR.getId_articoloTessuto());
|
||||
if (CR.getId_articoloTessutoColore() > 0L)
|
||||
wc.addWc(" M.id_articoloTessutoColore=" + CR.getId_articoloTessutoColore());
|
||||
PreparedStatement stmt = getConn().prepareStatement(sql + sql + wc.toString() + s_Sql_GrouBy);
|
||||
return findRows(stmt, pageNumber, 50);
|
||||
} catch (SQLException e) {
|
||||
handleDebug(e);
|
||||
e.printStackTrace();
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public long getFlgDispo() {
|
||||
return this.flgDispo;
|
||||
}
|
||||
|
||||
public void setFlgDispo(long flgDispo) {
|
||||
this.flgDispo = flgDispo;
|
||||
}
|
||||
|
||||
public double getQuantitaAtc(Date data) {
|
||||
if (!usaMagazzino())
|
||||
return 0.0D;
|
||||
if (getParm("USA_MAGAZZINO").isFalse()) {
|
||||
RigaDocumento rd = new RigaDocumento(getApFull());
|
||||
rd.findMagTessutoDisponibilita(getId_articoloTessuto(), 0L, getSeriale(), getId_magFisico(), 0L, -1L, 0L, "", data);
|
||||
return rd.getQuantita();
|
||||
}
|
||||
return this.quantitaAtc;
|
||||
}
|
||||
|
||||
public double getQuantitaAtc() {
|
||||
return getQuantitaAtc(null);
|
||||
}
|
||||
|
||||
public double getQuantitaAtcW() {
|
||||
if (!isQuantitaCalcolate() && getId_articoloTessutoColore() != 0L)
|
||||
calcolaQuantita();
|
||||
return this.quantitaAtcW;
|
||||
}
|
||||
|
||||
public void setQuantitaAtcW(double quantitaAtW) {
|
||||
this.quantitaAtcW = quantitaAtW;
|
||||
}
|
||||
|
||||
public long getId_magFisico() {
|
||||
return this.id_magFisico;
|
||||
}
|
||||
|
||||
public MagFisico getMagFisico() {
|
||||
this.magFisico = (MagFisico)getSecondaryObject(this.magFisico, MagFisico.class, getId_magFisico());
|
||||
return this.magFisico;
|
||||
}
|
||||
|
||||
public void setId_magFisico(long id_magFisico) {
|
||||
this.id_magFisico = id_magFisico;
|
||||
setMagFisico(null);
|
||||
}
|
||||
|
||||
public void setMagFisico(MagFisico magFisico) {
|
||||
this.magFisico = magFisico;
|
||||
}
|
||||
|
||||
public double getQuantitaLavorazione() {
|
||||
return this.quantitaLavorazione;
|
||||
}
|
||||
|
||||
public void setQuantitaLavorazione(double quantitaLavorazione) {
|
||||
this.quantitaLavorazione = quantitaLavorazione;
|
||||
}
|
||||
|
||||
public double getRealTimeQuantitaLavorazione() {
|
||||
double q1 = new RigaDocumento(getApFull())
|
||||
.getQuantitaTessutoLavorazioneByArticoloTessutoColoreSeriale(getId_articoloTessutoColore(), 0L, 0L, getSeriale());
|
||||
return q1;
|
||||
}
|
||||
|
||||
public void resetCalcoloQuantita() {
|
||||
if (getId_articoloTessutoColore() > 0L) {
|
||||
update("update ARTICOLO_TESSUTO_COLORE set quantitaCalcolate=false where id_articoloTessutocolore=" +
|
||||
getId_articoloTessutoColore());
|
||||
setQuantitaCalcolate(false);
|
||||
}
|
||||
}
|
||||
|
||||
public long getId_iva(it.acxent.anag.Clifor l_clifor) {
|
||||
return getArticoloTessuto().getId_iva(l_clifor);
|
||||
}
|
||||
|
||||
public TipologiaArticolo getTipologiaArticolo() {
|
||||
return getArticoloTessuto().getTipologiaArticolo();
|
||||
}
|
||||
|
||||
public boolean isUsaLotti() {
|
||||
return (getArticoloTessuto().getTipo().getFlgTipoMagazzino() == 3L);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,186 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.anag.MagFisico;
|
||||
import it.acxent.art.Colore;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
public class ArticoloTessutoColoreCR extends CRAdapter {
|
||||
private long id_articoloTessutoColore;
|
||||
|
||||
private long id_articoloTessuto;
|
||||
|
||||
private long id_colore;
|
||||
|
||||
private double quantita;
|
||||
|
||||
private boolean quantitaCalcolate;
|
||||
|
||||
private double quantitaEffettiva;
|
||||
|
||||
private double quantitaImpegnata;
|
||||
|
||||
private double quantitaInArrivo;
|
||||
|
||||
private String quantitaMagazzinoMovimentoHtml;
|
||||
|
||||
private ArticoloTessuto articoloTessuto;
|
||||
|
||||
private Colore colore;
|
||||
|
||||
private it.acxent.anag.Clifor clifor;
|
||||
|
||||
private long id_clifor;
|
||||
|
||||
private long id_magFisico;
|
||||
|
||||
private MagFisico magFisico;
|
||||
|
||||
private long flgTipoRicerca = 0L;
|
||||
|
||||
public ArticoloTessutoColoreCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloTessutoColoreCR() {}
|
||||
|
||||
public void setId_articoloTessutoColore(long newId_articoloTessutoColore) {
|
||||
this.id_articoloTessutoColore = newId_articoloTessutoColore;
|
||||
}
|
||||
|
||||
public void setId_articoloTessuto(long newId_articoloTessuto) {
|
||||
this.id_articoloTessuto = newId_articoloTessuto;
|
||||
setArticoloTessuto(null);
|
||||
}
|
||||
|
||||
public void setId_colore(long newId_colore) {
|
||||
this.id_colore = newId_colore;
|
||||
setColore(null);
|
||||
}
|
||||
|
||||
public void setQuantita(double newQuantita) {
|
||||
this.quantita = newQuantita;
|
||||
}
|
||||
|
||||
public void setQuantitaCalcolate(boolean newQuantitaCalcolate) {
|
||||
this.quantitaCalcolate = newQuantitaCalcolate;
|
||||
}
|
||||
|
||||
public void setQuantitaEffettiva(double newQuantitaEffettiva) {
|
||||
this.quantitaEffettiva = newQuantitaEffettiva;
|
||||
}
|
||||
|
||||
public void setQuantitaImpegnata(double newQuantitaImpegnata) {
|
||||
this.quantitaImpegnata = newQuantitaImpegnata;
|
||||
}
|
||||
|
||||
public void setQuantitaInArrivo(double newQuantitaInArrivo) {
|
||||
this.quantitaInArrivo = newQuantitaInArrivo;
|
||||
}
|
||||
|
||||
public void setQuantitaMagazzinoMovimentoHtml(String newQuantitaMagazzinoMovimentoHtml) {
|
||||
this.quantitaMagazzinoMovimentoHtml = newQuantitaMagazzinoMovimentoHtml;
|
||||
}
|
||||
|
||||
public long getId_articoloTessutoColore() {
|
||||
return this.id_articoloTessutoColore;
|
||||
}
|
||||
|
||||
public long getId_articoloTessuto() {
|
||||
return this.id_articoloTessuto;
|
||||
}
|
||||
|
||||
public long getId_colore() {
|
||||
return this.id_colore;
|
||||
}
|
||||
|
||||
public double getQuantita() {
|
||||
return this.quantita;
|
||||
}
|
||||
|
||||
public boolean getQuantitaCalcolate() {
|
||||
return this.quantitaCalcolate;
|
||||
}
|
||||
|
||||
public double getQuantitaEffettiva() {
|
||||
return this.quantitaEffettiva;
|
||||
}
|
||||
|
||||
public double getQuantitaImpegnata() {
|
||||
return this.quantitaImpegnata;
|
||||
}
|
||||
|
||||
public double getQuantitaInArrivo() {
|
||||
return this.quantitaInArrivo;
|
||||
}
|
||||
|
||||
public String getQuantitaMagazzinoMovimentoHtml() {
|
||||
return (this.quantitaMagazzinoMovimentoHtml == null) ? "" : this.quantitaMagazzinoMovimentoHtml.trim();
|
||||
}
|
||||
|
||||
public void setArticoloTessuto(ArticoloTessuto newArticoloTessuto) {
|
||||
this.articoloTessuto = newArticoloTessuto;
|
||||
}
|
||||
|
||||
public ArticoloTessuto getArticoloTessuto() {
|
||||
this.articoloTessuto = (ArticoloTessuto)getSecondaryObject(this.articoloTessuto, ArticoloTessuto.class,
|
||||
|
||||
getId_articoloTessuto());
|
||||
return this.articoloTessuto;
|
||||
}
|
||||
|
||||
public void setColore(Colore newColore) {
|
||||
this.colore = newColore;
|
||||
}
|
||||
|
||||
public Colore getColore() {
|
||||
this.colore = (Colore)getSecondaryObject(this.colore, Colore.class,
|
||||
|
||||
getId_colore());
|
||||
return this.colore;
|
||||
}
|
||||
|
||||
public it.acxent.anag.Clifor getClifor() {
|
||||
this.clifor = (it.acxent.anag.Clifor)getSecondaryObject(this.clifor, it.acxent.anag.Clifor.class, getId_clifor());
|
||||
return this.clifor;
|
||||
}
|
||||
|
||||
public long getId_clifor() {
|
||||
return this.id_clifor;
|
||||
}
|
||||
|
||||
public long getId_magFisico() {
|
||||
return this.id_magFisico;
|
||||
}
|
||||
|
||||
public MagFisico getMagFisico() {
|
||||
this.magFisico = (MagFisico)getSecondaryObject(this.magFisico, MagFisico.class, new Long(getId_magFisico()));
|
||||
return this.magFisico;
|
||||
}
|
||||
|
||||
public void setClifor(it.acxent.anag.Clifor clifor) {
|
||||
this.clifor = clifor;
|
||||
}
|
||||
|
||||
public void setId_clifor(long id_clifor) {
|
||||
this.id_clifor = id_clifor;
|
||||
setClifor(null);
|
||||
}
|
||||
|
||||
public void setId_magFisico(long id_magFisico) {
|
||||
this.id_magFisico = id_magFisico;
|
||||
setMagFisico(null);
|
||||
}
|
||||
|
||||
public void setMagFisico(MagFisico magFisico) {
|
||||
this.magFisico = magFisico;
|
||||
}
|
||||
|
||||
public long getFlgTipoRicerca() {
|
||||
return this.flgTipoRicerca;
|
||||
}
|
||||
|
||||
public void setFlgTipoRicerca(long flgTipoRicerca) {
|
||||
this.flgTipoRicerca = flgTipoRicerca;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,179 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.art.Componente;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.DoubleOperator;
|
||||
import it.acxent.util.StringTokenizer;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class ArticoloTessutoComponente extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1468228166638L;
|
||||
|
||||
private long id_articoloTessutoComponente;
|
||||
|
||||
private long id_componente;
|
||||
|
||||
private long id_articoloTessuto;
|
||||
|
||||
private double percentuale;
|
||||
|
||||
private Componente componente;
|
||||
|
||||
private ArticoloTessuto articoloTessuto;
|
||||
|
||||
public ArticoloTessutoComponente(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloTessutoComponente() {}
|
||||
|
||||
public void setId_articoloTessutoComponente(long newId_articoloTessutoComponente) {
|
||||
this.id_articoloTessutoComponente = newId_articoloTessutoComponente;
|
||||
}
|
||||
|
||||
public void setId_componente(long newId_componente) {
|
||||
this.id_componente = newId_componente;
|
||||
setComponente(null);
|
||||
}
|
||||
|
||||
public void setId_articoloTessuto(long newId_articoloTessuto) {
|
||||
this.id_articoloTessuto = newId_articoloTessuto;
|
||||
setArticoloTessuto(null);
|
||||
}
|
||||
|
||||
public void setPercentuale(double newPercentuale) {
|
||||
this.percentuale = newPercentuale;
|
||||
}
|
||||
|
||||
public long getId_articoloTessutoComponente() {
|
||||
return this.id_articoloTessutoComponente;
|
||||
}
|
||||
|
||||
public long getId_componente() {
|
||||
return this.id_componente;
|
||||
}
|
||||
|
||||
public long getId_articoloTessuto() {
|
||||
return this.id_articoloTessuto;
|
||||
}
|
||||
|
||||
public double getPercentuale() {
|
||||
return this.percentuale;
|
||||
}
|
||||
|
||||
public void setComponente(Componente newComponente) {
|
||||
this.componente = newComponente;
|
||||
}
|
||||
|
||||
public Componente getComponente() {
|
||||
this.componente = (Componente)getSecondaryObject(this.componente, Componente.class, getId_componente());
|
||||
return this.componente;
|
||||
}
|
||||
|
||||
public void setArticoloTessuto(ArticoloTessuto newArticoloTessuto) {
|
||||
this.articoloTessuto = newArticoloTessuto;
|
||||
}
|
||||
|
||||
public ArticoloTessuto getArticoloTessuto() {
|
||||
this.articoloTessuto = (ArticoloTessuto)getSecondaryObject(this.articoloTessuto, ArticoloTessuto.class, getId_articoloTessuto());
|
||||
return this.articoloTessuto;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<ArticoloTessutoComponente> findByCR(ArticoloTessutoComponenteCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_TESSUTO_COMPONENTE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public double getTotPercentualeByArticoloTessuto(long l_id_articoloTessuto) {
|
||||
String s_Sql_Find = "select sum(percentuale) as _sum from ARTICOLO_TESSUTO_COMPONENTE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc(" A.id_articoloTessuto = " + l_id_articoloTessuto);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return getSum(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return 0.0D;
|
||||
}
|
||||
}
|
||||
|
||||
public ResParm save() {
|
||||
ResParm rp = isSalvabile();
|
||||
if (rp.getStatus())
|
||||
return super.save();
|
||||
return rp;
|
||||
}
|
||||
|
||||
private ResParm isSalvabile() {
|
||||
boolean checkComponente = false;
|
||||
DoubleOperator dop = new DoubleOperator();
|
||||
ArticoloTessutoComponente afc = new ArticoloTessutoComponente(getApFull());
|
||||
if (getId_articoloTessuto() == 0L)
|
||||
return new ResParm(false, "ERRORE! Tessuto non valido!");
|
||||
if (getPercentuale() == 0.0D)
|
||||
return new ResParm(false, "ERRORE! Percentuale non valida!");
|
||||
Vectumerator<ArticoloTessutoComponente> vec = afc.findByArticoloTessuto(getId_articoloTessuto());
|
||||
while (vec.hasMoreElements()) {
|
||||
afc = (ArticoloTessutoComponente)vec.nextElement();
|
||||
if (afc.getId_componente() == getId_componente())
|
||||
checkComponente = true;
|
||||
dop.add(afc.getPercentuale());
|
||||
}
|
||||
dop.add(getPercentuale());
|
||||
if (dop.getResult() <= 100.0D && !checkComponente)
|
||||
return new ResParm(true);
|
||||
if (dop.getResult() > 100.0D)
|
||||
return new ResParm(false, "ERRORE! Percentuale errata!");
|
||||
return new ResParm(false, "ERRORE! Componente già selezionato!");
|
||||
}
|
||||
|
||||
public Vectumerator<ArticoloTessutoComponente> findByArticoloTessuto(long l_id_articoloTessuto) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_TESSUTO_COMPONENTE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc(" A.id_articoloTessuto = " + l_id_articoloTessuto);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, 0, 0);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.art.Componente;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
public class ArticoloTessutoComponenteCR extends CRAdapter {
|
||||
private long id_articoloTessutoComponente;
|
||||
|
||||
private long id_componente;
|
||||
|
||||
private long id_articoloTessuto;
|
||||
|
||||
private double percentuale;
|
||||
|
||||
private Componente componente;
|
||||
|
||||
private ArticoloTessuto articoloTessuto;
|
||||
|
||||
public ArticoloTessutoComponenteCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloTessutoComponenteCR() {}
|
||||
|
||||
public void setId_articoloTessutoComponente(long newId_articoloTessutoComponente) {
|
||||
this.id_articoloTessutoComponente = newId_articoloTessutoComponente;
|
||||
}
|
||||
|
||||
public void setId_componente(long newId_componente) {
|
||||
this.id_componente = newId_componente;
|
||||
setComponente(null);
|
||||
}
|
||||
|
||||
public void setId_articoloTessuto(long newId_articoloTessuto) {
|
||||
this.id_articoloTessuto = newId_articoloTessuto;
|
||||
setArticoloTessuto(null);
|
||||
}
|
||||
|
||||
public void setPercentuale(double newPercentuale) {
|
||||
this.percentuale = newPercentuale;
|
||||
}
|
||||
|
||||
public long getId_articoloTessutoComponente() {
|
||||
return this.id_articoloTessutoComponente;
|
||||
}
|
||||
|
||||
public long getId_componente() {
|
||||
return this.id_componente;
|
||||
}
|
||||
|
||||
public long getId_articoloTessuto() {
|
||||
return this.id_articoloTessuto;
|
||||
}
|
||||
|
||||
public double getPercentuale() {
|
||||
return this.percentuale;
|
||||
}
|
||||
|
||||
public void setComponente(Componente newComponente) {
|
||||
this.componente = newComponente;
|
||||
}
|
||||
|
||||
public Componente getComponente() {
|
||||
this.componente = (Componente)getSecondaryObject(this.componente, Componente.class,
|
||||
|
||||
getId_componente());
|
||||
return this.componente;
|
||||
}
|
||||
|
||||
public void setArticoloTessuto(ArticoloTessuto newArticoloTessuto) {
|
||||
this.articoloTessuto = newArticoloTessuto;
|
||||
}
|
||||
|
||||
public ArticoloTessuto getArticoloTessuto() {
|
||||
this.articoloTessuto = (ArticoloTessuto)getSecondaryObject(this.articoloTessuto, ArticoloTessuto.class,
|
||||
|
||||
getId_articoloTessuto());
|
||||
return this.articoloTessuto;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,191 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.DoubleOperator;
|
||||
import it.acxent.util.StringTokenizer;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.math.RoundingMode;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class ArticoloTessutoFilato extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1487838624757L;
|
||||
|
||||
private long id_articoloTessutoFilato;
|
||||
|
||||
private long id_articoloTessuto;
|
||||
|
||||
private long id_articoloFilatoColore;
|
||||
|
||||
private String serie;
|
||||
|
||||
private long ordine;
|
||||
|
||||
private double percentuale;
|
||||
|
||||
private long flgTramaOrdito;
|
||||
|
||||
private String noteOrdTess;
|
||||
|
||||
private ArticoloTessuto articoloTessuto;
|
||||
|
||||
private ArticoloFilatoColore articoloFilatoColore;
|
||||
|
||||
public ArticoloTessutoFilato(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloTessutoFilato() {}
|
||||
|
||||
public void setId_articoloTessutoFilato(long newId_articoloTessutoFilato) {
|
||||
this.id_articoloTessutoFilato = newId_articoloTessutoFilato;
|
||||
}
|
||||
|
||||
public void setId_articoloTessuto(long newId_articoloTessuto) {
|
||||
this.id_articoloTessuto = newId_articoloTessuto;
|
||||
setArticoloTessuto(null);
|
||||
}
|
||||
|
||||
public void setId_articoloFilatoColore(long newId_articoloFilatoColore) {
|
||||
this.id_articoloFilatoColore = newId_articoloFilatoColore;
|
||||
setArticoloFilatoColore(null);
|
||||
}
|
||||
|
||||
public void setSerie(String newSerie) {
|
||||
this.serie = newSerie;
|
||||
}
|
||||
|
||||
public void setOrdine(long newOrdine) {
|
||||
this.ordine = newOrdine;
|
||||
}
|
||||
|
||||
public void setPercentuale(double newPercentuale) {
|
||||
this.percentuale = newPercentuale;
|
||||
}
|
||||
|
||||
public void setFlgTramaOrdito(long newFlgTramaOrdito) {
|
||||
this.flgTramaOrdito = newFlgTramaOrdito;
|
||||
}
|
||||
|
||||
public void setNoteOrdTess(String newNoteOrdTess) {
|
||||
this.noteOrdTess = newNoteOrdTess;
|
||||
}
|
||||
|
||||
public long getId_articoloTessutoFilato() {
|
||||
return this.id_articoloTessutoFilato;
|
||||
}
|
||||
|
||||
public long getId_articoloTessuto() {
|
||||
return this.id_articoloTessuto;
|
||||
}
|
||||
|
||||
public long getId_articoloFilatoColore() {
|
||||
return this.id_articoloFilatoColore;
|
||||
}
|
||||
|
||||
public String getSerie() {
|
||||
return (this.serie == null) ? "" : this.serie.trim();
|
||||
}
|
||||
|
||||
public long getOrdine() {
|
||||
return this.ordine;
|
||||
}
|
||||
|
||||
public double getPercentuale() {
|
||||
return this.percentuale;
|
||||
}
|
||||
|
||||
public double getKgNecessari(double kgTot) {
|
||||
if (kgTot == 0.0D)
|
||||
return 0.0D;
|
||||
DoubleOperator dop = new DoubleOperator(kgTot);
|
||||
dop.multiply(getPercentuale());
|
||||
dop.divide(100.0F);
|
||||
dop.setScale(2, RoundingMode.HALF_DOWN);
|
||||
return dop.getResult();
|
||||
}
|
||||
|
||||
public long getFlgTramaOrdito() {
|
||||
return this.flgTramaOrdito;
|
||||
}
|
||||
|
||||
public String getNoteOrdTess() {
|
||||
return (this.noteOrdTess == null) ? "" : this.noteOrdTess.trim();
|
||||
}
|
||||
|
||||
public void setArticoloTessuto(ArticoloTessuto newArticoloTessuto) {
|
||||
this.articoloTessuto = newArticoloTessuto;
|
||||
}
|
||||
|
||||
public ArticoloTessuto getArticoloTessuto() {
|
||||
this.articoloTessuto = (ArticoloTessuto)getSecondaryObject(this.articoloTessuto, ArticoloTessuto.class, getId_articoloTessuto());
|
||||
return this.articoloTessuto;
|
||||
}
|
||||
|
||||
public void setArticoloFilatoColore(ArticoloFilatoColore newArticoloFilatoColore) {
|
||||
this.articoloFilatoColore = newArticoloFilatoColore;
|
||||
}
|
||||
|
||||
public ArticoloFilatoColore getArticoloFilatoColore() {
|
||||
this.articoloFilatoColore = (ArticoloFilatoColore)getSecondaryObject(this.articoloFilatoColore, ArticoloFilatoColore.class,
|
||||
getId_articoloFilatoColore());
|
||||
return this.articoloFilatoColore;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<ArticoloTessutoFilato> findByCR(ArticoloTessutoFilatoCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_TESSUTO_FILATO AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public Vectumerator<ArticoloTessutoFilato> findByArticoloTessuto(long l_id_articoloTessuto, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_TESSUTO_FILATO AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_articoloTessuto=" + l_id_articoloTessuto);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public String getDescrizioneCompleta() {
|
||||
if (getId_articoloTessutoFilato() == 0L)
|
||||
return "";
|
||||
return getArticoloFilatoColore().getDescrizioneCompleta() + " " + getArticoloFilatoColore().getDescrizioneCompleta() + "%";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
public class ArticoloTessutoFilatoCR extends CRAdapter {
|
||||
private long id_articoloTessutoFilato;
|
||||
|
||||
private long id_articoloTessuto;
|
||||
|
||||
private long id_articoloFilatoColore;
|
||||
|
||||
private String serie;
|
||||
|
||||
private long ordine;
|
||||
|
||||
private double percentuale;
|
||||
|
||||
private long flgTramaOrdito;
|
||||
|
||||
private String noteOrdTess;
|
||||
|
||||
private ArticoloTessuto articoloTessuto;
|
||||
|
||||
private ArticoloFilatoColore articoloFilatoColore;
|
||||
|
||||
public ArticoloTessutoFilatoCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloTessutoFilatoCR() {}
|
||||
|
||||
public void setId_articoloTessutoFilato(long newId_articoloTessutoFilato) {
|
||||
this.id_articoloTessutoFilato = newId_articoloTessutoFilato;
|
||||
}
|
||||
|
||||
public void setId_articoloTessuto(long newId_articoloTessuto) {
|
||||
this.id_articoloTessuto = newId_articoloTessuto;
|
||||
setArticoloTessuto(null);
|
||||
}
|
||||
|
||||
public void setId_articoloFilatoColore(long newId_articoloFilatoColore) {
|
||||
this.id_articoloFilatoColore = newId_articoloFilatoColore;
|
||||
setArticoloFilatoColore(null);
|
||||
}
|
||||
|
||||
public void setSerie(String newSerie) {
|
||||
this.serie = newSerie;
|
||||
}
|
||||
|
||||
public void setOrdine(long newOrdine) {
|
||||
this.ordine = newOrdine;
|
||||
}
|
||||
|
||||
public void setPercentuale(double newPercentuale) {
|
||||
this.percentuale = newPercentuale;
|
||||
}
|
||||
|
||||
public void setFlgTramaOrdito(long newFlgTramaOrdito) {
|
||||
this.flgTramaOrdito = newFlgTramaOrdito;
|
||||
}
|
||||
|
||||
public void setNoteOrdTess(String newNoteOrdTess) {
|
||||
this.noteOrdTess = newNoteOrdTess;
|
||||
}
|
||||
|
||||
public long getId_articoloTessutoFilato() {
|
||||
return this.id_articoloTessutoFilato;
|
||||
}
|
||||
|
||||
public long getId_articoloTessuto() {
|
||||
return this.id_articoloTessuto;
|
||||
}
|
||||
|
||||
public long getId_articoloFilatoColore() {
|
||||
return this.id_articoloFilatoColore;
|
||||
}
|
||||
|
||||
public String getSerie() {
|
||||
return (this.serie == null) ? "" : this.serie.trim();
|
||||
}
|
||||
|
||||
public long getOrdine() {
|
||||
return this.ordine;
|
||||
}
|
||||
|
||||
public double getPercentuale() {
|
||||
return this.percentuale;
|
||||
}
|
||||
|
||||
public long getFlgTramaOrdito() {
|
||||
return this.flgTramaOrdito;
|
||||
}
|
||||
|
||||
public String getNoteOrdTess() {
|
||||
return (this.noteOrdTess == null) ? "" : this.noteOrdTess.trim();
|
||||
}
|
||||
|
||||
public void setArticoloTessuto(ArticoloTessuto newArticoloTessuto) {
|
||||
this.articoloTessuto = newArticoloTessuto;
|
||||
}
|
||||
|
||||
public ArticoloTessuto getArticoloTessuto() {
|
||||
this.articoloTessuto = (ArticoloTessuto)getSecondaryObject(this.articoloTessuto, ArticoloTessuto.class,
|
||||
|
||||
getId_articoloTessuto());
|
||||
return this.articoloTessuto;
|
||||
}
|
||||
|
||||
public void setArticoloFilatoColore(ArticoloFilatoColore newArticoloFilatoColore) {
|
||||
this.articoloFilatoColore = newArticoloFilatoColore;
|
||||
}
|
||||
|
||||
public ArticoloFilatoColore getArticoloFilatoColore() {
|
||||
this.articoloFilatoColore = (ArticoloFilatoColore)getSecondaryObject(this.articoloFilatoColore, ArticoloFilatoColore.class,
|
||||
|
||||
getId_articoloFilatoColore());
|
||||
return this.articoloFilatoColore;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,131 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.StringTokenizer;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class ArticoloTessutoLavorazione extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1487851616118L;
|
||||
|
||||
private long id_articoloTessutoLavorazione;
|
||||
|
||||
private long id_lavorazione;
|
||||
|
||||
private long id_articoloTessuto;
|
||||
|
||||
private long ordine;
|
||||
|
||||
private long flgObbligatoria;
|
||||
|
||||
private Lavorazione lavorazione;
|
||||
|
||||
private ArticoloTessuto articoloTessuto;
|
||||
|
||||
public ArticoloTessutoLavorazione(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloTessutoLavorazione() {}
|
||||
|
||||
public void setId_articoloTessutoLavorazione(long newId_articoloTessutoLavorazione) {
|
||||
this.id_articoloTessutoLavorazione = newId_articoloTessutoLavorazione;
|
||||
}
|
||||
|
||||
public void setId_lavorazione(long newId_lavorazione) {
|
||||
this.id_lavorazione = newId_lavorazione;
|
||||
setLavorazione(null);
|
||||
}
|
||||
|
||||
public void setId_articoloTessuto(long newId_articoloTessuto) {
|
||||
this.id_articoloTessuto = newId_articoloTessuto;
|
||||
setArticoloTessuto(null);
|
||||
}
|
||||
|
||||
public void setOrdine(long newOrdine) {
|
||||
this.ordine = newOrdine;
|
||||
}
|
||||
|
||||
public void setFlgObbligatoria(long newFlgObbligatoria) {
|
||||
this.flgObbligatoria = newFlgObbligatoria;
|
||||
}
|
||||
|
||||
public long getId_articoloTessutoLavorazione() {
|
||||
return this.id_articoloTessutoLavorazione;
|
||||
}
|
||||
|
||||
public long getId_lavorazione() {
|
||||
return this.id_lavorazione;
|
||||
}
|
||||
|
||||
public long getId_articoloTessuto() {
|
||||
return this.id_articoloTessuto;
|
||||
}
|
||||
|
||||
public long getOrdine() {
|
||||
return this.ordine;
|
||||
}
|
||||
|
||||
public long getFlgObbligatoria() {
|
||||
return this.flgObbligatoria;
|
||||
}
|
||||
|
||||
public void setLavorazione(Lavorazione newLavorazione) {
|
||||
this.lavorazione = newLavorazione;
|
||||
}
|
||||
|
||||
public Lavorazione getLavorazione() {
|
||||
this.lavorazione = (Lavorazione)getSecondaryObject(this.lavorazione, Lavorazione.class,
|
||||
|
||||
getId_lavorazione());
|
||||
return this.lavorazione;
|
||||
}
|
||||
|
||||
public void setArticoloTessuto(ArticoloTessuto newArticoloTessuto) {
|
||||
this.articoloTessuto = newArticoloTessuto;
|
||||
}
|
||||
|
||||
public ArticoloTessuto getArticoloTessuto() {
|
||||
this.articoloTessuto = (ArticoloTessuto)getSecondaryObject(this.articoloTessuto, ArticoloTessuto.class,
|
||||
|
||||
getId_articoloTessuto());
|
||||
return this.articoloTessuto;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<ArticoloTessutoLavorazione> findByCR(ArticoloTessutoLavorazioneCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from ARTICOLO_TESSUTO_LAVORAZIONE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
public class ArticoloTessutoLavorazioneCR extends CRAdapter {
|
||||
private long id_articoloTessutoLavorazione;
|
||||
|
||||
private long id_lavorazione;
|
||||
|
||||
private long id_articoloTessuto;
|
||||
|
||||
private long ordine;
|
||||
|
||||
private long flgObbligatoria;
|
||||
|
||||
private Lavorazione lavorazione;
|
||||
|
||||
private ArticoloTessuto articoloTessuto;
|
||||
|
||||
public ArticoloTessutoLavorazioneCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ArticoloTessutoLavorazioneCR() {}
|
||||
|
||||
public void setId_articoloTessutoLavorazione(long newId_articoloTessutoLavorazione) {
|
||||
this.id_articoloTessutoLavorazione = newId_articoloTessutoLavorazione;
|
||||
}
|
||||
|
||||
public void setId_lavorazione(long newId_lavorazione) {
|
||||
this.id_lavorazione = newId_lavorazione;
|
||||
setLavorazione(null);
|
||||
}
|
||||
|
||||
public void setId_articoloTessuto(long newId_articoloTessuto) {
|
||||
this.id_articoloTessuto = newId_articoloTessuto;
|
||||
setArticoloTessuto(null);
|
||||
}
|
||||
|
||||
public void setOrdine(long newOrdine) {
|
||||
this.ordine = newOrdine;
|
||||
}
|
||||
|
||||
public void setFlgObbligatoria(long newFlgObbligatoria) {
|
||||
this.flgObbligatoria = newFlgObbligatoria;
|
||||
}
|
||||
|
||||
public long getId_articoloTessutoLavorazione() {
|
||||
return this.id_articoloTessutoLavorazione;
|
||||
}
|
||||
|
||||
public long getId_lavorazione() {
|
||||
return this.id_lavorazione;
|
||||
}
|
||||
|
||||
public long getId_articoloTessuto() {
|
||||
return this.id_articoloTessuto;
|
||||
}
|
||||
|
||||
public long getOrdine() {
|
||||
return this.ordine;
|
||||
}
|
||||
|
||||
public long getFlgObbligatoria() {
|
||||
return this.flgObbligatoria;
|
||||
}
|
||||
|
||||
public void setLavorazione(Lavorazione newLavorazione) {
|
||||
this.lavorazione = newLavorazione;
|
||||
}
|
||||
|
||||
public Lavorazione getLavorazione() {
|
||||
this.lavorazione = (Lavorazione)getSecondaryObject(this.lavorazione, Lavorazione.class,
|
||||
|
||||
getId_lavorazione());
|
||||
return this.lavorazione;
|
||||
}
|
||||
|
||||
public void setArticoloTessuto(ArticoloTessuto newArticoloTessuto) {
|
||||
this.articoloTessuto = newArticoloTessuto;
|
||||
}
|
||||
|
||||
public ArticoloTessuto getArticoloTessuto() {
|
||||
this.articoloTessuto = (ArticoloTessuto)getSecondaryObject(this.articoloTessuto, ArticoloTessuto.class,
|
||||
|
||||
getId_articoloTessuto());
|
||||
return this.articoloTessuto;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
|
||||
public class Clifor extends it.acxent.anag.Clifor {
|
||||
public Clifor(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public Clifor() {}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
|
||||
public class CliforCR extends it.acxent.anag.CliforCR {
|
||||
public CliforCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public CliforCR() {}
|
||||
}
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.StringTokenizer;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class CliforLavorazione extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1487851616559L;
|
||||
|
||||
private long id_cliforLavorazione;
|
||||
|
||||
private long id_clifor;
|
||||
|
||||
private long id_lavorazione;
|
||||
|
||||
private double costoLavorazione;
|
||||
|
||||
private Clifor clifor;
|
||||
|
||||
private Lavorazione lavorazione;
|
||||
|
||||
public CliforLavorazione(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public CliforLavorazione() {}
|
||||
|
||||
public void setId_cliforLavorazione(long newId_cliforLavorazione) {
|
||||
this.id_cliforLavorazione = newId_cliforLavorazione;
|
||||
}
|
||||
|
||||
public void setId_clifor(long newId_clifor) {
|
||||
this.id_clifor = newId_clifor;
|
||||
setClifor(null);
|
||||
}
|
||||
|
||||
public void setId_lavorazione(long newId_lavorazione) {
|
||||
this.id_lavorazione = newId_lavorazione;
|
||||
setLavorazione(null);
|
||||
}
|
||||
|
||||
public long getId_cliforLavorazione() {
|
||||
return this.id_cliforLavorazione;
|
||||
}
|
||||
|
||||
public long getId_clifor() {
|
||||
return this.id_clifor;
|
||||
}
|
||||
|
||||
public long getId_lavorazione() {
|
||||
return this.id_lavorazione;
|
||||
}
|
||||
|
||||
public void setClifor(Clifor newClifor) {
|
||||
this.clifor = newClifor;
|
||||
}
|
||||
|
||||
public Clifor getClifor() {
|
||||
this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class, getId_clifor());
|
||||
return this.clifor;
|
||||
}
|
||||
|
||||
public void setLavorazione(Lavorazione newLavorazione) {
|
||||
this.lavorazione = newLavorazione;
|
||||
}
|
||||
|
||||
public Lavorazione getLavorazione() {
|
||||
this.lavorazione = (Lavorazione)getSecondaryObject(this.lavorazione, Lavorazione.class, getId_lavorazione());
|
||||
return this.lavorazione;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<CliforLavorazione> findByCR(CliforLavorazioneCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from CLIFOR_LAVORAZIONE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public double getCostoLavorazione() {
|
||||
return this.costoLavorazione;
|
||||
}
|
||||
|
||||
public void setCostoLavorazione(double costoLavorazione) {
|
||||
this.costoLavorazione = costoLavorazione;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
public class CliforLavorazioneCR extends CRAdapter {
|
||||
private long id_cliforLavorazione;
|
||||
|
||||
private long id_clifor;
|
||||
|
||||
private long id_lavorazione;
|
||||
|
||||
private Clifor clifor;
|
||||
|
||||
private Lavorazione lavorazione;
|
||||
|
||||
public CliforLavorazioneCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public CliforLavorazioneCR() {}
|
||||
|
||||
public void setId_cliforLavorazione(long newId_cliforLavorazione) {
|
||||
this.id_cliforLavorazione = newId_cliforLavorazione;
|
||||
}
|
||||
|
||||
public void setId_clifor(long newId_clifor) {
|
||||
this.id_clifor = newId_clifor;
|
||||
setClifor(null);
|
||||
}
|
||||
|
||||
public void setId_lavorazione(long newId_lavorazione) {
|
||||
this.id_lavorazione = newId_lavorazione;
|
||||
setLavorazione(null);
|
||||
}
|
||||
|
||||
public long getId_cliforLavorazione() {
|
||||
return this.id_cliforLavorazione;
|
||||
}
|
||||
|
||||
public long getId_clifor() {
|
||||
return this.id_clifor;
|
||||
}
|
||||
|
||||
public long getId_lavorazione() {
|
||||
return this.id_lavorazione;
|
||||
}
|
||||
|
||||
public void setClifor(Clifor newClifor) {
|
||||
this.clifor = newClifor;
|
||||
}
|
||||
|
||||
public Clifor getClifor() {
|
||||
this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class,
|
||||
|
||||
getId_clifor());
|
||||
return this.clifor;
|
||||
}
|
||||
|
||||
public void setLavorazione(Lavorazione newLavorazione) {
|
||||
this.lavorazione = newLavorazione;
|
||||
}
|
||||
|
||||
public Lavorazione getLavorazione() {
|
||||
this.lavorazione = (Lavorazione)getSecondaryObject(this.lavorazione, Lavorazione.class,
|
||||
|
||||
getId_lavorazione());
|
||||
return this.lavorazione;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class ColoreFilato extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1468228167115L;
|
||||
|
||||
private long id_coloreFilato;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private long flgGreggio;
|
||||
|
||||
private long id_fondo;
|
||||
|
||||
private Fondo fondo;
|
||||
|
||||
public ColoreFilato(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ColoreFilato() {}
|
||||
|
||||
public void setId_coloreFilato(long newId_coloreFilato) {
|
||||
this.id_coloreFilato = newId_coloreFilato;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public void setFlgGreggio(long newFlgGreggio) {
|
||||
this.flgGreggio = newFlgGreggio;
|
||||
}
|
||||
|
||||
public void setId_fondo(long newId_fondo) {
|
||||
this.id_fondo = newId_fondo;
|
||||
setFondo(null);
|
||||
}
|
||||
|
||||
public long getId_coloreFilato() {
|
||||
return this.id_coloreFilato;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public long getFlgGreggio() {
|
||||
return this.flgGreggio;
|
||||
}
|
||||
|
||||
public long getId_fondo() {
|
||||
return this.id_fondo;
|
||||
}
|
||||
|
||||
public void setFondo(Fondo newFondo) {
|
||||
this.fondo = newFondo;
|
||||
}
|
||||
|
||||
public Fondo getFondo() {
|
||||
this.fondo = (Fondo)getSecondaryObject(this.fondo, Fondo.class, getId_fondo());
|
||||
return this.fondo;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<ColoreFilato> findByCR(ColoreFilatoCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from COLORE_FILATO AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty())
|
||||
wc.addWc("A.descrizione like '%" + CR.getSearchTxt().trim() + "%'");
|
||||
if (CR.getFlgGreggioS() == 0L) {
|
||||
wc.addWc("(A.flgGreggio = 0 OR A.flgGreggio IS NULL)");
|
||||
} else if (CR.getFlgGreggioS() > 0L) {
|
||||
wc.addWc("A.flgGreggio = " + CR.getFlgGreggioS());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public void findByDescrizione(String l_descrizione) {
|
||||
String s_Sql_Find = "select A.* from COLORE_FILATO AS A";
|
||||
String s_Sql_Order = " order by A.descrizione";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.descrizione ='" + l_descrizione + "'");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + String.valueOf(wc));
|
||||
findFirstRecord(stmt);
|
||||
} catch (Exception e) {
|
||||
handleDebug(e, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
public class ColoreFilatoCR extends CRAdapter {
|
||||
private long id_coloreFilato;
|
||||
|
||||
private String descrizioneS;
|
||||
|
||||
private long flgGreggioS = -1L;
|
||||
|
||||
private long id_fondo;
|
||||
|
||||
private Fondo fondo;
|
||||
|
||||
public ColoreFilatoCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ColoreFilatoCR() {}
|
||||
|
||||
public void setId_coloreFilato(long newId_coloreFilato) {
|
||||
this.id_coloreFilato = newId_coloreFilato;
|
||||
}
|
||||
|
||||
public void setDescrizioneS(String newDescrizione) {
|
||||
this.descrizioneS = newDescrizione;
|
||||
}
|
||||
|
||||
public void setFlgGreggioS(long newFlgGreggio) {
|
||||
this.flgGreggioS = newFlgGreggio;
|
||||
}
|
||||
|
||||
public void setId_fondo(long newId_fondo) {
|
||||
this.id_fondo = newId_fondo;
|
||||
setFondo(null);
|
||||
}
|
||||
|
||||
public long getId_coloreFilato() {
|
||||
return this.id_coloreFilato;
|
||||
}
|
||||
|
||||
public String getDescrizioneS() {
|
||||
return (this.descrizioneS == null) ? "" : this.descrizioneS.trim();
|
||||
}
|
||||
|
||||
public long getFlgGreggioS() {
|
||||
return this.flgGreggioS;
|
||||
}
|
||||
|
||||
public long getId_fondo() {
|
||||
return this.id_fondo;
|
||||
}
|
||||
|
||||
public void setFondo(Fondo newFondo) {
|
||||
this.fondo = newFondo;
|
||||
}
|
||||
|
||||
public Fondo getFondo() {
|
||||
this.fondo = (Fondo)getSecondaryObject(this.fondo, Fondo.class,
|
||||
|
||||
getId_fondo());
|
||||
return this.fondo;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
public class ColoreFilatoFornitore extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1468228167138L;
|
||||
|
||||
private long id_coloreFilatoFornitore;
|
||||
|
||||
private long id_clifor;
|
||||
|
||||
private long id_coloreFilato;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private it.acxent.anag.Clifor clifor;
|
||||
|
||||
private ColoreFilato coloreFilato;
|
||||
|
||||
public ColoreFilatoFornitore(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ColoreFilatoFornitore() {}
|
||||
|
||||
public void setId_coloreFilatoFornitore(long newId_coloreFilatoFornitore) {
|
||||
this.id_coloreFilatoFornitore = newId_coloreFilatoFornitore;
|
||||
}
|
||||
|
||||
public void setId_clifor(long newId_clifor) {
|
||||
this.id_clifor = newId_clifor;
|
||||
setClifor(null);
|
||||
}
|
||||
|
||||
public void setId_coloreFilato(long newId_coloreFilato) {
|
||||
this.id_coloreFilato = newId_coloreFilato;
|
||||
setColoreFilato(null);
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public long getId_coloreFilatoFornitore() {
|
||||
return this.id_coloreFilatoFornitore;
|
||||
}
|
||||
|
||||
public long getId_clifor() {
|
||||
return this.id_clifor;
|
||||
}
|
||||
|
||||
public long getId_coloreFilato() {
|
||||
return this.id_coloreFilato;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public void setClifor(it.acxent.anag.Clifor newClifor) {
|
||||
this.clifor = newClifor;
|
||||
}
|
||||
|
||||
public it.acxent.anag.Clifor getClifor() {
|
||||
this.clifor = (it.acxent.anag.Clifor)getSecondaryObject(this.clifor, it.acxent.anag.Clifor.class,
|
||||
|
||||
getId_clifor());
|
||||
return this.clifor;
|
||||
}
|
||||
|
||||
public void setColoreFilato(ColoreFilato newColoreFilato) {
|
||||
this.coloreFilato = newColoreFilato;
|
||||
}
|
||||
|
||||
public ColoreFilato getColoreFilato() {
|
||||
this.coloreFilato = (ColoreFilato)getSecondaryObject(this.coloreFilato, ColoreFilato.class,
|
||||
|
||||
getId_coloreFilato());
|
||||
return this.coloreFilato;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<ColoreFilatoFornitore> findByCR(ColoreFilatoFornitoreCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from COLORE_FILATO_FORNITORE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
public class ColoreFilatoFornitoreCR extends CRAdapter {
|
||||
private long id_coloreFilatoFornitore;
|
||||
|
||||
private long id_clifor;
|
||||
|
||||
private long id_coloreFilato;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private it.acxent.anag.Clifor clifor;
|
||||
|
||||
private ColoreFilato coloreFilato;
|
||||
|
||||
public ColoreFilatoFornitoreCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ColoreFilatoFornitoreCR() {}
|
||||
|
||||
public void setId_coloreFilatoFornitore(long newId_coloreFilatoFornitore) {
|
||||
this.id_coloreFilatoFornitore = newId_coloreFilatoFornitore;
|
||||
}
|
||||
|
||||
public void setId_clifor(long newId_clifor) {
|
||||
this.id_clifor = newId_clifor;
|
||||
setClifor(null);
|
||||
}
|
||||
|
||||
public void setId_coloreFilato(long newId_coloreFilato) {
|
||||
this.id_coloreFilato = newId_coloreFilato;
|
||||
setColoreFilato(null);
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public long getId_coloreFilatoFornitore() {
|
||||
return this.id_coloreFilatoFornitore;
|
||||
}
|
||||
|
||||
public long getId_clifor() {
|
||||
return this.id_clifor;
|
||||
}
|
||||
|
||||
public long getId_coloreFilato() {
|
||||
return this.id_coloreFilato;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public void setClifor(it.acxent.anag.Clifor newClifor) {
|
||||
this.clifor = newClifor;
|
||||
}
|
||||
|
||||
public it.acxent.anag.Clifor getClifor() {
|
||||
this.clifor = (it.acxent.anag.Clifor)getSecondaryObject(this.clifor, it.acxent.anag.Clifor.class,
|
||||
|
||||
getId_clifor());
|
||||
return this.clifor;
|
||||
}
|
||||
|
||||
public void setColoreFilato(ColoreFilato newColoreFilato) {
|
||||
this.coloreFilato = newColoreFilato;
|
||||
}
|
||||
|
||||
public ColoreFilato getColoreFilato() {
|
||||
this.coloreFilato = (ColoreFilato)getSecondaryObject(this.coloreFilato, ColoreFilato.class,
|
||||
|
||||
getId_coloreFilato());
|
||||
return this.coloreFilato;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.StringTokenizer;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class ColoreFondo extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1468228167159L;
|
||||
|
||||
private long id_coloreFondo;
|
||||
|
||||
private long id_fondo;
|
||||
|
||||
private String colore;
|
||||
|
||||
private Fondo fondo;
|
||||
|
||||
public ColoreFondo(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ColoreFondo() {}
|
||||
|
||||
public void setId_coloreFondo(long newId_coloreFondo) {
|
||||
this.id_coloreFondo = newId_coloreFondo;
|
||||
}
|
||||
|
||||
public void setId_fondo(long newId_fondo) {
|
||||
this.id_fondo = newId_fondo;
|
||||
setFondo(null);
|
||||
}
|
||||
|
||||
public void setColore(String newColore) {
|
||||
this.colore = newColore;
|
||||
}
|
||||
|
||||
public long getId_coloreFondo() {
|
||||
return this.id_coloreFondo;
|
||||
}
|
||||
|
||||
public long getId_fondo() {
|
||||
return this.id_fondo;
|
||||
}
|
||||
|
||||
public String getColore() {
|
||||
return (this.colore == null) ? "" : this.colore.trim();
|
||||
}
|
||||
|
||||
public void setFondo(Fondo newFondo) {
|
||||
this.fondo = newFondo;
|
||||
}
|
||||
|
||||
public Fondo getFondo() {
|
||||
this.fondo = (Fondo)getSecondaryObject(this.fondo, Fondo.class, getId_fondo());
|
||||
return this.fondo;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<ColoreFondo> findByCR(ColoreFondoCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from COLORE_FONDO AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public Vectumerator<ColoreFondo> findByFondo(long id_fondo) {
|
||||
String s_Sql_Find = "select A.* from COLORE_FONDO AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc(" A.id_fondo = " + id_fondo);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public void findByColoreDatiTecnici(String colore, long id_datiTecniciTessuto) {
|
||||
String s_Sql_Find = "select A.* from COLORE_FONDO AS A INNER JOIN FONDO AS B ON A.id_fondo = B.id_fondo ";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc(" A.colore = '" + colore + "' ");
|
||||
wc.addWc(" B.id_datiTecniciTessuto = " + id_datiTecniciTessuto);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
findFirstRecord(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
public class ColoreFondoCR extends CRAdapter {
|
||||
private long id_coloreFondo;
|
||||
|
||||
private long id_fondo;
|
||||
|
||||
private String colore;
|
||||
|
||||
private Fondo fondo;
|
||||
|
||||
public ColoreFondoCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ColoreFondoCR() {}
|
||||
|
||||
public void setId_coloreFondo(long newId_coloreFondo) {
|
||||
this.id_coloreFondo = newId_coloreFondo;
|
||||
}
|
||||
|
||||
public void setId_fondo(long newId_fondo) {
|
||||
this.id_fondo = newId_fondo;
|
||||
setFondo(null);
|
||||
}
|
||||
|
||||
public void setColore(String newColore) {
|
||||
this.colore = newColore;
|
||||
}
|
||||
|
||||
public long getId_coloreFondo() {
|
||||
return this.id_coloreFondo;
|
||||
}
|
||||
|
||||
public long getId_fondo() {
|
||||
return this.id_fondo;
|
||||
}
|
||||
|
||||
public String getColore() {
|
||||
return (this.colore == null) ? "" : this.colore.trim();
|
||||
}
|
||||
|
||||
public void setFondo(Fondo newFondo) {
|
||||
this.fondo = newFondo;
|
||||
}
|
||||
|
||||
public Fondo getFondo() {
|
||||
this.fondo = (Fondo)getSecondaryObject(this.fondo, Fondo.class,
|
||||
|
||||
getId_fondo());
|
||||
return this.fondo;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
public class ComposizioneResult {
|
||||
private double perc;
|
||||
|
||||
private String composizione;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
public ComposizioneResult(double perc, String composizione, String descrizione) {
|
||||
this.perc = perc;
|
||||
this.composizione = composizione;
|
||||
this.descrizione = descrizione;
|
||||
}
|
||||
|
||||
public double getPerc() {
|
||||
return this.perc;
|
||||
}
|
||||
|
||||
public void setPerc(double perc) {
|
||||
this.perc = perc;
|
||||
}
|
||||
|
||||
public String getComposizione() {
|
||||
return this.composizione;
|
||||
}
|
||||
|
||||
public void setComposizione(String composizione) {
|
||||
this.composizione = composizione;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return this.descrizione;
|
||||
}
|
||||
|
||||
public void setDescrizione(String descrizione) {
|
||||
this.descrizione = descrizione;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.StringTokenizer;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class Confezione extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1468228167203L;
|
||||
|
||||
private long id_confezione;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private long flgTipo;
|
||||
|
||||
public Confezione(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public Confezione() {}
|
||||
|
||||
public void setId_confezione(long newId_confezione) {
|
||||
this.id_confezione = newId_confezione;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public void setFlgTipo(long newFlgTipo) {
|
||||
this.flgTipo = newFlgTipo;
|
||||
}
|
||||
|
||||
public long getId_confezione() {
|
||||
return this.id_confezione;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public long getFlgTipo() {
|
||||
return this.flgTipo;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<Confezione> findByCR(ConfezioneCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from CONFEZIONE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
public class ConfezioneCR extends CRAdapter {
|
||||
private long id_confezione;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private long flgTipo;
|
||||
|
||||
public ConfezioneCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public ConfezioneCR() {}
|
||||
|
||||
public void setId_confezione(long newId_confezione) {
|
||||
this.id_confezione = newId_confezione;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public void setFlgTipo(long newFlgTipo) {
|
||||
this.flgTipo = newFlgTipo;
|
||||
}
|
||||
|
||||
public long getId_confezione() {
|
||||
return this.id_confezione;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public long getFlgTipo() {
|
||||
return this.flgTipo;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.StringTokenizer;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class FaseLavorazione extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1468228167621L;
|
||||
|
||||
private long id_faseLavorazione;
|
||||
|
||||
private long codFase;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private String descrizioneBreve;
|
||||
|
||||
public FaseLavorazione(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public FaseLavorazione() {}
|
||||
|
||||
public void setId_faseLavorazione(long newId_faseLavorazione) {
|
||||
this.id_faseLavorazione = newId_faseLavorazione;
|
||||
}
|
||||
|
||||
public void setCodFase(long newCodFase) {
|
||||
this.codFase = newCodFase;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public void setDescrizioneBreve(String newDescizioneBreve) {
|
||||
this.descrizioneBreve = newDescizioneBreve;
|
||||
}
|
||||
|
||||
public long getId_faseLavorazione() {
|
||||
return this.id_faseLavorazione;
|
||||
}
|
||||
|
||||
public long getCodFase() {
|
||||
return this.codFase;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public String getDescrizioneBreve() {
|
||||
return (this.descrizioneBreve == null) ? "" : this.descrizioneBreve.trim();
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<FaseLavorazione> findByCR(FaseLavorazioneCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from FASE_LAVORAZIONE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
public class FaseLavorazioneCR extends CRAdapter {
|
||||
private long id_faseLavorazione;
|
||||
|
||||
private long codFase;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private String descizioneBreve;
|
||||
|
||||
public FaseLavorazioneCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public FaseLavorazioneCR() {}
|
||||
|
||||
public void setId_faseLavorazione(long newId_faseLavorazione) {
|
||||
this.id_faseLavorazione = newId_faseLavorazione;
|
||||
}
|
||||
|
||||
public void setCodFase(long newCodFase) {
|
||||
this.codFase = newCodFase;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public void setDescizioneBreve(String newDescizioneBreve) {
|
||||
this.descizioneBreve = newDescizioneBreve;
|
||||
}
|
||||
|
||||
public long getId_faseLavorazione() {
|
||||
return this.id_faseLavorazione;
|
||||
}
|
||||
|
||||
public long getCodFase() {
|
||||
return this.codFase;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public String getDescizioneBreve() {
|
||||
return (this.descizioneBreve == null) ? "" : this.descizioneBreve.trim();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.StringTokenizer;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
@Deprecated
|
||||
public class Fondo extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1468228167664L;
|
||||
|
||||
private long id_fondo;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
public Fondo(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public Fondo() {}
|
||||
|
||||
public void setId_fondo(long newId_fondo) {
|
||||
this.id_fondo = newId_fondo;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public long getId_fondo() {
|
||||
return this.id_fondo;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<Fondo> findByCR(FondoCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from FONDO AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public Vectumerator<Fondo> findByDatiTecniciTessuto(long id_datiTecniciTessuto) {
|
||||
String s_Sql_Find = "select A.* from FONDO AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc(" A.id_datiTecniciTessuto = " + id_datiTecniciTessuto);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public Vectumerator<ColoreFondo> getColori() {
|
||||
return new ColoreFondo(getApFull()).findByFondo(getId_fondo());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
@Deprecated
|
||||
public class FondoCR extends CRAdapter {
|
||||
private long id_fondo;
|
||||
|
||||
private long id_articoloTessuto;
|
||||
|
||||
private String serie;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private ArticoloTessuto articoloTessuto;
|
||||
|
||||
public FondoCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public FondoCR() {}
|
||||
|
||||
public void setId_fondo(long newId_fondo) {
|
||||
this.id_fondo = newId_fondo;
|
||||
}
|
||||
|
||||
public void setId_articoloTessuto(long newId_articoloTessuto) {
|
||||
this.id_articoloTessuto = newId_articoloTessuto;
|
||||
setArticoloTessuto(null);
|
||||
}
|
||||
|
||||
public void setSerie(String newSerie) {
|
||||
this.serie = newSerie;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public long getId_fondo() {
|
||||
return this.id_fondo;
|
||||
}
|
||||
|
||||
public long getId_articoloTessuto() {
|
||||
return this.id_articoloTessuto;
|
||||
}
|
||||
|
||||
public String getSerie() {
|
||||
return (this.serie == null) ? "" : this.serie.trim();
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public void setArticoloTessuto(ArticoloTessuto newArticoloTessuto) {
|
||||
this.articoloTessuto = newArticoloTessuto;
|
||||
}
|
||||
|
||||
public ArticoloTessuto getArticoloTessuto() {
|
||||
this.articoloTessuto = (ArticoloTessuto)getSecondaryObject(this.articoloTessuto, ArticoloTessuto.class,
|
||||
|
||||
getId_articoloTessuto());
|
||||
return this.articoloTessuto;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,149 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.art.TipologiaArticolo;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.StringTokenizer;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class Lavorazione extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1487851617570L;
|
||||
|
||||
private long id_lavorazione;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private String abbreviazione;
|
||||
|
||||
private long id_tipoLavorazione;
|
||||
|
||||
private long flgUdm;
|
||||
|
||||
private double costo;
|
||||
|
||||
private TipoLavorazione tipoLavorazione;
|
||||
|
||||
public Lavorazione(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public Lavorazione() {}
|
||||
|
||||
public void setId_lavorazione(long newId_lavorazione) {
|
||||
this.id_lavorazione = newId_lavorazione;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public void setId_tipoLavorazione(long newId_tipoLavorazione) {
|
||||
this.id_tipoLavorazione = newId_tipoLavorazione;
|
||||
setTipoLavorazione(null);
|
||||
}
|
||||
|
||||
public long getId_lavorazione() {
|
||||
return this.id_lavorazione;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public long getId_tipoLavorazione() {
|
||||
return this.id_tipoLavorazione;
|
||||
}
|
||||
|
||||
public void setTipoLavorazione(TipoLavorazione newTipoLavorazione) {
|
||||
this.tipoLavorazione = newTipoLavorazione;
|
||||
}
|
||||
|
||||
public TipoLavorazione getTipoLavorazione() {
|
||||
this.tipoLavorazione = (TipoLavorazione)getSecondaryObject(this.tipoLavorazione, TipoLavorazione.class, getId_tipoLavorazione());
|
||||
return this.tipoLavorazione;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<Lavorazione> findByCR(LavorazioneCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from LAVORAZIONE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public double getCosto() {
|
||||
return this.costo;
|
||||
}
|
||||
|
||||
public void setCosto(double costo) {
|
||||
this.costo = costo;
|
||||
}
|
||||
|
||||
public long getFlgUdm() {
|
||||
return this.flgUdm;
|
||||
}
|
||||
|
||||
public void setFlgUdm(long flgUdm) {
|
||||
this.flgUdm = flgUdm;
|
||||
}
|
||||
|
||||
public static String getUdm(long l_flgUdm) {
|
||||
return TipologiaArticolo.getUdm(l_flgUdm);
|
||||
}
|
||||
|
||||
public String getUdm() {
|
||||
return TipologiaArticolo.getUdm(getFlgUdm());
|
||||
}
|
||||
|
||||
public Vectumerator<Lavorazione> findByTipoDocumento(long l_id_tipoDocumento) {
|
||||
String s_Sql_Find = "select A.* from LAVORAZIONE AS A inner join TIPO_DOCUMENTO_LAVORAZIONE AS B ON B.id_lavorazione=A.id_lavorazione";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("B.id_tipoDocumento=" + l_id_tipoDocumento);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public String getAbbreviazione() {
|
||||
return (this.abbreviazione == null) ? "" : this.abbreviazione.trim();
|
||||
}
|
||||
|
||||
public void setAbbreviazione(String abbreviazione) {
|
||||
this.abbreviazione = abbreviazione;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
public class LavorazioneCR extends CRAdapter {
|
||||
private long id_lavorazione;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private long id_tipoLavorazione;
|
||||
|
||||
private TipoLavorazione tipoLavorazione;
|
||||
|
||||
public LavorazioneCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public LavorazioneCR() {}
|
||||
|
||||
public void setId_lavorazione(long newId_lavorazione) {
|
||||
this.id_lavorazione = newId_lavorazione;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public void setId_tipoLavorazione(long newId_tipoLavorazione) {
|
||||
this.id_tipoLavorazione = newId_tipoLavorazione;
|
||||
setTipoLavorazione(null);
|
||||
}
|
||||
|
||||
public long getId_lavorazione() {
|
||||
return this.id_lavorazione;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public long getId_tipoLavorazione() {
|
||||
return this.id_tipoLavorazione;
|
||||
}
|
||||
|
||||
public void setTipoLavorazione(TipoLavorazione newTipoLavorazione) {
|
||||
this.tipoLavorazione = newTipoLavorazione;
|
||||
}
|
||||
|
||||
public TipoLavorazione getTipoLavorazione() {
|
||||
this.tipoLavorazione = (TipoLavorazione)getSecondaryObject(this.tipoLavorazione, TipoLavorazione.class,
|
||||
|
||||
getId_tipoLavorazione());
|
||||
return this.tipoLavorazione;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.DBAdapterException;
|
||||
import it.acxent.db.ResParm;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class Pezza extends DBAdapter {
|
||||
public Pezza() {}
|
||||
|
||||
public Pezza(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() throws DBAdapterException, SQLException {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class Rincorso extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1468228167115L;
|
||||
|
||||
private long id_rincorso;
|
||||
|
||||
private String descrizioneRincorso;
|
||||
|
||||
private String dettaglioRincorso;
|
||||
|
||||
public Rincorso(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public Rincorso() {}
|
||||
|
||||
public long getId_rincorso() {
|
||||
return this.id_rincorso;
|
||||
}
|
||||
|
||||
public void setId_rincorso(long id_rincorso) {
|
||||
this.id_rincorso = id_rincorso;
|
||||
}
|
||||
|
||||
public void setDescrizioneRincorso(String descrizioneRincorso) {
|
||||
this.descrizioneRincorso = descrizioneRincorso;
|
||||
}
|
||||
|
||||
public String getDescrizioneRincorso() {
|
||||
return (this.descrizioneRincorso == null) ? "" : this.descrizioneRincorso.trim();
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<Rincorso> findByCR(RincorsoCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from RINCORSO AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty())
|
||||
wc.addWc("A.descrizione like '%" + CR.getSearchTxt().trim() + "%'");
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public String getDettaglioRincorso() {
|
||||
return (this.dettaglioRincorso == null) ? "" : this.dettaglioRincorso;
|
||||
}
|
||||
|
||||
public void setDettaglioRincorso(String dettaglioRincorso) {
|
||||
this.dettaglioRincorso = dettaglioRincorso;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class RincorsoCR extends CRAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1468228167115L;
|
||||
|
||||
private long id_rincorso;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
public RincorsoCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public RincorsoCR() {}
|
||||
|
||||
public long getId_rincorso() {
|
||||
return this.id_rincorso;
|
||||
}
|
||||
|
||||
public void setId_rincorso(long id_rincorso) {
|
||||
this.id_rincorso = id_rincorso;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.StringTokenizer;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class Stagione extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1468228168655L;
|
||||
|
||||
private long id_stagione;
|
||||
|
||||
public Stagione(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public Stagione() {}
|
||||
|
||||
public void setId_stagione(long newId_stagione) {
|
||||
this.id_stagione = newId_stagione;
|
||||
}
|
||||
|
||||
public long getId_stagione() {
|
||||
return this.id_stagione;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<Stagione> findByCR(StagioneCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from STAGIONE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return getDescrizione("");
|
||||
}
|
||||
|
||||
public String getDescrizione(String lang) {
|
||||
if (lang.isEmpty())
|
||||
lang = "it";
|
||||
return getDescTxtLang("descrizione", lang);
|
||||
}
|
||||
|
||||
public String getDescrizione(String lang, int stringCaseType) {
|
||||
String str = new String();
|
||||
str = convertStringCase(getDescrizione(lang), stringCaseType);
|
||||
return str;
|
||||
}
|
||||
|
||||
public boolean useDescLangTables() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
public class StagioneCR extends CRAdapter {
|
||||
private long id_stagione;
|
||||
|
||||
public StagioneCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public StagioneCR() {}
|
||||
|
||||
public void setId_stagione(long newId_stagione) {
|
||||
this.id_stagione = newId_stagione;
|
||||
}
|
||||
|
||||
public long getId_stagione() {
|
||||
return this.id_stagione;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,147 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.contab.RigaDocumento;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.StringTokenizer;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class Telaio extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1550483866536L;
|
||||
|
||||
public static final long TIPO_TELAIO_STD = 0L;
|
||||
|
||||
public static final long TIPO_TELAIO_JACQUARD = 1L;
|
||||
|
||||
private long id_telaio;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private String codiceTelaio;
|
||||
|
||||
private long flgTipoTelaio;
|
||||
|
||||
private long colpiMinuto;
|
||||
|
||||
private RigaDocumento rigaDocumento;
|
||||
|
||||
public Telaio(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public Telaio() {}
|
||||
|
||||
public void setId_telaio(long newId_telaio) {
|
||||
this.id_telaio = newId_telaio;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public void setCodiceTelaio(String newCodiceTelaio) {
|
||||
this.codiceTelaio = newCodiceTelaio;
|
||||
}
|
||||
|
||||
public void setFlgTipoTelaio(long newFlgTipoTelaio) {
|
||||
this.flgTipoTelaio = newFlgTipoTelaio;
|
||||
}
|
||||
|
||||
public void setColpiMinuto(long newColpiMinuto) {
|
||||
this.colpiMinuto = newColpiMinuto;
|
||||
}
|
||||
|
||||
public long getId_telaio() {
|
||||
return this.id_telaio;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public String getCodiceTelaio() {
|
||||
return (this.codiceTelaio == null) ? "" : this.codiceTelaio.trim();
|
||||
}
|
||||
|
||||
public String getTipoTelaio() {
|
||||
return getTipoTelaio(getFlgTipoTelaio());
|
||||
}
|
||||
|
||||
public long getColpiMinuto() {
|
||||
return this.colpiMinuto;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<Telaio> findByCR(TelaioCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from TELAIO AS A";
|
||||
String s_Sql_Order = " order by descrizione";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public long getFlgTipoTelaio() {
|
||||
return this.flgTipoTelaio;
|
||||
}
|
||||
|
||||
public long findColpiIniziali() {
|
||||
if (getId_telaio() <= 0L)
|
||||
return 0L;
|
||||
RigaDocumento doc = new RigaDocumento(getApFull());
|
||||
doc.findByTelaioUltimo(getId_telaio());
|
||||
if (doc.getId_rigaDocumento() == 0L)
|
||||
return 0L;
|
||||
return doc.getColpoFinaleRiga();
|
||||
}
|
||||
|
||||
public String getDescrizioneCompleta() {
|
||||
StringBuilder sb = new StringBuilder(getDescrizione());
|
||||
sb.append(" mt. lav. ");
|
||||
sb.append(getNf().format(getRigaDocumento().getDatiTelaioInLavorazione(getId_telaio())));
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public static final String getTipoTelaio(long l_flgTipoTelaio) {
|
||||
switch ((int)l_flgTipoTelaio) {
|
||||
case 1:
|
||||
return "Jacquard";
|
||||
case 0:
|
||||
return "Standard";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public RigaDocumento getRigaDocumento() {
|
||||
if (this.rigaDocumento == null)
|
||||
this.rigaDocumento = new RigaDocumento(getApFull());
|
||||
return this.rigaDocumento;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
public class TelaioCR extends CRAdapter {
|
||||
private long id_telaio;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private String codiceTelaio;
|
||||
|
||||
private long flgTipoTelaio;
|
||||
|
||||
private long colpiMinuto;
|
||||
|
||||
public TelaioCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public TelaioCR() {}
|
||||
|
||||
public void setId_telaio(long newId_telaio) {
|
||||
this.id_telaio = newId_telaio;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public void setCodiceTelaio(String newCodiceTelaio) {
|
||||
this.codiceTelaio = newCodiceTelaio;
|
||||
}
|
||||
|
||||
public void setFlgTipoTelaio(long newFlgTipoTelaio) {
|
||||
this.flgTipoTelaio = newFlgTipoTelaio;
|
||||
}
|
||||
|
||||
public void setColpiMinuto(long newColpiMinuto) {
|
||||
this.colpiMinuto = newColpiMinuto;
|
||||
}
|
||||
|
||||
public long getId_telaio() {
|
||||
return this.id_telaio;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
public String getCodiceTelaio() {
|
||||
return (this.codiceTelaio == null) ? "" : this.codiceTelaio.trim();
|
||||
}
|
||||
|
||||
public long getFlgTipoTelaio() {
|
||||
return this.flgTipoTelaio;
|
||||
}
|
||||
|
||||
public long getColpiMinuto() {
|
||||
return this.colpiMinuto;
|
||||
}
|
||||
|
||||
public String getTipoTelaio() {
|
||||
return Telaio.getTipoTelaio(getFlgTipoTelaio());
|
||||
}
|
||||
|
||||
public static final String getTipoTelaio(long l_flgTipoTelaio) {
|
||||
return Telaio.getTipoTelaio(l_flgTipoTelaio);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.contab.TipoDocumento;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.StringTokenizer;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class TipoDocumentoLavorazione extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1677754312426L;
|
||||
|
||||
private long id_tipoDocumentoLavorazione;
|
||||
|
||||
private long id_tipoDocumento;
|
||||
|
||||
private long id_lavorazione;
|
||||
|
||||
private TipoDocumento tipoDocumento;
|
||||
|
||||
private Lavorazione lavorazione;
|
||||
|
||||
public TipoDocumentoLavorazione(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public TipoDocumentoLavorazione() {}
|
||||
|
||||
public void setId_tipoDocumentoLavorazione(long newId_tipoDocumentoLavorazione) {
|
||||
this.id_tipoDocumentoLavorazione = newId_tipoDocumentoLavorazione;
|
||||
}
|
||||
|
||||
public void setId_tipoDocumento(long newId_tipoDocumento) {
|
||||
this.id_tipoDocumento = newId_tipoDocumento;
|
||||
setTipoDocumento(null);
|
||||
}
|
||||
|
||||
public void setId_lavorazione(long newId_lavorazione) {
|
||||
this.id_lavorazione = newId_lavorazione;
|
||||
setLavorazione(null);
|
||||
}
|
||||
|
||||
public long getId_tipoDocumentoLavorazione() {
|
||||
return this.id_tipoDocumentoLavorazione;
|
||||
}
|
||||
|
||||
public long getId_tipoDocumento() {
|
||||
return this.id_tipoDocumento;
|
||||
}
|
||||
|
||||
public long getId_lavorazione() {
|
||||
return this.id_lavorazione;
|
||||
}
|
||||
|
||||
public void setTipoDocumento(TipoDocumento newTipoDocumento) {
|
||||
this.tipoDocumento = newTipoDocumento;
|
||||
}
|
||||
|
||||
public TipoDocumento getTipoDocumento() {
|
||||
this.tipoDocumento = (TipoDocumento)getSecondaryObject(this.tipoDocumento, TipoDocumento.class, getId_tipoDocumento());
|
||||
return this.tipoDocumento;
|
||||
}
|
||||
|
||||
public void setLavorazione(Lavorazione newLavorazione) {
|
||||
this.lavorazione = newLavorazione;
|
||||
}
|
||||
|
||||
public Lavorazione getLavorazione() {
|
||||
this.lavorazione = (Lavorazione)getSecondaryObject(this.lavorazione, Lavorazione.class, getId_lavorazione());
|
||||
return this.lavorazione;
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<TipoDocumentoLavorazione> findByCR(TipoDocumentoLavorazioneCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from TIPO_DOCUMENTO_LAVORAZIONE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public Vectumerator<TipoDocumentoLavorazione> findByLavorazione(long l_id_lavorazione) {
|
||||
String s_Sql_Find = "select A.* from TIPO_DOCUMENTO_LAVORAZIONE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_lavorazione=" + l_id_lavorazione);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
public Vectumerator<TipoDocumentoLavorazione> findByTipoDocumento(long l_id_tipoDocumento) {
|
||||
String s_Sql_Find = "select A.* from TIPO_DOCUMENTO_LAVORAZIONE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
wc.addWc("A.id_tipoDocumento=" + l_id_tipoDocumento);
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.contab.TipoDocumento;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
public class TipoDocumentoLavorazioneCR extends CRAdapter {
|
||||
private static final long serialVersionUID = -6752866295536270754L;
|
||||
|
||||
private long id_documentoLavorazione;
|
||||
|
||||
private long id_documento;
|
||||
|
||||
private long id_lavorazione;
|
||||
|
||||
private TipoDocumento tipoDocumento;
|
||||
|
||||
private Lavorazione lavorazione;
|
||||
|
||||
public TipoDocumentoLavorazioneCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public TipoDocumentoLavorazioneCR() {}
|
||||
|
||||
public void setId_documentoLavorazione(long newId_documentoLavorazione) {
|
||||
this.id_documentoLavorazione = newId_documentoLavorazione;
|
||||
}
|
||||
|
||||
public void setId_documento(long newId_documento) {
|
||||
this.id_documento = newId_documento;
|
||||
setDocumento(null);
|
||||
}
|
||||
|
||||
public void setId_lavorazione(long newId_lavorazione) {
|
||||
this.id_lavorazione = newId_lavorazione;
|
||||
setLavorazione(null);
|
||||
}
|
||||
|
||||
public long getId_documentoLavorazione() {
|
||||
return this.id_documentoLavorazione;
|
||||
}
|
||||
|
||||
public long getId_documento() {
|
||||
return this.id_documento;
|
||||
}
|
||||
|
||||
public long getId_lavorazione() {
|
||||
return this.id_lavorazione;
|
||||
}
|
||||
|
||||
public void setDocumento(TipoDocumento newDocumento) {
|
||||
this.tipoDocumento = newDocumento;
|
||||
}
|
||||
|
||||
public TipoDocumento getDocumento() {
|
||||
this.tipoDocumento = (TipoDocumento)getSecondaryObject(this.tipoDocumento, TipoDocumento.class,
|
||||
|
||||
getId_documento());
|
||||
return this.tipoDocumento;
|
||||
}
|
||||
|
||||
public void setLavorazione(Lavorazione newLavorazione) {
|
||||
this.lavorazione = newLavorazione;
|
||||
}
|
||||
|
||||
public Lavorazione getLavorazione() {
|
||||
this.lavorazione = (Lavorazione)getSecondaryObject(this.lavorazione, Lavorazione.class,
|
||||
|
||||
getId_lavorazione());
|
||||
return this.lavorazione;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.db.WcString;
|
||||
import it.acxent.util.StringTokenizer;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class TipoLavorazione extends DBAdapter implements Serializable {
|
||||
private static final long serialVersionUID = 1487851619334L;
|
||||
|
||||
private long id_tipoLavorazione;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
public TipoLavorazione(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public TipoLavorazione() {}
|
||||
|
||||
public void setId_tipoLavorazione(long newId_tipoLavorazione) {
|
||||
this.id_tipoLavorazione = newId_tipoLavorazione;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public long getId_tipoLavorazione() {
|
||||
return this.id_tipoLavorazione;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
|
||||
protected ResParm checkDeleteCascade() {
|
||||
return new ResParm(true);
|
||||
}
|
||||
|
||||
protected void deleteCascade() {}
|
||||
|
||||
public Vectumerator<TipoLavorazione> findByCR(TipoLavorazioneCR CR, int pageNumber, int pageRows) {
|
||||
String s_Sql_Find = "select A.* from TIPO_LAVORAZIONE AS A";
|
||||
String s_Sql_Order = "";
|
||||
WcString wc = new WcString();
|
||||
if (!CR.getSearchTxt().trim().isEmpty()) {
|
||||
StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
|
||||
StringBuffer txt = new StringBuffer("(");
|
||||
while (st.hasMoreTokens()) {
|
||||
String token = st.nextToken();
|
||||
txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
|
||||
if (st.hasMoreTokens())
|
||||
txt.append(" and ");
|
||||
}
|
||||
txt.append(")");
|
||||
wc.addWc(txt.toString());
|
||||
}
|
||||
try {
|
||||
PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
|
||||
return findRows(stmt, pageNumber, pageRows);
|
||||
} catch (SQLException e) {
|
||||
removeCPConnection();
|
||||
handleDebug(e);
|
||||
return AB_EMPTY_VECTUMERATOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package it.acxent.tex.anag;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
|
||||
public class TipoLavorazioneCR extends CRAdapter {
|
||||
private long id_tipoLavorazione;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
public TipoLavorazioneCR(ApplParmFull newApplParmFull) {
|
||||
super(newApplParmFull);
|
||||
}
|
||||
|
||||
public TipoLavorazioneCR() {}
|
||||
|
||||
public void setId_tipoLavorazione(long newId_tipoLavorazione) {
|
||||
this.id_tipoLavorazione = newId_tipoLavorazione;
|
||||
}
|
||||
|
||||
public void setDescrizione(String newDescrizione) {
|
||||
this.descrizione = newDescrizione;
|
||||
}
|
||||
|
||||
public long getId_tipoLavorazione() {
|
||||
return this.id_tipoLavorazione;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return (this.descrizione == null) ? "" : this.descrizione.trim();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package it.acxent.tex.anag.servlet;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.tex.anag.Armatura;
|
||||
import it.acxent.tex.anag.ArmaturaCR;
|
||||
import it.acxent.tex.anag.ArmaturaDettaglio;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(urlPatterns = {"/admin/tessutoConfig/Armatura.abl"})
|
||||
public class ArmaturaSvlt extends _AnagTexAdapterSvlt {
|
||||
private static final long serialVersionUID = -4764615882757681658L;
|
||||
|
||||
protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {
|
||||
Armatura bean = (Armatura)beanA;
|
||||
req.setAttribute("list", new ArmaturaDettaglio(getApFull(req)).findByArmatura(bean.getId_armatura()));
|
||||
}
|
||||
|
||||
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected DBAdapter getBean(HttpServletRequest req) {
|
||||
return new Armatura(getApFull(req));
|
||||
}
|
||||
|
||||
protected CRAdapter getBeanCR(HttpServletRequest req) {
|
||||
return new ArmaturaCR(getApFull(req));
|
||||
}
|
||||
|
||||
protected ResParm afterSave(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
Vectumerator<ArmaturaDettaglio> vec = new Vectumerator();
|
||||
Armatura bean = (Armatura)beanA;
|
||||
for (int i = 1; (long)i <= bean.getNumColpi(); i++) {
|
||||
ArmaturaDettaglio row = new ArmaturaDettaglio(apFull);
|
||||
row.findByArmaturaRiga(bean.getId_armatura(), (long)i);
|
||||
row.setId_armatura(bean.getId_armatura());
|
||||
row.setNRiga((long)i);
|
||||
row.setArmaturaRiga(getRequestParameter(req, "riga_" + i));
|
||||
vec.add(row);
|
||||
}
|
||||
bean.salvaDettaglio(vec);
|
||||
return super.afterSave(beanA, req, res);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
package it.acxent.tex.anag.servlet;
|
||||
|
||||
import it.acxent.art.Componente;
|
||||
import it.acxent.art.ComponenteCR;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.tex.anag.ArticoloFilato;
|
||||
import it.acxent.tex.anag.ArticoloFilatoColore;
|
||||
import it.acxent.tex.anag.ArticoloFilatoColoreCR;
|
||||
import it.acxent.tex.anag.ArticoloFilatoComponente;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(urlPatterns = {"/admin/filato/ArticoloFilatoColore.abl"})
|
||||
public class ArticoloFilatoColoreSvlt extends _AnagTexAdapterSvlt {
|
||||
private static final long serialVersionUID = -759824067431772574L;
|
||||
|
||||
protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
ArticoloFilato bean = (ArticoloFilato)beanA;
|
||||
req.setAttribute("listaComponenti", new Componente(apFull).findByCR(new ComponenteCR(), 0, 0));
|
||||
req.setAttribute("listaFilatoComponenti", new ArticoloFilatoComponente(apFull).findByArticoloFilato(bean.getId_articoloFilato()));
|
||||
req.setAttribute("listaFilatiColori", new ArticoloFilatoColore(getApFull()).findByArticoloFilato(bean.getId_articoloFilato()));
|
||||
}
|
||||
|
||||
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected DBAdapter getBean(HttpServletRequest req) {
|
||||
return new ArticoloFilatoColore(getApFull(req));
|
||||
}
|
||||
|
||||
protected CRAdapter getBeanCR(HttpServletRequest req) {
|
||||
return new ArticoloFilatoColoreCR(getApFull(req));
|
||||
}
|
||||
|
||||
public void _xaddComponente(HttpServletRequest req, HttpServletResponse res) {
|
||||
long id_articoloFilatoComponente = getRequestLongParameter(req, "id_articoloFilatoComponente");
|
||||
ArticoloFilatoComponente bean2 = new ArticoloFilatoComponente(getApFull());
|
||||
bean2.findByPrimaryKey(id_articoloFilatoComponente);
|
||||
fillObject(req, bean2);
|
||||
ResParm rp = bean2.save();
|
||||
sendMessage(req, rp.getMsg());
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _xdelComponente(HttpServletRequest req, HttpServletResponse res) {
|
||||
long id_articoloFilatoComponente = getRequestLongParameter(req, "id_articoloFilatoComponente");
|
||||
ArticoloFilatoComponente bean2 = new ArticoloFilatoComponente(getApFull());
|
||||
bean2.findByPrimaryKey(id_articoloFilatoComponente);
|
||||
ResParm rp = bean2.delete();
|
||||
sendMessage(req, rp.getMsg());
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _dettaglioDisponibilita(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
ArticoloFilatoColoreCR CR = new ArticoloFilatoColoreCR(apFull);
|
||||
fillObject(req, CR);
|
||||
ArticoloFilatoColore bean = new ArticoloFilatoColore(apFull);
|
||||
Vectumerator<ArticoloFilatoColore> vec = bean.findByCRDispoMagazzino(CR, 0, 0);
|
||||
req.setAttribute("list", vec);
|
||||
req.setAttribute("nf", getNf());
|
||||
setJspPageRelative("articoloFilatoColoreDispo.jsp", req);
|
||||
callJsp(req, res);
|
||||
}
|
||||
|
||||
public void _xdelColore(HttpServletRequest req, HttpServletResponse res) {
|
||||
long id_articoloFilatoColore = getRequestLongParameter(req, "id_articoloFilatoColore");
|
||||
ArticoloFilatoColore bean2 = new ArticoloFilatoColore(getApFull());
|
||||
bean2.findByPrimaryKey(id_articoloFilatoColore);
|
||||
ResParm rp = bean2.delete();
|
||||
sendMessage(req, rp.getMsg());
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {
|
||||
req.setAttribute("listaComponenti", new Componente(getApFull()).findByCR(new ComponenteCR(), 0, 0));
|
||||
}
|
||||
|
||||
protected String getBeanPageName(HttpServletRequest req) {
|
||||
long flgTipoRicerca = getRequestLongParameter(req, "flgTipoRicerca");
|
||||
if (flgTipoRicerca == 1L)
|
||||
return super.getBeanPageName(req) + "Ser";
|
||||
return super.getBeanPageName(req);
|
||||
}
|
||||
|
||||
public void _xaddColore(HttpServletRequest req, HttpServletResponse res) {
|
||||
long id_articoloFilatoColore = getRequestLongParameter(req, "id_articoloFilatoColore");
|
||||
ArticoloFilatoColore bean2 = new ArticoloFilatoColore(getApFull());
|
||||
bean2.findByPrimaryKey(id_articoloFilatoColore);
|
||||
fillObject(req, bean2);
|
||||
ResParm rp = bean2.save();
|
||||
sendMessage(req, rp.getMsg());
|
||||
showBean(req, res);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
package it.acxent.tex.anag.servlet;
|
||||
|
||||
import it.acxent.anag.Iva;
|
||||
import it.acxent.art.Componente;
|
||||
import it.acxent.art.ComponenteCR;
|
||||
import it.acxent.contab.RigaDocumento;
|
||||
import it.acxent.contab.RigaDocumentoCR;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.tex.anag.ArticoloFilato;
|
||||
import it.acxent.tex.anag.ArticoloFilatoCR;
|
||||
import it.acxent.tex.anag.ArticoloFilatoColore;
|
||||
import it.acxent.tex.anag.ArticoloFilatoComponente;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(urlPatterns = {"/admin/filato/ArticoloFilato.abl"})
|
||||
public class ArticoloFilatoSvlt extends _AnagTexAdapterSvlt {
|
||||
private static final long serialVersionUID = -759824067431772574L;
|
||||
|
||||
protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
ArticoloFilato bean = (ArticoloFilato)beanA;
|
||||
req.setAttribute("listaComponenti", new Componente(apFull).findByCR(new ComponenteCR(), 0, 0));
|
||||
req.setAttribute("listaFilatoComponenti", new ArticoloFilatoComponente(apFull).findByArticoloFilato(bean.getId_articoloFilato()));
|
||||
req.setAttribute("listaFilatiColori", new ArticoloFilatoColore(getApFull()).findByArticoloFilato(bean.getId_articoloFilato()));
|
||||
req.setAttribute("listaIva", new Iva(apFull).findAll());
|
||||
}
|
||||
|
||||
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected DBAdapter getBean(HttpServletRequest req) {
|
||||
return new ArticoloFilato(getApFull(req));
|
||||
}
|
||||
|
||||
protected CRAdapter getBeanCR(HttpServletRequest req) {
|
||||
return new ArticoloFilatoCR(getApFull(req));
|
||||
}
|
||||
|
||||
public void _addComponente(HttpServletRequest req, HttpServletResponse res) {
|
||||
long id_articoloFilatoComponente = getRequestLongParameter(req, "id_articoloFilatoComponente");
|
||||
ArticoloFilatoComponente bean2 = new ArticoloFilatoComponente(getApFull());
|
||||
bean2.findByPrimaryKey(id_articoloFilatoComponente);
|
||||
fillObject(req, bean2);
|
||||
ResParm rp = bean2.save();
|
||||
sendMessage(req, rp.getMsg());
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _delComponente(HttpServletRequest req, HttpServletResponse res) {
|
||||
long id_articoloFilatoComponente = getRequestLongParameter(req, "id_articoloFilatoComponente");
|
||||
ArticoloFilatoComponente bean2 = new ArticoloFilatoComponente(getApFull());
|
||||
bean2.findByPrimaryKey(id_articoloFilatoComponente);
|
||||
ResParm rp = bean2.delete();
|
||||
sendMessage(req, rp.getMsg());
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _addColore(HttpServletRequest req, HttpServletResponse res) {
|
||||
long id_articoloFilatoColore = getRequestLongParameter(req, "id_articoloFilatoColore");
|
||||
ArticoloFilatoColore bean2 = new ArticoloFilatoColore(getApFull());
|
||||
bean2.findByPrimaryKey(id_articoloFilatoColore);
|
||||
fillObject(req, bean2);
|
||||
ResParm rp = bean2.save();
|
||||
sendMessage(req, rp.getMsg());
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _delColore(HttpServletRequest req, HttpServletResponse res) {
|
||||
long id_articoloFilatoColore = getRequestLongParameter(req, "id_articoloFilatoColore");
|
||||
ArticoloFilatoColore bean2 = new ArticoloFilatoColore(getApFull());
|
||||
bean2.findByPrimaryKey(id_articoloFilatoColore);
|
||||
ResParm rp = bean2.delete();
|
||||
sendMessage(req, rp.getMsg());
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
req.setAttribute("listaComponenti", new Componente(apFull).findByCR(new ComponenteCR(), 0, 0));
|
||||
req.setAttribute("listaIva", new Iva(apFull).findAll());
|
||||
}
|
||||
|
||||
public void _viewMRD(HttpServletRequest req, HttpServletResponse res) {
|
||||
ArticoloFilato bean = new ArticoloFilato(getApFull(req));
|
||||
long l_id_articoloFilato = getRequestLongParameter(req, "id_articoloFilato");
|
||||
bean.findByPrimaryKey(l_id_articoloFilato);
|
||||
setJspPageRelative("articoloFilatoViewMovimentoRD.jsp", req);
|
||||
RigaDocumentoCR CR = new RigaDocumentoCR();
|
||||
CR.setId_articoloFilato(l_id_articoloFilato);
|
||||
CR.setFlgTipoMagazzino(1L);
|
||||
RigaDocumento mov = new RigaDocumento(getApFull(req));
|
||||
Vectumerator vec = mov.findMagFilatoSaldiArticoloFilatoByCR(CR, 0, 0);
|
||||
req.setAttribute("listaArticoliVarianteMovimentoRD", vec);
|
||||
req.setAttribute("bean", bean);
|
||||
callJsp(req, res);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package it.acxent.tex.anag.servlet;
|
||||
|
||||
import it.acxent.art.Componente;
|
||||
import it.acxent.art.ComponenteCR;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.tex.anag.ArticoloFilato;
|
||||
import it.acxent.tex.anag.ArticoloFilatoColore;
|
||||
import it.acxent.tex.anag.ArticoloFilatoComponente;
|
||||
import it.acxent.tex.anag.ArticoloTessutoColore;
|
||||
import it.acxent.tex.anag.ArticoloTessutoColoreCR;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(urlPatterns = {"/admin/tessuto/ArticoloTessutoColore.abl"})
|
||||
public class ArticoloTessutoColoreSvlt extends _AnagTexAdapterSvlt {
|
||||
private static final long serialVersionUID = -759826667431772574L;
|
||||
|
||||
protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
ArticoloFilato bean = (ArticoloFilato)beanA;
|
||||
req.setAttribute("listaComponenti", new Componente(apFull).findByCR(new ComponenteCR(), 0, 0));
|
||||
req.setAttribute("listaFilatoComponenti", new ArticoloFilatoComponente(apFull).findByArticoloFilato(bean.getId_articoloFilato()));
|
||||
req.setAttribute("listaFilatiColori", new ArticoloFilatoColore(getApFull()).findByArticoloFilato(bean.getId_articoloFilato()));
|
||||
}
|
||||
|
||||
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected DBAdapter getBean(HttpServletRequest req) {
|
||||
return new ArticoloTessutoColore(getApFull(req));
|
||||
}
|
||||
|
||||
protected CRAdapter getBeanCR(HttpServletRequest req) {
|
||||
return new ArticoloTessutoColoreCR(getApFull(req));
|
||||
}
|
||||
|
||||
public void _dettaglioDisponibilita(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
ArticoloTessutoColoreCR CR = new ArticoloTessutoColoreCR(apFull);
|
||||
fillObject(req, CR);
|
||||
ArticoloTessutoColore bean = new ArticoloTessutoColore(apFull);
|
||||
Vectumerator<ArticoloTessutoColore> vec = bean.findByCRDispoMagazzino(CR, 0, 0);
|
||||
req.setAttribute("list", vec);
|
||||
req.setAttribute("nf", getNf());
|
||||
setJspPageRelative("articoloTessutoColoreDispo.jsp", req);
|
||||
callJsp(req, res);
|
||||
}
|
||||
|
||||
protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {
|
||||
req.setAttribute("listaComponenti", new Componente(getApFull()).findByCR(new ComponenteCR(), 0, 0));
|
||||
}
|
||||
|
||||
protected String getBeanPageName(HttpServletRequest req) {
|
||||
long flgTipoRicerca = getRequestLongParameter(req, "flgTipoRicerca");
|
||||
if (flgTipoRicerca == 1L)
|
||||
return super.getBeanPageName(req) + "Ser";
|
||||
return super.getBeanPageName(req);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,344 @@
|
|||
package it.acxent.tex.anag.servlet;
|
||||
|
||||
import it.acxent.anag.Fornitore;
|
||||
import it.acxent.anag.Iva;
|
||||
import it.acxent.anag.MagFisico;
|
||||
import it.acxent.art.ArticoloFornitore;
|
||||
import it.acxent.art.Colore;
|
||||
import it.acxent.art.ColoreCR;
|
||||
import it.acxent.art.Componente;
|
||||
import it.acxent.art.ComponenteCR;
|
||||
import it.acxent.contab.RigaDocumento;
|
||||
import it.acxent.contab.RigaDocumentoCR;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.tex.anag.ArticoloFilatoColore;
|
||||
import it.acxent.tex.anag.ArticoloTessuto;
|
||||
import it.acxent.tex.anag.ArticoloTessutoAccoppiato;
|
||||
import it.acxent.tex.anag.ArticoloTessutoCR;
|
||||
import it.acxent.tex.anag.ArticoloTessutoColore;
|
||||
import it.acxent.tex.anag.ArticoloTessutoComponente;
|
||||
import it.acxent.tex.anag.ArticoloTessutoFilato;
|
||||
import it.acxent.tex.anag.Stagione;
|
||||
import it.acxent.util.AbMessages;
|
||||
import it.acxent.util.Vectumerator;
|
||||
import javax.servlet.RequestDispatcher;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(urlPatterns = {"/admin/tessuto/ArticoloTessuto.abl"})
|
||||
public class ArticoloTessutoSvlt extends _AnagTexAdapterSvlt {
|
||||
private static final long serialVersionUID = -759824067431772574L;
|
||||
|
||||
protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
ArticoloTessuto bean = (ArticoloTessuto)beanA;
|
||||
req.setAttribute("listaArticoloTessutoFilato", bean.findArticoliTessutoFilati(0, 0));
|
||||
req.setAttribute("listaComponenti", new Componente(apFull).findByCR(new ComponenteCR(), 0, 0));
|
||||
req.setAttribute("listaTessutoComponenti", new ArticoloTessutoComponente(apFull)
|
||||
.findByArticoloTessuto(bean.getId_articoloTessuto()));
|
||||
req.setAttribute("listaColori", new Colore(apFull).findByCR(new ColoreCR(), 0, 0));
|
||||
req.setAttribute("listaTessutoColori", new ArticoloTessutoColore(apFull).findByArticoloTessuto(bean.getId_articoloTessuto()));
|
||||
req.setAttribute("listaStagioni", new Stagione(apFull).findAll());
|
||||
req.setAttribute("listaIva", new Iva(apFull).findAll());
|
||||
if (bean.getFlgTipoTessutoM() == 2L)
|
||||
req.setAttribute("listaArticoloTessutoAccoppiato", bean.findArticoliTessutoAccoppiati());
|
||||
if (bean.getTipo().getFlgFornitori() == 1L) {
|
||||
req.setAttribute("listaFornitori", new Fornitore(apFull).findAll());
|
||||
req.setAttribute("listaArticoloFornitori", bean.getFornitori());
|
||||
}
|
||||
}
|
||||
|
||||
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected DBAdapter getBean(HttpServletRequest req) {
|
||||
return new ArticoloTessuto(getApFull(req));
|
||||
}
|
||||
|
||||
protected CRAdapter getBeanCR(HttpServletRequest req) {
|
||||
return new ArticoloTessutoCR(getApFull(req));
|
||||
}
|
||||
|
||||
public void _caricaColoreFilato(HttpServletRequest req, HttpServletResponse res) {
|
||||
long id_articoloFilato = getRequestLongParameter(req, "id_articoloFilato");
|
||||
ArticoloFilatoColore afc = new ArticoloFilatoColore(getApFull(req));
|
||||
Vectumerator<ArticoloFilatoColore> vecAfc = afc.findByArticoloFilato(id_articoloFilato);
|
||||
req.setAttribute("listaColori", vecAfc);
|
||||
try {
|
||||
RequestDispatcher rd = getServletContext().getRequestDispatcher("/admin/tessutoConfig/_fetchComboFilatoColore.jsp");
|
||||
rd.forward((ServletRequest)req, (ServletResponse)res);
|
||||
} catch (Exception e) {
|
||||
handleDebug(e, 2);
|
||||
}
|
||||
}
|
||||
|
||||
public void _delFilatoM(HttpServletRequest req, HttpServletResponse res) {
|
||||
ResParm rp;
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
ArticoloTessutoFilato bean2 = new ArticoloTessutoFilato(getApFull(req));
|
||||
fillObject(req, bean2);
|
||||
if (bean2.getId_articoloTessutoFilato() > 0L) {
|
||||
bean2.findByPrimaryKey(bean2.getId_articoloTessutoFilato());
|
||||
rp = bean2.delete();
|
||||
} else {
|
||||
rp = new ResParm(false, "Errore! Impossibile cancelalre filato");
|
||||
}
|
||||
sendMessage(req, rp.getMsg());
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _modFilatoM(HttpServletRequest req, HttpServletResponse res) {
|
||||
long id_articoloTessutoFilato = getRequestLongParameter(req, "id_articoloTessutoFilato");
|
||||
ArticoloTessutoFilato bean2 = new ArticoloTessutoFilato(getApFull());
|
||||
bean2.findByPrimaryKey(id_articoloTessutoFilato);
|
||||
req.setAttribute("bean2", bean2);
|
||||
ArticoloFilatoColore afc = new ArticoloFilatoColore(getApFull(req));
|
||||
Vectumerator<ArticoloFilatoColore> vecAfc = afc.findByArticoloFilato(bean2.getArticoloFilatoColore().getId_articoloFilato());
|
||||
req.setAttribute("listaColori", vecAfc);
|
||||
sendMessage(req, "Modifica Filato Colore");
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
req.setAttribute("bean", getBean(req));
|
||||
req.setAttribute("listaComponenti", new Componente(apFull).findByCR(new ComponenteCR(), 0, 0));
|
||||
req.setAttribute("listaStagioni", new Stagione(apFull).findAll());
|
||||
req.setAttribute("listaIva", new Iva(apFull).findAll());
|
||||
}
|
||||
|
||||
protected void showBean(HttpServletRequest req, HttpServletResponse res) {
|
||||
super.showBean(req, res);
|
||||
}
|
||||
|
||||
public void _addFilatoM(HttpServletRequest req, HttpServletResponse res) {
|
||||
ResParm rp;
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
ArticoloTessutoFilato bean2 = new ArticoloTessutoFilato(apFull);
|
||||
fillObject(req, bean2);
|
||||
if (bean2.getId_articoloTessutoFilato() > 0L) {
|
||||
bean2.findByPrimaryKey(bean2.getId_articoloTessutoFilato());
|
||||
fillObject(req, bean2);
|
||||
}
|
||||
long id_articoloFilatoColore = getRequestLongParameter(req, "id_articoloFilatoColore");
|
||||
if (id_articoloFilatoColore == 0L) {
|
||||
rp = new ResParm(false, "Errore! filato o colore non impostato correttamente");
|
||||
} else {
|
||||
ArticoloFilatoColore afc = new ArticoloFilatoColore(apFull);
|
||||
afc.findByPrimaryKey(id_articoloFilatoColore);
|
||||
if (afc.getId_articoloFilatoColore() == 0L) {
|
||||
rp = new ResParm(false, "Errore! Colore filato non trovato");
|
||||
} else {
|
||||
bean2.setId_articoloFilatoColore(afc.getId_articoloFilatoColore());
|
||||
rp = bean2.save();
|
||||
}
|
||||
}
|
||||
sendMessage(req, rp.getMsg());
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _addTessutAccoppiato(HttpServletRequest req, HttpServletResponse res) {
|
||||
ResParm rp;
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
ArticoloTessutoAccoppiato bean2 = new ArticoloTessutoAccoppiato(apFull);
|
||||
fillObject(req, bean2);
|
||||
if (bean2.getId_articoloTessutoAccoppiato() > 0L)
|
||||
bean2.findByPrimaryKey(bean2.getId_articoloTessutoAccoppiato());
|
||||
if (bean2.getId_articoloTessuto() > 0L && bean2.getId_articoloTessutoComponente() > 0L) {
|
||||
rp = bean2.save();
|
||||
} else {
|
||||
rp = new ResParm(false, "Errore! Tessuto accoppiato non selezionato correttamente");
|
||||
}
|
||||
sendMessage(req, rp.getMsg());
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _delTessutAccoppiato(HttpServletRequest req, HttpServletResponse res) {
|
||||
ResParm rp;
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
ArticoloTessutoAccoppiato bean2 = new ArticoloTessutoAccoppiato(apFull);
|
||||
fillObject(req, bean2);
|
||||
if (bean2.getId_articoloTessutoAccoppiato() > 0L) {
|
||||
bean2.findByPrimaryKey(bean2.getId_articoloTessutoAccoppiato());
|
||||
rp = bean2.delete();
|
||||
} else {
|
||||
rp = new ResParm(false, "Errore! Impossibile cancelalre filato");
|
||||
}
|
||||
sendMessage(req, rp.getMsg());
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _viewMRD(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
ArticoloTessuto bean = new ArticoloTessuto(apFull);
|
||||
long l_id_articoloTessuto = getRequestLongParameter(req, "id_articoloTessuto");
|
||||
bean.findByPrimaryKey(l_id_articoloTessuto);
|
||||
setJspPageRelative("articoloTessutoViewMovimentoRD.jsp", req);
|
||||
RigaDocumentoCR CR = new RigaDocumentoCR();
|
||||
CR.setId_articolo(l_id_articoloTessuto);
|
||||
CR.setFlgTipoMagazzino(1L);
|
||||
RigaDocumento mov = new RigaDocumento(apFull);
|
||||
Vectumerator vec = mov.findMagTessutoSaldiArticoloTessutoByCR(CR, 0, 0);
|
||||
req.setAttribute("listaArticoliTessutoVarianteMovimentoRD", vec);
|
||||
req.setAttribute("bean", bean);
|
||||
req.setAttribute("mag_fisico", new MagFisico(apFull));
|
||||
callJsp(req, res);
|
||||
}
|
||||
|
||||
public void _addComponente(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
long l_id_articoloTessuto = getRequestLongParameter(req, "id_articoloTessuto");
|
||||
ArticoloTessuto bean = new ArticoloTessuto(apFull);
|
||||
bean.findByPrimaryKey(l_id_articoloTessuto);
|
||||
if (bean.getId_articoloTessuto() > 0L) {
|
||||
fillObject(req, bean);
|
||||
ResParm rp = bean.save();
|
||||
if (rp.getStatus()) {
|
||||
long id_articolotessutoComponente = getRequestLongParameter(req, "id_articoloTessutoComponente");
|
||||
ArticoloTessutoComponente bean2 = new ArticoloTessutoComponente(apFull);
|
||||
bean2.findByPrimaryKey(id_articolotessutoComponente);
|
||||
fillObject(req, bean2);
|
||||
rp = bean2.save();
|
||||
req.setAttribute("currentFocus", "id_componente");
|
||||
sendMessage(req, rp.getMsg());
|
||||
} else {
|
||||
sendMessage(req, "ERRORE! " + rp.getMsg());
|
||||
}
|
||||
} else {
|
||||
sendMessage(req, "ERRORE! Tesuto non trovato!");
|
||||
}
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _delComponente(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
long l_id_articoloTessuto = getRequestLongParameter(req, "id_articoloTessuto");
|
||||
ArticoloTessuto bean = new ArticoloTessuto(apFull);
|
||||
bean.findByPrimaryKey(l_id_articoloTessuto);
|
||||
if (bean.getId_articoloTessuto() > 0L) {
|
||||
fillObject(req, bean);
|
||||
ResParm rp = bean.save();
|
||||
if (rp.getStatus()) {
|
||||
long id_articolotessutoComponente = getRequestLongParameter(req, "id_articoloTessutoComponente");
|
||||
ArticoloTessutoComponente bean2 = new ArticoloTessutoComponente(getApFull());
|
||||
bean2.findByPrimaryKey(id_articolotessutoComponente);
|
||||
rp = bean2.delete();
|
||||
req.setAttribute("currentFocus", "id_componente");
|
||||
sendMessage(req, rp.getMsg());
|
||||
} else {
|
||||
sendMessage(req, "ERRORE! " + rp.getMsg());
|
||||
}
|
||||
} else {
|
||||
sendMessage(req, "ERRORE! Tesuto non trovato!");
|
||||
}
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _addFornitore(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
ArticoloTessuto bean = null;
|
||||
ResParm rp = new ResParm(true, "");
|
||||
long l_id = getRequestLongParameter(req, "id_articoloTessuto");
|
||||
bean = new ArticoloTessuto(apFull);
|
||||
try {
|
||||
bean.findByPrimaryKey(l_id);
|
||||
ArticoloFornitore ca = new ArticoloFornitore(apFull);
|
||||
if (!getRequestParameter(req, "id_clifor").equals("")) {
|
||||
fillObject(req, ca);
|
||||
rp = bean.addFornitore(ca);
|
||||
if (rp.getStatus()) {
|
||||
sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_OK"));
|
||||
} else {
|
||||
sendMessage(req, rp.getMsg());
|
||||
}
|
||||
} else {
|
||||
sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_FAIL"));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _delColore(HttpServletRequest req, HttpServletResponse res) {
|
||||
long id_articoloTessutoColore = getRequestLongParameter(req, "id_articoloTessutoColore");
|
||||
ArticoloTessutoColore bean2 = new ArticoloTessutoColore(getApFull());
|
||||
bean2.findByPrimaryKey(id_articoloTessutoColore);
|
||||
ResParm rp = bean2.delete();
|
||||
sendMessage(req, rp.getMsg());
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _addColore(HttpServletRequest req, HttpServletResponse res) {
|
||||
long id_articoloTessutoColore = getRequestLongParameter(req, "id_articoloTessutoColore");
|
||||
ArticoloTessutoColore bean2 = new ArticoloTessutoColore(getApFull());
|
||||
bean2.findByPrimaryKey(id_articoloTessutoColore);
|
||||
fillObject(req, bean2);
|
||||
ResParm rp = bean2.save();
|
||||
sendMessage(req, rp.getMsg());
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _modFornitore(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
ArticoloTessuto bean = null;
|
||||
ResParm rp = new ResParm(true, "");
|
||||
long l_id = getRequestLongParameter(req, "id_articoloTessuto");
|
||||
bean = new ArticoloTessuto(apFull);
|
||||
try {
|
||||
bean.findByPrimaryKey(l_id);
|
||||
ArticoloFornitore ca = new ArticoloFornitore(apFull);
|
||||
if (bean.getId_articoloTessuto() > 0L && getRequestLongParameter(req, "id_articoloFornitore") != 0L) {
|
||||
fillObject(req, ca);
|
||||
ca.findByPrimaryKey(ca.getId_articoloFornitore());
|
||||
req.setAttribute("beanAF", ca);
|
||||
sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_OK"));
|
||||
} else {
|
||||
sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_FAIL"));
|
||||
}
|
||||
showBean(req, res);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _delFornitore(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
ArticoloTessuto bean = null;
|
||||
ResParm rp = new ResParm(true, "");
|
||||
long l_id = getRequestLongParameter(req, "id_articoloTessuto");
|
||||
bean = new ArticoloTessuto(apFull);
|
||||
try {
|
||||
bean.findByPrimaryKey(l_id);
|
||||
ArticoloFornitore ca = new ArticoloFornitore(apFull);
|
||||
if (bean.getId_articoloTessuto() > 0L && getRequestLongParameter(req, "id_articoloFornitore") != 0L) {
|
||||
fillObject(req, ca);
|
||||
rp = bean.delFornitore(ca);
|
||||
if (rp.getStatus()) {
|
||||
sendMessage(req, AbMessages.getMessage(getLocale(req), "DELETE_OK"));
|
||||
} else {
|
||||
sendMessage(req, AbMessages.getMessage(getLocale(req), "DELETE_FAIL"));
|
||||
}
|
||||
} else {
|
||||
sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_FAIL"));
|
||||
}
|
||||
showBean(req, res);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
protected String getBeanPageName(HttpServletRequest req) {
|
||||
long flgTipoRicerca = getRequestLongParameter(req, "flgTipoRicerca");
|
||||
if (flgTipoRicerca == 1L)
|
||||
return super.getBeanPageName(req) + "Ser";
|
||||
return super.getBeanPageName(req);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package it.acxent.tex.anag.servlet;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.tex.anag.ColoreFilato;
|
||||
import it.acxent.tex.anag.ColoreFilatoCR;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(urlPatterns = {"/admin/filatoConfig/ColoreFilato.abl"})
|
||||
public class ColoreFilatoSvlt extends _AnagTexAdapterSvlt {
|
||||
private static final long serialVersionUID = 2381754886730461451L;
|
||||
|
||||
protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
req.setAttribute("listaColori", new ColoreFilato(apFull).findByCR(new ColoreFilatoCR(apFull), 0, 0));
|
||||
}
|
||||
|
||||
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected DBAdapter getBean(HttpServletRequest req) {
|
||||
return new ColoreFilato(getApFull(req));
|
||||
}
|
||||
|
||||
protected CRAdapter getBeanCR(HttpServletRequest req) {
|
||||
return new ColoreFilatoCR(getApFull(req));
|
||||
}
|
||||
|
||||
protected boolean isSimpleServlet(HttpServletRequest req) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package it.acxent.tex.anag.servlet;
|
||||
|
||||
import it.acxent.db.CRAdapter;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.tex.anag.Confezione;
|
||||
import it.acxent.tex.anag.ConfezioneCR;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(urlPatterns = {"/admin/filatoConfig/Confezione.abl"})
|
||||
public class ConfezioneSvlt extends _AnagTexAdapterSvlt {
|
||||
private static final long serialVersionUID = 6770137718896083667L;
|
||||
|
||||
protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected DBAdapter getBean(HttpServletRequest req) {
|
||||
return new Confezione(getApFull(req));
|
||||
}
|
||||
|
||||
protected CRAdapter getBeanCR(HttpServletRequest req) {
|
||||
return new ConfezioneCR(getApFull(req));
|
||||
}
|
||||
|
||||
protected boolean isSimpleServlet(HttpServletRequest req) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package it.acxent.tex.anag.servlet;
|
||||
|
||||
import it.acxent.db.CRAdapter;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.tex.anag.FaseLavorazione;
|
||||
import it.acxent.tex.anag.FaseLavorazioneCR;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(urlPatterns = {"/admin/tessConfig/FaseLavorazione.abl"})
|
||||
public class FaseLavorazioneSvlt extends _AnagTexAdapterSvlt {
|
||||
private static final long serialVersionUID = -6052440168181209388L;
|
||||
|
||||
protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected DBAdapter getBean(HttpServletRequest req) {
|
||||
return new FaseLavorazione(getApFull(req));
|
||||
}
|
||||
|
||||
protected CRAdapter getBeanCR(HttpServletRequest req) {
|
||||
return new FaseLavorazioneCR(getApFull(req));
|
||||
}
|
||||
|
||||
protected boolean isSimpleServlet(HttpServletRequest req) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package it.acxent.tex.anag.servlet;
|
||||
|
||||
import it.acxent.db.CRAdapter;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.tex.anag.Fondo;
|
||||
import it.acxent.tex.anag.FondoCR;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(urlPatterns = {"/admin/tessutoConfig/Fondi.abl"})
|
||||
public class FondoSvlt extends _AnagTexAdapterSvlt {
|
||||
private static final long serialVersionUID = 2381754886730461451L;
|
||||
|
||||
protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected DBAdapter getBean(HttpServletRequest req) {
|
||||
return new Fondo(getApFull(req));
|
||||
}
|
||||
|
||||
protected CRAdapter getBeanCR(HttpServletRequest req) {
|
||||
return new FondoCR(getApFull(req));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package it.acxent.tex.anag.servlet;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.tex.anag.Lavorazione;
|
||||
import it.acxent.tex.anag.LavorazioneCR;
|
||||
import it.acxent.tex.anag.TipoLavorazione;
|
||||
import it.acxent.tex.anag.TipoLavorazioneCR;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(urlPatterns = {"/admin/lavConfig/Lavorazione.abl"})
|
||||
public class LavorazioneSvlt extends _AnagTexAdapterSvlt {
|
||||
private static final long serialVersionUID = 2381754886730461451L;
|
||||
|
||||
protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
}
|
||||
|
||||
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
req.setAttribute("listaTipoLavorazioni", new TipoLavorazione(apFull).findByCR(new TipoLavorazioneCR(apFull), 0, 0));
|
||||
}
|
||||
|
||||
protected DBAdapter getBean(HttpServletRequest req) {
|
||||
return new Lavorazione(getApFull(req));
|
||||
}
|
||||
|
||||
protected CRAdapter getBeanCR(HttpServletRequest req) {
|
||||
return new LavorazioneCR(getApFull(req));
|
||||
}
|
||||
|
||||
protected boolean isSimpleServlet(HttpServletRequest req) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package it.acxent.tex.anag.servlet;
|
||||
|
||||
import it.acxent.db.CRAdapter;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.tex.anag.Rincorso;
|
||||
import it.acxent.tex.anag.RincorsoCR;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(urlPatterns = {"/admin/tessutoConfig/Rincorso.abl"})
|
||||
public class RincorsoSvlt extends _AnagTexAdapterSvlt {
|
||||
private static final long serialVersionUID = -4764615882757681658L;
|
||||
|
||||
protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected DBAdapter getBean(HttpServletRequest req) {
|
||||
return new Rincorso(getApFull(req));
|
||||
}
|
||||
|
||||
protected CRAdapter getBeanCR(HttpServletRequest req) {
|
||||
return new RincorsoCR(getApFull(req));
|
||||
}
|
||||
|
||||
protected boolean isSimpleServlet(HttpServletRequest req) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package it.acxent.tex.anag.servlet;
|
||||
|
||||
import it.acxent.db.CRAdapter;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.tex.anag.Stagione;
|
||||
import it.acxent.tex.anag.StagioneCR;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(urlPatterns = {"/admin/tessutoConfig/Stagione.abl"})
|
||||
public class StagioneSvlt extends _AnagTexAdapterSvlt {
|
||||
private static final long serialVersionUID = 2381754886730461451L;
|
||||
|
||||
protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected DBAdapter getBean(HttpServletRequest req) {
|
||||
return new Stagione(getApFull(req));
|
||||
}
|
||||
|
||||
protected CRAdapter getBeanCR(HttpServletRequest req) {
|
||||
return new StagioneCR(getApFull(req));
|
||||
}
|
||||
|
||||
protected boolean isSimpleServlet(HttpServletRequest req) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package it.acxent.tex.anag.servlet;
|
||||
|
||||
import it.acxent.db.CRAdapter;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.tex.anag.Telaio;
|
||||
import it.acxent.tex.anag.TelaioCR;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(urlPatterns = {"/admin/tessConfig/Telaio.abl"})
|
||||
public class TelaioSvlt extends _AnagTexAdapterSvlt {
|
||||
private static final long serialVersionUID = 6770137718896083667L;
|
||||
|
||||
protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected DBAdapter getBean(HttpServletRequest req) {
|
||||
return new Telaio(getApFull(req));
|
||||
}
|
||||
|
||||
protected CRAdapter getBeanCR(HttpServletRequest req) {
|
||||
return new TelaioCR(getApFull(req));
|
||||
}
|
||||
|
||||
protected boolean isSimpleServlet(HttpServletRequest req) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package it.acxent.tex.anag.servlet;
|
||||
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.tex.anag.TipoLavorazione;
|
||||
import it.acxent.tex.anag.TipoLavorazioneCR;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(urlPatterns = {"/admin/lavConfig/TipoLavorazione.abl"})
|
||||
public class TipoLavorazioneSvlt extends _AnagTexAdapterSvlt {
|
||||
private static final long serialVersionUID = 2381754886730461451L;
|
||||
|
||||
protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
}
|
||||
|
||||
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected DBAdapter getBean(HttpServletRequest req) {
|
||||
return new TipoLavorazione(getApFull(req));
|
||||
}
|
||||
|
||||
protected CRAdapter getBeanCR(HttpServletRequest req) {
|
||||
return new TipoLavorazioneCR(getApFull(req));
|
||||
}
|
||||
|
||||
protected boolean isSimpleServlet(HttpServletRequest req) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
package it.acxent.tex.anag.servlet;
|
||||
|
||||
import it.acxent.servlet.AblServletSvlt;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
public abstract class _AnagTexAdapterSvlt extends AblServletSvlt {
|
||||
private static final long serialVersionUID = 6021726472382295093L;
|
||||
|
||||
protected boolean checkLoginProfile(HttpServletRequest req) {
|
||||
try {
|
||||
if (getLoginUser(req) == null) {
|
||||
forceJspPage(getLoginPage(null, null), req);
|
||||
return true;
|
||||
}
|
||||
if (getLoginUser(req).getFlgValido().equals("N")) {
|
||||
forceJspPage(super.getLoginPage(null, null), req);
|
||||
req.getSession().removeAttribute("loginUser_id");
|
||||
req.getSession().removeAttribute("utenteLogon");
|
||||
return false;
|
||||
}
|
||||
if (getLoginUser(req).getId_userProfile() > 0L)
|
||||
return true;
|
||||
forceJspPage(super.getLoginPage(null, null), req);
|
||||
req.getSession().removeAttribute("loginUser_id");
|
||||
req.getSession().removeAttribute("utenteLogon");
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
handleDebug(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected String getAct3(HttpServletRequest req) {
|
||||
return getRequestParameter(req, "act3");
|
||||
}
|
||||
|
||||
protected String getCmd3(HttpServletRequest req) {
|
||||
return getRequestParameter(req, "cmd3");
|
||||
}
|
||||
|
||||
protected String getLoginPage(HttpServletRequest req, HttpServletResponse res) {
|
||||
return "/admin/menu/_inc-menu.jsp";
|
||||
}
|
||||
|
||||
protected boolean useAlwaysSendRedirect() {
|
||||
return super.useAlwaysSendRedirect();
|
||||
}
|
||||
|
||||
protected String getPathImgArticoli() {
|
||||
return getDocBase() + "/" + getDocBase();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue