Finish v1.33.10(381)
This commit is contained in:
commit
04720c1d97
@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 379
|
||||
def appVersionName = '1.33.08'
|
||||
def appVersionCode = 381
|
||||
def appVersionName = '1.33.10'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
|
||||
@ -21,6 +21,7 @@ import it.integry.integrywmsnative.core.data_store.db.dao.InventarioRowDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColrDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColtDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.RawDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloOrdine;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Griglia;
|
||||
@ -76,6 +77,8 @@ public abstract class AppDatabase extends RoomDatabase {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public abstract RawDao rawDao();
|
||||
|
||||
public abstract ArticoloGrigliaDao articoloGrigliaDao();
|
||||
|
||||
public abstract GrigliaDao grigliaDao();
|
||||
@ -93,6 +96,7 @@ public abstract class AppDatabase extends RoomDatabase {
|
||||
public abstract InventarioRowDao inventarioRowDao();
|
||||
|
||||
|
||||
|
||||
static final Migration MIGRATION_10_11 = new Migration(10, 11) {
|
||||
@Override
|
||||
public void migrate(SupportSQLiteDatabase database) {
|
||||
|
||||
@ -17,6 +17,7 @@ import it.integry.integrywmsnative.core.data_store.db.dao.InventarioRowDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColrDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColtDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.RawDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoliOrdineRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoloGrigliaRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.GrigliaRepository;
|
||||
@ -55,6 +56,11 @@ public class RoomModule {
|
||||
|
||||
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
RawDao providesRawDao(AppDatabase appDatabase) {
|
||||
return appDatabase.rawDao();
|
||||
}
|
||||
@Singleton
|
||||
@Provides
|
||||
ArticoloGrigliaDao providesArticoloGrigliaDao(AppDatabase appDatabase) {
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.dao;
|
||||
|
||||
import androidx.room.Dao;
|
||||
import androidx.room.RawQuery;
|
||||
import androidx.sqlite.db.SupportSQLiteQuery;
|
||||
|
||||
@Dao
|
||||
public interface RawDao {
|
||||
|
||||
@RawQuery
|
||||
int vacuumDb(SupportSQLiteQuery supportSQLiteQuery);
|
||||
|
||||
}
|
||||
@ -179,8 +179,7 @@ public class PickingInventarioActivity extends BaseActivity implements PickingIn
|
||||
}
|
||||
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
this.mViewModel.processBarcodeDTO(data, () -> {
|
||||
});
|
||||
this.mViewModel.processBarcodeDTO(data, this::onLoadingEnded);
|
||||
};
|
||||
|
||||
|
||||
@ -260,7 +259,7 @@ public class PickingInventarioActivity extends BaseActivity implements PickingIn
|
||||
.setNew(true));
|
||||
|
||||
DialogSelectDocRowsView.newInstance(dialogSelectDocRowsItemListModels, data -> {
|
||||
if(data.isNew())
|
||||
if (data.isNew())
|
||||
this.mViewModel.dispatchRowInsert(null, matchedArt, null);
|
||||
else
|
||||
this.mViewModel.dispatchRowEdit(matchedArt.toMtbAart(), (InventarioRowRoomDTO) data.getOriginalModel());
|
||||
|
||||
@ -47,9 +47,7 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
private List<InventarioArtDTO> availableInventarioArts;
|
||||
private Listener mListener;
|
||||
|
||||
public PickingInventarioViewModel(
|
||||
InventarioRepository inventarioRepository,
|
||||
InventarioRowRepository inventarioRowRepository) {
|
||||
public PickingInventarioViewModel(InventarioRepository inventarioRepository, InventarioRowRepository inventarioRowRepository) {
|
||||
this.inventarioRepository = inventarioRepository;
|
||||
this.inventarioRowRepository = inventarioRowRepository;
|
||||
}
|
||||
@ -84,6 +82,7 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
}
|
||||
|
||||
public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
this.sendOnLoadingStarted();
|
||||
if (UtilityBarcode.isEanPeso(barcodeScanDTO)) {
|
||||
//Cerco tramite etichetta ean peso
|
||||
this.executeEtichettaEanPeso(barcodeScanDTO, onComplete);
|
||||
@ -97,27 +96,17 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
var barcodeList = new ArrayList<String>();
|
||||
barcodeList.add(itemToUpdate.getScanCodBarre());
|
||||
|
||||
var matchedArt = availableInventarioArts.stream()
|
||||
.filter(x -> itemToUpdate.getCodMart() != null && x.getCodMart().contains(itemToUpdate.getCodMart()))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
var matchedArt = availableInventarioArts.stream().filter(x -> itemToUpdate.getCodMart() != null && x.getCodMart().contains(itemToUpdate.getCodMart())).findFirst().orElse(null);
|
||||
|
||||
MtbAart articolo;
|
||||
|
||||
if (canAddUnknownItems && matchedArt == null) {
|
||||
matchedArt = new InventarioArtDTO()
|
||||
.setBarcode(barcodeList)
|
||||
.setFlagQtaCnfFissa(true)
|
||||
.setPlu(false)
|
||||
.setUntMis(itemToUpdate.getUntMis())
|
||||
.setQtaCnf(itemToUpdate.getQtaConf());
|
||||
matchedArt = new InventarioArtDTO().setBarcode(barcodeList).setFlagQtaCnfFissa(true).setPlu(false).setUntMis(itemToUpdate.getUntMis()).setQtaCnf(itemToUpdate.getQtaConf());
|
||||
}
|
||||
if (matchedArt != null) {
|
||||
articolo = matchedArt.toMtbAart()
|
||||
.setFlagTracciabilita("N");
|
||||
articolo = matchedArt.toMtbAart().setFlagTracciabilita("N");
|
||||
dispatchRowEdit(articolo, itemToUpdate);
|
||||
} else
|
||||
this.sendError(new NoResultFromBarcodeException(itemToUpdate.getScanCodBarre()));
|
||||
} else this.sendError(new NoResultFromBarcodeException(itemToUpdate.getScanCodBarre()));
|
||||
}
|
||||
|
||||
public void deleteRow(InventarioRowRoomDTO itemToDelete) {
|
||||
@ -155,19 +144,11 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
var barcodeList = new ArrayList<String>();
|
||||
barcodeList.add(barcodeProd);
|
||||
|
||||
var matchedArt = availableInventarioArts.stream()
|
||||
.filter(x -> x.getBarcode().contains(barcodeProd))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
var matchedArt = availableInventarioArts.stream().filter(x -> x.getBarcode().contains(barcodeProd)).findFirst().orElse(null);
|
||||
|
||||
|
||||
if (canAddUnknownItems && matchedArt == null) {
|
||||
matchedArt = new InventarioArtDTO()
|
||||
.setBarcode(barcodeList)
|
||||
.setFlagQtaCnfFissa(true)
|
||||
.setPlu(false)
|
||||
.setUntMis("PZ")
|
||||
.setQtaCnf(BigDecimal.ONE);
|
||||
matchedArt = new InventarioArtDTO().setBarcode(barcodeList).setFlagQtaCnfFissa(true).setPlu(false).setUntMis("PZ").setQtaCnf(BigDecimal.ONE);
|
||||
|
||||
}
|
||||
|
||||
@ -182,8 +163,7 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
|
||||
}
|
||||
onComplete.run();
|
||||
} else
|
||||
this.sendError(new NoResultFromBarcodeException(barcodeProd));
|
||||
} else this.sendError(new NoResultFromBarcodeException(barcodeProd));
|
||||
}
|
||||
|
||||
private List<InventarioRowRoomDTO> searchArtInAlreadyScannedItems(InventarioArtDTO inventarioArtDTO) {
|
||||
@ -191,9 +171,7 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
|
||||
if (inventarioRows == null) return null;
|
||||
|
||||
return Stream.of(inventarioRows)
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(inventarioArtDTO.getCodMart()))
|
||||
.toList();
|
||||
return Stream.of(inventarioRows).filter(x -> x.getCodMart() != null ? x.getCodMart().equalsIgnoreCase(inventarioArtDTO.getCodMart()) : inventarioArtDTO.getBarcode().contains(x.getScanCodBarre())).toList();
|
||||
}
|
||||
|
||||
|
||||
@ -201,9 +179,7 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
var mtbAart = inventarioArtDTO.toMtbAart();
|
||||
mtbAart.setFlagTracciabilita("N");
|
||||
|
||||
PickingObjectDTO pickingObjectDTO = new PickingObjectDTO()
|
||||
.setMtbAart(mtbAart)
|
||||
.setTempPickData(PickDataDTO.fromEan128(ean128Model));
|
||||
PickingObjectDTO pickingObjectDTO = new PickingObjectDTO().setMtbAart(mtbAart).setTempPickData(PickDataDTO.fromEan128(ean128Model));
|
||||
|
||||
BigDecimal numCnfDaPrelevare = null;
|
||||
BigDecimal qtaColDaPrelevare = null;
|
||||
@ -277,64 +253,25 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
}
|
||||
|
||||
if (inventarioArtDTO.isPlu()) {
|
||||
this.saveNewRow(pickingObjectDTO,
|
||||
initialNumCnf,
|
||||
initialQtaCnf,
|
||||
initialQtaTot,
|
||||
null,
|
||||
barcode);
|
||||
this.saveNewRow(pickingObjectDTO, initialNumCnf, initialQtaCnf, initialQtaTot, null, barcode);
|
||||
} else {
|
||||
|
||||
this.sendOnItemDispatched(
|
||||
pickingObjectDTO,
|
||||
pickingObjectDTO.getMtbAart(),
|
||||
null, //initialNumCnf,
|
||||
initialQtaCnf,
|
||||
null, //initialQtaTot,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
(pickedQuantityDTO, shouldCloseLU) -> {
|
||||
this.saveNewRow(pickingObjectDTO,
|
||||
pickedQuantityDTO.getNumCnf(),
|
||||
pickedQuantityDTO.getQtaCnf(),
|
||||
pickedQuantityDTO.getQtaTot(),
|
||||
pickedQuantityDTO.getPartitaMag(),
|
||||
barcode);
|
||||
this.sendOnItemDispatched(pickingObjectDTO, pickingObjectDTO.getMtbAart(), null, //initialNumCnf,
|
||||
initialQtaCnf, null, //initialQtaTot,
|
||||
null, null, null, null, null, null, false, true, false, (pickedQuantityDTO, shouldCloseLU) -> {
|
||||
this.saveNewRow(pickingObjectDTO, pickedQuantityDTO.getNumCnf(), pickedQuantityDTO.getQtaCnf(), pickedQuantityDTO.getQtaTot(), pickedQuantityDTO.getPartitaMag(), barcode);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void dispatchRowEdit(MtbAart mtbAart, InventarioRowRoomDTO inventarioRowRoomDTO) {
|
||||
|
||||
final PickingObjectDTO pickingObjectDTO = new PickingObjectDTO()
|
||||
.setMtbAart(mtbAart);
|
||||
final PickingObjectDTO pickingObjectDTO = new PickingObjectDTO().setMtbAart(mtbAart);
|
||||
|
||||
|
||||
this.sendOnItemDispatched(
|
||||
pickingObjectDTO,
|
||||
pickingObjectDTO.getMtbAart(),
|
||||
inventarioRowRoomDTO.getNumConf(),
|
||||
inventarioRowRoomDTO.getQtaConf(),
|
||||
inventarioRowRoomDTO.getQta(),
|
||||
null, null, null,
|
||||
null, null, null,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
(pickedQuantityDTO, shouldCloseLU) -> {
|
||||
this.sendOnItemDispatched(pickingObjectDTO, pickingObjectDTO.getMtbAart(), inventarioRowRoomDTO.getNumConf(), inventarioRowRoomDTO.getQtaConf(), inventarioRowRoomDTO.getQta(), null, null, null, null, null, null, false, false, false, (pickedQuantityDTO, shouldCloseLU) -> {
|
||||
|
||||
this.saveEditedRow(inventarioRowRoomDTO,
|
||||
pickedQuantityDTO.getNumCnf(),
|
||||
pickedQuantityDTO.getQtaCnf(),
|
||||
pickedQuantityDTO.getQtaTot(),
|
||||
pickedQuantityDTO.getPartitaMag());
|
||||
this.saveEditedRow(inventarioRowRoomDTO, pickedQuantityDTO.getNumCnf(), pickedQuantityDTO.getQtaCnf(), pickedQuantityDTO.getQtaTot(), pickedQuantityDTO.getPartitaMag());
|
||||
});
|
||||
|
||||
}
|
||||
@ -382,40 +319,13 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
if (this.mListener != null) mListener.onError(ex);
|
||||
}
|
||||
|
||||
private void sendOnItemDispatched(PickingObjectDTO pickingObjectDTO,
|
||||
MtbAart mtbAart,
|
||||
BigDecimal initialNumCnf,
|
||||
BigDecimal initialQtaCnf,
|
||||
BigDecimal initialQtaTot,
|
||||
BigDecimal totalQtaAvailable,
|
||||
BigDecimal totalNumCnfAvailable,
|
||||
BigDecimal qtaCnfAvailable,
|
||||
BigDecimal totalQtaToBeTaken,
|
||||
BigDecimal totalNumCnfToBeTaken,
|
||||
BigDecimal qtaCnfToBeTaken,
|
||||
boolean canOverflowOrderQuantity,
|
||||
boolean canPartitaMagBeChanged,
|
||||
boolean canLUBeClosed,
|
||||
RunnableArgss<PickedQuantityDTO, Boolean> onComplete) {
|
||||
if (this.mListener != null) mListener.onItemDispatched(pickingObjectDTO,
|
||||
mtbAart,
|
||||
initialNumCnf,
|
||||
initialQtaCnf,
|
||||
initialQtaTot,
|
||||
totalQtaAvailable,
|
||||
totalNumCnfAvailable,
|
||||
qtaCnfAvailable,
|
||||
totalQtaToBeTaken,
|
||||
totalNumCnfToBeTaken,
|
||||
qtaCnfToBeTaken,
|
||||
canOverflowOrderQuantity,
|
||||
canPartitaMagBeChanged,
|
||||
canLUBeClosed,
|
||||
onComplete);
|
||||
private void sendOnItemDispatched(PickingObjectDTO pickingObjectDTO, MtbAart mtbAart, BigDecimal initialNumCnf, BigDecimal initialQtaCnf, BigDecimal initialQtaTot, BigDecimal totalQtaAvailable, BigDecimal totalNumCnfAvailable, BigDecimal qtaCnfAvailable, BigDecimal totalQtaToBeTaken, BigDecimal totalNumCnfToBeTaken, BigDecimal qtaCnfToBeTaken, boolean canOverflowOrderQuantity, boolean canPartitaMagBeChanged, boolean canLUBeClosed, RunnableArgss<PickedQuantityDTO, Boolean> onComplete) {
|
||||
if (this.mListener != null)
|
||||
mListener.onItemDispatched(pickingObjectDTO, mtbAart, initialNumCnf, initialQtaCnf, initialQtaTot, totalQtaAvailable, totalNumCnfAvailable, qtaCnfAvailable, totalQtaToBeTaken, totalNumCnfToBeTaken, qtaCnfToBeTaken, canOverflowOrderQuantity, canPartitaMagBeChanged, canLUBeClosed, onComplete);
|
||||
}
|
||||
|
||||
private void sendOnItemAlreadyFound(InventarioArtDTO matchedArt, List<InventarioRowRoomDTO> alreadyScannedItems) {
|
||||
if(this.mListener != null)
|
||||
if (this.mListener != null)
|
||||
this.mListener.onItemAlreadyFound(matchedArt, alreadyScannedItems);
|
||||
}
|
||||
|
||||
@ -428,21 +338,7 @@ public class PickingInventarioViewModel extends ViewModel {
|
||||
|
||||
void onError(Exception ex);
|
||||
|
||||
void onItemDispatched(PickingObjectDTO pickingObjectDTO,
|
||||
MtbAart mtbAart,
|
||||
BigDecimal initialNumCnf,
|
||||
BigDecimal initialQtaCnf,
|
||||
BigDecimal initialQtaTot,
|
||||
BigDecimal totalQtaAvailable,
|
||||
BigDecimal totalNumCnfAvailable,
|
||||
BigDecimal qtaCnfAvailable,
|
||||
BigDecimal totalQtaToBeTaken,
|
||||
BigDecimal totalNumCnfToBeTaken,
|
||||
BigDecimal qtaCnfToBeTaken,
|
||||
boolean canOverflowOrderQuantity,
|
||||
boolean canPartitaMagBeChanged,
|
||||
boolean canLUBeClosed,
|
||||
RunnableArgss<PickedQuantityDTO, Boolean> onComplete);
|
||||
void onItemDispatched(PickingObjectDTO pickingObjectDTO, MtbAart mtbAart, BigDecimal initialNumCnf, BigDecimal initialQtaCnf, BigDecimal initialQtaTot, BigDecimal totalQtaAvailable, BigDecimal totalNumCnfAvailable, BigDecimal qtaCnfAvailable, BigDecimal totalQtaToBeTaken, BigDecimal totalNumCnfToBeTaken, BigDecimal qtaCnfToBeTaken, boolean canOverflowOrderQuantity, boolean canPartitaMagBeChanged, boolean canLUBeClosed, RunnableArgss<PickedQuantityDTO, Boolean> onComplete);
|
||||
|
||||
|
||||
void onItemAlreadyFound(InventarioArtDTO matchedArt, List<InventarioRowRoomDTO> alreadyScannedItems);
|
||||
|
||||
@ -28,8 +28,9 @@ public class ProdRientroMerceViewModel {
|
||||
}
|
||||
|
||||
public void refreshOrderList() {
|
||||
new Thread(this::sendOnOrdersLoadingStarted).start();
|
||||
this.sendOnOrdersLoadingStarted();
|
||||
String codAnag = SettingsManager.iDB().getFilterFornitoreProd();
|
||||
|
||||
this.mMesRESTConsumer.getOrdiniLavorazione("I", null, codAnag, ordiniLavorazioneList -> {
|
||||
this.mOrdiniLavorazioneAperti.postValue(ordiniLavorazioneList);
|
||||
this.sendOnOrdersLoadingEnded();
|
||||
|
||||
@ -15,16 +15,19 @@ import androidx.preference.EditTextPreference;
|
||||
import androidx.preference.ListPreference;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceFragmentCompat;
|
||||
import androidx.sqlite.db.SimpleSQLiteQuery;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import com.harrysoft.androidbluetoothserial.BluetoothManager;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
import javax.inject.Inject;
|
||||
@ -34,6 +37,7 @@ import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.context.AppContext;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.RawDao;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.MailAttachmentDTO;
|
||||
@ -48,6 +52,9 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
||||
@Inject
|
||||
public AppContext appContext;
|
||||
|
||||
@Inject
|
||||
public RawDao rawDao;
|
||||
|
||||
@Inject
|
||||
public SystemRESTConsumer systemRESTConsumer;
|
||||
|
||||
@ -226,29 +233,52 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
||||
executorService.execute(() -> {
|
||||
|
||||
|
||||
File yourFile = appContext.getLogFilePath();
|
||||
var files = yourFile.listFiles();
|
||||
File logFilePath = appContext.getLogFilePath();
|
||||
var files = logFilePath.listFiles();
|
||||
|
||||
var fileToShare = Stream.of(files)
|
||||
.sortBy(x -> -1 * x.lastModified())
|
||||
.findFirstOrElse(null);
|
||||
try {
|
||||
List<MailAttachmentDTO> attachmentDTOList = new ArrayList<>();
|
||||
|
||||
if(fileToShare != null) {
|
||||
var htmlContent = createAppLogAttachment(fileToShare);
|
||||
|
||||
byte[] buffer = htmlContent.getBytes();//specify the size to allow.
|
||||
String base64 = Base64.encodeToString(buffer, Base64.NO_WRAP);
|
||||
|
||||
var attachment = new MailAttachmentDTO()
|
||||
var logAttachment = new MailAttachmentDTO()
|
||||
.setFileName("wms_log.html")
|
||||
.setFileb64Content(base64);
|
||||
attachmentDTOList.add(logAttachment);
|
||||
}
|
||||
|
||||
|
||||
rawDao.vacuumDb(new SimpleSQLiteQuery("pragma wal_checkpoint(full)"));
|
||||
File[] dbFiles = new File[3];
|
||||
dbFiles[0] = requireContext().getDatabasePath("integry_wms");
|
||||
dbFiles[1] = requireContext().getDatabasePath("integry_wms-shm");
|
||||
dbFiles[2] = requireContext().getDatabasePath("integry_wms-wal");
|
||||
|
||||
for(int i = 0; i < dbFiles.length; i++){
|
||||
byte[] dbFileBytes = new byte[(int) dbFiles[i].length()];
|
||||
FileInputStream inputStream = new FileInputStream(dbFiles[i]);
|
||||
final int read = inputStream.read(dbFileBytes);
|
||||
inputStream.close();
|
||||
|
||||
var dbAttachment = new MailAttachmentDTO()
|
||||
.setFileName(dbFiles[i].getName())
|
||||
.setFileb64Content(Base64.encodeToString(dbFileBytes, Base64.NO_WRAP));
|
||||
attachmentDTOList.add(dbAttachment);
|
||||
}
|
||||
|
||||
var mailRequest = new MailRequestDTO()
|
||||
.setTo("developer@integry.it")
|
||||
.setMsgText("Questo è una mail che contiene il log del WMS")
|
||||
.setSubject("U vuemmeess")
|
||||
.setAttachments(new ArrayList<>());
|
||||
.setAttachments(attachmentDTOList);
|
||||
|
||||
mailRequest.getAttachments().add(attachment);
|
||||
|
||||
systemRESTConsumer.sendMail(mailRequest, this::closeProgress, ex -> {
|
||||
this.closeProgress();
|
||||
@ -370,7 +400,13 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
||||
htmlContent.append("<hr/>");
|
||||
}
|
||||
|
||||
htmlContent.append("\n" + "<script type=\"text/javascript\">\n" + " document.querySelectorAll(\".message\").forEach(el => el.innerHTML = el.innerHTML.replaceAll(/at it\\.integry.*?(?:<br>)/g, '<b>$&</b>'));\n" + "</script>\n" + "</body>\n" + "</html>");
|
||||
htmlContent.append("""
|
||||
|
||||
<script type="text/javascript">
|
||||
document.querySelectorAll(".message").forEach(el => el.innerHTML = el.innerHTML.replaceAll(/at it\\.integry.*?(?:<br>)/g, '<b>$&</b>'));
|
||||
</script>
|
||||
</body>
|
||||
</html>""");
|
||||
|
||||
return htmlContent.toString();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user