Commit 9a608a91 by fuwenlei

修改

parent 5f36015c
...@@ -32,7 +32,7 @@ public class DecompressionFileZipUtl { ...@@ -32,7 +32,7 @@ public class DecompressionFileZipUtl {
* *
* @throws Exception * @throws Exception
*/ */
public static void checkFile(String filePath, String zipName) throws Exception { public void checkFile(String filePath, String zipName) throws Exception {
File file = new File(filePath); File file = new File(filePath);
File[] fileArr = file.listFiles(); File[] fileArr = file.listFiles();
// 判断文件夹是否为空 // 判断文件夹是否为空
...@@ -64,7 +64,7 @@ public class DecompressionFileZipUtl { ...@@ -64,7 +64,7 @@ public class DecompressionFileZipUtl {
* 查询解压文件下的文件夹 * 查询解压文件下的文件夹
* @throws Exception * @throws Exception
* */ * */
public static void nextFile(String filePath,String zipName) throws Exception{ public void nextFile(String filePath,String zipName) throws Exception{
boolean flag = false; boolean flag = false;
File file = new File(filePath); File file = new File(filePath);
File[] fileArr = file.listFiles(); File[] fileArr = file.listFiles();
...@@ -149,7 +149,7 @@ public class DecompressionFileZipUtl { ...@@ -149,7 +149,7 @@ public class DecompressionFileZipUtl {
/** /**
* 解压zip文件 * 解压zip文件
*/ */
public static void unZip(String path) { public void unZip(String path) {
int count = -1; int count = -1;
String savepath = ""; String savepath = "";
...@@ -231,7 +231,7 @@ public class DecompressionFileZipUtl { ...@@ -231,7 +231,7 @@ public class DecompressionFileZipUtl {
/** /**
* 替换数据文件 * 替换数据文件
*/ */
public static void copyFile(String oldPath, String newPath) { public void copyFile(String oldPath, String newPath) {
try { try {
int bytesum = 0; int bytesum = 0;
int byteread = 0; int byteread = 0;
...@@ -258,7 +258,7 @@ public class DecompressionFileZipUtl { ...@@ -258,7 +258,7 @@ public class DecompressionFileZipUtl {
/** /**
* 删除文件夹下所有文件 * 删除文件夹下所有文件
*/ */
public static boolean delAllFile(String path) { public boolean delAllFile(String path) {
boolean flag = false; boolean flag = false;
File file = new File(path); File file = new File(path);
if (!file.exists()) { if (!file.exists()) {
...@@ -295,7 +295,7 @@ public class DecompressionFileZipUtl { ...@@ -295,7 +295,7 @@ public class DecompressionFileZipUtl {
/** /**
* 删除空文件夹 * 删除空文件夹
*/ */
public static void delFolder(String folderPath) { public void delFolder(String folderPath) {
try { try {
delAllFile(folderPath); // 删除完里面所有内容 delAllFile(folderPath); // 删除完里面所有内容
String filePath = folderPath; String filePath = folderPath;
......
...@@ -15,24 +15,213 @@ public class HyperSqlMap { ...@@ -15,24 +15,213 @@ public class HyperSqlMap {
public HyperSqlMap(){ public HyperSqlMap(){
//key为hyper文件得名字,value为hyper文件得查询sql //key为hyper文件得名字,value为hyper文件得查询sql
hyperSqlMap.put("BI_HOS_SALES_CURR_V_B (BYIT)", "SELECT a1.* from MUNDITEMP.bi_hos_sales_curr_v a1 inner join " //Business Review-All Channels.twbx 仪表板01-04对应SQL
+"(select distinct subordinate_position_code " hyperSqlMap.put("BI_ALL_SALES_CURR_V", "SELECT a1.* from BI_ALL_SALES_CURR_V a1");
+ "from MUNDITEMP.auth_hos_sales_curr "
+" where position_code like '%"+position_code+"%' )a2 " //Business Review-Hospital.twbx 仪表板05-07对应SQL
+"on a1.大区经理岗位代码 = a2.subordinate_position_code inner join " hyperSqlMap.put("BI_HOS_SALES_CURR_V", "SELECT a1.* "
+"(select distinct brand_name from MUNDITEMP.auth_empl_brand " +" from BI_HOS_SALES_CURR_V a1 "
+"where empl_code like '%"+empl_code+"%' ) a3 " +" inner join ( "
+"on a1.品牌名称=a3.brand_name"); + "select distinct subordinate_position_code "
+ "from auth_hos_sales_curr "
hyperSqlMap.put("BI_HOS_SALES_HIS_V_B (BYIT)", "SELECT a1.* " + "where position_code like '%"+position_code+"%' )a2 "
+"from MUNDITEMP.bi_hos_sales_curr_v a1 inner join (" + "on a1.大区经理岗位代码=a2.subordinate_position_code inner join "
+"select distinct subordinate_position_code " + "( select distinct brand_name from auth_empl_brand "
+"from MUNDITEMP.auth_hos_sales_curr " + "where empl_code like '%"+empl_code+"%' )a3 on a1.品牌名称=a3.brand_name");
+"where position_code like '%"+position_code+"%' )a2 "
+"on a1.大区经理岗位代码=a2.subordinate_position_code " //癌痛团队季度排名报告-大区经理
+"inner join(select distinct brand_name from MUNDITEMP.auth_empl_brand " hyperSqlMap.put("BI_HOS_SALES_RANK_ZYZ_DSM_V", "SELECT a1.* from "
+"where empl_code like '%"+empl_code+"%' )a3 " + "BI_HOS_SALES_RANK_ZYZ_DSM_V a1 inner join ( "
+"on a1.品牌名称=a3.brand_name"); + "select distinct subordinate_position_code from auth_hos_sales_curr "
+ "where position_code like '%"+position_code+"%' )a2 "
} + "on a1.大区经理岗位代码=a2.subordinate_position_code");
//癌痛团队季度排名报告-大区经理
hyperSqlMap.put("BI_HOS_SALES_RANK_ZYZ_MR_V", "SELECT a1.* from BI_HOS_SALES_RANK_ZYZ_MR_V a1 "
+ "inner join ( select distinct subordinate_position_code from auth_hos_sales_curr "
+ "where position_code like '%"+position_code+"%' "
+ ")a2 "
+ "on a1.大区经理岗位代码=a2.subordinate_position_code");
//癌痛团队季度排名报告-大区经理
hyperSqlMap.put("BI_HOS_SALES_RANK_ZYZ_RSM_V", "SELECT a1.* "
+ "from BI_HOS_SALES_RANK_ZYZ_RSM_V a1 inner join ( "
+ "select distinct subordinate_position_code "
+ "from auth_hos_sales_curr where position_code like '%"+position_code+"%' )a2 "
+ "on a1.大区经理岗位代码=a2.subordinate_position_code");
//癌痛团队季度排名报告-区域总监
hyperSqlMap.put("BI_HOS_SALES_RANK_ZYZ_DSM_V", "SELECT a1.* "
+ "from BI_HOS_SALES_RANK_ZYZ_DSM_V a1 inner join ( "
+ "select distinct subordinate_position_code from auth_hos_sales_curr "
+ "where position_code like '%"+position_code+"%' "
+ ")a2 "
+ "on a1.大区经理岗位代码=a2.subordinate_position_code");
//癌痛团队季度排名报告-区域总监
hyperSqlMap.put("BI_HOS_SALES_RANK_ZYZ_MR_V", "SELECT a1.* from BI_HOS_SALES_RANK_ZYZ_MR_V a1 "
+ "inner join ( select distinct subordinate_position_code from auth_hos_sales_curr "
+ "where position_code like '%"+position_code+"%' )a2 "
+ "on a1.大区经理岗位代码=a2.subordinate_position_code");
//癌痛团队季度排名报告-区域总监
hyperSqlMap.put("BI_HOS_SALES_RANK_ZYZ_RSD_V", "SELECT a1.* from BI_HOS_SALES_RANK_ZYZ_RSD_V a1 "
+ "inner join ( select distinct subordinate_position_code from auth_hos_sales_curr "
+ "where position_code like '%"+position_code+"%' "
+ ")a2 "
+ "on a1.区域总岗位代码=a2.subordinate_position_code");
//癌痛团队季度排名报告-区域总监
hyperSqlMap.put("BI_HOS_SALES_RANK_ZYZ_RSM_V", "SELECT a1.* from BI_HOS_SALES_RANK_ZYZ_RSM_V a1 "
+ " inner join ( select distinct subordinate_position_code "
+ "from auth_hos_sales_curr "
+ " where position_code like '%"+position_code+"%' "
+ ")a2 on a1.大区经理岗位代码=a2.subordinate_position_code");
//非癌痛团队季度排名报告-大区经理.twbx
hyperSqlMap.put("BI_HOS_SALES_RANK_ZYZ_DSM_V", "SELECT a1.* "
+ " from BI_HOS_SALES_RANK_ZYZ_DSM_V a1 inner join ( "
+ "select distinct subordinate_position_code from auth_hos_sales_curr "
+ "where position_code like '%"+position_code+"%' "
+ ")a2 on a1.大区经理岗位代码=a2.subordinate_position_code");
//非癌痛团队季度排名报告-大区经理.twbx
hyperSqlMap.put("BI_HOS_SALES_RANK_ZYZ_MR_V", "SELECT a1.* from BI_HOS_SALES_RANK_ZYZ_MR_V a1 "
+ "inner join ( select distinct subordinate_position_code "
+ "from auth_hos_sales_curr "
+ "where position_code like '%"+position_code+"%' "
+ ")a2 on a1.大区经理岗位代码=a2.subordinate_position_code");
//非癌痛团队季度排名报告-大区经理.twbx
hyperSqlMap.put("BI_HOS_SALES_RANK_ZYZ_RSM_V", "SELECT a1.* "
+ "from BI_HOS_SALES_RANK_ZYZ_RSM_V a1 inner join ( "
+ "select distinct subordinate_position_code "
+ "from auth_hos_sales_curr where position_code like '%"+position_code+"%' )a2 "
+ "on a1.大区经理岗位代码=a2.subordinate_position_code");
//全产品医院团队开拓季度排名报告-大区经理
hyperSqlMap.put("BI_HOS_SALES_RANK_QCP_DSM_V", "SELECT a1.* from BI_HOS_SALES_RANK_QCP_DSM_V a1 "
+ "inner join ( select distinct subordinate_position_code "
+ "from auth_hos_sales_curr "
+ "where position_code like '%"+position_code+"%' "
+ ")a2 on a1.大区经理岗位代码=a2.subordinate_position_code");
//全产品医院团队开拓季度排名报告-大区经理
hyperSqlMap.put("BI_HOS_SALES_RANK_QCP_MR_V", "SELECT a1.* from BI_HOS_SALES_RANK_QCP_MR_V a1 "
+ " inner join ( "
+ "select distinct subordinate_position_code "
+ " from auth_hos_sales_curr where position_code like '%"+position_code+"%' )a2 "
+ "on a1.大区经理岗位代码=a2.subordinate_position_code");
//全产品医院团队开拓季度排名报告-大区经理
hyperSqlMap.put("BI_HOS_SALES_RANK_QCP_RSM_V", "SELECT a1.* from BI_HOS_SALES_RANK_QCP_RSM_V a1 "
+ "inner join ( select distinct subordinate_position_code "
+ "from auth_hos_sales_curr where position_code like '%"+position_code+"%' )a2 "
+ "on a1.大区经理岗位代码=a2.subordinate_position_code");
//全产品医院团队业绩季度排名报告-大区经理
hyperSqlMap.put("BI_HOS_SALES_RANK_QCP_DSM_V", "SELECT a1.* from BI_HOS_SALES_RANK_QCP_DSM_V a1 "
+ "inner join ( select distinct subordinate_position_code "
+ "from auth_hos_sales_curr where position_code like '%"+position_code+"%' )a2 "
+ "on a1.大区经理岗位代码=a2.subordinate_position_code");
//全产品医院团队业绩季度排名报告-大区经理
hyperSqlMap.put("BI_HOS_SALES_RANK_QCP_MR_V", "SELECT a1.* "
+ " from BI_HOS_SALES_RANK_QCP_MR_V a1 inner join ( "
+ "select distinct subordinate_position_code from auth_hos_sales_curr "
+ "where position_code like '%"+position_code+"%' )a2 "
+ "on a1.大区经理岗位代码=a2.subordinate_position_code");
//全产品医院团队业绩季度排名报告-大区经理
hyperSqlMap.put("BI_HOS_SALES_RANK_QCP_RSM_V", "SELECT a1.* "
+ "from BI_HOS_SALES_RANK_QCP_RSM_V a1 inner join ( "
+ "select distinct subordinate_position_code from auth_hos_sales_curr "
+ "where position_code like '%"+position_code+"%' )a2 "
+ "on a1.大区经理岗位代码=a2.subordinate_position_code");
//术后痛团队季度排名报告-大区经理
hyperSqlMap.put("BI_HOS_SALES_RANK_ZYZ_DSM_V", "SELECT a1.* "
+ "from BI_HOS_SALES_RANK_ZYZ_DSM_V a1 inner join ( "
+ "select distinct subordinate_position_code from auth_hos_sales_curr "
+ "where position_code like '%"+position_code+"%' "
+ ")a2 "
+ "on a1.大区经理岗位代码=a2.subordinate_position_code");
//术后痛团队季度排名报告-大区经理
hyperSqlMap.put("BI_HOS_SALES_RANK_ZYZ_MR_V", "SELECT a1.* "
+ " from BI_HOS_SALES_RANK_ZYZ_MR_V a1 inner join ( "
+ "select distinct subordinate_position_code "
+ " from auth_hos_sales_curr "
+ "where position_code like '%"+position_code+"%' )a2 "
+ "on a1.大区经理岗位代码=a2.subordinate_position_code");
//术后痛团队季度排名报告-大区经理
hyperSqlMap.put("BI_HOS_SALES_RANK_ZYZ_RSM_V", "SELECT a1.* from BI_HOS_SALES_RANK_ZYZ_RSM_V a1 "
+ "inner join ( select distinct subordinate_position_code "
+ "from auth_hos_sales_curr "
+ "where position_code like '%"+position_code+"%' )a2 "
+ "on a1.大区经理岗位代码=a2.subordinate_position_code");
//库存报告.twbx
hyperSqlMap.put("BI_INVENTORY_CURR_V", "SELECT a1.* "
+" from BI_INVENTORY_CURR_V a1 "
+" inner join ( "
+" select distinct subordinate_position_code "
+" from auth_hos_sales_curr "
+" where position_code like '%"+position_code+"%' "
+" )a2 "
+" on a1.大区经理岗位代码=a2.subordinate_position_code "
+" inner join "
+" ( "
+" select distinct brand_name from auth_empl_brand "
+" where empl_code like '%"+empl_code+"%' "
+" )a3 "
+" on a1.品牌名称=a3.brand_name");
//销售报告.twbx
hyperSqlMap.put("BI_COMM_SALES_CURR_V", "SELECT a1.* "
+" from BI_COMM_SALES_CURR_V a1 "
+" inner join ( "
+" select distinct subordinate_position_code "
+" from auth_hos_sales_curr "
+" where position_code like '%"+position_code+"%' "
+" )a2 "
+" on a1.大区经理岗位代码=a2.subordinate_position_code "
+" inner join "
+" ( "
+" select distinct brand_name from auth_empl_brand "
+" where empl_code like '%"+empl_code+"%' "
+" )a3 "
+" on a1.品牌名称=a3.brand_name");
//商业分省销售报告
hyperSqlMap.put("BI_COMM_SALES_CURR_MON_V", "SELECT a1.* "
+ "from bi_all_sales_curr_v a1 "
+ "inner join ( select distinct subordinate_position_code "
+ "from auth_hos_sales_curr "
+ " where position_code like '%"+position_code+"%' )a2 "
+ "on a1.大区经理岗位代码=a2.subordinate_position_code "
+ "inner join ( select distinct brand_name from auth_empl_brand "
+ "where empl_code like '%"+empl_code+"%' )a3 "
+ "on a1.品牌名称=a3.brand_name");
//销售业绩报告
hyperSqlMap.put("BI_HOS_SALES_CURR_V", "SELECT a1.* "
+ " from BI_HOS_SALES_CURR_V a1 inner join ( "
+ "select distinct subordinate_position_code "
+ "from auth_hos_sales_curr "
+ "where position_code like '%"+position_code+"%' )a2 "
+ "on a1.大区经理岗位代码=a2.subordinate_position_code "
+ "inner join ( select distinct brand_name from auth_empl_brand "
+ " where empl_code like '%"+empl_code+"%' )a3 "
+ "on a1.品牌名称=a3.brand_name");
//医院销售报告
hyperSqlMap.put("BI_HOS_SALES_CURR_V", "SELECT a1.* "
+ "from BI_HOS_SALES_CURR_V a1 inner join ( "
+ " select distinct subordinate_position_code "
+ "from auth_hos_sales_curr "
+ "where position_code like '%"+position_code+"%' )a2 "
+ "on a1.大区经理岗位代码=a2.subordinate_position_code "
+ "inner join ( "
+ "select distinct brand_name from auth_empl_brand "
+ "where empl_code like '%"+empl_code+"%' )a3 "
+ "on a1.品牌名称=a3.brand_name");
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment