Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -17,7 +17,7 @@ public class JasperDTO {
|
||||
private String jsonSource;
|
||||
private String whereCond;
|
||||
|
||||
private String typeExport;
|
||||
private TypeExportEnum typeExport;
|
||||
private WtbJreptSetup.Orientation orientation;
|
||||
@SqlField("b64_jrxml")
|
||||
private String b64ReportJrxml;
|
||||
@@ -139,11 +139,11 @@ public class JasperDTO {
|
||||
this.subreports = subreports;
|
||||
}
|
||||
|
||||
public String getTypeExport() {
|
||||
public TypeExportEnum getTypeExport() {
|
||||
return typeExport;
|
||||
}
|
||||
|
||||
public JasperDTO setTypeExport(String typeExport) {
|
||||
public JasperDTO setTypeExport(TypeExportEnum typeExport) {
|
||||
this.typeExport = typeExport;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -408,7 +408,7 @@ public class ReportProcessor {
|
||||
}
|
||||
byte[] bytes;
|
||||
|
||||
JasperDTO.TypeExportEnum type = JasperDTO.TypeExportEnum.fromString(jasperDTO.getTypeExport());
|
||||
JasperDTO.TypeExportEnum type = jasperDTO.getTypeExport();
|
||||
if (type == null) {
|
||||
type = JasperDTO.TypeExportEnum.PDF;
|
||||
}
|
||||
@@ -458,7 +458,7 @@ public class ReportProcessor {
|
||||
private byte[] exportReportImage(JasperPrint jp, JasperDTO jasperDTO) throws JRException, IOException {
|
||||
byte[] pdfReport = JasperExportManager.exportReportToPdf(jp);
|
||||
|
||||
return UtilityPdf.convertPdfToImage(pdfReport, jasperDTO.getTypeExport(), jasperDTO.getWidth(), jasperDTO.getHeight(), jasperDTO.getColorScale());
|
||||
return UtilityPdf.convertPdfToImage(pdfReport, jasperDTO.getTypeExport().getText(), jasperDTO.getWidth(), jasperDTO.getHeight(), jasperDTO.getColorScale());
|
||||
}
|
||||
|
||||
private static byte[] exportReportXlsx(JasperPrint jp) throws Exception {
|
||||
|
||||
@@ -44,7 +44,7 @@ public class SettingsController implements IFileWatcherEvents {
|
||||
@Autowired
|
||||
private EmsProperties emsProperties;
|
||||
|
||||
private ArrayList<Runnable> mOnConfigUpdated = new ArrayList<>();
|
||||
private final ArrayList<Runnable> mOnConfigUpdated = new ArrayList<>();
|
||||
|
||||
private File configurationFile;
|
||||
private final ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
@@ -10,6 +10,7 @@ import it.integry.ems.user.service.UserService;
|
||||
import it.integry.ems_model.entity.StbAuthToken;
|
||||
import it.integry.ems_model.entity.StbDevices;
|
||||
import it.integry.ems_model.entity.StbUser;
|
||||
import it.integry.ems_model.types.OperationType;
|
||||
import it.integry.ems_model.utility.UtilityDB;
|
||||
import it.integry.ems_model.utility.UtilityLocalDate;
|
||||
import it.integry.ems_model.utility.UtilityString;
|
||||
@@ -94,6 +95,14 @@ public class AuthService {
|
||||
}
|
||||
|
||||
if (multiDBTransactionManager != null) {
|
||||
StbUser stbUser = new StbUser()
|
||||
.setUserName(userData.getUser().getUserName())
|
||||
.setLastAccessDatetime(new Date());
|
||||
|
||||
stbUser.setOperation(OperationType.UPDATE);
|
||||
|
||||
entityProcessor.processEntity(stbUser, multiDBTransactionManager);
|
||||
|
||||
StbDevices stbDevices = deviceService.createIfNotExist(requestDataDTO.getApplication().toString(), deviceId);
|
||||
|
||||
// Ottengo access_token se token già creato per device id
|
||||
@@ -123,7 +132,6 @@ public class AuthService {
|
||||
|
||||
applicationEventPublisher.publishEvent(new TokenCreateEvent(primaryProfileDb, stbAuthToken));
|
||||
|
||||
|
||||
return new JwtResponse()
|
||||
.setAccessToken(stbAuthToken.getAccessToken())
|
||||
.setRefreshToken(stbAuthToken.getRefreshToken())
|
||||
|
||||
@@ -200,7 +200,6 @@ public class SystemService {
|
||||
" stb_user.password_endtime," +
|
||||
" stb_user.e_mail," +
|
||||
" stb_user.Last_access_datetime," +
|
||||
" stb_user.cod_lang," +
|
||||
" stb_user.flag_password_expiring," +
|
||||
" CASE WHEN stb_user.key_group = '3' AND stb_user.user_code IS NULL THEN wtb_clie.cod_anag ELSE stb_user.user_code END AS user_code," +
|
||||
" wtb_depo.cod_mdep," +
|
||||
@@ -371,7 +370,6 @@ public class SystemService {
|
||||
stbUser.setOperation(OperationType.UPDATE);
|
||||
stbUser.setUserName((String) userData.get("user_name"));
|
||||
stbUser.setLastAccessDatetime(new Date());
|
||||
stbUser.setCodLang((String) userData.get("cod_lang"));
|
||||
multiDBTransactionManager.setPrimaryDs((String) userData.get("profile_db"));
|
||||
requestDataDTO.setUsername((String) userData.get("user_name"));
|
||||
entityProcessor.processEntity(stbUser, true, multiDBTransactionManager);
|
||||
|
||||
Reference in New Issue
Block a user