Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
md-job
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
md-job
Commits
9a608a91
Commit
9a608a91
authored
Mar 01, 2019
by
fuwenlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
5f36015c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
215 additions
and
26 deletions
+215
-26
DecompressionFileZipUtl.java
src/main/java/com/byit/utils/DecompressionFileZipUtl.java
+6
-6
HyperSqlMap.java
src/main/java/com/byit/utils/HyperSqlMap.java
+209
-20
No files found.
src/main/java/com/byit/utils/DecompressionFileZipUtl.java
View file @
9a608a91
...
@@ -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
;
...
...
src/main/java/com/byit/utils/HyperSqlMap.java
View file @
9a608a91
...
@@ -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"
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment