Commit c17e1a50 by fuwenlei

修改job

parent 2fa5e3eb
...@@ -54,7 +54,6 @@ public class CreateTableAuFile { ...@@ -54,7 +54,6 @@ public class CreateTableAuFile {
for (int i = 0; i < columnCount; i++) { for (int i = 0; i < columnCount; i++) {
String columnName = rs.getMetaData().getColumnName(i + 1); String columnName = rs.getMetaData().getColumnName(i + 1);
String columnTypeName = rs.getMetaData().getColumnTypeName(i + 1); String columnTypeName = rs.getMetaData().getColumnTypeName(i + 1);
System.out.println("columnName : " + columnName);
if (columnName != null && columnTypeName != null) { if (columnName != null && columnTypeName != null) {
tableDef.addColumn(columnName, typeMap.get(columnTypeName)); tableDef.addColumn(columnName, typeMap.get(columnTypeName));
} }
...@@ -91,7 +90,6 @@ public class CreateTableAuFile { ...@@ -91,7 +90,6 @@ public class CreateTableAuFile {
} }
column = column.substring(0, column.length() - 1); column = column.substring(0, column.length() - 1);
//String sql = "select " + column + " from " + tableName + " where post_code in (" + posIdString + ")"; //String sql = "select " + column + " from " + tableName + " where post_code in (" + posIdString + ")";
System.out.println("++" + sql);
// String sql = "select " + column + " from " + tableName; // String sql = "select " + column + " from " + tableName;
ps = conn.prepareStatement(sql); ps = conn.prepareStatement(sql);
ResultSet resultSet = ps.executeQuery(); ResultSet resultSet = ps.executeQuery();
......
...@@ -15,7 +15,7 @@ import com.byit.utils.PropertiesUtil; ...@@ -15,7 +15,7 @@ import com.byit.utils.PropertiesUtil;
@Component @Component
public class SchedulerJob { public class SchedulerJob {
@Scheduled(cron = "0 0 11 * * ?") @Scheduled(cron = "0 0 15,16,17 * * ?")
// @Scheduled(cron = "0 0 0/1 * * ?") // @Scheduled(cron = "0 0 0/1 * * ?")
public void upLoadReportByPositionIdScheduler() throws Exception { public void upLoadReportByPositionIdScheduler() throws Exception {
//long a = System.currentTimeMillis(); //long a = System.currentTimeMillis();
...@@ -25,7 +25,9 @@ public class SchedulerJob { ...@@ -25,7 +25,9 @@ public class SchedulerJob {
DecompressionFileZipUtl.hyperPath = PropertiesUtil.getValue(null, "hyperPath"); DecompressionFileZipUtl.hyperPath = PropertiesUtil.getValue(null, "hyperPath");
DecompressionFileZipUtl.twbxPath = PropertiesUtil.getValue(null, "twbxPath"); DecompressionFileZipUtl.twbxPath = PropertiesUtil.getValue(null, "twbxPath");
// 获取岗位id的json字符串数组 // 获取岗位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 // json串转化成list
Map<String,Object> map= JSONObject.parseObject(postionJson); Map<String,Object> map= JSONObject.parseObject(postionJson);
//获取岗位数据 //获取岗位数据
......
...@@ -242,7 +242,6 @@ public class DecompressionFileZipUtl { ...@@ -242,7 +242,6 @@ public class DecompressionFileZipUtl {
byte[] buffers = new byte[buffer]; byte[] buffers = new byte[buffer];
while ((byteread = inStream.read(buffers)) != -1) { while ((byteread = inStream.read(buffers)) != -1) {
bytesum += byteread; // 字节数 文件大小 bytesum += byteread; // 字节数 文件大小
System.out.println(bytesum);
fs.write(buffers, 0, byteread); fs.write(buffers, 0, byteread);
} }
inStream.close(); inStream.close();
......
...@@ -15,21 +15,21 @@ public class HyperSqlMap { ...@@ -15,21 +15,21 @@ 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 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 " +"(select distinct subordinate_position_code "
+ "from BYIT.auth_hos_sales_curr " + "from BYIT.auth_hos_sales_curr "
+" where position_code like '%"+position_code+"%' )a2 " +" 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 " +"(select distinct brand_name from BYIT.auth_empl_brand "
+"where empl_code like '%"+empl_code+"%' ) a3 " +"where empl_code like '%"+empl_code+"%' ) a3 "
+"on a1.品牌名称=a3.brand_name"); +"on a1.品牌名称=a3.brand_name");
hyperSqlMap.put("BI_HOS_SALES_HIS_V_B (BYIT)", "SELECT a1.* " 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 " +"select distinct subordinate_position_code "
+"from BYIT.auth_hos_sales_curr " +"from BYIT.auth_hos_sales_curr "
+"where position_code like '%"+position_code+"%' )a2 " +"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 " +"inner join(select distinct brand_name from BYIT.auth_empl_brand "
+"where empl_code like '%"+empl_code+"%' )a3 " +"where empl_code like '%"+empl_code+"%' )a3 "
+"on a1.品牌名称=a3.brand_name"); +"on a1.品牌名称=a3.brand_name");
......
#####localPath#### #####localPath####
local.path = D: local.path = D:
spring.datasource.url=jdbc:oracle:thin:@10.0.120.166:1521:BYIT spring.datasource.url=jdbc:oracle:thin:@10.131.128.44:1521:orcl
spring.datasource.username=BYIT spring.datasource.username=munditemp
spring.datasource.password=byit spring.datasource.password=Mundipharma2018
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
#template file path### #template file path###
templatePath=D:\\test templatePath=C:\\test
#hyper file path### #hyper file path###
hyperPath=D:\\ hyperPath=C:\\hyper
#twbx file path### #twbx file path###
twbxPath=F:\\test twbxPath=C:\\mdtest
\ No newline at end of file
#get postion method url
postion.url=http://10.113.1.71:8080/portal/queryserve/queryPositionIdAndUserCode.do
\ No newline at end of file
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