public class BatchService extends SgqService
config, daoHelper| Constructor and Description |
|---|
BatchService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAnalyzeFile(Batch batch,
Analyze analyze,
String fileName,
File file)
Ajoute un fichier d'analyse à un lot.
|
InputStream |
exportInventory()
Export de l'inventaire.
|
List<AnalyzeFile> |
findAllAnalyzeFilesByAnalyze(Analyze analyze) |
List<AnalyzeFile> |
findAllAnalyzeFilesByBatch(Batch batch) |
List<Analyze> |
findAllAnalyzesByBatch(Batch batch) |
Map<Place,List<PresentationModel>> |
findAllBatchPerPlaces(Place place)
Retourne tous les lots non expiré par emplacements.
|
List<Batch> |
findAllBetweenNumbers(int startNumber,
int endNumber) |
List<PresentationModel> |
findAllPresentationsByBatch(Batch batch)
Find all presentation for batch.
|
File |
generateControlFile(Batch batch)
Génere le pdf de controle d'indentification ou botanique suivant
le produit du lot.
|
List<Analyze> |
getAnalysisToReceive(AnalyzeFilter analyzeFilter) |
List<Analyze> |
getAnalysisToSend(AnalyzeFilter analyzeFilter) |
Analyze |
getAnalyzeById(String analyzeId) |
InputStream |
getAnalyzeDataStream(AnalyzeFile analyzeFile)
Retourne un flux de lecture des données d'un fichier d'analyse.
|
AnalyzeFile |
getAnalyzeFileById(String analyzeFileId) |
Batch |
getBatchById(String batchId)
Get batch instance with batch id.
|
protected Batch |
getBatchByNumber(int batchNumer)
Find batch by number.
|
long |
getBatchCount()
Get total batch count.
|
BatchModel |
getBatchModelById(String batchId)
Get batch instance with batch id.
|
String |
getControlFilename(Batch batch)
Retourne le nom du fichier généré lors du télechargement.
|
protected String |
getControlHtmlContent(Batch batch)
Extraction de la génération seule du contenu html pour être plus
facilement testé.
|
int |
getNextBioBatchNumber() |
int |
getNextNonBioBatchNumber() |
Presentation |
getPresentationById(String presentationId)
Get presentation by id.
|
List<ImportLog<Batch>> |
importBatchFile(File batchFile)
Import du fichier dbf des numéros de lots.
|
void |
prepareAnalyze(Batch batch,
AnalyzeType analyzeType) |
void |
receiveAnalyzeFromSupplier(Analyze analyze,
Supplier supplier) |
void |
recoverBatchFile(File file)
Reprise du fichier numero lots.
|
void |
saveAnalyze(Analyze analyze) |
void |
saveBatch(Batch batch)
Save batch.
|
org.apache.commons.lang3.tuple.Pair<List<BatchModel>,Long> |
searchBatch(SearchModel search,
int offset,
int count)
Return
count result and total result count in a Pair
elements. |
InputStream |
searchBatchASCsv(SearchModel search)
Export la recherche en csv.
|
void |
sendAnalyzeToSupplier(Analyze analyze,
Date sentDate,
Supplier supplier) |
void |
updatePresentation(Presentation presentation)
Update presentation.
|
setConfig, setServiceDAOHelperpublic long getBatchCount()
public org.apache.commons.lang3.tuple.Pair<List<BatchModel>,Long> searchBatch(SearchModel search, int offset, int count)
count result and total result count in a Pair
elements.search - search modeloffset - offsetcount - countpublic InputStream searchBatchASCsv(SearchModel search)
public Batch getBatchById(String batchId)
batchId - batch topia idpublic BatchModel getBatchModelById(String batchId)
batchId - batch topia idprotected Batch getBatchByNumber(int batchNumer)
batchNumer - batch numberpublic void saveBatch(Batch batch)
batch - batch to savepublic List<PresentationModel> findAllPresentationsByBatch(Batch batch)
batch - batchpublic Presentation getPresentationById(String presentationId)
presentationId - presentation topia idpublic void updatePresentation(Presentation presentation)
presentation - presentationpublic List<AnalyzeFile> findAllAnalyzeFilesByBatch(Batch batch)
public List<AnalyzeFile> findAllAnalyzeFilesByAnalyze(Analyze analyze)
public int getNextBioBatchNumber()
public int getNextNonBioBatchNumber()
public void saveAnalyze(Analyze analyze)
public InputStream getAnalyzeDataStream(AnalyzeFile analyzeFile)
analyzeFile - analyze filepublic List<Analyze> getAnalysisToSend(AnalyzeFilter analyzeFilter)
public List<Analyze> getAnalysisToReceive(AnalyzeFilter analyzeFilter)
public List<ImportLog<Batch>> importBatchFile(File batchFile)
batchFile - dbf filepublic void prepareAnalyze(Batch batch, AnalyzeType analyzeType)
public void sendAnalyzeToSupplier(Analyze analyze, Date sentDate, Supplier supplier)
public void receiveAnalyzeFromSupplier(Analyze analyze, Supplier supplier)
public void addAnalyzeFile(Batch batch, Analyze analyze, String fileName, File file)
batch - batch (can't be null if analyze is not)analyze - analyze (can't be null if batch is not)fileName - file namefile - filefor blobpublic AnalyzeFile getAnalyzeFileById(String analyzeFileId)
public File generateControlFile(Batch batch)
protected String getControlHtmlContent(Batch batch)
public String getControlFilename(Batch batch)
batch - batchpublic void recoverBatchFile(File file)
file - file to importpublic InputStream exportInventory()
public Map<Place,List<PresentationModel>> findAllBatchPerPlaces(Place place)
place - Copyright © 2012 Herboristerie Cailleau. All Rights Reserved.