www in docker support

This commit is contained in:
MaddoScientisto 2026-04-22 18:41:37 +02:00
commit c227fce036
2145 changed files with 399596 additions and 58 deletions

View file

@ -0,0 +1,121 @@
package it.acxent.tex.lav.servlet;
import it.acxent.contab.RigaDocumento;
import it.acxent.contab.TipoDocumento;
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.servlet._AnagTexAdapterSvlt;
import it.acxent.tex.lav.LavPezza;
import it.acxent.tex.lav.LavPezzaCR;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet(urlPatterns = {"/admin/lav/BollaPezza.abl"})
public class BollaPezzaSvlt extends _AnagTexAdapterSvlt {
private static final long serialVersionUID = -3363295810121263153L;
protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {}
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
req.setAttribute("listaTipiDocumento", new TipoDocumento(apFull).findByTipologiaClienteFornitoreAFT(0L, "C", 0L, -1L));
}
protected DBAdapter getBean(HttpServletRequest req) {
return new LavPezza(getApFull(req));
}
protected CRAdapter getBeanCR(HttpServletRequest req) {
return new LavPezzaCR(getApFull(req));
}
protected String getBeanPageName(HttpServletRequest req) {
return "bollaPezza";
}
protected void search(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
super.search(req, res);
}
public void _dettaglioDisposizione(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
RigaDocumento bean = null;
String l_codicePezza = getRequestParameter(req, "codicePezza");
LavPezza pezza = new LavPezza(apFull);
ResParm rp = new ResParm(true);
bean = new RigaDocumento(apFull);
bean.findByCodicePezza(l_codicePezza);
if (bean.getDBState() == 1) {
sendHtmlMsgResponse(req, res, bean.getDocumento().getClifor().getCognomeNome() + " " + bean.getDocumento().getClifor().getCognomeNome() + " " + bean.getDocumento().getRiferimento());
} else {
sendHtmlMsgResponse(req, res, "Pezza NON Trovata");
}
}
public void _generaDocumento(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
ResParm rp = new ResParm(true);
String lavPezze = getRequestParameter(req, "id_lavPezze");
String[] id_lavPezze = lavPezze.split(",");
LavPezzaCR CR = new LavPezzaCR(apFull);
fillObject(req, CR);
CR.setId_users(getLoginUser(req).getId_users());
LavPezza bean = new LavPezza(apFull);
rp.append(bean.creaBollaDaLista(CR, id_lavPezze));
if (rp.getStatus()) {
req.setAttribute("listaDocumenti", rp.getReturnObj());
} else {
sendMessage(req, rp.getMsg());
}
search(req, res);
}
public void _mostraPezza(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
long l_id = getRequestLongParameter(req, "id_lavPezza");
LavPezza bean = new LavPezza(apFull);
ResParm rp = new ResParm(true);
bean.findByPrimaryKey(l_id);
if (bean.getDBState() == 1) {
req.setAttribute("bean", bean);
} else {
sendMessage(req, "ERRORE! pezza non trovata");
}
forceJspPageRelative("lavPezzaE.jsp", req);
callJsp(req, res);
}
public void _aggiungiPezza(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
LavPezza bean = new LavPezza(apFull);
long l_id = getRequestLongParameter(req, "id_lavPezzaE");
long l_numColpi = getRequestLongParameter(req, "numColpiE");
double l_mtPezza = getRequestDoubleParameter(req, "mtPezzaE");
String l_codicePancale = getRequestParameter(req, "codicePancaleE");
ResParm rp = new ResParm(true);
bean.findByPrimaryKey(l_id);
if (bean.getDBState() == 1) {
bean.setMtPezza(l_mtPezza);
bean.setNumColpi(l_numColpi);
bean.setCodicePancale(l_codicePancale);
rp = bean.save();
if (rp.getStatus()) {
sendMessage(req, "Pezza " + bean.getCodicePezza() + " aggiornata per Mt. " + l_mtPezza + " su Tela " +
bean.getDocumento().getRiferimento() + " di " + bean.getDocumento().getClifor().getCognomeNome());
} else {
sendMessage(req, rp.getMsg());
}
} else {
sendMessage(req, "ERRORE! pezza non trovata");
}
search(req, res);
}
protected int getPageRow(HttpServletRequest req) {
return 100;
}
}

View file

@ -0,0 +1,96 @@
package it.acxent.tex.lav.servlet;
import it.acxent.anag.Users;
import it.acxent.contab.Documento;
import it.acxent.contab.DocumentoCR;
import it.acxent.contab.RigaDocumento;
import it.acxent.contab.TipoDocumento;
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.servlet._AnagTexAdapterSvlt;
import it.acxent.tex.lav.LavPezza;
import it.acxent.tex.lav.LavPezzaCR;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet(urlPatterns = {"/admin/lav/LavPezza.abl"})
public class LavPezzaSvlt extends _AnagTexAdapterSvlt {
private static final long serialVersionUID = -3363295810121263153L;
protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {}
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
req.setAttribute("listaTipiDocumento", new TipoDocumento(apFull).findByTipologiaClienteFornitoreAFT(0L, "C", 0L, -1L));
}
protected DBAdapter getBean(HttpServletRequest req) {
return new LavPezza(getApFull(req));
}
protected CRAdapter getBeanCR(HttpServletRequest req) {
return new LavPezzaCR(getApFull(req));
}
protected String getBeanPageName(HttpServletRequest req) {
return "lavPezzaCli";
}
protected void search(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
Users theUser = (Users)getLoginUser(req);
if (theUser.getId_userProfile() != 10L) {
super.search(req, res);
} else if (theUser.getId_clifor() > 0L) {
req.setAttribute("id_clifor", String.valueOf(theUser.getId_clifor()));
super.search(req, res);
} else {
sendGrantMessage(req, "Attenzione!! Non è stato impostato il cliente all'utente " + theUser.getLogin());
callJsp(req, res);
}
}
public void _dettaglioDisposizione(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
RigaDocumento bean = null;
String l_codicePezza = getRequestParameter(req, "codicePezza");
LavPezza pezza = new LavPezza(apFull);
ResParm rp = new ResParm(true);
bean = new RigaDocumento(apFull);
bean.findByCodicePezza(l_codicePezza);
if (bean.getDBState() == 1) {
sendHtmlMsgResponse(req, res, bean.getDocumento().getClifor().getCognomeNome() + " " + bean.getDocumento().getClifor().getCognomeNome() + " " + bean.getDocumento().getRiferimento());
} else {
sendHtmlMsgResponse(req, res, "Pezza NON Trovata");
}
}
protected int getPageRow(HttpServletRequest req) {
return 100;
}
public void _printDoc(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
Users theUser = (Users)getLoginUser(req);
long l_id = 0L;
Documento bean = null;
l_id = getRequestLongParameter(req, "id_documento");
bean = new Documento(apFull);
bean.findByPrimaryKey(l_id);
if (bean.getId_documento() > 0L) {
if (theUser.getId_userProfile() != 10L || (theUser.getId_userProfile() == 10L && theUser.getId_clifor() == bean.getId_clifor())) {
DocumentoCR CR = new DocumentoCR();
fillObject(req, CR);
CR.setId_documentoS(l_id);
sendPdf(res, bean.creaDocumentoPdf(CR, false), "Doc " + bean.getNumeroDocumentoPdf() + DBAdapter.getDayTimeTimestamp());
} else {
sendHtmlMsgResponse(req, res, "Attenzione!! Non hai i permessi per visualizzare questo documento!!");
}
} else {
sendHtmlMsgResponse(req, res, "Attenzione!! Documento non trovato!!");
}
}
}

View file

@ -0,0 +1,181 @@
package it.acxent.tex.lav.servlet;
import it.acxent.contab.Documento;
import it.acxent.contab.DocumentoCR;
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.Telaio;
import it.acxent.tex.anag.servlet._AnagTexAdapterSvlt;
import it.acxent.tex.lav.LavPezza;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet(urlPatterns = {"/admin/lav/LavTessitura.abl"})
public class LavTessituraSvlt extends _AnagTexAdapterSvlt {
private static final long serialVersionUID = -3363295810121263153L;
protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
Documento bean = (Documento)beanA;
RigaDocumentoCR CRRD = new RigaDocumentoCR(apFull);
fillObject(req, CRRD);
req.setAttribute("CRRD", CRRD);
req.setAttribute("listaRigheDocumento", bean.findRigheDocumento(CRRD, 0, 0, false));
req.setAttribute("listaTelaio", new Telaio(apFull).findAll());
}
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
req.setAttribute("listaTelaio", new Telaio(apFull).findAll());
}
protected DBAdapter getBean(HttpServletRequest req) {
return new Documento(getApFull(req));
}
protected CRAdapter getBeanCR(HttpServletRequest req) {
return new DocumentoCR(getApFull(req));
}
protected String getBeanPageName(HttpServletRequest req) {
return "lavTessituraStart";
}
protected void search(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
DocumentoCR CR = new DocumentoCR(getApFull(req));
req.setAttribute("flgTipologia", Integer.valueOf(200));
super.search(req, res);
}
public void _annullaStatoLavorazione(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
long l_id = 0L;
RigaDocumento bean = null;
l_id = getRequestLongParameter(req, "id_rigaDocumento");
ResParm rp = new ResParm(true);
bean = new RigaDocumento(apFull);
bean.findByPrimaryKey(l_id);
if (bean.getId_rigaDocumento() > 0L && (
bean.getFlgStatoLavorazioneRiga() == 20L ||
bean.getFlgStatoLavorazioneRiga() == 10L)) {
bean.setFlgStatoLavorazioneRiga(0L);
bean.setId_telaio(0L);
bean.save();
}
showBean(req, res);
}
public void _impostaTelaio(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
long l_id = 0L;
Documento bean = null;
l_id = getRequestLongParameter(req, "id_documento");
long id_telaioR = getRequestLongParameter(req, "id_telaioR");
long colpoInizialeR = getRequestLongParameter(req, "colpoInizialeR");
bean = new Documento(apFull);
try {
bean.findByPrimaryKey(l_id);
if (bean.getId_documento() > 0L) {
ResParm rp = new ResParm();
if (rp.getStatus()) {
sendMessage(req, "Telaio impostato correttamente");
} else {
sendMessage(req, rp.getMsg());
}
} else {
sendMessage(req, "Errore! Documento non valido");
}
} catch (Exception e) {
handleDebug("Impossibile Salvare");
handleDebug(e);
}
search(req, res);
}
public void _impostaColpiFinali(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
long l_id = 0L;
Documento bean = null;
l_id = getRequestLongParameter(req, "id_documento");
long colpiFinaliR = getRequestLongParameter(req, "colpoFinaleR");
bean = new Documento(apFull);
try {
bean.findByPrimaryKey(l_id);
ResParm rp = new ResParm();
if (!rp.getStatus())
sendMessage(req, rp.getMsg());
} catch (Exception e) {
handleDebug("Impossibile Salvare");
handleDebug(e);
}
search(req, res);
}
public void _trovaColpiIniziali(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
long l_id = 0L;
Telaio bean = null;
l_id = getRequestLongParameter(req, "id_telaio");
bean = new Telaio(apFull);
try {
bean.findByPrimaryKey(l_id);
sendHtmlMsgResponse(req, res, String.valueOf(bean.findColpiIniziali()));
} catch (Exception e) {
sendHtmlMsgResponse(req, res, " ");
}
}
public void _updateLTSField(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
long l_id_rigaDocumento = getRequestLongParameter(req, "id_rigaDocumento");
RigaDocumento bean = new RigaDocumento(apFull);
bean.findByPrimaryKey(l_id_rigaDocumento);
ResParm rp = new ResParm();
if (bean.getId_rigaDocumento() > 0L) {
String fieldName = getRequestParameter(req, "fieldName");
String value = getRequestParameter(req, "value");
rp = bean.updateFields(fieldName, value);
} else {
rp.setStatus(false);
rp.setMsg("Table desc non trovata!!!");
}
if (getAct(req).endsWith("refresh")) {
if (rp.getStatus()) {
sendMessage(req, "Campo aggiornato correttamente. " + rp.getMsg());
} else {
sendMessage(req, "Errore!! " + rp.getMsg());
}
req.setAttribute("id_documento", Long.valueOf(bean.getId_documento()));
showBean(req, res);
} else if (rp.getStatus()) {
sendHtmlMsgResponse(req, res, "Campo aggiornato correttamente.");
} else {
sendHtmlMsgResponse(req, res, "Errore!! " + rp.getMsg());
}
}
public void _dettaglioPezze(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
long l_id = 0L;
Documento bean = null;
l_id = getRequestLongParameter(req, "id_documento");
LavPezza pezza = new LavPezza(apFull);
ResParm rp = new ResParm(true);
bean = new Documento(apFull);
if (getLoginUser(req).getId_userProfile() == 10L) {
setJspPageRelative("lavPezzeViewCli.jsp", req);
} else {
setJspPageRelative("lavPezzeView.jsp", req);
}
bean.findByPrimaryKey(l_id);
req.setAttribute("bean", bean);
req.setAttribute("listaPezze", pezza.findByDocumento(l_id));
callJsp(req, res);
}
}

View file

@ -0,0 +1,181 @@
package it.acxent.tex.lav.servlet;
import it.acxent.contab.RigaDocumento;
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.Telaio;
import it.acxent.tex.anag.servlet._AnagTexAdapterSvlt;
import it.acxent.tex.lav.LavPezza;
import it.acxent.tex.lav.LavPezzaCR;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet(urlPatterns = {"/admin/lav/RecordPezza.abl"})
public class RecordPezzaSvlt extends _AnagTexAdapterSvlt {
private static final long serialVersionUID = -3363295810121263153L;
protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {}
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
req.setAttribute("listaTelaio", new Telaio(apFull).findAll());
}
protected DBAdapter getBean(HttpServletRequest req) {
return new LavPezza(getApFull(req));
}
protected CRAdapter getBeanCR(HttpServletRequest req) {
return new LavPezzaCR(getApFull(req));
}
protected String getBeanPageName(HttpServletRequest req) {
return "lavPezza";
}
protected void search(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
LavPezza bean = new LavPezza(getApFull(req));
fillObject(req, bean);
System.out.println(getRequestDoubleParameter(req, "mtPezza"));
req.setAttribute("bean", bean);
callJsp(req, res);
}
public void _step1(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
RigaDocumento bean = null;
String l_codicePezza = getRequestParameter(req, "codicePezza");
LavPezza pezza = new LavPezza(apFull);
ResParm rp = new ResParm(true);
bean = new RigaDocumento(apFull);
bean.findByCodicePezza(l_codicePezza);
if (bean.getDBState() == 1) {
req.setAttribute("step", "2");
req.setAttribute("mtPezza", getNf().format(bean.getMetriStacchi()));
req.setAttribute("currentFocus", "mtPezza");
} else {
req.setAttribute("step", "1");
req.setAttribute("codicePezza", "");
sendMessage(req, "ERRORE! pezza " + l_codicePezza + " non trovata");
}
search(req, res);
}
public void _dettaglioDisposizione(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
RigaDocumento bean = null;
String l_codicePezza = getRequestParameter(req, "codicePezza");
LavPezza pezza = new LavPezza(apFull);
ResParm rp = new ResParm(true);
bean = new RigaDocumento(apFull);
bean.findByCodicePezza(l_codicePezza);
if (bean.getDBState() == 1) {
sendHtmlMsgResponse(req, res, bean.getDocumento().getClifor().getCognomeNome() + " " + bean.getDocumento().getClifor().getCognomeNome() + " " + bean.getDocumento().getRiferimento());
} else {
sendHtmlMsgResponse(req, res, "Pezza NON Trovata");
}
}
protected void callJsp(HttpServletRequest req, HttpServletResponse res) {
super.callJsp(req, res);
}
public void _aggiungiPezza(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
RigaDocumento bean = null;
String l_codicePezza = getRequestParameter(req, "codicePezza");
long l_numColpi = getRequestLongParameter(req, "numColpi");
double l_mtPezza = getRequestDoubleParameter(req, "mtPezza");
String l_codicePancale = getRequestParameter(req, "codicePancale");
LavPezza pezza = new LavPezza(apFull);
ResParm rp = new ResParm(true);
bean = new RigaDocumento(apFull);
bean.findByCodicePezza(l_codicePezza);
if (bean.getDBState() == 1) {
pezza = new LavPezza(apFull);
pezza.setId_rigaDocumento(bean.getId_rigaDocumento());
pezza.setCodicePezza(l_codicePezza);
pezza.setMtPezza(l_mtPezza);
pezza.setNumColpi(l_numColpi);
pezza.setCodicePancale(l_codicePancale);
pezza.setId_clifor(bean.getDocumento().getId_clifor());
rp = pezza.save();
if (rp.getStatus()) {
sendMessage(req, "Pezza " + l_codicePezza + " inserita per Mt. " + pezza.getMtPezza() + " su Tela " +
bean.getDocumento().getRiferimento() + " di " + bean.getDocumento().getClifor().getCognomeNome());
} else {
sendMessage(req, "ERRORE! pezza " + l_codicePezza + rp.getMsg());
req.setAttribute("bean", pezza);
}
} else {
sendMessage(req, "ERRORE! pezza " + l_codicePezza + " non trovata");
}
search(req, res);
}
public void _step2(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
RigaDocumento bean = null;
String l_codicePezza = getRequestParameter(req, "codicePezza");
long l_numColpi = getRequestLongParameter(req, "numColpi");
double l_mtPezza = getRequestDoubleParameter(req, "mtPezza");
LavPezza pezza = new LavPezza(apFull);
ResParm rp = new ResParm(true);
bean = new RigaDocumento(apFull);
bean.findByCodicePezza(l_codicePezza);
if (bean.getDBState() == 1) {
req.setAttribute("step", "3");
} else {
req.setAttribute("step", "1");
req.setAttribute("codicePezza", "");
sendMessage(req, "ERRORE! pezza " + l_codicePezza + " non trovata");
}
search(req, res);
}
public void _step3(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
RigaDocumento bean = null;
String l_codicePezza = getRequestParameter(req, "codicePezza");
long l_numColpi = getRequestLongParameter(req, "numColpi");
double l_mtPezza = getRequestDoubleParameter(req, "mtPezza");
String l_codicePancale = getRequestParameter(req, "codicePancale");
LavPezza pezza = new LavPezza(apFull);
ResParm rp = new ResParm(true);
bean = new RigaDocumento(apFull);
bean.findByCodicePezza(l_codicePezza);
if (bean.getDBState() == 1) {
pezza = new LavPezza(apFull);
pezza.setId_rigaDocumento(bean.getId_rigaDocumento());
pezza.setCodicePezza(l_codicePezza);
pezza.setMtPezza(l_mtPezza);
pezza.setNumColpi(l_numColpi);
pezza.setCodicePancale(DBAdapter.zeroLeft(l_codicePancale, 2));
pezza.setId_clifor(bean.getDocumento().getId_clifor());
rp = pezza.save();
if (rp.getStatus()) {
sendMessage(req, "Pezza " + l_codicePezza + " inserita per Mt. " + pezza.getMtPezza() + " su Tela " +
bean.getDocumento().getRiferimento() + " di " + bean.getDocumento().getClifor().getCognomeNome());
req.setAttribute("step", "1");
req.setAttribute("codicePezza", "");
} else if (rp.getMsg().indexOf("IDX_LAV_PEZZA_1") > 0) {
req.setAttribute("step", "1");
req.setAttribute("codicePezza", "");
sendMessage(req, "ERRORE! pezza " + l_codicePezza + " gia' registrata");
} else {
req.setAttribute("step", "1");
req.setAttribute("codicePezza", "");
sendMessage(req, "ERRORE! pezza " + l_codicePezza + rp.getMsg());
}
} else {
req.setAttribute("step", "1");
req.setAttribute("codicePezza", "");
sendMessage(req, "ERRORE! pezza " + l_codicePezza + " non trovata");
}
search(req, res);
}
}