My first productive task by W & G for efc ERP.
At the moment Materialstamm contains the History functionality for “Materialstamm Basisdaten”.
app.mat.BoMat contained in appBoMat.efcblMdMatBas contained in mat.efcblefc_client_java\efc_runner\src\resources\forms\mat\BoMat.xmlSoLiMatBasHistRepository declared in appSstMat.efcblSoLiMatBasHistRepositoryImplSvSoMatHist declared in appSstMat.efcblSoLiMatBasRepositorySoLiMatBasHistRepositorygetDcMatBasHist/efc_server/src/efcbl/sst/appSstMat.efcblValueObject SoLiMatSalValueObject SoLiMatSalHistextends SoLiMatSalValueObject DcMatSalHist (added by me)SfDcMatSalHist (added by me)DcMatSalHist/efc_runner/src/resources/forms/mat/DcMatSalHist.xmlDcMatSalHist objectSvSoMatHist should contain all necessary Repositories and methods for history implementationService SvSoMatHist in appSstMat.efcblSoLiMatSalRepositorySoLiMatSalHistRepositoryFrBoMat.groovy private EFCAdditionalAction aaInfoMatSalHist
//... initialize the action
aaInfoMatSalHist = new EFCAdditionalAction(tr("AA_MAT_INFOMATSALHIST"), "aaInfoMatSalHist", tr("AA_MAT_INFOMATSALHIST_DESC"))
//... add action to the menu
viewManager.addToMenuInfo(tr("AM_MAT_HISTINFO"),
(ArrayList) [aaInfoMatBasHist, aaInfoMatSalHist])
//... do something if the action was selected
public void handleAction(String ident, Object param) {
//...
switch (ident.toString()) {
//...
case aaInfoMatSalHist.getIdent():
// do something... (at the moment it is the copy from aaInfoMatBasHist)
setSysParamBaseKey()
openChildWindow(SfDcMatBasHist.class)
break
//...
/efc_server/src/efcbl/sst/appSstMat.efcblappBoMat.efcbl → data structures for material data objectssst/appSstMat.efcbl → material history data structures and data containers for UIValueObject SoLiMatPurValueObject SoLiMatPurHistextends SoLiMatPurValueObject DcMatPurHist (added by me)SfDcMatPurHist (added by me)DcMatPurHist/efc_runner/src/resources/forms/mat/DcMatPurHist.xmlDcMatPurHist objectSample data containing history:
Here is described how this functionality is implemented for “Vertrieb/Aufträge”:
appSstDoc.efcbl)ValueObject DcDocHistForQty → ValueObject DcMatSalHistList<#DcLiDocItemHistForQty> qtydocitemListValueObject DcLiDocItemHistForQty → at the moment SoLiMatSalHist (maybe I should create a new data container explicitely used for displaying)ref List<#DcLiQtyHist> qtyhistList;ValueObject DcLiQtyHist → …SoLiDocItemHistRepositoryImpl.getListDocItemHistForDocObj() → SoLiMatSalHistRepositoryImpl.getListMatSalHistForMatObj()SvSoDocHist is declared in appSstDoc.efcblSvSoDocHistImplSvSoDocHistImpl.getDcDocHistForQty()@CompileStatic to SvSoMatHistImpl the line 33 in SvSoMatHistImpl does not work any more:matHist.matbashistList = soLiMatBasHistRepository.getListMatBasHistForMat(company, matnum)
EFCList<SoLiMatBasHist> instead of EFCList<SoLiMatBas>