From 854dde9f4a2d632838af8272ecbf62fc27ca95a8 Mon Sep 17 00:00:00 2001 From: yangkunan Date: Wed, 14 Aug 2024 18:24:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81=E6=A1=A3=E6=A1=88=E5=A1=AB?= =?UTF-8?q?=E6=8A=A5=E5=88=9D=E6=AD=A5=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/sqldialects.xml | 1 + tianbao/产品档案填报.sql | 96 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 tianbao/产品档案填报.sql diff --git a/.idea/sqldialects.xml b/.idea/sqldialects.xml index fe6284e..8a8ce56 100644 --- a/.idea/sqldialects.xml +++ b/.idea/sqldialects.xml @@ -1,6 +1,7 @@ + \ No newline at end of file diff --git a/tianbao/产品档案填报.sql b/tianbao/产品档案填报.sql new file mode 100644 index 0000000..1394dc1 --- /dev/null +++ b/tianbao/产品档案填报.sql @@ -0,0 +1,96 @@ +-- ***************************** +-- 创建人员: 杨坤安 +-- 创建时间: 2024-08-14 +-- 功能描述: 产品档案填报 +-- ***************************** + + + + + + + + +-- 产品档案维度表 +select + * +from dwr.dim_product +where product_name = '酱香调味酒散酒酒体' +; + +-- 【1_report_产品编码】 + +select + product_code + ,product_name +from dwr.dim_product +; + + + + + +-- 【2_report_产品信息】 +select + * +from dwr.dim_product +-- where product_name = '${product_name}' +; + +-- 【产品编码】 +-- sql("DWS","select product_code from dwr.dim_product where product_name= '" + A2 + "'",1,1) + +-- 【产品所属事业部】 +-- sql("DWS","select b.fist_dept_name from(select bu_code from dwr.dim_product where product_name= '" + A2 + "')a left join(select distinct fist_dept_code ,fist_dept_name from dwr.dim_department)b on a.bu_code = b.fist_dept_cod",1,1) + +select b.fist_dept_name from(select bu_code from dwr.dim_product where product_name= '53度老郎酒.2002 1*6')a left join(select distinct fist_dept_code ,fist_dept_name from dwr.dim_department)b on a.bu_code = b.fist_dept_code + + +-- 【产品线】 +-- sql("DWS","select pl_name from dwr.dim_product where product_name= '" + A2 + "'",1,1) + + +-- 【产品系列编码】 +-- sql("DWS","select pr_code from dwr.dim_product where product_name= '" + A2 + "'",1,1) + + +-- 【产品系列名称】 +-- sql("DWS","select pr_name from dwr.dim_product where product_name= '" + A2 + "'",1,1) + +-- 【品项编码】 +-- sql("DWS","select pi_code from dwr.dim_product where product_name= '" + A2 + "'",1,1) + +-- 【品项名称】 +-- sql("DWS","select pi_name from dwr.dim_product where product_name= '" + A2 + "'",1,1) + +-- 【产品编码】 +-- sql("DWS","select product_code from dwr.dim_product where product_name= '" + A2 + "'",1,1) + +-- 【销售状态】 +-- sql("DWS","select sale_status from dwr.dim_product where product_name= '" + A2 + "'",1,1) + +-- 【是否纳入需求预测统计】 + +-- 【主产品编码】 +-- sql("DWS","select pl_name from dwr.dim_product where product_name= '" + A2 + "'",1,1) + +-- 【主产品名称】 + +-- 【度数】 +-- sql("DWS","select alc_degree from dwr.dim_product where product_name= '" + A2 + "'",1,1) + +-- 【规格】 +-- sql("DWS","select spec from dwr.dim_product where product_name= '" + A2 + "'",1,1) + +-- 【转换率】 +-- sql("DWS","select pack_base_num from dwr.dim_product where product_name= '" + A2 + "'",1,1) + +-- 【香型】 +-- sql("DWS","select aroma_type from dwr.dim_product where product_name= '" + A2 + "'",1,1) + +-- 【计划内价格】 +-- sql("DWS","select price_in from dwr.dim_product where product_name= '" + A2 + "'",1,1) + +-- 【计划外价格】 +-- sql("DWS","select price_out from dwr.dim_product where product_name= '" + A2 + "'",1,1) +