aggiunta nuova logica per stampare la firma nella stampa
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
This commit is contained in:
@@ -7,6 +7,7 @@ import it.integry.ems.report.dto.ReportTypeDTO;
|
||||
import it.integry.ems.report.dto.SubreportDTO;
|
||||
import it.integry.ems.sync.MultiDBTransaction.Connection;
|
||||
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||
import it.integry.ems.user.UserSession;
|
||||
import it.integry.ems.utility.UtilityDirs;
|
||||
import it.integry.ems.utility.UtilityFile;
|
||||
import it.integry.ems.utility.UtilityPdf;
|
||||
@@ -57,10 +58,10 @@ public class ReportProcessor {
|
||||
private MultiDBTransactionManager multiDBTransactionManager;
|
||||
|
||||
@Autowired
|
||||
private ResponseJSONObjectMapper jsonObjectMapper;
|
||||
private SetupGest setupGest;
|
||||
|
||||
@Autowired
|
||||
private SetupGest setupGest;
|
||||
private UserSession userSession;
|
||||
|
||||
private static final Logger logger = LogManager.getLogger();
|
||||
|
||||
@@ -287,6 +288,19 @@ public class ReportProcessor {
|
||||
}
|
||||
hm_parameters.put("api_webservices", url);
|
||||
|
||||
String firmaUtente;
|
||||
String sql =
|
||||
Query.format(
|
||||
"SELECT id_attach FROM srl_user_attached WHERE user_name = %s", userSession.getUsername());
|
||||
|
||||
String idAttach = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
|
||||
if ( !UtilityString.isNullOrEmpty(idAttach) ) {
|
||||
firmaUtente = String.format("http://%s/ems-api/downloadStbFileAttachment/%s/firma_utente.png?profileDb=%s",
|
||||
url, idAttach, multiDBTransactionManager.getPrimaryDatasource().getProfile());
|
||||
hm_parameters.put("firma_utente", firmaUtente);
|
||||
}
|
||||
|
||||
completeParameter(jasperDTO, hm_parameters);
|
||||
|
||||
JasperReportsContext jasperReportsContext = DefaultJasperReportsContext.getInstance();
|
||||
|
||||
@@ -1280,9 +1280,11 @@ public class DocumentiAcquistoImportService {
|
||||
sql = Query.format(
|
||||
"SELECT cod_mdep\n" +
|
||||
"FROM mtb_depo_intercode\n" +
|
||||
"WHERE intercode = %s AND cod_forn = %s %s",
|
||||
intercode, codAnag, (UtilityString.isNullOrEmpty(codVdes)?"":"AND cod_vdes = " + UtilityDB.valueToString(codVdes))
|
||||
);
|
||||
"WHERE intercode = %s AND cod_forn = %s",
|
||||
intercode, codAnag);
|
||||
if (!UtilityString.isNullOrEmpty(codVdes))
|
||||
sql = sql + "AND cod_vdes = " + UtilityDB.valueToString(codVdes);
|
||||
|
||||
String codMdep = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(conn, sql);
|
||||
|
||||
if (UtilityString.isNullOrEmpty(codMdep)) {
|
||||
|
||||
Reference in New Issue
Block a user