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,258 @@
package it.acxent.tex.conf.servlet;
import it.acxent.anag.Users;
import it.acxent.art.Articolo;
import it.acxent.contab.Documento;
import it.acxent.contab.DocumentoCR;
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.jsp.Ab;
import it.acxent.tex.anag.servlet._AnagTexAdapterSvlt;
import it.acxent.tex.conf.NumeroTeliRiga;
import it.acxent.util.AbMessages;
import it.acxent.util.ReturnItem;
import java.io.File;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet(urlPatterns = {"/admin/conf/Taglio.abl", "/admin/conf/Taglio.abl.pdf"})
public class TaglioSvlt extends _AnagTexAdapterSvlt {
private static final long serialVersionUID = -3363295530121263153L;
protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {}
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
}
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 "taglio";
}
protected void search(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
req.setAttribute("flgTipologia", Integer.valueOf(220));
try {
Documento bean = (Documento)getBean(req);
if (getLoginUserGrant(req, bean.getTableBeanName()) > 0L) {
ResParm rp = beforeSearch(req, res);
if (rp.getStatus()) {
DocumentoCR CR = (DocumentoCR)getBeanCR(req);
if (isSimpleServlet(req) || (!getAct(req).equals("del") && !getAct(req).startsWith("save") &&
!getBackRequest(req).equals(getACT_BACK())))
fillObject(req, CR);
if (getBackRequest(req).equals(getACT_BACK()) || getAct(req).equals("del")) {
CR = (DocumentoCR)req.getSession().getAttribute(getATTR_CRBEAN(req));
if (CR == null)
CR = (DocumentoCR)getBeanCR(req);
req.setAttribute("_id", CR.get_id());
if (!getAct(req).startsWith("del"))
fillObject(req, CR);
CR.setFlgReport("");
if (getAct2(req).equals("back"))
CR.setPageNumber(1);
}
int l_pageRow = getPageRow(req);
if (getAct(req).equals("sw")) {
setJspPageRelative(getBeanPageName(req) + "F.jsp", req);
req.setAttribute("RI", new ReturnItem(req.getParameter("RI")));
}
req.setAttribute(getCRAttribute(req), CR);
req.getSession().setAttribute(getATTR_CRBEAN(req), CR);
if (CR.getFlgReport().equals("")) {
req.setAttribute("list", bean.findByCR(CR, getPageNumber(req), getPageRow(req)));
} else {
req.setAttribute("list", bean.findByCR(CR, 0, 0));
}
if (isSimpleServlet(req) && getCmd(req).equals("asq")) {
bean.setCurrentLang(getRequestParameter(req, "currentLang"));
req.setAttribute("bean", bean);
}
sendMessage(req, AbMessages.getMessage(getLocale(req), "SEARCH_OK"));
fillComboAfterSearch(CR, req, res);
callJsp(req, res);
} else {
sendMessage(req, rp.getMsg());
callJsp(req, res);
}
} else {
sendGrantMessage(req, AbMessages.getMessage(getLocale(req), "GRANT_NO_R"));
callJsp(req, res);
}
} catch (Exception e) {
handleDebug(e, 0);
}
}
public void _chiudiLavorazioneTaglio(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
Documento bean = null;
long l_id = getRequestLongParameter(req, "id_documento");
ResParm rp = new ResParm(true);
bean = new Documento(apFull);
bean.findByPrimaryKey(l_id);
if (bean.getDBState() == 1) {
bean.setFlgStatoLavorazione(100L);
rp = bean.save();
if (rp.getStatus()) {
sendMessage(req, "Lavorazione Chiusa ");
} else {
sendMessage(req, "ERRORE! " + rp.getMsg());
req.setAttribute("bean", bean);
}
} else {
sendMessage(req, "ERRORE! Disposizione non trovata");
}
search(req, res);
}
public void _dettaglioDisposizione(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
Documento bean = null;
long l_id_documento = getRequestLongParameter(req, "id_documento");
Articolo articolo = new Articolo(apFull);
ResParm rp = new ResParm(true);
bean = new Documento(apFull);
bean.findByPrimaryKey(l_id_documento);
articolo = bean.getArticolo();
if (bean.getDBState() == 1 && articolo.getDBState() == 1) {
req.setAttribute("listaRigheDocumento", bean.findRigheDocumento(0, 0, 0));
req.setAttribute("listaRigheArticoliTessuto",
bean.findRigheDocumentoDisposizioneTaglio(0, 0, 0));
req.setAttribute("bean", bean);
req.setAttribute("articolo", articolo);
setJspPageRelative("taglio.jsp", req);
callJsp(req, res);
} else {
sendMessage(req, "Errore! documento non trovato ");
search(req, res);
}
}
protected void callJsp(HttpServletRequest req, HttpServletResponse res) {
super.callJsp(req, res);
}
public void _aggiornaTeliArticoloTessuto(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
RigaDocumento rd = new RigaDocumento(apFull);
ResParm rp = new ResParm(true, "");
long l_id_rigaDocumentoArticolo = getRequestLongParameter(req, "id_rigaDocumento");
long l_id_rigaDocumentoTessuto = getRequestLongParameter(req, "id_rigaDocumento100");
long l_numTeliRigaNew = getRequestLongParameter(req, "numTeliRigaNew");
if (getLoginUserGrant(req, getBean(req).getTableBeanName()) < 2L) {
sendGrantMessage(req, "Permessi di scrittura mancanti");
showBean(req, res);
} else {
try {
rd.findByPrimaryKey(l_id_rigaDocumentoArticolo);
if (rd.getId_rigaDocumento() > 0L) {
req.setAttribute("id_documento", Long.valueOf(rd.getId_documento()));
NumeroTeliRiga ntr = new NumeroTeliRiga(apFull);
ntr.findByRDArticoloRDTessuto(l_id_rigaDocumentoArticolo, l_id_rigaDocumentoTessuto);
if (ntr.getId_numeroTeliRiga() > 0L) {
ntr.setNumTeliRiga(l_numTeliRigaNew);
rp = ntr.save();
if (rp.getStatus()) {
Documento.calcolaTessutiTaglio(rd.getDocumento(), getLang(req));
sendMessage(req, Ab.formatBeanMsg("Numero Teli aggiornati correttamente"));
_dettaglioDisposizione(req, res);
} else {
sendMessage(req, Ab.formatBeanMsg("ERRORE! " + rp.getMsg()));
_dettaglioDisposizione(req, res);
}
} else {
sendMessage(req, Ab.formatBeanMsg("Attenzione! Problema modifica teli riga!"));
_dettaglioDisposizione(req, res);
}
} else {
sendMessage(req, Ab.formatBeanMsg("Attenzione! Riga Documento non trovata!"));
_dettaglioDisposizione(req, res);
}
} catch (Exception e) {
forceMessage(req, AbMessages.getMessage(getLocale(req), "SAVE_FAIL"));
_dettaglioDisposizione(req, res);
}
}
}
public void _aggiornaCapiTelo(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
RigaDocumento rd = new RigaDocumento(apFull);
ResParm rp = new ResParm(true, "");
long l_id = getRequestLongParameter(req, "id_rigaDocumento");
long l_qta = getRequestLongParameter(req, "capiPerTeloNew");
if (getLoginUserGrant(req, getBean(req).getTableBeanName()) < 2L) {
sendGrantMessage(req, "Permessi di scrittura mancanti");
showBean(req, res);
} else {
try {
rd.findByPrimaryKey(l_id);
if (rd.getId_rigaDocumento() > 0L) {
req.setAttribute("id_documento", Long.valueOf(rd.getId_documento()));
Documento bean = rd.getDocumento();
rd.setCapiPerTelo(l_qta);
rp = rd.superSave();
if (rp.getStatus()) {
Documento.calcolaTessutiTaglio(rd.getDocumento(), getLang(req));
sendMessage(req, Ab.formatBeanMsg("Articolo aggiornato correttamente"));
_dettaglioDisposizione(req, res);
} else {
sendMessage(req, Ab.formatBeanMsg("ERRORE! " + rp.getMsg()));
_dettaglioDisposizione(req, res);
}
} else {
sendMessage(req, Ab.formatBeanMsg("Attenzione! Riga Documento non trovata!"));
_dettaglioDisposizione(req, res);
}
} catch (Exception e) {
forceMessage(req, AbMessages.getMessage(getLocale(req), "SAVE_FAIL"));
_dettaglioDisposizione(req, res);
}
}
}
public void _printDisposizioneTaglio(HttpServletRequest req, HttpServletResponse res) {
ApplParmFull apFull = getApFull(req);
Users theUser = (Users)getLoginUser(req);
Users operatore = null;
long l_id_users = getRequestLongParameter(req, "id_oper");
if (l_id_users > 0L) {
operatore = new Users(apFull);
operatore.findByPrimaryKey(l_id_users);
}
try {
long l_id = 0L;
Documento bean = null;
l_id = getRequestLongParameter(req, "id_documento");
bean = new Documento(apFull);
bean.findByPrimaryKey(l_id);
bean.setCurrentLang(getLang(req));
DocumentoCR CR = new DocumentoCR();
fillObject(req, CR);
CR.setId_documentoS(l_id);
new File(bean.getPathStampaDocumentoFull()).delete();
bean.setPrtCommand(1L);
sendPdf(res, bean.creaDocumentoPdf(CR, false), "Dispo Taglio " +
bean.getNumeroDocumentoPdf() + DBAdapter.getDayTimeTimestamp());
if (bean.getFlgStatoLavorazione() != 30L) {
bean.setFlgStatoLavorazione(30L);
bean.save();
}
} catch (Exception e) {
e.printStackTrace();
}
}
}

View file

@ -0,0 +1 @@
package it.acxent.tex.conf.servlet;