BIP_开发案例02_BI Publisher中复杂案例实现代码(案例)

简介: 2014-12-27 Created By BaoXinjian 1. 创建数据源 ...

2014-12-27 Created By BaoXinjian

1. 创建数据源

<?xml version ="1.0" encoding="ISO-8859-1"?>
<!-- =======================================================================-->
<!-- Program    : $XXWIP_4409_ROUTING_CARD$                                 -->
<!-- Purpose    : Data definition of Work Order Structure                   -->
<!-- Revision   : $1.0$                                                     -->
<!-- Programmer : $BaoXinjian$                                              -->
<!--                                                                        -->
<!-- Table Accessed : Table                               SEL INS UPD DEL   -->
<!--                  xxwip.xxwip_4409_jobs_gt            Y   N   N   N     -->
<!--                  xxwip.xxwip_4409_components_gt      Y   N   N   N     -->
<!--                  xxwip.xxwip_4409_resources_gt       Y   N   N   N     -->
<!--                                                                        -->
<!-- Parameters : P_ORGANIZATION_ID                                         -->
<!--              P_ASSEMBLY_FROM                                           -->
<!--              P_ASSEMBLY_TO                                             -->
<!--              P_JOB_FROM                                                -->
<!--              P_JOB_TO                                                  -->
<!--              P_COLLECTION_PLAN_ID                   -->
<!--                                                                        -->
<!-- Change History : Revision  Date         Edit by   Comments             -->
<!--                  1.0       17-SEP-2010  BaoXinjianInitial revision     -->
<!-- =======================================================================-->

<dataTemplate name = "XXWIP_4409_WO_STRUCTURE"
              description = "Work Order Structure"
              defaultPackage = "XXWIP.XXWIP_4409_WO_STRUCTURE_PKG"
              version= "1.0">
   <parameters>
      <!-- 2011/06/22 V1.3 DEL Start -->
      <!-- <parameter name = "P_ORGANIZATION_ID" dataType = "character"/> -->
      <!-- 2011/06/22 V1.3 DEL Start -->
      <parameter name = "P_ASSEMBLY_FROM" dataType = "character"/>
      <parameter name = "P_ASSEMBLY_TO" dataType = "character"/>
      <parameter name = "P_JOB_FROM" dataType = "character"/>
      <parameter name = "P_JOB_TO" dataType = "character"/>
      <!-- 2011/06/10 V1.1 ADD Start -->
      <parameter name = "P_DATE_FROM" dataType = "character"/>
      <parameter name = "P_DATE_TO" dataType = "character"/>
      <parameter name = "P_COLLECTION_PLAN_ID" dataType = "character"/>
      <!-- 2011/06/10 V1.1 ADD End   -->
   </parameters>
   <dataQuery>
      <sqlStatement name ="Q1">
         <![CDATA[
            SELECT TO_CHAR(SYSDATE, 'DD-MON-YYYY')   current_date
                  ,xjg.wip_entity_id                 wip_entity_id
                  ,xjg.organization_id               organization_id
                  ,xjg.product_number                product_number
                  ,xjg.product_description           product_description
                  ,xjg.job_number                    job_number
                  --===2011/06/21 V1.2 MOD Start==================
                  --,xjg.quantity                      quantity
                  ,xjg.quantity                      quantity
                  --===2011/06/21 V1.2 MOD End====================
                  ,xjg.so_number                     so_number
                  ,xjg.uom_code                      uom_code
                  --===2011/06/10 V1.1 MOD Start==================
                  --,TO_CHAR(xjg.job_start_date
                  --         ,'DD-MON-YYYY, HH:MI am') job_start_date
                  ,TO_CHAR(xjg.job_start_date
                           ,'DD-MON-YYYY')           job_start_date
                  --===2011/06/10 V1.1 MOD End====================
                  ,xjg.customer_name                 customer_name
                  --===2011/06/10 V1.1 MOD Start==================
                  --,TO_CHAR(xjg.job_finish_date
                  --         ,'DD-MON-YYYY, HH:MI am') job_finish_date
                  ,TO_CHAR(xjg.job_finish_date
                           ,'DD-MON-YYYY')           job_finish_date
                  --===2011/06/10 V1.1 MOD End====================
                  ,xjg.serial_number                 serial_number
            FROM   xxwip.xxwip_4409_jobs_gt xjg
            ORDER BY xjg.job_start_date
                    ,xjg.job_number
            /*******V1.1 Add START 2011/5/20**********/
                    ,xjg.so_number
                    ,xjg.customer_name
                    ,xjg.serial_number
            /*******V1.1 Add End 2011/5/20************/
         ]]>
      </sqlStatement>
       <sqlStatement name ="Q2">
         <![CDATA[
            /*******V1.1 Modify START 2011/5/20**********/
            --SELECT DISTINCT xcg.operation_sequence   operation_sequence
            --FROM   xxwip.xxwip_4409_components_gt xcg
            --WHERE  xcg.wip_entity_id = :WIP_ENTITY_ID
            --AND    xcg.organization_id = :ORGANIZATION_ID
            --ORDER BY xcg.operation_sequence
            SELECT wor.operation_seq_num AS operation_sequence
            FROM wip_operation_resources wor
            WHERE wor.organization_id = :ORGANIZATION_ID
            AND wor.wip_entity_id = :WIP_ENTITY_ID            
            UNION
            SELECT DISTINCT xcg.operation_sequence AS operation_sequence
            FROM   xxwip.xxwip_4409_components_gt xcg
            WHERE  xcg.wip_entity_id = :WIP_ENTITY_ID
            AND    xcg.organization_id = :ORGANIZATION_ID
            ORDER BY operation_sequence
            /*******V1.1 Modify End 2011/5/20*************/
         ]]>
      </sqlStatement>
       <sqlStatement name ="Q3">
         <![CDATA[
            SELECT xcg.operation_sequence            component_operation_sequence
                  ,xcg.component                     component
                  ,xcg.component_description         component_description
                  --===2011/06/21 V1.2 MOD Start==================
                  --,xcg.qty                           qty
                  ,xcg.qty * :quantity     AS        qty
                  --===2011/06/21 V1.2 MOD End====================
                          ,xcg.uom                           uom
                  --===2011/06/10 V1.1 MOD Start==================
                  --,TO_CHAR(xcg.reserved_date
                  --         ,'DD-MON-YYYY, HH:MI am') reserved_date
                  ,TO_CHAR(xcg.reserved_date
                           ,'DD-MON-YYYY')                   reserved_date
                  --===2011/06/10 V1.1 MOD End====================
                          ,xcg.subinventory                  subinv
                          ,xcg.locator                       locator
                  ,xcg.revision
            FROM   xxwip.xxwip_4409_components_gt xcg
            WHERE  xcg.wip_entity_id = :WIP_ENTITY_ID
            AND    xcg.organization_id = :ORGANIZATION_ID
            AND    xcg.operation_sequence = :OPERATION_SEQUENCE
            ORDER BY xcg.operation_sequence
         ]]>
      </sqlStatement>
      <sqlStatement name ="Q4">
         <![CDATA[
            SELECT xrg.operation_sequence            resource_operation_sequence
                  ,xrg.resource_code                 resource_code
                  ,xrg.operation_description         operation_description
                  --===2011/06/21 V1.2 MOD Start==================
                  --,xrg.run_time                      run_time
                  ,xrg.run_time * :quantity   AS     run_time
                  --===2011/06/10 V1.1 MOD End====================
                  --===2011/06/10 V1.1 MOD Start==================
                  --,TO_CHAR(xrg.operation_start_date
                  --         ,'DD-MON-YYYY, HH:MI am') operation_start_date
                  ,TO_CHAR(xrg.operation_start_date
                           ,'DD-MON-YYYY')           operation_start_date
                  --===2011/06/10 V1.1 MOD End====================
            FROM   xxwip.xxwip_4409_resources_gt xrg
            WHERE  xrg.wip_entity_id = :WIP_ENTITY_ID
            AND    xrg.organization_id = :ORGANIZATION_ID
            AND    xrg.operation_sequence = :OPERATION_SEQUENCE
            ORDER BY xrg.operation_sequence
                    ,xrg.operation_start_date
         ]]>
      </sqlStatement>
      <!-- 2011/06/10 V1.1 ADD Start -->
      <sqlStatement name = "Q5">
         <![CDATA[
            SELECT qr.character5 serial_number
            FROM   qa_results qr
            WHERE  qr.plan_id = :P_COLLECTION_PLAN_ID
            AND    qr.wip_entity_id = :WIP_ENTITY_ID
            AND    qr.organization_id = :ORGANIZATION_ID
            ORDER BY qr.serial_number
         ]]>
      </sqlStatement>
      <sqlStatement name = "Q6">
         <![CDATA[
            SELECT xrg.resource_code                res,
                   SUM(xrg.run_time * xjg.quantity) qty
            FROM   xxwip.xxwip_4409_resources_gt xrg,
                   xxwip.xxwip_4409_jobs_gt      xjg
            WHERE  xrg.wip_entity_id = :WIP_ENTITY_ID
            AND    xrg.organization_id = :ORGANIZATION_ID
            AND    xjg.wip_entity_id = xrg.wip_entity_id
            AND    xjg.organization_id = xrg.organization_id
            GROUP BY xrg.resource_code
         ]]>
      </sqlStatement>
      <!-- 2011/06/10 V1.1 ADD End   -->
   </dataQuery>
   <dataTrigger name = "beforeReport"
                source = "xxwip.xxwip_4409_wo_structure_pkg.before_report_trigger"/>
   <dataStructure>
      <group name = "G1" source = "Q1">
         <element name = "CURRENT_DATE" value = "CURRENT_DATE"/>
         <element name = "WIP_ENTITY_ID" value = "WIP_ENTITY_ID"/>
         <element name = "ORGANIZATION_ID" value = "ORGANIZATION_ID"/>
         <element name = "PRODUCT_NUMBER" value = "PRODUCT_NUMBER"/>
         <element name = "PRODUCT_DESCRIPTION" value = "PRODUCT_DESCRIPTION"/>
         <element name = "JOB_NUMBER" value = "JOB_NUMBER"/>
         <element name = "QUANTITY" value = "QUANTITY"/>
         <element name = "SO_NUMBER" value = "SO_NUMBER"/>
         <element name = "UOM_CODE" value = "UOM_CODE"/>
         <element name = "JOB_START_DATE" value = "JOB_START_DATE"/>
         <element name = "CUSTOMER_NAME" value = "CUSTOMER_NAME"/>
         <element name = "JOB_FINISH_DATE" value = "JOB_FINISH_DATE"/>
         <!-- 2011/06/10 V1.1 DEL Start -->
         <!--<element name = "SERIAL_NUMBER" value = "SERIAL_NUMBER"/>-->
         <!-- 2011/06/10 V1.1 DEL End   -->
         <group name = "G2" source = "Q2">
            <element name = "OPERATION_SEQUENCE" value = "OPERATION_SEQUENCE"/>
            <group name = "G3" source = "Q3">
               <element name = "COMPONENT_OPERATION_SEQUENCE" value = "COMPONENT_OPERATION_SEQUENCE"/>
               <element name = "COMPONENT" value = "COMPONENT"/>
               <element name = "COMPONENT_DESCRIPTION" value = "COMPONENT_DESCRIPTION"/>
               <element name = "QTY" value = "QTY"/>
               <element name = "UOM" value = "UOM"/>
               <element name = "RESERVED_DATE" value = "RESERVED_DATE"/>
               <element name = "SUBINV" value = "SUBINV"/>
               <element name = "LOCATOR" value = "LOCATOR"/>
               <element name = "REVISION" value = "REVISION"/>
            </group>
            <group name = "G4" source = "Q4">
               <element name = "RESOURCE_OPERATION_SEQUENCE" value = "RESOURCE_OPERATION_SEQUENCE"/>
               <element name = "RESOURCE_CODE" value = "RESOURCE_CODE"/>
               <element name = "OPERATION_DESCRIPTION" value = "OPERATION_DESCRIPTION"/>
               <element name = "RUN_TIME" value = "RUN_TIME"/>
               <element name = "OPERATION_START_DATE" value = "OPERATION_START_DATE"/>
            </group>
         </group>
         <!-- 2011/06/10 V1.1 ADD Start -->
         <group name = "G5" source = "Q5">
            <element name = "SERIAL_NUMBER" value = "SERIAL_NUMBER"/>
         </group>
         <group name = "G6" source = "Q6">
            <element name = "RES" value = "RES"/>
            <element name = "QTY" value = "QTY"/>
         </group>
         <!-- 2011/06/10 V1.1 ADD End   -->
      </group>
   </dataStructure>
</dataTemplate>

2. 创建RTF模板

3. 浏览字段

 

Thhanks and Regards

ERP技术讨论群: 288307890
技术交流,技术讨论,欢迎加入
Technology Blog Created By Oracle ERP - 鲍新建
相关文章
|
7月前
|
数据采集 数据可视化 数据挖掘
数据分析案例-BI工程师招聘岗位信息可视化分析
数据分析案例-BI工程师招聘岗位信息可视化分析
148 0
|
7月前
|
数据可视化 BI
帆软BI开发-Day2-趋势图的多种变形
帆软BI开发-Day2-趋势图的多种变形
159 0
|
6月前
|
机器学习/深度学习 存储 计算机视觉
【YOLOv8改进】BRA(bi-level routing attention ):双层路由注意力(论文笔记+引入代码)
**BiFormer和HCANet摘要** BiFormer是CVPR2023提出的一种新型视觉Transformer,采用双层路由注意力机制实现动态稀疏注意力,优化计算效率和内存使用,适用于图像分类、目标检测和语义分割任务。代码可在GitHub获取。另一方面,HCANet是针对高光谱图像去噪的深度学习模型,融合CNN和Transformer,强化全局和局部特征建模,通过多尺度前馈网络提升去噪效果。HCANet在HSI数据集上表现优秀,其代码同样开放源代码。
|
7月前
|
数据建模 BI 数据处理
Power BI案例-医院数据集的仪表盘制作
Power BI案例-医院数据集的仪表盘制作
|
7月前
|
数据可视化 数据建模 数据挖掘
Power BI案例-连锁糕点店数据集的仪表盘制作
Power BI案例-连锁糕点店数据集的仪表盘制作
|
7月前
|
BI 数据可视化 数据建模
Power BI案例-连锁糕点店数据集的仪表盘制作
Power BI案例-连锁糕点店数据集的仪表盘制作
|
监控 安全 BI
Bi质押系统智能合约开发逻辑规则及代码示例
Bi质押系统智能合约开发逻辑规则及代码示例
|
7月前
|
传感器 数据可视化 搜索推荐
瓴羊Quick BI助力深圳光明环境水务公司举办水务数据应用大会暨第二届“光环杯”BI应用大赛
瓴羊Quick BI助力深圳光明环境水务公司举办水务数据应用大会暨第二届“光环杯”BI应用大赛
143 0
|
7月前
|
BI
Quick BI V5.0发布:一键解锁智能小Q等全新智能商业分析能力
Quick BI V5.0发布:一键解锁智能小Q等全新智能商业分析能力
263 0
|
5月前
|
数据可视化 安全 搜索推荐
干货|FESCO Adecco外企德科:Quick BI打造战略管理“观数台”(2)
干货|FESCO Adecco外企德科:Quick BI打造战略管理“观数台”
138 4

热门文章

最新文章