diff --git a/bi/config/BiUiLabels.xml b/bi/config/BiUiLabels.xml
deleted file mode 100644
index 2d1148451..000000000
--- a/bi/config/BiUiLabels.xml
+++ /dev/null
@@ -1,468 +0,0 @@
-
-
-
-
- Business Intelligence Application
- Application d'informatique décisionnelle
- Applicazione Business Intelligence
- ビジネスインテリジェンス
- โปรแกรมประยุกต์การเรียนรู้ทางธุรกิจ
- 商业智能应用程序
- 商業智慧應用程式
-
-
- OFBiz: Business Intelligence
- OFBiz: Informatique décisionnelle
- OFBiz: Business Intelligence
- OFBiz: ビジネスインテリジェンス
- OFBiz:การเรียนรู้ทางธุรกิจ
- OFBiz:商业智能
- OFBiz:商業智慧
-
-
- جزء من عائلة أوفبيز للتطبيقات الحرة للتسيير
- Teil der Apache OFBiz Familie von Open Source Software
- Part of the Apache OFBiz Family of Open Source Software
- Parte de la familia de software Apache OFBiz de código abierto
- Un module de la famille Apache OFBiz, logiciel libre de gestion d'entreprise.
- Un modulo della famiglia di software open source Apache OFBiz
- Part of the Apache OFBiz Family of Open Source Software
- Deel van de Apache OFBiz-suite van Open Source Software
- Parte da família OfBiz de software de fonte aberta
- Parte da família OfBiz de software de fonte aberta
- Partea de Deschidere Pentru Afaceri Familiale din Open Source Software
- Входит в состав семейства Apache OFBiz
- ส่วนหนึ่งของธุรกิจแบบครอบครัวที่เป็นซอฟต์แวร์โอเพนซอส
- 开源软件OFBiz家族的一部分
- OFBiz的一部分
- OFBiz的一部分
-
-
- Current Status
- Statuts en cours
- Stato attuale
- 現在のステータス
- สถานะในปัจจุบัน
- 当前状态
- 目前狀態
-
-
- Field Description
- Description de champ
- Descrizione Campo
- 項目詳細
- รายละเอียดข้อมูล
- 数据项描述
- 欄位描述
-
-
- Field Name
- Nom de champ
- Nome Campo
- 項目名称
- ชื่อข้อมูล
- 数据项名称
- 欄位名稱
-
-
- Business Intelligence Integrated Framework
- Informatique décisionnelle intégrée au Framework
- Business Intelligence Framework Integrato
- ビジネスインテリジェンス統合フレームワーク
- Framework ของการเรียนรู้ทางธุรกิจรวมกัน
- 商业智能集成框架
- 商業智慧整合框架
-
-
- Main Page
- Page D'accueil
- Pagina Principale
- メインページ
- หน้าหลัก
- 首页
- 首頁
-
-
- The natural key: ${naturalKeyFields} is empty in value: ${dimensionValue}
- La chiave naturale: ${naturalKeyFields} è vuota nel valore: ${dimensionValue}
- 自然キー: ${naturalKeyFields} が値: ${dimensionValue} で空です
- 值:${dimensionValue} 中的自然键:${naturalKeyFields} 是空的
- 值:${dimensionValue} 中的自然鍵:${naturalKeyFields} 是空的
-
-
- This is a proof of concept for an OFBiz integrated framework for business intelligence analysis.
- C'est une preuve de concept d'informatique décisionnelle intégrée au Framework
- Questo è un prototipo di un framework per analisi di dati (business intelligence) integrato in OFBiz.
- OFBiz統合フレームワークにおけるビジネスインテリジェンス分析のコンセプト。
- การทดสอบความเข้าใจสำหรับ OFBiz framework เพื่อการวิเคราะห์ระบบการเรียนรู้ทางธุรกิจ
- 这是一个验证OFBiz集成框架能够用于商业智能的实现。
- 這是一個驗證OFBiz整複合框架能夠用於商業智慧的實作.
-
-
- The idea is to define a set entities for business intelligence analysis in a separate (olap) database,
- L'idée est de définir un ensemble d'entités pour l'analyse de l'Informatique décisionnelle dans une base de données séparée (OLAP),
- L'idea è di definire un'insieme di entità per le analisi di business intelligence in un database (OLAP) separato,
- ビジネスインテリジェンス分析のために別の(OLAP)データベースにエンティティ一式を定義するという考えは、
- แผนการในการตั้งค่าสิ่งที่มีอยู่เพื่อวิเคราะห์การเรียนรู้ทางธุรกิจในการแยก (olap) ฐานข้อมูล
- 思路是在一个独立的(OLAP)数据库中为商业智能分析定义一组实体,
- 點子是在一個分離的(OLAP)資料庫為商業智慧分析定義一組資料實體,
-
-
- accessible, in the same way as the main one (OLTP), via the delegator.
- accessibles, de la même manière que pour la base de données principale (OLTP), par l'intermédiaire du délégateur.
- accessibile, nello stesso modo di quello principale (OLTP), attraverso un delegator.
- 理解しやすく、主流(OLAP)と同じ方法で、デリゲータによって実現します。
- สามารถเข้าถึงได้ในทางเดียวกันกับทางแรก (OLTP)
- 可访问,与主要的数据库同构,通过delegator实现。
- 可存取的,和主要的(OLTP)資料庫相同結構,透過delegator.
-
-
- The new olap database, will contain all the entities necessary to datawarehouse analysis:
- La nouvelle base de données OLAP, contiendra toutes les entités nécessaires à l'analyse du datawarehouse :
- Il nuovo database olap, conterrà tutte le entità necessarie alle analisi di datawarehouse:
- 新しいOLAPデータベースはデータウェアハウス分析に必要なエンティティを全て含んでいます。
- ฐานข้อมูล olap ใหม่จะประกอบด้วยสิ่งที่มีอยู่ซึ่งจำเป็นในการวิเคราะห์ข้อมูลคลังสินค้า:
- 新的OLAP数据库,将包含全部数据仓库分析所需的实体:
- 新的OLAP資料庫,將包含全部資料倉儲分析所需的資料實體:
-
-
- dimensions, facts and star schemas (that are view-entities).
- dimensions, faits et schémas en étoile (ce sont des vues sur la base de données : view-entities au sens d'OFBiz).
- dimensioni, fatti e star schemas (view-entities).
- ディメンジョン、ファクト、そしてスタースキーマ (ビュー) です。
- ขอบเขต,ข้อเท็จจริงและแผนผัง (เป็นการแสดงสิ่งที่มีอยู่)
- 维度、事实和星型模型(浏览实体)。
- 維度、事實和星型模型(檢視資料實體).
-
-
- The dimensions, facts and star schemas are defined according to best practices for datawarehouses
- Les dimensions, les faits et les schémas en étoile sont définis selon les bonnes pratiques pour les datawarehouses
- Le dimensioni, fatti e star schemas sono definiti in accordo alle migliori pratiche per i datawarehouses
- ディメンジョン、ファクト、そしてスタースキーマはデータウェアハウスのベストプラックティス、
- ขอบเขต,ข้อเท็จจริงและแผนผังตามที่ระบุเป็นวิธีปฏิบัติที่ดีที่สุดสำหรับข้อมูลคลังสินค้า
- 维度、事实和星型模型定义参考了数据仓库最佳实践
- 維度、事實和星型模型定義參考了資料倉儲最佳慣例
-
-
- and best practices for OFBiz: they are defined as standard entities using the xml entity defs;
- et pour OFBiz. Ils sont définis comme des entités standards à l'aide de définitions d'entités dans des fichiers XML.
- e le migliori pratiche per OFBiz: sono definite come entità standard usando le definizioni xml entity;
- およびOFBizのベストプラックティスに従って定義されています: それらはxmlエンティティ定義を使用して標準エンティティとして定義されています。
- และวิธีปฏิบัติที่ดีที่สุดสำหรับ OFBiz คือ: ต้องกำหนดมาตรฐานสิ่งที่มีอยู่ให้เหมือนกับที่ใช้ใน xml
- 以及OFBiz最佳实践:把它们用XML实体定义定义为标准实体;
- 以及OFBiz最佳慣例:把它們用XML資料實體定義定義為標準資料實體;
-
-
- clear and consistent naming conventions are used and they are documented
- Des conventions de nommages claires et cohérentes sont utilisées et documentées
- sono usate convenzioni nei nomi corrette e consistenti e sono documentate
- 明瞭で一貫した命名規則が使用され、またそれらを文書化するため、
- ยกเลิกและใช้ชื่อข้อตกลงที่สอดคล้องกันและเป็นไปตามเอกสาร
- 使用简明一致的命名规范,
- 使用簡明一致的命名規範,
-
-
- by meta data descriptions (in the entity def).
- par des méta descriptions de données (dans les définitions d'entités)
- mediante le descrizioni dei meta dati (nella definizione entità).
- メタデータ定義が使用されます (エンティティ定義の中で)。
- โดยรายละเอียดที่มาของข้อมูล(อยู่ในที่กำหนด)
- (在实体定义中)通过元数据描述进行文档化。
- (在資料實體定義中)透過 Meta data 描述進行檔化.
-
-
- The best practices for datawarehouses are mainly taken from the great book "The Data Warehouse Toolkit - Second Edition" by Ralph Kimball.
- Les bonnes pratiques pour datawarehouses sont principalement tirées du fameux livre "The Data Warehouse Toolkit - Second Edition" by Ralph Kimball.
- Sono state ricavate le migliori pratiche per i datawarehouses dal grande libro "The Data Warehouse Toolkit - Second Edition" di Ralph Kimball.
- データウェアハウスのベストプラックティスは偉大な書籍 "The Data Warehouse Toolkit - Second Edition" by Ralph Kimball の中で詳しく述べられています。
- วิธีปฏิบัติที่ดีที่สุดสำหรับข้อมูลคลังสินค้าส่วนใหญ่มาจากหนังสือดี ๆ ชื่อ "The Data Warehouse Toolkit - Second Edition" โดย Ralph Kimball
- 数据仓库的最佳实践来自Ralph Kimball撰写的伟大的书《数据仓库工具箱:维度建模的完全指南(第二版)》。
- 資料倉儲的最佳慣例來自Ralph Kimball撰寫的偉大的書《資料倉儲工具箱:維度建模的完全指南(第二版)》.
-
-
- The data for dimensions and facts are maintained and kept up to date using standard OFBiz services
- Les données des dimensions et faits sont maintenues et tenues à jour à l'aide des services standard d'OFBiz
- I dati per dimensioni e fatti sono gestiti e mantenuti aggiornati usando servizi standard di OFBiz
- ディメンジョンとファクトのデータを最新に保つために、標準OFBizサービス
- ข้อมูลสำหรับขอบเขตและข้อเท็จจริงคือการดูแลและรักษาวันที่ใช้บริการ OFBiz
- 数据维度和事实的维护和更新由标准的OFBiz服务负责
- 資料維度和事實的維護和更新由標準的OFBiz服務負責
-
-
- (most of them written in minilang to facilitate customizations) and eca rules (easily customizable).
- (la plupart d'entre eux écrits en minilang pour faciliter la personnalisation) et des règles de ECA (facilement personnalisables).
- (molti dei quali sono scritti utizzando minilang per facilitare le personalizzazioni) e le regole eca (facilmente personalizzabili).
- (大部分はミニ言語で記述されていて、カスタマイズが容易) および ECAルール (容易にカスタマイズ可能) が使われています。
- (สิ่งที่เขียนทั้งมหดใน minilang ถึง facilitate customizations) และเข้าแทนที่สถานะ (อย่างสะดวก)
- (它们中的绝大多数使用minilang来实现定制)以及eca规则(容易定制)实现。
- (它們中的絶大多數使用minilang來實作客製化)以及ECA規則(容易客製化).
-
-
- The main low level services to post data to the datawarehouse,
- Les principaux services de bas niveau pour envoyer des données au datawarehouse,
- I servizi principali a basso livello per ricavare i dati del datawarehouse,
- 主に下位(子)のサービスでデータウェアハウスにデータが送信されます、
- หลักการบริการระดับล่างในการบันทึกข้อมูลลงในคลังข้อมูลสินค้า
- 主要的底层服务实现把数据提交到数据仓库,
- 主要的底層服務實現把資料提交到資料倉儲,
-
-
- to map the operational keys with the datawarehouse ones, and to manage
- pour aligner les clefs opérationnelles avec celles du datawarehouse, et contrôler
- la mappa di chiavi operazionali con il datawarehouse, e la gestione
- 操作キーとデータウェアハウスをマップし、
- แผนที่สำคัญที่สามารถใช้งานได้ด้วยข้อมูลคลังสินค้าและการจัดการ
- 把操作键与数据仓库的建立映射,并管理
- 把操作關鍵和資料倉儲的部份建立映對,並管理
-
-
- history of data changes are already implemented; they will be improved as the datawarehouse will grow (e.g. performance enhancements).
- l'historique des changements de données sont déjà implémentés. Ils seront améliorés quand le datawarehouse se développera (par exemple des perfectionnements en performance).
- storia di cambio di dati che sono già implementati; sarà aumentato di caratteristiche non appena crescerà il datawarehouse (e.g. aumento prestazioni).
- 履歴データの変更の管理を行うことがすでに実装されています: データウェアハウスの成長に合わせてそれらも見直されます (たとえばパフォーマンスの改善)
- ความเป็นมาของข้อมูลได้เปลี่ยนแปลงเรียบร้อยแล้ว; ได้มีการปรับปรุงข้อมูลคลังสินค้าให้ดีขึ้น (ตัวอย่างเช่น การทำให้ดีขึ้น)
- 已经实现数据的历史记录;它们会随数据仓库的增长而改进(如性能提升)。
- 已經實作資料的歷史記錄;它們會隨資料倉儲的增長而改進(如性能提升).
-
-
- The following dimensions (and data services) are defined: CurrencyDimension, DateDimension, ProductDimension;
- Les dimensions suivantes (et les services de données) sont définis : dimension de devise, dimension de date, dimension d'article
- Le seguenti dimensioni (e servizi dei dati) sono definiti: CurrencyDimension, DateDimension, ProductDimension;
- 次のディメンジョン (およびデータサービス) が定義されています: 通貨ディメンジョン、日付ディメンジョン、製品ディメンジョン、
- การวัดขนาดตามที่กำหนด (และข้อมูลการบริการ) ระบุ : CurrencyDimension, DateDimension, ProductDimension;
- 已经定义了下列维度(以及数据服务):货币维度、日期维度、产品维度;
- 已經定義了下列維度(以及資料服務):貨幣維度、日期維度、產品維度;
-
-
- we will have to complete them and design the other ones (the total number of dimension will be probably around 20).
- Nous devrons les compléter et en concevoir d'autres (le nombre total de dimension sera probablement autour 20).
- verranno usati per completare questi e disegnare gli altri (il numero totale di dimensioni saranno probabilmente circa 20).
- 私たちはそれを完了させ、別のものを設計する必要があります (ディメンジョンの合計は約20になります)。
- เรากำลังทำสิ่งเหล่านั้นสำเร็จแล้วและวางแผนสิ่งต่อไป (จำนวนทั้งหมดประมาณ 20)
- 我们将完成它们,并设计其它的(全部维度数量大约将在20个左右)。
- 我們將完成它們,並設計其它的(全部維度數量大約將在20個左右).
-
-
- Just one fact and one star schema are defined: SalesInvoiceItemFact and SalesInvoiceItemStarSchema.
- Seul un fait et un schéma d'étoile sont définis : SalesInvoiceItemFact et SalesInvoiceItemStarSchema.
- Solo un fatto e uno star schema sono definiti: SalesInvoiceItemFact e SalesInvoiceItemStarSchema.
- ファクトが1つとスタースキーマが1つ定義されています: 販売請求書明細ファクト および 販売請求書明細スタースキーマ。
- จะต้องระบุ 1 ข้อเท็จจริงและ 1 โครงการ: SalesInvoiceItemFact and SalesInvoiceItemStarSchema
- 只定义了一个事实和一个星型模型:SalesInvoiceItemFact和SalesInvoiceItemStarSchema。
- 只定義了一個事實和一個星型模型:SalesInvoiceItemFact和SalesInvoiceItemStarSchema.
-
-
- You can quickly initialize the datawarehouse by clicking on the link below:
- Vous pouvez rapidement initialiser le datawarehouse en cliquant sur le lien ci-dessous :
- Tu puoi velocemente inizializzare il datawarehouse facendo click sul link qui sotto:
- 次のリンクをクリックすると、データウェアハウスを簡単に初期化することができます:
- คุณสามารถเริ่มต้นเข้าสู่ข้อมูลคลังสินค้าได้อย่างรวดเร็วโดยการคลิกบนลิงค์ด้านล่างนี้
- 你能通过点击下面的链接来快速初始化数据仓库:
- 你能透過點選下面的連結來快速初始化資料倉儲:
-
-
- The CurrencyDimension, DateDimension, ProductDimension and the SalesInvoiceItemFact entities will be automatically populated.
- La dimension de devise, la dimension de date, la dimension d'article et SalesInvoiceItemFact seront automatiquement alimentés.
- Le entità CurrencyDimension, DateDimension, ProductDimension e SalesInvoiceItemFact sono caricate automaticamente.
- 通貨ディメンジョン、日付ディメンジョン、製品ディメンジョン、および販売請求書明細ファクトのエンティティは自動的に生成されます。
- CurrencyDimension, DateDimension, ProductDimension และ SalesInvoiceItemFact จะคงอยู่โดยอัตโนมัติ
- 会自动把CurrencyDimension、DateDimension、ProductDimension以及SalesInvoiceItemFact实体填入。
- 會自動把CurrencyDimension、DateDimension、ProductDimension以及SalesInvoiceItemFact資料實體增加資料.
-
-
- Then you can run the analysis using the report builder menu.
- Vous pouvez alors exécuter l'analyse en utilisant le menu "Générateur de rapport".
- Successivamente potrai eseguire l'analisi usando il menu costruzione report.
- そしてレポートビルダメニューから分析を実行することができます。
- หลังจากที่คุณทำการวิเคราะห์แล้วสามารถใช้เมนูการสร้างรายงานได้
- 然后你能使用报告生成程序菜单运行分析。
- 然後你能使用報表產生程式選單執行分析.
-
-
- The report builder is a very simple tool that allows you to run
- Le générateur de rapport est un outil très simple qui vous permet d'exécuter
- La costruzione report è uno strumento molto semplice che ti permette di eseguire
- レポートビルダは、分析を実行するための、非常にシンプルなツールです。
- การสร้างรายงานเป็นเครื่องมือง่าย ๆ ที่ให้คุณใช้งานได้
- 报告生成程序是一个很简单的工具,允许你运行
- 報表產生程式是一個很簡單的工具,允許你執行
-
-
- the analysis on all the star schemas defined in the system.
- l'analyse sur tous les schémas en étoile définis dans le système.
- le analisi su tutti gli star schemas definiti nel sistema.
- すべてのスタースキーマ上での分析がシステムで定義されています。
- การวิเคราะห์บนแผนผังทั้งหมดที่ระบุในระบบ
- 系统中定义的所有星型模型的分析。
- 系統中定義的所有星型模型的分析.
-
-
- However, right now there is just one star schema defined:
- Cependant, pour l'instant il y a qu'un schéma en étoile défini :
- Comunque, fino adesso c'è solo un star schema definito:
- しかし、今現在1つのスタースキーマだけが定義されています:
- อย่างไรก็ตาม, ขณะนี้มีแผนผังที่กำหนด:
- 然而,目前只定义了一个星型模型:
- 然而,目前只定義了一個星型模型:
-
-
- SalesInvoiceItemStarSchema that is a simple "profit and loss" (P&L) analysis.
- SalesInvoiceItemStarSchema qui est une simple analyse "profits et pertes" (P&L).
- SalesInvoiceItemStarSchema che è una semplice analisi di "profit and loss" (P&L).
- 販売請求明細スタースキーマ は単純な "損益" (P&L) 分析です。
- SalesInvoiceItemStarSchema เป็นการวิเคราะห์ขั้นพื้นฐานของ "กำไรและขาดทุน" (P&L)
- 销售发票明细星型模型(SalesInvoiceItemStarSchema)是一个简单的盈亏分析。
- 銷售發票細項星型模型(SalesInvoiceItemStarSchema)是一個簡單的盈虧分析.
-
-
- Just select using the checkboxes the fields (columns) you want to see in the report
- Sélectionnez simplement en utilisant les case à cocher des champs (colonnes) que vous voulez voir dans le rapport
- Seleziona i campi che vuoi vedere
- チェックボックスの項目を選択するだけでレポートを参照することができます。
- จะต้องเลือกใช้เช็คบ็อก (คอลัมภ์) ตามที่คุณต้องการให้มีในรายงาน
- 使用选择框选择你想在报告中看到的那些数据项(列),
- 使用選擇框選擇你想在報表中看到的那些欄位,
-
-
- and a simple report will be shown: according to the columns selected the data will be aggregated (drill up/down);
- et un simple rapport sera généré : selon les colonnes choisies les données seront regroupées (tri haut/bas).
- e verrà mostrato un semplice report: i dati verranno aggregati (drill up/down) in base alle colonne selezionate;
- そして、選択した項目のデータに従って簡単なレポートが集計され表示されます (ドリルアップ/ダウン)
- และพื้นฐานของรายงานจะต้องแสดง: ตามคอลัมภ์ที่เลือกข้อมูลจะต้องรวมกัน (drill up/down);
- 然后会显示一个简单的报告:按照选择的列,数据会被聚合(汇总分析/细化分析);
- 然後會顯示一個簡單的報表:按照選擇的欄位,資料會被聚合(匯總分析/細化分析);
-
-
- all the descriptions you see in the report screens are pulled from the entity definitions.
- Toutes les descriptions que vous voyez dans les écrans de rapport sont tirées des définitions d'entités.
- tutte le descrizioni che tu vedrai nelle scrermate del report sono prelevare dalla definizioni delle entità.
- レポート画面のすべての定義がエンティティの定義から抽出されます。
- รายละเอียดทั้งหมดที่คุณเห็นในหน้ารายงานดึงมาจากสิ่งที่กำหด
- 你在报告屏幕中看到的全部描述都是从实体定义中抽取出来的。
- 你在報表畫面中看到的全部描述都是從資料實體定義中抽取出來的.
-
-
- The initialization is needed only once, because the product data and sales invoice data
- L'initialisation n'est nécessaire qu'une fois, parce que les données d'articles et de factures de vente sont
- L'inizializzazione è necessaria solo una volta, perchè i dati dei prodotti e delle fatture di vendita
- 製品データおよび販売請求データのために、初期化は1回だけ必要です。
- การเริ่มต้นเป็นความต้องการอย่างแรกเพราะเป็นข้อมูลสินค้าและข้อมูลใบแจ้งการขาย
- 初始化只需要做一次,因为产品数据和销售发票数据
- 初始化只需要做一次,因為產品資料和銷售發票資料
-
-
- are kept updated by ecas: if you create/update a product or create a new invoice,
- sont maintenues à jour par ECAS (Evènements/Conditions/Actions). Si vous créez/mettez à jour un article ou créez une nouvelle facture,
- sono mantenuti aggiornati dagli ecas: ogni volta che crei/aggiorni un prodotto o crei una nuova fattura,
- 製品の作成/更新または新規請求の作成時のECAS更新で保たれます。
- เป็นการเปลี่ยนแปลงโดยการแทนที่: ถ้าคุณสร้าง/เปลี่ยนแปลงสินค้าหรือสร้างใบส่งของใหม่
- 是由ECAS来保持和更新的:如果你创建/更新一个产品或新建一个发票,
- 是由ECAS來保持和更新的:如果你新建/更新一個產品或新建一個發票,
-
-
- the new information will be immediately included in the datawarehouse analysis.
- la nouvelle information sera immédiatement incluse dans l'analyse du datawarehouse.
- la nuova informazione sarà immediatamente inclusa nelle analisi del datawarehouse.
- 新しい情報はデータウェアハウス分析の中に直接取り込まれます。
- ข้อมูลใหม่จะต้องรวมทันทีในการวิเคราะห์ข้อมูลคลังสินค้า
- 新信息会立即包含在数据仓库的分析中。
- 新訊息會立即包含在資料倉儲的分析中.
-
-
- Quick Init DataWarehouse
- Initialiser rapidement le dataWarehouse
- Inizializzazione veloce DataWarehouse
- データウェアハウスをクイック初期化
- เริ่มต้นเข้าสู่ข้อมูลคลังสินค้าอย่างรวดเร็ว
- 快速初始化数据仓库
- 快速初始化資料倉儲
-
-
- Quick Start Guide
- Guide de démarrage rapide
- Guida Rapida
- クイックスタートガイド
- เข้าสู่คำแนะนำอย่างรวดเร็ว
- 快速使用指南
- 快速使用指南
-
-
- Render the Report
- Générer le rapport
- Visualizza il Report
- レポートを作成
- เสนอรายงาน
- 修饰报告
- 修飾報告
-
-
- Report Builder
- Générateur de rapport
- Costruzione Report
- レポートビルダ
- สร้างรายงาน
- 报告生成程序
- 報告產生程式
-
-
- Render Star Schema Report
- Générateur de rapport de schéma en étoile
- Visualizza Report Star Schema
- スタースキーマレポートを作成
- เสนอแผนผังรายงาน
- 修饰星型模型
- 修飾星型模型
-
-
- Select Star Schema
- Sélectionnez le schéma en étoile
- Seleziona Star Schema
- スタースキーマを選択
- เลือกแผนผัง
- 选择星型模型
- 選擇星型模型
-
-
- Select Star Schema Fields
- Sélectionnez les champs du schéma en étoile
- Seleziona Campi Star Schema
- スタースキーマフィールドを選択
- เลือกช่องแผนผัง
- 选择星型模型数据项
- 選擇星型模型欄位
-
-
- Select the start schema (report)
- Sélectionnez le schéma en étoile (rapport)
- Seleziona lo start schema (report)
- スタースキーマを選択(レポート)
- เลือกแผนผัง (รายงาน)
- 选择星型模型(报告)
- 選擇星型模型(報告)
-
-
- The update mode: ${updateMode} is still not supported.
- Il metodo di aggiornamento: ${updateMode} non è ancora supportato.
- 更新モード: ${updateMode} はまだサポートされていません。
- 还不支持更新状态:${updateMode}。
- 還不支援更新狀態:${updateMode}.
-
-
diff --git a/bi/config/bi.properties b/bi/config/bi.properties
deleted file mode 100644
index 56068e517..000000000
--- a/bi/config/bi.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-###############################################################################
-fromDate=2016-09-01
-thruDate=2026-09-01
\ No newline at end of file
diff --git a/bi/data/BiSecurityGroupDemoData.xml b/bi/data/BiSecurityGroupDemoData.xml
deleted file mode 100644
index c8ec005eb..000000000
--- a/bi/data/BiSecurityGroupDemoData.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
diff --git a/bi/data/BiSecurityPermissionSeedData.xml b/bi/data/BiSecurityPermissionSeedData.xml
deleted file mode 100644
index db87402e2..000000000
--- a/bi/data/BiSecurityPermissionSeedData.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/bi/data/BiSystemPropertyData.xml b/bi/data/BiSystemPropertyData.xml
deleted file mode 100644
index 67d759b28..000000000
--- a/bi/data/BiSystemPropertyData.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/bi/data/BiTypeData.xml b/bi/data/BiTypeData.xml
deleted file mode 100644
index c803a3b36..000000000
--- a/bi/data/BiTypeData.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/bi/entitydef/entitygroup.xml b/bi/entitydef/entitygroup.xml
deleted file mode 100644
index b5510b7f8..000000000
--- a/bi/entitydef/entitygroup.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/bi/entitydef/entitymodel.xml b/bi/entitydef/entitymodel.xml
deleted file mode 100644
index 8bae383a4..000000000
--- a/bi/entitydef/entitymodel.xml
+++ /dev/null
@@ -1,493 +0,0 @@
-
-
-
-
-
-
-
- OLAP entities
- None
-
-
-
-
-
- Country dimension. Based on ISO 3166-1. The natural key is [geoId]
-
- Unique identifier of the Date dimension record
-
-
- The natural key, based on ISO 3166-1 alpha-3
-
-
- The name of the country, based on ISO 3166
-
-
- The ISO 3166-1 alpha-2 code of the country
-
-
- Based on the ISO 3166-1 alpha-3 code of the country
-
-
- The telephone country code. Based on ITU.E123 and ITU.164
-
-
- The country code top-level domain for the country. Base on IANA rfc1591
-
-
-
-
- Date (days) dimension. The natural key is [dateValue]
-
- Unique identifier of the Date dimension record
-
-
- The date (day)
-
-
- Full date description
-
-
- The name of the day (Monday, Tuesday, etc...)
-
-
- The number of the day in the month
-
-
- The number of the day in the year
-
-
- The name of the month (January, February, etc...)
-
-
- The number of the month (1-12)
-
-
- The year (2008, 2009, etc...)
-
-
- The number of the week in the month
-
-
- The number of the week in the year
-
-
- YYYY-MM-DD
-
-
- YYYY-MM
-
-
- Weekday indicator (Weekday or Weekend)
-
-
-
-
-
- Currency dimension. The natural key is [currencyId]
-
- Unique identifier of the Currency dimension record
-
-
- The currency id (natural key).
-
-
- Full currency description
-
-
-
-
-
- Product dimension. The natural key is [productId]
-
- Unique identifier of the Product dimension record
-
-
- The natural key. From Product.productId
-
-
- The product type. From ProductType.description
-
-
-
-
-
-
-
-
-
-
- A transaction fact entity with invoice item grain.
-
-
-
-
-
-
-
-
-
- Quantity invoiced. From InvoiceItem.quantity
-
-
-
- Extended gross amount: quantity invoiced multiplied by the list unit price.
-
-
- Extended discount amount.
-
-
- Extended net amount: gross amount less discounts.
-
-
- Extended tax amount.
-
-
- Extended manufacturing fixed cost.
-
-
- Extended manufacturing variable cost.
-
-
- Extended storage cost.
-
-
- Extended distribution cost.
-
-
- Extended net amount less all the costs.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- A transaction fact entity with order item grain.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Quantity order. From OrderItem.quantity
-
-
-
- Extended gross amount: quantity item multiplied by the unit price.
-
-
- Extended gross cost: quantity item multiplied by the last price.
-
-
- Extended discount amount.
-
-
- Extended net amount: gross amount less discounts.
-
-
- Extended shipping amount.
-
-
- Extended tax amount.
-
-
-
- Gross Sales: Gross Amount plus Shipping Amount.
-
-
- Gross Merchandize Sales: Gross Amount.
-
-
- Gross Merchandize Profit: Gross Merchandize Sales less Gross Cost.
-
-
- Gross Shipping Sales: Shipping Amount
-
-
- Gross Shipping Cost
-
-
- Gross Shipping Profit: Gross Shipping Sales less Gross Shipping Cost.
-
-
- Gross Profit: Gross Merchandize Profit less Gross Shipping Profit.
-
-
-
- Count of order.
-
-
- Product promotion Code.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- A transaction fact entity with inventory item.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Invoice Item star schema (Profit and Loss Statement).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Invoice id
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Order Item star schema (Profit and Loss Statement).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Order id
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- "Inventory Item Schema.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Inventory Item Id
-
-
- Facility Id
-
-
- Product id
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/bi/ofbiz-component.xml b/bi/ofbiz-component.xml
deleted file mode 100644
index 4138c6245..000000000
--- a/bi/ofbiz-component.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/bi/servicedef/secas.xml b/bi/servicedef/secas.xml
deleted file mode 100644
index b0cb66155..000000000
--- a/bi/servicedef/secas.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/bi/servicedef/services.xml b/bi/servicedef/services.xml
deleted file mode 100644
index 16ab41086..000000000
--- a/bi/servicedef/services.xml
+++ /dev/null
@@ -1,179 +0,0 @@
-
-
-
-
-
-
- Generic service to load data into a dimension entity (olap entity).
-
-
-
-
-
- Generic service to get the dimensionId for a natural key.
-
-
-
-
-
- Quickly initialize the dimensions (Currency, Date, Product) and facts (SalesInvoiceItem): useful to quickly initialize the datawarehouse.
-
-
-
-
-
-
- Loads data in the DateDimension entity (olap entity) using the update strategy of 'type 1': overwrite the values of the attributes
-
-
-
-
- Loads data in the CurrencyDimension entity (olap entity) using the update strategy of 'type 1': overwrite the values of the attributes
-
-
-
- Pulls information from the Product* entities (oltp entities) and prepares data for the ProductDimension entity (olap entity)
-
-
-
-
- Pulls information from the Product* entities and stores them in the ProductDimension entity (olap entity)
-
-
-
-
- Same as loadProductInProductDimension; the update strategy is 'type 1': overwrite the values of the attributes
-
-
-
-
- Same as loadProductInProductDimension; the update strategy is 'type 2': add a dimension row
-
-
-
-
- Calls the loadProductInProductDimension service for all the products.
-
-
-
-
-
-
- Pulls information from the Invoice* entities and stores them in the SalesInvoiceItem entity (olap entity).
- One of invoiceId/invoiceItemSeqId or invoice/invoiceItem must be passed or an error is returned.
-
-
-
-
-
-
-
- Calls the loadSalesInvoiceItemFact service for all the invoice items.
-
-
-
-
-
-
- Pulls information from the OrderItem* entities and stores them in the SalesOrderItem entity (olap entity).
- One of orderId/orderItemSeqId or order/orderItem must be passed or an error is returned.
-
-
-
-
-
-
-
-
- Calls the loadSalesOrderItemFact service for all the order items.
-
-
-
- Load Sales Order Data Daily.
-
-
- Import Sales Order Data.
-
-
-
-
- Import Sales Order Data.
-
-
-
-
-
-
-
-
-
-
-
-
-
- Create a SalesInvoiceItemFact record
-
-
-
-
- Update a SalesInvoiceItemFact record
-
-
-
-
- Delete a SalesInvoiceItemFact record
-
-
-
-
- Create a SalesOrderItemFact
-
-
-
-
- Update a SalesOrderItemFact
-
-
-
-
- Delete a SalesOrderItemFact
-
-
-
-
diff --git a/bi/src/main/groovy/org/apache/ofbiz/bi/DimensionServices.groovy b/bi/src/main/groovy/org/apache/ofbiz/bi/DimensionServices.groovy
deleted file mode 100644
index e9f711425..000000000
--- a/bi/src/main/groovy/org/apache/ofbiz/bi/DimensionServices.groovy
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-*/
-package org.apache.ofbiz.bi
-
-import org.apache.ofbiz.entity.GenericEntity
-import org.apache.ofbiz.entity.GenericValue
-import org.apache.ofbiz.entity.condition.EntityCondition
-import org.apache.ofbiz.entity.condition.EntityConditionBuilder
-
-Map quickInitDataWarehouse() {
- run service: 'loadDateDimension', with: parameters
- run service: 'loadCurrencyDimension', with: [:]
-
- // loads all products in the ProductDimension
- run service: 'loadAllProductsInProductDimension', with: [:]
-
- // loads the invoice items in the SalesInvoiceItemFact fact entity
- EntityCondition entryExprs = new EntityConditionBuilder().AND {
- EQUALS(invoiceTypeId: 'SALES_INVOICE')
- GREATER_THAN_EQUAL_TO(invoiceDate: parameters.fromDate)
- LESS_THAN_EQUAL_TO(invoiceDate: parameters.thruDate)
- }
- from('Invoice').where(entryExprs).queryIterator().each {
- run service: 'loadSalesInvoiceFact', with: it
- }
-
- // loads the order items in the SalesOrderItemFact fact entity
- entryExprs = new EntityConditionBuilder().AND {
- EQUALS(orderTypeId: 'SALES_ORDER')
- GREATER_THAN_EQUAL_TO(orderDate: parameters.fromDate)
- LESS_THAN_EQUAL_TO(orderDate: parameters.thruDate)
- }
- from('OrderHeader').where(entryExprs).queryIterator().each {
- run service: 'loadSalesOrderFact', with: [orderId: it.orderId]
- }
-
- // loads the inventory items in the InventoryItemFact fact entity
- from('InventoryItem').where('inventoryItemTypeId', 'NON_SERIAL_INV_ITEM').queryIterator().each {
- run service: 'loadInventoryFact', with: [inventoryItemId: it.inventoryItemId]
- }
- return success()
-}
-
-Map loadCurrencyDimension() {
- // Initialize the CurrencyDimension using the update strategy of 'type 1
- from('Uom').where(uomTypeId: 'CURRENCY_MEASURE').queryIterator().each {
- List currencyDims = from('CurrencyDimension').where(currencyId: it.uomId).queryList()
- if (currencyDims) {
- for (GenericValue currencyDim : currencyDims) {
- currencyDim.description = it.description
- currencyDim.store()
- }
- } else {
- makeValue('CurrencyDimension', [dimensionId: it.uomId,
- currencyId: it.uomId,
- description: it.description])
- .create()
- }
- }
- return success()
-}
-
-Map prepareProductDimensionData() {
- GenericValue product = from('Product').where(parameters).queryOne()
- require(product as boolean, label('ProductUiLabels', 'ProductProductNotFoundWithProduct'))
- GenericValue productDimension = makeValue('ProductDimension')
- productDimension.setNonPKFields(product)
- GenericValue productType = select('description').from('ProductType')
- .where('productTypeId', product.productTypeId).cache().queryOne()
- productDimension.productType = productType.description
- return success(productDimension: productDimension)
-}
-
-Map loadProductInProductDimension() {
- Map serviceResult = run service: 'prepareProductDimensionData', with: parameters
- GenericEntity productDimension = serviceResult.productDimension
- run service: 'storeGenericDimension', with: [*: parameters,
- naturalKeyFields: 'productId',
- dimensionValue: productDimension]
- return success()
-}
-
-Map loadAllProductsInProductDimension() {
- from('Product').queryIterator().each {
- run service: 'loadProductInProductDimension', with: [*: parameters,
- productId: it.productId]
- }
- return success()
-}
diff --git a/bi/src/main/groovy/org/apache/ofbiz/bi/FactServices.groovy b/bi/src/main/groovy/org/apache/ofbiz/bi/FactServices.groovy
deleted file mode 100644
index f97e54d6f..000000000
--- a/bi/src/main/groovy/org/apache/ofbiz/bi/FactServices.groovy
+++ /dev/null
@@ -1,633 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-*/
-package org.apache.ofbiz.bi
-
-import java.sql.Date
-import java.sql.Timestamp
-import java.text.SimpleDateFormat
-
-import org.apache.ofbiz.base.util.UtilDateTime
-import org.apache.ofbiz.base.util.UtilProperties
-import org.apache.ofbiz.base.util.UtilValidate
-import org.apache.ofbiz.entity.GenericValue
-import org.apache.ofbiz.entity.condition.EntityCondition
-import org.apache.ofbiz.entity.condition.EntityOperator
-import org.apache.ofbiz.order.order.OrderReadHelper
-import org.apache.ofbiz.service.ServiceUtil
-
-Map loadSalesInvoiceFact() {
- GenericValue invoice = from('Invoice').where(parameters).queryOne()
- if (!invoice) {
- String errorMessage = UtilProperties.getMessage('AccountingUiLabels', 'AccountingInvoiceDoesNotExists', parameters.locale)
- logError(errorMessage)
- fail(errorMessage)
- }
- if (invoice.invoiceTypeId == 'SALES_INVOICE') {
- List invoiceItems = delegator.getRelated('InvoiceItem', null, null, invoice, false)
- for (GenericValue invoiceItem : invoiceItems) {
- Map inMap = [invoice: invoice, invoiceItem: invoiceItem]
- run service: 'loadSalesInvoiceItemFact', with: inMap
- }
- }
- return success()
-}
-
-Map loadSalesInvoiceItemFact() {
- GenericValue invoice = parameters.invoice
- GenericValue invoiceItem = parameters.invoiceItem
- invoice = invoice ?: from('Invoice').where(parameters).queryOne()
- if (UtilValidate.isEmpty(invoiceItem)) {
- invoiceItem = from('InvoiceItem').where(parameters).queryOne()
- }
- if (!invoice) {
- String errorMessage = UtilProperties.getMessage('AccountingUiLabels', 'AccountingInvoiceDoesNotExists', parameters.locale)
- logError(errorMessage)
- fail(errorMessage)
- }
- if (!invoiceItem) {
- String errorMessage = UtilProperties.getMessage('AccountingUiLabels', 'AccountingInvoiceItemDoesNotExists', parameters.locale)
- logError(errorMessage)
- fail(errorMessage)
- }
-
- if (invoice.invoiceTypeId == 'SALES_INVOICE') {
- GenericValue fact = from('SalesInvoiceItemFact')
- .where(invoiceId: invoiceItem.invoiceId, invoiceItemSeqId: invoiceItem.invoiceItemSeqId)
- .queryOne()
- // key handling
- if (!fact) {
- Map inMap
- Map naturalKeyFields
- Map serviceResult
- fact = makeValue('SalesInvoiceItemFact')
- fact.invoiceId = invoice.invoiceId
- fact.invoiceItemSeqId = invoiceItem.invoiceItemSeqId
- // conversion of the invoice date
- if (invoice.invoiceDate) {
- inMap = [:]
- naturalKeyFields = [:]
- inMap.dimensionEntityName = 'DateDimension'
- Date invoiceDate = new Date(invoice.invoiceDate.getTime())
- naturalKeyFields.dateValue = invoiceDate
- inMap.naturalKeyFields = naturalKeyFields
- serviceResult = run service: 'getDimensionIdFromNaturalKey', with: inMap
- fact.invoiceDateDimId = serviceResult.dimensionId
- fact.invoiceDateDimId = fact.invoiceDateDimId ?: '_NF_'
- } else {
- fact.invoiceDateDimId = '_NA_'
- }
-
- // conversion of the product id
- if (invoiceItem.productId) {
- inMap = [:]
- naturalKeyFields = [:]
- inMap.dimensionEntityName = 'ProductDimension'
- naturalKeyFields.productId = invoiceItem.productId
- inMap.naturalKeyFields = naturalKeyFields
- serviceResult = run service: 'getDimensionIdFromNaturalKey', with: inMap
- fact.productDimId = serviceResult.dimensionId
- fact.productDimId = fact.productDimId ?: '_NF_'
- } else {
- fact.productDimId = '_NA_'
- }
-
- // conversion of the invoice currency
- if (invoice.currencyUomId) {
- inMap = [:]
- naturalKeyFields = [:]
- inMap.dimensionEntityName = 'CurrencyDimension'
- naturalKeyFields.currencyId = invoice.currencyUomId
- inMap.naturalKeyFields = naturalKeyFields
- serviceResult = run service: 'getDimensionIdFromNaturalKey', with: inMap
- fact.origCurrencyDimId = serviceResult.dimensionId
- fact.origCurrencyDimId = fact.origCurrencyDimId ?: '_NF_'
- } else {
- fact.origCurrencyDimId = '_NA_'
- }
-
- // TODO
- fact.orderId = '_NA_'
- fact.billToCustomerDimId = '_NA_'
- fact.create()
- }
- /*
- * facts handling
- */
- fact.quantity = invoiceItem.quantity as BigDecimal
- fact.extGrossAmount = 0 as BigDecimal
- fact.extDiscountAmount = 0 as BigDecimal
- fact.extTaxAmount = 0 as BigDecimal
- fact.extNetAmount = 0 as BigDecimal
-
- if (invoiceItem.quantity && invoiceItem.amount) {
- fact.extGrossAmount = invoiceItem.quantity * invoiceItem.amount
- }
-
- // taxes
- List taxes = delegator.getRelated('ChildrenInvoiceItem', [invoiceItemTypeId: 'ITM_SALES_TAX'], null, invoiceItem, false)
- for (GenericValue tax : taxes) {
- if (tax.amount) {
- fact.extTaxAmount = fact.extTaxAmount + tax.amount
- }
- }
- // discounts
- List discounts = delegator.getRelated('ChildrenInvoiceItem', [invoiceItemTypeId: 'ITM_PROMOTION_ADJ'], null, invoiceItem, false)
- for (GenericValue discount : discounts) {
- if (discount.amount) {
- fact.extDiscountAmount = fact.extDiscountAmount - discount.amount
- }
- }
- fact.extNetAmount = fact.extGrossAmount - fact.extDiscountAmount
- // TODO: prorate invoice header discounts and shipping charges
- // TODO: costs
- fact.extManFixedCost = 0 as BigDecimal
- fact.extManVarCost = 0 as BigDecimal
- fact.extStorageCost = 0 as BigDecimal
- fact.extDistributionCost = 0 as BigDecimal
-
- BigDecimal costs = fact.extManFixedCost + fact.extManVarCost + fact.extStorageCost + fact.extDistributionCost
- fact.contributionAmount = fact.extNetAmount - costs
-
- fact.store()
- }
- return success()
-}
-
-Map loadSalesOrderFact() {
- GenericValue orderHeader = from('OrderHeader').where(parameters).queryOne()
- if (!orderHeader) {
- String errorMessage = UtilProperties.getMessage('OrderErrorUiLabels', 'OrderOrderIdDoesNotExists', parameters.locale)
- logError(errorMessage)
- fail(errorMessage)
- }
- if (orderHeader.orderTypeId == 'SALES_ORDER') {
- if (orderHeader.statusId == 'ORDER_APPROVED') {
- List orderItems = from('OrderItem')
- .where('orderId', orderHeader.orderId, 'orderItemTypeId', 'PRODUCT_ORDER_ITEM')
- .queryList()
-
- for (GenericValue orderItem : orderItems) {
- Map inMap = [:]
- inMap.orderHeader = orderHeader
- inMap.orderItem = orderItem
- inMap.orderAdjustment = null
- run service: 'loadSalesOrderItemFact', with: inMap
- }
- }
- }
- return success()
-}
-
-Map loadSalesOrderItemFact() {
- Map inMap
- Map naturalKeyFields
- Map serviceResult
- GenericValue orderHeader = parameters.orderHeader
- GenericValue orderItem = parameters.orderItem
- GenericValue orderAdjustment = parameters.orderAdjustment
-
- List orderAdjustments
- GenericValue orderStatus
-
- orderHeader = orderHeader ?: from('OrderHeader').where(parameters).queryOne()
- orderItem = orderItem ?: from('OrderItem').where(parameters).queryOne()
- if (!orderAdjustment) {
- orderAdjustments = from('OrderAdjustment').where('orderId': orderItem.orderId).queryList()
- }
- if (!orderHeader) {
- String errorMessage = UtilProperties.getMessage('OrderErrorUiLabels', 'OrderOrderIdDoesNotExists', parameters.locale)
- logError(errorMessage)
- fail(errorMessage)
- }
- if (!orderItem) {
- String errorMessage = UtilProperties.getMessage('OrderErrorUiLabels', 'OrderOrderItemIdDoesNotExists', parameters.locale)
- logError(errorMessage)
- fail(errorMessage)
- }
-
- if (orderHeader.statusId == 'ORDER_APPROVED') {
- GenericValue fact = from('SalesOrderItemFact').where(orderId: orderItem.orderId, orderItemSeqId: orderItem.orderItemSeqId).queryOne()
- // key handling
- if (!fact) {
- fact = makeValue('SalesOrderItemFact')
- fact.orderId = orderHeader.orderId
- fact.orderItemSeqId = orderItem.orderItemSeqId
- fact.productStoreId = orderHeader.productStoreId
- fact.salesChannelEnumId = orderHeader.salesChannelEnumId
- fact.statusId = orderItem.statusId
-
- // account
- if (orderHeader.productStoreId) {
- GenericValue account = from('ProductStore').where(productStoreId: orderHeader.productStoreId).queryOne()
- fact.account = account.storeName
- }
-
- // pod
- if (orderHeader.currencyUom == 'EUR') {
- fact.pod = 'Latin'
- } else {
- fact.pod = 'Engish'
- }
-
- // brand
- if (orderHeader.salesChannelEnumId) {
- GenericValue brand = from('Enumeration').where(enumId: orderHeader.salesChannelEnumId).queryOne()
- fact.brand = brand.description
- }
-
- // conversion of the order date
- orderStatus = from('OrderStatus')
- .where(orderId: orderHeader.orderId, statusId: 'ORDER_APPROVED')
- .orderBy('-statusDatetime')
- .queryFirst()
- if (orderStatus.statusDatetime) {
- inMap = [:]
- naturalKeyFields = [:]
- inMap.dimensionEntityName = 'DateDimension'
- Date statusDatetime = new Date(orderStatus.statusDatetime.getTime())
- naturalKeyFields.dateValue = statusDatetime
- inMap.naturalKeyFields = naturalKeyFields
- serviceResult = run service: 'getDimensionIdFromNaturalKey', with: inMap
- fact.orderDateDimId = serviceResult.dimensionId
- fact.orderDateDimId = fact.orderDateDimId ?: '_NF_'
- } else {
- fact.orderDateDimId = '_NA_'
- }
-
- // conversion of the product id
- if (orderItem.productId) {
- inMap = [:]
- naturalKeyFields = [:]
- inMap.dimensionEntityName = 'ProductDimension'
- naturalKeyFields.productId = orderItem.productId
- inMap.naturalKeyFields = naturalKeyFields
- serviceResult = run service: 'getDimensionIdFromNaturalKey', with: inMap
- fact.productDimId = serviceResult.dimensionId
- fact.orderDateDimId = fact.orderDateDimId ?: '_NF_'
- } else {
- fact.productDimId = '_NA_'
- }
-
- // conversion of the order currency
- if (orderHeader.currencyUom) {
- inMap = [:]
- naturalKeyFields = [:]
- inMap.dimensionEntityName = 'CurrencyDimension'
- naturalKeyFields.currencyId = orderHeader.currencyUom
- inMap.naturalKeyFields = naturalKeyFields
- serviceResult = run service: 'getDimensionIdFromNaturalKey', with: inMap
- fact.origCurrencyDimId = serviceResult.dimensionId
- fact.orderDateDimId = fact.orderDateDimId ?: '_NF_'
- } else {
- fact.origCurrencyDimId = '_NA_'
- }
-
- // productCategoryId
- GenericValue productCategoryMember = from('ProductCategoryMember').where(productId: orderItem.productId, thruDate: null).queryFirst()
- if (productCategoryMember) {
- fact.productCategoryId = productCategoryMember.productCategoryId
- }
-
- // TODO
- fact.billToCustomerDimId = '_NA_'
-
- fact.create()
- }
- /*
- * facts handling
- */
- Map partyAccountingPreferencesCallMap = [:]
-
- OrderReadHelper orderReadHelper = new OrderReadHelper(orderHeader)
- Map billFromParty = orderReadHelper.getBillFromParty()
- partyAccountingPreferencesCallMap.organizationPartyId = billFromParty.partyId
- Map accountResult = run service: 'getPartyAccountingPreferences', with: partyAccountingPreferencesCallMap
- GenericValue accPref = accountResult.partyAccountingPreference
-
- fact.with {
- quantity = orderItem.quantity as BigDecimal
- extGrossAmount = 0 as BigDecimal
- extGrossCost = 0 as BigDecimal
- extDiscountAmount = 0 as BigDecimal
- extNetAmount = 0 as BigDecimal
- extShippingAmount = 0 as BigDecimal
- extTaxAmount = 0 as BigDecimal
-
- GS = 0 as BigDecimal
- GMS = 0 as BigDecimal
- GMP = 0 as BigDecimal
- GSS = 0 as BigDecimal
- GSC = 0 as BigDecimal
- GSP = 0 as BigDecimal
- GP = 0 as BigDecimal
- }
-
- countOrder = 0 as BigDecimal
-
- // extGrossAmount
- Map convertUomCurrencyMap = [:]
- convertUomCurrencyMap.uomId = orderHeader.currencyUom
- convertUomCurrencyMap.uomIdTo = accPref.baseCurrencyUomId
- if (orderStatus) {
- convertUomCurrencyMap.nowDate = orderStatus.statusDatetime
- }
- Map convertResult = run service: 'convertUomCurrency', with: convertUomCurrencyMap
- BigDecimal exchangeRate = convertResult.conversionFactor
-
- if (exchangeRate) {
- BigDecimal unitPrice = orderItem.unitPrice * exchangeRate
-
- fact.extGrossAmount = fact.quantity * unitPrice
- }
-
- // extGrossCost
- GenericValue cost = from('SupplierProduct')
- .where(productId: orderItem.productId, availableThruDate: null, minimumOrderQuantity: 0 as BigDecimal)
- .queryFirst()
- if (cost) {
- convertUomCurrencyMap.uomId = cost.currencyUomId
- convertUomCurrencyMap.uomIdTo = accPref.baseCurrencyUomId
- if (orderStatus) {
- convertUomCurrencyMap.nowDate = orderStatus.statusDatetime
- }
- Map grossCostResult = run service: 'convertUomCurrency', with: convertUomCurrencyMap
- exchangeRate = grossCostResult.conversionFactor
-
- if (exchangeRate) {
- BigDecimal costPrice = cost.lastPrice * exchangeRate
- fact.extGrossCost = fact.quantity * costPrice
- }
- }
-
- // extShippingAmount
- for (GenericValue shipping : orderAdjustments) {
- if (shipping.orderAdjustmentTypeId == 'SHIPPING_CHARGES') {
- fact.extShippingAmount = fact.extShippingAmount + shipping.amount
- }
- }
-
- // extTaxAmount
- for (GenericValue tax : orderAdjustments) {
- if (tax.orderAdjustmentTypeId == 'SALES_TAX') {
- fact.extTaxAmount = fact.extTaxAmount + tax.amount
- }
- }
-
- // extDiscountAmount
- for (GenericValue discount : orderAdjustments) {
- if (discount.orderAdjustmentTypeId == 'PROMOTION_ADJUSTMENT') {
- fact.extDiscountAmount = fact.extDiscountAmount + discount.amount
- // product promo code
- GenericValue productPromoCode = from('ProductPromoCode').where(productPromoId: discount.productPromoId).queryFirst()
- if (productPromoCode) {
- fact.productPromoCode = productPromoCode.productPromoCodeId
- } else {
- fact.productPromoCode = 'Not require code'
- }
- }
- }
-
- // extNetAmount
- fact.extNetAmount = fact.extGrossAmount - fact.extDiscountAmount
-
- // GS
- BigDecimal countGS = 0 as BigDecimal
- List checkGSList = from('SalesOrderItemFact').where(orderId: orderHeader.orderId).queryList()
- for (GenericValue checkGS : checkGSList) {
- if (checkGS.GS) {
- if (0 != checkGS.GS) {
- countGS = 1
- }
- }
- }
- if (countGS == 0) {
- convertUomCurrencyMap.uomId = orderHeader.currencyUom
- convertUomCurrencyMap.uomIdTo = accPref.baseCurrencyUomId
- if (orderStatus) {
- convertUomCurrencyMap.nowDate = orderStatus.statusDatetime
- }
- Map gsResult = run service: 'convertUomCurrency', with: convertUomCurrencyMap
- exchangeRate = gsResult.conversionFactor
-
- if (exchangeRate) {
- fact.GS = orderHeader.grandTotal * exchangeRate
- }
- }
-
- // GMS
- fact.GMS = fact.GMS + fact.extGrossAmount
-
- // GMP
- fact.GMP = fact.GMS - fact.extGrossCost
-
- // GSP
- BigDecimal countGSP = 0 as BigDecimal
- List checkGSPList = from('SalesOrderItemFact').where(orderId: orderHeader.orderId).queryList()
- for (GenericValue checkGSP : checkGSPList) {
- if (checkGSP.GSP) {
- if (checkGSP.GSP != 0) {
- countGSP = 1
- }
- }
- }
- if (countGSP == 0) {
- BigDecimal warrantyPrice = 0 as BigDecimal
- for (GenericValue warranty : orderAdjustments) {
- if (warranty.orderAdjustmentTypeId == 'WARRANTY_ADJUSTMENT') {
- warrantyPrice = warrantyPrice + warranty.amount
- }
- }
- BigDecimal gss = fact.extShippingAmount + warrantyPrice
-
- convertUomCurrencyMap.uomId = orderHeader.currencyUom
- convertUomCurrencyMap.uomIdTo = accPref.baseCurrencyUomId
- if (orderStatus) {
- convertUomCurrencyMap.nowDate = orderStatus.statusDatetime
- }
- Map gspResult = run service: 'convertUomCurrency', with: convertUomCurrencyMap
- exchangeRate = gspResult.conversionFactor
-
- if (exchangeRate) {
- gss = gss * exchangeRate
- }
- fact.GSS = gss
- fact.GSP = gss as BigDecimal
- }
-
- // GP
- fact.GP = fact.GMP + fact.GSP
-
- // countOrder
- BigDecimal countOrder = 0 as BigDecimal
- List checkCountOrderList = from('SalesOrderItemFact').where(orderId: orderHeader.orderId).queryList()
- for (GenericValue checkCountOrder : checkCountOrderList) {
- if (checkCountOrder.countOrder) {
- if (checkCountOrder.countOrder != 0) {
- countOrder = 1
- }
- }
- }
- if (countOrder == 0) {
- fact.countOrder = 1 as BigDecimal
- }
- fact.store()
- }
- return success()
-}
-
-/**
- * Load Sales Order Data Daily
- */
-Map loadSalesOrderDataDaily() {
- Timestamp nowTimestamp = UtilDateTime.nowTimestamp()
- Date nowDate = new Date(nowTimestamp.getTime())
- SimpleDateFormat sdf = new SimpleDateFormat('yyyy-MM-dd 07:00:00.000', parameters.locale)
- String today = sdf.format(nowDate)
- Date yesterdayDate = new Date(nowTimestamp.getTime() - 86400000)
- String yesterday = sdf.format(yesterdayDate)
-
- Map inMap = [:]
- inMap.fromDate = yesterday
- inMap.thruDate = today
-
- run service: 'importSalesOrderData', with: inMap
- return success()
-}
-
-/**
- * Import Sales Order Data
- */
-Map importSalesOrderData() {
- Map inMap = [fromDate: parameters.fromDate, thruDate: parameters.thruDate]
-
- Map res = run service: 'loadDateDimension', with: inMap
- if (!ServiceUtil.isSuccess(res)) {
- return res
- }
- EntityCondition condition = EntityCondition.makeCondition(
- EntityCondition.makeCondition('statusId', 'ORDER_APPROVED'),
- EntityCondition.makeCondition('statusDatetime', EntityOperator.GREATER_THAN_EQUAL_TO, parameters.fromDate),
- EntityCondition.makeCondition('statusDatetime', EntityOperator.LESS_THAN, parameters.thruDate)
- )
- List orderStatusList = from('OrderStatus').where(condition).queryList()
- for (GenericValue orderHeader : orderStatusList) {
- inMap = [:]
- inMap.orderId = orderHeader.orderId
- res = run service: 'loadSalesOrderFact', with: inMap
- if (!ServiceUtil.isSuccess(res)) {
- return res
- }
- }
- return success()
-}
-
-/**
- * Convert Uom Currency from UomConversionDated entity
- */
-Map convertUomCurrency() {
- if (!parameters.nowDate) {
- Timestamp now = UtilDateTime.nowTimestamp()
- parameters.nowDate = now
- }
- Map result = success()
- EntityCondition condition = EntityCondition.makeCondition(
- EntityCondition.makeCondition('uomId', parameters.uomId),
- EntityCondition.makeCondition('uomIdTo', parameters.uomIdTo),
- EntityCondition.makeCondition('fromDate', EntityOperator.LESS_THAN_EQUAL_TO, parameters.nowDate),
- EntityCondition.makeCondition('thruDate', EntityOperator.GREATER_THAN, parameters.nowDate)
- )
- GenericValue uomConversion = from('UomConversionDated').where(condition).orderBy('-fromDate').queryFirst()
- if (uomConversion) {
- result.conversionFactor = uomConversion.conversionFactor
- } else {
- GenericValue uomConversionLastest = from('UomConversionDated')
- .where(uomId: parameters.uomId, uomIdTo: parameters.uomIdTo, thruDate: null)
- .queryFirst()
- if (uomConversionLastest) {
- result.conversionFactor = uomConversionLastest.conversionFactor
- }
- }
- return result
-}
-
-Map loadInventoryFact() {
- GenericValue inventory = from('InventoryItem').where(inventoryItemId: parameters.inventoryItemId).queryOne()
- GenericValue fact = from('InventoryItemFact').where(inventoryItemId: parameters.inventoryItemId).queryOne()
-
- Map inMap = [:]
- Map naturalKeyFields = [:]
- Map serviceResult
- if (!fact) {
- fact = makeValue('InventoryItemFact')
- fact.inventoryItemId = inventory.inventoryItemId
- // conversion of the inventory date
- if (inventory?.createdStamp) {
- inMap = [:]
- naturalKeyFields = [:]
- inMap.dimensionEntityName = 'DateDimension'
- Date createdStampDatetime = new Date(inventory.createdStamp.getTime())
- naturalKeyFields.dateValue = createdStampDatetime
- inMap.naturalKeyFields = naturalKeyFields
- serviceResult = run service: 'getDimensionIdFromNaturalKey', with: inMap
- fact.inventoryDateDimId = serviceResult.dimensionId
- fact.inventoryDateDimId = fact.inventoryDateDimId ?: '_NF_'
- } else {
- fact.inventoryDateDimId = '_NA_'
- }
- // conversion of the productId
- if (inventory?.productId) {
- inMap = [:]
- naturalKeyFields = [:]
- inMap.dimensionEntityName = 'ProductDimension'
- naturalKeyFields.productId = inventory.productId
- inMap.naturalKeyFields = naturalKeyFields
- serviceResult = run service: 'getDimensionIdFromNaturalKey', with: inMap
- fact.productDimId = serviceResult.dimensionId
- fact.productDimId = fact.productDimId ?: '_NF_'
- } else {
- fact.productDimId = '_NA_'
- }
- // conversion of the order currency
- if (inventory?.currencyUomId) {
- inMap = [:]
- naturalKeyFields = [:]
- inMap.dimensionEntityName = 'CurrencyDimension'
- naturalKeyFields.currencyId = inventory.currencyUomId
- inMap.naturalKeyFields = naturalKeyFields
- serviceResult = run service: 'getDimensionIdFromNaturalKey', with: inMap
- fact.origCurrencyDimId = serviceResult.dimensionId
- fact.origCurrencyDimId = fact.origCurrencyDimId ?: '_NF_'
- } else {
- fact.origCurrencyDimId = '_NA_'
- }
- fact.create()
- }
-
- fact.facilityId = inventory.facilityId
- fact.inventoryItemId = inventory.inventoryItemId
- fact.quantityOnHandTotal = inventory.quantityOnHandTotal
- fact.availableToPromiseTotal = inventory.availableToPromiseTotal
- fact.unitCost = inventory.unitCost
-
- // calculate sold out amount
- fact.soldoutAmount = inventory.quantityOnHandTotal - inventory.availableToPromiseTotal
-
- fact.store()
- return success()
-}
diff --git a/bi/src/main/groovy/org/apache/ofbiz/bi/GetStarSchemaFields.groovy b/bi/src/main/groovy/org/apache/ofbiz/bi/GetStarSchemaFields.groovy
deleted file mode 100644
index be2b55980..000000000
--- a/bi/src/main/groovy/org/apache/ofbiz/bi/GetStarSchemaFields.groovy
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-*/
-package org.apache.ofbiz.bi
-
-starSchemaName = parameters.starSchemaName
-
-starSchemaFields = []
-if (starSchemaName) {
- reader = delegator.getModelReader()
- starSchema = reader.getModelEntity(starSchemaName)
- if (starSchema) {
- fieldsIt = starSchema.getAliasesIterator()
- while (fieldsIt.hasNext()) {
- field = fieldsIt.next()
- fieldMap = [:]
- fieldMap.name = field.getName()
- description = field.getDescription()
- if (!description) {
- aliasedEntity = starSchema.getAliasedEntity(field.getEntityAlias(), reader)
- if (aliasedEntity) {
- aliasedField = starSchema.getAliasedField(aliasedEntity, field.getField(), reader)
- description = aliasedField.getDescription()
- }
- }
- fieldMap.description = description
- starSchemaFields.add(fieldMap)
- }
- }
-}
-context.starSchemaName = starSchemaName
-context.starSchemaFields = starSchemaFields
diff --git a/bi/src/main/groovy/org/apache/ofbiz/bi/GetStarSchemas.groovy b/bi/src/main/groovy/org/apache/ofbiz/bi/GetStarSchemas.groovy
deleted file mode 100644
index a4468212c..000000000
--- a/bi/src/main/groovy/org/apache/ofbiz/bi/GetStarSchemas.groovy
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-*/
-package org.apache.ofbiz.bi
-
-reader = delegator.getModelReader()
-ec = reader.getEntityNames()
-entities = new TreeSet(ec)
-entitiesIt = entities.iterator()
-
-List starSchemas = []
-
-while (entitiesIt.hasNext()) {
- entity = reader.getModelEntity(entitiesIt.next())
- packageName = entity.getPackageName()
- if (!packageName.contains('starschema')) {
- continue
- }
-
- entityMap = [:]
- entityMap.name = entity.getEntityName()
- entityMap.title = entity.getTitle()
-
- starSchemas.add(entityMap)
-}
-context.starSchemas = starSchemas
diff --git a/bi/src/main/groovy/org/apache/ofbiz/bi/RunStarSchemaQuery.groovy b/bi/src/main/groovy/org/apache/ofbiz/bi/RunStarSchemaQuery.groovy
deleted file mode 100644
index dad32876d..000000000
--- a/bi/src/main/groovy/org/apache/ofbiz/bi/RunStarSchemaQuery.groovy
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-*/
-package org.apache.ofbiz.bi
-
-import org.apache.ofbiz.base.util.UtilHttp
-
-starSchemaName = parameters.starSchemaName
-selectedFieldList = UtilHttp.parseMultiFormData(parameters)
-
-columnNames = [] as Set
-selectedFieldList.each { selectedField ->
- columnNames.add(selectedField.selectedFieldName)
-}
-context.columnNames = columnNames
-List records = []
-records = select(context.columnNames).from(starSchemaName).distinct(false).queryList()
-
-context.records = records
diff --git a/bi/src/main/java/org/apache/ofbiz/bi/util/DimensionServices.java b/bi/src/main/java/org/apache/ofbiz/bi/util/DimensionServices.java
deleted file mode 100644
index 02741f142..000000000
--- a/bi/src/main/java/org/apache/ofbiz/bi/util/DimensionServices.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-package org.apache.ofbiz.bi.util;
-
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import org.apache.ofbiz.base.util.UtilGenerics;
-import org.apache.ofbiz.base.util.UtilMisc;
-import org.apache.ofbiz.base.util.UtilProperties;
-import org.apache.ofbiz.base.util.UtilValidate;
-import org.apache.ofbiz.entity.Delegator;
-import org.apache.ofbiz.entity.GenericEntityException;
-import org.apache.ofbiz.entity.GenericValue;
-import org.apache.ofbiz.entity.util.EntityQuery;
-import org.apache.ofbiz.service.DispatchContext;
-import org.apache.ofbiz.service.ServiceUtil;
-
-public class DimensionServices {
-
- private static final String MODULE = DimensionServices.class.getName();
- private static final String RESOURCE = "BiUiLabels";
-
- public static Map getDimensionIdFromNaturalKey(DispatchContext ctx, Map context) {
- Map resultMap = ServiceUtil.returnSuccess();
- Delegator delegator = ctx.getDelegator();
- String dimensionEntityName = (String) context.get("dimensionEntityName");
- Map naturalKeyFields = UtilGenerics.cast(context.get("naturalKeyFields"));
- GenericValue lastDimensionValue = null;
- try {
- // TODO: improve performance
- lastDimensionValue = EntityQuery.use(delegator).from(dimensionEntityName).where(naturalKeyFields).orderBy("-createdTxStamp").queryFirst();
- } catch (GenericEntityException gee) {
- return ServiceUtil.returnError(gee.getMessage());
- }
- if (UtilValidate.isNotEmpty(lastDimensionValue)) {
- resultMap.put("dimensionId", lastDimensionValue.getString("dimensionId"));
- }
- return resultMap;
- }
-
- public static Map storeGenericDimension(DispatchContext ctx, Map context) {
- Delegator delegator = ctx.getDelegator();
- GenericValue dimensionValue = (GenericValue) context.get("dimensionValue");
- List naturalKeyFields = UtilGenerics.checkCollection(context.get("naturalKeyFields"), String.class);
- String updateMode = (String) context.get("updateMode");
- Locale locale = (Locale) context.get("locale");
-
- try {
- Map andCondition = new HashMap<>();
- for (String naturalKeyField: naturalKeyFields) {
- andCondition.put(naturalKeyField, dimensionValue.get(naturalKeyField));
- }
- if (andCondition.isEmpty()) {
- return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "BusinessIntelligenceNaturalKeyWithourDimension",
- UtilMisc.toMap("naturalKeyFields", naturalKeyFields, "dimensionValue", dimensionValue), locale));
- }
- List existingDimensionValues = null;
- try {
- existingDimensionValues = EntityQuery.use(delegator).from(dimensionValue.getEntityName()).where(andCondition).queryList();
- } catch (GenericEntityException gee) {
- return ServiceUtil.returnError(gee.getMessage());
- }
- if (UtilValidate.isEmpty(existingDimensionValues)) {
- dimensionValue.set("dimensionId", delegator.getNextSeqId(dimensionValue.getEntityName()));
- dimensionValue.create();
- } else {
- if ("TYPE1".equals(updateMode)) {
- // update all the rows with the new values
- for (GenericValue existingDimensionValue: existingDimensionValues) {
- GenericValue updatedValue = delegator.makeValue(dimensionValue.getEntityName(), dimensionValue);
- updatedValue.set("dimensionId", existingDimensionValue.getString("dimensionId"));
- updatedValue.store();
- }
- } else if ("TYPE2".equals(updateMode)) {
- // TODO: create a new record and update somewhere the from/thru dates of the old row
- dimensionValue.set("dimensionId", delegator.getNextSeqId(dimensionValue.getEntityName()));
- dimensionValue.create();
- } else {
- return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "BusinessIntelligenceUpdateModeStillNotSupported",
- UtilMisc.toMap("updateMode", updateMode), locale));
- }
- }
- } catch (GenericEntityException gee) {
- return ServiceUtil.returnError(gee.getMessage());
- }
- return ServiceUtil.returnSuccess();
- }
-
- /*
- * OLAP Dimension
- * Service used to initialize the Date dimension (DateDimension).
- * The DateDimension entity is a nearly constant dimension ("Slowly Changing Dimension" or SCD):
- * the default strategy to handle data change is "Type 1" (i.e. overwrite the values).
- */
- public static Map loadDateDimension(DispatchContext ctx, Map context) {
- Delegator delegator = ctx.getDelegator();
-
- Date fromDate = (Date) context.get("fromDate");
- Date thruDate = (Date) context.get("thruDate");
-
- SimpleDateFormat monthNameFormat = new SimpleDateFormat("MMMM");
- SimpleDateFormat dayNameFormat = new SimpleDateFormat("EEEE");
- SimpleDateFormat dayDescriptionFormat = new SimpleDateFormat("MMMM d, yyyy");
- SimpleDateFormat yearMonthDayFormat = new SimpleDateFormat("yyyy-MM-dd");
- SimpleDateFormat yearMonthFormat = new SimpleDateFormat("yyyy-MM");
-
- Calendar calendar = Calendar.getInstance();
- calendar.setTime(fromDate);
- calendar.set(Calendar.HOUR, 0);
- calendar.set(Calendar.MINUTE, 0);
- calendar.set(Calendar.SECOND, 0);
- calendar.set(Calendar.MILLISECOND, 0);
- java.sql.Date currentDate = new java.sql.Date(calendar.getTimeInMillis());
- while (currentDate.compareTo(thruDate) <= 0) {
- GenericValue dateValue = null;
- try {
- dateValue = EntityQuery.use(delegator).from("DateDimension").where("dateValue", currentDate).queryFirst();
- } catch (GenericEntityException gee) {
- return ServiceUtil.returnError(gee.getMessage());
- }
- boolean newValue = (dateValue == null);
- if (newValue) {
- dateValue = delegator.makeValue("DateDimension");
- dateValue.set("dimensionId", delegator.getNextSeqId("DateDimension"));
- dateValue.set("dateValue", new java.sql.Date(currentDate.getTime()));
- }
- dateValue.set("description", dayDescriptionFormat.format(currentDate));
- int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
- dateValue.set("dayName", dayNameFormat.format(currentDate));
- dateValue.set("dayOfMonth", Long.valueOf(calendar.get(Calendar.DAY_OF_MONTH)));
- dateValue.set("dayOfYear", Long.valueOf(calendar.get(Calendar.DAY_OF_YEAR)));
- dateValue.set("monthName", monthNameFormat.format(currentDate));
-
- dateValue.set("monthOfYear", Long.valueOf(calendar.get(Calendar.MONTH) + 1));
- dateValue.set("yearName", Long.valueOf(calendar.get(Calendar.YEAR)));
- dateValue.set("weekOfMonth", Long.valueOf(calendar.get(Calendar.WEEK_OF_MONTH)));
- dateValue.set("weekOfYear", Long.valueOf(calendar.get(Calendar.WEEK_OF_YEAR)));
- dateValue.set("weekdayType", (dayOfWeek == 1 || dayOfWeek == 7 ? "Weekend" : "Weekday"));
- dateValue.set("yearMonthDay", yearMonthDayFormat.format(currentDate));
- dateValue.set("yearAndMonth", yearMonthFormat.format(currentDate));
-
- try {
- if (newValue) {
- dateValue.create();
- } else {
- dateValue.store();
- }
- } catch (GenericEntityException gee) {
- return ServiceUtil.returnError(gee.getMessage());
- }
- calendar.add(Calendar.DATE, 1);
- currentDate = new java.sql.Date(calendar.getTimeInMillis());
- }
- return ServiceUtil.returnSuccess();
- }
-
-}
diff --git a/bi/template/Main.ftl b/bi/template/Main.ftl
deleted file mode 100644
index c8858e070..000000000
--- a/bi/template/Main.ftl
+++ /dev/null
@@ -1,56 +0,0 @@
-<#--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-
diff --git a/bi/template/reportbuilder/RenderStarSchemaReport.ftl b/bi/template/reportbuilder/RenderStarSchemaReport.ftl
deleted file mode 100644
index b78b5fd25..000000000
--- a/bi/template/reportbuilder/RenderStarSchemaReport.ftl
+++ /dev/null
@@ -1,42 +0,0 @@
-<#--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-
- <#-- toggle the row color -->
- <#assign alt_row = !alt_row>
- #list>
-
\ No newline at end of file
diff --git a/bi/template/reportbuilder/SelectStarSchemaFields.ftl b/bi/template/reportbuilder/SelectStarSchemaFields.ftl
deleted file mode 100644
index c1914bacb..000000000
--- a/bi/template/reportbuilder/SelectStarSchemaFields.ftl
+++ /dev/null
@@ -1,47 +0,0 @@
-<#--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-
\ No newline at end of file
diff --git a/bi/webapp/bi/WEB-INF/controller.xml b/bi/webapp/bi/WEB-INF/controller.xml
deleted file mode 100644
index 8bea8c30a..000000000
--- a/bi/webapp/bi/WEB-INF/controller.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-
-
-
- Business Intelligence Component Site Configuration File
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/bi/webapp/bi/WEB-INF/web.xml b/bi/webapp/bi/WEB-INF/web.xml
deleted file mode 100644
index 7e46eeb99..000000000
--- a/bi/webapp/bi/WEB-INF/web.xml
+++ /dev/null
@@ -1,105 +0,0 @@
-
-
-
-
-
- Apache OFBiz - Business Intelligence
- Business Intelligence component of the Apache OFBiz Project
-
-
- The Name of the Entity Delegator to use, defined in entityengine.xml
- entityDelegatorName
- default
-
-
- A unique name used to identify/recognize the local dispatcher for the Service Engine
- localDispatcherName
- bi
-
-
- The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files.
- mainDecoratorLocation
- component://bi/widget/BiScreens.xml
-
-
- The location of the menus file to be used in this webapp; referred to as a context variable in screen def XML files.
- mainMenuLocation
- component://bi/widget/BiMenus.xml
-
-
-
- ControlFilter
- ControlFilter
- org.apache.ofbiz.webapp.control.ControlFilter
-
- allowedPaths
- /error:/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images
-
-
- redirectPath
- /control/main
-
-
-
- ContextFilter
- ContextFilter
- org.apache.ofbiz.webapp.control.ContextFilter
-
-
- SameSiteFilter
- SameSiteFilter
- org.apache.ofbiz.webapp.control.SameSiteFilter
-
-
- ControlFilter
- /*
-
-
- ContextFilter
- /*
-
-
- SameSiteFilter
- /*
-
-
- org.apache.ofbiz.webapp.control.ControlEventListener
- org.apache.ofbiz.webapp.control.LoginEventListener
-
-
-
-
- Main Control Servlet
- ControlServlet
- ControlServlet
- org.apache.ofbiz.webapp.control.ControlServlet
- 1
-
-
- ControlServlet
- /control/*
-
-
-
- index.jsp
- index.html
- index.htm
-
-
diff --git a/bi/webapp/bi/index.jsp b/bi/webapp/bi/index.jsp
deleted file mode 100644
index ee2b80aa3..000000000
--- a/bi/webapp/bi/index.jsp
+++ /dev/null
@@ -1,19 +0,0 @@
-<%--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
---%>
-<%response.sendRedirect("control/main");%>
\ No newline at end of file
diff --git a/bi/widget/BiForms.xml b/bi/widget/BiForms.xml
deleted file mode 100644
index f1f75d435..000000000
--- a/bi/widget/BiForms.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
-
-
-
diff --git a/bi/widget/BiMenus.xml b/bi/widget/BiMenus.xml
deleted file mode 100644
index d3e2a6588..000000000
--- a/bi/widget/BiMenus.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
diff --git a/bi/widget/BiScreens.xml b/bi/widget/BiScreens.xml
deleted file mode 100644
index 51e28c08c..000000000
--- a/bi/widget/BiScreens.xml
+++ /dev/null
@@ -1,141 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-