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
c17e1a50
Commit
c17e1a50
authored
Oct 23, 2018
by
fuwenlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改job
parent
2fa5e3eb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
16 deletions
+18
-16
CreateTableAuFile.java
src/main/java/com/byit/hyper/CreateTableAuFile.java
+0
-2
SchedulerJob.java
src/main/java/com/byit/job/scheduler/SchedulerJob.java
+4
-2
DecompressionFileZipUtl.java
src/main/java/com/byit/utils/DecompressionFileZipUtl.java
+0
-1
HyperSqlMap.java
src/main/java/com/byit/utils/HyperSqlMap.java
+4
-4
byit.properties
src/main/resources/byit.properties
+10
-7
No files found.
src/main/java/com/byit/hyper/CreateTableAuFile.java
View file @
c17e1a50
...
...
@@ -54,7 +54,6 @@ public class CreateTableAuFile {
for
(
int
i
=
0
;
i
<
columnCount
;
i
++)
{
String
columnName
=
rs
.
getMetaData
().
getColumnName
(
i
+
1
);
String
columnTypeName
=
rs
.
getMetaData
().
getColumnTypeName
(
i
+
1
);
System
.
out
.
println
(
"columnName : "
+
columnName
);
if
(
columnName
!=
null
&&
columnTypeName
!=
null
)
{
tableDef
.
addColumn
(
columnName
,
typeMap
.
get
(
columnTypeName
));
}
...
...
@@ -91,7 +90,6 @@ public class CreateTableAuFile {
}
column
=
column
.
substring
(
0
,
column
.
length
()
-
1
);
//String sql = "select " + column + " from " + tableName + " where post_code in (" + posIdString + ")";
System
.
out
.
println
(
"++"
+
sql
);
// String sql = "select " + column + " from " + tableName;
ps
=
conn
.
prepareStatement
(
sql
);
ResultSet
resultSet
=
ps
.
executeQuery
();
...
...
src/main/java/com/byit/job/scheduler/SchedulerJob.java
View file @
c17e1a50
...
...
@@ -15,7 +15,7 @@ import com.byit.utils.PropertiesUtil;
@Component
public
class
SchedulerJob
{
@Scheduled
(
cron
=
"0 0 1
1
* * ?"
)
@Scheduled
(
cron
=
"0 0 1
5,16,17
* * ?"
)
// @Scheduled(cron = "0 0 0/1 * * ?")
public
void
upLoadReportByPositionIdScheduler
()
throws
Exception
{
//long a = System.currentTimeMillis();
...
...
@@ -25,7 +25,9 @@ public class SchedulerJob {
DecompressionFileZipUtl
.
hyperPath
=
PropertiesUtil
.
getValue
(
null
,
"hyperPath"
);
DecompressionFileZipUtl
.
twbxPath
=
PropertiesUtil
.
getValue
(
null
,
"twbxPath"
);
// 获取岗位id的json字符串数组
String
postionJson
=
HttpClient
.
doGet
(
"http://10.0.103.193:8080/portal/queryserve/queryPositionIdAndUserCode.do"
);
String
url
=
PropertiesUtil
.
getValue
(
null
,
"postion.url"
);
System
.
out
.
println
(
"url:>>>>>>>"
+
url
);
String
postionJson
=
HttpClient
.
doGet
(
url
);
// json串转化成list
Map
<
String
,
Object
>
map
=
JSONObject
.
parseObject
(
postionJson
);
//获取岗位数据
...
...
src/main/java/com/byit/utils/DecompressionFileZipUtl.java
View file @
c17e1a50
...
...
@@ -242,7 +242,6 @@ public class DecompressionFileZipUtl {
byte
[]
buffers
=
new
byte
[
buffer
];
while
((
byteread
=
inStream
.
read
(
buffers
))
!=
-
1
)
{
bytesum
+=
byteread
;
// 字节数 文件大小
System
.
out
.
println
(
bytesum
);
fs
.
write
(
buffers
,
0
,
byteread
);
}
inStream
.
close
();
...
...
src/main/java/com/byit/utils/HyperSqlMap.java
View file @
c17e1a50
...
...
@@ -15,21 +15,21 @@ public class HyperSqlMap {
public
HyperSqlMap
(){
//key为hyper文件得名字,value为hyper文件得查询sql
hyperSqlMap
.
put
(
"BI_HOS_SALES_CURR_V_B (BYIT)"
,
"SELECT a1.* from BYIT.bi_hos_sales_curr_v
_b
a1 inner join "
hyperSqlMap
.
put
(
"BI_HOS_SALES_CURR_V_B (BYIT)"
,
"SELECT a1.* from BYIT.bi_hos_sales_curr_v a1 inner join "
+
"(select distinct subordinate_position_code "
+
"from BYIT.auth_hos_sales_curr "
+
" where position_code like '%"
+
position_code
+
"%' )a2 "
+
"on a1.
销售代表
岗位代码 = a2.subordinate_position_code inner join "
+
"on a1.
大区经理
岗位代码 = a2.subordinate_position_code inner join "
+
"(select distinct brand_name from BYIT.auth_empl_brand "
+
"where empl_code like '%"
+
empl_code
+
"%' ) a3 "
+
"on a1.品牌名称=a3.brand_name"
);
hyperSqlMap
.
put
(
"BI_HOS_SALES_HIS_V_B (BYIT)"
,
"SELECT a1.* "
+
"from BYIT.bi_hos_sales_curr_v
_b
a1 inner join ("
+
"from BYIT.bi_hos_sales_curr_v a1 inner join ("
+
"select distinct subordinate_position_code "
+
"from BYIT.auth_hos_sales_curr "
+
"where position_code like '%"
+
position_code
+
"%' )a2 "
+
"on a1.
销售代表
岗位代码=a2.subordinate_position_code "
+
"on a1.
大区经理
岗位代码=a2.subordinate_position_code "
+
"inner join(select distinct brand_name from BYIT.auth_empl_brand "
+
"where empl_code like '%"
+
empl_code
+
"%' )a3 "
+
"on a1.品牌名称=a3.brand_name"
);
...
...
src/main/resources/byit.properties
View file @
c17e1a50
#####localPath####
local.path
=
D:
spring.datasource.url
=
jdbc:oracle:thin:@10.
0.120.166:1521:BYIT
spring.datasource.username
=
BYIT
spring.datasource.password
=
byit
spring.datasource.url
=
jdbc:oracle:thin:@10.
131.128.44:1521:orcl
spring.datasource.username
=
munditemp
spring.datasource.password
=
Mundipharma2018
spring.datasource.type
=
com.alibaba.druid.pool.DruidDataSource
spring.datasource.driver-class-name
=
oracle.jdbc.driver.OracleDriver
#template file path###
templatePath
=
D
:
\\
test
templatePath
=
C
:
\\
test
#hyper file path###
hyperPath
=
D:
\\
hyperPath
=
C:
\\
hyper
#twbx file path###
twbxPath
=
F:
\\
test
\ No newline at end of file
twbxPath
=
C:
\\
mdtest
#get postion method url
postion.url
=
http://10.113.1.71:8080/portal/queryserve/queryPositionIdAndUserCode.do
\ No newline at end of file
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